diff --git a/packages/frontend-bo/src/components/demandes-sejour/liste.vue b/packages/frontend-bo/src/components/demandes-sejour/liste.vue index 2a8b8af83..563807c27 100644 --- a/packages/frontend-bo/src/components/demandes-sejour/liste.vue +++ b/packages/frontend-bo/src/components/demandes-sejour/liste.vue @@ -25,7 +25,11 @@ ]" /> - + diff --git a/packages/frontend-bo/src/pages/organismes/[[organismeId]].vue b/packages/frontend-bo/src/pages/organismes/[[organismeId]].vue index 714dd8470..2d33c7465 100644 --- a/packages/frontend-bo/src/pages/organismes/[[organismeId]].vue +++ b/packages/frontend-bo/src/pages/organismes/[[organismeId]].vue @@ -121,6 +121,7 @@ diff --git a/packages/frontend-bo/src/pages/sejours/[declarationId].vue b/packages/frontend-bo/src/pages/sejours/[declarationId].vue index 5cb6543e5..bb7df6eac 100644 --- a/packages/frontend-bo/src/pages/sejours/[declarationId].vue +++ b/packages/frontend-bo/src/pages/sejours/[declarationId].vue @@ -186,6 +186,8 @@ definePageMeta({ roles: ["DemandeSejour_Lecture", "DemandeSejour_Ecriture"], }); +const usersStore = useUserStore(); + const log = logger("pages/sejours"); const toaster = useToaster(); @@ -205,7 +207,7 @@ const selectTab = async (idx) => { if (idx === 2 && !historique.value) { execute(); } - if (idx === 3) { + if (idx === 3 && userStore.user.serviceCompetent === "DEP") { await demandeStore.readMessages(route.params.declarationId); demandeStore.fetchMessages(route.params.declarationId); } @@ -249,10 +251,19 @@ const isOrganismeNonAgree = computed(() => { }); onMounted(async () => { + if (!usersStore.user.serviceCompetent) { + await usersStore.refreshProfile(); + } try { await demandeStore.setCurrentDemande(route.params.declarationId); demandeStore.fetchMessages(route.params.declarationId); - if (parseInt(route.query.defaultTabIndex) === 3) + if (!usersStore.user.serviceCompetent) { + await usersStore.refreshProfile(); + } + if ( + parseInt(route.query.defaultTabIndex) === 3 && + userStore.user.serviceCompetent === "DEP" + ) await demandeStore.readMessages(route.params.declarationId); } catch (e) { navigateTo("/sejours"); diff --git a/packages/frontend-bo/src/pages/sejours/index.vue b/packages/frontend-bo/src/pages/sejours/index.vue index 4aa606f8f..57ff6277e 100644 --- a/packages/frontend-bo/src/pages/sejours/index.vue +++ b/packages/frontend-bo/src/pages/sejours/index.vue @@ -1,6 +1,6 @@ diff --git a/packages/frontend-usagers/src/pages/demande-sejour/liste.vue b/packages/frontend-usagers/src/pages/demande-sejour/liste.vue index bc467aa6b..5482a7454 100644 --- a/packages/frontend-usagers/src/pages/demande-sejour/liste.vue +++ b/packages/frontend-usagers/src/pages/demande-sejour/liste.vue @@ -1,3 +1,3 @@ diff --git a/packages/frontend-usagers/src/pages/messagerie/index.vue b/packages/frontend-usagers/src/pages/messagerie/index.vue index 3a2e2f733..9b8a827dd 100644 --- a/packages/frontend-usagers/src/pages/messagerie/index.vue +++ b/packages/frontend-usagers/src/pages/messagerie/index.vue @@ -1,6 +1,6 @@ diff --git a/packages/shared/src/components/messages/MessageEtat.vue b/packages/shared/src/components/messages/MessageEtat.vue index 2bd69d651..5c03ce18c 100644 --- a/packages/shared/src/components/messages/MessageEtat.vue +++ b/packages/shared/src/components/messages/MessageEtat.vue @@ -25,10 +25,6 @@ const props = defineProps({ type: String, validator: (value) => Object.values(messageEtat.etat).includes(value), }, - message: { - required: true, - type: String, - }, }); import messageEtat from "@vao/shared/src/utils/messageUtils"; diff --git a/packages/shared/src/components/messages/MessageHover.vue b/packages/shared/src/components/messages/MessageHover.vue index db35d8e4b..9e6dafc9d 100644 --- a/packages/shared/src/components/messages/MessageHover.vue +++ b/packages/shared/src/components/messages/MessageHover.vue @@ -1,7 +1,9 @@