Access Personal Activity Statistics as Coordinator
Coordinators who are also active peer mentors need a personal stats view alongside the team view. A tab or toggle on the statistics screen must allow switching between 'My Team' and 'My Activity' perspectives. The personal stats view uses the personal-stats-service and personal-stats-bloc, sharing the same period filter but displaying only the authenticated user's own activity records. Summary cards, charts, and list views must update to reflect personal scope. This view must also be accessible to peer mentors who reach the statistics screen via their own role, making the personal-stats components shared infrastructure.
User Story
Acceptance Criteria
- Given the coordinator is on the statistics screen, When they tap 'My Activity' toggle, Then all dashboard widgets switch to display only the coordinator's own activity data
- Given the personal view is active, When the coordinator selects a different time period, Then personal stats update for that period
- Given the coordinator switches back to 'My Team' view, When the switch occurs, Then team statistics are restored without a full data reload if cached
- Given a coordinator has no personal activities in the selected period, When personal view renders, Then an appropriate empty state is shown with a prompt to register an activity
- Given the role is peer mentor (not coordinator), When the statistics screen loads, Then only the personal stats view is shown with no team toggle visible
Business Value
Coordinators often fulfill a dual role — managing a team while also conducting peer support sessions themselves. Without a personal view, their own contributions are invisible within the aggregated team data. Providing a personal perspective respects the coordinator's individual work, supports the gamification/Wrapped feature planned for Phase 4, and ensures all roles have a consistent sense of their own impact.
Components
- Personal Peer Mentor Statistics View ui
- Personal Statistics Service service
- Personal Statistics BLoC infrastructure
- Role Access Validator service
- Stats Repository data
- Coordinator Statistics BLoC infrastructure
- Peer Mentor Stats Screen ui
- Coordinator Stats Screen ui
- Stats Repository data
Dependencies
- View Team Activity Summary Cards critical