|
| 1 | +import PixTable from '@1024pix/pix-ui/components/pix-table'; |
| 2 | +import PixTableColumn from '@1024pix/pix-ui/components/pix-table-column'; |
1 | 3 | import { LinkTo } from '@ember/routing';
|
2 | 4 | import dayjsFormat from 'ember-dayjs/helpers/dayjs-format';
|
| 5 | +import { t } from 'ember-intl'; |
3 | 6 |
|
4 | 7 | <template>
|
5 | 8 | <section class="page-section">
|
6 |
| - <div class="content-text content-text--small"> |
7 |
| - <h2 class="complementary-certification-details__history-title"> |
8 |
| - Historique des profils cibles rattachés |
9 |
| - </h2> |
10 |
| - <div class="table-admin"> |
11 |
| - <table> |
12 |
| - <thead> |
13 |
| - <tr> |
14 |
| - <th>Nom du profil cible</th> |
15 |
| - <th>Date de rattachement</th> |
16 |
| - <th>Date de détachement</th> |
17 |
| - </tr> |
18 |
| - </thead> |
19 |
| - <tbody> |
20 |
| - {{#each @targetProfilesHistory as |targetProfileHistory|}} |
21 |
| - <tr> |
22 |
| - <td> |
23 |
| - <LinkTo |
24 |
| - @route="authenticated.target-profiles.target-profile" |
25 |
| - @model={{targetProfileHistory.id}} |
26 |
| - class="complementary-certification-details-target-profile__link" |
27 |
| - > |
28 |
| - {{targetProfileHistory.name}} |
29 |
| - </LinkTo> |
30 |
| - </td> |
31 |
| - <td>{{dayjsFormat targetProfileHistory.attachedAt "DD/MM/YYYY"}}</td> |
32 |
| - <td> |
33 |
| - {{if targetProfileHistory.detachedAt (dayjsFormat targetProfileHistory.detachedAt "DD/MM/YYYY") "-"}} |
34 |
| - </td> |
35 |
| - </tr> |
36 |
| - {{/each}} |
37 |
| - </tbody> |
38 |
| - </table> |
39 |
| - </div> |
40 |
| - </div> |
| 9 | + <h2 class="complementary-certification-details__history-title"> |
| 10 | + {{t "components.complementary-certifications.target-profiles.history-list.title"}} |
| 11 | + </h2> |
| 12 | + <PixTable @data={{@targetProfilesHistory}}> |
| 13 | + <:columns as |row targetProfileHistory|> |
| 14 | + <PixTableColumn @context={{targetProfileHistory}}> |
| 15 | + <:header> |
| 16 | + {{t "components.complementary-certifications.target-profiles.history-list.headers.name"}} |
| 17 | + </:header> |
| 18 | + <:cell> |
| 19 | + <LinkTo |
| 20 | + @route="authenticated.target-profiles.target-profile" |
| 21 | + @model={{row.id}} |
| 22 | + class="complementary-certification-details-target-profile__link" |
| 23 | + > |
| 24 | + {{row.name}} |
| 25 | + </LinkTo> |
| 26 | + </:cell> |
| 27 | + </PixTableColumn> |
| 28 | + <PixTableColumn @context={{targetProfileHistory}}> |
| 29 | + <:header> |
| 30 | + {{t "components.complementary-certifications.target-profiles.history-list.headers.attached-at"}} |
| 31 | + </:header> |
| 32 | + <:cell> |
| 33 | + {{dayjsFormat row.attachedAt "DD/MM/YYYY"}} |
| 34 | + </:cell> |
| 35 | + </PixTableColumn> |
| 36 | + <PixTableColumn @context={{targetProfileHistory}}> |
| 37 | + <:header> |
| 38 | + {{t "components.complementary-certifications.target-profiles.history-list.headers.detached-at"}} |
| 39 | + </:header> |
| 40 | + <:cell> |
| 41 | + {{if row.detachedAt (dayjsFormat row.detachedAt "DD/MM/YYYY") "-"}} |
| 42 | + </:cell> |
| 43 | + </PixTableColumn> |
| 44 | + </:columns> |
| 45 | + </PixTable> |
41 | 46 | </section>
|
42 | 47 | </template>
|
0 commit comments