Skip to content

Commit

Permalink
fix(inheritance-report): Fixes for go live (#17295)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
albinagu and kodiakhq[bot] committed Dec 20, 2024
1 parent 9dd9a33 commit 919a065
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export const expandAnswers = (
deceasedShare: gun.deceasedShare ?? '',
deceasedShareEnabled: gun.deceasedShareEnabled ?? [],
deceasedShareAmount: gun.deceasedShareAmount ?? 0,
enabled: gun.enabled ?? true,
}
}),
total: answers.assets.guns?.total ?? 0,
Expand Down Expand Up @@ -199,6 +200,7 @@ export const expandAnswers = (
deceasedShare: realEstate.deceasedShare ?? '0',
deceasedShareEnabled: realEstate.deceasedShareEnabled ?? [],
deceasedShareAmount: realEstate.deceasedShareAmount ?? 0,
enabled: realEstate.enabled ?? true,
}
}),
total: answers.assets.realEstate?.total ?? 0,
Expand Down Expand Up @@ -227,6 +229,7 @@ export const expandAnswers = (
deceasedShare: vehicle.deceasedShare ?? '0',
deceasedShareEnabled: vehicle.deceasedShareEnabled ?? [],
deceasedShareAmount: vehicle?.deceasedShareAmount ?? 0,
enabled: vehicle.enabled ?? true,
}
}),
total: answers.assets.vehicles?.total ?? 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export const getForm = ({
value: ESTATE_INHERITANCE,
label: m.preDataCollectionApplicationForDefault,
disabled: !allowEstateApplication,
//TODO: remove tooltip when this application is ready to go live
tooltip: m.preDataCollectionApplicationForDefaultTooltip,
},
{
value: PREPAID_INHERITANCE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export const assets = buildSection({
[ESTATE_INHERITANCE]: m.bankAccountCapital,
[PREPAID_INHERITANCE]: m.bankAccountCapitalPrePaid,
},
id: 'propertyValuation',
id: 'amount',
required: true,
currency: true,
},
Expand Down Expand Up @@ -376,7 +376,7 @@ export const assets = buildSection({
fromExternalData: 'bankAccounts',
skipPushRight: true,
repeaterButtonText: m.bankAccountRepeaterButton,
sumField: 'propertyValuation',
sumField: 'amount',
sumField2: 'exchangeRateOrInterest',
},
),
Expand Down Expand Up @@ -494,13 +494,19 @@ export const assets = buildSection({
format: '######-####',
},
{
title: m.stocksFaceValue,
title: {
[ESTATE_INHERITANCE]: m.stocksFaceValue,
[PREPAID_INHERITANCE]: m.stocksFaceValuePrePaid,
},
id: 'amount',
currency: true,
required: true,
},
{
title: m.stocksRateOfChange,
title: {
[ESTATE_INHERITANCE]: m.stocksRateOfChange,
[PREPAID_INHERITANCE]: m.stocksRateOfChangePrePaid,
},
id: 'exchangeRateOrInterest',
type: 'currency',
required: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export const debtsAndFuneralCost = buildSection({
{
label: DebtTypes.OtherDebts,
},
{
label: DebtTypes.InsuranceInstitute,
},
],
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const prePaidApplicant = buildSection({
children: [
buildNationalIdWithNameField({
id: 'prePaidApplicant',
title: m.name,
title: '',
width: 'full',
required: true,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const inheritanceExecutor = buildSection({
}),
buildNationalIdWithNameField({
id: 'executors.executor',
title: m.name,
title: '',
required: true,
}),
buildTextField({
Expand Down Expand Up @@ -73,7 +73,7 @@ export const inheritanceExecutor = buildSection({
}),
buildNationalIdWithNameField({
id: 'executors.spouse',
title: m.name,
title: '',
required: true,
condition: (answers) =>
!!((answers.executors as any)?.includeSpouse as Array<string>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const assetSchema = ({ withShare }: { withShare?: boolean } = {}) =>
.refine((v) => (withShare ? validateAssetNumber(v) : true)),
description: z.string(),
propertyValuation: z.string(),
enabled: z.boolean(),
...(withShare ? { share: z.string() } : {}),
...deceasedShare,
})
Expand Down
10 changes: 10 additions & 0 deletions libs/application/templates/inheritance-report/src/lib/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,21 @@ export const m = defineMessages({
},
stocksFaceValue: {
id: 'ir.application:stocksFaceValue',
defaultMessage: 'Nafnverð á dánardegi',
description: '',
},
stocksFaceValuePrePaid: {
id: 'ir.application:stocksFaceValuePrePaid',
defaultMessage: 'Nafnverð',
description: '',
},
stocksRateOfChange: {
id: 'ir.application:stocksRateOfChange',
defaultMessage: 'Gengi á dánardegi',
description: '',
},
stocksRateOfChangePrePaid: {
id: 'ir.application:stocksRateOfChangePrePaid',
defaultMessage: 'Gengi',
description: '',
},
Expand Down
1 change: 1 addition & 0 deletions libs/application/templates/inheritance-report/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,5 @@ export enum DebtTypes {
PropertyFees = 'Fasteignagjöld',
OtherDebts = 'Aðrar skuldir',
PublicCharges = 'Opinber gjöld',
InsuranceInstitute = 'Tryggingarstofnun ríkisins',
}

0 comments on commit 919a065

Please sign in to comment.