comparison client/src/router.js @ 2413:f39c4b432601 staging_consolidation

merge with default
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 28 Feb 2019 12:29:46 +0100
parents e120631797f6 0ed53a7a1221
children 706121185e63
comparison
equal deleted inserted replaced
2410:228387d5f2c5 2413:f39c4b432601
166 component: Main, 166 component: Main,
167 meta: { 167 meta: {
168 requiresAuth: true 168 requiresAuth: true
169 }, 169 },
170 beforeEnter: (to, from, next) => { 170 beforeEnter: (to, from, next) => {
171 store.commit("application/searchQuery", "");
171 store.commit("application/showContextBox", false); 172 store.commit("application/showContextBox", false);
172 store.commit("application/contextBoxContent", ""); 173 store.commit("application/contextBoxContent", "");
173 store.commit("application/showSearchbar", false); 174 store.commit("application/showSearchbar", false);
174 next(); 175 next();
175 } 176 }
180 component: Main, 181 component: Main,
181 meta: { 182 meta: {
182 requiresAuth: true 183 requiresAuth: true
183 }, 184 },
184 beforeEnter: (to, from, next) => { 185 beforeEnter: (to, from, next) => {
186 store.commit("application/searchQuery", "");
185 store.commit("application/showContextBox", true); 187 store.commit("application/showContextBox", true);
186 store.commit("application/contextBoxContent", "bottlenecks"); 188 store.commit("application/contextBoxContent", "bottlenecks");
187 store.commit("application/showSearchbar", true); 189 store.commit("application/showSearchbar", true);
188 next(); 190 next();
189 } 191 }
198 beforeEnter: (to, from, next) => { 200 beforeEnter: (to, from, next) => {
199 const isWaterwayAdmin = store.getters["user/isWaterwayAdmin"]; 201 const isWaterwayAdmin = store.getters["user/isWaterwayAdmin"];
200 if (!isWaterwayAdmin) { 202 if (!isWaterwayAdmin) {
201 next("/"); 203 next("/");
202 } else { 204 } else {
205 store.commit("application/searchQuery", "");
203 store.commit("application/showContextBox", true); 206 store.commit("application/showContextBox", true);
204 store.commit("application/contextBoxContent", "staging"); 207 store.commit("application/contextBoxContent", "staging");
205 store.commit("application/showSearchbar", true); 208 store.commit("application/showSearchbar", true);
206 next(); 209 next();
207 } 210 }
236 beforeEnter: (to, from, next) => { 239 beforeEnter: (to, from, next) => {
237 const isSysadmin = store.getters["user/isSysAdmin"]; 240 const isSysadmin = store.getters["user/isSysAdmin"];
238 if (!isSysadmin) { 241 if (!isSysadmin) {
239 next("/"); 242 next("/");
240 } else { 243 } else {
244 store.commit("application/searchQuery", "");
241 store.commit("application/showContextBox", true); 245 store.commit("application/showContextBox", true);
242 store.commit("application/contextBoxContent", "stretches"); 246 store.commit("application/contextBoxContent", "stretches");
243 store.commit("application/showSearchbar", true); 247 store.commit("application/showSearchbar", true);
244 next(); 248 next();
245 } 249 }