Mercurial > gemma
view client/src/components/paneSetups.js @ 5586:215e6ba9651b surveysperbottleneckid
Added property "displayName" to bottlenecks.
Before displayed, bottlenecks ordered by country
are now checked for doubles per country.
In case a double is found the displayName is enriched with the
bottleneck_id. Otherwise the displayName is equal to "name" or "objnam".
Example:
const testList = [
{
properties: {
responsible_country: "AT",
name: "Bananas",
bottleneck_id: "BN1"
}
},
{
properties: {
responsible_country: "DE",
name: "Bananas",
bottleneck_id: "BN2"
}
},
{
properties: {
responsible_country: "DE",
name: "Bananas",
bottleneck_id: "BN3"
}
}
];
is rendered to:
AT
Bananas
DE
Bananas / BN2
Bananas / BN3
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 04 Apr 2022 15:12:43 +0200 |
parents | fa7dc3f31ef3 |
children |
line wrap: on
line source
const main = { id: "main", component: "Map" }; export const DEFAULT = { main }; export const COMPARESURVEYS = { main, compare: { id: "compare-survey", component: "Map" } }; export const FAIRWAYPROFILE = { main, fairwayprofile: { id: "fairwayprofile", component: "Fairwayprofile" } }; export const AVAILABLEFAIRWAYDEPTH = { main, availablefairwaydepth: { id: "availablefairwaydepth", component: "AvailableFairwayDepth" } }; export const AVAILABLEFAIRWAYDEPTHLNWL = { main, availablefairwaydepth: { id: "availablefairwaydepthlnwl", component: "AvailableFairwayDepthLNWL" } }; export const COMPARESURVEYS_FAIRWAYPROFILE = { main, compare: { id: "compare-survey", component: "Map" }, fairwayprofile: { id: "fairwayprofile", component: "Fairwayprofile" } }; export const GAUGE_WATERLEVEL = { main, waterlevel: { id: "gauge-waterlevel", component: "Waterlevel" } }; export const GAUGE_HYDROLOGICALCONDITIONS = { main, hydrological: { id: "gauge-hydrologicalconditions", component: "HydrologicalConditions" } }; export const GAUGE_WATERLEVEL_HYDROLOGICALCONDITIONS = { main, waterlevel: { id: "gauge-waterlevel", component: "Waterlevel" }, hydrological: { id: "gauge-hydrologicalconditions", component: "HydrologicalConditions" } };