Skip to content

Commit

Permalink
fix: wrong calculator amounts in handling views (HL-1038) (#2463)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjturt authored Nov 16, 2023
1 parent 1d23a7a commit 92ac83e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@ const DoneModalContent: React.FC<ComponentProps> = ({
handledApplication.status === APPLICATION_STATUSES.ACCEPTED;
const description = handledApplication?.logEntryComment;

const {
rowsWithoutTotal,
totalRow,
dateRangeRows,
helsinkiBenefitMonthlyRows,
} = extractCalculatorRows(calculationRows);
const { totalRow, dateRangeRows, helsinkiBenefitMonthlyRows } =
extractCalculatorRows(calculationRows);

return (
<>
Expand Down Expand Up @@ -71,7 +67,7 @@ const DoneModalContent: React.FC<ComponentProps> = ({
<$Text key={row.id}>
{t(`${translationsBase}.eurosPerMonth`, {
euros: formatFloatToCurrency(
rowsWithoutTotal[index].amount,
helsinkiBenefitMonthlyRows[index].amount,
null,
'fi-FI',
0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const ApplicationProcessingView: React.FC<{ data: Application }> = ({
});

const {
rowsWithoutTotal,
totalRow,
totalRowDescription,
dateRangeRows,
Expand Down Expand Up @@ -177,7 +176,7 @@ const ApplicationProcessingView: React.FC<{ data: Application }> = ({
<$ViewField>{row.descriptionFi}</$ViewField>
<$ViewField isBold>
{formatFloatToCurrency(
rowsWithoutTotal[index].amount
helsinkiBenefitMonthlyRows[index].amount
)}
{t('common:utility.perMonth')}
</$ViewField>
Expand Down

0 comments on commit 92ac83e

Please sign in to comment.