Bulk Register a Shared Activity for Multiple Peer Mentors in One Action
The coordinator opens the Bulk Registration Screen and is presented with a multi-select peer mentor picker filtered to their organizational scope. After selecting the relevant mentors, the coordinator fills in a shared activity template (type, date, duration, location, notes). On submission, the Bulk Registration Service invokes a Supabase RPC call wrapped in a database transaction applying all-or-nothing semantics. The delegation_grants table records the coordinator as the acting submitter for every generated activity record, preserving full auditability. The batch progress widget displays real-time per-mentor status so the coordinator knows immediately which submissions succeeded.
User Story
Acceptance Criteria
- Given the coordinator is authenticated with coordinator role, when they navigate to the Bulk Registration Screen, then the screen is accessible and the peer mentor selection widget renders a filterable list of all peer mentors in their scope
- Given multiple peer mentors are selected and a shared activity template is filled in, when the coordinator taps Submit, then the Bulk Registration Service issues a single Supabase RPC call inside a database transaction
- Given the batch is submitted, when all inserts succeed, then each peer mentor row shows a success state in the batch progress widget and a delegation_grants record is created linking the coordinator to each activity
- Given a shared activity template is submitted for N mentors, when the transaction completes successfully, then exactly N activity records exist in the database each owned by the respective peer mentor's user_id
- Given the coordinator has not selected at least one peer mentor, when they attempt to submit, then the form is invalid and submission is blocked with a clear validation message
Business Value
NHF and HLF explicitly requested bulk registration to handle recurring weekly activities attended by many participants. Without this capability, coordinators managing even a moderately sized peer mentor pool face hours of repetitive data entry per week. Bulk registration compresses this to a single multi-select + submit interaction, directly removing the primary coordinator pain point of unsustainable manual data aggregation. This is a prerequisite for coordinator adoption of the app over paper/Excel workflows.