|
| 1 | +import PixTable from '@1024pix/pix-ui/components/pix-table'; |
| 2 | +import PixTableColumn from '@1024pix/pix-ui/components/pix-table-column'; |
1 | 3 | import { concat, fn, get } from '@ember/helper';
|
2 | 4 | import { on } from '@ember/modifier';
|
3 | 5 | import { action } from '@ember/object';
|
@@ -82,28 +84,41 @@ export default class CertificationCompetenceList extends Component {
|
82 | 84 | </div>
|
83 | 85 | {{/each}}
|
84 | 86 | {{else}}
|
85 |
| - <table aria-label="{{t 'pages.certifications.certification.result.table.label'}}" class="table-admin"> |
86 |
| - <thead> |
87 |
| - <tr> |
88 |
| - <th scope="col">{{t "pages.certifications.certification.result.table.headers.competence"}}</th> |
89 |
| - {{#if @shouldDisplayPixScore}} |
90 |
| - <th scope="col">{{t "pages.certifications.certification.result.table.headers.score"}}</th> |
91 |
| - {{/if}} |
92 |
| - <th scope="col">{{t "pages.certifications.certification.result.table.headers.level"}}</th> |
93 |
| - </tr> |
94 |
| - </thead> |
95 |
| - <tbody> |
96 |
| - {{#each @competences as |competence|}} |
97 |
| - <tr> |
98 |
| - <th scope="row">{{competence.index}}</th> |
99 |
| - {{#if @shouldDisplayPixScore}} |
100 |
| - <td>{{competence.score}}</td> |
101 |
| - {{/if}} |
102 |
| - <td>{{competence.level}}</td> |
103 |
| - </tr> |
104 |
| - {{/each}} |
105 |
| - </tbody> |
106 |
| - </table> |
| 87 | + <PixTable |
| 88 | + class="certification-details-v3-table" |
| 89 | + @variant="primary" |
| 90 | + @caption={{t "pages.certifications.certification.result.table.label"}} |
| 91 | + @data={{@competences}} |
| 92 | + > |
| 93 | + <:columns as |competence context|> |
| 94 | + <PixTableColumn @context={{context}}> |
| 95 | + <:header> |
| 96 | + {{t "pages.certifications.certification.result.table.headers.competence"}} |
| 97 | + </:header> |
| 98 | + <:cell> |
| 99 | + {{competence.index}} |
| 100 | + </:cell> |
| 101 | + </PixTableColumn> |
| 102 | + {{#if @shouldDisplayPixScore}} |
| 103 | + <PixTableColumn @context={{context}}> |
| 104 | + <:header> |
| 105 | + {{t "pages.certifications.certification.result.table.headers.score"}} |
| 106 | + </:header> |
| 107 | + <:cell> |
| 108 | + {{competence.score}} |
| 109 | + </:cell> |
| 110 | + </PixTableColumn> |
| 111 | + {{/if}} |
| 112 | + <PixTableColumn @context={{context}}> |
| 113 | + <:header> |
| 114 | + {{t "pages.certifications.certification.result.table.headers.level"}} |
| 115 | + </:header> |
| 116 | + <:cell> |
| 117 | + {{competence.level}} |
| 118 | + </:cell> |
| 119 | + </PixTableColumn> |
| 120 | + </:columns> |
| 121 | + </PixTable> |
107 | 122 | {{/if}}
|
108 | 123 | </template>
|
109 | 124 | }
|
0 commit comments