Batch-Save Complete Label Configuration in One Operation
When setting up a new organization or overhauling terminology after a rebranding, administrators need to update many label keys at once. The Labels Config Screen must support editing the complete set of configurable keys — role names, unit names, activity labels, report terminology — in a single form session. The Labels Repository's batch update capability writes all changes in one operation, ensuring consistency and preventing a partially-updated label set from being visible to users. The screen should indicate unsaved changes and confirm before discarding them if the user navigates away.
User Story
Acceptance Criteria
- Given an administrator is on the Labels Config screen, when they modify multiple label fields across different categories, then all changes are held in local form state until explicitly saved
- Given unsaved changes exist, when the administrator taps Save Configuration, then all modified labels are written to the org_labels table in a single batch operation
- Given a batch save completes successfully, when the Labels Service is queried, then it returns the newly saved values for all updated keys
- Given an administrator has unsaved changes and attempts to navigate away, when the navigation action is triggered, then a confirmation dialog warns about unsaved changes before proceeding
- Given a batch save fails due to a network or validation error, when the error occurs, then the form retains all entered values and displays an actionable error message without losing the administrator's input
Business Value
Organization setup is typically a one-time or infrequent task performed by a single administrator. Requiring individual saves per label would create an error-prone and tedious setup process, increasing time-to-launch for new clients. Batch saving ensures consistency and makes the configuration process efficient enough to complete in a single session.
Components
- Labels Config Screen ui
- Labels Repository data
- Labels Service service