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 cafc02a..f0c2562 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' + : '' } +

+
{/* SITE POLLUTANT EMISSIONS */} From e3196a1fd16499b68cc7ec101752d88a133a6221 Mon Sep 17 00:00:00 2001 From: Miu Razvan Date: Thu, 26 Nov 2020 10:55:51 +0200 Subject: [PATCH 2/2] Updated popup 'Site contents' labels --- .../DiscodataOpenlayersMapBlock/View.jsx | 125 ++++++++++-------- 1 file changed, 70 insertions(+), 55 deletions(-) diff --git a/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx b/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx index f0c2562..2740380 100644 --- a/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx +++ b/src/components/manage/Blocks/DiscodataOpenlayersMapBlock/View.jsx @@ -1243,53 +1243,77 @@ const OpenlayersMapView = (props) => {
{/* SITE CONTENTS */} -
-
-
Site contents
-
-
-

- - {state.popupDetails.properties.nFacilities || 0}{' '} - Facilities - -

-
-
-

- - {state.popupDetails.properties.nInstallations || 0}{' '} - Installations - -

+ {state.popupDetails.properties.nFacilities || + state.popupDetails.properties.nInstallations || + state.popupDetails.properties.nLCP ? ( +
+
+
Site contents
+
+ {state.popupDetails.properties.nFacilities ? ( +
+

+ + {state.popupDetails.properties.nFacilities} + Facilit + {state.popupDetails.properties.nFacilities > 1 + ? 'ies' + : 'y'} + +

+
+ ) : ( + '' + )} + {state.popupDetails.properties.nInstallations ? ( +
+

+ + {state.popupDetails.properties.nInstallations} + Installation + {state.popupDetails.properties.nInstallations > 1 + ? 's' + : ''} + +

+
+ ) : ( + '' + )} + {state.popupDetails.properties.nLCP ? ( +
+

+ {state.popupDetails.properties.nLCP} + Large combustion plant + {state.popupDetails.properties.nLCP > 1 ? 's' : ''} +

+
+ ) : ( + '' + )}
-
-

- {state.popupDetails.properties.nLCP - ? ' Large combustion plants' - : '' } -

+ ) : ( + '' + )} -
-
{/* SITE POLLUTANT EMISSIONS */}
@@ -1297,16 +1321,7 @@ const OpenlayersMapView = (props) => {
{state.popupDetails.properties.pollutants ? ( -

- {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

)}