Skip to content
Snippets Groups Projects
Commit fa31abd1 authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'redmine-issues/11926' into 'develop'

REDMINE_ISSUE-11926

See merge request !78
parents f401fd0f 5ce892c5
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,10 @@ export default new Vuex.Store({ ...@@ -92,7 +92,10 @@ export default new Vuex.Store({
}, },
DISPLAY_MESSAGE(state, comment) { DISPLAY_MESSAGE(state, comment) {
state.messages = [{ comment }, ...state.messages]; state.messages = [{ comment }, ...state.messages];
document.getElementById("content").scrollIntoView({ block: "start", inline: "nearest" }); document.getElementById("messages").scrollIntoView({ block: "start", inline: "nearest" });
setTimeout(() => {
state.messages = [];
}, 3000);
}, },
CLEAR_MESSAGES(state) { CLEAR_MESSAGES(state) {
state.messages = []; state.messages = [];
......
...@@ -107,6 +107,12 @@ export default { ...@@ -107,6 +107,12 @@ export default {
.then((response) => { .then((response) => {
if (response.status === 200) { if (response.status === 200) {
this.$store.dispatch("GET_USER_LEVEL_PROJECTS"); //* update user status in top right menu 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) => { .catch((error) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment