HIGH story-activity-statistics-dashboard-organization-admin-005 3 pts
3
Story Points
High
Priority
Activity Statistics Dashboard
Feature

User Story

As a Organization Administrator
I want to access a dedicated personal statistics view showing only my own data without coordinator-level aggregations
So that I can focus on my own contribution and progress without being distracted by organizational-level data that I do not have the authority to act on

Acceptance Criteria

  • Given I am logged in as a peer mentor, When I navigate to the statistics screen, Then I see my personal statistics view and there is no option to view other mentors' data or organizational aggregations
  • Given I am viewing my personal stats, When I pull to refresh, Then the data reloads from Supabase and the cache is invalidated and updated
  • Given a coordinator is logged in and switches to the statistics tab, When they view the screen, Then they see the coordinator dashboard rather than the personal stats view
  • Given I am a peer mentor with the org-admin role, When I view the statistics screen, Then the role-access-validator correctly routes me to the appropriate view based on my active role
  • Given Supabase RLS policies are in place, When I attempt to query another mentor's stats directly, Then the query returns no data and the system does not expose unauthorized information

Business Value

Role-scoped statistics views are critical for data privacy compliance, particularly given that NHF handles sensitive information about members with disabilities and HLF processes certification and health-related data. Ensuring peer mentors only see their own data builds trust in the platform and satisfies GDPR requirements for data minimization and purpose limitation.