From e1de0a47ab7cfb6cebc4cf52af5314cd73162d03 Mon Sep 17 00:00:00 2001 From: Eryne Kachetel-Langue Date: Thu, 5 Dec 2024 13:49:32 +0100 Subject: [PATCH 1/2] FIX ITEM-413-front-afficher-plusieurs-messages-en-meme-temps-sans-quils-ne-soient-supperposes : - ajout d'une distinction dans les types d'erreurs - simplification du code --- src/App.vue | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index f24c532..25ed1f4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,6 +8,15 @@
+ +

{{ notification[1].message }}

+

{{ notification[1].description }}

+
FERMER
+
removeNotification(notificationId), 9000) // impose un timeout au v-alert pour que les alertes de type ERR_NETWORK ne surchargent pas la Map errorsList + isErrorNetwork = false; + } else { + errorsList.value.set(notificationId, message) } } function removeNotification(notificationId) { if (notificationId != null) { errorsList.value.delete(notificationId) + errorsNetworkList.value.delete(notificationId) } } function clearErrors() { - errorsList.value = new Map() + errorsNetworkList.value.clear(); } From 998b6ef1ab5427be77a2d1c7ad1753928782e541 Mon Sep 17 00:00:00 2001 From: Eryne Kachetel-Langue Date: Thu, 5 Dec 2024 14:30:00 +0100 Subject: [PATCH 2/2] FIX ITEM-413-front-afficher-plusieurs-messages-en-meme-temps-sans-quils-ne-soient-supperposes : - simplification du code --- src/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.vue b/src/App.vue index 25ed1f4..e42face 100644 --- a/src/App.vue +++ b/src/App.vue @@ -142,7 +142,7 @@ function toggleDrawer() { } function addNotification(notificationId, message) { - if (isErrorNetwork === true) { + if (isErrorNetwork) { errorsNetworkList.value.set(notificationId, message) setTimeout(() => removeNotification(notificationId), 9000) // impose un timeout au v-alert pour que les alertes de type ERR_NETWORK ne surchargent pas la Map errorsList isErrorNetwork = false;