Status
Partially built — the screen exists but has drifted from the current mockup. This is a targeted fix, not a rewrite.
What's already there
OrgDetailScreen.kt + OrgDetailViewModel.kt + OrgDetailUIState.kt + OrgDetailEvent.kt + preview + test at
edifikana/front-end/app/src/commonMain/.../features/settings/organizations/orgdetail/, registered as
SettingsDestination.OrganizationDetailDestination(orgId), reached from MyOrganizationsScreen.
It renders the org name + "Active" badge, an info card (role, members, joined), a "Transfer Ownership" row (Owner only,
navigates to #545), and a "Leave Organization" button (dialog handled by #544).
Gap vs. mockup (edifikana/mockups/organization-detail.html)
The mockup's info card has four rows: Your Role, Members, Properties, Joined. The built InfoCard
(OrgDetailScreen.kt) only has three — property count is missing: no field in OrgDetailUIState, not fetched in
OrgDetailViewModel.initialize().
This is a known, solved pattern elsewhere in the codebase: MyOrganizationsViewModel already computes a per-org
property count via PropertyManager.getPropertyList() grouped by organizationId (see
propertyCountsByOrg in MyOrganizationsViewModel.kt, used to render "Admin · 3 properties" on each org card).
OrgDetailViewModel.initialize() should do the equivalent for the single orgId it's loading.
Open question
No mockup currently shows an entry point into the new Organization Edit screen (#543). Decide where that action goes on
this screen (e.g. a top-bar edit icon, gated to ADMIN/OWNER to match the backend's hasRoleOrHigher(..., UserRole.ADMIN)
check) — this likely needs a mockup update done alongside #543, plus a SettingsDestination.OrganizationEditDestination
navigation call added here.
Acceptance criteria
Files
edifikana/front-end/app/src/commonMain/kotlin/com/cramsan/edifikana/client/lib/features/settings/organizations/orgdetail/{OrgDetailScreen,OrgDetailViewModel,OrgDetailUIState}.kt
edifikana/front-end/app/src/jvmTest/kotlin/com/cramsan/edifikana/client/lib/features/settings/organizations/orgdetail/OrgDetailViewModelTest.kt
- Reference pattern:
edifikana/front-end/app/src/commonMain/.../features/settings/organizations/myorganizations/MyOrganizationsViewModel.kt
Related
Parent: #392. Loosely coordinated with #543 (entry-point + mockup decision) — not a hard blocker, the property-count fix
is self-contained.
Status
Partially built — the screen exists but has drifted from the current mockup. This is a targeted fix, not a rewrite.
What's already there
OrgDetailScreen.kt+OrgDetailViewModel.kt+OrgDetailUIState.kt+OrgDetailEvent.kt+ preview + test atedifikana/front-end/app/src/commonMain/.../features/settings/organizations/orgdetail/, registered asSettingsDestination.OrganizationDetailDestination(orgId), reached fromMyOrganizationsScreen.It renders the org name + "Active" badge, an info card (role, members, joined), a "Transfer Ownership" row (Owner only,
navigates to #545), and a "Leave Organization" button (dialog handled by #544).
Gap vs. mockup (
edifikana/mockups/organization-detail.html)The mockup's info card has four rows: Your Role, Members, Properties, Joined. The built
InfoCard(
OrgDetailScreen.kt) only has three — property count is missing: no field inOrgDetailUIState, not fetched inOrgDetailViewModel.initialize().This is a known, solved pattern elsewhere in the codebase:
MyOrganizationsViewModelalready computes a per-orgproperty count via
PropertyManager.getPropertyList()grouped byorganizationId(seepropertyCountsByOrginMyOrganizationsViewModel.kt, used to render "Admin · 3 properties" on each org card).OrgDetailViewModel.initialize()should do the equivalent for the singleorgIdit's loading.Open question
No mockup currently shows an entry point into the new Organization Edit screen (#543). Decide where that action goes on
this screen (e.g. a top-bar edit icon, gated to ADMIN/OWNER to match the backend's
hasRoleOrHigher(..., UserRole.ADMIN)check) — this likely needs a mockup update done alongside #543, plus a
SettingsDestination.OrganizationEditDestinationnavigation call added here.
Acceptance criteria
OrgDetailUIStategains apropertyCount: IntfieldOrgDetailViewModel.initialize()fetches and populates it viaPropertyManager.getPropertyList()filtered toorgIdInfoCardrenders a "Properties" row between Members and Joined, matching the mockup's row orderOrgDetailViewModelTestcovers the new field (happy path + fetch failure)Files
edifikana/front-end/app/src/commonMain/kotlin/com/cramsan/edifikana/client/lib/features/settings/organizations/orgdetail/{OrgDetailScreen,OrgDetailViewModel,OrgDetailUIState}.ktedifikana/front-end/app/src/jvmTest/kotlin/com/cramsan/edifikana/client/lib/features/settings/organizations/orgdetail/OrgDetailViewModelTest.ktedifikana/front-end/app/src/commonMain/.../features/settings/organizations/myorganizations/MyOrganizationsViewModel.ktRelated
Parent: #392. Loosely coordinated with #543 (entry-point + mockup decision) — not a hard blocker, the property-count fix
is self-contained.