changeset 3148:cdfb0093b7b1

client: gauge diagrams: added information to titles
author Markus Kottlaender <markus@intevation.de>
date Fri, 03 May 2019 11:39:41 +0200
parents 25c0cbfcc515
children a90091aaef67
files client/src/components/gauge/HydrologicalConditions.vue client/src/components/gauge/Waterlevel.vue
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/gauge/HydrologicalConditions.vue	Fri May 03 11:32:25 2019 +0200
+++ b/client/src/components/gauge/HydrologicalConditions.vue	Fri May 03 11:39:41 2019 +0200
@@ -96,7 +96,9 @@
     ]),
     ...mapGetters("gauges", ["selectedGauge"]),
     title() {
-      return this.$gettext("Hydrological Conditions");
+      return `${this.selectedGauge.properties.objname}: ${this.$gettext(
+        "Hydrological Conditions"
+      )} (${this.longtermInterval.join(" - ")})`;
     }
   },
   watch: {
--- a/client/src/components/gauge/Waterlevel.vue	Fri May 03 11:32:25 2019 +0200
+++ b/client/src/components/gauge/Waterlevel.vue	Fri May 03 11:39:41 2019 +0200
@@ -152,7 +152,9 @@
     ...mapGetters("gauges", ["selectedGauge"]),
     ...mapState("user", ["user"]),
     title() {
-      return this.$gettext("Waterlevel");
+      return `${this.selectedGauge.properties.objname}: ${this.$gettext(
+        "Waterlevel"
+      )} (${this.dateFrom.toLocaleDateString()} - ${this.dateTo.toLocaleDateString()})`;
     },
     dateFrom: {
       get() {