Mercurial > gemma
comparison client/src/components/Sidebar.vue @ 1650:90211725e4a9
highlighing feature for staging area
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 20 Dec 2018 16:45:26 +0100 |
parents | f2d24dceecc7 |
children | f4bd67daaaff |
comparison
equal
deleted
inserted
replaced
1649:0324d331e9df | 1650:90211725e4a9 |
---|---|
139 import app from "@/main"; | 139 import app from "@/main"; |
140 | 140 |
141 export default { | 141 export default { |
142 name: "sidebar", | 142 name: "sidebar", |
143 props: ["routeName"], | 143 props: ["routeName"], |
144 watch: { | |
145 $route() { | |
146 const { review } = this.$route.query; | |
147 if (review) { | |
148 this.toggleContextBox("staging"); | |
149 this.$store.commit("imports/setImportToReview", review); | |
150 } else { | |
151 this.$store.commit("imports/setImportToReview", -99); | |
152 } | |
153 } | |
154 }, | |
144 computed: { | 155 computed: { |
145 ...mapGetters("user", ["isSysAdmin", "isWaterwayAdmin"]), | 156 ...mapGetters("user", ["isSysAdmin", "isWaterwayAdmin"]), |
146 ...mapState("user", ["user"]), | 157 ...mapState("user", ["user"]), |
147 ...mapState("application", [ | 158 ...mapState("application", [ |
148 "showSidebar", | 159 "showSidebar", |
168 this.$store.commit("reset"); | 179 this.$store.commit("reset"); |
169 this.$store.commit("user/clearAuth"); | 180 this.$store.commit("user/clearAuth"); |
170 this.$router.push("/login"); | 181 this.$router.push("/login"); |
171 }, | 182 }, |
172 toggleContextBox(context) { | 183 toggleContextBox(context) { |
173 this.$router.push("/"); | 184 if (this.$route.path !== "/") this.$router.push("/"); |
174 this.$store.commit("application/showContextBox", true); | 185 this.$store.commit("application/showContextBox", true); |
175 this.$store.commit("application/contextBoxContent", context); | 186 this.$store.commit("application/contextBoxContent", context); |
176 this.$store.commit("application/showSearchbar", true); | 187 this.$store.commit("application/showSearchbar", true); |
177 }, | 188 }, |
178 isActive(item) { | 189 isActive(item) { |