From f22e1632f3ebc6c05bfd09b5eba730da03df32aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timoth=C3=A9e=20Poussard?= <tpoussard@neogeo.fr>
Date: Tue, 5 Oct 2021 16:08:58 +0200
Subject: [PATCH] display message

---
 src/store/index.js                    | 4 ++++
 src/views/project/Project_members.vue | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/src/store/index.js b/src/store/index.js
index 42f24525..25477da1 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -93,6 +93,10 @@ export default new Vuex.Store({
     DISPLAY_MESSAGE(state, comment) {
       state.messages = [{ comment }, ...state.messages];
       document.getElementById("messages").scrollIntoView({ block: "start", inline: "nearest" });
+      setTimeout(() => {
+        state.messages = [];
+      }, 3000);
+
     },
     CLEAR_MESSAGES(state) {
       state.messages = [];
diff --git a/src/views/project/Project_members.vue b/src/views/project/Project_members.vue
index bb03c3d8..1acb0982 100644
--- a/src/views/project/Project_members.vue
+++ b/src/views/project/Project_members.vue
@@ -107,6 +107,13 @@ export default {
         .then((response) => {
           if (response.status === 200) {
             this.$store.dispatch("GET_USER_LEVEL_PROJECTS"); //* update user status in top right menu
+
+            this.$store.commit("DISPLAY_MESSAGE", "Permissions mises à jour");
+          } else {
+            this.$store.commit(
+              "DISPLAY_MESSAGE",
+              "Une erreur s'est produite pendant la mises à jour des permissions"
+            );
           }
         })
         .catch((error) => {
-- 
GitLab