Service Layer high complexity mobile
2
Dependencies
2
Dependents
8
Entities
0
Integrations

Description

Riverpod FutureProvider-based service fetching and caching coordinator team report data from the REST API. Handles paginated peer mentor payloads, exposes the server-computed inactive-mentor flag, and enforces tenant isolation by scoping all requests to the coordinator's organisation and association.

Feature: Coordinator Team Reports

team-statistics-service

Responsibilities

  • Fetch team report data from GET /api/v1/reports/team with organisation_id, association_id, date_range, and optional peer_mentor_id parameters
  • Cache report response in Riverpod state and support pull-to-refresh via provider invalidation
  • Handle paginated peer mentor data to keep payload sizes manageable for large associations (up to 1400 local chapters)
  • Expose inactive mentor flag (no activity in configurable N days, default 30) returned from server
  • Enforce tenant scoping so no cross-organisation data is ever requested or surfaced

Interfaces

getTeamReport(organisationId, associationId, dateRange)
getPeerMentorDetail(mentorId, organisationId, dateRange)
refreshReport()
getInactiveMentors(organisationId, thresholdDays)

Relationships

Dependencies (2)

Components this component depends on

Dependents (2)

Components that depend on this component