# HG changeset patch # User Thomas Junk # Date 1551271856 -3600 # Node ID 08780099f729a7930a3ac2c9c47d8657cfb505e7 # Parent e120631797f6b57fedae9c380eb7edda4d3c000c# Parent 85c47d63fdb9daf3e0820f899c46ecac5a710a5c merge with default diff -r 85c47d63fdb9 -r 08780099f729 client/src/components/App.vue --- a/client/src/components/App.vue Wed Feb 27 10:56:18 2019 +0100 +++ b/client/src/components/App.vue Wed Feb 27 13:50:56 2019 +0100 @@ -90,7 +90,9 @@ ...mapState("user", ["isAuthenticated"]), ...mapState("application", ["contextBoxContent", "showSearchbar"]), isMapVisible() { - return /stretches|review|bottlenecks|mainview/.test(this.routeName); + return /importoverview|stretches|review|bottlenecks|mainview/.test( + this.routeName + ); }, routeName() { const routeName = this.$route.name; diff -r 85c47d63fdb9 -r 08780099f729 client/src/components/Contextbox.vue --- a/client/src/components/Contextbox.vue Wed Feb 27 10:56:18 2019 +0100 +++ b/client/src/components/Contextbox.vue Wed Feb 27 13:50:56 2019 +0100 @@ -3,6 +3,9 @@ + @@ -25,9 +28,11 @@ export default { name: "contextbox", components: { - Bottlenecks: () => import("./Bottlenecks"), - Staging: () => import("./staging/Staging.vue"), - Stretches: () => import("./ImportStretches.vue") + Bottlenecks: () => import("@/components/Bottlenecks"), + Staging: () => import("@/components/staging/Staging.vue"), + Stretches: () => import("@/components/ImportStretches.vue"), + ImportOverview: () => + import("@/components/importoverview/ImportOverview.vue") }, computed: { ...mapState("application", [ diff -r 85c47d63fdb9 -r 08780099f729 client/src/components/Sidebar.vue --- a/client/src/components/Sidebar.vue Wed Feb 27 10:56:18 2019 +0100 +++ b/client/src/components/Sidebar.vue Wed Feb 27 13:50:56 2019 +0100 @@ -40,6 +40,19 @@ +
+ + + Staging area + + {{ staging.length }} + + +
{ + 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, diff -r 85c47d63fdb9 -r 08780099f729 client/src/store/imports.js --- a/client/src/store/imports.js Wed Feb 27 10:56:18 2019 +0100 +++ b/client/src/store/imports.js Wed Feb 27 13:50:56 2019 +0100 @@ -165,6 +165,22 @@ reject(error); }); }); + }, + confirmReview({ commit }, reviewResults) { + return new Promise((resolve, reject) => { + HTTP.patch("/imports", reviewResults, { + headers: { + "X-Gemma-Auth": localStorage.getItem("token"), + "Content-type": "application/json" + } + }) + .then(response => { + resolve(response); + }) + .catch(error => { + reject(error); + }); + }); } } };