major refactor of the dashboard and react-openapi integration #1

Merged
aetos merged 44 commits from period-selection into main 2026-05-07 11:00:54 +00:00
Showing only changes of commit 21a4a95f39 - Show all commits

View File

@@ -83,10 +83,7 @@ function buildLabel(
return `${dayFmt.format(start)} - ${dayFmt.format(end)}`; return `${dayFmt.format(start)} - ${dayFmt.format(end)}`;
case "monthly": case "monthly":
if (sameMonth(start, end)) {
return `${monthFmt.format(start)} ${yearFmt.format(start)}`; return `${monthFmt.format(start)} ${yearFmt.format(start)}`;
}
return `${monthDayFmt.format(start)} - ${monthDayFmt.format(end)}`;
case "yearly": case "yearly":
return yearFmt.format(start); return yearFmt.format(start);
@@ -110,8 +107,8 @@ function decoratePeriods(
): (ReportPeriod & { id: string; label: string })[] { ): (ReportPeriod & { id: string; label: string })[] {
return periods.map((p) => ({ return periods.map((p) => ({
...p, ...p,
id: buildPeriodId(type, new Date(p.start), new Date(p.end)), id: buildPeriodId(type, new Date(p.start + "Z"), new Date(p.end + "Z")),
label: buildLabel(type, new Date(p.start), new Date(p.end)), label: buildLabel(type, new Date(p.start + "Z"), new Date(p.end + "Z")),
})); }));
} }