Activity Statistics Dashboard
Feature Detail
Description
A per-peer-mentor and per-coordinator summary view showing logged activity over configurable time windows (current month, quarter, year). For peer mentors, the view shows their own totals: number of sessions, hours contributed, and — where applicable — pending reimbursement amounts. For coordinators, the view aggregates across all peer mentors in their local chapter with drill-down to individual records. The dashboard is the foundation for the gamification features planned for Phase 4 ('Ditt likepersonsår' / Spotify Wrapped equivalent) and for the Bufdir export. All numbers displayed here must exactly match what will be exported, so there is no reconciliation burden on coordinators at reporting time.
Analysis
Gives peer mentors visibility into their own contribution, which the research identifies as a core motivational driver. For coordinators it replaces manual Excel aggregation. Accurate real-time totals also reduce the end-of-period scramble to reconcile numbers before Bufdir deadlines.
Use Supabase views or materialised aggregates to back the dashboard queries — avoid computing totals client-side on large datasets. Riverpod AsyncNotifier refreshes on navigation to the stats screen and on any new activity insert. Charts via fl_chart. Coordinator view must respect role-based access: a coordinator sees only peer mentors in their own local chapter(s). NHF's multi-chapter membership (up to 5) means a coordinator's scope query must support multiple chapter IDs.
Components (211)
Shared Components
These components are reused across multiple features
User Interface (59)
Service Layer (52)
Data Layer (33)
Infrastructure (54)
User Stories (24)
As a As a Peer Mentor (Likeperson)
I want to see a chart showing the breakdown of my activities by type (phone call, home visit, group session, etc.)
So that I can understand which types of support I provide most often and reflect on the diversity of my peer mentor engagement
- Given I have logged activities of multiple types, When I view the statistics dashboard, Then I see a chart displaying each activity type as a distinct segment with a label and count
- Given the chart is rendered, When I tap on a segment, Then I see the activity type name (using org-specific terminology), total count, and percentage of all activities
- Given the organization uses custom labels for activity types, When I view chart labels, Then they reflect the org-specific terminology rather than generic default labels
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see a bar chart showing my activity count per month over the selected time period
So that I can identify trends in my engagement, recognize periods of high or low activity, and track whether I am maintaining consistent peer mentor involvement
- Given I am viewing the statistics dashboard with a time window spanning multiple months, When the chart renders, Then I see one bar per month with height proportional to my activity count for that month
- Given the bar chart is displayed, When I tap on a specific month's bar, Then I see a tooltip or overlay showing the exact activity count and month name
- Given I change the time window filter, When the filter is applied, Then the bar chart updates to show only the months within the new time window
- +2 more
As a As a Peer Mentor (Likeperson)
I want to view my statistics even when I am offline or in areas with poor connectivity
So that I can review my activity history and contribution data regardless of my internet connection, which is particularly important when presenting my work to others in low-connectivity environments
- Given I have previously loaded my statistics while online, When I open the statistics screen while offline, Then I see my most recently cached statistics with a banner or indicator informing me that I am viewing offline data
- Given I am online and load the statistics dashboard, When the data loads successfully, Then the local cache is updated with the new data for future offline use
- Given I register a new activity while offline, When I later sync and reload the statistics, Then the cache is invalidated and updated to include the newly registered activity
- +2 more
As a As a Coordinator
I want to see a chart showing the breakdown of my activities by type (phone call, home visit, group session, etc.)
So that I can understand which types of support I provide most often and reflect on the diversity of my peer mentor engagement
- Given I have logged activities of multiple types, When I view the statistics dashboard, Then I see a chart displaying each activity type as a distinct segment with a label and count
- Given the chart is rendered, When I tap on a segment, Then I see the activity type name (using org-specific terminology), total count, and percentage of all activities
- Given the organization uses custom labels for activity types, When I view chart labels, Then they reflect the org-specific terminology rather than generic default labels
- +2 more
As a As a Coordinator
I want to see a bar chart showing my activity count per month over the selected time period
So that I can identify trends in my engagement, recognize periods of high or low activity, and track whether I am maintaining consistent peer mentor involvement
- Given I am viewing the statistics dashboard with a time window spanning multiple months, When the chart renders, Then I see one bar per month with height proportional to my activity count for that month
- Given the bar chart is displayed, When I tap on a specific month's bar, Then I see a tooltip or overlay showing the exact activity count and month name
- Given I change the time window filter, When the filter is applied, Then the bar chart updates to show only the months within the new time window
- +2 more
As a As a Coordinator
I want to view my statistics even when I am offline or in areas with poor connectivity
So that I can review my activity history and contribution data regardless of my internet connection, which is particularly important when presenting my work to others in low-connectivity environments
- Given I have previously loaded my statistics while online, When I open the statistics screen while offline, Then I see my most recently cached statistics with a banner or indicator informing me that I am viewing offline data
- Given I am online and load the statistics dashboard, When the data loads successfully, Then the local cache is updated with the new data for future offline use
- Given I register a new activity while offline, When I later sync and reload the statistics, Then the cache is invalidated and updated to include the newly registered activity
- +2 more
As a As a Organization Administrator
I want to see a chart showing the breakdown of my activities by type (phone call, home visit, group session, etc.)
So that I can understand which types of support I provide most often and reflect on the diversity of my peer mentor engagement
- Given I have logged activities of multiple types, When I view the statistics dashboard, Then I see a chart displaying each activity type as a distinct segment with a label and count
- Given the chart is rendered, When I tap on a segment, Then I see the activity type name (using org-specific terminology), total count, and percentage of all activities
- Given the organization uses custom labels for activity types, When I view chart labels, Then they reflect the org-specific terminology rather than generic default labels
- +2 more
As a As a Organization Administrator
I want to see a bar chart showing my activity count per month over the selected time period
So that I can identify trends in my engagement, recognize periods of high or low activity, and track whether I am maintaining consistent peer mentor involvement
- Given I am viewing the statistics dashboard with a time window spanning multiple months, When the chart renders, Then I see one bar per month with height proportional to my activity count for that month
- Given the bar chart is displayed, When I tap on a specific month's bar, Then I see a tooltip or overlay showing the exact activity count and month name
- Given I change the time window filter, When the filter is applied, Then the bar chart updates to show only the months within the new time window
- +2 more
As a As a Organization Administrator
I want to view my statistics even when I am offline or in areas with poor connectivity
So that I can review my activity history and contribution data regardless of my internet connection, which is particularly important when presenting my work to others in low-connectivity environments
- Given I have previously loaded my statistics while online, When I open the statistics screen while offline, Then I see my most recently cached statistics with a banner or indicator informing me that I am viewing offline data
- Given I am online and load the statistics dashboard, When the data loads successfully, Then the local cache is updated with the new data for future offline use
- Given I register a new activity while offline, When I later sync and reload the statistics, Then the cache is invalidated and updated to include the newly registered activity
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see my activities categorized in a way that aligns with Bufdir reporting requirements
So that I can understand how my activities contribute to the organization's grant reporting obligations and confirm that I am logging activities in ways that count toward Bufdir metrics
- Given I am viewing my statistics, When I navigate to the Bufdir alignment section, Then I see my activities grouped by Bufdir-compliant categories with counts per category
- Given my logged activities use organization-specific terminology, When displayed in the Bufdir view, Then they are correctly mapped to the appropriate Bufdir category labels
- Given an activity I logged does not map to a recognized Bufdir category, When it is displayed, Then it appears in an 'Other' or 'Unclassified' bucket and I am informed it may not appear in official Bufdir reports
- +2 more
As a As a Coordinator
I want to see my activities categorized in a way that aligns with Bufdir reporting requirements
So that I can understand how my activities contribute to the organization's grant reporting obligations and confirm that I am logging activities in ways that count toward Bufdir metrics
- Given I am viewing my statistics, When I navigate to the Bufdir alignment section, Then I see my activities grouped by Bufdir-compliant categories with counts per category
- Given my logged activities use organization-specific terminology, When displayed in the Bufdir view, Then they are correctly mapped to the appropriate Bufdir category labels
- Given an activity I logged does not map to a recognized Bufdir category, When it is displayed, Then it appears in an 'Other' or 'Unclassified' bucket and I am informed it may not appear in official Bufdir reports
- +2 more
As a As a Organization Administrator
I want to see my activities categorized in a way that aligns with Bufdir reporting requirements
So that I can understand how my activities contribute to the organization's grant reporting obligations and confirm that I am logging activities in ways that count toward Bufdir metrics
- Given I am viewing my statistics, When I navigate to the Bufdir alignment section, Then I see my activities grouped by Bufdir-compliant categories with counts per category
- Given my logged activities use organization-specific terminology, When displayed in the Bufdir view, Then they are correctly mapped to the appropriate Bufdir category labels
- Given an activity I logged does not map to a recognized Bufdir category, When it is displayed, Then it appears in an 'Other' or 'Unclassified' bucket and I am informed it may not appear in official Bufdir reports
- +2 more
As a As a Peer Mentor (Likeperson)
I want to select different time periods (this week, this month, this year, custom range) to filter my statistics
So that I can review my activity trends over different periods and understand how my engagement changes over time
- Given I am on the statistics screen, When I tap the time window selector, Then I see options for: This Week, This Month, Last 3 Months, This Year, and Custom Range
- Given I select 'This Month', When the selection is confirmed, Then all statistics including charts and summary cards update to show data only for the current calendar month
- Given I select 'Custom Range', When I provide a start and end date, Then the statistics recalculate for exactly that date range
- +2 more
As a As a Peer Mentor (Likeperson)
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
- 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
- +2 more
As a As a Peer Mentor (Likeperson)
I want to see summary cards showing my total activities, hours contributed, and contact count for the selected time period
So that I can quickly understand my overall contribution at a glance without having to navigate through detailed reports
- Given I open the statistics screen, When the screen loads, Then I see summary cards displaying total activities, total hours, and contact count for the default time period (current month)
- Given I am viewing the stats dashboard, When I change the time window filter, Then all summary cards update immediately to reflect the selected period without requiring a manual refresh
- Given I have no activities logged in the selected period, When the dashboard loads, Then summary cards display zero values with a friendly empty state message rather than errors
- +2 more
As a As a Coordinator
I want to select different time periods (this week, this month, this year, custom range) to filter my statistics
So that I can review my activity trends over different periods and understand how my engagement changes over time
- Given I am on the statistics screen, When I tap the time window selector, Then I see options for: This Week, This Month, Last 3 Months, This Year, and Custom Range
- Given I select 'This Month', When the selection is confirmed, Then all statistics including charts and summary cards update to show data only for the current calendar month
- Given I select 'Custom Range', When I provide a start and end date, Then the statistics recalculate for exactly that date range
- +2 more
As a As a Coordinator
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
- 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
- +2 more
As a As a Coordinator
I want to see summary cards showing my total activities, hours contributed, and contact count for the selected time period
So that I can quickly understand my overall contribution at a glance without having to navigate through detailed reports
- Given I open the statistics screen, When the screen loads, Then I see summary cards displaying total activities, total hours, and contact count for the default time period (current month)
- Given I am viewing the stats dashboard, When I change the time window filter, Then all summary cards update immediately to reflect the selected period without requiring a manual refresh
- Given I have no activities logged in the selected period, When the dashboard loads, Then summary cards display zero values with a friendly empty state message rather than errors
- +2 more
As a As a Organization Administrator
I want to select different time periods (this week, this month, this year, custom range) to filter my statistics
So that I can review my activity trends over different periods and understand how my engagement changes over time
- Given I am on the statistics screen, When I tap the time window selector, Then I see options for: This Week, This Month, Last 3 Months, This Year, and Custom Range
- Given I select 'This Month', When the selection is confirmed, Then all statistics including charts and summary cards update to show data only for the current calendar month
- Given I select 'Custom Range', When I provide a start and end date, Then the statistics recalculate for exactly that date range
- +2 more
As a 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
- 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
- +2 more
As a As a Organization Administrator
I want to see summary cards showing my total activities, hours contributed, and contact count for the selected time period
So that I can quickly understand my overall contribution at a glance without having to navigate through detailed reports
- Given I open the statistics screen, When the screen loads, Then I see summary cards displaying total activities, total hours, and contact count for the default time period (current month)
- Given I am viewing the stats dashboard, When I change the time window filter, Then all summary cards update immediately to reflect the selected period without requiring a manual refresh
- Given I have no activities logged in the selected period, When the dashboard loads, Then summary cards display zero values with a friendly empty state message rather than errors
- +2 more
As a As a Peer Mentor (Likeperson)
I want to navigate and understand all statistics content using a screen reader or other assistive technology
So that I can access my activity data independently regardless of visual impairment, which is critical for peer mentors working within organizations like Blindeforbundet that serve visually impaired members
- Given I am using VoiceOver, When I navigate to the statistics screen, Then all summary card values are announced with descriptive labels (e.g., 'Total activities: 42, for this month')
- Given charts are displayed on screen, When a screen reader user navigates to a chart, Then a text-based alternative is available that communicates the same information as the visual chart
- Given I am using a screen reader, When I interact with the time window filter, Then each option is announced with its label and the currently selected state is communicated
- +3 more
As a As a Coordinator
I want to navigate and understand all statistics content using a screen reader or other assistive technology
So that I can access my activity data independently regardless of visual impairment, which is critical for peer mentors working within organizations like Blindeforbundet that serve visually impaired members
- Given I am using VoiceOver, When I navigate to the statistics screen, Then all summary card values are announced with descriptive labels (e.g., 'Total activities: 42, for this month')
- Given charts are displayed on screen, When a screen reader user navigates to a chart, Then a text-based alternative is available that communicates the same information as the visual chart
- Given I am using a screen reader, When I interact with the time window filter, Then each option is announced with its label and the currently selected state is communicated
- +3 more
As a As a Organization Administrator
I want to navigate and understand all statistics content using a screen reader or other assistive technology
So that I can access my activity data independently regardless of visual impairment, which is critical for peer mentors working within organizations like Blindeforbundet that serve visually impaired members
- Given I am using VoiceOver, When I navigate to the statistics screen, Then all summary card values are announced with descriptive labels (e.g., 'Total activities: 42, for this month')
- Given charts are displayed on screen, When a screen reader user navigates to a chart, Then a text-based alternative is available that communicates the same information as the visual chart
- Given I am using a screen reader, When I interact with the time window filter, Then each option is announced with its label and the currently selected state is communicated
- +3 more