diff --git a/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.strings.ts b/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.strings.ts index 0d0db14b68a4..f447c563536a 100644 --- a/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.strings.ts +++ b/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.strings.ts @@ -38,4 +38,10 @@ export const strings = defineMessages({ defaultMessage: 'Gögn hafa verið send ákæranda og verjanda.', description: 'Notaður sem texti í staðfestingarglugga um að mál sé lokið.', }, + indictmentRulingDecisionTagText: { + id: 'judicial.system.core:indictments.summary.indictment_ruling_decision_tag_text', + defaultMessage: + '{indictmentRulingDecision, select, RULING {Dómur} FINE {Viðurlagaákvörðun} DISMISSAL {Frávísun} CANCELLATION {Niðurfelling} other {Lokið}}', + description: 'Notaður sem texti í TagCaseState til að birta úrskurð ákæru.', + }, }) diff --git a/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.tsx b/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.tsx index 8164009818c7..d3e3cdab569f 100644 --- a/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.tsx +++ b/apps/judicial-system/web/src/routes/Court/Indictments/Summary/Summary.tsx @@ -2,7 +2,7 @@ import React, { FC, useContext, useState } from 'react' import { useIntl } from 'react-intl' import router from 'next/router' -import { Box, Text } from '@island.is/island-ui/core' +import { Box, Tag, TagVariant, Text } from '@island.is/island-ui/core' import * as constants from '@island.is/judicial-system/consts' import { core } from '@island.is/judicial-system-web/messages' import { @@ -83,6 +83,22 @@ const Summary: FC = () => { [[] as CaseFile[], [] as CaseFile[]], ) + const getRulingDecisionTagColor = ( + indictmentRulingDecision: CaseIndictmentRulingDecision, + ): TagVariant => { + switch (indictmentRulingDecision) { + case CaseIndictmentRulingDecision.FINE: + return 'mint' + case CaseIndictmentRulingDecision.CANCELLATION: + return 'rose' + case CaseIndictmentRulingDecision.DISMISSAL: + return 'blue' + case CaseIndictmentRulingDecision.RULING: + default: + return 'darkerBlue' + } + } + return ( { onNavigationTo={handleNavigationTo} > + - {formatMessage(strings.title)} + + {formatMessage(strings.title)} + + {workingCase.indictmentRulingDecision && ( + + + {formatMessage(strings.indictmentRulingDecisionTagText, { + indictmentRulingDecision: + workingCase.indictmentRulingDecision, + })} + + + )} + {formatMessage(core.caseNumber, {