changeset 2436:64ff5984351e

client: renamed store property In alignment to 3679d604645e the related store property was also renamed.
author Markus Kottlaender <markus@intevation.de>
date Fri, 01 Mar 2019 09:00:53 +0100
parents 3679d604645e
children 5c094ab6aa5b
files client/src/components/Bottlenecks.vue client/src/components/ImportSoundingresults.vue client/src/components/fairway/Profiles.vue client/src/store/bottlenecks.js
diffstat 4 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Bottlenecks.vue	Fri Mar 01 08:28:00 2019 +0100
+++ b/client/src/components/Bottlenecks.vue	Fri Mar 01 09:00:53 2019 +0100
@@ -158,7 +158,7 @@
       "showSearchbarLastState",
       "showSplitscreen"
     ]),
-    ...mapState("bottlenecks", ["bottlenecks"]),
+    ...mapState("bottlenecks", ["bottlenecksList"]),
     sortIcon() {
       return this.sortDirection === "ASC"
         ? "sort-amount-down"
@@ -170,7 +170,7 @@
       return formatSurveyDate(date);
     },
     filteredAndSortedBottlenecks() {
-      return this.bottlenecks
+      return this.bottlenecksList
         .filter(bn => {
           return bn.properties.name
             .toLowerCase()
--- a/client/src/components/ImportSoundingresults.vue	Fri Mar 01 08:28:00 2019 +0100
+++ b/client/src/components/ImportSoundingresults.vue	Fri Mar 01 09:00:53 2019 +0100
@@ -288,7 +288,7 @@
   },
   computed: {
     ...mapState("application", ["showContextBox"]),
-    ...mapState("bottlenecks", ["bottlenecks"]),
+    ...mapState("bottlenecks", ["bottlenecksList"]),
     disableUploadButton() {
       if (this.importState === IMPORTSTATE.UPLOAD) return this.disableUpload;
       if (
@@ -301,7 +301,7 @@
       return this.disableUpload;
     },
     availableBottlenecks() {
-      return this.bottlenecks.map(x => x.properties.name);
+      return this.bottlenecksList.map(x => x.properties.name);
     },
     editState() {
       return this.importState === IMPORTSTATE.EDIT;
--- a/client/src/components/fairway/Profiles.vue	Fri Mar 01 08:28:00 2019 +0100
+++ b/client/src/components/fairway/Profiles.vue	Fri Mar 01 09:00:53 2019 +0100
@@ -25,7 +25,7 @@
             <translate>Select Bottleneck</translate>
           </option>
           <option
-            v-for="bn in bottlenecks"
+            v-for="bn in bottlenecksList"
             :key="bn.properties.name"
             :value="bn.properties.name"
             >{{ bn.properties.name }}</option
@@ -259,7 +259,11 @@
     ...mapGetters("map", ["getVSourceByName"]),
     ...mapState("application", ["showProfiles"]),
     ...mapState("map", ["lineTool", "polygonTool", "cutTool"]),
-    ...mapState("bottlenecks", ["bottlenecks", "surveys", "surveysLoading"]),
+    ...mapState("bottlenecks", [
+      "bottlenecksList",
+      "surveys",
+      "surveysLoading"
+    ]),
     ...mapState("fairwayprofile", [
       "previousCuts",
       "startPoint",
@@ -452,7 +456,7 @@
       displayInfo({ title: this.$gettext("Profile deleted!") });
     },
     moveToBottleneck() {
-      const bottleneck = this.bottlenecks.find(
+      const bottleneck = this.bottlenecksList.find(
         bn => bn.properties.name === this.selectedBottleneck
       );
       if (!bottleneck) return;
--- a/client/src/store/bottlenecks.js	Fri Mar 01 08:28:00 2019 +0100
+++ b/client/src/store/bottlenecks.js	Fri Mar 01 09:00:53 2019 +0100
@@ -20,7 +20,7 @@
 // initial state
 const init = () => {
   return {
-    bottlenecks: [],
+    bottlenecksList: [],
     selectedBottleneck: null,
     surveys: [],
     selectedSurvey: null,
@@ -33,8 +33,8 @@
   namespaced: true,
   state: init(),
   mutations: {
-    setBottlenecks: (state, bottlenecks) => {
-      state.bottlenecks = bottlenecks;
+    setBottlenecksList: (state, bottlenecksList) => {
+      state.bottlenecksList = bottlenecksList;
     },
     setSelectedBottleneck: (state, name) => {
       state.selectedBottleneck = name;
@@ -124,7 +124,7 @@
           }
         )
           .then(response => {
-            commit("setBottlenecks", response.data.features);
+            commit("setBottlenecksList", response.data.features);
             resolve(response);
           })
           .catch(error => {