@burdenoff/microfe-brainyrich 2026.512.1 → 2026.705.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brainyrich/BrainyRichRoot.js +53 -88
- package/dist/brainyrich/BrainyRichRoot.js.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.js +15 -35
- package/dist/brainyrich/BrainyRichRoutes.js.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +543 -0
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -0
- package/dist/brainyrich/index.js +0 -1
- package/dist/brainyrich/pages/AccountsPage.js +690 -160
- package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
- package/dist/brainyrich/pages/AiAssistantPage.js +537 -363
- package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
- package/dist/brainyrich/pages/AnalyticsPage.js +587 -268
- package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
- package/dist/brainyrich/pages/DashboardPage.js +350 -232
- package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
- package/dist/brainyrich/pages/FamilyPage.js +550 -337
- package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
- package/dist/brainyrich/pages/GoalsPage.js +775 -142
- package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
- package/dist/brainyrich/pages/InvestmentsPage.js +410 -311
- package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.js +823 -154
- package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js +388 -251
- package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js +411 -196
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/pages/TaxPage.js +622 -221
- package/dist/brainyrich/pages/TaxPage.js.map +1 -1
- package/dist/brainyrich/pages/_shared.js +222 -41
- package/dist/brainyrich/pages/_shared.js.map +1 -1
- package/dist/index.js +2 -3
- package/package.json +1 -1
- package/dist/brainyrich/BrainyRichRoot.d.ts +0 -5
- package/dist/brainyrich/BrainyRichRoot.d.ts.map +0 -1
- package/dist/brainyrich/BrainyRichRoutes.d.ts +0 -2
- package/dist/brainyrich/BrainyRichRoutes.d.ts.map +0 -1
- package/dist/brainyrich/index.d.ts +0 -5
- package/dist/brainyrich/index.d.ts.map +0 -1
- package/dist/brainyrich/pages/AccountsPage.d.ts +0 -2
- package/dist/brainyrich/pages/AccountsPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/AdvisorsPage.d.ts +0 -2
- package/dist/brainyrich/pages/AdvisorsPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/AdvisorsPage.js +0 -375
- package/dist/brainyrich/pages/AdvisorsPage.js.map +0 -1
- package/dist/brainyrich/pages/AiAssistantPage.d.ts +0 -2
- package/dist/brainyrich/pages/AiAssistantPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/AnalyticsPage.d.ts +0 -2
- package/dist/brainyrich/pages/AnalyticsPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/AssistantPage.d.ts +0 -2
- package/dist/brainyrich/pages/AssistantPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/AssistantPage.js +0 -332
- package/dist/brainyrich/pages/AssistantPage.js.map +0 -1
- package/dist/brainyrich/pages/DashboardPage.d.ts +0 -2
- package/dist/brainyrich/pages/DashboardPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/EstatePage.d.ts +0 -2
- package/dist/brainyrich/pages/EstatePage.d.ts.map +0 -1
- package/dist/brainyrich/pages/EstatePage.js +0 -269
- package/dist/brainyrich/pages/EstatePage.js.map +0 -1
- package/dist/brainyrich/pages/FamilyPage.d.ts +0 -2
- package/dist/brainyrich/pages/FamilyPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/GoalsPage.d.ts +0 -2
- package/dist/brainyrich/pages/GoalsPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/InsurancePage.d.ts +0 -2
- package/dist/brainyrich/pages/InsurancePage.d.ts.map +0 -1
- package/dist/brainyrich/pages/InsurancePage.js +0 -181
- package/dist/brainyrich/pages/InsurancePage.js.map +0 -1
- package/dist/brainyrich/pages/InvestmentsPage.d.ts +0 -2
- package/dist/brainyrich/pages/InvestmentsPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/MarketplacePage.d.ts +0 -2
- package/dist/brainyrich/pages/MarketplacePage.d.ts.map +0 -1
- package/dist/brainyrich/pages/MarketplacePage.js +0 -450
- package/dist/brainyrich/pages/MarketplacePage.js.map +0 -1
- package/dist/brainyrich/pages/PortfoliosPage.d.ts +0 -2
- package/dist/brainyrich/pages/PortfoliosPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/ReportsPage.d.ts +0 -2
- package/dist/brainyrich/pages/ReportsPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/RiskPage.d.ts +0 -2
- package/dist/brainyrich/pages/RiskPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/TaxPage.d.ts +0 -2
- package/dist/brainyrich/pages/TaxPage.d.ts.map +0 -1
- package/dist/brainyrich/pages/_shared.d.ts +0 -21
- package/dist/brainyrich/pages/_shared.d.ts.map +0 -1
- package/dist/brainyrich/providers/BrainyRichProvider.d.ts +0 -6
- package/dist/brainyrich/providers/BrainyRichProvider.d.ts.map +0 -1
- package/dist/brainyrich/store/brainyrichStore.d.ts +0 -19
- package/dist/brainyrich/store/brainyrichStore.d.ts.map +0 -1
- package/dist/brainyrich/store/brainyrichStore.js +0 -272
- package/dist/brainyrich/store/brainyrichStore.js.map +0 -1
- package/dist/brainyrich/types/index.d.ts +0 -116
- package/dist/brainyrich/types/index.d.ts.map +0 -1
- package/dist/brainyrich/utils/cn.d.ts +0 -4
- package/dist/brainyrich/utils/cn.d.ts.map +0 -1
- package/dist/brainyrich/utils/i18n.d.ts +0 -6
- package/dist/brainyrich/utils/i18n.d.ts.map +0 -1
- package/dist/brainyrich/utils/navigation.d.ts +0 -2
- package/dist/brainyrich/utils/navigation.d.ts.map +0 -1
- package/dist/dev/main.d.ts +0 -2
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts +0 -2
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts +0 -18199
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts +0 -2
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts +0 -43046
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
|
@@ -1,358 +1,571 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { tWithFallback as e } from "../utils/i18n.js";
|
|
2
|
+
import { useAccounts as t, useArchiveHousehold as n, useCreateHousehold as r, useGoals as i, useHousehold as a, useHouseholds as o, usePortfolios as s, useUpdateHousehold as c } from "../hooks/useBrainyRichApi.js";
|
|
3
|
+
import { EmptyState as l, ErrorState as u, KpiGrid as d, LoadingState as f, SectionShell as p, formatDate as m, formatMoney as h, statusBadgeVariant as g } from "./_shared.js";
|
|
4
|
+
import { useMemo as _, useState as v } from "react";
|
|
5
|
+
import { Archive as y, Briefcase as b, Eye as ee, Mail as te, MoreHorizontal as ne, Pencil as x, Target as S, Users as C, Wallet as w } from "lucide-react";
|
|
6
|
+
import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
8
|
+
import { Badge as D, Button as O, Card as k, CardContent as A, Dialog as j, DialogClose as M, DialogContent as N, DialogDescription as P, DialogFooter as F, DialogHeader as I, DialogTitle as L, DropdownMenu as ie, DropdownMenuContent as ae, DropdownMenuItem as R, DropdownMenuSeparator as oe, DropdownMenuTrigger as se, Input as z, Label as B, Select as V, SelectContent as H, SelectItem as U, SelectTrigger as W, SelectValue as G, Sheet as K, SheetContent as ce, SheetDescription as le, SheetHeader as ue, SheetTitle as de, Table as fe, TableBody as pe, TableCell as q, TableHead as J, TableHeader as me, TableRow as Y, Textarea as he } from "@burdenoff/fe-libs/ui";
|
|
6
9
|
//#region src/brainyrich/pages/FamilyPage.tsx
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
title: "
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/* @__PURE__ */ u(S, {
|
|
118
|
-
value: "overview",
|
|
119
|
-
children: "Overview"
|
|
120
|
-
}),
|
|
121
|
-
/* @__PURE__ */ u(S, {
|
|
122
|
-
value: "members",
|
|
123
|
-
children: "Members"
|
|
10
|
+
var ge = [
|
|
11
|
+
"PROSPECT",
|
|
12
|
+
"ONBOARDING",
|
|
13
|
+
"ACTIVE",
|
|
14
|
+
"INACTIVE"
|
|
15
|
+
], _e = [
|
|
16
|
+
"CONSERVATIVE",
|
|
17
|
+
"MODERATE",
|
|
18
|
+
"BALANCED",
|
|
19
|
+
"GROWTH",
|
|
20
|
+
"AGGRESSIVE"
|
|
21
|
+
], ve = [
|
|
22
|
+
"USD",
|
|
23
|
+
"EUR",
|
|
24
|
+
"GBP",
|
|
25
|
+
"INR",
|
|
26
|
+
"AED",
|
|
27
|
+
"SGD"
|
|
28
|
+
], X = {
|
|
29
|
+
name: "",
|
|
30
|
+
status: "PROSPECT",
|
|
31
|
+
riskProfile: "BALANCED",
|
|
32
|
+
currency: "USD",
|
|
33
|
+
advisorId: "",
|
|
34
|
+
primaryContactName: "",
|
|
35
|
+
primaryContactEmail: "",
|
|
36
|
+
notes: "",
|
|
37
|
+
tags: ""
|
|
38
|
+
};
|
|
39
|
+
function Z(e) {
|
|
40
|
+
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
41
|
+
}
|
|
42
|
+
function ye() {
|
|
43
|
+
let { t } = re(), i = (n, r, i) => e(t, n, r, i), { data: a, isLoading: s, isError: m, refetch: b } = o(), S = r(), w = c(), j = n(), [M, N] = v(!1), [P, F] = v(null), [I, L] = v(X), [z, B] = v(void 0), V = (e, t) => L((n) => ({
|
|
44
|
+
...n,
|
|
45
|
+
[e]: t
|
|
46
|
+
})), H = () => {
|
|
47
|
+
F(null), L(X), N(!0);
|
|
48
|
+
}, U = (e) => {
|
|
49
|
+
F(e), L({
|
|
50
|
+
name: e.name,
|
|
51
|
+
status: e.status,
|
|
52
|
+
riskProfile: e.riskProfile,
|
|
53
|
+
currency: e.currency,
|
|
54
|
+
advisorId: e.advisorId ?? "",
|
|
55
|
+
primaryContactName: e.primaryContactName ?? "",
|
|
56
|
+
primaryContactEmail: e.primaryContactEmail ?? "",
|
|
57
|
+
notes: e.notes ?? "",
|
|
58
|
+
tags: e.tags.join(", ")
|
|
59
|
+
}), N(!0);
|
|
60
|
+
}, W = _(() => ({
|
|
61
|
+
total: a.length,
|
|
62
|
+
active: a.filter((e) => e.status === "ACTIVE").length,
|
|
63
|
+
pipeline: a.filter((e) => e.status === "PROSPECT" || e.status === "ONBOARDING").length,
|
|
64
|
+
aum: a.reduce((e, t) => e + (Number.isFinite(t.aum) ? t.aum : 0), 0),
|
|
65
|
+
currency: a[0]?.currency ?? "USD"
|
|
66
|
+
}), [a]), G = S.isPending || w.isPending, K = I.name.trim().length > 0 && !G;
|
|
67
|
+
return /* @__PURE__ */ E(p, {
|
|
68
|
+
title: i("brainyrich.households.title", "Households"),
|
|
69
|
+
description: i("brainyrich.households.description", "Client households and family units under advisement"),
|
|
70
|
+
badges: a.length ? [i("brainyrich.households.count", "{count} households", { count: a.length })] : [],
|
|
71
|
+
actionLabel: i("brainyrich.households.new", "New household"),
|
|
72
|
+
onAction: H,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ T(d, { items: [
|
|
75
|
+
{
|
|
76
|
+
label: i("brainyrich.households.kpi.total", "Households"),
|
|
77
|
+
value: String(W.total)
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: i("brainyrich.households.kpi.active", "Active"),
|
|
81
|
+
value: String(W.active)
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: i("brainyrich.households.kpi.pipeline", "In pipeline"),
|
|
85
|
+
value: String(W.pipeline),
|
|
86
|
+
trend: i("brainyrich.households.kpi.pipelineHint", "Prospect + onboarding")
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: i("brainyrich.households.kpi.aum", "Total AUM"),
|
|
90
|
+
value: h(W.aum, W.currency)
|
|
91
|
+
}
|
|
92
|
+
] }),
|
|
93
|
+
s ? /* @__PURE__ */ T(f, { rows: 5 }) : m ? /* @__PURE__ */ T(u, {
|
|
94
|
+
title: i("brainyrich.households.error.title", "Could not load households"),
|
|
95
|
+
onRetry: () => b()
|
|
96
|
+
}) : a.length === 0 ? /* @__PURE__ */ T(l, {
|
|
97
|
+
icon: /* @__PURE__ */ T(C, {
|
|
98
|
+
className: "size-6",
|
|
99
|
+
"aria-hidden": "true"
|
|
100
|
+
}),
|
|
101
|
+
title: i("brainyrich.households.empty.title", "No households yet"),
|
|
102
|
+
description: i("brainyrich.households.empty.description", "Create your first client household to start organizing accounts, portfolios and goals."),
|
|
103
|
+
action: /* @__PURE__ */ T(O, {
|
|
104
|
+
size: "sm",
|
|
105
|
+
onClick: H,
|
|
106
|
+
children: i("brainyrich.households.new", "New household")
|
|
107
|
+
})
|
|
108
|
+
}) : /* @__PURE__ */ T(k, { children: /* @__PURE__ */ T(A, {
|
|
109
|
+
className: "p-0",
|
|
110
|
+
children: /* @__PURE__ */ T("div", {
|
|
111
|
+
className: "overflow-x-auto",
|
|
112
|
+
children: /* @__PURE__ */ E(fe, { children: [/* @__PURE__ */ T(me, { children: /* @__PURE__ */ E(Y, { children: [
|
|
113
|
+
/* @__PURE__ */ T(J, { children: i("brainyrich.households.col.name", "Household") }),
|
|
114
|
+
/* @__PURE__ */ T(J, { children: i("brainyrich.households.col.status", "Status") }),
|
|
115
|
+
/* @__PURE__ */ T(J, { children: i("brainyrich.households.col.risk", "Risk profile") }),
|
|
116
|
+
/* @__PURE__ */ T(J, { children: i("brainyrich.households.col.contact", "Primary contact") }),
|
|
117
|
+
/* @__PURE__ */ T(J, {
|
|
118
|
+
className: "text-right",
|
|
119
|
+
children: i("brainyrich.households.col.aum", "AUM")
|
|
124
120
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
|
|
127
|
-
children: "
|
|
121
|
+
/* @__PURE__ */ T(J, {
|
|
122
|
+
className: "w-12 text-right",
|
|
123
|
+
children: /* @__PURE__ */ T("span", {
|
|
124
|
+
className: "sr-only",
|
|
125
|
+
children: i("brainyrich.households.col.actions", "Actions")
|
|
126
|
+
})
|
|
128
127
|
})
|
|
129
|
-
]
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
className: "
|
|
181
|
-
|
|
128
|
+
] }) }), /* @__PURE__ */ T(pe, { children: a.map((e) => /* @__PURE__ */ E(Y, { children: [
|
|
129
|
+
/* @__PURE__ */ E(q, { children: [/* @__PURE__ */ T("button", {
|
|
130
|
+
type: "button",
|
|
131
|
+
className: "text-left font-medium text-text-primary hover:underline",
|
|
132
|
+
onClick: () => B(e.id),
|
|
133
|
+
children: e.name
|
|
134
|
+
}), e.tags.length > 0 ? /* @__PURE__ */ T("div", {
|
|
135
|
+
className: "mt-1 flex flex-wrap gap-1",
|
|
136
|
+
children: e.tags.map((e) => /* @__PURE__ */ T(D, {
|
|
137
|
+
variant: "outline",
|
|
138
|
+
className: "text-xs",
|
|
139
|
+
children: e
|
|
140
|
+
}, e))
|
|
141
|
+
}) : null] }),
|
|
142
|
+
/* @__PURE__ */ T(q, { children: /* @__PURE__ */ T(D, {
|
|
143
|
+
variant: g(e.status),
|
|
144
|
+
children: e.status
|
|
145
|
+
}) }),
|
|
146
|
+
/* @__PURE__ */ T(q, { children: /* @__PURE__ */ T(D, {
|
|
147
|
+
variant: "secondary",
|
|
148
|
+
children: e.riskProfile
|
|
149
|
+
}) }),
|
|
150
|
+
/* @__PURE__ */ T(q, { children: e.primaryContactName ? /* @__PURE__ */ E("div", {
|
|
151
|
+
className: "space-y-0.5",
|
|
152
|
+
children: [/* @__PURE__ */ T("p", {
|
|
153
|
+
className: "text-sm text-text-primary",
|
|
154
|
+
children: e.primaryContactName
|
|
155
|
+
}), e.primaryContactEmail ? /* @__PURE__ */ E("p", {
|
|
156
|
+
className: "flex items-center gap-1 text-xs text-text-secondary",
|
|
157
|
+
children: [/* @__PURE__ */ T(te, {
|
|
158
|
+
className: "size-3",
|
|
159
|
+
"aria-hidden": "true"
|
|
160
|
+
}), e.primaryContactEmail]
|
|
161
|
+
}) : null]
|
|
162
|
+
}) : /* @__PURE__ */ T("span", {
|
|
163
|
+
className: "text-sm text-text-muted",
|
|
164
|
+
children: "—"
|
|
165
|
+
}) }),
|
|
166
|
+
/* @__PURE__ */ T(q, {
|
|
167
|
+
className: "text-right font-medium text-text-primary",
|
|
168
|
+
children: h(e.aum, e.currency)
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ T(q, {
|
|
171
|
+
className: "text-right",
|
|
172
|
+
children: /* @__PURE__ */ E(ie, { children: [/* @__PURE__ */ T(se, {
|
|
173
|
+
asChild: !0,
|
|
174
|
+
children: /* @__PURE__ */ T(O, {
|
|
175
|
+
variant: "ghost",
|
|
176
|
+
size: "icon",
|
|
177
|
+
"aria-label": i("brainyrich.households.rowMenu", "Household actions"),
|
|
178
|
+
children: /* @__PURE__ */ T(ne, {
|
|
179
|
+
className: "size-4",
|
|
180
|
+
"aria-hidden": "true"
|
|
182
181
|
})
|
|
183
|
-
]
|
|
184
|
-
}, t))
|
|
185
|
-
})] }), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(_, { children: /* @__PURE__ */ d(v, {
|
|
186
|
-
className: "flex items-center gap-2 text-base",
|
|
187
|
-
children: [/* @__PURE__ */ u(s, { className: "h-4 w-4" }), "Goal Progress Summary"]
|
|
188
|
-
}) }), /* @__PURE__ */ u(h, {
|
|
189
|
-
className: "space-y-3",
|
|
190
|
-
children: w.map((e) => {
|
|
191
|
-
let t = Math.round(e.current / e.target * 100);
|
|
192
|
-
return /* @__PURE__ */ d("div", {
|
|
193
|
-
className: "space-y-1",
|
|
194
|
-
children: [
|
|
195
|
-
/* @__PURE__ */ d("div", {
|
|
196
|
-
className: "flex justify-between text-sm",
|
|
197
|
-
children: [/* @__PURE__ */ u("span", {
|
|
198
|
-
className: "font-medium",
|
|
199
|
-
children: e.title
|
|
200
|
-
}), /* @__PURE__ */ d("span", { children: [t, "%"] })]
|
|
201
|
-
}),
|
|
202
|
-
/* @__PURE__ */ u("div", {
|
|
203
|
-
className: "h-2 rounded bg-muted overflow-hidden",
|
|
204
|
-
children: /* @__PURE__ */ u("div", {
|
|
205
|
-
className: `h-2 rounded ${e.status === "On Track" ? "bg-emerald-500" : "bg-yellow-500"}`,
|
|
206
|
-
style: { width: `${t}%` }
|
|
207
|
-
})
|
|
208
|
-
}),
|
|
209
|
-
/* @__PURE__ */ d("div", {
|
|
210
|
-
className: "flex justify-between text-xs text-muted-foreground",
|
|
211
|
-
children: [/* @__PURE__ */ u("span", { children: r(e.current) }), /* @__PURE__ */ u("span", { children: r(e.target) })]
|
|
212
|
-
})
|
|
213
|
-
]
|
|
214
|
-
}, e.id);
|
|
215
|
-
})
|
|
216
|
-
})] })]
|
|
217
|
-
}), /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ u(_, { children: /* @__PURE__ */ u(v, { children: "Family Financial Health" }) }), /* @__PURE__ */ u(h, { children: /* @__PURE__ */ u("div", {
|
|
218
|
-
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
219
|
-
children: [
|
|
220
|
-
{
|
|
221
|
-
icon: a,
|
|
222
|
-
label: "Emergency Fund",
|
|
223
|
-
detail: "90% funded",
|
|
224
|
-
color: "bg-emerald-50 text-emerald-600"
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
icon: c,
|
|
228
|
-
label: "Savings Rate",
|
|
229
|
-
detail: "24% monthly",
|
|
230
|
-
color: "bg-blue-50 text-blue-600"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
icon: i,
|
|
234
|
-
label: "Insurance Review",
|
|
235
|
-
detail: "Due for update",
|
|
236
|
-
color: "bg-yellow-50 text-yellow-600"
|
|
237
|
-
}
|
|
238
|
-
].map((e) => /* @__PURE__ */ d("div", {
|
|
239
|
-
className: `text-center p-4 rounded-lg ${e.color.split(" ")[0]}`,
|
|
240
|
-
children: [
|
|
241
|
-
/* @__PURE__ */ u(e.icon, { className: `h-7 w-7 mx-auto mb-2 ${e.color.split(" ")[1]}` }),
|
|
242
|
-
/* @__PURE__ */ u("p", {
|
|
243
|
-
className: "font-semibold text-sm",
|
|
244
|
-
children: e.label
|
|
245
|
-
}),
|
|
246
|
-
/* @__PURE__ */ u("p", {
|
|
247
|
-
className: "text-xs text-muted-foreground",
|
|
248
|
-
children: e.detail
|
|
249
182
|
})
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}) })] })]
|
|
253
|
-
}),
|
|
254
|
-
/* @__PURE__ */ u(b, {
|
|
255
|
-
value: "members",
|
|
256
|
-
className: "space-y-4",
|
|
257
|
-
children: /* @__PURE__ */ d(m, { children: [/* @__PURE__ */ d(_, {
|
|
258
|
-
className: "flex flex-row items-center justify-between",
|
|
259
|
-
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u(v, { children: "Family Members" }), /* @__PURE__ */ u(g, { children: "Manage access and permissions" })] }), /* @__PURE__ */ d(p, {
|
|
260
|
-
size: "sm",
|
|
261
|
-
children: [/* @__PURE__ */ u(l, { className: "mr-1 h-4 w-4" }), "Invite"]
|
|
262
|
-
})]
|
|
263
|
-
}), /* @__PURE__ */ u(h, {
|
|
264
|
-
className: "space-y-3",
|
|
265
|
-
children: C.map((e) => /* @__PURE__ */ d("div", {
|
|
266
|
-
className: "flex items-center justify-between rounded-lg border p-3",
|
|
267
|
-
children: [/* @__PURE__ */ d("div", {
|
|
268
|
-
className: "flex items-center gap-3",
|
|
269
|
-
children: [/* @__PURE__ */ u("div", {
|
|
270
|
-
className: "flex h-10 w-10 items-center justify-center rounded-full bg-blue-100 font-bold text-sm text-blue-600",
|
|
271
|
-
children: e.name.split(" ").map((e) => e[0]).join("")
|
|
272
|
-
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
|
|
273
|
-
className: "font-medium text-sm",
|
|
274
|
-
children: e.name
|
|
275
|
-
}), /* @__PURE__ */ d("p", {
|
|
276
|
-
className: "text-xs text-muted-foreground",
|
|
277
|
-
children: [
|
|
278
|
-
e.role,
|
|
279
|
-
" · ",
|
|
280
|
-
e.permissions
|
|
281
|
-
]
|
|
282
|
-
})] })]
|
|
283
|
-
}), /* @__PURE__ */ d("div", {
|
|
284
|
-
className: "flex items-center gap-2",
|
|
183
|
+
}), /* @__PURE__ */ E(ae, {
|
|
184
|
+
align: "end",
|
|
285
185
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
|
|
288
|
-
children:
|
|
186
|
+
/* @__PURE__ */ E(R, {
|
|
187
|
+
onClick: () => B(e.id),
|
|
188
|
+
children: [/* @__PURE__ */ T(ee, {
|
|
189
|
+
className: "size-4",
|
|
190
|
+
"aria-hidden": "true"
|
|
191
|
+
}), i("brainyrich.households.action.view", "View details")]
|
|
289
192
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
|
|
292
|
-
children:
|
|
193
|
+
/* @__PURE__ */ E(R, {
|
|
194
|
+
onClick: () => U(e),
|
|
195
|
+
children: [/* @__PURE__ */ T(x, {
|
|
196
|
+
className: "size-4",
|
|
197
|
+
"aria-hidden": "true"
|
|
198
|
+
}), i("brainyrich.households.action.edit", "Edit")]
|
|
293
199
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
200
|
+
/* @__PURE__ */ T(oe, {}),
|
|
201
|
+
/* @__PURE__ */ E(R, {
|
|
202
|
+
className: "text-status-error-text focus:text-status-error-text",
|
|
203
|
+
disabled: j.isPending,
|
|
204
|
+
onClick: () => j.mutate(e.id),
|
|
205
|
+
children: [/* @__PURE__ */ T(y, {
|
|
206
|
+
className: "size-4",
|
|
207
|
+
"aria-hidden": "true"
|
|
208
|
+
}), i("brainyrich.households.action.archive", "Archive")]
|
|
298
209
|
})
|
|
299
210
|
]
|
|
211
|
+
})] })
|
|
212
|
+
})
|
|
213
|
+
] }, e.id)) })] })
|
|
214
|
+
})
|
|
215
|
+
}) }),
|
|
216
|
+
/* @__PURE__ */ T(be, {
|
|
217
|
+
open: M,
|
|
218
|
+
onOpenChange: N,
|
|
219
|
+
editing: P,
|
|
220
|
+
form: I,
|
|
221
|
+
setField: V,
|
|
222
|
+
onSubmit: () => {
|
|
223
|
+
if (K) if (P) {
|
|
224
|
+
let e = {
|
|
225
|
+
name: I.name.trim(),
|
|
226
|
+
status: I.status,
|
|
227
|
+
riskProfile: I.riskProfile,
|
|
228
|
+
currency: I.currency,
|
|
229
|
+
primaryContactName: I.primaryContactName.trim() || null,
|
|
230
|
+
primaryContactEmail: I.primaryContactEmail.trim() || null,
|
|
231
|
+
notes: I.notes.trim() || null,
|
|
232
|
+
tags: Z(I.tags)
|
|
233
|
+
};
|
|
234
|
+
w.mutate({
|
|
235
|
+
id: P.id,
|
|
236
|
+
input: e
|
|
237
|
+
}, { onSuccess: () => N(!1) });
|
|
238
|
+
} else {
|
|
239
|
+
let e = {
|
|
240
|
+
name: I.name.trim(),
|
|
241
|
+
status: I.status,
|
|
242
|
+
riskProfile: I.riskProfile,
|
|
243
|
+
currency: I.currency,
|
|
244
|
+
primaryContactName: I.primaryContactName.trim() || null,
|
|
245
|
+
primaryContactEmail: I.primaryContactEmail.trim() || null,
|
|
246
|
+
notes: I.notes.trim() || null,
|
|
247
|
+
tags: Z(I.tags)
|
|
248
|
+
};
|
|
249
|
+
I.advisorId.trim() && (e.advisorId = I.advisorId.trim()), S.mutate(e, { onSuccess: () => N(!1) });
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
canSubmit: K,
|
|
253
|
+
submitting: G,
|
|
254
|
+
tr: i
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ T(xe, {
|
|
257
|
+
householdId: z,
|
|
258
|
+
onClose: () => B(void 0),
|
|
259
|
+
onEdit: (e) => {
|
|
260
|
+
B(void 0), U(e);
|
|
261
|
+
},
|
|
262
|
+
tr: i
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
function be({ open: e, onOpenChange: t, editing: n, form: r, setField: i, onSubmit: a, canSubmit: o, submitting: s, tr: c }) {
|
|
268
|
+
return /* @__PURE__ */ T(j, {
|
|
269
|
+
open: e,
|
|
270
|
+
onOpenChange: t,
|
|
271
|
+
children: /* @__PURE__ */ E(N, {
|
|
272
|
+
className: "max-h-[90vh] overflow-y-auto sm:max-w-lg",
|
|
273
|
+
children: [/* @__PURE__ */ E(I, { children: [/* @__PURE__ */ T(L, { children: n ? c("brainyrich.households.form.editTitle", "Edit household") : c("brainyrich.households.form.createTitle", "New household") }), /* @__PURE__ */ T(P, { children: c("brainyrich.households.form.subtitle", "A household groups a client family’s accounts, portfolios and goals.") })] }), /* @__PURE__ */ E("form", {
|
|
274
|
+
className: "space-y-4",
|
|
275
|
+
onSubmit: (e) => {
|
|
276
|
+
e.preventDefault(), a();
|
|
277
|
+
},
|
|
278
|
+
children: [
|
|
279
|
+
/* @__PURE__ */ E("div", {
|
|
280
|
+
className: "space-y-2",
|
|
281
|
+
children: [/* @__PURE__ */ E(B, {
|
|
282
|
+
htmlFor: "hh-name",
|
|
283
|
+
children: [c("brainyrich.households.form.name", "Name"), " *"]
|
|
284
|
+
}), /* @__PURE__ */ T(z, {
|
|
285
|
+
id: "hh-name",
|
|
286
|
+
value: r.name,
|
|
287
|
+
onChange: (e) => i("name", e.target.value),
|
|
288
|
+
placeholder: c("brainyrich.households.form.namePh", "e.g. The Raghavan Family"),
|
|
289
|
+
required: !0
|
|
290
|
+
})]
|
|
291
|
+
}),
|
|
292
|
+
/* @__PURE__ */ E("div", {
|
|
293
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
294
|
+
children: [/* @__PURE__ */ E("div", {
|
|
295
|
+
className: "space-y-2",
|
|
296
|
+
children: [/* @__PURE__ */ T(B, { children: c("brainyrich.households.form.status", "Status") }), /* @__PURE__ */ E(V, {
|
|
297
|
+
value: r.status,
|
|
298
|
+
onValueChange: (e) => i("status", e),
|
|
299
|
+
children: [/* @__PURE__ */ T(W, { children: /* @__PURE__ */ T(G, {}) }), /* @__PURE__ */ T(H, { children: ge.map((e) => /* @__PURE__ */ T(U, {
|
|
300
|
+
value: e,
|
|
301
|
+
children: e
|
|
302
|
+
}, e)) })]
|
|
303
|
+
})]
|
|
304
|
+
}), /* @__PURE__ */ E("div", {
|
|
305
|
+
className: "space-y-2",
|
|
306
|
+
children: [/* @__PURE__ */ T(B, { children: c("brainyrich.households.form.risk", "Risk profile") }), /* @__PURE__ */ E(V, {
|
|
307
|
+
value: r.riskProfile,
|
|
308
|
+
onValueChange: (e) => i("riskProfile", e),
|
|
309
|
+
children: [/* @__PURE__ */ T(W, { children: /* @__PURE__ */ T(G, {}) }), /* @__PURE__ */ T(H, { children: _e.map((e) => /* @__PURE__ */ T(U, {
|
|
310
|
+
value: e,
|
|
311
|
+
children: e
|
|
312
|
+
}, e)) })]
|
|
313
|
+
})]
|
|
314
|
+
})]
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ E("div", {
|
|
317
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
318
|
+
children: [/* @__PURE__ */ E("div", {
|
|
319
|
+
className: "space-y-2",
|
|
320
|
+
children: [/* @__PURE__ */ T(B, {
|
|
321
|
+
htmlFor: "hh-contact-name",
|
|
322
|
+
children: c("brainyrich.households.form.contactName", "Primary contact")
|
|
323
|
+
}), /* @__PURE__ */ T(z, {
|
|
324
|
+
id: "hh-contact-name",
|
|
325
|
+
value: r.primaryContactName,
|
|
326
|
+
onChange: (e) => i("primaryContactName", e.target.value),
|
|
327
|
+
placeholder: c("brainyrich.households.form.contactNamePh", "Full name")
|
|
328
|
+
})]
|
|
329
|
+
}), /* @__PURE__ */ E("div", {
|
|
330
|
+
className: "space-y-2",
|
|
331
|
+
children: [/* @__PURE__ */ T(B, {
|
|
332
|
+
htmlFor: "hh-contact-email",
|
|
333
|
+
children: c("brainyrich.households.form.contactEmail", "Contact email")
|
|
334
|
+
}), /* @__PURE__ */ T(z, {
|
|
335
|
+
id: "hh-contact-email",
|
|
336
|
+
type: "email",
|
|
337
|
+
value: r.primaryContactEmail,
|
|
338
|
+
onChange: (e) => i("primaryContactEmail", e.target.value),
|
|
339
|
+
placeholder: "name@example.com"
|
|
300
340
|
})]
|
|
301
|
-
}
|
|
341
|
+
})]
|
|
342
|
+
}),
|
|
343
|
+
/* @__PURE__ */ E("div", {
|
|
344
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
345
|
+
children: [/* @__PURE__ */ E("div", {
|
|
346
|
+
className: "space-y-2",
|
|
347
|
+
children: [/* @__PURE__ */ T(B, { children: c("brainyrich.households.form.currency", "Currency") }), /* @__PURE__ */ E(V, {
|
|
348
|
+
value: r.currency,
|
|
349
|
+
onValueChange: (e) => i("currency", e),
|
|
350
|
+
children: [/* @__PURE__ */ T(W, { children: /* @__PURE__ */ T(G, {}) }), /* @__PURE__ */ T(H, { children: ve.map((e) => /* @__PURE__ */ T(U, {
|
|
351
|
+
value: e,
|
|
352
|
+
children: e
|
|
353
|
+
}, e)) })]
|
|
354
|
+
})]
|
|
355
|
+
}), n ? null : /* @__PURE__ */ E("div", {
|
|
356
|
+
className: "space-y-2",
|
|
357
|
+
children: [/* @__PURE__ */ T(B, {
|
|
358
|
+
htmlFor: "hh-advisor",
|
|
359
|
+
children: c("brainyrich.households.form.advisor", "Advisor ID")
|
|
360
|
+
}), /* @__PURE__ */ T(z, {
|
|
361
|
+
id: "hh-advisor",
|
|
362
|
+
value: r.advisorId,
|
|
363
|
+
onChange: (e) => i("advisorId", e.target.value),
|
|
364
|
+
placeholder: c("brainyrich.households.form.advisorPh", "Optional")
|
|
365
|
+
})]
|
|
366
|
+
})]
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ E("div", {
|
|
369
|
+
className: "space-y-2",
|
|
370
|
+
children: [/* @__PURE__ */ T(B, {
|
|
371
|
+
htmlFor: "hh-tags",
|
|
372
|
+
children: c("brainyrich.households.form.tags", "Tags")
|
|
373
|
+
}), /* @__PURE__ */ T(z, {
|
|
374
|
+
id: "hh-tags",
|
|
375
|
+
value: r.tags,
|
|
376
|
+
onChange: (e) => i("tags", e.target.value),
|
|
377
|
+
placeholder: c("brainyrich.households.form.tagsPh", "Comma-separated")
|
|
378
|
+
})]
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ E("div", {
|
|
381
|
+
className: "space-y-2",
|
|
382
|
+
children: [/* @__PURE__ */ T(B, {
|
|
383
|
+
htmlFor: "hh-notes",
|
|
384
|
+
children: c("brainyrich.households.form.notes", "Notes")
|
|
385
|
+
}), /* @__PURE__ */ T(he, {
|
|
386
|
+
id: "hh-notes",
|
|
387
|
+
value: r.notes,
|
|
388
|
+
onChange: (e) => i("notes", e.target.value),
|
|
389
|
+
rows: 3
|
|
390
|
+
})]
|
|
391
|
+
}),
|
|
392
|
+
/* @__PURE__ */ E(F, { children: [/* @__PURE__ */ T(M, {
|
|
393
|
+
asChild: !0,
|
|
394
|
+
children: /* @__PURE__ */ T(O, {
|
|
395
|
+
type: "button",
|
|
396
|
+
variant: "outline",
|
|
397
|
+
children: c("brainyrich.common.cancel", "Cancel")
|
|
398
|
+
})
|
|
399
|
+
}), /* @__PURE__ */ T(O, {
|
|
400
|
+
type: "submit",
|
|
401
|
+
disabled: !o,
|
|
402
|
+
children: s ? c("brainyrich.common.saving", "Saving…") : n ? c("brainyrich.common.save", "Save changes") : c("brainyrich.households.form.create", "Create household")
|
|
302
403
|
})] })
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
404
|
+
]
|
|
405
|
+
})]
|
|
406
|
+
})
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
function xe({ householdId: e, onClose: n, onEdit: r, tr: o }) {
|
|
410
|
+
let { data: c, isLoading: d, isError: p, refetch: _ } = a(e), { data: v } = t(e ? { householdId: e } : {}), { data: y } = s(e ? { householdId: e } : {}), { data: ee } = i(e ? { householdId: e } : {});
|
|
411
|
+
return /* @__PURE__ */ T(K, {
|
|
412
|
+
open: !!e,
|
|
413
|
+
onOpenChange: (e) => e ? void 0 : n(),
|
|
414
|
+
children: /* @__PURE__ */ T(ce, {
|
|
415
|
+
className: "w-full overflow-y-auto sm:max-w-md",
|
|
416
|
+
children: d ? /* @__PURE__ */ T("div", {
|
|
417
|
+
className: "p-2",
|
|
418
|
+
children: /* @__PURE__ */ T(f, { rows: 4 })
|
|
419
|
+
}) : p ? /* @__PURE__ */ T(u, {
|
|
420
|
+
title: o("brainyrich.households.detail.error", "Could not load household"),
|
|
421
|
+
onRetry: () => _()
|
|
422
|
+
}) : c ? /* @__PURE__ */ E("div", {
|
|
423
|
+
className: "space-y-6",
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ E(ue, {
|
|
426
|
+
className: "space-y-2",
|
|
427
|
+
children: [
|
|
428
|
+
/* @__PURE__ */ T(de, { children: c.name }),
|
|
429
|
+
/* @__PURE__ */ T(le, { children: o("brainyrich.households.detail.subtitle", "Household overview") }),
|
|
430
|
+
/* @__PURE__ */ E("div", {
|
|
431
|
+
className: "flex flex-wrap items-center gap-2 pt-1",
|
|
432
|
+
children: [/* @__PURE__ */ T(D, {
|
|
433
|
+
variant: g(c.status),
|
|
434
|
+
children: c.status
|
|
435
|
+
}), /* @__PURE__ */ T(D, {
|
|
436
|
+
variant: "secondary",
|
|
437
|
+
children: c.riskProfile
|
|
438
|
+
})]
|
|
439
|
+
})
|
|
440
|
+
]
|
|
441
|
+
}),
|
|
442
|
+
/* @__PURE__ */ E("div", {
|
|
443
|
+
className: "grid grid-cols-3 gap-3",
|
|
444
|
+
children: [
|
|
445
|
+
/* @__PURE__ */ T(Q, {
|
|
446
|
+
icon: /* @__PURE__ */ T(w, {
|
|
447
|
+
className: "size-4",
|
|
448
|
+
"aria-hidden": "true"
|
|
328
449
|
}),
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
450
|
+
label: o("brainyrich.households.detail.accounts", "Accounts"),
|
|
451
|
+
value: String(v.length)
|
|
452
|
+
}),
|
|
453
|
+
/* @__PURE__ */ T(Q, {
|
|
454
|
+
icon: /* @__PURE__ */ T(b, {
|
|
455
|
+
className: "size-4",
|
|
456
|
+
"aria-hidden": "true"
|
|
335
457
|
}),
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
458
|
+
label: o("brainyrich.households.detail.portfolios", "Portfolios"),
|
|
459
|
+
value: String(y.length)
|
|
460
|
+
}),
|
|
461
|
+
/* @__PURE__ */ T(Q, {
|
|
462
|
+
icon: /* @__PURE__ */ T(S, {
|
|
463
|
+
className: "size-4",
|
|
464
|
+
"aria-hidden": "true"
|
|
465
|
+
}),
|
|
466
|
+
label: o("brainyrich.households.detail.goals", "Goals"),
|
|
467
|
+
value: String(ee.length)
|
|
468
|
+
})
|
|
469
|
+
]
|
|
470
|
+
}),
|
|
471
|
+
/* @__PURE__ */ T(k, { children: /* @__PURE__ */ E(A, {
|
|
472
|
+
className: "space-y-3 p-4 text-sm",
|
|
473
|
+
children: [
|
|
474
|
+
/* @__PURE__ */ T($, {
|
|
475
|
+
label: o("brainyrich.households.detail.aum", "AUM"),
|
|
476
|
+
value: h(c.aum, c.currency)
|
|
477
|
+
}),
|
|
478
|
+
/* @__PURE__ */ T($, {
|
|
479
|
+
label: o("brainyrich.households.form.currency", "Currency"),
|
|
480
|
+
value: c.currency
|
|
481
|
+
}),
|
|
482
|
+
/* @__PURE__ */ T($, {
|
|
483
|
+
label: o("brainyrich.households.detail.contact", "Primary contact"),
|
|
484
|
+
value: c.primaryContactName ?? "—"
|
|
485
|
+
}),
|
|
486
|
+
/* @__PURE__ */ T($, {
|
|
487
|
+
label: o("brainyrich.households.form.contactEmail", "Contact email"),
|
|
488
|
+
value: c.primaryContactEmail ?? "—"
|
|
489
|
+
}),
|
|
490
|
+
/* @__PURE__ */ T($, {
|
|
491
|
+
label: o("brainyrich.households.detail.created", "Created"),
|
|
492
|
+
value: m(c.createdAt)
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ T($, {
|
|
495
|
+
label: o("brainyrich.households.detail.updated", "Last updated"),
|
|
496
|
+
value: m(c.updatedAt)
|
|
497
|
+
})
|
|
498
|
+
]
|
|
499
|
+
}) }),
|
|
500
|
+
c.tags.length > 0 ? /* @__PURE__ */ T("div", {
|
|
501
|
+
className: "flex flex-wrap gap-1",
|
|
502
|
+
children: c.tags.map((e) => /* @__PURE__ */ T(D, {
|
|
503
|
+
variant: "outline",
|
|
504
|
+
children: e
|
|
505
|
+
}, e))
|
|
506
|
+
}) : null,
|
|
507
|
+
c.notes ? /* @__PURE__ */ E("div", {
|
|
508
|
+
className: "space-y-1",
|
|
509
|
+
children: [/* @__PURE__ */ T("p", {
|
|
510
|
+
className: "text-xs font-medium text-text-secondary",
|
|
511
|
+
children: o("brainyrich.households.form.notes", "Notes")
|
|
512
|
+
}), /* @__PURE__ */ T("p", {
|
|
513
|
+
className: "text-sm text-text-primary",
|
|
514
|
+
children: c.notes
|
|
515
|
+
})]
|
|
516
|
+
}) : null,
|
|
517
|
+
/* @__PURE__ */ E(O, {
|
|
518
|
+
variant: "outline",
|
|
519
|
+
className: "w-full",
|
|
520
|
+
onClick: () => r(c),
|
|
521
|
+
children: [/* @__PURE__ */ T(x, {
|
|
522
|
+
className: "size-4",
|
|
523
|
+
"aria-hidden": "true"
|
|
524
|
+
}), o("brainyrich.households.action.edit", "Edit")]
|
|
349
525
|
})
|
|
350
|
-
|
|
351
|
-
|
|
526
|
+
]
|
|
527
|
+
}) : /* @__PURE__ */ T(l, {
|
|
528
|
+
icon: /* @__PURE__ */ T(C, {
|
|
529
|
+
className: "size-6",
|
|
530
|
+
"aria-hidden": "true"
|
|
531
|
+
}),
|
|
532
|
+
title: o("brainyrich.households.detail.missing", "Household not found")
|
|
533
|
+
})
|
|
534
|
+
})
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
function Q({ icon: e, label: t, value: n }) {
|
|
538
|
+
return /* @__PURE__ */ E("div", {
|
|
539
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-3 text-center",
|
|
540
|
+
children: [
|
|
541
|
+
/* @__PURE__ */ T("div", {
|
|
542
|
+
className: "mx-auto mb-1 flex size-8 items-center justify-center rounded-full bg-bg-sunken text-text-secondary",
|
|
543
|
+
children: e
|
|
544
|
+
}),
|
|
545
|
+
/* @__PURE__ */ T("p", {
|
|
546
|
+
className: "text-lg font-semibold text-text-primary",
|
|
547
|
+
children: n
|
|
548
|
+
}),
|
|
549
|
+
/* @__PURE__ */ T("p", {
|
|
550
|
+
className: "text-xs text-text-secondary",
|
|
551
|
+
children: t
|
|
552
|
+
})
|
|
553
|
+
]
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
function $({ label: e, value: t }) {
|
|
557
|
+
return /* @__PURE__ */ E("div", {
|
|
558
|
+
className: "flex items-center justify-between gap-4",
|
|
559
|
+
children: [/* @__PURE__ */ T("span", {
|
|
560
|
+
className: "text-text-secondary",
|
|
561
|
+
children: e
|
|
562
|
+
}), /* @__PURE__ */ T("span", {
|
|
563
|
+
className: "text-right font-medium text-text-primary",
|
|
564
|
+
children: t
|
|
352
565
|
})]
|
|
353
566
|
});
|
|
354
567
|
}
|
|
355
568
|
//#endregion
|
|
356
|
-
export {
|
|
569
|
+
export { ye as FamilyPage };
|
|
357
570
|
|
|
358
571
|
//# sourceMappingURL=FamilyPage.js.map
|