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(