MEDIUM story-document-attachments-for-activities-organization-admin-003 3 pts
3
Story Points
Medium
Priority
Document Attachments for Activities
Feature

User Story

As a Organization Administrator
I want to delete an incorrectly uploaded attachment or replace it with the correct file after an activity has been submitted
So that the activity record always contains accurate and relevant documentation without requiring coordinator intervention

Acceptance Criteria

  • Given I am viewing the thumbnail grid for an activity I submitted, when I long-press a thumbnail, then a context menu appears with a 'Remove Attachment' option
  • Given I select 'Remove Attachment', when the confirmation dialog appears, then I can confirm or cancel without accidental deletion
  • Given I confirm deletion, when the operation completes, then the thumbnail is removed from the grid and the file is deleted from Supabase Storage
  • Given I confirm deletion, when the operation fails due to a network error, then an accessible error message is shown and the thumbnail remains in the grid
  • Given the activity has been locked for coordinator review, when I attempt to delete an attachment, then a plain-language message explains editing is no longer available
  • Given I delete all attachments from an activity, when the last thumbnail is removed, then the attachment section disappears from the activity detail screen

Business Value

Allowing peer mentors to self-correct uploaded attachments reduces the volume of support requests escalated to coordinators and avoids delays in activity approval. Clean, accurate attachments improve the overall quality of Bufdir reporting data, reducing the risk of audit findings related to incomplete or incorrect documentation.