HIGH story-contact-detail-management-coordinator-002 5 pts
5
Story Points
High
Priority
Contact Detail & Management
Feature

User Story

As a user
I want to edit a contact's information using a step-by-step form that validates each field before I proceed and clearly shows my progress through the edit flow
So that So that I can update contact records accurately without feeling overwhelmed by a long form, and so that invalid data is caught immediately rather than on submission

Acceptance Criteria

  • Given a user opens the edit contact screen, when the screen loads, then organisation-specific custom fields are fetched from Supabase and rendered with the correct input type (text, select, or date) within 2 seconds
  • Given a user enters an invalid value in a field (e.g., malformed phone number), when they attempt to advance to the next step, then an inline error message is shown on the invalid field and progression is blocked
  • Given a user partially completes the edit form and navigates away, when they return to the edit screen for the same contact, then their draft data is restored from local SQLite storage
  • Given a user completes all steps and submits the form, when the Contact Management Service persists the record, then a success confirmation is shown and the contact detail screen is refreshed
  • Given a coordinator edits a contact, when they modify a coordinator-only field, then the field is visible and editable; when a peer mentor edits the same contact, then that field is hidden based on RLS policy
  • Given any user is on the edit screen, when a screen reader is active, then each form field has a descriptive label and error messages are announced immediately

Business Value

Accurate, up-to-date contact records are foundational to the quality and continuity of peer mentor support. Without a reliable edit flow, outdated contact information (wrong phone numbers, incorrect health notes, missing custom fields) leads to failed contact attempts and degraded service quality. The step-by-step form design specifically addresses the cognitive accessibility requirement raised by NHF for users with stroke-related cognitive challenges, making the feature inclusive across the full user population.