From 0ac22ecbe9964b4a22268e8f3bc7e46a905e573c Mon Sep 17 00:00:00 2001 From: Yinyin Liu Date: Tue, 10 Mar 2026 10:51:56 +0100 Subject: [PATCH] fixed last week daily comsumption calcualtion error --- .../content/dashboards/SodiohomeInstallations/WeeklyReport.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/WeeklyReport.tsx b/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/WeeklyReport.tsx index c2e2c5f8c..092bd382b 100644 --- a/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/WeeklyReport.tsx +++ b/typescript/frontend-marios2/src/content/dashboards/SodiohomeInstallations/WeeklyReport.tsx @@ -573,7 +573,7 @@ function WeeklySection({ installationId, latestMonthlyPeriodEnd }: { installatio const prev = report.previousWeek; const currentWeekDayCount = Math.min(7, report.dailyData.length); - const previousWeekDayCount = Math.max(1, report.dailyData.length - currentWeekDayCount); + const previousWeekDayCount = 7; const formatChange = (pct: number) => pct === 0 ? '—' : pct > 0 ? `+${pct.toFixed(1)}%` : `${pct.toFixed(1)}%`;