diff client/src/store/bottlenecks.js @ 4488:bff6c5c1db4f

client: pdf-gen: improve adding bottleneck info to pdf * Check if the bottleneck is in the current view to add its info to the exported pdf and the pdf filename, this avoid wrong filename and wrong info in pdf in case view has been changed to another location. * Set the bottleneck to print after moving to it in map.
author Fadi Abbud <fadi.abbud@intevation.de>
date Fri, 27 Sep 2019 11:15:02 +0200
parents 3138836bf840
children 2e47b32a389d
line wrap: on
line diff
--- a/client/src/store/bottlenecks.js	Thu Sep 26 17:22:44 2019 +0200
+++ b/client/src/store/bottlenecks.js	Fri Sep 27 11:15:02 2019 +0200
@@ -24,7 +24,8 @@
     selectedBottleneck: null,
     surveys: [],
     selectedSurvey: null,
-    surveysLoading: false
+    surveysLoading: false,
+    bottleneckForPrint: null
   };
 };
 
@@ -63,6 +64,9 @@
     }
   },
   mutations: {
+    setBottleneckForPrint: (state, bottleneck) => {
+      state.bottleneckForPrint = bottleneck;
+    },
     setBottlenecks: (state, bottlenecks) => {
       state.bottlenecks = bottlenecks;
     },