Skip to content

Commit

Permalink
chore(j-s): remove the option to set a reviewer when a decision has b…
Browse files Browse the repository at this point in the history
…een set
  • Loading branch information
thorhildurt committed Dec 19, 2024
1 parent 72a8ce9 commit 8647a5c
Showing 1 changed file with 42 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,48 +121,50 @@ export const Overview = () => {
<Box component="section" marginBottom={5}>
<IndictmentCaseFilesList workingCase={workingCase} />
</Box>
<Box marginBottom={5}>
<SectionHeading
title={fm(strings.reviewerTitle)}
description={
<Text variant="eyebrow">
{fm(strings.reviewerSubtitle, {
isFine:
workingCase.indictmentRulingDecision ===
CaseIndictmentRulingDecision.FINE,
indictmentAppealDeadline: formatDate(
workingCase.indictmentAppealDeadline,
),
appealDeadlineIsInThePast:
workingCase.indictmentVerdictAppealDeadlineExpired,
})}
</Text>
}
/>
<BlueBox>
<Select
name="reviewer"
label={fm(strings.reviewerLabel)}
placeholder={fm(strings.reviewerPlaceholder)}
value={
selectedIndictmentReviewer
? selectedIndictmentReviewer
: workingCase.indictmentReviewer
? {
label: workingCase.indictmentReviewer.name || '',
value: workingCase.indictmentReviewer.id,
}
: undefined
{!workingCase.indictmentReviewDecision && (
<Box marginBottom={5}>
<SectionHeading
title={fm(strings.reviewerTitle)}
description={
<Text variant="eyebrow">
{fm(strings.reviewerSubtitle, {
isFine:
workingCase.indictmentRulingDecision ===
CaseIndictmentRulingDecision.FINE,
indictmentAppealDeadline: formatDate(
workingCase.indictmentAppealDeadline,
),
appealDeadlineIsInThePast:
workingCase.indictmentVerdictAppealDeadlineExpired,
})}
</Text>
}
options={publicProsecutors}
onChange={(value) => {
setSelectedIndictmentReviewer(value as Option<string>)
}}
isDisabled={loading}
required
/>
</BlueBox>
</Box>
<BlueBox>
<Select
name="reviewer"
label={fm(strings.reviewerLabel)}
placeholder={fm(strings.reviewerPlaceholder)}
value={
selectedIndictmentReviewer
? selectedIndictmentReviewer
: workingCase.indictmentReviewer
? {
label: workingCase.indictmentReviewer.name || '',
value: workingCase.indictmentReviewer.id,
}
: undefined
}
options={publicProsecutors}
onChange={(value) => {
setSelectedIndictmentReviewer(value as Option<string>)
}}
isDisabled={loading}
required
/>
</BlueBox>
</Box>
)}
</FormContentContainer>
<FormContentContainer isFooter>
<FormFooter
Expand Down

0 comments on commit 8647a5c

Please sign in to comment.