From 43cd66fcbc0aa6d56b75c30c125744926327d351 Mon Sep 17 00:00:00 2001 From: mluena Date: Fri, 12 Apr 2024 09:29:55 +0200 Subject: [PATCH 1/3] max height to legend --- client/src/containers/map/legend/index.tsx | 43 +++++++++++++--------- 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/client/src/containers/map/legend/index.tsx b/client/src/containers/map/legend/index.tsx index c9acb05e..4dfc81f3 100644 --- a/client/src/containers/map/legend/index.tsx +++ b/client/src/containers/map/legend/index.tsx @@ -10,6 +10,7 @@ import MapLegendItem from '@/containers/map/legend/legend-item'; import Legend from '@/components/map/legend'; import { Button } from '@/components/ui/button'; +import { ScrollArea } from '@/components/ui/scroll-area'; const MapLegends = ({ className = '' }) => { const [layers] = useSyncLayers(); @@ -34,24 +35,30 @@ const MapLegends = ({ className = '' }) => { return (
- {openLegend && ( - - {layers.map((layer) => { - const settings = { opacity: layer.opacity, visibility: layer.visibility, id: layer.id }; - return ; - })} - - )} + + {openLegend && ( + + {layers.map((layer) => { + const settings = { + opacity: layer.opacity, + visibility: layer.visibility, + id: layer.id, + }; + return ; + })} + + )} + {layers.length > 0 && (
); diff --git a/client/src/containers/charts/single-bar.tsx b/client/src/containers/charts/single-bar.tsx index 42febfa6..a1be1644 100644 --- a/client/src/containers/charts/single-bar.tsx +++ b/client/src/containers/charts/single-bar.tsx @@ -34,15 +34,23 @@ export default function SingleBar({
-

{formatCompactNumber(data['value'].afoco_funding || 0)}

- {((data['value'].afoco_funding * 100) / data['value'].total_funding).toFixed()}% + Funding: + + {' '} + {formatCompactNumber(data['value'].afoco_funding || 0)} + + + {' '} + ({((data['value'].afoco_funding * 100) / data['value'].total_funding).toFixed()} + %) +

- +
-

{formatCompactNumber(data['value'].national_funding || 0)}

- {((data['value'].national_funding * 100) / data['value'].total_funding).toFixed()} - % + Funding: + + {' '} + {formatCompactNumber(data['value'].national_funding || 0)} + + + {' '} + ( + {( + (data['value'].national_funding * 100) / + data['value'].total_funding + ).toFixed()} + %) +

diff --git a/client/src/containers/countries/detail/panel.tsx b/client/src/containers/countries/detail/panel.tsx index a1646bec..714c5fe2 100644 --- a/client/src/containers/countries/detail/panel.tsx +++ b/client/src/containers/countries/detail/panel.tsx @@ -266,14 +266,14 @@ export default function CountryDetailPanel() {
-
+

Total funding{' '} {indicators.country_funding.unit && ( ({indicators.country_funding.unit}) )}

- + @@ -296,7 +296,7 @@ export default function CountryDetailPanel() {

Total intervention area

- + @@ -351,7 +351,7 @@ export default function CountryDetailPanel() {

Total beneficiaries

- + @@ -396,7 +396,7 @@ export default function CountryDetailPanel() {

Total jobs

- + diff --git a/client/src/containers/filters/index.tsx b/client/src/containers/filters/index.tsx index 0a3c3ad3..f591e09d 100644 --- a/client/src/containers/filters/index.tsx +++ b/client/src/containers/filters/index.tsx @@ -37,7 +37,7 @@ export default function Filters({ nrResults = 0 }: { nrResults: number }) { - + Filters diff --git a/client/src/containers/map/legend/index.tsx b/client/src/containers/map/legend/index.tsx index 4dfc81f3..e4aef9b1 100644 --- a/client/src/containers/map/legend/index.tsx +++ b/client/src/containers/map/legend/index.tsx @@ -35,8 +35,8 @@ const MapLegends = ({ className = '' }) => { return (
- - {openLegend && ( + {openLegend && ( + { return ; })} - )} - + + )} {layers.length > 0 && (