comparison 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
comparison
equal deleted inserted replaced
5472:9321d9fb719f 5572:3b842e951317
1 import { HTTP } from "@/lib/http";
2 import LineString from "ol/geom/LineString";
1 /* This is Free Software under GNU Affero General Public License v >= 3.0 3 /* This is Free Software under GNU Affero General Public License v >= 3.0
2 * without warranty, see README.md and license for details. 4 * without warranty, see README.md and license for details.
3 * 5 *
4 * SPDX-License-Identifier: AGPL-3.0-or-later 6 * SPDX-License-Identifier: AGPL-3.0-or-later
5 * License-Filename: LICENSES/AGPL-3.0.txt 7 * License-Filename: LICENSES/AGPL-3.0.txt
11 * Author(s): 13 * Author(s):
12 * Thomas Junk <thomas.junk@intevation.de> 14 * Thomas Junk <thomas.junk@intevation.de>
13 * Markus Kottländer <markuks.kottlaender@intevation.de> 15 * Markus Kottländer <markuks.kottlaender@intevation.de>
14 */ 16 */
15 import Vue from "vue"; 17 import Vue from "vue";
16 import { HTTP } from "@/lib/http"; 18 import { displayError } from "@/lib/errors";
17 import { prepareProfile } from "@/lib/geo"; 19 import { featureToFairwayCoordinates } from "@/lib/geo";
18 import LineString from "ol/geom/LineString";
19 import { generateFeatureRequest } from "@/lib/geo"; 20 import { generateFeatureRequest } from "@/lib/geo";
20 import { getLength } from "ol/sphere"; 21 import { getLength } from "ol/sphere";
21 import { displayError } from "@/lib/errors"; 22 import { prepareProfile } from "@/lib/geo";
22 import { featureToFairwayCoordinates } from "@/lib/geo";
23 23
24 // initial state 24 // initial state
25 const init = () => { 25 const init = () => {
26 return { 26 return {
27 additionalSurvey: null, 27 additionalSurvey: null,
314 commit( 314 commit(
315 "previousCuts", 315 "previousCuts",
316 previousCuts 316 previousCuts
317 .filter(cut => { 317 .filter(cut => {
318 return ( 318 return (
319 cut.bottleneckName === rootState.bottlenecks.selectedBottleneck 319 cut.bottleneckId === rootState.bottlenecks.selectedBottleneck
320 ); 320 );
321 }) 321 })
322 .sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1)) 322 .sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1))
323 ); 323 );
324 } 324 }