changeset 5263:19715261750e

client: set bottleneck for pdf-export from search and Map popup * Mark the selected bottleneck from search for the pdf-genereation and from the map popup by opening the Surveys/Fairway Availability
author Fadi Abbud <fadi.abbud@intevation.de>
date Fri, 29 May 2020 14:02:45 +0200
parents 5df1eff5e445
children 528fa710650b
files client/src/components/Search.vue client/src/components/map/MapPopup.vue
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Search.vue	Wed May 13 19:43:57 2020 +0200
+++ b/client/src/components/Search.vue	Fri May 29 14:02:45 2020 +0200
@@ -328,6 +328,10 @@
         this.openLayersMap()
           .getLayer("BOTTLENECKS")
           .setVisible(true);
+        this.$store.commit(
+          "bottlenecks/setBottleneckForPrint",
+          resultEntry.name
+        );
       }
       if (resultEntry.type === "rhm") {
         this.openLayersMap()
--- a/client/src/components/map/MapPopup.vue	Wed May 13 19:43:57 2020 +0200
+++ b/client/src/components/map/MapPopup.vue	Fri May 29 14:02:45 2020 +0200
@@ -144,6 +144,7 @@
       "identifiedFeatures",
       "identifiedCoordinates"
     ]),
+    ...mapState("bottlenecks", ["selectedBottleneck"]),
     title() {
       return this.$gettext("Identified Features");
     },
@@ -189,6 +190,10 @@
           .getExtent(),
         zoom: 16
       });
+      this.$store.commit(
+        "bottlenecks/setBottleneckForPrint",
+        this.selectedBottleneck
+      );
       this.close();
     },
     openGauges(gauge) {
@@ -214,6 +219,10 @@
           .getExtent(),
         zoom: 16
       });
+      this.$store.commit(
+        "bottlenecks/setBottleneckForPrint",
+        this.selectedBottleneck
+      );
       this.openFairwayAvailability();
     },
     openFairwayAvailabilityForStretch(stretch) {