User Interface medium complexity mobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

Scrollable list shown on the coordinator stats screen enumerating all peer mentors in scope with their individual totals for the selected time window. Each row is tappable for drill-down to that peer mentor's full record. Supports chapter-filtered display.

Feature: Activity Statistics Dashboard

peer-mentor-stats-list

Summaries

The Peer Mentor Stats List gives program coordinators a consolidated, filterable view of every peer mentor's performance within their managed chapters — sessions completed, hours logged, and contribution trends — without requiring manual data aggregation or spreadsheet exports. This capability directly reduces coordinator administrative burden, accelerates reimbursement processing by surfacing outliers quickly, and enables data-driven decisions about mentorship program health. By making individual mentor performance visible and drill-down accessible, the organization can proactively identify high performers for recognition and underperforming cases for support, improving overall program outcomes and volunteer engagement rates.

Peer Mentor Stats List carries medium complexity due to its dual-mode rendering (single chapter vs. multi-chapter with labels), drill-down navigation contract, and dependency on both the peer-mentor and activity data models being fully available at render time. Scheduling dependency: this component cannot be completed until the PeerMentorStatRow aggregation logic is finalized in the data layer, since its entire data contract flows through that type. Plan for three test scenarios: populated list with single chapter, populated list with multiple chapters showing chapter labels, and empty state when no mentors are in scope.

Tap navigation must be integration-tested against the destination drill-down screen to ensure routing contracts are stable before release.

PeerMentorStatsList is a Flutter ListView-based widget accepting a typed List and an onRowTap callback of type void Function(String mentorId). Each row is built via buildRow(), which renders mentor name, session count, hour total, and conditionally a chapter label when the coordinator manages more than one chapter. The empty state is handled by buildEmptyState() returning a centered placeholder widget, and buildLoadingPlaceholder() provides a shimmer or skeleton state during async data fetch. The component references the peer-mentor and activity data models through the PeerMentorStatRow aggregate — no direct database access occurs here.

Navigation is decoupled via the callback pattern, keeping routing logic in the parent screen. Ensure list items use const constructors where possible to optimize Flutter's rebuild diffing on large lists.

Responsibilities

  • Render per-peer-mentor stat rows with session and hour totals
  • Handle tap navigation to individual peer mentor drill-down
  • Support empty state when no peer mentors are in scope
  • Display chapter label when coordinator manages multiple chapters

Interfaces

PeerMentorStatsList({required List<PeerMentorStatRow> rows, required void Function(String) onRowTap})
buildRow(PeerMentorStatRow row)
buildEmptyState()
buildLoadingPlaceholder()

Relationships

Dependents (1)

Components that depend on this component