From 99b0002a6f5c7395fdbfda05657b2169e6d663b7 Mon Sep 17 00:00:00 2001 From: Nils Hettich <4287298+nilshettich@users.noreply.github.com> Date: Wed, 25 Nov 2020 13:42:17 +0100 Subject: [PATCH 1/2] Show number of LCPs in popup, or nothing if no LCPs --- .../manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx b/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx index cafc02a9..f0c25628 100644 --- a/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx +++ b/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx @@ -1282,7 +1282,12 @@ const OpenlayersMapView = (props) => {
Large combustion plants
++ {state.popupDetails.properties.nLCP + ? ' Large combustion plants' + : '' } +
+- - {state.popupDetails.properties.nFacilities || 0}{' '} - Facilities - -
-- - {state.popupDetails.properties.nInstallations || 0}{' '} - Installations - -
+ {state.popupDetails.properties.nFacilities || + state.popupDetails.properties.nInstallations || + state.popupDetails.properties.nLCP ? ( ++ + {state.popupDetails.properties.nFacilities} + Facilit + {state.popupDetails.properties.nFacilities > 1 + ? 'ies' + : 'y'} + +
++ + {state.popupDetails.properties.nInstallations} + Installation + {state.popupDetails.properties.nInstallations > 1 + ? 's' + : ''} + +
++ {state.popupDetails.properties.nLCP} + Large combustion plant + {state.popupDetails.properties.nLCP > 1 ? 's' : ''} +
+- {state.popupDetails.properties.nLCP - ? ' Large combustion plants' - : '' } -
+ ) : ( + '' + )} -- {state.popupDetails.properties.pollutants} - {/* {state.popupDetails.properties.pollutants.substring( - 0, - 256, - )} - {state.popupDetails.properties.pollutants.length > 256 - ? '...' - : ''} */} -
+{state.popupDetails.properties.pollutants}
) : (There are no data regarding the pollutants
)}