File tree 3 files changed +30
-33
lines changed
components/certification-centers
3 files changed +30
-33
lines changed Original file line number Diff line number Diff line change 31
31
<div class =" property" >
32
32
<h2 class =" field__label" >{{ t " pages.certification-centers.information-view.feature-habilitations.title" }} </h2 >
33
33
<ul class =" certification-center-information__display__habilitations-list" >
34
- {{ #if (eq @certificationCenter.isV3Pilot true )}}
35
- <li aria-label ={{ concat " Habilité pour " this.isV3PilotLabel }} >
36
- <FaIcon class =" granted-habilitation-icon" @icon =" circle-check" />
37
- {{ this.isV3PilotLabel }}
38
- </li >
39
- {{ else }}
40
- <li aria-label ={{ concat " Non habilité pour " this.isV3PilotLabel }} >
41
- <FaIcon class =" not-granted-habilitation-icon" @icon =" circle-xmark" />
42
- {{ this.isV3PilotLabel }}
43
- </li >
44
- {{ /if }}
45
-
46
- {{ #if (eq @certificationCenter.isComplementaryAlonePilot true )}}
47
- <li aria-label ={{ concat " Habilité pour " this.isComplementaryAlonePilotLabel }} >
48
- <FaIcon class =" granted-habilitation-icon" @icon =" circle-check" />
49
- {{ this.isComplementaryAlonePilotLabel }}
50
- </li >
51
- {{ else }}
52
- <li aria-label ={{ concat " Non habilité pour " this.isComplementaryAlonePilotLabel }} >
53
- <FaIcon class =" not-granted-habilitation-icon" @icon =" circle-xmark" />
54
- {{ this.isComplementaryAlonePilotLabel }}
55
- </li >
56
- {{ /if }}
34
+ {{ #each this.availableFeatureHabilitations as |feature |}}
35
+ {{ #if (eq feature.isPilot true )}}
36
+ <li aria-label ={{ concat " Habilité pour " feature.label }} >
37
+ <FaIcon class =" granted-habilitation-icon" @icon =" circle-check" />
38
+ {{ feature.label }}
39
+ </li >
40
+ {{ else }}
41
+ <li aria-label ={{ concat " Non habilité pour " feature.label }} >
42
+ <FaIcon class =" not-granted-habilitation-icon" @icon =" circle-xmark" />
43
+ {{ feature.label }}
44
+ </li >
45
+ {{ /if }}
46
+ {{ /each }}
57
47
</ul >
58
48
</div >
59
49
<div class =" property" >
Original file line number Diff line number Diff line change @@ -8,18 +8,24 @@ export default class InformationView extends Component {
8
8
return this . args . availableHabilitations ?. sortBy ( 'id' ) ;
9
9
}
10
10
11
- get externalURL ( ) {
12
- const urlDashboardPrefix = ENV . APP . CERTIFICATION_CENTER_DASHBOARD_URL ;
13
- return urlDashboardPrefix && urlDashboardPrefix + this . args . certificationCenter . id ;
14
- }
11
+ get availableFeatureHabilitations ( ) {
12
+ const isV3Pilot = this . args . certificationCenter . isV3Pilot ;
13
+ const isV3PilotLabel = this . intl . t (
14
+ 'pages.certification-centers.information-view.feature-habilitations.labels.is-v3-pilot' ,
15
+ ) ;
16
+ const isComplementaryAlonePilot = this . args . certificationCenter . isComplementaryAlonePilot ;
17
+ const isComplementaryAlonePilotLabel = this . intl . t (
18
+ 'pages.certification-centers.information-view.feature-habilitations.labels.is-complementary-alone-pilot' ,
19
+ ) ;
15
20
16
- get isV3PilotLabel ( ) {
17
- return this . intl . t ( 'pages.certification-centers.information-view.feature-habilitations.labels.is-v3-pilot' ) ;
21
+ return [
22
+ { isPilot : isV3Pilot , label : isV3PilotLabel } ,
23
+ { isPilot : isComplementaryAlonePilot , label : isComplementaryAlonePilotLabel } ,
24
+ ] ;
18
25
}
19
26
20
- get isComplementaryAlonePilotLabel ( ) {
21
- return this . intl . t (
22
- 'pages.certification-centers.information-view.feature-habilitations.labels.is-complementary-alone-pilot' ,
23
- ) ;
27
+ get externalURL ( ) {
28
+ const urlDashboardPrefix = ENV . APP . CERTIFICATION_CENTER_DASHBOARD_URL ;
29
+ return urlDashboardPrefix && urlDashboardPrefix + this . args . certificationCenter . id ;
24
30
}
25
31
}
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export default class CertificationCenter extends Model {
14
14
@attr ( ) dataProtectionOfficerLastName ;
15
15
@attr ( ) dataProtectionOfficerEmail ;
16
16
@attr ( ) isV3Pilot ;
17
+ @attr ( ) isComplementaryAlonePilot ;
17
18
18
19
@hasMany ( 'complementary-certification' ) habilitations ;
19
20
You can’t perform that action at this time.
0 commit comments