-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(j-s): Postponed Indefinitely Explanation (#14655)
Co-authored-by: Ívar Oddsson <[email protected]>
- Loading branch information
Showing
16 changed files
with
138 additions
and
86 deletions.
There are no files selected for viewing
50 changes: 17 additions & 33 deletions
50
apps/judicial-system/web/src/components/InfoCard/InfoCard.strings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,24 @@ | ||
import { defineMessages } from 'react-intl' | ||
|
||
export const infoCardActiveIndictment = defineMessages({ | ||
indictmentCreated: { | ||
id: 'judicial.system.core:info_card_active_indictment.indictment_created', | ||
defaultMessage: 'Dagsetning ákæru', | ||
description: | ||
'Notaður sem titill á "dagsetningu ákæru" hluta af yfirliti ákæru.', | ||
export const strings = defineMessages({ | ||
spokesperson: { | ||
id: 'judicial.system.core:info_card.spokesperson', | ||
defaultMessage: 'Talsmaður', | ||
description: 'Notaður sem titill á "talsmanni" á upplýsingaspjaldi máls.', | ||
}, | ||
prosecutor: { | ||
id: 'judicial.system.core:info_card_active_indictment.prosecutor', | ||
defaultMessage: 'Ákærandi', | ||
description: 'Notaður sem titill á "ákærandi" hluta af yfirliti ákæru.', | ||
defender: { | ||
id: 'judicial.system.core:info_card.defender', | ||
defaultMessage: 'Verjandi', | ||
description: 'Notaður sem titill á "verjanda" á upplýsingaspjaldi máls.', | ||
}, | ||
offence: { | ||
id: 'judicial.system.core:info_card_active_indictment.offence', | ||
defaultMessage: 'Brot', | ||
description: 'Notaður sem titill á "brot" hluta af yfirliti ákæru.', | ||
defenders: { | ||
id: 'judicial.system.core:info_card.defenders', | ||
defaultMessage: 'Verjendur', | ||
description: 'Notaður sem titill á "verjendum" á upplýsingaspjaldi máls.', | ||
}, | ||
}) | ||
|
||
export const infoCardCaseScheduled = defineMessages({ | ||
scheduled: { | ||
id: 'judicial.system.core:info_card_case_scheduled.scheduled', | ||
defaultMessage: 'Á dagskrá', | ||
description: 'Notaður sem texti sem tilgreinir að málið sé á dagskrá', | ||
}, | ||
postponed: { | ||
id: 'judicial.system.core:info_card_case_scheduled.postponed', | ||
defaultMessage: 'Frestað', | ||
description: | ||
'Notaður sem texti sem tilgreinir að málinu hafi verið sé frestað', | ||
}, | ||
courtRoom: { | ||
id: 'judicial.system.core:info_card_case_scheduled.court_room', | ||
defaultMessage: | ||
'{courtRoom, select, NONE {Dómsalur hefur ekki verið skráður} other {Dómsalur {courtRoom}}}', | ||
description: 'Notaður sem texti sem tilgreinir hvaða dómsalur er skráður', | ||
noDefender: { | ||
id: 'judicial.system.core:info_card.no_defender', | ||
defaultMessage: 'Hefur ekki verið skráður', | ||
description: 'Notaður sem texti þegar enginn verjandi er skráður.', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
apps/judicial-system/web/src/components/InfoCard/InfoCardCaseScheduled.strings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { defineMessages } from 'react-intl' | ||
|
||
export const strings = defineMessages({ | ||
scheduled: { | ||
id: 'judicial.system.core:info_card_case_scheduled.scheduled', | ||
defaultMessage: 'Á dagskrá', | ||
description: 'Notaður sem texti sem tilgreinir að málið sé á dagskrá', | ||
}, | ||
courtRoom: { | ||
id: 'judicial.system.core:info_card_case_scheduled.court_room', | ||
defaultMessage: | ||
'{courtRoom, select, NONE {Dómsalur hefur ekki verið skráður} other {Dómsalur {courtRoom}}}', | ||
description: 'Notaður sem texti sem tilgreinir hvaða dómsalur er skráður', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
apps/judicial-system/web/src/components/InfoCard/InfoCardCaseScheduledIndictment.strings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { defineMessages } from 'react-intl' | ||
|
||
export const strings = defineMessages({ | ||
postponed: { | ||
id: 'judicial.system.core:info_card_case_scheduled.postponed', | ||
defaultMessage: 'Frestað um ótilgreindan tíma', | ||
description: | ||
'Notaður sem texti sem tilgreinir að málinu hafi verið sé frestað', | ||
}, | ||
}) |
40 changes: 40 additions & 0 deletions
40
apps/judicial-system/web/src/components/InfoCard/InfoCardCaseScheduledIndictment.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
import { useIntl } from 'react-intl' | ||
|
||
import { Institution } from '../../graphql/schema' | ||
import InfoCard from './InfoCard' | ||
import InfoCardCaseScheduled from './InfoCardCaseScheduled' | ||
import { strings } from './InfoCardCaseScheduledIndictment.strings' | ||
|
||
interface Props { | ||
court: Institution | ||
courtDate: string | ||
courtRoom?: string | null | ||
postponedIndefinitelyExplanation?: string | null | ||
} | ||
|
||
const InfoCardCaseScheduledIndictment: React.FC<Props> = (props) => { | ||
const { court, courtDate, courtRoom, postponedIndefinitelyExplanation } = | ||
props | ||
const { formatMessage } = useIntl() | ||
|
||
return postponedIndefinitelyExplanation ? ( | ||
<InfoCard | ||
data={[ | ||
{ | ||
title: formatMessage(strings.postponed), | ||
value: postponedIndefinitelyExplanation, | ||
}, | ||
]} | ||
icon="calendar" | ||
/> | ||
) : ( | ||
<InfoCardCaseScheduled | ||
court={court} | ||
courtDate={courtDate} | ||
courtRoom={courtRoom} | ||
/> | ||
) | ||
} | ||
|
||
export default InfoCardCaseScheduledIndictment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
apps/judicial-system/web/src/components/InfoCard/InfoCardIndictment.strings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { defineMessages } from 'react-intl' | ||
|
||
export const strings = defineMessages({ | ||
indictmentCreated: { | ||
id: 'judicial.system.core:info_card_indictment.indictment_created', | ||
defaultMessage: 'Ákæra skráð', | ||
description: | ||
'Notaður sem titill á "dagsetningu ákæru" hluta af yfirliti ákæru.', | ||
}, | ||
prosecutor: { | ||
id: 'judicial.system.core:info_card_indictment.prosecutor', | ||
defaultMessage: 'Ákærandi', | ||
description: 'Notaður sem titill á "ákærandi" hluta af yfirliti ákæru.', | ||
}, | ||
offence: { | ||
id: 'judicial.system.core:info_card_indictment.offence', | ||
defaultMessage: 'Brot', | ||
description: 'Notaður sem titill á "brot" hluta af yfirliti ákæru.', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.