period selection

This commit is contained in:
2026-05-01 17:40:54 +05:30
parent 38f7416942
commit 7b0b3fb615
4 changed files with 30 additions and 3 deletions

View File

@@ -46,4 +46,6 @@ export interface DashboardProps {
data: any; // Aggregated data from features
latest: any[]; // Latest items from features
onModeChange?: (mode: DashboardMode) => void;
selectedPeriodId: string | null;
onSelectPeriodId: (id: string | null) => void;
}

View File

@@ -21,7 +21,9 @@ export default function DashboardView({
latest,
state,
setState,
onModeChange
onModeChange,
selectedPeriodId,
onSelectPeriodId,
}: ViewProps) {
const theme = useTheme();
const themeMode = theme.palette.mode;
@@ -143,6 +145,8 @@ export default function DashboardView({
onPeriodTypeChange={(p: any) => setState(prev => ({ ...prev, periodType: p }))}
comparison={comparison}
setComparison={(c: any) => setState(prev => ({ ...prev, comparison: c }))}
selectedPeriodId={selectedPeriodId}
onSelectPeriodId={onSelectPeriodId}
/>
)}
</Grid>