Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(inheritance-report): Revert bank account parameter name change #17396

Open
wants to merge 2 commits into
base: release/33.2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const expandAnswers = (
data: (answers.assets.bankAccounts?.data ?? []).map((account) => {
return {
assetNumber: account.assetNumber ?? '',
amount: account.amount ?? '',
propertyValuation: account.propertyValuation ?? '',
exchangeRateOrInterest: account.exchangeRateOrInterest ?? '',
foreignBankAccount: account?.foreignBankAccount ?? [],
deceasedShare: account.deceasedShare ?? '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const CalculateShare: FC<React.PropsWithChildren<FieldBaseProps>> = ({
const bankAccounts: CalcShared = (
(answers.assets as unknown as EstateAssets)?.bankAccounts?.data ?? []
).map((item) => {
const propertyValuation = valueToNumber(item.amount)
const propertyValuation = valueToNumber(item.propertyValuation)
const exchangeRateOrInterest = valueToNumber(item.exchangeRateOrInterest)
const deceasedShare = valueToNumber(item.deceasedShare)
const value = propertyValuation + exchangeRateOrInterest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const getBankAccountsDataRow = (answers: FormValue): RowType[] => {
)?.bankAccounts?.data.filter((item) => item.enabled)

const data = (values ?? []).map((item) => {
const propertyValuation = roundedValueToNumber(item.amount)
const propertyValuation = roundedValueToNumber(item.propertyValuation)

const isForeign = item.foreignBankAccount?.length

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: 'amount',
id: 'propertyValuation',
required: true,
currency: true,
},
Expand Down Expand Up @@ -376,7 +376,7 @@ export const assets = buildSection({
fromExternalData: 'bankAccounts',
skipPushRight: true,
repeaterButtonText: m.bankAccountRepeaterButton,
sumField: 'amount',
sumField: 'propertyValuation',
sumField2: 'exchangeRateOrInterest',
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const inheritanceReportSchema = z.object({
.object({
foreignBankAccount: z.array(z.enum([YES])).optional(),
assetNumber: z.string().refine((v) => v),
amount: z.string().refine((v) => v),
propertyValuation: z.string().refine((v) => v),
exchangeRateOrInterest: z.string().refine((v) => v),
enabled: z.boolean(),
...deceasedShare,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export interface BankAccountsData extends DeceasedShare {
exchangeRateOrInterest: string
propertyNumber: string
assetNumber: string
amount: string
propertyValuation: string
foreignBankAccount?: ('yes' | 'no')[]
taxFreeInheritance: number
enabled?: boolean
Expand Down
Loading