Skip to content

[FEATURE] Organization Edit screen #543

Description

@CRamsan

Status

Not built. There is no orgedit-style feature directory anywhere in the repo, and no organization-edit.html mockup
either — this is genuinely new work, not a rename or relocation of anything existing.

What's already in place (reusable)

Backend + API contract are already done — nothing to build server-side.

  • OrganizationApi.updateOrganization (edifikana/api/src/commonMain/kotlin/com/cramsan/edifikana/api/OrganizationApi.kt:64)
    is a PUT operation, fully wired: OrganizationController.updateOrganization() (requires ADMIN role or higher via
    RBACService.hasRoleOrHigher) → OrganizationService.updateOrganization().

Front-end is the entire gap.

  • OrganizationService (client interface, edifikana/front-end/app/src/commonMain/.../service/OrganizationService.kt)
    and OrganizationServiceImpl only have getOrganization, getOrganizations, createOrganization — no
    updateOrganization.
  • OrganizationManager (managers/OrganizationManager.kt) is missing it too.
  • CreateNewOrgScreen / CreateNewOrgViewModel
    (features/auth/onboarding/createneworg/) is the closest existing pattern — same two fields (name, description),
    same validation shape (isButtonEnabled = name.isNotBlank()). Useful as a structural reference for the edit form,
    but it's a create flow (navigates deeper into the app on success); edit should navigate back to Organization Detail
    with the change reflected.

Scope

  1. Front-end service layer — add updateOrganization(id, name, description) to OrganizationService (interface +
    impl, calling OrganizationApi.updateOrganization) and to OrganizationManager.
  2. New screenOrganizationEditScreen.kt + OrganizationEditViewModel.kt + OrganizationEditUIState.kt +
    OrganizationEditEvent.kt + preview + jvmTest, at features/settings/organizations/orgedit/, following the
    standard 5-file feature pattern (see CLAUDE.md).
  3. Navigation — new SettingsDestination.OrganizationEditDestination(orgId), registered in SettingsActivity.kt.
  4. Mockup — none exists yet. Create organization-edit.html via /refine-mock before/alongside implementation,
    and add it to the Organization Management table in edifikana/index.md.
  5. Entry point — coordinate with [FEATURE] Organization Detail #542: Organization Detail needs a new "Edit" affordance (not present in its
    current mockup) that navigates here. Scope visibility to ADMIN/OWNER, matching the backend's RBAC check.

Acceptance criteria

  • Mockup created and linked from edifikana/index.md
  • OrganizationService / OrganizationManager expose updateOrganization
  • Edit screen pre-fills name/description from the current org, validates a non-blank name, calls update, and
    navigates back to Organization Detail on success with the change visible
  • Non-ADMIN/OWNER users cannot reach the screen (or the action is hidden/disabled), matching backend RBAC
  • Failure path shows an error and keeps the user on the screen
  • Entry point wired from Organization Detail ([FEATURE] Organization Detail #542)

Files

  • New: edifikana/front-end/app/src/commonMain/.../features/settings/organizations/orgedit/*
  • Edit: service/OrganizationService.kt, service/impl/OrganizationServiceImpl.kt, managers/OrganizationManager.kt,
    features/settings/SettingsDestination.kt, features/settings/SettingsActivity.kt
  • Reference: features/auth/onboarding/createneworg/*

Related

Parent: #392. Coordinate with #542 (entry point + possible mockup change on that screen).

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions