Approve Individual Activity Registration
When a coordinator opens a pending registration from the approval queue, they see the full record including activity type, date, duration, participants, submitter, and any attached receipts or documents. An 'Approve' action button transitions the registration from pending to approved status. The Activity Approval Service handles the state transition transactionally in Supabase — atomically updating the activity status and inserting an approval history record — and triggers downstream effects such as initiating the reimbursement workflow if an expense claim is attached. Duplicate flag suppression is also triggered on approval, preventing the same record from appearing as a duplicate warning in future queue checks.
User Story
Acceptance Criteria
- Given a coordinator opens a pending registration, when they tap 'Approve', then the activity status transitions to 'approved' atomically in Supabase and an approval history record is inserted in the same transaction
- Given the approved registration includes a travel expense claim, when approval is confirmed, then the reimbursement workflow is automatically initiated
- Given approval succeeds, when the state transition completes, then the registration is removed from the pending queue and the coordinator is returned to the queue with a success confirmation
- Given a network failure occurs during approval, when the transaction cannot complete, then no partial state changes are persisted and the coordinator is shown a retry prompt
- Given a registration has a duplicate flag, when it is approved, when the approval is saved, then the duplicate flag is suppressed for that record
Business Value
Individual approval is the foundational action of the coordinator workflow. Ensuring transactional consistency prevents partial approvals that corrupt Bufdir reporting data. Automatic triggering of downstream workflows (reimbursement, duplicate suppression) eliminates manual coordination steps that currently cause delays and errors when coordinators work with Word and Excel-based processes.