Coordinator Stats Screen
Component Detail
Description
Aggregated statistics screen for coordinators showing totals across all peer mentors in their local chapter(s). Supports multi-chapter coordinators (up to 5 chapters per NHF requirement) and provides drill-down navigation to individual peer mentor records. All displayed numbers match Bufdir export values exactly.
stats-screen-coordinator
Summaries
The Coordinator Stats Screen delivers chapter-level performance visibility directly into the hands of the coordinators who need it most. By consolidating peer mentor activity data across up to five chapters into a single, unified view, it eliminates the manual effort of cross-referencing spreadsheets or requesting reports from administrators. Coordinators can instantly identify underperforming chapters, track progress toward NHF targets, and make informed resource decisions — all from a mobile device. Critically, all displayed figures are guaranteed to match Bufdir export values exactly, eliminating discrepancies between what coordinators see day-to-day and what gets officially reported.
This audit-grade data consistency reduces compliance risk and builds stakeholder trust in the organization's reporting accuracy.
This is the highest-complexity screen in the coordinator-facing mobile experience, with a high complexity rating justified by its multi-chapter aggregation logic, role-based data scoping, and the strict Bufdir export parity requirement. It depends on six other components — time-window-selector, stats-summary-cards, peer-mentor-stats-list, activity-chart-widget, stats-notifier, and chapter-scope-resolver — meaning most of those must be stable before integration testing can begin. The drill-down navigation to individual peer mentor records introduces additional coordination with the peer mentor stats screen. Plan for dedicated QA cycles to validate data accuracy against Bufdir exports across different chapter combinations (1, 3, and 5 chapters) and time windows.
Any changes to the chapter-scope-resolver or stats-notifier carry direct regression risk here.
This screen acts as the top-level coordinator widget, composing stats-summary-cards, peer-mentor-stats-list, activity-chart-widget, and time-window-selector into a cohesive layout. It subscribes to stats-notifier (likely a Riverpod StateNotifier or equivalent) for reactive state updates, and delegates chapter scoping entirely to chapter-scope-resolver to enforce the multi-chapter boundary (max 5 per NHF rule). The onChapterFilterChanged and onTimeWindowChanged callbacks trigger data refreshes through stats-notifier, which re-fetches and re-aggregates from the local data layer. Drill-down is handled via onPeerMentorSelected, which should push a new route onto the Navigator stack.
The strictest invariant is Bufdir export parity — aggregation logic must be co-located with or directly derived from the export calculation path to prevent drift. Use golden tests or snapshot tests against known Bufdir fixture data to catch any regressions.
Responsibilities
- Aggregate and display chapter-wide peer mentor statistics
- Support multi-chapter scope for coordinators with up to 5 chapters
- Provide drill-down navigation to individual peer mentor stats
- Enforce role-based data scoping to coordinator's own chapters
Interfaces
build(BuildContext context)
onTimeWindowChanged(TimeWindow window)
onPeerMentorSelected(String peerMentorId)
onChapterFilterChanged(List<String> chapterIds)
onRefresh()
showAggregatedTotals(StatsAggregate aggregate)
showLoadingState()
showErrorState(String message)
Relationships
Dependencies (6)
Components this component depends on
Related Data Entities (1)
Data entities managed by this component