0.2.24: household-aware GP asset balances + show on Overview
Fixes a linked GP entity showing an empty Assets tab when its capital is
held under the linked account's other legal names (the eNAV often splits
one LLC across names).
- New GET /api/entities/{id}/asset-balances: household-aware, returns the
linked account's (and its linked names') capital balances per fund, plus
the linked account name for a clear empty state.
- Assets tab uses it; shows "linked to X but no balances on file" instead
of a blank table when the wrong account is linked.
- GP/mgmt Overview now surfaces the total linked balance across funds with
a "View by fund" link, so assets are visible without opening the tab.
Verified: 15/15 backend tests (incl. household case); frontend tsc + vite
build clean.
This commit is contained in:
@@ -225,6 +225,12 @@ export interface InvestorView {
|
||||
documents: PortalDocument[];
|
||||
}
|
||||
|
||||
export interface AssetBalances {
|
||||
linked_user_id: number | null;
|
||||
linked_name: string | null;
|
||||
balances: CapitalAccount[];
|
||||
}
|
||||
|
||||
// --- API helpers ---
|
||||
|
||||
export class ApiError extends Error {
|
||||
@@ -299,6 +305,10 @@ export const api = {
|
||||
deleteStake: (entityId: number, stakeId: number) =>
|
||||
request<{ status: string }>(`/api/entities/${entityId}/stakes/${stakeId}`, { method: "DELETE" }),
|
||||
|
||||
// A GP/mgmt entity's assets: its linked account's capital balances across the funds.
|
||||
entityAssetBalances: (entityId: number) =>
|
||||
request<AssetBalances>(`/api/entities/${entityId}/asset-balances`),
|
||||
|
||||
// Investor View (admin read-only reconstruction of an investor's portal)
|
||||
investorView: (userId: number) => request<InvestorView>(`/api/users/${userId}/investor-view`),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user