From dc0d5d8ada1e58f82d02f2d827e7cc295b6fc8cd Mon Sep 17 00:00:00 2001 From: Eryne Kachetel-Langue Date: Tue, 7 Jan 2025 14:43:28 +0100 Subject: [PATCH] FIX ITEM-446-front-dans-le-menu-lateral-lors-du-clic-sur-le-service-supprimer-des-exemplaires-renvoyer-sur-la-premiere-etape-du-workflow-de-suppression : - modification de la fonction navigateTo() dans Navbar.vue - ajout d'un watch(), d'une fonction cleanPath() et modification du onMounted() dans RecouvSteps.vue, ExempSteps.vue, ModifSteps.vue et SuppSteps.vue --- src/components/Structure/Navbar.vue | 8 ++++++- src/views/Exemplarisation/ExempSteps.vue | 28 ++++++++++++++++++++++-- src/views/Modification/ModifSteps.vue | 19 +++++++++++++++- src/views/Recouvrement/RecouvSteps.vue | 28 +++++++++++++++++++++--- src/views/Suppression/SuppSteps.vue | 21 ++++++++++++++++-- 5 files changed, 95 insertions(+), 9 deletions(-) diff --git a/src/components/Structure/Navbar.vue b/src/components/Structure/Navbar.vue index cf5639a..bf76617 100644 --- a/src/components/Structure/Navbar.vue +++ b/src/components/Structure/Navbar.vue @@ -178,7 +178,13 @@ const authStore = useAuthStore() const emit = defineEmits(['close']) function navigateTo(routeName) { - router.push({ name: routeName }).catch(err => {}) + if ((routeName === 'suppression') || (routeName === "recouvrement") || (routeName === "exemplarisation") || (routeName === "modification")) { + let newRouteName = "/" + routeName + "/empty" + router.replace(newRouteName).catch(err => {}); + router.currentRoute.value.fullPath = "/suppression/empty"; + } else { + router.push({ name: routeName }).catch(err => {}) + } fixNavBarModel.value ? '' : emit('close') } diff --git a/src/views/Exemplarisation/ExempSteps.vue b/src/views/Exemplarisation/ExempSteps.vue index be99482..285a9a2 100644 --- a/src/views/Exemplarisation/ExempSteps.vue +++ b/src/views/Exemplarisation/ExempSteps.vue @@ -113,7 +113,7 @@ diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 6b50107..3e869e8 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -160,7 +160,7 @@