Skip to content

Commit

Permalink
fix(inheritance-report): bugfixing 20.12
Browse files Browse the repository at this point in the history
  • Loading branch information
albinagu committed Dec 20, 2024
1 parent 9364323 commit c740595
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit c740595

Please sign in to comment.