diff client/src/router.js @ 2399:e120631797f6 staging_consolidation

wip
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 27 Feb 2019 13:50:24 +0100
parents c69432c1c4ac
children f39c4b432601
line wrap: on
line diff
--- a/client/src/router.js	Mon Feb 25 17:30:07 2019 +0100
+++ b/client/src/router.js	Wed Feb 27 13:50:24 2019 +0100
@@ -208,6 +208,25 @@
       }
     },
     {
+      path: "/imports/overview/:id?",
+      name: "importoverview",
+      component: Main,
+      meta: {
+        requiresAuth: true
+      },
+      beforeEnter: (to, from, next) => {
+        const isWaterwayAdmin = store.getters["user/isWaterwayAdmin"];
+        if (!isWaterwayAdmin) {
+          next("/");
+        } else {
+          store.commit("application/showContextBox", true);
+          store.commit("application/contextBoxContent", "importoverview");
+          store.commit("application/showSearchbar", true);
+          next();
+        }
+      }
+    },
+    {
       path: "/stretches",
       name: "stretches",
       component: Main,