Skip to content

Commit

Permalink
Merge pull request #288 from Vizzuality/SKY30-437-change-unknown-to-n…
Browse files Browse the repository at this point in the history
…ot-assessed-in-country-table

[SKY30-437] Change unknown to not assessed in country table
  • Loading branch information
SARodrigues authored Aug 13, 2024
2 parents 4e2322c + 8c8c7e1 commit 3ba85c8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}</>;
},
},
Expand All @@ -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}</>;
},
},
Expand Down
1 change: 1 addition & 0 deletions frontend/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 3ba85c8

Please sign in to comment.