MEDIUM story-document-attachments-for-activities-coordinator-006 8 pts
8
Story Points
Medium
Priority
Document Attachments for Activities
Feature

User Story

As a Coordinator
I want to queue document attachments locally when I have no internet connection and have them automatically uploaded when connectivity is restored
So that I can complete activity registration with attachments in remote or low-connectivity environments without losing my work

Acceptance Criteria

  • Given I am offline and attach a document to an activity, when I confirm the selection, then the file is stored locally and shown in the thumbnail grid with a 'Pending upload' indicator
  • Given there is a pending attachment queue, when the device regains internet connectivity, then all queued files are uploaded automatically in the background
  • Given background sync completes successfully, when all queued attachments are uploaded, then the 'Pending upload' indicators are replaced with normal thumbnails and a success notification is shown
  • Given the app is closed and reopened while offline, when the app launches, then any previously queued attachments are still present in the pending queue
  • Given a queued attachment fails to upload after reconnecting (e.g., server error), when the failure occurs, then the thumbnail remains in a 'Failed' state with a manual retry option
  • Given the offline attachment queue contains a file, when navigated with a screen reader, then the 'Pending upload' state is announced for each queued thumbnail

Business Value

Peer mentors visit participants in hospitals, rural communities, and private residences where internet access cannot be guaranteed. Requiring connectivity for attachment upload creates a hard blocker that either prevents activity registration entirely or forces peer mentors to return to the activity later — a significant friction point that drives underreporting. Offline queuing ensures 100% of activities can be documented at the time they occur, regardless of connectivity, which directly improves reporting completeness for Bufdir and organizational statistics.