From 552dfcfc4e9e349980ed7ecc4cfdd97948307d95 Mon Sep 17 00:00:00 2001 From: renee-png Date: Thu, 18 Jun 2026 14:38:57 -0400 Subject: [PATCH] Unit ledger: list all active owners, not just the primary The Owner card on the unit account dashboard showed only the primary owner. List every active owner (primary first, tagged), with each owner's email and account number; label becomes 'Owners' when >1. Co-Authored-By: Claude Opus 4.8 --- .../unit-profile/UnitLedgerView.tsx | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/unit-profile/UnitLedgerView.tsx b/src/components/unit-profile/UnitLedgerView.tsx index 2789e40..7ec8dab 100644 --- a/src/components/unit-profile/UnitLedgerView.tsx +++ b/src/components/unit-profile/UnitLedgerView.tsx @@ -513,11 +513,27 @@ export default function UnitLedgerView({ unitId, associationId }: Props) {
-
-

Owner

-

{primaryOwner ? `${primaryOwner.first_name} ${primaryOwner.last_name}` : "Unassigned"}

- {primaryOwner?.email &&

{primaryOwner.email}

} - {primaryOwner?.account_number &&

Acc: {primaryOwner.account_number}

} +
+

{owners.length > 1 ? "Owners" : "Owner"}

+ {owners.length === 0 ? ( +

Unassigned

+ ) : ( + // List every active owner on the unit (primary first), not just the primary. + [...owners] + .sort((a, b) => (b.is_primary ? 1 : 0) - (a.is_primary ? 1 : 0)) + .map((o, i) => ( +
0 ? "mt-3 pt-3 border-t" : "mt-1"}> +

+ {o.first_name} {o.last_name} + {o.is_primary && owners.length > 1 && ( + Primary + )} +

+ {o.email &&

{o.email}

} + {o.account_number &&

Acc: {o.account_number}

} +
+ )) + )}