feat: implement analytics dashboard layout (task 10)
- Add analytics types (AnalyticsSummary, DateRange) - Create analyticsService for API calls and CSV export - Implement DateRangeSelector component with presets - Create StatCard component for summary statistics - Build responsive AnalyticsPage with: - Summary statistics cards (reports, events, users, litter collected) - Date range filtering with presets - CSV export functionality - Loading and error states - Responsive grid layout Requirements: 5.1, 5.5
This commit is contained in:
@@ -119,3 +119,21 @@ export interface FilterState {
|
||||
quantities?: QuantityLevel[];
|
||||
verificationStatus?: VerificationStatus[];
|
||||
}
|
||||
|
||||
// Analytics types
|
||||
export interface AnalyticsSummary {
|
||||
totalReports: number;
|
||||
totalEvents: number;
|
||||
totalUsers: number;
|
||||
totalLitterCollected?: number; // in kilograms
|
||||
periodComparison?: {
|
||||
reports: number; // percentage change
|
||||
events: number;
|
||||
users: number;
|
||||
};
|
||||
}
|
||||
|
||||
export interface DateRange {
|
||||
start: Date;
|
||||
end: Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user