changeset 5578:1d847bc21bb7 surveysperbottleneckid

Available Fairway Depth: Change evaluation of Limiting Factors from objnam to bottleneck_id
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 14 Feb 2022 09:13:09 +0100
parents 973c71c07bb2
children f54932eec5c0
files client/src/components/fairway/AvailableFairwayDepthDialogue.vue client/src/store/bottlenecks.js
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepthDialogue.vue	Tue Feb 08 16:06:48 2022 +0100
+++ b/client/src/components/fairway/AvailableFairwayDepthDialogue.vue	Mon Feb 14 09:13:09 2022 +0100
@@ -440,8 +440,9 @@
       if (this.type !== this.$options.BOTTLENECK) return true;
       if (
         this.selectedEntry &&
-        this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] ==
-          this.$options.LIMITINGFACTORS.DEPTH
+        this.limitingFactorsPerBottleneck[
+          this.selectedEntry.properties.bottleneck_id
+        ] == this.$options.LIMITINGFACTORS.DEPTH
       )
         return true;
       return false;
@@ -450,8 +451,9 @@
       if (this.type !== this.$options.BOTTLENECK) return true;
       if (
         this.selectedEntry &&
-        this.limitingFactorsPerBottleneck[this.selectedEntry.properties.name] ==
-          this.$options.LIMITINGFACTORS.WIDTH
+        this.limitingFactorsPerBottleneck[
+          this.selectedEntry.properties.bottleneck_id
+        ] == this.$options.LIMITINGFACTORS.WIDTH
       )
         return true;
     },
@@ -459,7 +461,7 @@
       if (this.type !== this.$options.BOTTLENECK) return;
       if (this.selectedEntry)
         return this.limitingFactorsPerBottleneck[
-          this.selectedEntry.properties.name
+          this.selectedEntry.properties.bottleneck_id
         ];
     },
     isComplete() {
--- a/client/src/store/bottlenecks.js	Tue Feb 08 16:06:48 2022 +0100
+++ b/client/src/store/bottlenecks.js	Mon Feb 14 09:13:09 2022 +0100
@@ -38,7 +38,7 @@
     limitingFactorsPerBottleneck: state => {
       if (state.bottlenecks.length === 0) return {};
       return state.bottlenecks.reduce((o, n) => {
-        o[n.properties.objnam] = n.properties.limiting;
+        o[n.properties.bottleneck_id] = n.properties.limiting;
         return o;
       }, {});
     },