From 92ac83eef6add14c7d98a55612f444fc054e2e3f Mon Sep 17 00:00:00 2001 From: Maks Turtiainen Date: Thu, 16 Nov 2023 09:07:41 +0200 Subject: [PATCH] fix: wrong calculator amounts in handling views (HL-1038) (#2463) --- .../DoneModalContent/DoneModalContent.tsx | 10 +++------- .../AplicationProcessingView.tsx | 3 +-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/DoneModalContent/DoneModalContent.tsx b/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/DoneModalContent/DoneModalContent.tsx index 34f621fb8d..29c2f58759 100644 --- a/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/DoneModalContent/DoneModalContent.tsx +++ b/frontend/benefit/handler/src/components/applicationReview/actions/handlingApplicationActions/DoneModalContent/DoneModalContent.tsx @@ -33,12 +33,8 @@ const DoneModalContent: React.FC = ({ handledApplication.status === APPLICATION_STATUSES.ACCEPTED; const description = handledApplication?.logEntryComment; - const { - rowsWithoutTotal, - totalRow, - dateRangeRows, - helsinkiBenefitMonthlyRows, - } = extractCalculatorRows(calculationRows); + const { totalRow, dateRangeRows, helsinkiBenefitMonthlyRows } = + extractCalculatorRows(calculationRows); return ( <> @@ -71,7 +67,7 @@ const DoneModalContent: React.FC = ({ <$Text key={row.id}> {t(`${translationsBase}.eurosPerMonth`, { euros: formatFloatToCurrency( - rowsWithoutTotal[index].amount, + helsinkiBenefitMonthlyRows[index].amount, null, 'fi-FI', 0 diff --git a/frontend/benefit/handler/src/components/applicationReview/applicationProcessingView/AplicationProcessingView.tsx b/frontend/benefit/handler/src/components/applicationReview/applicationProcessingView/AplicationProcessingView.tsx index 974b3e6d0b..9c542ac7ba 100644 --- a/frontend/benefit/handler/src/components/applicationReview/applicationProcessingView/AplicationProcessingView.tsx +++ b/frontend/benefit/handler/src/components/applicationReview/applicationProcessingView/AplicationProcessingView.tsx @@ -51,7 +51,6 @@ const ApplicationProcessingView: React.FC<{ data: Application }> = ({ }); const { - rowsWithoutTotal, totalRow, totalRowDescription, dateRangeRows, @@ -177,7 +176,7 @@ const ApplicationProcessingView: React.FC<{ data: Application }> = ({ <$ViewField>{row.descriptionFi} <$ViewField isBold> {formatFloatToCurrency( - rowsWithoutTotal[index].amount + helsinkiBenefitMonthlyRows[index].amount )} {t('common:utility.perMonth')}