diff client/src/components/map/contextbox/Staging.vue @ 1516:6b3756676bbe

refac: bottlenecks and surveydata are now retrieved via promises
author Thomas Junk <thomas.junk@intevation.de>
date Thu, 06 Dec 2018 13:40:17 +0100
parents 53fdbe1d9678
children b03db5726ca5
line wrap: on
line diff
--- a/client/src/components/map/contextbox/Staging.vue	Thu Dec 06 12:38:08 2018 +0100
+++ b/client/src/components/map/contextbox/Staging.vue	Thu Dec 06 13:40:17 2018 +0100
@@ -188,11 +188,11 @@
         zoom: 17,
         preventZoomOut: true
       });
-      this.$store.dispatch(
-        "bottlenecks/setSelectedBottleneck",
-        bottleneck,
-        date
-      );
+      this.$store
+        .dispatch("bottlenecks/setSelectedBottleneck", bottleneck)
+        .then(() => {
+          this.$store.commit("bottlenecks/setSelectedSurveyByDate", date);
+        });
     },
     toggleApproval(id, newStatus) {
       this.$store.commit("imports/toggleApproval", {