From 8c63c9a0c9672b3e733af1ad2cd975b21e73cbc1 Mon Sep 17 00:00:00 2001 From: albinagu <47886428+albinagu@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:16:00 +0000 Subject: [PATCH] fix(inheritance-report): bugfixing 20.12 (#17322) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../modules/templates/inheritance-report/utils/mappers.ts | 5 ++++- .../templates/inheritance-report/src/lib/dataSchema.ts | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/application/template-api-modules/src/lib/modules/templates/inheritance-report/utils/mappers.ts b/libs/application/template-api-modules/src/lib/modules/templates/inheritance-report/utils/mappers.ts index 87fbccb3d32e..6d1e0229f4f0 100644 --- a/libs/application/template-api-modules/src/lib/modules/templates/inheritance-report/utils/mappers.ts +++ b/libs/application/template-api-modules/src/lib/modules/templates/inheritance-report/utils/mappers.ts @@ -125,12 +125,13 @@ export const expandAnswers = ( data: (answers.assets.bankAccounts?.data ?? []).map((account) => { return { assetNumber: account.assetNumber ?? '', - propertyValuation: account.propertyValuation ?? '', + amount: account.amount ?? '', exchangeRateOrInterest: account.exchangeRateOrInterest ?? '', foreignBankAccount: account?.foreignBankAccount ?? [], deceasedShare: account.deceasedShare ?? '', deceasedShareEnabled: account.deceasedShareEnabled ?? [], deceasedShareAmount: account.deceasedShareAmount ?? 0, + enabled: account.enabled ?? true, } }), total: answers.assets.bankAccounts?.total ?? 0, @@ -144,6 +145,7 @@ export const expandAnswers = ( deceasedShare: claim.deceasedShare ?? '', deceasedShareEnabled: claim.deceasedShareEnabled ?? [], deceasedShareAmount: claim.deceasedShareAmount ?? 0, + enabled: claim.enabled ?? true, } }), total: answers.assets.claims?.total ?? 0, @@ -216,6 +218,7 @@ export const expandAnswers = ( deceasedShare: stock?.deceasedShare ?? '', deceasedShareEnabled: stock?.deceasedShareEnabled ?? [], deceasedShareAmount: stock?.deceasedShareAmount ?? 0, + enabled: stock.enabled ?? true, } }), total: answers.assets.stocks?.total ?? 0, diff --git a/libs/application/templates/inheritance-report/src/lib/dataSchema.ts b/libs/application/templates/inheritance-report/src/lib/dataSchema.ts index 0e77b8b62b09..2e369699cc60 100644 --- a/libs/application/templates/inheritance-report/src/lib/dataSchema.ts +++ b/libs/application/templates/inheritance-report/src/lib/dataSchema.ts @@ -221,8 +221,9 @@ export const inheritanceReportSchema = z.object({ .object({ foreignBankAccount: z.array(z.enum([YES])).optional(), assetNumber: z.string().refine((v) => v), - propertyValuation: z.string().refine((v) => v), + amount: z.string().refine((v) => v), exchangeRateOrInterest: z.string().refine((v) => v), + enabled: z.boolean(), ...deceasedShare, }) .refine( @@ -248,6 +249,7 @@ export const inheritanceReportSchema = z.object({ description: z.string(), assetNumber: z.string(), propertyValuation: z.string().refine((v) => v), + enabled: z.boolean(), ...deceasedShare, }) .refine( @@ -285,6 +287,7 @@ export const inheritanceReportSchema = z.object({ amount: z.string(), exchangeRateOrInterest: z.string(), value: z.string().refine((v) => v), + enabled: z.boolean(), ...deceasedShare, }) .refine(