From 6a4f9173fe470e06ac9e477f4ef6054c9a69797b Mon Sep 17 00:00:00 2001 From: albina Date: Wed, 30 Oct 2024 13:46:00 +0000 Subject: [PATCH 1/2] fix(inheritance-report): text adjustments --- .../src/fields/HeirsRepeater/AdditionalHeir.tsx | 14 ++++++++++++-- .../src/fields/HeirsRepeater/index.tsx | 7 ++++++- .../inheritance-report/src/lib/messages.ts | 9 +++++++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/AdditionalHeir.tsx b/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/AdditionalHeir.tsx index ecee1cf537ff..0c6b564c280d 100644 --- a/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/AdditionalHeir.tsx +++ b/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/AdditionalHeir.tsx @@ -40,6 +40,7 @@ export const AdditionalHeir = ({ fieldName, relationOptions, error, + isPrepaid, }: { customFields: HeirsRepeaterProps['field']['props']['customFields'] field: GenericFormField @@ -49,6 +50,7 @@ export const AdditionalHeir = ({ fieldName: string relationOptions: { value: string; label: string }[] error: Record + isPrepaid: boolean }) => { const { formatMessage } = useLocale() const fieldIndex = `${fieldName}[${index}]` @@ -340,7 +342,11 @@ export const AdditionalHeir = ({ - {formatMessage(m.inheritanceAdvocateLabel)} + {formatMessage( + isPrepaid + ? m.inheritanceAdvocateLabelPrePaid + : m.inheritanceAdvocateLabel, + )} @@ -391,7 +397,11 @@ export const AdditionalHeir = ({ - {formatMessage(m.inheritanceAdvocateLabel)} + {formatMessage( + isPrepaid + ? m.inheritanceAdvocateLabelPrePaid + : m.inheritanceAdvocateLabel, + )} diff --git a/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/index.tsx b/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/index.tsx index 72d982430c49..639878598c91 100644 --- a/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/index.tsx +++ b/libs/application/templates/inheritance-report/src/fields/HeirsRepeater/index.tsx @@ -500,7 +500,11 @@ export const HeirsRepeater: FC< variant="h4" color={member.enabled ? 'dark400' : 'dark300'} > - {formatMessage(m.inheritanceAdvocateLabel)} + {formatMessage( + isPrePaidApplication + ? m.inheritanceAdvocateLabelPrePaid + : m.inheritanceAdvocateLabel, + )} @@ -585,6 +589,7 @@ export const HeirsRepeater: FC< updateValues={updateValues} remove={remove} error={error[index] ?? null} + isPrepaid={isPrePaidApplication} /> ) diff --git a/libs/application/templates/inheritance-report/src/lib/messages.ts b/libs/application/templates/inheritance-report/src/lib/messages.ts index b4716cfdfad5..58421417f035 100644 --- a/libs/application/templates/inheritance-report/src/lib/messages.ts +++ b/libs/application/templates/inheritance-report/src/lib/messages.ts @@ -1349,8 +1349,8 @@ 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: { @@ -1474,6 +1474,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', From 570b018e40cf25ba644602421cec1eb079db69ed Mon Sep 17 00:00:00 2001 From: andes-it Date: Wed, 30 Oct 2024 13:53:57 +0000 Subject: [PATCH 2/2] chore: nx format:write update dirty files --- .../templates/inheritance-report/src/lib/messages.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/application/templates/inheritance-report/src/lib/messages.ts b/libs/application/templates/inheritance-report/src/lib/messages.ts index 58421417f035..2c2ae8984d9a 100644 --- a/libs/application/templates/inheritance-report/src/lib/messages.ts +++ b/libs/application/templates/inheritance-report/src/lib/messages.ts @@ -1350,7 +1350,8 @@ export const m = defineMessages({ }, heirsDescriptionPrePaid: { id: 'ir.application:heirsDescriptionPrePaid#markdown', - defaultMessage: 'Vinsamlegast skráðu upplýsingar um þá erfingja sem eiga að taka við fyrirframgreiddum arfi.', + defaultMessage: + 'Vinsamlegast skráðu upplýsingar um þá erfingja sem eiga að taka við fyrirframgreiddum arfi.', description: '', }, heirsAndPartition: {