diff 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
line wrap: on
line diff
--- a/client/src/store/bottlenecks.js	Mon Apr 04 15:30:54 2022 +0200
+++ b/client/src/store/bottlenecks.js	Tue Apr 05 10:15:37 2022 +0200
@@ -42,6 +42,17 @@
         return o;
       }, {});
     },
+    bottlenecksForDisplay: (state, getters) => {
+      const groupedBottlenecks = getters.orderedBottlenecks;
+      return Object.keys(groupedBottlenecks)
+        .map(country => {
+          return groupedBottlenecks[country];
+        })
+        .reduce((o, n) => {
+          o = o.concat(n);
+          return o;
+        }, []);
+    },
     orderedBottlenecks: state => {
       const groupedBottlenecks = {};
       const orderedGroups = {};