Mercurial > gemma
diff client/src/components/fairway/Profiles.vue @ 3236:5914d615f703
available_fairway_depth: use the store luke
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 10 May 2019 11:33:46 +0200 |
parents | 1253fe15e3e3 |
children | cb2f67a07400 |
line wrap: on
line diff
--- a/client/src/components/fairway/Profiles.vue Fri May 10 10:49:37 2019 +0200 +++ b/client/src/components/fairway/Profiles.vue Fri May 10 11:33:46 2019 +0200 @@ -313,27 +313,7 @@ "currentProfile" ]), ...mapGetters("map", ["openLayersMap"]), - orderedBottlenecks() { - let groupedBottlenecks = {}, - orderedGroups = {}; - - // group bottlenecks by cc - this.bottlenecksList.forEach(bn => { - let cc = bn.properties.responsible_country; - if (groupedBottlenecks.hasOwnProperty(cc)) { - groupedBottlenecks[cc].push(bn); - } else { - groupedBottlenecks[cc] = [bn]; - } - }); - - // order groups by cc - Object.keys(groupedBottlenecks) - .sort() - .forEach(cc => (orderedGroups[cc] = groupedBottlenecks[cc])); - - return orderedGroups; - }, + ...mapGetters("bottlenecks", ["orderedBottlenecks"]), profilesLable() { return this.$gettext("Bottleneck"); },