fixed last week daily comsumption calcualtion error
This commit is contained in:
parent
f7ee347fc5
commit
0ac22ecbe9
|
|
@ -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)}%`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue