Edit Contact Screen
Component Detail
User Interface
medium complexity
mobile
2
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Screen wrapping the Contact Form Widget in edit mode, handling optimistic updates and sync coordination. Edit access is gated by role — peer mentors can edit their own contacts while coordinators can edit any contact within their local association. Applies optimistic UI updates locally and syncs via the Sync Service.
edit-contact-screen
Responsibilities
- Gate edit access by user role via Role Guard Service
- Pre-populate Contact Form Widget with existing contact data
- Submit validated form data to Contact Service via PATCH /api/v1/contacts/:id
- Apply optimistic UI update and queue sync on network failure
Interfaces
loadContactForEdit(contactId: string)
submitContactUpdate(contactData: ContactFormData)
applyOptimisticUpdate(localData: ContactFormData)
rollbackOptimisticUpdate()
handleSaveSuccess(updatedContact: Contact)
handleSaveError(error: AppError)
navigateBack()
Relationships
Dependencies (2)
Components this component depends on