Edit Organizational Unit Information
From the Org Level Detail Screen, an Organization Administrator can tap the edit action to open an inline edit form for the selected unit. The editable fields include the unit name and any associated metadata. The parent type relationship cannot be changed via this form (that would require a structural move operation). The Org Structure Service validates the update, persists it through the repository, and the tree view refreshes to reflect the change. Write access is gated by the Supabase RLS policy.
User Story
Acceptance Criteria
- Given I am an Organization Administrator viewing a unit detail screen, when I tap the Edit button, then the name field becomes editable in-place
- Given I am editing a unit name, when I clear the name field and attempt to save, then validation prevents saving and shows a required field error
- Given I submit a valid name change, when the update completes, then the tree view and detail screen both reflect the new name immediately without a full page reload
- Given I am an Organization Administrator for Organization A, when I attempt to edit a unit belonging to Organization B, then the edit action is not available or returns a permission error
- Given the edit is successful, when I navigate back to the tree, then the updated unit name is shown at the correct position in the hierarchy
Business Value
Organization names change over time due to mergers, rebranding, or corrections. Providing a safe edit workflow ensures the system stays synchronized with official organizational records without disrupting child relationships or activity attribution history, maintaining data integrity for Bufdir reporting.
Components
- Org Level Detail Screen ui
- Org Structure Service service
- Org Structure Repository data
- Org Structure RLS Policy infrastructure