From 6b815cf1d0b62e112e2836989deed4f1f690fa7b Mon Sep 17 00:00:00 2001 From: Sampo Tawast <5328394+sirtawast@users.noreply.github.com> Date: Mon, 14 Oct 2024 15:23:18 +0300 Subject: [PATCH] feat: use applicant's startDate as initial value for calculation (#3422) --- .../useSalaryBenefitCalculatorData.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/benefit/handler/src/components/applicationReview/salaryBenefitCalculatorView/useSalaryBenefitCalculatorData.ts b/frontend/benefit/handler/src/components/applicationReview/salaryBenefitCalculatorView/useSalaryBenefitCalculatorData.ts index 315bd886dc..a0fc39165e 100644 --- a/frontend/benefit/handler/src/components/applicationReview/salaryBenefitCalculatorView/useSalaryBenefitCalculatorData.ts +++ b/frontend/benefit/handler/src/components/applicationReview/salaryBenefitCalculatorView/useSalaryBenefitCalculatorData.ts @@ -83,10 +83,10 @@ const useSalaryBenefitCalculatorData = ( const formik = useFormik({ initialValues: { [CALCULATION_SALARY_KEYS.START_DATE]: convertToUIDateFormat( - application?.calculation?.startDate + application?.calculation?.startDate || application?.startDate ), [CALCULATION_SALARY_KEYS.END_DATE]: convertToUIDateFormat( - application?.calculation?.endDate + application?.calculation?.endDate || application?.endDate ), [CALCULATION_SALARY_KEYS.MONTHLY_PAY]: application?.calculation?.monthlyPay,