1
+ import PixTable from ' @1024pix/pix-ui/components/pix-table' ;
2
+ import PixTableColumn from ' @1024pix/pix-ui/components/pix-table-column' ;
1
3
import { array } from ' @ember/helper' ;
2
4
import { LinkTo } from ' @ember/routing' ;
3
5
import Component from ' @glimmer/component' ;
@@ -14,54 +16,63 @@ export default class BadgesList extends Component {
14
16
15
17
<template >
16
18
<section class =" page-section" >
17
- <div class =" content-text content-text--small" >
18
- <h2 class =" complementary-certification-details__badges-title" >
19
- {{t " components.complementary-certifications.target-profiles.badges-list.title" }}
20
- </h2 >
21
- <div class =" table-admin" >
22
- <table >
23
- <thead >
24
- <tr >
25
- <th >{{t " components.complementary-certifications.target-profiles.badges-list.header.image-url" }} </th >
26
- <th class =" complementary-certification-details-table__complementary-certification-badge-name" >
27
- {{t " components.complementary-certifications.target-profiles.badges-list.header.name" }}
28
- </th >
29
- <th >{{t " components.complementary-certifications.target-profiles.badges-list.header.level" }} </th >
30
- <th >
31
- {{t " components.complementary-certifications.target-profiles.badges-list.header.minimum-earned-pix" }}
32
- </th >
33
- <th >{{t " components.complementary-certifications.target-profiles.badges-list.header.id" }} </th >
34
- </tr >
35
- </thead >
36
-
37
- <tbody >
38
- {{#each this . currentTargetProfileBadges as | badge | }}
39
- <tr >
40
- <td >
41
- <img
42
- class =" complementary-certification-details-table__complementary-certification-badge-image-url"
43
- src ={{badge.imageUrl }}
44
- alt =" {{badge.label }} "
45
- />
46
- </td >
47
- <td >{{badge.label }} </td >
48
- <td >{{badge.level }} </td >
49
- <td >{{this .getMinimumEarnedPixValue badge.minimumEarnedPix }} </td >
50
- <td >
51
- <LinkTo
52
- @ route =" authenticated.target-profiles.target-profile.badges.badge"
53
- @ models ={{array @ currentTargetProfile.id badge.id }}
54
- target =" _blank"
55
- >
56
- {{badge.id }}
57
- </LinkTo >
58
- </td >
59
- </tr >
60
- {{/each }}
61
- </tbody >
62
- </table >
63
- </div >
64
- </div >
19
+ <h2 class =" complementary-certification-details__badges-title" >
20
+ {{t " components.complementary-certifications.target-profiles.badges-list.title" }}
21
+ </h2 >
22
+ <PixTable @ data ={{this .currentTargetProfileBadges }} >
23
+ <: columns as | row currentTargetProfileBadge | >
24
+ <PixTableColumn @ context ={{currentTargetProfileBadge }} >
25
+ <: header >
26
+ {{t " components.complementary-certifications.target-profiles.badges-list.header.image-url" }}
27
+ </: header >
28
+ <: cell >
29
+ <img
30
+ class =" complementary-certification-details-table__complementary-certification-badge-image-url"
31
+ src ={{row.imageUrl }}
32
+ alt =" {{row.label }} "
33
+ />
34
+ </: cell >
35
+ </PixTableColumn >
36
+ <PixTableColumn @ context ={{currentTargetProfileBadge }} class =" table__column--wide" >
37
+ <: header >
38
+ {{t " components.complementary-certifications.target-profiles.badges-list.header.name" }}
39
+ </: header >
40
+ <: cell >
41
+ {{row.label }}
42
+ </: cell >
43
+ </PixTableColumn >
44
+ <PixTableColumn @ context ={{currentTargetProfileBadge }} >
45
+ <: header >
46
+ {{t " components.complementary-certifications.target-profiles.badges-list.header.level" }}
47
+ </: header >
48
+ <: cell >
49
+ {{row.level }}
50
+ </: cell >
51
+ </PixTableColumn >
52
+ <PixTableColumn @ context ={{currentTargetProfileBadge }} >
53
+ <: header >
54
+ {{t " components.complementary-certifications.target-profiles.badges-list.header.minimum-earned-pix" }}
55
+ </: header >
56
+ <: cell >
57
+ {{this .getMinimumEarnedPixValue row.minimumEarnedPix }}
58
+ </: cell >
59
+ </PixTableColumn >
60
+ <PixTableColumn @ context ={{currentTargetProfileBadge }} >
61
+ <: header >
62
+ {{t " components.complementary-certifications.target-profiles.badges-list.header.id" }}
63
+ </: header >
64
+ <: cell >
65
+ <LinkTo
66
+ @ route =" authenticated.target-profiles.target-profile.badges.badge"
67
+ @ models ={{array @ currentTargetProfile.id row.id }}
68
+ target =" _blank"
69
+ >
70
+ {{row.id }}
71
+ </LinkTo >
72
+ </: cell >
73
+ </PixTableColumn >
74
+ </: columns >
75
+ </PixTable >
65
76
</section >
66
77
</template >
67
78
}
0 commit comments