User Interface medium complexity mobile
0
Dependencies
0
Dependents
1
Entities
0
Integrations

Description

Provides a role-scoped form for editing contact fields, exposing limited fields to peer mentors and full access to coordinators. Applies edits optimistically to the local database and triggers sync via ContactUpdateService. Displays a corrective error message and rolls back fields on sync failure.

Feature: Contact Detail & Edit

contact-edit-form

Sources & reasoning

Architecture section (line 292) explicitly names contact detail and edit as MVP screens. The accessibility mandate (line 36) defines vertical scroll and back-button navigation as hard constraints for this screen. MVP scope narrative (line 320) confirms Phase 1 for contact management. All evidence places this feature at MVP; Phase 1 = MVP by ordinal mapping.

Responsibilities

  • Render editable fields filtered by the current user's role (peer mentor vs coordinator)
  • Submit changes optimistically and reflect updated values immediately in the UI
  • Receive and display corrective error messages when sync rollback occurs
  • Validate field inputs before committing to the local database
  • Coordinate with ContactUpdateService to persist and sync changes

Interfaces

submitEdit(contactId: string, fields: Partial<ContactProfile>): Promise<void>
rollbackFields(original: ContactProfile): void
getEditableFields(role: UserRole): FieldDefinition[]

Related Data Entities (1)

Data entities managed by this component