@burdenoff/microfe-brainyrich 2026.731.2 → 2026.731.3
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.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoot.js +60 -53
- package/dist/brainyrich/BrainyRichRoot.js.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.js +20 -16
- package/dist/brainyrich/BrainyRichRoutes.js.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +696 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +473 -266
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/pages/FirmPage.d.ts +2 -0
- package/dist/brainyrich/pages/FirmPage.d.ts.map +1 -0
- package/dist/brainyrich/pages/FirmPage.js +255 -0
- package/dist/brainyrich/pages/FirmPage.js.map +1 -0
- package/dist/brainyrich/pages/ReportsPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js +606 -331
- package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js +619 -403
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/types/bra.d.ts +161 -0
- package/dist/brainyrich/types/bra.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useBrainyRich as e } from "../providers/BrainyRichProvider.js";
|
|
2
2
|
import { tWithFallback as t } from "../utils/i18n.js";
|
|
3
|
-
import { fetchAllAccounts as n, fetchAllHoldings as r, useAccounts as i, useAllTransactions as a,
|
|
4
|
-
import { DonutChart as
|
|
5
|
-
import { EmptyState as
|
|
6
|
-
import { useMemo as
|
|
7
|
-
import { ChevronDown as
|
|
8
|
-
import { useI18n as
|
|
9
|
-
import { useQuery as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { Badge as
|
|
3
|
+
import { fetchAllAccounts as n, fetchAllHoldings as r, useAccounts as i, useAllTransactions as a, useCreateScheduledReport as o, useDownloadReportRunPdf as s, useGenerateReportNow as c, useGoalFundings as l, useGoals as u, useHouseholds as d, useMyAdvisorBranding as f, useNetWorthSummary as ee, useReportRuns as p, useScheduledReports as te, useSetScheduledReportStatus as m, useUpsertMyAdvisorBranding as h } from "../hooks/useBrainyRichApi.js";
|
|
4
|
+
import { DonutChart as g, FadeIn as _, GlassCard as v, ProgressRing as y, Sparkline as b, StatTile as x, TrendBars as S } from "../components/viz.js";
|
|
5
|
+
import { EmptyState as C, ErrorState as w, LoadingState as T, SectionShell as ne, deltaToneClass as E, formatCompact as D, formatDate as O, formatMoney as k, statusBadgeVariant as A } from "./_shared.js";
|
|
6
|
+
import { useMemo as j, useState as M } from "react";
|
|
7
|
+
import { CalendarClock as re, ChevronDown as ie, Download as ae, FileText as N, Layers as oe, Palette as se, Pause as P, Play as ce, Plus as le, Printer as ue, Receipt as de, Sparkles as fe, Target as pe, TrendingUp as me, Users as he, Wallet as ge } from "lucide-react";
|
|
8
|
+
import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
+
import { useQuery as ve } from "@tanstack/react-query";
|
|
10
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
11
|
+
import { Badge as L, Button as R, Card as z, CardContent as B, CardDescription as V, CardHeader as H, CardTitle as U, Dialog as ye, DialogClose as be, DialogContent as xe, DialogDescription as Se, DialogFooter as Ce, DialogHeader as we, DialogTitle as Te, DropdownMenu as Ee, DropdownMenuContent as De, DropdownMenuItem as Oe, DropdownMenuTrigger as ke, Input as Ae, Label as W, Select as je, SelectContent as Me, SelectItem as Ne, SelectTrigger as Pe, SelectValue as Fe, Skeleton as Ie, Table as G, TableBody as K, TableCell as q, TableHead as J, TableHeader as Y, TableRow as X, Tabs as Le, TabsList as Re, TabsTrigger as Z, Textarea as ze } from "@burdenoff/fe-libs/ui";
|
|
12
12
|
//#region src/brainyrich/pages/ReportsPage.tsx
|
|
13
|
-
var
|
|
13
|
+
var Be = {
|
|
14
14
|
EQUITY: "Equity",
|
|
15
15
|
FIXED_INCOME: "Fixed Income",
|
|
16
16
|
CASH: "Cash",
|
|
@@ -18,7 +18,7 @@ var fe = {
|
|
|
18
18
|
COMMODITY: "Commodity",
|
|
19
19
|
CRYPTO: "Crypto",
|
|
20
20
|
ALTERNATIVE: "Alternatives"
|
|
21
|
-
},
|
|
21
|
+
}, Ve = {
|
|
22
22
|
EQUITY: "brand",
|
|
23
23
|
FIXED_INCOME: "blue",
|
|
24
24
|
CASH: "teal",
|
|
@@ -27,42 +27,42 @@ var fe = {
|
|
|
27
27
|
CRYPTO: "purple",
|
|
28
28
|
ALTERNATIVE: "info"
|
|
29
29
|
};
|
|
30
|
-
function
|
|
31
|
-
return
|
|
30
|
+
function Q(e) {
|
|
31
|
+
return Be[e] ?? e.replace(/_/g, " ");
|
|
32
32
|
}
|
|
33
|
-
var
|
|
33
|
+
var He = [
|
|
34
34
|
"DEPOSIT",
|
|
35
35
|
"DIVIDEND",
|
|
36
36
|
"INTEREST",
|
|
37
37
|
"SELL"
|
|
38
|
-
],
|
|
38
|
+
], Ue = [
|
|
39
39
|
"WITHDRAWAL",
|
|
40
40
|
"FEE",
|
|
41
41
|
"BUY"
|
|
42
42
|
];
|
|
43
|
-
function
|
|
43
|
+
function We(e) {
|
|
44
44
|
let t = new Date(e);
|
|
45
45
|
return Number.isNaN(t.getTime()) ? null : `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}`;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Ge(e) {
|
|
48
48
|
let [t, n] = e.split("-").map(Number);
|
|
49
49
|
return new Intl.DateTimeFormat("en-US", { month: "short" }).format(new Date(t, n - 1, 1));
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Ke(e, t = 6) {
|
|
52
52
|
let n = /* @__PURE__ */ new Map();
|
|
53
53
|
for (let t of e) {
|
|
54
|
-
let e =
|
|
54
|
+
let e = We(t.tradeDate);
|
|
55
55
|
if (!e) continue;
|
|
56
56
|
let r = n.get(e) ?? {
|
|
57
57
|
inflow: 0,
|
|
58
58
|
outflow: 0
|
|
59
59
|
}, i = Math.abs(t.amount);
|
|
60
|
-
|
|
60
|
+
He.includes(t.type) ? r.inflow += i : Ue.includes(t.type) && (r.outflow += i), n.set(e, r);
|
|
61
61
|
}
|
|
62
62
|
let r = Array.from(n.keys()).sort().slice(-t), i = r.map((e) => {
|
|
63
63
|
let t = n.get(e);
|
|
64
64
|
return {
|
|
65
|
-
label:
|
|
65
|
+
label: Ge(e),
|
|
66
66
|
inflow: t.inflow,
|
|
67
67
|
outflow: t.outflow
|
|
68
68
|
};
|
|
@@ -75,11 +75,11 @@ function ve(e, t = 6) {
|
|
|
75
75
|
})
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function qe(e) {
|
|
79
79
|
let t = 0, n = 0;
|
|
80
80
|
for (let r of e) {
|
|
81
81
|
let e = Math.abs(r.amount);
|
|
82
|
-
|
|
82
|
+
He.includes(r.type) ? t += e : Ue.includes(r.type) && (n += e);
|
|
83
83
|
}
|
|
84
84
|
return {
|
|
85
85
|
inflow: t,
|
|
@@ -87,15 +87,15 @@ function ye(e) {
|
|
|
87
87
|
net: t - n
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Je(e, t) {
|
|
91
91
|
let n = /* @__PURE__ */ new Map(), r = 0;
|
|
92
92
|
for (let t of e) n.set(t.id, t.cashBalance), r += t.cashBalance;
|
|
93
93
|
let i = 0, a = /* @__PURE__ */ new Map();
|
|
94
94
|
for (let e of t) i += e.marketValue, a.set(e.assetClass, (a.get(e.assetClass) ?? 0) + e.marketValue), n.set(e.accountId, (n.get(e.accountId) ?? 0) + e.marketValue);
|
|
95
95
|
let o = Array.from(a.entries()).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
|
|
96
|
-
label:
|
|
96
|
+
label: Q(e),
|
|
97
97
|
value: t,
|
|
98
|
-
tone:
|
|
98
|
+
tone: Ve[e]
|
|
99
99
|
}));
|
|
100
100
|
return {
|
|
101
101
|
netWorth: r + i,
|
|
@@ -105,7 +105,7 @@ function be(e, t) {
|
|
|
105
105
|
accountValues: n
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Ye(e) {
|
|
109
109
|
switch (e) {
|
|
110
110
|
case "AHEAD": return "success";
|
|
111
111
|
case "BEHIND": return "warning";
|
|
@@ -113,7 +113,7 @@ function xe(e) {
|
|
|
113
113
|
default: return "brand";
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Xe(e, t) {
|
|
117
117
|
let n = (e) => {
|
|
118
118
|
let t = String(e ?? "");
|
|
119
119
|
return /[",\n]/.test(t) ? `"${t.replace(/"/g, "\"\"")}"` : t;
|
|
@@ -124,11 +124,11 @@ function $(e, t) {
|
|
|
124
124
|
let n = new Blob([t], { type: "text/csv;charset=utf-8;" }), r = URL.createObjectURL(n), i = document.createElement("a");
|
|
125
125
|
i.href = r, i.download = e, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Ze(e) {
|
|
128
128
|
return e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "household";
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
let { apiGatewayUrl: t } = e(), i =
|
|
130
|
+
function Qe() {
|
|
131
|
+
let { apiGatewayUrl: t } = e(), i = ve({
|
|
132
132
|
queryKey: [
|
|
133
133
|
"brainyrich",
|
|
134
134
|
"holdings",
|
|
@@ -144,45 +144,45 @@ function Ce() {
|
|
|
144
144
|
data: i.data ?? []
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
let { t: e } =
|
|
147
|
+
function $e() {
|
|
148
|
+
let { t: e } = _e(), n = (n, r, i) => t(e, n, r, i), [r, o] = M("networth"), [s, c] = M(), l = ee(), f = Qe(), p = a(), te = d(), m = l.data, h = m?.currency ?? "USD", g = te.data, v = s ?? g[0]?.id, y = g.find((e) => e.id === v), b = i({ householdId: v }), S = u({ householdId: v }), C = b.data, w = S.data, T = j(() => f.data.slice().sort((e, t) => t.marketValue - e.marketValue), [f.data]), E = j(() => p.data.slice().sort((e, t) => new Date(t.tradeDate).getTime() - new Date(e.tradeDate).getTime()), [p.data]), D = j(() => Ke(E), [E]), A = j(() => new Set(C.map((e) => e.id)), [C]), N = j(() => T.filter((e) => A.has(e.accountId)).slice().sort((e, t) => t.marketValue - e.marketValue), [T, A]), se = j(() => E.filter((e) => A.has(e.accountId)), [E, A]), P = j(() => Je(C, N), [C, N]), ce = j(() => T.reduce((e, t) => e + (t.marketValue - t.costBasis), 0), [T]), le = () => {
|
|
149
149
|
if (r === "networth") {
|
|
150
|
-
if (!
|
|
151
|
-
$("brainyrich-net-worth-statement.csv",
|
|
150
|
+
if (!m) return;
|
|
151
|
+
$("brainyrich-net-worth-statement.csv", Xe([
|
|
152
152
|
"Metric",
|
|
153
153
|
"Amount",
|
|
154
154
|
"Currency"
|
|
155
155
|
], [
|
|
156
156
|
[
|
|
157
157
|
"Total Net Worth",
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
m.totalNetWorth,
|
|
159
|
+
h
|
|
160
160
|
],
|
|
161
161
|
[
|
|
162
162
|
"Total Market Value",
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
m.totalMarketValue,
|
|
164
|
+
h
|
|
165
165
|
],
|
|
166
166
|
[
|
|
167
167
|
"Total Cash",
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
m.totalCash,
|
|
169
|
+
h
|
|
170
170
|
],
|
|
171
171
|
[
|
|
172
172
|
"Account Count",
|
|
173
|
-
|
|
173
|
+
m.accountCount,
|
|
174
174
|
""
|
|
175
175
|
],
|
|
176
|
-
...
|
|
177
|
-
`Asset Class: ${
|
|
176
|
+
...m.byAssetClass.map((e) => [
|
|
177
|
+
`Asset Class: ${Q(e.assetClass)}`,
|
|
178
178
|
e.marketValue,
|
|
179
|
-
|
|
179
|
+
h
|
|
180
180
|
])
|
|
181
181
|
]));
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
184
|
if (r === "holdings") {
|
|
185
|
-
$("brainyrich-holdings-schedule.csv",
|
|
185
|
+
$("brainyrich-holdings-schedule.csv", Xe([
|
|
186
186
|
"Symbol",
|
|
187
187
|
"Name",
|
|
188
188
|
"Asset Class",
|
|
@@ -190,10 +190,10 @@ function we() {
|
|
|
190
190
|
"Cost Basis",
|
|
191
191
|
"Market Value",
|
|
192
192
|
"Currency"
|
|
193
|
-
],
|
|
193
|
+
], T.map((e) => [
|
|
194
194
|
e.symbol,
|
|
195
195
|
e.name ?? "",
|
|
196
|
-
|
|
196
|
+
Q(e.assetClass),
|
|
197
197
|
e.quantity,
|
|
198
198
|
e.costBasis,
|
|
199
199
|
e.marketValue,
|
|
@@ -202,8 +202,8 @@ function we() {
|
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
if (r === "statement") {
|
|
205
|
-
if (!
|
|
206
|
-
let e =
|
|
205
|
+
if (!y) return;
|
|
206
|
+
let e = y.currency ?? h, t = [
|
|
207
207
|
"Section",
|
|
208
208
|
"Label",
|
|
209
209
|
"Amount",
|
|
@@ -212,44 +212,44 @@ function we() {
|
|
|
212
212
|
[
|
|
213
213
|
"Summary",
|
|
214
214
|
"Net Worth",
|
|
215
|
-
|
|
215
|
+
P.netWorth,
|
|
216
216
|
e
|
|
217
217
|
],
|
|
218
218
|
[
|
|
219
219
|
"Summary",
|
|
220
220
|
"Invested Value",
|
|
221
|
-
|
|
221
|
+
P.invested,
|
|
222
222
|
e
|
|
223
223
|
],
|
|
224
224
|
[
|
|
225
225
|
"Summary",
|
|
226
226
|
"Cash & Liquidity",
|
|
227
|
-
|
|
227
|
+
P.cash,
|
|
228
228
|
e
|
|
229
229
|
],
|
|
230
|
-
...
|
|
230
|
+
...P.allocation.map((t) => [
|
|
231
231
|
"Allocation",
|
|
232
232
|
t.label,
|
|
233
233
|
t.value,
|
|
234
234
|
e
|
|
235
235
|
]),
|
|
236
|
-
...
|
|
236
|
+
...N.map((e) => [
|
|
237
237
|
"Holding",
|
|
238
238
|
`${e.symbol}${e.name ? ` — ${e.name}` : ""}`,
|
|
239
239
|
e.marketValue,
|
|
240
240
|
e.currency
|
|
241
241
|
]),
|
|
242
|
-
...
|
|
242
|
+
...w.map((e) => [
|
|
243
243
|
"Goal",
|
|
244
244
|
e.name,
|
|
245
245
|
e.targetAmount,
|
|
246
246
|
e.currency
|
|
247
247
|
])
|
|
248
248
|
];
|
|
249
|
-
$(`brainyrich-${
|
|
249
|
+
$(`brainyrich-${Ze(y.name)}-statement.csv`, Xe(t, n));
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
|
-
$("brainyrich-transaction-ledger.csv",
|
|
252
|
+
$("brainyrich-transaction-ledger.csv", Xe([
|
|
253
253
|
"Trade Date",
|
|
254
254
|
"Type",
|
|
255
255
|
"Symbol",
|
|
@@ -258,8 +258,8 @@ function we() {
|
|
|
258
258
|
"Amount",
|
|
259
259
|
"Fee",
|
|
260
260
|
"Currency"
|
|
261
|
-
],
|
|
262
|
-
|
|
261
|
+
], E.map((e) => [
|
|
262
|
+
O(e.tradeDate),
|
|
263
263
|
e.type,
|
|
264
264
|
e.symbol ?? "",
|
|
265
265
|
e.quantity,
|
|
@@ -268,163 +268,438 @@ function we() {
|
|
|
268
268
|
e.fee,
|
|
269
269
|
e.currency
|
|
270
270
|
])));
|
|
271
|
-
},
|
|
272
|
-
return /* @__PURE__ */
|
|
271
|
+
}, fe = r === "networth" && (l.isLoading || !m) || r === "holdings" && (f.isLoading || T.length === 0) || r === "transactions" && (p.isLoading || E.length === 0) || r === "statement" && (!y || b.isLoading);
|
|
272
|
+
return /* @__PURE__ */ I(ne, {
|
|
273
273
|
title: n("brainyrich.reports.title", "Reports & Statements"),
|
|
274
274
|
description: n("brainyrich.reports.description", "Generate statements directly from your live portfolio data — no fabricated schedules."),
|
|
275
|
-
actions: /* @__PURE__ */
|
|
275
|
+
actions: /* @__PURE__ */ I(Ee, { children: [/* @__PURE__ */ F(ke, {
|
|
276
276
|
asChild: !0,
|
|
277
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ I(R, {
|
|
278
278
|
size: "sm",
|
|
279
|
-
disabled:
|
|
279
|
+
disabled: fe,
|
|
280
280
|
"aria-label": n("brainyrich.reports.actions.export", "Print / Export"),
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ F(ae, {
|
|
283
283
|
className: "size-4",
|
|
284
284
|
"aria-hidden": "true"
|
|
285
285
|
}),
|
|
286
286
|
n("brainyrich.reports.actions.export", "Print / Export"),
|
|
287
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ F(ie, {
|
|
288
288
|
className: "size-4",
|
|
289
289
|
"aria-hidden": "true"
|
|
290
290
|
})
|
|
291
291
|
]
|
|
292
292
|
})
|
|
293
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ I(De, {
|
|
294
294
|
align: "end",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
296
|
-
onSelect:
|
|
297
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ I(Oe, {
|
|
296
|
+
onSelect: le,
|
|
297
|
+
children: [/* @__PURE__ */ F(ae, {
|
|
298
298
|
className: "size-4",
|
|
299
299
|
"aria-hidden": "true"
|
|
300
300
|
}), n("brainyrich.reports.actions.downloadCsv", "Download CSV")]
|
|
301
|
-
}), /* @__PURE__ */
|
|
301
|
+
}), /* @__PURE__ */ I(Oe, {
|
|
302
302
|
onSelect: () => window.print(),
|
|
303
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ F(ue, {
|
|
304
304
|
className: "size-4",
|
|
305
305
|
"aria-hidden": "true"
|
|
306
306
|
}), n("brainyrich.reports.actions.print", "Print statement")]
|
|
307
307
|
})]
|
|
308
308
|
})] }),
|
|
309
309
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ F(_, { children: /* @__PURE__ */ I("div", {
|
|
311
311
|
className: "grid gap-4 md:grid-cols-2 xl:grid-cols-4",
|
|
312
312
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ F(x, {
|
|
314
314
|
label: n("brainyrich.reports.kpis.netWorth", "Net Worth"),
|
|
315
|
-
value:
|
|
316
|
-
spark:
|
|
315
|
+
value: m ? k(m.totalNetWorth, h) : "—",
|
|
316
|
+
spark: D.netSeries,
|
|
317
317
|
glow: !0
|
|
318
318
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ F(x, {
|
|
320
320
|
label: n("brainyrich.reports.kpis.marketValue", "Invested Value"),
|
|
321
|
-
value:
|
|
322
|
-
icon: /* @__PURE__ */
|
|
321
|
+
value: m ? k(m.totalMarketValue, h) : "—",
|
|
322
|
+
icon: /* @__PURE__ */ F(me, {
|
|
323
323
|
className: "size-4",
|
|
324
324
|
"aria-hidden": "true"
|
|
325
325
|
})
|
|
326
326
|
}),
|
|
327
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ F(x, {
|
|
328
328
|
label: n("brainyrich.reports.kpis.holdings", "Holdings on Schedule"),
|
|
329
|
-
value: String(
|
|
330
|
-
icon: /* @__PURE__ */
|
|
329
|
+
value: String(T.length),
|
|
330
|
+
icon: /* @__PURE__ */ F(oe, {
|
|
331
331
|
className: "size-4",
|
|
332
332
|
"aria-hidden": "true"
|
|
333
333
|
})
|
|
334
334
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ F(x, {
|
|
336
336
|
label: n("brainyrich.reports.kpis.transactions", "Ledger Entries"),
|
|
337
|
-
value: String(
|
|
338
|
-
icon: /* @__PURE__ */
|
|
337
|
+
value: String(E.length),
|
|
338
|
+
icon: /* @__PURE__ */ F(de, {
|
|
339
339
|
className: "size-4",
|
|
340
340
|
"aria-hidden": "true"
|
|
341
341
|
})
|
|
342
342
|
})
|
|
343
343
|
]
|
|
344
344
|
}) }),
|
|
345
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ F(Le, {
|
|
346
346
|
value: r,
|
|
347
347
|
onValueChange: (e) => o(e),
|
|
348
|
-
children: /* @__PURE__ */
|
|
349
|
-
/* @__PURE__ */
|
|
348
|
+
children: /* @__PURE__ */ I(Re, { children: [
|
|
349
|
+
/* @__PURE__ */ I(Z, {
|
|
350
350
|
value: "networth",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ F(ge, {
|
|
352
352
|
className: "size-4",
|
|
353
353
|
"aria-hidden": "true"
|
|
354
354
|
}), n("brainyrich.reports.tabs.netWorth", "Net Worth")]
|
|
355
355
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ I(Z, {
|
|
357
357
|
value: "holdings",
|
|
358
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ F(oe, {
|
|
359
359
|
className: "size-4",
|
|
360
360
|
"aria-hidden": "true"
|
|
361
361
|
}), n("brainyrich.reports.tabs.holdings", "Holdings")]
|
|
362
362
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ I(Z, {
|
|
364
364
|
value: "transactions",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ F(de, {
|
|
366
366
|
className: "size-4",
|
|
367
367
|
"aria-hidden": "true"
|
|
368
368
|
}), n("brainyrich.reports.tabs.ledger", "Ledger")]
|
|
369
369
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ I(Z, {
|
|
371
371
|
value: "statement",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ F(he, {
|
|
373
373
|
className: "size-4",
|
|
374
374
|
"aria-hidden": "true"
|
|
375
375
|
}), n("brainyrich.reports.tabs.statement", "Client Statement")]
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ I(Z, {
|
|
378
|
+
value: "scheduled",
|
|
379
|
+
children: [/* @__PURE__ */ F(re, {
|
|
380
|
+
className: "size-4",
|
|
381
|
+
"aria-hidden": "true"
|
|
382
|
+
}), n("brainyrich.reports.tabs.scheduled", "Scheduled Reports")]
|
|
376
383
|
})
|
|
377
384
|
] })
|
|
378
385
|
}),
|
|
379
|
-
r === "networth" ? /* @__PURE__ */
|
|
380
|
-
query:
|
|
381
|
-
cashflow:
|
|
382
|
-
netSeries:
|
|
386
|
+
r === "networth" ? /* @__PURE__ */ F(nt, {
|
|
387
|
+
query: l,
|
|
388
|
+
cashflow: D.bars,
|
|
389
|
+
netSeries: D.netSeries,
|
|
383
390
|
translate: n
|
|
384
|
-
}) : r === "holdings" ? /* @__PURE__ */
|
|
385
|
-
query:
|
|
386
|
-
holdings:
|
|
387
|
-
unrealized:
|
|
391
|
+
}) : r === "holdings" ? /* @__PURE__ */ F(rt, {
|
|
392
|
+
query: f,
|
|
393
|
+
holdings: T,
|
|
394
|
+
unrealized: ce,
|
|
388
395
|
translate: n
|
|
389
|
-
}) : r === "transactions" ? /* @__PURE__ */
|
|
390
|
-
query:
|
|
391
|
-
transactions:
|
|
392
|
-
cashflow:
|
|
393
|
-
currency:
|
|
396
|
+
}) : r === "transactions" ? /* @__PURE__ */ F(it, {
|
|
397
|
+
query: p,
|
|
398
|
+
transactions: E,
|
|
399
|
+
cashflow: D.bars,
|
|
400
|
+
currency: h,
|
|
394
401
|
translate: n
|
|
395
|
-
}) : /* @__PURE__ */
|
|
396
|
-
householdsQuery:
|
|
397
|
-
households:
|
|
398
|
-
activeHousehold:
|
|
399
|
-
onSelect:
|
|
400
|
-
accountsQuery:
|
|
401
|
-
goals:
|
|
402
|
-
holdings:
|
|
403
|
-
transactions:
|
|
404
|
-
statement:
|
|
402
|
+
}) : r === "statement" ? /* @__PURE__ */ F(at, {
|
|
403
|
+
householdsQuery: te,
|
|
404
|
+
households: g,
|
|
405
|
+
activeHousehold: y,
|
|
406
|
+
onSelect: c,
|
|
407
|
+
accountsQuery: b,
|
|
408
|
+
goals: w,
|
|
409
|
+
holdings: N,
|
|
410
|
+
transactions: se,
|
|
411
|
+
statement: P,
|
|
405
412
|
translate: n
|
|
413
|
+
}) : /* @__PURE__ */ F(et, {
|
|
414
|
+
households: g,
|
|
415
|
+
translate: n
|
|
416
|
+
})
|
|
417
|
+
]
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function et({ households: e, translate: t }) {
|
|
421
|
+
let n = te(), r = p(), i = o(), a = m(), l = c(), u = s(), d = f(), ee = h(), [g, _] = M(!1), [v, y] = M(""), [b, x] = M("MONTHLY"), [S, ne] = M(""), E = d.data;
|
|
422
|
+
return /* @__PURE__ */ I("div", {
|
|
423
|
+
className: "space-y-6",
|
|
424
|
+
children: [
|
|
425
|
+
/* @__PURE__ */ I(z, { children: [/* @__PURE__ */ I(H, {
|
|
426
|
+
className: "flex flex-row items-center justify-between gap-4",
|
|
427
|
+
children: [/* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(U, { children: t("brainyrich.reports.scheduled.title", "Scheduled Client Reports") }), /* @__PURE__ */ F(V, { children: t("brainyrich.reports.scheduled.description", "Real recurring PDF report generation, regenerated on demand from a stored snapshot — no fabricated schedules.") })] }), /* @__PURE__ */ I(ye, {
|
|
428
|
+
open: g,
|
|
429
|
+
onOpenChange: _,
|
|
430
|
+
children: [/* @__PURE__ */ I(R, {
|
|
431
|
+
size: "sm",
|
|
432
|
+
onClick: () => _(!0),
|
|
433
|
+
children: [/* @__PURE__ */ F(le, {
|
|
434
|
+
className: "size-4",
|
|
435
|
+
"aria-hidden": "true"
|
|
436
|
+
}), t("brainyrich.reports.scheduled.new", "New schedule")]
|
|
437
|
+
}), /* @__PURE__ */ I(xe, { children: [
|
|
438
|
+
/* @__PURE__ */ I(we, { children: [/* @__PURE__ */ F(Te, { children: t("brainyrich.reports.scheduled.newTitle", "New scheduled report") }), /* @__PURE__ */ F(Se, { children: t("brainyrich.reports.scheduled.newDescription", "Recurring reports render the same real path as an on-demand generation.") })] }),
|
|
439
|
+
/* @__PURE__ */ I("div", {
|
|
440
|
+
className: "space-y-4",
|
|
441
|
+
children: [
|
|
442
|
+
/* @__PURE__ */ I("div", {
|
|
443
|
+
className: "space-y-1.5",
|
|
444
|
+
children: [/* @__PURE__ */ F(W, {
|
|
445
|
+
htmlFor: "schedule-name",
|
|
446
|
+
children: t("brainyrich.reports.scheduled.fields.name", "Name")
|
|
447
|
+
}), /* @__PURE__ */ F(Ae, {
|
|
448
|
+
id: "schedule-name",
|
|
449
|
+
value: v,
|
|
450
|
+
onChange: (e) => y(e.target.value),
|
|
451
|
+
placeholder: "Quarterly household review"
|
|
452
|
+
})]
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ I("div", {
|
|
455
|
+
className: "space-y-1.5",
|
|
456
|
+
children: [/* @__PURE__ */ F(W, { children: t("brainyrich.reports.scheduled.fields.frequency", "Frequency") }), /* @__PURE__ */ I(je, {
|
|
457
|
+
value: b,
|
|
458
|
+
onValueChange: (e) => x(e),
|
|
459
|
+
children: [/* @__PURE__ */ F(Pe, { children: /* @__PURE__ */ F(Fe, {}) }), /* @__PURE__ */ I(Me, { children: [
|
|
460
|
+
/* @__PURE__ */ F(Ne, {
|
|
461
|
+
value: "WEEKLY",
|
|
462
|
+
children: "Weekly"
|
|
463
|
+
}),
|
|
464
|
+
/* @__PURE__ */ F(Ne, {
|
|
465
|
+
value: "MONTHLY",
|
|
466
|
+
children: "Monthly"
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ F(Ne, {
|
|
469
|
+
value: "QUARTERLY",
|
|
470
|
+
children: "Quarterly"
|
|
471
|
+
})
|
|
472
|
+
] })]
|
|
473
|
+
})]
|
|
474
|
+
}),
|
|
475
|
+
/* @__PURE__ */ I("div", {
|
|
476
|
+
className: "space-y-1.5",
|
|
477
|
+
children: [/* @__PURE__ */ F(W, { children: t("brainyrich.reports.scheduled.fields.household", "Household (optional — whole book if omitted)") }), /* @__PURE__ */ I(je, {
|
|
478
|
+
value: S,
|
|
479
|
+
onValueChange: ne,
|
|
480
|
+
children: [/* @__PURE__ */ F(Pe, { children: /* @__PURE__ */ F(Fe, { placeholder: "Whole book" }) }), /* @__PURE__ */ F(Me, { children: e.map((e) => /* @__PURE__ */ F(Ne, {
|
|
481
|
+
value: e.id,
|
|
482
|
+
children: e.name
|
|
483
|
+
}, e.id)) })]
|
|
484
|
+
})]
|
|
485
|
+
})
|
|
486
|
+
]
|
|
487
|
+
}),
|
|
488
|
+
/* @__PURE__ */ I(Ce, { children: [/* @__PURE__ */ F(be, {
|
|
489
|
+
asChild: !0,
|
|
490
|
+
children: /* @__PURE__ */ F(R, {
|
|
491
|
+
variant: "secondary",
|
|
492
|
+
children: "Cancel"
|
|
493
|
+
})
|
|
494
|
+
}), /* @__PURE__ */ F(R, {
|
|
495
|
+
onClick: () => {
|
|
496
|
+
v.trim() && (i.mutate({
|
|
497
|
+
name: v.trim(),
|
|
498
|
+
frequency: b,
|
|
499
|
+
householdId: S || void 0
|
|
500
|
+
}, { onSuccess: () => _(!1) }), y(""), x("MONTHLY"), ne(""));
|
|
501
|
+
},
|
|
502
|
+
disabled: !v.trim() || i.isPending,
|
|
503
|
+
children: i.isPending ? "Creating…" : "Create schedule"
|
|
504
|
+
})] })
|
|
505
|
+
] })]
|
|
506
|
+
})]
|
|
507
|
+
}), /* @__PURE__ */ F(B, { children: n.isLoading ? /* @__PURE__ */ F(T, {}) : n.isError ? /* @__PURE__ */ F(w, { onRetry: () => n.refetch() }) : n.data.length === 0 ? /* @__PURE__ */ F(C, {
|
|
508
|
+
icon: /* @__PURE__ */ F(re, {
|
|
509
|
+
className: "size-8",
|
|
510
|
+
"aria-hidden": "true"
|
|
511
|
+
}),
|
|
512
|
+
title: t("brainyrich.reports.scheduled.empty", "No scheduled reports yet")
|
|
513
|
+
}) : /* @__PURE__ */ I(G, { children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ I(X, { children: [
|
|
514
|
+
/* @__PURE__ */ F(J, { children: "Name" }),
|
|
515
|
+
/* @__PURE__ */ F(J, { children: "Frequency" }),
|
|
516
|
+
/* @__PURE__ */ F(J, { children: "Status" }),
|
|
517
|
+
/* @__PURE__ */ F(J, { children: "Next run" }),
|
|
518
|
+
/* @__PURE__ */ F(J, { children: "Last run" }),
|
|
519
|
+
/* @__PURE__ */ F(J, {
|
|
520
|
+
className: "text-right",
|
|
521
|
+
children: "Actions"
|
|
522
|
+
})
|
|
523
|
+
] }) }), /* @__PURE__ */ F(K, { children: n.data.map((e) => /* @__PURE__ */ I(X, { children: [
|
|
524
|
+
/* @__PURE__ */ F(q, {
|
|
525
|
+
className: "font-medium",
|
|
526
|
+
children: e.name
|
|
527
|
+
}),
|
|
528
|
+
/* @__PURE__ */ F(q, { children: e.frequency }),
|
|
529
|
+
/* @__PURE__ */ F(q, { children: /* @__PURE__ */ F(L, {
|
|
530
|
+
variant: e.status === "ACTIVE" ? "default" : "secondary",
|
|
531
|
+
children: e.status
|
|
532
|
+
}) }),
|
|
533
|
+
/* @__PURE__ */ F(q, { children: O(e.nextRunAt) }),
|
|
534
|
+
/* @__PURE__ */ F(q, { children: e.lastRunAt ? O(e.lastRunAt) : "—" }),
|
|
535
|
+
/* @__PURE__ */ I(q, {
|
|
536
|
+
className: "flex justify-end gap-1.5",
|
|
537
|
+
children: [/* @__PURE__ */ I(R, {
|
|
538
|
+
size: "sm",
|
|
539
|
+
variant: "ghost",
|
|
540
|
+
disabled: l.isPending,
|
|
541
|
+
onClick: () => l.mutate({ scheduledReportId: e.id }),
|
|
542
|
+
children: [/* @__PURE__ */ F(fe, {
|
|
543
|
+
className: "size-4",
|
|
544
|
+
"aria-hidden": "true"
|
|
545
|
+
}), "Generate now"]
|
|
546
|
+
}), /* @__PURE__ */ I(R, {
|
|
547
|
+
size: "sm",
|
|
548
|
+
variant: "ghost",
|
|
549
|
+
disabled: a.isPending,
|
|
550
|
+
onClick: () => a.mutate({
|
|
551
|
+
id: e.id,
|
|
552
|
+
pause: e.status === "ACTIVE"
|
|
553
|
+
}),
|
|
554
|
+
children: [e.status === "ACTIVE" ? /* @__PURE__ */ F(P, {
|
|
555
|
+
className: "size-4",
|
|
556
|
+
"aria-hidden": "true"
|
|
557
|
+
}) : /* @__PURE__ */ F(ce, {
|
|
558
|
+
className: "size-4",
|
|
559
|
+
"aria-hidden": "true"
|
|
560
|
+
}), e.status === "ACTIVE" ? "Pause" : "Resume"]
|
|
561
|
+
})]
|
|
562
|
+
})
|
|
563
|
+
] }, e.id)) })] }) })] }),
|
|
564
|
+
/* @__PURE__ */ I(z, { children: [/* @__PURE__ */ I(H, { children: [/* @__PURE__ */ F(U, { children: t("brainyrich.reports.runs.title", "Report Runs") }), /* @__PURE__ */ F(V, { children: t("brainyrich.reports.runs.description", "Every generated run — download the real, regenerated-on-demand PDF for any GENERATED run.") })] }), /* @__PURE__ */ F(B, { children: r.isLoading ? /* @__PURE__ */ F(T, {}) : r.isError ? /* @__PURE__ */ F(w, { onRetry: () => r.refetch() }) : r.data.length === 0 ? /* @__PURE__ */ F(C, {
|
|
565
|
+
icon: /* @__PURE__ */ F(N, {
|
|
566
|
+
className: "size-8",
|
|
567
|
+
"aria-hidden": "true"
|
|
568
|
+
}),
|
|
569
|
+
title: t("brainyrich.reports.runs.empty", "No report runs yet")
|
|
570
|
+
}) : /* @__PURE__ */ I(G, { children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ I(X, { children: [
|
|
571
|
+
/* @__PURE__ */ F(J, { children: "Period" }),
|
|
572
|
+
/* @__PURE__ */ F(J, { children: "Status" }),
|
|
573
|
+
/* @__PURE__ */ F(J, { children: "Generated" }),
|
|
574
|
+
/* @__PURE__ */ F(J, {
|
|
575
|
+
className: "text-right",
|
|
576
|
+
children: "Actions"
|
|
577
|
+
})
|
|
578
|
+
] }) }), /* @__PURE__ */ F(K, { children: r.data.map((e) => /* @__PURE__ */ I(X, { children: [
|
|
579
|
+
/* @__PURE__ */ I(q, { children: [
|
|
580
|
+
O(e.periodStart),
|
|
581
|
+
" – ",
|
|
582
|
+
O(e.periodEnd)
|
|
583
|
+
] }),
|
|
584
|
+
/* @__PURE__ */ F(q, { children: /* @__PURE__ */ F(L, {
|
|
585
|
+
variant: A(e.status),
|
|
586
|
+
children: e.status
|
|
587
|
+
}) }),
|
|
588
|
+
/* @__PURE__ */ F(q, { children: e.generatedAt ? O(e.generatedAt) : "—" }),
|
|
589
|
+
/* @__PURE__ */ F(q, {
|
|
590
|
+
className: "text-right",
|
|
591
|
+
children: /* @__PURE__ */ I(R, {
|
|
592
|
+
size: "sm",
|
|
593
|
+
variant: "ghost",
|
|
594
|
+
disabled: e.status !== "GENERATED" || u.isPending,
|
|
595
|
+
onClick: () => u.mutate(e),
|
|
596
|
+
children: [/* @__PURE__ */ F(ae, {
|
|
597
|
+
className: "size-4",
|
|
598
|
+
"aria-hidden": "true"
|
|
599
|
+
}), "PDF"]
|
|
600
|
+
})
|
|
601
|
+
})
|
|
602
|
+
] }, e.id)) })] }) })] }),
|
|
603
|
+
/* @__PURE__ */ I(z, { children: [/* @__PURE__ */ I(H, { children: [/* @__PURE__ */ I(U, {
|
|
604
|
+
className: "flex items-center gap-2",
|
|
605
|
+
children: [/* @__PURE__ */ F(se, {
|
|
606
|
+
className: "size-4",
|
|
607
|
+
"aria-hidden": "true"
|
|
608
|
+
}), t("brainyrich.reports.branding.title", "Client-Portal Branding")]
|
|
609
|
+
}), /* @__PURE__ */ F(V, { children: t("brainyrich.reports.branding.description", "Stamps both the client portal and generated PDF reports with your firm identity.") })] }), /* @__PURE__ */ F(B, { children: d.isLoading ? /* @__PURE__ */ F(T, {}) : /* @__PURE__ */ F(tt, {
|
|
610
|
+
branding: E ?? null,
|
|
611
|
+
isSaving: ee.isPending,
|
|
612
|
+
onSave: (e) => ee.mutate(e)
|
|
613
|
+
}, E?.id ?? "new") })] })
|
|
614
|
+
]
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
function tt({ branding: e, isSaving: t, onSave: n }) {
|
|
618
|
+
let [r, i] = M(() => e?.firmName ?? ""), [a, o] = M(() => e?.primaryColor ?? ""), [s, c] = M(() => e?.contactEmail ?? ""), [l, u] = M(() => e?.disclaimer ?? "");
|
|
619
|
+
return /* @__PURE__ */ I("div", {
|
|
620
|
+
className: "grid gap-4 md:grid-cols-2",
|
|
621
|
+
children: [
|
|
622
|
+
/* @__PURE__ */ I("div", {
|
|
623
|
+
className: "space-y-1.5",
|
|
624
|
+
children: [/* @__PURE__ */ F(W, {
|
|
625
|
+
htmlFor: "branding-firm",
|
|
626
|
+
children: "Firm name"
|
|
627
|
+
}), /* @__PURE__ */ F(Ae, {
|
|
628
|
+
id: "branding-firm",
|
|
629
|
+
value: r,
|
|
630
|
+
onChange: (e) => i(e.target.value)
|
|
631
|
+
})]
|
|
632
|
+
}),
|
|
633
|
+
/* @__PURE__ */ I("div", {
|
|
634
|
+
className: "space-y-1.5",
|
|
635
|
+
children: [/* @__PURE__ */ F(W, {
|
|
636
|
+
htmlFor: "branding-color",
|
|
637
|
+
children: "Primary color (hex)"
|
|
638
|
+
}), /* @__PURE__ */ F(Ae, {
|
|
639
|
+
id: "branding-color",
|
|
640
|
+
value: a,
|
|
641
|
+
onChange: (e) => o(e.target.value),
|
|
642
|
+
placeholder: "#0B5FFF"
|
|
643
|
+
})]
|
|
644
|
+
}),
|
|
645
|
+
/* @__PURE__ */ I("div", {
|
|
646
|
+
className: "space-y-1.5",
|
|
647
|
+
children: [/* @__PURE__ */ F(W, {
|
|
648
|
+
htmlFor: "branding-email",
|
|
649
|
+
children: "Contact email"
|
|
650
|
+
}), /* @__PURE__ */ F(Ae, {
|
|
651
|
+
id: "branding-email",
|
|
652
|
+
type: "email",
|
|
653
|
+
value: s,
|
|
654
|
+
onChange: (e) => c(e.target.value)
|
|
655
|
+
})]
|
|
656
|
+
}),
|
|
657
|
+
/* @__PURE__ */ I("div", {
|
|
658
|
+
className: "space-y-1.5 md:col-span-2",
|
|
659
|
+
children: [/* @__PURE__ */ F(W, {
|
|
660
|
+
htmlFor: "branding-disclaimer",
|
|
661
|
+
children: "Disclaimer"
|
|
662
|
+
}), /* @__PURE__ */ F(ze, {
|
|
663
|
+
id: "branding-disclaimer",
|
|
664
|
+
value: l,
|
|
665
|
+
onChange: (e) => u(e.target.value),
|
|
666
|
+
rows: 3
|
|
667
|
+
})]
|
|
668
|
+
}),
|
|
669
|
+
/* @__PURE__ */ F("div", {
|
|
670
|
+
className: "md:col-span-2",
|
|
671
|
+
children: /* @__PURE__ */ F(R, {
|
|
672
|
+
disabled: t,
|
|
673
|
+
onClick: () => n({
|
|
674
|
+
firmName: r || void 0,
|
|
675
|
+
primaryColor: a || void 0,
|
|
676
|
+
contactEmail: s || void 0,
|
|
677
|
+
disclaimer: l || void 0
|
|
678
|
+
}),
|
|
679
|
+
children: t ? "Saving…" : "Save branding"
|
|
680
|
+
})
|
|
406
681
|
})
|
|
407
682
|
]
|
|
408
683
|
});
|
|
409
684
|
}
|
|
410
|
-
function
|
|
411
|
-
let i = e.data, a = i?.currency ?? "USD", o =
|
|
412
|
-
label:
|
|
685
|
+
function nt({ query: e, cashflow: t, netSeries: n, translate: r }) {
|
|
686
|
+
let i = e.data, a = i?.currency ?? "USD", o = j(() => i ? i.byAssetClass.slice().sort((e, t) => t.marketValue - e.marketValue).map((e) => ({
|
|
687
|
+
label: Q(e.assetClass),
|
|
413
688
|
value: e.marketValue,
|
|
414
|
-
tone:
|
|
689
|
+
tone: Ve[e.assetClass]
|
|
415
690
|
})) : [], [i]);
|
|
416
|
-
if (e.isLoading) return /* @__PURE__ */
|
|
691
|
+
if (e.isLoading) return /* @__PURE__ */ F(z, { children: /* @__PURE__ */ F(B, {
|
|
417
692
|
className: "p-6",
|
|
418
|
-
children: /* @__PURE__ */
|
|
693
|
+
children: /* @__PURE__ */ F(T, { rows: 3 })
|
|
419
694
|
}) });
|
|
420
|
-
if (e.isError) return /* @__PURE__ */
|
|
695
|
+
if (e.isError) return /* @__PURE__ */ F(z, { children: /* @__PURE__ */ F(B, {
|
|
421
696
|
className: "p-6",
|
|
422
|
-
children: /* @__PURE__ */
|
|
697
|
+
children: /* @__PURE__ */ F(w, { onRetry: () => e.refetch() })
|
|
423
698
|
}) });
|
|
424
|
-
if (!i) return /* @__PURE__ */
|
|
699
|
+
if (!i) return /* @__PURE__ */ F(z, { children: /* @__PURE__ */ F(B, {
|
|
425
700
|
className: "p-6",
|
|
426
|
-
children: /* @__PURE__ */
|
|
427
|
-
icon: /* @__PURE__ */
|
|
701
|
+
children: /* @__PURE__ */ F(C, {
|
|
702
|
+
icon: /* @__PURE__ */ F(ge, {
|
|
428
703
|
className: "size-6",
|
|
429
704
|
"aria-hidden": "true"
|
|
430
705
|
}),
|
|
@@ -432,17 +707,17 @@ function Te({ query: e, cashflow: t, netSeries: n, translate: r }) {
|
|
|
432
707
|
description: r("brainyrich.reports.netWorth.emptyDesc", "Link an account and add holdings to generate a net-worth statement.")
|
|
433
708
|
})
|
|
434
709
|
}) });
|
|
435
|
-
let s = r("brainyrich.reports.netWorth.asOf", "as of {date}", { date:
|
|
436
|
-
return /* @__PURE__ */
|
|
710
|
+
let s = r("brainyrich.reports.netWorth.asOf", "as of {date}", { date: O((/* @__PURE__ */ new Date()).toISOString()) });
|
|
711
|
+
return /* @__PURE__ */ I("div", {
|
|
437
712
|
className: "space-y-6",
|
|
438
713
|
children: [
|
|
439
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ I("div", {
|
|
440
715
|
className: "grid gap-6 lg:grid-cols-[1.1fr_1fr]",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ F(_, { children: /* @__PURE__ */ I(v, {
|
|
442
717
|
glow: !0,
|
|
443
718
|
className: "h-full",
|
|
444
719
|
children: [
|
|
445
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ I("p", {
|
|
446
721
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
447
722
|
children: [
|
|
448
723
|
r("brainyrich.reports.netWorth.title", "Net Worth Statement"),
|
|
@@ -450,205 +725,205 @@ function Te({ query: e, cashflow: t, netSeries: n, translate: r }) {
|
|
|
450
725
|
s
|
|
451
726
|
]
|
|
452
727
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
728
|
+
/* @__PURE__ */ F("p", {
|
|
454
729
|
className: "mt-2 text-4xl font-semibold tracking-tight text-text-primary",
|
|
455
|
-
children:
|
|
730
|
+
children: k(i.totalNetWorth, a)
|
|
456
731
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ I("div", {
|
|
458
733
|
className: "mt-3 flex flex-wrap gap-2",
|
|
459
734
|
children: [
|
|
460
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ I("span", {
|
|
461
736
|
className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-1 text-xs text-text-secondary",
|
|
462
|
-
children: [r("brainyrich.reports.netWorth.invested", "Invested"), /* @__PURE__ */
|
|
737
|
+
children: [r("brainyrich.reports.netWorth.invested", "Invested"), /* @__PURE__ */ F("span", {
|
|
463
738
|
className: "font-medium text-text-primary",
|
|
464
|
-
children:
|
|
739
|
+
children: k(i.totalMarketValue, a)
|
|
465
740
|
})]
|
|
466
741
|
}),
|
|
467
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ I("span", {
|
|
468
743
|
className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-1 text-xs text-text-secondary",
|
|
469
|
-
children: [r("brainyrich.reports.netWorth.cash", "Cash"), /* @__PURE__ */
|
|
744
|
+
children: [r("brainyrich.reports.netWorth.cash", "Cash"), /* @__PURE__ */ F("span", {
|
|
470
745
|
className: "font-medium text-text-primary",
|
|
471
|
-
children:
|
|
746
|
+
children: k(i.totalCash, a)
|
|
472
747
|
})]
|
|
473
748
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ I("span", {
|
|
475
750
|
className: "inline-flex items-center gap-1 rounded-full bg-bg-sunken px-2.5 py-1 text-xs text-text-secondary",
|
|
476
|
-
children: [r("brainyrich.reports.netWorth.accounts", "Accounts"), /* @__PURE__ */
|
|
751
|
+
children: [r("brainyrich.reports.netWorth.accounts", "Accounts"), /* @__PURE__ */ F("span", {
|
|
477
752
|
className: "font-medium text-text-primary",
|
|
478
753
|
children: i.accountCount
|
|
479
754
|
})]
|
|
480
755
|
})
|
|
481
756
|
]
|
|
482
757
|
}),
|
|
483
|
-
n.length > 1 ? /* @__PURE__ */
|
|
758
|
+
n.length > 1 ? /* @__PURE__ */ I("div", {
|
|
484
759
|
className: "mt-5",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ F("p", {
|
|
486
761
|
className: "mb-1 text-[11px] text-text-secondary",
|
|
487
762
|
children: r("brainyrich.reports.netWorth.netFlow", "Cumulative net cash flow (recent months)")
|
|
488
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ F(b, {
|
|
489
764
|
data: n,
|
|
490
765
|
height: 48
|
|
491
766
|
})]
|
|
492
767
|
}) : null
|
|
493
768
|
]
|
|
494
|
-
}) }), /* @__PURE__ */
|
|
769
|
+
}) }), /* @__PURE__ */ F(_, {
|
|
495
770
|
index: 1,
|
|
496
|
-
children: /* @__PURE__ */
|
|
771
|
+
children: /* @__PURE__ */ I(z, {
|
|
497
772
|
className: "h-full",
|
|
498
|
-
children: [/* @__PURE__ */
|
|
773
|
+
children: [/* @__PURE__ */ F(H, { children: /* @__PURE__ */ F(U, {
|
|
499
774
|
className: "text-base",
|
|
500
775
|
children: r("brainyrich.reports.netWorth.allocation", "Allocation by Asset Class")
|
|
501
|
-
}) }), /* @__PURE__ */
|
|
776
|
+
}) }), /* @__PURE__ */ F(B, { children: o.length > 0 ? /* @__PURE__ */ F(g, {
|
|
502
777
|
data: o,
|
|
503
778
|
centerLabel: r("brainyrich.reports.netWorth.invested", "Invested"),
|
|
504
|
-
centerValue:
|
|
505
|
-
valueFormatter: (e) =>
|
|
506
|
-
}) : /* @__PURE__ */
|
|
779
|
+
centerValue: D(i.totalMarketValue, a),
|
|
780
|
+
valueFormatter: (e) => k(e, a)
|
|
781
|
+
}) : /* @__PURE__ */ F("p", {
|
|
507
782
|
className: "text-sm text-text-secondary",
|
|
508
783
|
children: r("brainyrich.reports.netWorth.noAllocation", "No holdings to allocate yet.")
|
|
509
784
|
}) })]
|
|
510
785
|
})
|
|
511
786
|
})]
|
|
512
787
|
}),
|
|
513
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ F(_, {
|
|
514
789
|
index: 2,
|
|
515
|
-
children: /* @__PURE__ */
|
|
790
|
+
children: /* @__PURE__ */ I(z, { children: [/* @__PURE__ */ F(H, { children: /* @__PURE__ */ I(U, {
|
|
516
791
|
className: "flex items-center gap-2 text-base",
|
|
517
|
-
children: [/* @__PURE__ */
|
|
792
|
+
children: [/* @__PURE__ */ F(ge, {
|
|
518
793
|
className: "size-4",
|
|
519
794
|
"aria-hidden": "true"
|
|
520
795
|
}), r("brainyrich.reports.netWorth.schedule", "By Asset Class")]
|
|
521
|
-
}) }), /* @__PURE__ */
|
|
796
|
+
}) }), /* @__PURE__ */ F(B, { children: o.length > 0 ? /* @__PURE__ */ F("div", {
|
|
522
797
|
className: "overflow-x-auto",
|
|
523
|
-
children: /* @__PURE__ */
|
|
798
|
+
children: /* @__PURE__ */ I(G, { children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ I(X, { children: [/* @__PURE__ */ F(J, { children: r("brainyrich.reports.netWorth.assetClass", "Asset class") }), /* @__PURE__ */ F(J, {
|
|
524
799
|
className: "text-right",
|
|
525
800
|
children: r("brainyrich.reports.netWorth.total", "Total")
|
|
526
|
-
})] }) }), /* @__PURE__ */
|
|
801
|
+
})] }) }), /* @__PURE__ */ I(K, { children: [o.map((e) => /* @__PURE__ */ I(X, {
|
|
527
802
|
className: "transition-colors hover:bg-bg-elevated/60",
|
|
528
|
-
children: [/* @__PURE__ */
|
|
803
|
+
children: [/* @__PURE__ */ F(q, {
|
|
529
804
|
className: "font-medium text-text-primary",
|
|
530
805
|
children: e.label
|
|
531
|
-
}), /* @__PURE__ */
|
|
806
|
+
}), /* @__PURE__ */ F(q, {
|
|
532
807
|
className: "text-right tabular-nums text-text-primary",
|
|
533
|
-
children:
|
|
808
|
+
children: k(e.value, a)
|
|
534
809
|
})]
|
|
535
|
-
}, e.label)), /* @__PURE__ */
|
|
810
|
+
}, e.label)), /* @__PURE__ */ I(X, { children: [/* @__PURE__ */ F(q, {
|
|
536
811
|
className: "font-semibold text-text-primary",
|
|
537
812
|
children: r("brainyrich.reports.netWorth.totals", "Totals")
|
|
538
|
-
}), /* @__PURE__ */
|
|
813
|
+
}), /* @__PURE__ */ F(q, {
|
|
539
814
|
className: "text-right font-semibold tabular-nums text-status-success-text",
|
|
540
|
-
children:
|
|
815
|
+
children: k(i.totalMarketValue, a)
|
|
541
816
|
})] })] })] })
|
|
542
|
-
}) : /* @__PURE__ */
|
|
817
|
+
}) : /* @__PURE__ */ F("p", {
|
|
543
818
|
className: "text-sm text-text-secondary",
|
|
544
819
|
children: r("brainyrich.reports.netWorth.noAllocation", "No holdings to allocate yet.")
|
|
545
820
|
}) })] })
|
|
546
821
|
}),
|
|
547
|
-
t.length > 0 ? /* @__PURE__ */
|
|
822
|
+
t.length > 0 ? /* @__PURE__ */ F(_, {
|
|
548
823
|
index: 3,
|
|
549
|
-
children: /* @__PURE__ */
|
|
824
|
+
children: /* @__PURE__ */ I(z, { children: [/* @__PURE__ */ I(H, { children: [/* @__PURE__ */ I(U, {
|
|
550
825
|
className: "flex items-center gap-2 text-base",
|
|
551
|
-
children: [/* @__PURE__ */
|
|
826
|
+
children: [/* @__PURE__ */ F(me, {
|
|
552
827
|
className: "size-4",
|
|
553
828
|
"aria-hidden": "true"
|
|
554
829
|
}), r("brainyrich.reports.cashflow.title", "Cash Flow")]
|
|
555
|
-
}), /* @__PURE__ */
|
|
830
|
+
}), /* @__PURE__ */ F(V, { children: r("brainyrich.reports.cashflow.description", "Inflows and outflows recorded on your ledger, by month.") })] }), /* @__PURE__ */ F(B, { children: /* @__PURE__ */ F(S, {
|
|
556
831
|
data: t,
|
|
557
|
-
valueFormatter: (e) =>
|
|
832
|
+
valueFormatter: (e) => D(e, a)
|
|
558
833
|
}) })] })
|
|
559
834
|
}) : null
|
|
560
835
|
]
|
|
561
836
|
});
|
|
562
837
|
}
|
|
563
|
-
function
|
|
838
|
+
function rt({ query: e, holdings: t, unrealized: n, translate: r }) {
|
|
564
839
|
let i = t.reduce((e, t) => e + t.marketValue, 0), a = t.reduce((e, t) => e + t.costBasis, 0), o = t[0]?.currency ?? "USD";
|
|
565
|
-
return /* @__PURE__ */
|
|
840
|
+
return /* @__PURE__ */ I("div", {
|
|
566
841
|
className: "space-y-6",
|
|
567
|
-
children: [!e.isLoading && !e.isError && t.length > 0 ? /* @__PURE__ */
|
|
842
|
+
children: [!e.isLoading && !e.isError && t.length > 0 ? /* @__PURE__ */ F(_, { children: /* @__PURE__ */ I("div", {
|
|
568
843
|
className: "grid gap-4 sm:grid-cols-3",
|
|
569
844
|
children: [
|
|
570
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ F(x, {
|
|
571
846
|
label: r("brainyrich.reports.holdings.marketValue", "Market Value"),
|
|
572
|
-
value:
|
|
847
|
+
value: k(i, o),
|
|
573
848
|
glow: !0
|
|
574
849
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ F(x, {
|
|
576
851
|
label: r("brainyrich.reports.holdings.costBasis", "Cost Basis"),
|
|
577
|
-
value:
|
|
852
|
+
value: k(a, o)
|
|
578
853
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ F(x, {
|
|
580
855
|
label: r("brainyrich.reports.holdings.gainLoss", "Unrealized"),
|
|
581
|
-
value:
|
|
856
|
+
value: k(n, o),
|
|
582
857
|
delta: a > 0 ? n / a * 100 : void 0,
|
|
583
858
|
sparkTone: n >= 0 ? "success" : "error"
|
|
584
859
|
})
|
|
585
860
|
]
|
|
586
|
-
}) }) : null, /* @__PURE__ */
|
|
861
|
+
}) }) : null, /* @__PURE__ */ F(_, {
|
|
587
862
|
index: 1,
|
|
588
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ I(z, { children: [/* @__PURE__ */ I(H, { children: [/* @__PURE__ */ I(U, {
|
|
589
864
|
className: "flex items-center gap-2",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
865
|
+
children: [/* @__PURE__ */ F(oe, {
|
|
591
866
|
className: "size-5",
|
|
592
867
|
"aria-hidden": "true"
|
|
593
868
|
}), r("brainyrich.reports.holdings.title", "Holdings Schedule")]
|
|
594
|
-
}), /* @__PURE__ */
|
|
869
|
+
}), /* @__PURE__ */ F(V, { children: r("brainyrich.reports.holdings.description", "Every position across your portfolios with cost basis and market value.") })] }), /* @__PURE__ */ F(B, { children: e.isLoading ? /* @__PURE__ */ F(T, { rows: 4 }) : e.isError ? /* @__PURE__ */ F(w, { onRetry: () => e.refetch() }) : t.length > 0 ? /* @__PURE__ */ F("div", {
|
|
595
870
|
className: "overflow-x-auto",
|
|
596
|
-
children: /* @__PURE__ */
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
871
|
+
children: /* @__PURE__ */ I(G, { children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ I(X, { children: [
|
|
872
|
+
/* @__PURE__ */ F(J, { children: r("brainyrich.reports.holdings.symbol", "Symbol") }),
|
|
873
|
+
/* @__PURE__ */ F(J, { children: r("brainyrich.reports.holdings.assetClass", "Asset Class") }),
|
|
874
|
+
/* @__PURE__ */ F(J, {
|
|
600
875
|
className: "text-right",
|
|
601
876
|
children: r("brainyrich.reports.holdings.quantity", "Quantity")
|
|
602
877
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
878
|
+
/* @__PURE__ */ F(J, {
|
|
604
879
|
className: "text-right",
|
|
605
880
|
children: r("brainyrich.reports.holdings.costBasis", "Cost Basis")
|
|
606
881
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ F(J, {
|
|
608
883
|
className: "text-right",
|
|
609
884
|
children: r("brainyrich.reports.holdings.marketValue", "Market Value")
|
|
610
885
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ F(J, {
|
|
612
887
|
className: "text-right",
|
|
613
888
|
children: r("brainyrich.reports.holdings.gainLoss", "Unrealized")
|
|
614
889
|
})
|
|
615
|
-
] }) }), /* @__PURE__ */
|
|
890
|
+
] }) }), /* @__PURE__ */ F(K, { children: t.map((e) => {
|
|
616
891
|
let t = e.marketValue - e.costBasis;
|
|
617
|
-
return /* @__PURE__ */
|
|
892
|
+
return /* @__PURE__ */ I(X, {
|
|
618
893
|
className: "transition-colors hover:bg-bg-elevated/60",
|
|
619
894
|
children: [
|
|
620
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ I(q, { children: [/* @__PURE__ */ F("div", {
|
|
621
896
|
className: "font-medium text-text-primary",
|
|
622
897
|
children: e.symbol
|
|
623
|
-
}), e.name ? /* @__PURE__ */
|
|
898
|
+
}), e.name ? /* @__PURE__ */ F("div", {
|
|
624
899
|
className: "text-xs text-text-secondary",
|
|
625
900
|
children: e.name
|
|
626
901
|
}) : null] }),
|
|
627
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ F(q, { children: /* @__PURE__ */ F(L, {
|
|
628
903
|
variant: "outline",
|
|
629
|
-
children:
|
|
904
|
+
children: Q(e.assetClass)
|
|
630
905
|
}) }),
|
|
631
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ F(q, {
|
|
632
907
|
className: "text-right tabular-nums text-text-primary",
|
|
633
908
|
children: e.quantity
|
|
634
909
|
}),
|
|
635
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ F(q, {
|
|
636
911
|
className: "text-right tabular-nums text-text-primary",
|
|
637
|
-
children:
|
|
912
|
+
children: k(e.costBasis, e.currency)
|
|
638
913
|
}),
|
|
639
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ F(q, {
|
|
640
915
|
className: "text-right tabular-nums text-text-primary",
|
|
641
|
-
children:
|
|
916
|
+
children: k(e.marketValue, e.currency)
|
|
642
917
|
}),
|
|
643
|
-
/* @__PURE__ */
|
|
644
|
-
className: `text-right tabular-nums font-medium ${
|
|
645
|
-
children: [t > 0 ? "+" : "",
|
|
918
|
+
/* @__PURE__ */ I(q, {
|
|
919
|
+
className: `text-right tabular-nums font-medium ${E(t)}`,
|
|
920
|
+
children: [t > 0 ? "+" : "", k(t, e.currency)]
|
|
646
921
|
})
|
|
647
922
|
]
|
|
648
923
|
}, e.id);
|
|
649
924
|
}) })] })
|
|
650
|
-
}) : /* @__PURE__ */
|
|
651
|
-
icon: /* @__PURE__ */
|
|
925
|
+
}) : /* @__PURE__ */ F(C, {
|
|
926
|
+
icon: /* @__PURE__ */ F(oe, {
|
|
652
927
|
className: "size-6",
|
|
653
928
|
"aria-hidden": "true"
|
|
654
929
|
}),
|
|
@@ -658,102 +933,102 @@ function Ee({ query: e, holdings: t, unrealized: n, translate: r }) {
|
|
|
658
933
|
})]
|
|
659
934
|
});
|
|
660
935
|
}
|
|
661
|
-
function
|
|
662
|
-
let a =
|
|
663
|
-
return /* @__PURE__ */
|
|
936
|
+
function it({ query: e, transactions: t, cashflow: n, currency: r, translate: i }) {
|
|
937
|
+
let a = j(() => qe(t), [t]), o = !e.isLoading && !e.isError && t.length > 0;
|
|
938
|
+
return /* @__PURE__ */ I("div", {
|
|
664
939
|
className: "space-y-6",
|
|
665
940
|
children: [
|
|
666
|
-
o ? /* @__PURE__ */
|
|
941
|
+
o ? /* @__PURE__ */ F(_, { children: /* @__PURE__ */ I("div", {
|
|
667
942
|
className: "grid gap-4 sm:grid-cols-3",
|
|
668
943
|
children: [
|
|
669
|
-
/* @__PURE__ */
|
|
944
|
+
/* @__PURE__ */ F(x, {
|
|
670
945
|
label: i("brainyrich.reports.ledger.inflow", "Total Inflow"),
|
|
671
|
-
value:
|
|
946
|
+
value: k(a.inflow, r),
|
|
672
947
|
sparkTone: "success"
|
|
673
948
|
}),
|
|
674
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ F(x, {
|
|
675
950
|
label: i("brainyrich.reports.ledger.outflow", "Total Outflow"),
|
|
676
|
-
value:
|
|
951
|
+
value: k(a.outflow, r),
|
|
677
952
|
sparkTone: "error"
|
|
678
953
|
}),
|
|
679
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ F(x, {
|
|
680
955
|
label: i("brainyrich.reports.ledger.net", "Net Flow"),
|
|
681
|
-
value:
|
|
956
|
+
value: k(a.net, r),
|
|
682
957
|
glow: a.net >= 0,
|
|
683
958
|
delta: a.inflow > 0 ? a.net / a.inflow * 100 : void 0
|
|
684
959
|
})
|
|
685
960
|
]
|
|
686
961
|
}) }) : null,
|
|
687
|
-
o && n.length > 0 ? /* @__PURE__ */
|
|
962
|
+
o && n.length > 0 ? /* @__PURE__ */ F(_, {
|
|
688
963
|
index: 1,
|
|
689
|
-
children: /* @__PURE__ */
|
|
964
|
+
children: /* @__PURE__ */ I(z, { children: [/* @__PURE__ */ F(H, { children: /* @__PURE__ */ I(U, {
|
|
690
965
|
className: "flex items-center gap-2 text-base",
|
|
691
|
-
children: [/* @__PURE__ */
|
|
966
|
+
children: [/* @__PURE__ */ F(me, {
|
|
692
967
|
className: "size-4",
|
|
693
968
|
"aria-hidden": "true"
|
|
694
969
|
}), i("brainyrich.reports.cashflow.title", "Cash Flow")]
|
|
695
|
-
}) }), /* @__PURE__ */
|
|
970
|
+
}) }), /* @__PURE__ */ F(B, { children: /* @__PURE__ */ F(S, {
|
|
696
971
|
data: n,
|
|
697
|
-
valueFormatter: (e) =>
|
|
972
|
+
valueFormatter: (e) => D(e, r)
|
|
698
973
|
}) })] })
|
|
699
974
|
}) : null,
|
|
700
|
-
/* @__PURE__ */
|
|
975
|
+
/* @__PURE__ */ F(_, {
|
|
701
976
|
index: 2,
|
|
702
|
-
children: /* @__PURE__ */
|
|
977
|
+
children: /* @__PURE__ */ I(z, { children: [/* @__PURE__ */ I(H, { children: [/* @__PURE__ */ I(U, {
|
|
703
978
|
className: "flex items-center gap-2",
|
|
704
|
-
children: [/* @__PURE__ */
|
|
979
|
+
children: [/* @__PURE__ */ F(de, {
|
|
705
980
|
className: "size-5",
|
|
706
981
|
"aria-hidden": "true"
|
|
707
982
|
}), i("brainyrich.reports.ledger.title", "Transaction Ledger")]
|
|
708
|
-
}), /* @__PURE__ */
|
|
983
|
+
}), /* @__PURE__ */ F(V, { children: i("brainyrich.reports.ledger.description", "Every recorded transaction across your accounts, newest first.") })] }), /* @__PURE__ */ F(B, { children: e.isLoading ? /* @__PURE__ */ F(T, { rows: 4 }) : e.isError ? /* @__PURE__ */ F(w, { onRetry: () => e.refetch() }) : t.length > 0 ? /* @__PURE__ */ F("div", {
|
|
709
984
|
className: "overflow-x-auto",
|
|
710
|
-
children: /* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
/* @__PURE__ */
|
|
714
|
-
/* @__PURE__ */
|
|
985
|
+
children: /* @__PURE__ */ I(G, { children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ I(X, { children: [
|
|
986
|
+
/* @__PURE__ */ F(J, { children: i("brainyrich.reports.ledger.date", "Trade Date") }),
|
|
987
|
+
/* @__PURE__ */ F(J, { children: i("brainyrich.reports.ledger.type", "Type") }),
|
|
988
|
+
/* @__PURE__ */ F(J, { children: i("brainyrich.reports.ledger.symbol", "Symbol") }),
|
|
989
|
+
/* @__PURE__ */ F(J, {
|
|
715
990
|
className: "text-right",
|
|
716
991
|
children: i("brainyrich.reports.ledger.quantity", "Quantity")
|
|
717
992
|
}),
|
|
718
|
-
/* @__PURE__ */
|
|
993
|
+
/* @__PURE__ */ F(J, {
|
|
719
994
|
className: "text-right",
|
|
720
995
|
children: i("brainyrich.reports.ledger.price", "Price")
|
|
721
996
|
}),
|
|
722
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ F(J, {
|
|
723
998
|
className: "text-right",
|
|
724
999
|
children: i("brainyrich.reports.ledger.amount", "Amount")
|
|
725
1000
|
})
|
|
726
|
-
] }) }), /* @__PURE__ */
|
|
1001
|
+
] }) }), /* @__PURE__ */ F(K, { children: t.map((e) => /* @__PURE__ */ I(X, {
|
|
727
1002
|
className: "transition-colors hover:bg-bg-elevated/60",
|
|
728
1003
|
children: [
|
|
729
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ F(q, {
|
|
730
1005
|
className: "text-text-primary",
|
|
731
|
-
children:
|
|
1006
|
+
children: O(e.tradeDate)
|
|
732
1007
|
}),
|
|
733
|
-
/* @__PURE__ */
|
|
1008
|
+
/* @__PURE__ */ F(q, { children: /* @__PURE__ */ F(L, {
|
|
734
1009
|
variant: "outline",
|
|
735
1010
|
children: e.type
|
|
736
1011
|
}) }),
|
|
737
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ F(q, {
|
|
738
1013
|
className: "text-text-primary",
|
|
739
1014
|
children: e.symbol ?? "—"
|
|
740
1015
|
}),
|
|
741
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ F(q, {
|
|
742
1017
|
className: "text-right tabular-nums text-text-primary",
|
|
743
1018
|
children: e.quantity
|
|
744
1019
|
}),
|
|
745
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ F(q, {
|
|
746
1021
|
className: "text-right tabular-nums text-text-primary",
|
|
747
|
-
children:
|
|
1022
|
+
children: k(e.price, e.currency)
|
|
748
1023
|
}),
|
|
749
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ F(q, {
|
|
750
1025
|
className: "text-right tabular-nums text-text-primary",
|
|
751
|
-
children:
|
|
1026
|
+
children: k(e.amount, e.currency)
|
|
752
1027
|
})
|
|
753
1028
|
]
|
|
754
1029
|
}, e.id)) })] })
|
|
755
|
-
}) : /* @__PURE__ */
|
|
756
|
-
icon: /* @__PURE__ */
|
|
1030
|
+
}) : /* @__PURE__ */ F(C, {
|
|
1031
|
+
icon: /* @__PURE__ */ F(N, {
|
|
757
1032
|
className: "size-6",
|
|
758
1033
|
"aria-hidden": "true"
|
|
759
1034
|
}),
|
|
@@ -764,19 +1039,19 @@ function De({ query: e, transactions: t, cashflow: n, currency: r, translate: i
|
|
|
764
1039
|
]
|
|
765
1040
|
});
|
|
766
1041
|
}
|
|
767
|
-
function
|
|
768
|
-
if (e.isLoading) return /* @__PURE__ */
|
|
1042
|
+
function at({ householdsQuery: e, households: t, activeHousehold: n, onSelect: r, accountsQuery: i, goals: a, holdings: o, transactions: s, statement: c, translate: l }) {
|
|
1043
|
+
if (e.isLoading) return /* @__PURE__ */ F(z, { children: /* @__PURE__ */ I(B, {
|
|
769
1044
|
className: "space-y-3 p-6",
|
|
770
|
-
children: [/* @__PURE__ */
|
|
1045
|
+
children: [/* @__PURE__ */ F(Ie, { className: "h-8 w-64" }), /* @__PURE__ */ F(Ie, { className: "h-40 w-full" })]
|
|
771
1046
|
}) });
|
|
772
|
-
if (e.isError) return /* @__PURE__ */
|
|
1047
|
+
if (e.isError) return /* @__PURE__ */ F(z, { children: /* @__PURE__ */ F(B, {
|
|
773
1048
|
className: "p-6",
|
|
774
|
-
children: /* @__PURE__ */
|
|
1049
|
+
children: /* @__PURE__ */ F(w, { onRetry: () => e.refetch() })
|
|
775
1050
|
}) });
|
|
776
|
-
if (t.length === 0 || !n) return /* @__PURE__ */
|
|
1051
|
+
if (t.length === 0 || !n) return /* @__PURE__ */ F(z, { children: /* @__PURE__ */ F(B, {
|
|
777
1052
|
className: "p-6",
|
|
778
|
-
children: /* @__PURE__ */
|
|
779
|
-
icon: /* @__PURE__ */
|
|
1053
|
+
children: /* @__PURE__ */ F(C, {
|
|
1054
|
+
icon: /* @__PURE__ */ F(he, {
|
|
780
1055
|
className: "size-6",
|
|
781
1056
|
"aria-hidden": "true"
|
|
782
1057
|
}),
|
|
@@ -784,176 +1059,176 @@ function Oe({ householdsQuery: e, households: t, activeHousehold: n, onSelect: r
|
|
|
784
1059
|
description: l("brainyrich.reports.statement.emptyDesc", "Create a household to generate a branded client wealth statement.")
|
|
785
1060
|
})
|
|
786
1061
|
}) });
|
|
787
|
-
let
|
|
788
|
-
return /* @__PURE__ */
|
|
1062
|
+
let u = n.currency ?? "USD", d = Ke(s).netSeries, f = O((/* @__PURE__ */ new Date()).toISOString());
|
|
1063
|
+
return /* @__PURE__ */ I("div", {
|
|
789
1064
|
className: "space-y-4",
|
|
790
|
-
children: [/* @__PURE__ */
|
|
1065
|
+
children: [/* @__PURE__ */ I("div", {
|
|
791
1066
|
className: "flex flex-wrap items-center gap-3",
|
|
792
|
-
children: [/* @__PURE__ */
|
|
1067
|
+
children: [/* @__PURE__ */ F("span", {
|
|
793
1068
|
className: "text-sm text-text-secondary",
|
|
794
1069
|
children: l("brainyrich.reports.statement.for", "Statement for")
|
|
795
|
-
}), /* @__PURE__ */
|
|
1070
|
+
}), /* @__PURE__ */ I(Ee, { children: [/* @__PURE__ */ F(ke, {
|
|
796
1071
|
asChild: !0,
|
|
797
|
-
children: /* @__PURE__ */
|
|
1072
|
+
children: /* @__PURE__ */ I(R, {
|
|
798
1073
|
variant: "outline",
|
|
799
1074
|
size: "sm",
|
|
800
1075
|
children: [
|
|
801
|
-
/* @__PURE__ */
|
|
1076
|
+
/* @__PURE__ */ F(he, {
|
|
802
1077
|
className: "size-4",
|
|
803
1078
|
"aria-hidden": "true"
|
|
804
1079
|
}),
|
|
805
1080
|
n.name,
|
|
806
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ F(ie, {
|
|
807
1082
|
className: "size-4",
|
|
808
1083
|
"aria-hidden": "true"
|
|
809
1084
|
})
|
|
810
1085
|
]
|
|
811
1086
|
})
|
|
812
|
-
}), /* @__PURE__ */
|
|
1087
|
+
}), /* @__PURE__ */ F(De, {
|
|
813
1088
|
align: "start",
|
|
814
1089
|
className: "max-h-72 overflow-y-auto",
|
|
815
|
-
children: t.map((e) => /* @__PURE__ */
|
|
1090
|
+
children: t.map((e) => /* @__PURE__ */ F(Oe, {
|
|
816
1091
|
onSelect: () => r(e.id),
|
|
817
1092
|
children: e.name
|
|
818
1093
|
}, e.id))
|
|
819
1094
|
})] })]
|
|
820
|
-
}), i.isLoading ? /* @__PURE__ */
|
|
1095
|
+
}), i.isLoading ? /* @__PURE__ */ F(z, { children: /* @__PURE__ */ F(B, {
|
|
821
1096
|
className: "p-6",
|
|
822
|
-
children: /* @__PURE__ */
|
|
823
|
-
}) }) : i.isError ? /* @__PURE__ */
|
|
1097
|
+
children: /* @__PURE__ */ F(T, { rows: 3 })
|
|
1098
|
+
}) }) : i.isError ? /* @__PURE__ */ F(z, { children: /* @__PURE__ */ F(B, {
|
|
824
1099
|
className: "p-6",
|
|
825
|
-
children: /* @__PURE__ */
|
|
826
|
-
}) }) : /* @__PURE__ */
|
|
1100
|
+
children: /* @__PURE__ */ F(w, { onRetry: () => i.refetch() })
|
|
1101
|
+
}) }) : /* @__PURE__ */ F(_, { children: /* @__PURE__ */ I(v, {
|
|
827
1102
|
glow: !0,
|
|
828
1103
|
className: "space-y-6",
|
|
829
1104
|
children: [
|
|
830
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ I("div", {
|
|
831
1106
|
className: "flex items-start justify-between gap-4 border-b border-border-subtle pb-4",
|
|
832
|
-
children: [/* @__PURE__ */
|
|
1107
|
+
children: [/* @__PURE__ */ I("div", {
|
|
833
1108
|
className: "flex items-center gap-3",
|
|
834
|
-
children: [/* @__PURE__ */
|
|
1109
|
+
children: [/* @__PURE__ */ F("div", {
|
|
835
1110
|
className: "flex size-10 items-center justify-center rounded-xl bg-[var(--color-action-primary-bg)] text-sm font-bold text-[var(--color-action-primary-text)]",
|
|
836
1111
|
children: "BR"
|
|
837
|
-
}), /* @__PURE__ */
|
|
1112
|
+
}), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("h2", {
|
|
838
1113
|
className: "text-lg font-semibold text-text-primary",
|
|
839
1114
|
children: n.name
|
|
840
|
-
}), /* @__PURE__ */
|
|
1115
|
+
}), /* @__PURE__ */ I("p", {
|
|
841
1116
|
className: "text-xs text-text-secondary",
|
|
842
1117
|
children: [
|
|
843
1118
|
l("brainyrich.reports.statement.subtitle", "Wealth Statement"),
|
|
844
1119
|
" ·",
|
|
845
1120
|
" ",
|
|
846
|
-
|
|
1121
|
+
f
|
|
847
1122
|
]
|
|
848
1123
|
})] })]
|
|
849
|
-
}), /* @__PURE__ */
|
|
850
|
-
variant:
|
|
1124
|
+
}), /* @__PURE__ */ F(L, {
|
|
1125
|
+
variant: A(n.status),
|
|
851
1126
|
children: n.status
|
|
852
1127
|
})]
|
|
853
1128
|
}),
|
|
854
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ I("div", {
|
|
855
1130
|
className: "grid gap-6 md:grid-cols-2",
|
|
856
|
-
children: [/* @__PURE__ */
|
|
857
|
-
/* @__PURE__ */
|
|
1131
|
+
children: [/* @__PURE__ */ I("div", { children: [
|
|
1132
|
+
/* @__PURE__ */ F("p", {
|
|
858
1133
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
859
1134
|
children: l("brainyrich.reports.statement.netWorth", "Net Worth")
|
|
860
1135
|
}),
|
|
861
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ F("p", {
|
|
862
1137
|
className: "mt-1 text-3xl font-semibold tracking-tight text-text-primary",
|
|
863
|
-
children:
|
|
1138
|
+
children: k(c.netWorth, u)
|
|
864
1139
|
}),
|
|
865
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ I("div", {
|
|
866
1141
|
className: "mt-2 flex flex-wrap gap-2 text-xs text-text-secondary",
|
|
867
1142
|
children: [
|
|
868
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ I("span", { children: [
|
|
869
1144
|
l("brainyrich.reports.netWorth.invested", "Invested"),
|
|
870
1145
|
" ",
|
|
871
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ F("span", {
|
|
872
1147
|
className: "font-medium text-text-primary",
|
|
873
|
-
children:
|
|
1148
|
+
children: k(c.invested, u)
|
|
874
1149
|
})
|
|
875
1150
|
] }),
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ F("span", { children: "·" }),
|
|
1152
|
+
/* @__PURE__ */ I("span", { children: [
|
|
878
1153
|
l("brainyrich.reports.netWorth.cash", "Cash"),
|
|
879
1154
|
" ",
|
|
880
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ F("span", {
|
|
881
1156
|
className: "font-medium text-text-primary",
|
|
882
|
-
children:
|
|
1157
|
+
children: k(c.cash, u)
|
|
883
1158
|
})
|
|
884
1159
|
] })
|
|
885
1160
|
]
|
|
886
1161
|
}),
|
|
887
|
-
|
|
888
|
-
data:
|
|
1162
|
+
d.length > 1 ? /* @__PURE__ */ F(b, {
|
|
1163
|
+
data: d,
|
|
889
1164
|
height: 44,
|
|
890
1165
|
className: "mt-4"
|
|
891
1166
|
}) : null
|
|
892
|
-
] }), /* @__PURE__ */
|
|
1167
|
+
] }), /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
893
1168
|
className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
894
1169
|
children: l("brainyrich.reports.statement.allocation", "Asset Allocation")
|
|
895
|
-
}), c.allocation.length > 0 ? /* @__PURE__ */
|
|
1170
|
+
}), c.allocation.length > 0 ? /* @__PURE__ */ F(g, {
|
|
896
1171
|
data: c.allocation,
|
|
897
1172
|
height: 200,
|
|
898
|
-
valueFormatter: (e) =>
|
|
899
|
-
}) : /* @__PURE__ */
|
|
1173
|
+
valueFormatter: (e) => k(e, u)
|
|
1174
|
+
}) : /* @__PURE__ */ F("p", {
|
|
900
1175
|
className: "text-sm text-text-secondary",
|
|
901
1176
|
children: l("brainyrich.reports.netWorth.noAllocation", "No holdings to allocate yet.")
|
|
902
1177
|
})] })]
|
|
903
1178
|
}),
|
|
904
|
-
o.length > 0 ? /* @__PURE__ */
|
|
1179
|
+
o.length > 0 ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
905
1180
|
className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
906
1181
|
children: l("brainyrich.reports.statement.holdings", "Holdings Schedule")
|
|
907
|
-
}), /* @__PURE__ */
|
|
1182
|
+
}), /* @__PURE__ */ F("div", {
|
|
908
1183
|
className: "overflow-x-auto rounded-lg border border-border-subtle",
|
|
909
|
-
children: /* @__PURE__ */
|
|
910
|
-
/* @__PURE__ */
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
/* @__PURE__ */
|
|
1184
|
+
children: /* @__PURE__ */ I(G, { children: [/* @__PURE__ */ F(Y, { children: /* @__PURE__ */ I(X, { children: [
|
|
1185
|
+
/* @__PURE__ */ F(J, { children: l("brainyrich.reports.holdings.symbol", "Symbol") }),
|
|
1186
|
+
/* @__PURE__ */ F(J, { children: l("brainyrich.reports.holdings.assetClass", "Asset Class") }),
|
|
1187
|
+
/* @__PURE__ */ F(J, {
|
|
913
1188
|
className: "text-right",
|
|
914
1189
|
children: l("brainyrich.reports.holdings.quantity", "Quantity")
|
|
915
1190
|
}),
|
|
916
|
-
/* @__PURE__ */
|
|
1191
|
+
/* @__PURE__ */ F(J, {
|
|
917
1192
|
className: "text-right",
|
|
918
1193
|
children: l("brainyrich.reports.holdings.marketValue", "Market Value")
|
|
919
1194
|
})
|
|
920
|
-
] }) }), /* @__PURE__ */
|
|
1195
|
+
] }) }), /* @__PURE__ */ F(K, { children: o.map((e) => /* @__PURE__ */ I(X, {
|
|
921
1196
|
className: "transition-colors hover:bg-bg-elevated/60",
|
|
922
1197
|
children: [
|
|
923
|
-
/* @__PURE__ */
|
|
1198
|
+
/* @__PURE__ */ I(q, { children: [/* @__PURE__ */ F("div", {
|
|
924
1199
|
className: "font-medium text-text-primary",
|
|
925
1200
|
children: e.symbol
|
|
926
|
-
}), e.name ? /* @__PURE__ */
|
|
1201
|
+
}), e.name ? /* @__PURE__ */ F("div", {
|
|
927
1202
|
className: "text-xs text-text-secondary",
|
|
928
1203
|
children: e.name
|
|
929
1204
|
}) : null] }),
|
|
930
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ F(q, { children: /* @__PURE__ */ F(L, {
|
|
931
1206
|
variant: "outline",
|
|
932
|
-
children:
|
|
1207
|
+
children: Q(e.assetClass)
|
|
933
1208
|
}) }),
|
|
934
|
-
/* @__PURE__ */
|
|
1209
|
+
/* @__PURE__ */ F(q, {
|
|
935
1210
|
className: "text-right tabular-nums text-text-primary",
|
|
936
1211
|
children: e.quantity
|
|
937
1212
|
}),
|
|
938
|
-
/* @__PURE__ */
|
|
1213
|
+
/* @__PURE__ */ F(q, {
|
|
939
1214
|
className: "text-right tabular-nums text-text-primary",
|
|
940
|
-
children:
|
|
1215
|
+
children: k(e.marketValue, e.currency)
|
|
941
1216
|
})
|
|
942
1217
|
]
|
|
943
1218
|
}, e.id)) })] })
|
|
944
1219
|
})] }) : null,
|
|
945
|
-
a.length > 0 ? /* @__PURE__ */
|
|
1220
|
+
a.length > 0 ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", {
|
|
946
1221
|
className: "mb-3 text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
947
1222
|
children: l("brainyrich.reports.statement.goals", "Progress-to-Goals")
|
|
948
|
-
}), /* @__PURE__ */
|
|
1223
|
+
}), /* @__PURE__ */ F("div", {
|
|
949
1224
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
950
|
-
children: a.map((e) => /* @__PURE__ */
|
|
1225
|
+
children: a.map((e) => /* @__PURE__ */ F(ot, {
|
|
951
1226
|
goal: e,
|
|
952
1227
|
accountValues: c.accountValues,
|
|
953
1228
|
translate: l
|
|
954
1229
|
}, e.id))
|
|
955
1230
|
})] }) : null,
|
|
956
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ F("p", {
|
|
957
1232
|
className: "border-t border-border-subtle pt-4 text-center text-xs text-text-secondary",
|
|
958
1233
|
children: l("brainyrich.reports.statement.footer", "BrainyRich · Confidential")
|
|
959
1234
|
})
|
|
@@ -961,46 +1236,46 @@ function Oe({ householdsQuery: e, households: t, activeHousehold: n, onSelect: r
|
|
|
961
1236
|
}) })]
|
|
962
1237
|
});
|
|
963
1238
|
}
|
|
964
|
-
function
|
|
965
|
-
let r =
|
|
1239
|
+
function ot({ goal: e, accountValues: t, translate: n }) {
|
|
1240
|
+
let r = l(e.id), i = j(() => r.data.reduce((e, n) => {
|
|
966
1241
|
if (n.fixedAmount != null) return e + n.fixedAmount;
|
|
967
1242
|
let r = t.get(n.accountId) ?? 0;
|
|
968
1243
|
return e + n.allocationPct / 100 * r;
|
|
969
1244
|
}, 0), [r.data, t]);
|
|
970
|
-
return /* @__PURE__ */
|
|
1245
|
+
return /* @__PURE__ */ I("div", {
|
|
971
1246
|
className: "flex flex-col items-center gap-2 rounded-xl border border-border-subtle bg-bg-surface p-4 text-center transition-shadow motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))]",
|
|
972
1247
|
children: [
|
|
973
|
-
/* @__PURE__ */
|
|
1248
|
+
/* @__PURE__ */ F(y, {
|
|
974
1249
|
value: e.targetAmount > 0 ? Math.min(100, i / e.targetAmount * 100) : 0,
|
|
975
|
-
tone:
|
|
1250
|
+
tone: Ye(e.projection),
|
|
976
1251
|
size: 104
|
|
977
1252
|
}),
|
|
978
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ I("div", {
|
|
979
1254
|
className: "flex items-center gap-1.5",
|
|
980
|
-
children: [/* @__PURE__ */
|
|
1255
|
+
children: [/* @__PURE__ */ F(pe, {
|
|
981
1256
|
className: "size-3.5 text-text-secondary",
|
|
982
1257
|
"aria-hidden": "true"
|
|
983
|
-
}), /* @__PURE__ */
|
|
1258
|
+
}), /* @__PURE__ */ F("span", {
|
|
984
1259
|
className: "text-sm font-medium text-text-primary",
|
|
985
1260
|
children: e.name
|
|
986
1261
|
})]
|
|
987
1262
|
}),
|
|
988
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ I("p", {
|
|
989
1264
|
className: "text-xs text-text-secondary",
|
|
990
1265
|
children: [
|
|
991
|
-
|
|
1266
|
+
k(i, e.currency),
|
|
992
1267
|
" / ",
|
|
993
|
-
|
|
1268
|
+
k(e.targetAmount, e.currency)
|
|
994
1269
|
]
|
|
995
1270
|
}),
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
variant:
|
|
1271
|
+
/* @__PURE__ */ F(L, {
|
|
1272
|
+
variant: A(e.projection),
|
|
998
1273
|
children: n(`brainyrich.goals.projection.${e.projection}`, e.projection.replace(/_/g, " "))
|
|
999
1274
|
})
|
|
1000
1275
|
]
|
|
1001
1276
|
});
|
|
1002
1277
|
}
|
|
1003
1278
|
//#endregion
|
|
1004
|
-
export {
|
|
1279
|
+
export { $e as ReportsPage };
|
|
1005
1280
|
|
|
1006
1281
|
//# sourceMappingURL=ReportsPage.js.map
|