Skip to content
Snippets Groups Projects

REDMINE-ISSUES/12411

Merged Leandro Almada requested to merge REDMINE-ISSUES/12411 into develop
3 files
+ 41
6
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 16
0
@@ -46,6 +46,7 @@ export default new Vuex.Store({
SSO_SETTED: false,
USER_LEVEL_PROJECTS: null,
user_permissions: null,
levelsPermissions: [],
messages: [],
events: null,
loader: {
@@ -95,6 +96,9 @@ export default new Vuex.Store({
SET_USER_PERMISSIONS(state, userPermissions) {
state.user_permissions = userPermissions;
},
SET_LEVELS_PERMISSIONS(state, levelsPermissions) {
state.levelsPermissions = levelsPermissions;
},
SET_EVENTS(state, events) {
state.events = events;
},
@@ -280,6 +284,18 @@ export default new Vuex.Store({
throw error;
});
},
GET_LEVELS_PERMISSIONS({ commit }) {
return axios
.get(`${this.state.configuration.VUE_APP_DJANGO_API_BASE}levels-permissions/`)
.then((response) => {
if (response && response.status === 200) {
commit("SET_LEVELS_PERMISSIONS", response.data);
}
})
.catch((error) => {
throw error;
});
},
async GET_PROJECT_INFO({ state, commit, dispatch }, slug) {
commit("SET_PROJECT_SLUG", slug);
Loading