-
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): Display connected indictment case files (#15526)
* feat(j-s): Infocard for court for merged cases * Update InfoCardActiveIndictment.tsx * Update InfoCardActiveIndictment.tsx * feat(j-s): CaseFiles for connected cases * chore: nx format:write update dirty files * Update apps/judicial-system/web/src/routes/Court/Indictments/Overview/Overview.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(j-s): Linting * Update case.service.ts --------- Co-authored-by: andes-it <builders@andes.is> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Guðjón Guðjónsson <gudjon@kolibri.is>
- Loading branch information
Showing
7 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
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
...AccordionItems/ConnectedCaseFilesAccordionItem/ConnectedCaseFilesAccordionItem.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({ | ||
heading: { | ||
id: 'judicial.system.core:connected_case_files_accordion.heading', | ||
defaultMessage: 'Gögn úr máli {caseNumber}', | ||
description: | ||
'Notaður sem titill fyrir gögn úr sameinuðu ákærumáli á dómara skjá', | ||
}, | ||
}) |
38 changes: 38 additions & 0 deletions
38
...onents/AccordionItems/ConnectedCaseFilesAccordionItem/ConnectedCaseFilesAccordionItem.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,38 @@ | ||
import React, { FC } from 'react' | ||
import { useIntl } from 'react-intl' | ||
|
||
import { AccordionItem } from '@island.is/island-ui/core' | ||
import { IndictmentCaseFilesList } from '@island.is/judicial-system-web/src/components' | ||
import { Case } from '@island.is/judicial-system-web/src/graphql/schema' | ||
|
||
import { strings } from './ConnectedCaseFilesAccordionItem.strings' | ||
|
||
interface Props { | ||
connectedCase: Case | ||
} | ||
|
||
const ConnectedCaseFilesAccordionItem: FC<Props> = ({ connectedCase }) => { | ||
const { formatMessage } = useIntl() | ||
const { caseFiles, courtCaseNumber } = connectedCase | ||
|
||
if (!courtCaseNumber || !caseFiles || caseFiles.length < 1) { | ||
return null | ||
} | ||
|
||
return ( | ||
<AccordionItem | ||
id="connectedCaseFiles" | ||
labelVariant="h3" | ||
label={formatMessage(strings.heading, { | ||
caseNumber: connectedCase.courtCaseNumber, | ||
})} | ||
> | ||
<IndictmentCaseFilesList | ||
workingCase={connectedCase} | ||
displayHeading={false} | ||
/> | ||
</AccordionItem> | ||
) | ||
} | ||
|
||
export default ConnectedCaseFilesAccordionItem |
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
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