1
1
<template >
2
- <span class =" component" :style =" getStyle()" >
3
- <span
4
- v-if =" stateInfo"
5
- :class =" ['icon', 'fr-icon--sm', stateInfo != null ? stateInfo.icon : '']"
6
- aria-hidden =" true"
7
- ></span >
8
- <span v-if =" text && stateInfo && stateInfo.label !== 'Brouillon'" >Notification  ; </span >
9
- <span :class =" { lowercase: text && stateInfo && stateInfo.label !== 'Brouillon' }" >{{ getLabel() }}</span >
10
- </span >
2
+ <div :class =" { 'margin-top': isChangementOc() }" >
3
+ <span class =" component" :style =" getStyle()" >
4
+ <span
5
+ v-if =" stateInfo"
6
+ :class =" ['icon', 'fr-icon--sm', stateInfo != null ? stateInfo.icon : '']"
7
+ aria-hidden =" true"
8
+ ></span >
9
+ <span v-if =" text && stateInfo && stateInfo.label !== 'Brouillon'" >Notification  ; </span >
10
+ <span :class =" { lowercase: text && stateInfo && stateInfo.label !== 'Brouillon' }" >{{
11
+ stateInfo ? stateInfo.label : "-"
12
+ }}</span >
13
+ </span >
14
+ <div v-if =" isChangementOc()" class =" fr-hint-text" >changement d'OC</div >
15
+ </div >
11
16
</template >
12
17
13
18
<script setup>
@@ -66,7 +71,7 @@ const stateInfo = computed(() => {
66
71
user .organismeCertificateur &&
67
72
displayedNotif .value .organismeCertificateurId !== user .organismeCertificateur .id
68
73
) {
69
- return notificationsStateLevel[" ARRETEE CHANGEMENT OC " ];
74
+ return notificationsStateLevel[" ARRETEE" ];
70
75
}
71
76
return notificationsStateLevel[currentStatut];
72
77
});
@@ -82,20 +87,14 @@ function getStyle() {
82
87
};
83
88
}
84
89
85
- function getLabel () {
86
- if (! stateInfo .value ) {
87
- return " -" ;
88
- }
89
-
90
- if (
91
- isOc &&
92
- user .organismeCertificateur &&
93
- displayedNotif .value .organismeCertificateurId === user .organismeCertificateur .id &&
94
- displayedNotif .value .isUpdatedByNewOc === 1
95
- ) {
96
- return stateInfo .value .label + " - changement OC" ;
97
- }
98
- return stateInfo .value .label ;
90
+ function isChangementOc () {
91
+ return (
92
+ (isOc &&
93
+ user .organismeCertificateur &&
94
+ displayedNotif .value .organismeCertificateurId === user .organismeCertificateur .id &&
95
+ displayedNotif .value .isUpdatedByNewOc === 1 ) ||
96
+ displayedNotif .value .organismeCertificateurId !== user .organismeCertificateur .id
97
+ );
99
98
}
100
99
< / script>
101
100
@@ -116,4 +115,8 @@ function getLabel() {
116
115
.lowercase {
117
116
text- transform: lowercase;
118
117
}
118
+
119
+ .margin - top {
120
+ margin- top: 0 .2rem ;
121
+ }
119
122
< / style>
0 commit comments