Bulk Registration Service
Component Detail
Service Layer
high complexity
mobilebackend
0
Dependencies
0
Dependents
5
Entities
0
Integrations
Description
Orchestrates all-or-nothing batch activity registration by invoking a Supabase RPC call wrapped in a database transaction. Accepts a list of mentor IDs and a shared activity template, produces individual activity records per mentor, and returns a per-row result map so the UI can surface granular success or failure states.
bulk-registration-service
Responsibilities
- Build individual activity payloads for each selected mentor from shared template
- Invoke Supabase batch insert RPC within a database transaction
- Return per-row success/failure results to BLoC for UI rendering
- Record delegation_grants entries for each submitted registration
Interfaces
submitBulkRegistration(mentorIds, activityTemplate)
buildActivityPayloads(mentorIds, template)
invokeBatchRPC(payloads)
parseRPCResult(rpcResponse)
retryFailedRow(mentorId, activityData)
Related Data Entities (5)
Data entities managed by this component