Skip to content

Commit

Permalink
fix(inheritance-report): text adjustments (#16649)
Browse files Browse the repository at this point in the history
* fix(inheritance-report): text adjustments

* chore: nx format:write update dirty files

---------

Co-authored-by: andes-it <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 31, 2024
1 parent f6eee7c commit 2eb239a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const AdditionalHeir = ({
fieldName,
relationOptions,
error,
isPrepaid,
}: {
customFields: HeirsRepeaterProps['field']['props']['customFields']
field: GenericFormField<EstateMember>
Expand All @@ -49,6 +50,7 @@ export const AdditionalHeir = ({
fieldName: string
relationOptions: { value: string; label: string }[]
error: Record<string, string>
isPrepaid: boolean
}) => {
const { formatMessage } = useLocale()
const fieldIndex = `${fieldName}[${index}]`
Expand Down Expand Up @@ -340,7 +342,11 @@ export const AdditionalHeir = ({
<GridRow>
<GridColumn span={['1/1']} paddingBottom={2}>
<Text variant="h4">
{formatMessage(m.inheritanceAdvocateLabel)}
{formatMessage(
isPrepaid
? m.inheritanceAdvocateLabelPrePaid
: m.inheritanceAdvocateLabel,
)}
</Text>
</GridColumn>
<GridColumn span={['1/1']} paddingBottom={2}>
Expand Down Expand Up @@ -391,7 +397,11 @@ export const AdditionalHeir = ({
<GridRow>
<GridColumn span={['1/1']} paddingBottom={2}>
<Text variant="h4">
{formatMessage(m.inheritanceAdvocateLabel)}
{formatMessage(
isPrepaid
? m.inheritanceAdvocateLabelPrePaid
: m.inheritanceAdvocateLabel,
)}
</Text>
</GridColumn>
<GridColumn span={['1/1']} paddingBottom={2}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,11 @@ export const HeirsRepeater: FC<
variant="h4"
color={member.enabled ? 'dark400' : 'dark300'}
>
{formatMessage(m.inheritanceAdvocateLabel)}
{formatMessage(
isPrePaidApplication
? m.inheritanceAdvocateLabelPrePaid
: m.inheritanceAdvocateLabel,
)}
</Text>
</GridColumn>
<GridColumn span={['1/1', '1/2']} paddingBottom={2}>
Expand Down Expand Up @@ -585,6 +589,7 @@ export const HeirsRepeater: FC<
updateValues={updateValues}
remove={remove}
error={error[index] ?? null}
isPrepaid={isPrePaidApplication}
/>
</Box>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1349,8 +1349,9 @@ export const m = defineMessages({
description: '',
},
heirsDescriptionPrePaid: {
id: 'ir.application:heirsDescriptionPrePaid',
defaultMessage: 'Lorem ipsum lorem ipsum',
id: 'ir.application:heirsDescriptionPrePaid#markdown',
defaultMessage:
'Vinsamlegast skráðu upplýsingar um þá erfingja sem eiga að taka við fyrirframgreiddum arfi.',
description: '',
},
heirsAndPartition: {
Expand Down Expand Up @@ -1474,6 +1475,11 @@ export const m = defineMessages({
defaultMessage: 'Forsjáraðili/málsvari/sérstakur lögráðamaður',
description: 'Custody label',
},
inheritanceAdvocateLabelPrePaid: {
id: 'ir.application:inheritanceAdvocateLabelPrePaid',
defaultMessage: 'Forsjáraðili/málsvari/sérstakur lögráðamaður',
description: 'Custody label',
},
errorSpouseCount: {
id: 'ir.application:errorSpouseCount',
defaultMessage: 'Aðeins er hægt að hafa einn erfingja sem maka',
Expand Down

0 comments on commit 2eb239a

Please sign in to comment.