From 9e4fc1959db3872e45c5cdb4de9eba6e1dfadf1e Mon Sep 17 00:00:00 2001 From: Simao Rodrigues Date: Fri, 9 Aug 2024 11:40:42 +0100 Subject: [PATCH 1/2] Do not hardcode strings for missing data in the national tables --- .../map/content/details/tables/national-highseas/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx index 26816be2..128d2844 100644 --- a/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx +++ b/frontend/src/containers/map/content/details/tables/national-highseas/index.tsx @@ -123,8 +123,8 @@ const NationalHighseasTable: FCWithMessages = () => { protectedArea: mpa?.name, coverage: coveragePercentage, protectedAreaType: protectionStatus?.slug, - establishmentStage: establishmentStage?.slug || 'N/A', - protectionLevel: mpaaProtectionLevel?.slug || 'unknown', + establishmentStage: establishmentStage?.slug, + protectionLevel: mpaaProtectionLevel?.slug, area: mpa?.area, dataSource: dataSource?.slug, iucnCategory: iucnCategory?.slug, From 8c8c7e1706c678f72e5ebcffb8d11607a3e37233 Mon Sep 17 00:00:00 2001 From: Simao Rodrigues Date: Tue, 13 Aug 2024 10:57:33 +0100 Subject: [PATCH 2/2] National tables to display not assessed for establishment stage and protection level columns --- .../content/details/tables/national-highseas/useColumns.tsx | 6 ++++-- frontend/translations/en.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx b/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx index acaf263b..dd951d6b 100644 --- a/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx +++ b/frontend/src/containers/map/content/details/tables/national-highseas/useColumns.tsx @@ -213,7 +213,8 @@ const useColumns = ({ filters, onFiltersChange }: UseColumnsProps) => { cell: ({ row }) => { const { establishmentStage: value } = row.original; const formattedValue = - establishmentStageOptions.find((entry) => value === entry?.value)?.name || t('n-a'); + establishmentStageOptions.find((entry) => value === entry?.value)?.name || + t('not-assessed'); return <>{formattedValue}; }, }, @@ -234,7 +235,8 @@ const useColumns = ({ filters, onFiltersChange }: UseColumnsProps) => { cell: ({ row }) => { const { protectionLevel: value } = row.original; const formattedValue = - protectionLevelOptions.find((entry) => value === entry?.value)?.name || t('n-a'); + protectionLevelOptions.find((entry) => value === entry?.value)?.name || + t('not-assessed'); return <>{formattedValue}; }, }, diff --git a/frontend/translations/en.json b/frontend/translations/en.json index 08c0f4e2..fdfb6879 100644 --- a/frontend/translations/en.json +++ b/frontend/translations/en.json @@ -258,6 +258,7 @@ "iucn-category": "IUCN Categories", "mpas": "MPAs", "n-a": "N/A", + "not-assessed": "Not assessed", "oecms": "OECMs", "fully-highly-protected": "Fully/Highly Protected", "global-contribution": "Global contribution",