Register an Activity on Behalf of an Individual Peer Mentor with Full Wizard Fidelity
The coordinator navigates to the Proxy Registration Screen, which is a role-guarded route available only to coordinator and admin roles. They first select a single peer mentor from the peer mentor selection widget operating in single-select mode. The screen then renders the full activity wizard — identical in all steps to the peer mentor's own registration flow — but with the selected peer mentor's user_id as the subject of the activity record. The Activity Delegation Service enforces role-based authorization at the service layer before inserting the record. A delegation_grants row is written linking the coordinator (acting user) to the submitted activity, providing a complete audit trail.
User Story
Acceptance Criteria
- Given the coordinator is authenticated, when they navigate to the Proxy Registration Screen, then the screen renders the peer mentor selection widget in single-select mode before the wizard is shown
- Given a peer mentor is selected, when the coordinator proceeds, then the full activity wizard is displayed with all standard fields identical to the peer mentor's own flow
- Given the coordinator completes and submits the wizard, when the Activity Delegation Service processes the request, then the activity record is stored with the peer mentor's user_id as owner and a delegation_grants record links the coordinator's user_id as the acting submitter
- Given a user without coordinator or admin role attempts to access the proxy registration route, when the route guard evaluates permissions, then access is denied and the user is redirected to the no-access screen
- Given the coordinator submits a proxy registration, when the record is saved, then the Supabase RLS policy at the database layer also confirms the acting user has the coordinator role before allowing the insert on behalf of another user_id
Business Value
Not every peer mentor will adopt the app immediately. Without proxy registration the coordinator must maintain a parallel paper or Excel workflow for non-app mentors, which undermines the entire consolidation goal and risks coordinator rejection of the tool. This capability ensures coordinators can run the full reporting pipeline from within the app from day one of rollout, supporting the incremental parallel-systems transition strategy agreed upon by NHF and HLF.