|
|
@@ -448,6 +448,7 @@ router.beforeEach((to, from, next) => {
|
|
|
window.open(url);
|
|
|
return;
|
|
|
}
|
|
|
+ console.log(store.state.isORGANIZER);
|
|
|
if (!store.state.userInfo && to.path !== '/login') {
|
|
|
store
|
|
|
.dispatch('getUserInfo')
|
|
|
@@ -455,7 +456,11 @@ router.beforeEach((to, from, next) => {
|
|
|
store
|
|
|
.dispatch('checkOrganization')
|
|
|
.then(() => {
|
|
|
- next();
|
|
|
+ if (to.path === '/dashboard' && store.state.isORGANIZER) {
|
|
|
+ next('/organizationInfo');
|
|
|
+ } else {
|
|
|
+ next();
|
|
|
+ }
|
|
|
})
|
|
|
.catch(() => {
|
|
|
next('/organizationInfo');
|
|
|
@@ -484,6 +489,8 @@ router.beforeEach((to, from, next) => {
|
|
|
}
|
|
|
next('/organizationInfo');
|
|
|
});
|
|
|
+ } else if (to.path === '/dashboard' && store.state.isORGANIZER) {
|
|
|
+ next('/organizationInfo');
|
|
|
} else {
|
|
|
next();
|
|
|
}
|