|
@@ -9,7 +9,8 @@ export default new Vuex.Store({
|
|
|
tableHeight: 0,
|
|
tableHeight: 0,
|
|
|
fetchingData: false,
|
|
fetchingData: false,
|
|
|
userInfo: null,
|
|
userInfo: null,
|
|
|
- organization: null
|
|
|
|
|
|
|
+ organization: null,
|
|
|
|
|
+ isORGANIZER: false
|
|
|
},
|
|
},
|
|
|
mutations: {
|
|
mutations: {
|
|
|
updateTableHeight(state, height) {
|
|
updateTableHeight(state, height) {
|
|
@@ -23,6 +24,9 @@ export default new Vuex.Store({
|
|
|
},
|
|
},
|
|
|
updateOrganization(state, organization) {
|
|
updateOrganization(state, organization) {
|
|
|
state.organization = organization;
|
|
state.organization = organization;
|
|
|
|
|
+ },
|
|
|
|
|
+ updateIsORGANIZER(state, isORGANIZER) {
|
|
|
|
|
+ state.isORGANIZER = isORGANIZER;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
actions: {
|
|
actions: {
|
|
@@ -34,6 +38,7 @@ export default new Vuex.Store({
|
|
|
let flag = res.data.authorities.find(item => {
|
|
let flag = res.data.authorities.find(item => {
|
|
|
return item.name == 'ROLE_ORGANIZER';
|
|
return item.name == 'ROLE_ORGANIZER';
|
|
|
});
|
|
});
|
|
|
|
|
+ context.commit('updateIsORGANIZER', !!flag);
|
|
|
if (flag) {
|
|
if (flag) {
|
|
|
return http.axios.get('/organization/getByUserId/' + res.data.id);
|
|
return http.axios.get('/organization/getByUserId/' + res.data.id);
|
|
|
} else {
|
|
} else {
|