Mercurial > gemma
changeset 2968:8b32574bed09 unified_import
wip
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 01 Apr 2019 15:12:49 +0200 |
parents | 55a9c7965e25 |
children | b92a8d088d8a |
files | client/src/components/App.vue client/src/components/Contextbox.vue client/src/components/importconfiguration/Import.vue client/src/router.js |
diffstat | 4 files changed, 34 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/App.vue Mon Apr 01 13:24:32 2019 +0200 +++ b/client/src/components/App.vue Mon Apr 01 15:12:49 2019 +0200 @@ -79,7 +79,7 @@ ...mapState("user", ["isAuthenticated"]), ...mapState("application", ["contextBoxContent", "showSearchbar"]), isMapVisible() { - return /importoverview|stretches|review|bottlenecks|mainview/.test( + return /importconfiguration|importoverview|stretches|review|bottlenecks|mainview/.test( this.routeName ); },
--- a/client/src/components/Contextbox.vue Mon Apr 01 13:24:32 2019 +0200 +++ b/client/src/components/Contextbox.vue Mon Apr 01 15:12:49 2019 +0200 @@ -6,6 +6,7 @@ <ImportOverview v-if="contextBoxContent === 'importoverview'" ></ImportOverview> + <Stretches v-if="contextBoxContent === 'importconfiguration'"></Stretches> </div> </template> @@ -31,7 +32,9 @@ Bottlenecks: () => import("@/components/Bottlenecks"), Stretches: () => import("@/components/ImportStretches.vue"), ImportOverview: () => - import("@/components/importoverview/ImportOverview.vue") + import("@/components/importoverview/ImportOverview.vue"), + ImportConfiguration: () => + import("@/components/importconfiguration/Import.vue") }, computed: { ...mapState("application", [
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/src/components/importconfiguration/Import.vue Mon Apr 01 15:12:49 2019 +0200 @@ -0,0 +1,9 @@ +<template> + <h1>Hello</h1> +</template> + +<style></style> + +<script> +export default {}; +</script>
--- a/client/src/router.js Mon Apr 01 13:24:32 2019 +0200 +++ b/client/src/router.js Mon Apr 01 15:12:49 2019 +0200 @@ -175,6 +175,26 @@ } }, { + path: "/imports/configuration", + name: "importconfiguration", + component: Maplayer, + meta: { + requiresAuth: true + }, + beforeEnter: (to, from, next) => { + const isWaterwayAdmin = store.getters["user/isWaterwayAdmin"]; + if (!isWaterwayAdmin) { + next("/login"); + } else { + store.commit("application/searchQuery", ""); + store.commit("application/showContextBox", true); + store.commit("application/contextBoxContent", "importconfiguration"); + store.commit("application/showSearchbar", true); + next(); + } + } + }, + { path: "/imports/overview/:id?", name: "importoverview", component: Maplayer,