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}

} +
+ )) + )}