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
3 changed files with 5 additions and 5 deletions
Showing only changes of commit e82cad4f21 - Show all commits

View File

@@ -1,11 +1,11 @@
import * as React from "react";
export type DashboardMode = "expense" | "income";
export type DashboardPeriod = "rolling" | "calendar";
export type DashboardPeriodType = "rolling" | "calendar";
export interface DashboardState {
mode: DashboardMode;
period: DashboardPeriod;
periodType: DashboardPeriodType;
comparison: boolean;
}

View File

@@ -5,7 +5,7 @@ import { DashboardProps, DashboardState } from "./Dashboard.models";
export default function Dashboard(props: DashboardProps) {
const [state, setState] = React.useState<DashboardState>({
mode: "expense",
period: "rolling",
periodType: "rolling",
comparison: false,
});

View File

@@ -139,8 +139,8 @@ export default function DashboardView({
title={section.title}
accentColor={colors.primary}
colorScheme={colors}
period={period}
onPeriodChange={(p: any) => setState(prev => ({ ...prev, period: p }))}
periodType={period}
onPeriodTypeChange={(p: any) => setState(prev => ({ ...prev, period: p }))}
comparison={comparison}
setComparison={(c: any) => setState(prev => ({ ...prev, comparison: c }))}
/>