Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(j-s): Double service not required #16938

Merged
merged 27 commits into from
Nov 20, 2024
Merged
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0cd31c1
Checkpoint
oddsson Nov 5, 2024
e6b57b3
Merge branch 'main' of github.com:island-is/island.is into j-s/servic…
oddsson Nov 5, 2024
96aa96f
Refactor AlertMessage
oddsson Nov 5, 2024
d717322
Format date
oddsson Nov 6, 2024
80e2958
Cleanup
oddsson Nov 6, 2024
4c4c23e
Cleanup
oddsson Nov 6, 2024
f18cda6
Merge branch 'main' of github.com:island-is/island.is into j-s/servic…
oddsson Nov 6, 2024
f657160
Merge branch 'main' of github.com:island-is/island.is into j-s/servic…
oddsson Nov 7, 2024
04020c2
Merge branch 'j-s/service-announcement-defenders' of github.com:islan…
oddsson Nov 7, 2024
d98dbd0
Merge
oddsson Nov 7, 2024
d55a4a2
Merge branch 'main' of github.com:island-is/island.is into j-s/servic…
oddsson Nov 8, 2024
2deeef3
Add key
oddsson Nov 8, 2024
a0133c1
Refactor
oddsson Nov 8, 2024
9079a4c
Remove console.log
oddsson Nov 8, 2024
db83d4b
Merge branch 'main' of github.com:island-is/island.is into j-s/servic…
oddsson Nov 8, 2024
ae44420
Merge branch 'main' into j-s/service-announcement-defenders
kodiakhq[bot] Nov 8, 2024
b329584
Merge branch 'main' into j-s/service-announcement-defenders
gudjong Nov 8, 2024
76e228d
Merge branch 'main' of github.com:island-is/island.is
oddsson Nov 12, 2024
25d6e4b
Merge branch 'main' of github.com:island-is/island.is
oddsson Nov 18, 2024
19136d2
Merge
oddsson Nov 18, 2024
c520d1d
Merge
oddsson Nov 18, 2024
253d172
Merge branch 'main' of github.com:island-is/island.is
oddsson Nov 19, 2024
a318d19
Merge branch 'main' of github.com:island-is/island.is
oddsson Nov 19, 2024
88525c1
Remove duplicate service not required
oddsson Nov 19, 2024
58d7d76
Revert
oddsson Nov 19, 2024
e7bb832
Merge branch 'main' into j-s/duplicate-service-not-required-2
unakb Nov 20, 2024
6382bdc
Merge branch 'main' into j-s/duplicate-service-not-required-2
kodiakhq[bot] Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,11 @@ export const getAppealExpirationInfo = (
const getVerdictViewDateText = (
formatMessage: IntlShape['formatMessage'],
verdictViewDate?: string | null,
serviceNotRequired?: boolean,
): string => {
if (verdictViewDate) {
return formatMessage(strings.verdictDisplayedDate, {
date: formatDate(verdictViewDate, 'PPP'),
})
} else if (serviceNotRequired) {
return formatMessage(strings.serviceNotRequired)
} else {
return formatMessage(strings.serviceRequired)
}
Expand Down Expand Up @@ -129,23 +126,19 @@ export const DefendantInfo: FC<DefendantInfoProps> = (props) => {
)}
</Box>
{displayAppealExpirationInfo && (
<Box marginTop={1}>
<Text as="span">
{formatMessage(appealExpirationInfo.message, {
appealExpirationDate: appealExpirationInfo.date,
})}
</Text>
</Box>
)}
{displayVerdictViewDate && defendant.serviceRequirement && (
<Text marginTop={1} fontWeight="semiBold">
{getVerdictViewDateText(
formatMessage,
defendant.verdictViewDate,
defendant.serviceRequirement === ServiceRequirement.NOT_REQUIRED,
)}
<Text as="p" marginTop={1} fontWeight="semiBold">
{formatMessage(appealExpirationInfo.message, {
appealExpirationDate: appealExpirationInfo.date,
})}
</Text>
)}
{displayVerdictViewDate &&
defendant.serviceRequirement &&
defendant.serviceRequirement !== ServiceRequirement.NOT_REQUIRED && (
<Text marginTop={1} fontWeight="semiBold">
{getVerdictViewDateText(formatMessage, defendant.verdictViewDate)}
</Text>
)}
</>
)
}
Loading