Filter Statistics by Date Range
On the Statistics Dashboard Screen, a date range filter control allows the peer mentor to switch between four preset periods: week, month, year, and all-time. When a filter is selected, the dashboard recalculates and redisplays all statistics (totals, chart, summary widget) for the chosen period. Filtering is handled client-side using BLoC state management with cached data from the Statistics Repository, so switching between periods is fast without repeated network calls. The selected period is visually highlighted so the user always knows which range is active.
User Story
Acceptance Criteria
- Given I am on the Statistics Dashboard Screen, when I tap a date range option (week, month, year, all-time), then all displayed statistics update to reflect only activities within that period
- Given I have selected a date range, when I view the dashboard, then the active range filter is visually highlighted so I know which period is selected
- Given I have cached statistics data, when I switch between date range filters, then the transition is fast (under 300ms) without a full network reload
- Given I switch to 'this week' filter, when the current week has no activities, then I see an appropriate message indicating no activities for this period rather than a blank screen
- Given I select 'all time', when I view the dashboard, then I see the complete lifetime totals of my peer mentor activities
Business Value
Peer mentors who can view both recent and historical trends are better able to self-regulate their volunteering pace, identify burnout risks early, and reflect on their growth over time. This reduces the need for coordinators to manually check in on activity levels.