CRITICAL story-coordinator-activity-approval-coordinator-002 3 pts

User Story

As a Coordinator
I want to review the full details of a pending activity registration and approve it with a single action, triggering the appropriate downstream workflows
So that So that the registration is confirmed for Bufdir reporting and, where applicable, the reimbursement processing workflow is initiated without requiring additional manual steps

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.