Mercurial > gemma
comparison client/src/store/bottlenecks.js @ 5588:94ef43fac0eb surveysperbottleneckid
Make BN for overview distinguishable
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 05 Apr 2022 10:15:37 +0200 |
parents | 2576a399c2cf |
children | 826e67e959c9 |
comparison
equal
deleted
inserted
replaced
5587:2576a399c2cf | 5588:94ef43fac0eb |
---|---|
40 return state.bottlenecks.reduce((o, n) => { | 40 return state.bottlenecks.reduce((o, n) => { |
41 o[n.properties.bottleneck_id] = n.properties.limiting; | 41 o[n.properties.bottleneck_id] = n.properties.limiting; |
42 return o; | 42 return o; |
43 }, {}); | 43 }, {}); |
44 }, | 44 }, |
45 bottlenecksForDisplay: (state, getters) => { | |
46 const groupedBottlenecks = getters.orderedBottlenecks; | |
47 return Object.keys(groupedBottlenecks) | |
48 .map(country => { | |
49 return groupedBottlenecks[country]; | |
50 }) | |
51 .reduce((o, n) => { | |
52 o = o.concat(n); | |
53 return o; | |
54 }, []); | |
55 }, | |
45 orderedBottlenecks: state => { | 56 orderedBottlenecks: state => { |
46 const groupedBottlenecks = {}; | 57 const groupedBottlenecks = {}; |
47 const orderedGroups = {}; | 58 const orderedGroups = {}; |
48 // group bottlenecks by cc | 59 // group bottlenecks by cc |
49 state.bottlenecksList.forEach(bn => { | 60 state.bottlenecksList.forEach(bn => { |