ProxyReportService
Component Detail
Service Layer
medium complexity
backend
0
Dependencies
0
Dependents
3
Entities
0
Integrations
Description
Backend service that validates and persists activity registrations submitted by coordinators on behalf of peer mentors. It enforces role-based authorization to confirm the submitting user is a coordinator, then writes the activity record attributed to the nominated mentor.
proxy-report-service
Sources & reasoning
Line 84 directly states coordinators must register on behalf of peer mentors who cannot or will not use the app. The priority matrix at line 151 confirms SHOULD HAVE with Fase 2, which maps to v1.0 by the second-phase ordinal rule. Three of four organizations require this capability, validating high priority.
-
docs/source/likeperson.md · line 84Ikke alle likepersoner vil eller kan bruke appen. Koordinatorer må ha mulighet til å registrere aktivitet på vegne av sine likepersoner, enten enkeltvis eller samlet for faste aktiviteter
-
docs/source/likeperson.md · line 151Bulkregistrering / proxy-rapportering | ✓ | ✓ | - | ✓ | ✓ | SHOULD HAVE | 2
Responsibilities
- Authorize the requesting user as a coordinator with proxy-reporting permission
- Validate the activity payload against the same rules used in standard activity logging
- Persist the activity record attributed to the specified peer mentor, not the coordinator
- Return a structured result including the created activity ID and timestamp
- Expose the coordinator's accessible mentor roster for the selector widget
Interfaces
submitProxyActivity(coordinatorId: string, mentorId: string, activity: ActivityFormData): Promise<ActivityRecord>
getMentorsForCoordinator(coordinatorId: string): Promise<PeerMentor[]>
validateProxyPermission(coordinatorId: string, mentorId: string): Promise<boolean>
Related Data Entities (3)
Data entities managed by this component