Remove Incorrectly Attached Receipt Before Submission
Each Receipt Thumbnail Widget exposes a delete affordance (e.g., a close button overlaid on the thumbnail). When the peer mentor taps it, the receipt record is removed from the receipts table and the associated file is deleted from Supabase Storage. The thumbnail is removed from the grid immediately for responsive feedback. This capability is available to peer mentors during their own expense registration flow, before the claim is submitted for approval.
User Story
Acceptance Criteria
- Given a receipt thumbnail is displayed, when the user taps the delete affordance on the thumbnail, then a confirmation prompt is shown to prevent accidental deletion
- Given the user confirms deletion, when the delete action completes, then the thumbnail is removed from the grid and the receipt record is deleted from the database
- Given the user dismisses the confirmation prompt without confirming, when the prompt closes, then the receipt remains attached and unchanged
- Given deletion removes all receipts from an expense item above the mandatory threshold, when deletion is confirmed, then the system indicates the receipt is still required for submission
Business Value
Allowing peer mentors to correct mistakes without restarting the entire expense registration reduces frustration and abandonment. Accidental wrong-image attachments are common on mobile devices; providing a clean correction path increases data quality in the receipts table and reduces coordinator approval rejections due to irrelevant images.
Components
- Receipt Thumbnail Widget ui
- Receipt Processing Service service
- Receipt Storage Repository data
- Image Storage Backend infrastructure