changeset 2333:eb82b273c615

staging: adapt to new routing concept. fix of problems with opening bottlenecks
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 19 Feb 2019 16:44:38 +0100
parents e38d3f1d625c
children 26c806f1684d
files client/src/components/staging/StagingDetail.vue
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/staging/StagingDetail.vue	Tue Feb 19 16:34:58 2019 +0100
+++ b/client/src/components/staging/StagingDetail.vue	Tue Feb 19 16:44:38 2019 +0100
@@ -95,6 +95,7 @@
               fixed-width
             ></font-awesome-icon>
             <font-awesome-icon
+              @click="showDetails()"
               class="pointer"
               v-if="!show && !loading"
               icon="angle-down"
@@ -317,6 +318,8 @@
   },
   mounted() {
     this.bottlenecks = [];
+    const { id } = this.$route.params;
+    this.$store.commit("imports/setImportToReview", id);
     if (this.open) this.showDetails();
   },
   computed: {
@@ -342,10 +345,12 @@
       if (!this.showAGMDetails) this.showDiff = NO_DIFF;
     },
     open() {
-      const { review } = this.$route.query;
-      if (review) {
-        this.showDetails();
-      }
+      this.show = this.open;
+    },
+    $route() {
+      const { id } = this.$route.params;
+      this.$store.commit("imports/setImportToReview", id);
+      if (this.open) this.showDetails();
     }
   },
   methods: {
@@ -390,7 +395,7 @@
         if (bottlenecks.length === 1)
           return equalToFilter("bottleneck_id", bottlenecks[0]);
         const orExpressions = bottlenecks.map(x => {
-          equalToFilter("bottleneck_id", x);
+          return equalToFilter("bottleneck_id", x);
         });
         return orFilter(...orExpressions);
       };
@@ -399,7 +404,7 @@
         srsName: "EPSG:4326",
         featureNS: "gemma",
         featurePrefix: "gemma",
-        featureTypes: ["bottlenecks"],
+        featureTypes: ["bottlenecks_geoserver"],
         outputFormat: "application/json",
         filter: filterExpression
       });