Mercurial > gemma
changeset 5254:09ec6a748fca new-fwa
Fixed front end for FWA vs LDC, too.
The code seems to be a bit redundant here...
author | wilde@azure1.rgb.intevation.de |
---|---|
date | Wed, 13 May 2020 10:39:36 +0200 |
parents | 878d52d95e37 |
children | 256ebbeb1252 |
files | client/src/store/fairwayavailability.js |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store/fairwayavailability.js Wed May 13 10:26:13 2020 +0200 +++ b/client/src/store/fairwayavailability.js Wed May 13 10:39:36 2020 +0200 @@ -312,9 +312,16 @@ type } = options; let { from, to } = options; - let name = feature.hasOwnProperty("properties") - ? feature.properties.bottleneck_id - : feature.get("bottleneck_id"); + let name = ""; + if (type === TYPES.BOTTLENECK) { + name = feature.hasOwnProperty("properties") + ? feature.properties.bottleneck_id + : feature.get("bottleneck_id"); + } else { + name = feature.hasOwnProperty("properties") + ? feature.properties.name + : feature.get("objnam"); + } [from, to] = getIntervallBorders(from, to, frequency); const start = encodeURIComponent("00:00:00+00:00"); const end = encodeURIComponent("23:59:59+00:00");