diff client/src/components/gauge/Gauges.vue @ 2813:49c1570919ae

client: spuc8: use new endpoints to fetch year based and longterm waterlevel data
author Markus Kottlaender <markus@intevation.de>
date Tue, 26 Mar 2019 14:05:54 +0100
parents 2b79c0871138
children 4a1211727d5f
line wrap: on
line diff
--- a/client/src/components/gauge/Gauges.vue	Tue Mar 26 13:03:10 2019 +0100
+++ b/client/src/components/gauge/Gauges.vue	Tue Mar 26 14:05:54 2019 +0100
@@ -235,7 +235,8 @@
         icon: "ruler-vertical",
         closeCallback: () => {
           this.$store.commit("gauges/selectedGaugeISRS", null);
-          this.$store.commit("gauges/meanWaterlevels", []);
+          this.$store.commit("gauges/longtermWaterlevels", []);
+          this.$store.commit("gauges/yearWaterlevels", []);
         },
         expandCallback: () => {
           this.$store.commit("map/moveMap", {
@@ -251,8 +252,13 @@
       this.loading = true;
       this.$store.commit("application/showSplitscreen", true);
 
-      this.$store
-        .dispatch("gauges/loadMeanWaterlevels")
+      Promise.all([
+        this.$store.dispatch("gauges/loadLongtermWaterlevels"),
+        this.$store.dispatch(
+          "gauges/loadYearWaterlevels",
+          new Date().getFullYear()
+        )
+      ])
         .catch(error => {
           const { status, data } = error.response;
           displayError({