From 09dbcd3e3fc5e2fa440e41e05b9972237a10426f Mon Sep 17 00:00:00 2001 From: unakb Date: Tue, 2 Jul 2024 11:24:47 +0000 Subject: [PATCH] fix(j-s): Handle no defender assigned in indictment case InfoCard --- .../InfoCard/DefendantInfo/DefendantInfo.strings.ts | 6 ++++++ .../src/components/InfoCard/DefendantInfo/DefendantInfo.tsx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.strings.ts b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.strings.ts index f89786a9be07..1b953be027ea 100644 --- a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.strings.ts +++ b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.strings.ts @@ -23,4 +23,10 @@ export const strings = defineMessages({ defaultMessage: 'Verjandi', description: 'Notað til að birta titil á verjanda í ákæru.', }, + noDefenderAssigned: { + id: 'judicial.system.core:info_card.defendant_info.no_defender_assigned', + defaultMessage: 'Ekki skráður', + description: + 'Notað til að láta vita að enginn verjandi er skráður í ákæru.', + }, }) diff --git a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx index 30c4a4d7db9c..1ae06f76917f 100644 --- a/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx +++ b/apps/judicial-system/web/src/components/InfoCard/DefendantInfo/DefendantInfo.tsx @@ -85,10 +85,10 @@ export const DefendantInfo: FC = ({ )} - {defendant.defenderName && displayDefenderInfo && ( + {displayDefenderInfo && ( {`${formatMessage(strings.defender)}: ${ - defendant.defenderName + defendant.defenderName ?? formatMessage(strings.noDefenderAssigned) }`} {defendant.defenderEmail && ( <>