Skip to content

Commit cfcfa41

Browse files
fix: changement wording changement OC
1 parent 9916ad3 commit cfcfa41

File tree

2 files changed

+27
-30
lines changed

2 files changed

+27
-30
lines changed

src/components/records/NotificationState.vue

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
<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&nbsp;</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&nbsp;</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>
1116
</template>
1217

1318
<script setup>
@@ -66,7 +71,7 @@ const stateInfo = computed(() => {
6671
user.organismeCertificateur &&
6772
displayedNotif.value.organismeCertificateurId !== user.organismeCertificateur.id
6873
) {
69-
return notificationsStateLevel["ARRETEE CHANGEMENT OC"];
74+
return notificationsStateLevel["ARRETEE"];
7075
}
7176
return notificationsStateLevel[currentStatut];
7277
});
@@ -82,20 +87,14 @@ function getStyle() {
8287
};
8388
}
8489
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+
);
9998
}
10099
</script>
101100
@@ -116,4 +115,8 @@ function getLabel() {
116115
.lowercase {
117116
text-transform: lowercase;
118117
}
118+
119+
.margin-top {
120+
margin-top: 0.2rem;
121+
}
119122
</style>

src/referentiels/ab.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,6 @@ export const notificationsStateLevel = {
249249
textColor: "#CE0500",
250250
icon: "fr-icon-error-fill",
251251
},
252-
["ARRETEE CHANGEMENT OC"]: {
253-
label: "Arrêtée - changement OC",
254-
color: "#FFE9E9",
255-
textColor: "#CE0500",
256-
icon: "fr-icon-error-fill",
257-
},
258252
["NON ENGAGEE"]: {
259253
label: "Non engagée",
260254
color: "#FBE769",

0 commit comments

Comments
 (0)