From a52e8cb43c28bc8df8afb43bcf69089d7bf249e1 Mon Sep 17 00:00:00 2001 From: unakb Date: Mon, 6 Jan 2025 12:49:32 +0000 Subject: [PATCH] Update TagCaseState.tsx --- .../src/components/TagCaseState/TagCaseState.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/judicial-system/web/src/components/TagCaseState/TagCaseState.tsx b/apps/judicial-system/web/src/components/TagCaseState/TagCaseState.tsx index f813f756cd85..743f91920971 100644 --- a/apps/judicial-system/web/src/components/TagCaseState/TagCaseState.tsx +++ b/apps/judicial-system/web/src/components/TagCaseState/TagCaseState.tsx @@ -84,12 +84,15 @@ export const mapCaseStateToTagVariant = ( text: formatMessage(isCourtRole ? strings.new : strings.sent), } case CaseState.RECEIVED: { - if (isIndictmentCase(caseType) && defendants) { - if (scheduledDate && !haveAllSubpoenasBeenServiced(defendants)) { - return { - color: 'red', - text: formatMessage(strings.notYetServiced), - } + if ( + isIndictmentCase(caseType) && + defendants && + scheduledDate && + !haveAllSubpoenasBeenServiced(defendants) + ) { + return { + color: 'red', + text: formatMessage(strings.notYetServiced), } } switch (indictmentDecision) {