diff client/src/router.js @ 2543:a542045f28a6

staging: imports/overview2 alternative implementation
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 07 Mar 2019 16:54:29 +0100
parents 706121185e63
children 9f3856337f55
line wrap: on
line diff
--- a/client/src/router.js	Thu Mar 07 15:55:25 2019 +0100
+++ b/client/src/router.js	Thu Mar 07 16:54:29 2019 +0100
@@ -194,6 +194,25 @@
       }
     },
     {
+      path: "/imports/overview2/:id?",
+      name: "importoverview2",
+      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", "importoverview2");
+          store.commit("application/showSearchbar", true);
+          next();
+        }
+      }
+    },
+    {
       path: "/stretches",
       name: "stretches",
       component: Main,