@burdenoff/microfe-brainyrich 2026.705.1 → 2026.706.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 +13 -13
- package/dist/brainyrich/components/ActorName.js +38 -0
- package/dist/brainyrich/components/ActorName.js.map +1 -0
- package/dist/brainyrich/components/ConfirmDialog.js +25 -0
- package/dist/brainyrich/components/ConfirmDialog.js.map +1 -0
- package/dist/brainyrich/components/LoadMore.js +24 -0
- package/dist/brainyrich/components/LoadMore.js.map +1 -0
- package/dist/brainyrich/components/index.js +5 -0
- package/dist/brainyrich/components/notify.js +38 -0
- package/dist/brainyrich/components/notify.js.map +1 -0
- package/dist/brainyrich/components/pickers.js +232 -0
- package/dist/brainyrich/components/pickers.js.map +1 -0
- package/dist/brainyrich/components/reuse/CommentThread.js +208 -0
- package/dist/brainyrich/components/reuse/CommentThread.js.map +1 -0
- package/dist/brainyrich/components/reuse/DocumentsPanel.js +237 -0
- package/dist/brainyrich/components/reuse/DocumentsPanel.js.map +1 -0
- package/dist/brainyrich/components/reuse/TagField.js +206 -0
- package/dist/brainyrich/components/reuse/TagField.js.map +1 -0
- package/dist/brainyrich/components/reuse/transport.js +24 -0
- package/dist/brainyrich/components/reuse/transport.js.map +1 -0
- package/dist/brainyrich/hooks/useBrainyRichApi.js +644 -372
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/pages/AccountsPage.js +346 -293
- package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
- package/dist/brainyrich/pages/AiAssistantPage.js +339 -320
- package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
- package/dist/brainyrich/pages/AnalyticsPage.js +178 -164
- package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
- package/dist/brainyrich/pages/DashboardPage.js +195 -169
- package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
- package/dist/brainyrich/pages/FamilyPage.js +247 -198
- package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
- package/dist/brainyrich/pages/GoalsPage.js +478 -442
- package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
- package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.js +438 -396
- package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js +246 -213
- package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js +321 -173
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/pages/TaxPage.js +258 -225
- package/dist/brainyrich/pages/TaxPage.js.map +1 -1
- package/dist/brainyrich/pages/_shared.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +163 -0
- package/dist/node_modules/sonner/dist/index.js.map +1 -0
- package/package.json +3 -2
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useAcknowledgeInsight as e, useAllAccounts as t, useAllTransactions as n, useCreateInsight as r, useDismissInsight as i, useHoldings as a, usePagedInsights as o, usePortfolios as ee, useResolveInsight as te } from "../hooks/useBrainyRichApi.js";
|
|
2
|
+
import { LoadMore as ne } from "../components/LoadMore.js";
|
|
3
|
+
import { ConfirmDialog as re } from "../components/ConfirmDialog.js";
|
|
4
|
+
import "../components/index.js";
|
|
5
|
+
import { EmptyState as s, ErrorState as c, KpiGrid as ie, LoadingState as l, SectionShell as u, deltaToneClass as d, formatDate as f, formatMoney as p, statusBadgeVariant as m } from "./_shared.js";
|
|
6
|
+
import { useMemo as h, useState as g } from "react";
|
|
7
|
+
import { ArrowDownRight as ae, ArrowUpRight as oe, Check as se, Coins as ce, Landmark as le, MoreHorizontal as ue, Receipt as de, ReceiptText as fe, ShieldCheck as _, Sparkles as pe, TrendingDown as me, TrendingUp as v, X as he } from "lucide-react";
|
|
8
|
+
import { Fragment as ge, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
9
|
+
import { Badge as x, Button as S, Card as C, CardContent as w, CardDescription as T, CardHeader as E, CardTitle as D, Dialog as _e, DialogClose as ve, DialogContent as ye, DialogDescription as be, DialogFooter as xe, DialogHeader as Se, DialogTitle as Ce, DropdownMenu as O, DropdownMenuContent as k, DropdownMenuItem as A, DropdownMenuLabel as j, DropdownMenuSeparator as M, DropdownMenuTrigger as N, Input as we, Label as P, Select as F, SelectContent as I, SelectItem as L, SelectTrigger as R, SelectValue as z, Table as B, TableBody as Te, TableCell as V, TableHead as H, TableHeader as U, TableRow as W, Tabs as Ee, TabsContent as De, TabsList as Oe, TabsTrigger as ke, Textarea as Ae } from "@burdenoff/fe-libs/ui";
|
|
7
10
|
//#region src/brainyrich/pages/TaxPage.tsx
|
|
8
|
-
var
|
|
11
|
+
var je = [
|
|
9
12
|
"INFO",
|
|
10
13
|
"LOW",
|
|
11
14
|
"MEDIUM",
|
|
@@ -18,260 +21,271 @@ function G(e) {
|
|
|
18
21
|
function K(e) {
|
|
19
22
|
return e.marketValue - e.costBasis;
|
|
20
23
|
}
|
|
21
|
-
var
|
|
24
|
+
var Me = {
|
|
22
25
|
title: "",
|
|
23
26
|
detail: "",
|
|
24
27
|
severity: "MEDIUM",
|
|
25
28
|
subject: ""
|
|
26
29
|
};
|
|
27
|
-
function
|
|
28
|
-
let {
|
|
29
|
-
function
|
|
30
|
-
|
|
30
|
+
function Ne() {
|
|
31
|
+
let { items: a, hasMore: d, loadMore: m, isLoading: ae, isFetchingNextPage: oe, isError: se, refetch: ue } = o(), { data: _, isLoading: me, isError: v, refetch: he } = n(), { data: O, isLoading: k } = t(), { data: A } = ee(), j = r(), M = e(), N = i(), Ne = te(), [Fe, Le] = g(!1), [q, J] = g(Me), [Re, Y] = g(null), [X, ze] = g(null), Z = h(() => a.filter((e) => e.type === "TAX_OPPORTUNITY"), [a]), Be = Z.filter((e) => e.status === "OPEN"), Q = h(() => _.filter((e) => e.type === "SELL"), [_]), $ = h(() => _.filter((e) => e.type === "DIVIDEND" || e.type === "INTEREST"), [_]), Ve = Q.reduce((e, t) => e + t.amount, 0), He = $.reduce((e, t) => e + t.amount, 0), Ue = Q[0]?.currency ?? $[0]?.currency ?? "USD", We = h(() => O.reduce((e, t) => e + t.holdings.reduce((e, t) => e + K(t), 0), 0), [O]), Ge = O[0]?.currency ?? Ue, Ke = O.length > 0 || A.length > 0;
|
|
32
|
+
function qe() {
|
|
33
|
+
J(Me), Y(null), Le(!0);
|
|
31
34
|
}
|
|
32
|
-
function
|
|
33
|
-
let e =
|
|
35
|
+
function Je() {
|
|
36
|
+
let e = q.title.trim();
|
|
34
37
|
if (!e) {
|
|
35
38
|
Y("A title is required.");
|
|
36
39
|
return;
|
|
37
40
|
}
|
|
38
|
-
if (!
|
|
41
|
+
if (!q.subject) {
|
|
39
42
|
Y("Select the account or portfolio this opportunity applies to.");
|
|
40
43
|
return;
|
|
41
44
|
}
|
|
42
|
-
let [t, n] =
|
|
45
|
+
let [t, n] = q.subject.split(":");
|
|
43
46
|
if (!t || !n) {
|
|
44
47
|
Y("Select a valid subject.");
|
|
45
48
|
return;
|
|
46
49
|
}
|
|
47
|
-
|
|
50
|
+
j.mutate({
|
|
48
51
|
type: "TAX_OPPORTUNITY",
|
|
49
|
-
severity:
|
|
52
|
+
severity: q.severity,
|
|
50
53
|
title: e,
|
|
51
|
-
detail:
|
|
54
|
+
detail: q.detail.trim() || null,
|
|
52
55
|
subjectId: n,
|
|
53
56
|
subjectType: t
|
|
54
57
|
}, {
|
|
55
58
|
onSuccess: () => {
|
|
56
|
-
|
|
59
|
+
Le(!1), J(Me);
|
|
57
60
|
},
|
|
58
61
|
onError: (e) => {
|
|
59
62
|
Y(e instanceof Error ? e.message : "Could not create the tax insight.");
|
|
60
63
|
}
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
|
-
let
|
|
64
|
-
return /* @__PURE__ */
|
|
66
|
+
let Ye = M.isPending || N.isPending || Ne.isPending;
|
|
67
|
+
return /* @__PURE__ */ b(u, {
|
|
65
68
|
title: "Tax Center",
|
|
66
69
|
description: "Act on tax-opportunity insights and review unrealized and realized gains — all from your live portfolio data.",
|
|
67
|
-
badges: [`${
|
|
70
|
+
badges: [`${Be.length} open opportunit${Be.length === 1 ? "y" : "ies"}`],
|
|
68
71
|
actionLabel: "New tax insight",
|
|
69
|
-
onAction:
|
|
72
|
+
onAction: qe,
|
|
70
73
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ y(ie, { items: [
|
|
72
75
|
{
|
|
73
76
|
label: "Open tax opportunities",
|
|
74
|
-
value: String(
|
|
77
|
+
value: String(Be.length)
|
|
75
78
|
},
|
|
76
79
|
{
|
|
77
80
|
label: "Tax insights (all)",
|
|
78
|
-
value: String(
|
|
81
|
+
value: String(Z.length)
|
|
79
82
|
},
|
|
80
83
|
{
|
|
81
84
|
label: "Realized proceeds",
|
|
82
|
-
value:
|
|
83
|
-
trend: `${
|
|
85
|
+
value: p(Ve, Ue),
|
|
86
|
+
trend: `${Q.length} sale${Q.length === 1 ? "" : "s"}`
|
|
84
87
|
},
|
|
85
88
|
{
|
|
86
89
|
label: "Investment income",
|
|
87
|
-
value:
|
|
88
|
-
trend: `${
|
|
90
|
+
value: p(He, Ue),
|
|
91
|
+
trend: `${$.length} dividend/interest`
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: "Unrealized P/L (all accounts)",
|
|
95
|
+
value: k ? "—" : p(We, Ge),
|
|
96
|
+
trend: k ? "Loading…" : We >= 0 ? "Net gain" : "Net loss",
|
|
97
|
+
deltaTone: We >= 0 ? "positive" : "negative"
|
|
89
98
|
}
|
|
90
99
|
] }),
|
|
91
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ b(Ee, {
|
|
92
101
|
defaultValue: "opportunities",
|
|
93
102
|
className: "space-y-4",
|
|
94
103
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ b(Oe, {
|
|
96
105
|
className: "grid w-full grid-cols-3",
|
|
97
106
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ y(ke, {
|
|
99
108
|
value: "opportunities",
|
|
100
109
|
children: "Tax Opportunities"
|
|
101
110
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ y(ke, {
|
|
103
112
|
value: "unrealized",
|
|
104
113
|
children: "Unrealized Gains"
|
|
105
114
|
}),
|
|
106
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ y(ke, {
|
|
107
116
|
value: "realized",
|
|
108
117
|
children: "Realized Activity"
|
|
109
118
|
})
|
|
110
119
|
]
|
|
111
120
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ y(De, {
|
|
113
122
|
value: "opportunities",
|
|
114
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ b(C, { children: [/* @__PURE__ */ b(E, { children: [/* @__PURE__ */ b(D, {
|
|
115
124
|
className: "flex items-center gap-2",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
125
|
+
children: [/* @__PURE__ */ y(pe, {
|
|
117
126
|
className: "h-5 w-5",
|
|
118
127
|
"aria-hidden": "true"
|
|
119
128
|
}), "Tax-opportunity insights"]
|
|
120
|
-
}), /* @__PURE__ */
|
|
121
|
-
icon: /* @__PURE__ */
|
|
129
|
+
}), /* @__PURE__ */ y(T, { children: "Tax-loss harvesting and other tax signals detected across your accounts and portfolios." })] }), /* @__PURE__ */ y(w, { children: ae ? /* @__PURE__ */ y(l, {}) : se ? /* @__PURE__ */ y(c, { onRetry: () => ue() }) : Z.length === 0 ? /* @__PURE__ */ y(s, {
|
|
130
|
+
icon: /* @__PURE__ */ y(de, {
|
|
122
131
|
className: "size-6",
|
|
123
132
|
"aria-hidden": "true"
|
|
124
133
|
}),
|
|
125
134
|
title: "No tax opportunities yet",
|
|
126
135
|
description: "Tax-opportunity insights appear here as the backend generates them from your holdings. You can also flag one manually.",
|
|
127
|
-
action:
|
|
136
|
+
action: Ke ? /* @__PURE__ */ b(S, {
|
|
128
137
|
size: "sm",
|
|
129
|
-
onClick:
|
|
130
|
-
children: [/* @__PURE__ */
|
|
138
|
+
onClick: qe,
|
|
139
|
+
children: [/* @__PURE__ */ y(pe, {
|
|
131
140
|
className: "size-4",
|
|
132
141
|
"aria-hidden": "true"
|
|
133
142
|
}), "New tax insight"]
|
|
134
143
|
}) : void 0
|
|
135
|
-
}) : /* @__PURE__ */
|
|
144
|
+
}) : /* @__PURE__ */ b("div", {
|
|
136
145
|
className: "space-y-3",
|
|
137
|
-
children:
|
|
146
|
+
children: [Z.map((e) => /* @__PURE__ */ y(Ie, {
|
|
138
147
|
insight: e,
|
|
139
|
-
actionPending:
|
|
140
|
-
onAcknowledge: () =>
|
|
141
|
-
onResolve: () =>
|
|
142
|
-
onDismiss: () =>
|
|
143
|
-
}, e.id))
|
|
148
|
+
actionPending: Ye,
|
|
149
|
+
onAcknowledge: () => M.mutate(e.id),
|
|
150
|
+
onResolve: () => Ne.mutate(e.id),
|
|
151
|
+
onDismiss: () => ze(e)
|
|
152
|
+
}, e.id)), /* @__PURE__ */ y(ne, {
|
|
153
|
+
hasMore: d,
|
|
154
|
+
onClick: m,
|
|
155
|
+
loading: oe,
|
|
156
|
+
label: "Load more insights"
|
|
157
|
+
})]
|
|
144
158
|
}) })] })
|
|
145
159
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ y(De, {
|
|
147
161
|
value: "unrealized",
|
|
148
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ y(Pe, { accounts: O })
|
|
149
163
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ y(De, {
|
|
151
165
|
value: "realized",
|
|
152
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ b(C, { children: [/* @__PURE__ */ b(E, { children: [/* @__PURE__ */ b(D, {
|
|
153
167
|
className: "flex items-center gap-2",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ y(fe, {
|
|
155
169
|
className: "h-5 w-5",
|
|
156
170
|
"aria-hidden": "true"
|
|
157
171
|
}), "Realized activity"]
|
|
158
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ y(T, { children: "Realized sales, dividends and interest — the taxable events recorded on your accounts." })] }), /* @__PURE__ */ y(w, {
|
|
159
173
|
className: "space-y-6",
|
|
160
|
-
children:
|
|
161
|
-
icon: /* @__PURE__ */
|
|
174
|
+
children: me ? /* @__PURE__ */ y(l, {}) : v ? /* @__PURE__ */ y(c, { onRetry: () => he() }) : Q.length === 0 && $.length === 0 ? /* @__PURE__ */ y(s, {
|
|
175
|
+
icon: /* @__PURE__ */ y(fe, {
|
|
162
176
|
className: "size-6",
|
|
163
177
|
"aria-hidden": "true"
|
|
164
178
|
}),
|
|
165
179
|
title: "No taxable activity recorded",
|
|
166
180
|
description: "Sales, dividends and interest show up here once transactions are recorded against your accounts."
|
|
167
|
-
}) : /* @__PURE__ */
|
|
181
|
+
}) : /* @__PURE__ */ b(ge, { children: [/* @__PURE__ */ b("div", {
|
|
168
182
|
className: "space-y-2",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ b("div", {
|
|
170
184
|
className: "flex items-center gap-2",
|
|
171
185
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ y(le, {
|
|
173
187
|
className: "size-4 text-text-secondary",
|
|
174
188
|
"aria-hidden": "true"
|
|
175
189
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ y("h3", {
|
|
177
191
|
className: "text-sm font-semibold text-text-primary",
|
|
178
192
|
children: "Realized sales"
|
|
179
193
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ y(x, {
|
|
181
195
|
variant: "secondary",
|
|
182
|
-
children:
|
|
196
|
+
children: Q.length
|
|
183
197
|
})
|
|
184
198
|
]
|
|
185
|
-
}),
|
|
199
|
+
}), Q.length === 0 ? /* @__PURE__ */ y("p", {
|
|
186
200
|
className: "text-sm text-text-secondary",
|
|
187
201
|
children: "No sales recorded."
|
|
188
|
-
}) : /* @__PURE__ */
|
|
202
|
+
}) : /* @__PURE__ */ y("div", {
|
|
189
203
|
className: "overflow-x-auto",
|
|
190
|
-
children: /* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
204
|
+
children: /* @__PURE__ */ b(B, { children: [/* @__PURE__ */ y(U, { children: /* @__PURE__ */ b(W, { children: [
|
|
205
|
+
/* @__PURE__ */ y(H, { children: "Symbol" }),
|
|
206
|
+
/* @__PURE__ */ y(H, {
|
|
193
207
|
className: "text-right",
|
|
194
208
|
children: "Quantity"
|
|
195
209
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ y(H, {
|
|
197
211
|
className: "text-right",
|
|
198
212
|
children: "Price"
|
|
199
213
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ y(H, {
|
|
201
215
|
className: "text-right",
|
|
202
216
|
children: "Proceeds"
|
|
203
217
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
] }) }), /* @__PURE__ */
|
|
206
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ y(H, { children: "Trade date" })
|
|
219
|
+
] }) }), /* @__PURE__ */ y(Te, { children: Q.map((e) => /* @__PURE__ */ b(W, { children: [
|
|
220
|
+
/* @__PURE__ */ y(V, {
|
|
207
221
|
className: "font-medium text-text-primary",
|
|
208
222
|
children: e.symbol ?? "—"
|
|
209
223
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ y(V, {
|
|
211
225
|
className: "text-right text-text-secondary",
|
|
212
226
|
children: e.quantity
|
|
213
227
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ y(V, {
|
|
215
229
|
className: "text-right text-text-secondary",
|
|
216
|
-
children:
|
|
230
|
+
children: p(e.price, e.currency)
|
|
217
231
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ y(V, {
|
|
219
233
|
className: "text-right font-medium text-text-primary",
|
|
220
|
-
children:
|
|
234
|
+
children: p(e.amount, e.currency)
|
|
221
235
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ y(V, {
|
|
223
237
|
className: "text-text-secondary",
|
|
224
|
-
children:
|
|
238
|
+
children: f(e.tradeDate)
|
|
225
239
|
})
|
|
226
240
|
] }, e.id)) })] })
|
|
227
241
|
})]
|
|
228
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ b("div", {
|
|
229
243
|
className: "space-y-2",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ b("div", {
|
|
231
245
|
className: "flex items-center gap-2",
|
|
232
246
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ y(ce, {
|
|
234
248
|
className: "size-4 text-text-secondary",
|
|
235
249
|
"aria-hidden": "true"
|
|
236
250
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ y("h3", {
|
|
238
252
|
className: "text-sm font-semibold text-text-primary",
|
|
239
253
|
children: "Dividends & interest"
|
|
240
254
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ y(x, {
|
|
242
256
|
variant: "secondary",
|
|
243
|
-
children:
|
|
257
|
+
children: $.length
|
|
244
258
|
})
|
|
245
259
|
]
|
|
246
|
-
}),
|
|
260
|
+
}), $.length === 0 ? /* @__PURE__ */ y("p", {
|
|
247
261
|
className: "text-sm text-text-secondary",
|
|
248
262
|
children: "No income recorded."
|
|
249
|
-
}) : /* @__PURE__ */
|
|
263
|
+
}) : /* @__PURE__ */ y("div", {
|
|
250
264
|
className: "overflow-x-auto",
|
|
251
|
-
children: /* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
/* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ b(B, { children: [/* @__PURE__ */ y(U, { children: /* @__PURE__ */ b(W, { children: [
|
|
266
|
+
/* @__PURE__ */ y(H, { children: "Type" }),
|
|
267
|
+
/* @__PURE__ */ y(H, { children: "Symbol" }),
|
|
268
|
+
/* @__PURE__ */ y(H, {
|
|
255
269
|
className: "text-right",
|
|
256
270
|
children: "Amount"
|
|
257
271
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
] }) }), /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ y(H, { children: "Trade date" })
|
|
273
|
+
] }) }), /* @__PURE__ */ y(Te, { children: $.map((e) => /* @__PURE__ */ b(W, { children: [
|
|
274
|
+
/* @__PURE__ */ y(V, { children: /* @__PURE__ */ y(x, {
|
|
261
275
|
variant: "outline",
|
|
262
276
|
children: G(e.type)
|
|
263
277
|
}) }),
|
|
264
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ y(V, {
|
|
265
279
|
className: "text-text-secondary",
|
|
266
280
|
children: e.symbol ?? "—"
|
|
267
281
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ y(V, {
|
|
269
283
|
className: "text-right font-medium text-status-success-text",
|
|
270
|
-
children:
|
|
284
|
+
children: p(e.amount, e.currency)
|
|
271
285
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ y(V, {
|
|
273
287
|
className: "text-text-secondary",
|
|
274
|
-
children:
|
|
288
|
+
children: f(e.tradeDate)
|
|
275
289
|
})
|
|
276
290
|
] }, e.id)) })] })
|
|
277
291
|
})]
|
|
@@ -280,87 +294,87 @@ function J() {
|
|
|
280
294
|
})
|
|
281
295
|
]
|
|
282
296
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
open:
|
|
297
|
+
/* @__PURE__ */ y(_e, {
|
|
298
|
+
open: Fe,
|
|
285
299
|
onOpenChange: (e) => {
|
|
286
|
-
|
|
300
|
+
Le(e), e || Y(null);
|
|
287
301
|
},
|
|
288
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ b(ye, {
|
|
289
303
|
className: "max-h-[90vh] overflow-y-auto sm:max-w-lg",
|
|
290
304
|
children: [
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
|
|
305
|
+
/* @__PURE__ */ b(Se, { children: [/* @__PURE__ */ y(Ce, { children: "New tax insight" }), /* @__PURE__ */ y(be, { children: "Flag a tax opportunity against one of your accounts or portfolios." })] }),
|
|
306
|
+
Ke ? /* @__PURE__ */ b("div", {
|
|
293
307
|
className: "space-y-4 py-2",
|
|
294
308
|
children: [
|
|
295
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ b("div", {
|
|
296
310
|
className: "space-y-2",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
311
|
+
children: [/* @__PURE__ */ y(P, {
|
|
298
312
|
htmlFor: "tax-title",
|
|
299
313
|
children: "Title"
|
|
300
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ y(we, {
|
|
301
315
|
id: "tax-title",
|
|
302
|
-
value:
|
|
303
|
-
onChange: (e) =>
|
|
316
|
+
value: q.title,
|
|
317
|
+
onChange: (e) => J((t) => ({
|
|
304
318
|
...t,
|
|
305
319
|
title: e.target.value
|
|
306
320
|
})),
|
|
307
321
|
placeholder: "e.g. Harvest losses in tech holdings"
|
|
308
322
|
})]
|
|
309
323
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ b("div", {
|
|
311
325
|
className: "grid gap-4 sm:grid-cols-2",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ b("div", {
|
|
313
327
|
className: "space-y-2",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ y(P, {
|
|
315
329
|
htmlFor: "tax-severity",
|
|
316
330
|
children: "Severity"
|
|
317
|
-
}), /* @__PURE__ */
|
|
318
|
-
value:
|
|
319
|
-
onValueChange: (e) =>
|
|
331
|
+
}), /* @__PURE__ */ b(F, {
|
|
332
|
+
value: q.severity,
|
|
333
|
+
onValueChange: (e) => J((t) => ({
|
|
320
334
|
...t,
|
|
321
335
|
severity: e
|
|
322
336
|
})),
|
|
323
|
-
children: [/* @__PURE__ */
|
|
337
|
+
children: [/* @__PURE__ */ y(R, {
|
|
324
338
|
id: "tax-severity",
|
|
325
|
-
children: /* @__PURE__ */
|
|
326
|
-
}), /* @__PURE__ */
|
|
339
|
+
children: /* @__PURE__ */ y(z, {})
|
|
340
|
+
}), /* @__PURE__ */ y(I, { children: je.map((e) => /* @__PURE__ */ y(L, {
|
|
327
341
|
value: e,
|
|
328
342
|
children: G(e)
|
|
329
343
|
}, e)) })]
|
|
330
344
|
})]
|
|
331
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ b("div", {
|
|
332
346
|
className: "space-y-2",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ y(P, {
|
|
334
348
|
htmlFor: "tax-subject",
|
|
335
349
|
children: "Applies to"
|
|
336
|
-
}), /* @__PURE__ */
|
|
337
|
-
value:
|
|
338
|
-
onValueChange: (e) =>
|
|
350
|
+
}), /* @__PURE__ */ b(F, {
|
|
351
|
+
value: q.subject,
|
|
352
|
+
onValueChange: (e) => J((t) => ({
|
|
339
353
|
...t,
|
|
340
354
|
subject: e
|
|
341
355
|
})),
|
|
342
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ y(R, {
|
|
343
357
|
id: "tax-subject",
|
|
344
|
-
children: /* @__PURE__ */
|
|
345
|
-
}), /* @__PURE__ */
|
|
358
|
+
children: /* @__PURE__ */ y(z, { placeholder: "Select subject" })
|
|
359
|
+
}), /* @__PURE__ */ b(I, { children: [A.map((e) => /* @__PURE__ */ b(L, {
|
|
346
360
|
value: `portfolio:${e.id}`,
|
|
347
361
|
children: ["Portfolio · ", e.name]
|
|
348
|
-
}, `portfolio:${e.id}`)),
|
|
362
|
+
}, `portfolio:${e.id}`)), O.map((e) => /* @__PURE__ */ b(L, {
|
|
349
363
|
value: `account:${e.id}`,
|
|
350
364
|
children: ["Account · ", e.name]
|
|
351
365
|
}, `account:${e.id}`))] })]
|
|
352
366
|
})]
|
|
353
367
|
})]
|
|
354
368
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ b("div", {
|
|
356
370
|
className: "space-y-2",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ y(P, {
|
|
358
372
|
htmlFor: "tax-detail",
|
|
359
373
|
children: "Detail"
|
|
360
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ y(Ae, {
|
|
361
375
|
id: "tax-detail",
|
|
362
|
-
value:
|
|
363
|
-
onChange: (e) =>
|
|
376
|
+
value: q.detail,
|
|
377
|
+
onChange: (e) => J((t) => ({
|
|
364
378
|
...t,
|
|
365
379
|
detail: e.target.value
|
|
366
380
|
})),
|
|
@@ -368,36 +382,55 @@ function J() {
|
|
|
368
382
|
placeholder: "What is the opportunity and how should it be actioned?"
|
|
369
383
|
})]
|
|
370
384
|
}),
|
|
371
|
-
|
|
385
|
+
Re ? /* @__PURE__ */ y("p", {
|
|
372
386
|
className: "text-sm text-status-error-text",
|
|
373
387
|
role: "alert",
|
|
374
|
-
children:
|
|
388
|
+
children: Re
|
|
375
389
|
}) : null
|
|
376
390
|
]
|
|
377
|
-
}) : /* @__PURE__ */
|
|
391
|
+
}) : /* @__PURE__ */ y(s, {
|
|
378
392
|
title: "No subject available",
|
|
379
393
|
description: "Create an account or portfolio first, then flag a tax opportunity against it."
|
|
380
394
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
395
|
+
/* @__PURE__ */ b(xe, { children: [/* @__PURE__ */ y(ve, {
|
|
382
396
|
asChild: !0,
|
|
383
|
-
children: /* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ y(S, {
|
|
384
398
|
variant: "outline",
|
|
385
|
-
disabled:
|
|
399
|
+
disabled: j.isPending,
|
|
386
400
|
children: "Cancel"
|
|
387
401
|
})
|
|
388
|
-
}), /* @__PURE__ */
|
|
389
|
-
onClick:
|
|
390
|
-
disabled:
|
|
391
|
-
children:
|
|
402
|
+
}), /* @__PURE__ */ y(S, {
|
|
403
|
+
onClick: Je,
|
|
404
|
+
disabled: !Ke || !q.title.trim() || !q.subject || j.isPending,
|
|
405
|
+
children: j.isPending ? "Creating…" : "Create insight"
|
|
392
406
|
})] })
|
|
393
407
|
]
|
|
394
408
|
})
|
|
409
|
+
}),
|
|
410
|
+
/* @__PURE__ */ y(re, {
|
|
411
|
+
open: !!X,
|
|
412
|
+
onOpenChange: (e) => {
|
|
413
|
+
e || ze(null);
|
|
414
|
+
},
|
|
415
|
+
title: "Dismiss tax insight?",
|
|
416
|
+
description: X ? /* @__PURE__ */ b(ge, { children: [
|
|
417
|
+
"“",
|
|
418
|
+
X.title,
|
|
419
|
+
"” will be marked as dismissed and removed from your open opportunities. This does not delete the underlying holdings or transactions."
|
|
420
|
+
] }) : void 0,
|
|
421
|
+
confirmLabel: "Dismiss insight",
|
|
422
|
+
pendingLabel: "Dismissing…",
|
|
423
|
+
destructive: !0,
|
|
424
|
+
pending: N.isPending,
|
|
425
|
+
onConfirm: () => {
|
|
426
|
+
X && N.mutate(X.id, { onSuccess: () => ze(null) });
|
|
427
|
+
}
|
|
395
428
|
})
|
|
396
429
|
]
|
|
397
430
|
});
|
|
398
431
|
}
|
|
399
|
-
function
|
|
400
|
-
let [t, n] =
|
|
432
|
+
function Pe({ accounts: e }) {
|
|
433
|
+
let [t, n] = g(""), r = t || e[0]?.id, i = e.find((e) => e.id === r), { data: o, isLoading: ee, isError: te, refetch: ne } = a({ accountId: r }), re = i?.currency ?? o[0]?.currency ?? "USD", u = o.reduce((e, t) => e + K(t), 0), d = o.filter((e) => K(e) > 0).length, f = o.filter((e) => K(e) < 0).length, m = h(() => {
|
|
401
434
|
let e = /* @__PURE__ */ new Map();
|
|
402
435
|
for (let t of o) {
|
|
403
436
|
let n = e.get(t.assetClass) ?? [];
|
|
@@ -405,57 +438,57 @@ function Ae({ accounts: e }) {
|
|
|
405
438
|
}
|
|
406
439
|
return Array.from(e.entries());
|
|
407
440
|
}, [o]);
|
|
408
|
-
return e.length === 0 ? /* @__PURE__ */
|
|
441
|
+
return e.length === 0 ? /* @__PURE__ */ y(C, { children: /* @__PURE__ */ y(w, {
|
|
409
442
|
className: "pt-6",
|
|
410
|
-
children: /* @__PURE__ */
|
|
411
|
-
icon: /* @__PURE__ */ v
|
|
443
|
+
children: /* @__PURE__ */ y(s, {
|
|
444
|
+
icon: /* @__PURE__ */ y(v, {
|
|
412
445
|
className: "size-6",
|
|
413
446
|
"aria-hidden": "true"
|
|
414
447
|
}),
|
|
415
448
|
title: "No accounts yet",
|
|
416
449
|
description: "Add an account with holdings to see unrealized gains and losses."
|
|
417
450
|
})
|
|
418
|
-
}) }) : /* @__PURE__ */
|
|
451
|
+
}) }) : /* @__PURE__ */ b(C, { children: [/* @__PURE__ */ b(E, {
|
|
419
452
|
className: "flex flex-col gap-4 md:flex-row md:items-start md:justify-between",
|
|
420
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b(D, {
|
|
421
454
|
className: "flex items-center gap-2",
|
|
422
|
-
children: [/* @__PURE__ */ v
|
|
455
|
+
children: [/* @__PURE__ */ y(v, {
|
|
423
456
|
className: "h-5 w-5",
|
|
424
457
|
"aria-hidden": "true"
|
|
425
458
|
}), "Unrealized gains & losses"]
|
|
426
|
-
}), /* @__PURE__ */
|
|
459
|
+
}), /* @__PURE__ */ y(T, { children: "Market value minus cost basis for each holding in the selected account." })] }), /* @__PURE__ */ b("div", {
|
|
427
460
|
className: "w-full md:w-64",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
461
|
+
children: [/* @__PURE__ */ y(P, {
|
|
429
462
|
htmlFor: "unrealized-account",
|
|
430
463
|
className: "sr-only",
|
|
431
464
|
children: "Account"
|
|
432
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ b(F, {
|
|
433
466
|
value: r ?? "",
|
|
434
467
|
onValueChange: n,
|
|
435
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ y(R, {
|
|
436
469
|
id: "unrealized-account",
|
|
437
|
-
children: /* @__PURE__ */
|
|
438
|
-
}), /* @__PURE__ */
|
|
470
|
+
children: /* @__PURE__ */ y(z, { placeholder: "Select account" })
|
|
471
|
+
}), /* @__PURE__ */ y(I, { children: e.map((e) => /* @__PURE__ */ y(L, {
|
|
439
472
|
value: e.id,
|
|
440
473
|
children: e.name
|
|
441
474
|
}, e.id)) })]
|
|
442
475
|
})]
|
|
443
476
|
})]
|
|
444
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ y(w, {
|
|
445
478
|
className: "space-y-4",
|
|
446
|
-
children: ee ? /* @__PURE__ */
|
|
447
|
-
icon: /* @__PURE__ */ v
|
|
479
|
+
children: ee ? /* @__PURE__ */ y(l, {}) : te ? /* @__PURE__ */ y(c, { onRetry: () => ne() }) : o.length === 0 ? /* @__PURE__ */ y(s, {
|
|
480
|
+
icon: /* @__PURE__ */ y(v, {
|
|
448
481
|
className: "size-6",
|
|
449
482
|
"aria-hidden": "true"
|
|
450
483
|
}),
|
|
451
484
|
title: "No holdings in this account",
|
|
452
485
|
description: "Unrealized gains appear once this account has holdings with a cost basis."
|
|
453
|
-
}) : /* @__PURE__ */
|
|
486
|
+
}) : /* @__PURE__ */ b(ge, { children: [/* @__PURE__ */ y(ie, { items: [
|
|
454
487
|
{
|
|
455
488
|
label: "Unrealized P/L",
|
|
456
|
-
value: u
|
|
457
|
-
trend:
|
|
458
|
-
deltaTone:
|
|
489
|
+
value: p(u, re),
|
|
490
|
+
trend: u >= 0 ? "Net gain" : "Net loss",
|
|
491
|
+
deltaTone: u >= 0 ? "positive" : "negative"
|
|
459
492
|
},
|
|
460
493
|
{
|
|
461
494
|
label: "Holdings",
|
|
@@ -467,72 +500,72 @@ function Ae({ accounts: e }) {
|
|
|
467
500
|
},
|
|
468
501
|
{
|
|
469
502
|
label: "Losers",
|
|
470
|
-
value: String(
|
|
503
|
+
value: String(f)
|
|
471
504
|
}
|
|
472
|
-
] }), /* @__PURE__ */
|
|
505
|
+
] }), /* @__PURE__ */ y("div", {
|
|
473
506
|
className: "space-y-6",
|
|
474
507
|
children: m.map(([e, t]) => {
|
|
475
508
|
let n = t.reduce((e, t) => e + K(t), 0);
|
|
476
|
-
return /* @__PURE__ */
|
|
509
|
+
return /* @__PURE__ */ b("div", {
|
|
477
510
|
className: "space-y-2",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ b("div", {
|
|
479
512
|
className: "flex items-center justify-between",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ b("div", {
|
|
481
514
|
className: "flex items-center gap-2",
|
|
482
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ y("h3", {
|
|
483
516
|
className: "text-sm font-semibold text-text-primary",
|
|
484
517
|
children: G(e)
|
|
485
|
-
}), /* @__PURE__ */
|
|
518
|
+
}), /* @__PURE__ */ y(x, {
|
|
486
519
|
variant: "secondary",
|
|
487
520
|
children: t.length
|
|
488
521
|
})]
|
|
489
|
-
}), /* @__PURE__ */
|
|
522
|
+
}), /* @__PURE__ */ y(Fe, {
|
|
490
523
|
value: n,
|
|
491
|
-
currency:
|
|
524
|
+
currency: re
|
|
492
525
|
})]
|
|
493
|
-
}), /* @__PURE__ */
|
|
526
|
+
}), /* @__PURE__ */ y("div", {
|
|
494
527
|
className: "overflow-x-auto",
|
|
495
|
-
children: /* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */
|
|
528
|
+
children: /* @__PURE__ */ b(B, { children: [/* @__PURE__ */ y(U, { children: /* @__PURE__ */ b(W, { children: [
|
|
529
|
+
/* @__PURE__ */ y(H, { children: "Symbol" }),
|
|
530
|
+
/* @__PURE__ */ y(H, {
|
|
498
531
|
className: "text-right",
|
|
499
532
|
children: "Quantity"
|
|
500
533
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ y(H, {
|
|
502
535
|
className: "text-right",
|
|
503
536
|
children: "Cost basis"
|
|
504
537
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ y(H, {
|
|
506
539
|
className: "text-right",
|
|
507
540
|
children: "Market value"
|
|
508
541
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
542
|
+
/* @__PURE__ */ y(H, {
|
|
510
543
|
className: "text-right",
|
|
511
544
|
children: "Unrealized"
|
|
512
545
|
})
|
|
513
|
-
] }) }), /* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
546
|
+
] }) }), /* @__PURE__ */ y(Te, { children: t.map((e) => /* @__PURE__ */ b(W, { children: [
|
|
547
|
+
/* @__PURE__ */ b(V, { children: [/* @__PURE__ */ y("p", {
|
|
515
548
|
className: "font-medium text-text-primary",
|
|
516
549
|
children: e.symbol
|
|
517
|
-
}), e.name ? /* @__PURE__ */
|
|
550
|
+
}), e.name ? /* @__PURE__ */ y("p", {
|
|
518
551
|
className: "text-xs text-text-secondary",
|
|
519
552
|
children: e.name
|
|
520
553
|
}) : null] }),
|
|
521
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ y(V, {
|
|
522
555
|
className: "text-right text-text-secondary",
|
|
523
556
|
children: e.quantity
|
|
524
557
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ y(V, {
|
|
526
559
|
className: "text-right text-text-secondary",
|
|
527
|
-
children:
|
|
560
|
+
children: p(e.costBasis, e.currency)
|
|
528
561
|
}),
|
|
529
|
-
/* @__PURE__ */
|
|
562
|
+
/* @__PURE__ */ y(V, {
|
|
530
563
|
className: "text-right text-text-primary",
|
|
531
|
-
children:
|
|
564
|
+
children: p(e.marketValue, e.currency)
|
|
532
565
|
}),
|
|
533
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ y(V, {
|
|
534
567
|
className: "text-right",
|
|
535
|
-
children: /* @__PURE__ */
|
|
568
|
+
children: /* @__PURE__ */ y(Fe, {
|
|
536
569
|
value: K(e),
|
|
537
570
|
currency: e.currency
|
|
538
571
|
})
|
|
@@ -544,95 +577,95 @@ function Ae({ accounts: e }) {
|
|
|
544
577
|
})] })
|
|
545
578
|
})] });
|
|
546
579
|
}
|
|
547
|
-
function
|
|
548
|
-
let n = e > 0, r = n ?
|
|
549
|
-
return /* @__PURE__ */
|
|
550
|
-
className: `inline-flex items-center justify-end gap-1 font-semibold ${
|
|
580
|
+
function Fe({ value: e, currency: t }) {
|
|
581
|
+
let n = e > 0, r = n ? oe : e < 0 ? ae : me, i = n ? "+" : "";
|
|
582
|
+
return /* @__PURE__ */ b("span", {
|
|
583
|
+
className: `inline-flex items-center justify-end gap-1 font-semibold ${d(e)}`,
|
|
551
584
|
children: [
|
|
552
|
-
e === 0 ? null : /* @__PURE__ */
|
|
585
|
+
e === 0 ? null : /* @__PURE__ */ y(r, {
|
|
553
586
|
className: "size-4",
|
|
554
587
|
"aria-hidden": "true"
|
|
555
588
|
}),
|
|
556
589
|
i,
|
|
557
|
-
|
|
590
|
+
p(e, t)
|
|
558
591
|
]
|
|
559
592
|
});
|
|
560
593
|
}
|
|
561
|
-
function
|
|
594
|
+
function Ie({ insight: e, actionPending: t, onAcknowledge: n, onResolve: r, onDismiss: i }) {
|
|
562
595
|
let a = e.status === "RESOLVED" || e.status === "DISMISSED";
|
|
563
|
-
return /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ b("div", {
|
|
564
597
|
className: "flex items-start justify-between gap-4 rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
565
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ b("div", {
|
|
566
599
|
className: "min-w-0 space-y-1",
|
|
567
600
|
children: [
|
|
568
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ b("div", {
|
|
569
602
|
className: "flex flex-wrap items-center gap-2",
|
|
570
603
|
children: [
|
|
571
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ y("p", {
|
|
572
605
|
className: "font-medium text-text-primary",
|
|
573
606
|
children: e.title
|
|
574
607
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
-
variant:
|
|
608
|
+
/* @__PURE__ */ y(x, {
|
|
609
|
+
variant: m(e.severity),
|
|
577
610
|
children: G(e.severity)
|
|
578
611
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
580
|
-
variant:
|
|
612
|
+
/* @__PURE__ */ y(x, {
|
|
613
|
+
variant: m(e.status),
|
|
581
614
|
children: G(e.status)
|
|
582
615
|
})
|
|
583
616
|
]
|
|
584
617
|
}),
|
|
585
|
-
e.detail ? /* @__PURE__ */
|
|
618
|
+
e.detail ? /* @__PURE__ */ y("p", {
|
|
586
619
|
className: "text-sm text-text-secondary",
|
|
587
620
|
children: e.detail
|
|
588
621
|
}) : null,
|
|
589
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ b("p", {
|
|
590
623
|
className: "text-xs text-text-muted",
|
|
591
624
|
children: [
|
|
592
625
|
G(e.subjectType),
|
|
593
626
|
" · Detected ",
|
|
594
|
-
|
|
627
|
+
f(e.createdAt)
|
|
595
628
|
]
|
|
596
629
|
})
|
|
597
630
|
]
|
|
598
|
-
}), a ? /* @__PURE__ */
|
|
631
|
+
}), a ? /* @__PURE__ */ y("span", {
|
|
599
632
|
className: "mt-1 text-xs text-text-muted",
|
|
600
633
|
children: "Closed"
|
|
601
|
-
}) : /* @__PURE__ */
|
|
634
|
+
}) : /* @__PURE__ */ b(O, { children: [/* @__PURE__ */ y(N, {
|
|
602
635
|
asChild: !0,
|
|
603
|
-
children: /* @__PURE__ */
|
|
636
|
+
children: /* @__PURE__ */ y(S, {
|
|
604
637
|
variant: "ghost",
|
|
605
638
|
size: "sm",
|
|
606
639
|
"aria-label": `Actions for ${e.title}`,
|
|
607
640
|
disabled: t,
|
|
608
|
-
children: /* @__PURE__ */
|
|
641
|
+
children: /* @__PURE__ */ y(ue, {
|
|
609
642
|
className: "size-4",
|
|
610
643
|
"aria-hidden": "true"
|
|
611
644
|
})
|
|
612
645
|
})
|
|
613
|
-
}), /* @__PURE__ */
|
|
646
|
+
}), /* @__PURE__ */ b(k, {
|
|
614
647
|
align: "end",
|
|
615
648
|
children: [
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
-
/* @__PURE__ */
|
|
618
|
-
e.status === "OPEN" ? /* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ y(j, { children: "Actions" }),
|
|
650
|
+
/* @__PURE__ */ y(M, {}),
|
|
651
|
+
e.status === "OPEN" ? /* @__PURE__ */ b(A, {
|
|
619
652
|
onClick: n,
|
|
620
|
-
children: [/* @__PURE__ */
|
|
653
|
+
children: [/* @__PURE__ */ y(se, {
|
|
621
654
|
className: "size-4",
|
|
622
655
|
"aria-hidden": "true"
|
|
623
656
|
}), "Acknowledge"]
|
|
624
657
|
}) : null,
|
|
625
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ b(A, {
|
|
626
659
|
onClick: r,
|
|
627
|
-
children: [/* @__PURE__ */
|
|
660
|
+
children: [/* @__PURE__ */ y(_, {
|
|
628
661
|
className: "size-4",
|
|
629
662
|
"aria-hidden": "true"
|
|
630
663
|
}), "Resolve"]
|
|
631
664
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ b(A, {
|
|
633
666
|
className: "text-status-error-text",
|
|
634
667
|
onClick: i,
|
|
635
|
-
children: [/* @__PURE__ */
|
|
668
|
+
children: [/* @__PURE__ */ y(he, {
|
|
636
669
|
className: "size-4",
|
|
637
670
|
"aria-hidden": "true"
|
|
638
671
|
}), "Dismiss"]
|
|
@@ -642,6 +675,6 @@ function je({ insight: e, actionPending: t, onAcknowledge: n, onResolve: r, onDi
|
|
|
642
675
|
});
|
|
643
676
|
}
|
|
644
677
|
//#endregion
|
|
645
|
-
export {
|
|
678
|
+
export { Ne as TaxPage };
|
|
646
679
|
|
|
647
680
|
//# sourceMappingURL=TaxPage.js.map
|