diff client/src/store/fairwayprofile.js @ 5572:3b842e951317 surveysperbottleneckid

change use from name of bottleneck to its id.
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 20 Jul 2021 17:07:51 +0200
parents 9887061df57b
children
line wrap: on
line diff
--- a/client/src/store/fairwayprofile.js	Tue Jul 20 11:50:17 2021 +0200
+++ b/client/src/store/fairwayprofile.js	Tue Jul 20 17:07:51 2021 +0200
@@ -1,3 +1,5 @@
+import { HTTP } from "@/lib/http";
+import LineString from "ol/geom/LineString";
 /* This is Free Software under GNU Affero General Public License v >= 3.0
  * without warranty, see README.md and license for details.
  *
@@ -13,13 +15,11 @@
  * Markus Kottländer <markuks.kottlaender@intevation.de>
  */
 import Vue from "vue";
-import { HTTP } from "@/lib/http";
-import { prepareProfile } from "@/lib/geo";
-import LineString from "ol/geom/LineString";
+import { displayError } from "@/lib/errors";
+import { featureToFairwayCoordinates } from "@/lib/geo";
 import { generateFeatureRequest } from "@/lib/geo";
 import { getLength } from "ol/sphere";
-import { displayError } from "@/lib/errors";
-import { featureToFairwayCoordinates } from "@/lib/geo";
+import { prepareProfile } from "@/lib/geo";
 
 // initial state
 const init = () => {
@@ -316,7 +316,7 @@
         previousCuts
           .filter(cut => {
             return (
-              cut.bottleneckName === rootState.bottlenecks.selectedBottleneck
+              cut.bottleneckId === rootState.bottlenecks.selectedBottleneck
             );
           })
           .sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1))