Reject a Reimbursement Claim with Mandatory Rejection Reason
From the Reimbursement Detail Screen, the coordinator taps the Reject button. A mandatory comment field is presented — the action cannot be completed without a rejection reason. On confirmation, the Attestation Service invokes an authenticated Supabase RPC call appending an immutable rejection record with status 'rejected', the coordinator's ID, timestamp, and mandatory comment. The submitter receives a push notification including the rejection reason. The rejected submission moves out of the active pending queue. The peer mentor may correct and resubmit, which creates a new submission record entering the workflow fresh.
User Story
Acceptance Criteria
- Given I tap Reject on a pending submission, when the rejection dialog appears, then a comment field is shown and marked as required — the confirm button is disabled until at least one character is entered
- Given I complete the mandatory reason and confirm, when the RPC call succeeds, then an immutable rejection record is appended with status 'rejected', my identity, timestamp, and the full comment text
- Given rejection is confirmed, when the record is written, then the submission is removed from the active pending queue and the submitter receives a push notification containing the rejection reason
- Given the rejection RPC call fails, when the error is returned, then the submission remains in 'pending_attestation' status and the coordinator is prompted to retry — no partial rejection record is created
- Given a submission has been rejected, when I view its detail screen, then the rejection record is visible in the audit trail and no further Approve/Reject actions are available
Business Value
Rejections with reasons enable peer mentors to correct genuine errors (e.g., mileage exceeding plausible route, missing receipts) rather than abandoning their claims. Mandatory comments enforce coordinator accountability and provide the audit evidence needed to demonstrate that rejections were justified, protecting the organisation in any grant review.
Components
- Reimbursement Detail Screen ui
- Attestation Service service
- Approval Repository data
- Supabase Edge Function Runtime infrastructure