@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,13 +1,17 @@
|
|
|
1
1
|
import { tWithFallback as e } from "../utils/i18n.js";
|
|
2
|
-
import { useAccounts as t, useArchiveGoal as n, useCreateGoal as r, useGoal as i, useGoalFundings as a,
|
|
3
|
-
import {
|
|
2
|
+
import { useAccounts as t, useArchiveGoal as n, useCreateGoal as r, useGoal as i, useGoalFundings as a, useHouseholds as o, useLinkGoalFunding as s, usePagedGoals as c, useRecalcGoalProjection as l, useUnlinkGoalFunding as u, useUpdateGoal as ee } from "../hooks/useBrainyRichApi.js";
|
|
3
|
+
import { LoadMore as te } from "../components/LoadMore.js";
|
|
4
|
+
import { ConfirmDialog as ne } from "../components/ConfirmDialog.js";
|
|
5
|
+
import "../components/index.js";
|
|
6
|
+
import { EmptyState as re, ErrorState as ie, KpiGrid as d, LoadingState as ae, SectionShell as f, formatDate as oe, formatMoney as p, statusBadgeVariant as m } from "./_shared.js";
|
|
7
|
+
import { TagField as h } from "../components/reuse/TagField.js";
|
|
4
8
|
import { useMemo as g, useState as _ } from "react";
|
|
5
|
-
import { AlertTriangle as v, CalendarClock as y, Link2 as
|
|
6
|
-
import { useI18n as
|
|
7
|
-
import { Fragment as
|
|
8
|
-
import { Badge as
|
|
9
|
+
import { AlertTriangle as v, CalendarClock as y, Link2 as se, MoreHorizontal as b, Plus as ce, RefreshCw as le, Target as x, Trash2 as S, TrendingDown as C, TrendingUp as w, Unlink as ue } from "lucide-react";
|
|
10
|
+
import { useI18n as de } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
12
|
+
import { Badge as O, Button as k, Card as A, CardContent as j, CardDescription as M, CardHeader as N, CardTitle as fe, Dialog as P, DialogContent as F, DialogDescription as I, DialogFooter as L, DialogHeader as R, DialogTitle as z, DropdownMenu as pe, DropdownMenuContent as me, DropdownMenuItem as B, DropdownMenuSeparator as he, DropdownMenuTrigger as ge, Input as V, Label as H, Select as U, SelectContent as W, SelectItem as G, SelectTrigger as K, SelectValue as q, Sheet as J, SheetContent as Y, SheetDescription as X, SheetHeader as _e, SheetTitle as Z, Textarea as ve } from "@burdenoff/fe-libs/ui";
|
|
9
13
|
//#region src/brainyrich/pages/GoalsPage.tsx
|
|
10
|
-
var
|
|
14
|
+
var ye = [
|
|
11
15
|
"RETIREMENT",
|
|
12
16
|
"EDUCATION",
|
|
13
17
|
"HOME",
|
|
@@ -15,21 +19,21 @@ var _e = [
|
|
|
15
19
|
"MAJOR_PURCHASE",
|
|
16
20
|
"WEALTH_GROWTH",
|
|
17
21
|
"CUSTOM"
|
|
18
|
-
],
|
|
22
|
+
], be = [
|
|
19
23
|
"ACTIVE",
|
|
20
24
|
"ACHIEVED",
|
|
21
25
|
"ON_HOLD",
|
|
22
26
|
"ABANDONED"
|
|
23
27
|
];
|
|
24
|
-
function
|
|
28
|
+
function xe(e) {
|
|
25
29
|
switch (e) {
|
|
26
30
|
case "AHEAD":
|
|
27
31
|
case "ON_TRACK": return {
|
|
28
|
-
icon:
|
|
32
|
+
icon: w,
|
|
29
33
|
tone: "text-status-success-text"
|
|
30
34
|
};
|
|
31
35
|
case "BEHIND": return {
|
|
32
|
-
icon:
|
|
36
|
+
icon: C,
|
|
33
37
|
tone: "text-status-warning-text"
|
|
34
38
|
};
|
|
35
39
|
default: return {
|
|
@@ -38,15 +42,15 @@ function ye(e) {
|
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
|
-
function
|
|
45
|
+
function Q(e) {
|
|
42
46
|
return e.toLowerCase().split("_").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
|
|
43
47
|
}
|
|
44
|
-
function
|
|
48
|
+
function Se(e) {
|
|
45
49
|
if (!e) return "";
|
|
46
50
|
let t = new Date(e);
|
|
47
51
|
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
|
|
48
52
|
}
|
|
49
|
-
function
|
|
53
|
+
function Ce() {
|
|
50
54
|
return {
|
|
51
55
|
name: "",
|
|
52
56
|
type: "CUSTOM",
|
|
@@ -57,590 +61,608 @@ function xe() {
|
|
|
57
61
|
priority: "1",
|
|
58
62
|
currency: "USD",
|
|
59
63
|
householdId: "",
|
|
60
|
-
notes: ""
|
|
61
|
-
tags: ""
|
|
64
|
+
notes: ""
|
|
62
65
|
};
|
|
63
66
|
}
|
|
64
|
-
function
|
|
67
|
+
function we(e) {
|
|
65
68
|
return {
|
|
66
69
|
name: e.name,
|
|
67
70
|
type: e.type,
|
|
68
71
|
status: e.status,
|
|
69
72
|
targetAmount: String(e.targetAmount),
|
|
70
|
-
targetDate:
|
|
73
|
+
targetDate: Se(e.targetDate),
|
|
71
74
|
monthlyContribution: String(e.monthlyContribution),
|
|
72
75
|
priority: String(e.priority),
|
|
73
76
|
currency: e.currency,
|
|
74
77
|
householdId: e.householdId ?? "",
|
|
75
|
-
notes: e.notes ?? ""
|
|
76
|
-
tags: e.tags.join(", ")
|
|
78
|
+
notes: e.notes ?? ""
|
|
77
79
|
};
|
|
78
80
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
var Q = "__none__";
|
|
83
|
-
function we() {
|
|
84
|
-
let { t } = D(), i = (n, r, i) => e(t, n, r, i), { data: a, isLoading: c, isError: l, refetch: u } = o(), { data: v } = s(), w = r(), T = ee(), E = n(), [L, R] = _(!1), [z, B] = _(null), [se, V] = _(null), [U, W] = _(xe), G = (e, t) => W((n) => ({
|
|
81
|
+
var Te = "__none__";
|
|
82
|
+
function Ee() {
|
|
83
|
+
let { t } = de(), i = (n, r, i) => e(t, n, r, i), { items: a, hasMore: s, loadMore: l, isFetchingNextPage: u, isLoading: h, isError: v, refetch: C } = c(), { data: w } = o(), ue = r(), P = ee(), F = n(), [I, L] = _(!1), [R, z] = _(null), [V, H] = _(null), [U, W] = _(null), [G, K] = _(Ce), q = (e, t) => K((n) => ({
|
|
85
84
|
...n,
|
|
86
85
|
[e]: t
|
|
87
|
-
})),
|
|
86
|
+
})), J = g(() => ({
|
|
88
87
|
totalTarget: a.reduce((e, t) => e + t.targetAmount, 0),
|
|
89
88
|
totalMonthly: a.reduce((e, t) => e + t.monthlyContribution, 0),
|
|
90
89
|
atRisk: a.filter((e) => e.projection === "AT_RISK" || e.projection === "BEHIND").length
|
|
91
|
-
}), [a]),
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
return /* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
90
|
+
}), [a]), Y = a[0]?.currency ?? "USD", X = () => {
|
|
91
|
+
K(Ce()), L(!0);
|
|
92
|
+
}, _e = (e) => {
|
|
93
|
+
K(we(e)), z(e);
|
|
94
|
+
}, Z = G.name.trim().length > 0 && Number(G.targetAmount) > 0 && G.targetDate.length > 0;
|
|
95
|
+
return /* @__PURE__ */ D(T, { children: [
|
|
96
|
+
/* @__PURE__ */ E(f, {
|
|
98
97
|
title: i("brainyrich.goals.title", "Financial Goals"),
|
|
99
98
|
description: i("brainyrich.goals.description", "Track progress toward your wealth milestones and life objectives"),
|
|
100
99
|
actionLabel: i("brainyrich.goals.actions.createGoal", "New goal"),
|
|
101
|
-
onAction:
|
|
102
|
-
children:
|
|
100
|
+
onAction: X,
|
|
101
|
+
children: h ? /* @__PURE__ */ E(ae, { rows: 4 }) : v ? /* @__PURE__ */ E(ie, {
|
|
103
102
|
title: i("brainyrich.goals.error.title", "Could not load goals"),
|
|
104
103
|
description: i("brainyrich.goals.error.description", "We could not reach the goals service. Please try again."),
|
|
105
|
-
onRetry: () =>
|
|
106
|
-
}) : a.length === 0 ? /* @__PURE__ */
|
|
107
|
-
icon: /* @__PURE__ */
|
|
104
|
+
onRetry: () => C()
|
|
105
|
+
}) : a.length === 0 ? /* @__PURE__ */ E(re, {
|
|
106
|
+
icon: /* @__PURE__ */ E(x, {
|
|
108
107
|
className: "size-6",
|
|
109
108
|
"aria-hidden": "true"
|
|
110
109
|
}),
|
|
111
110
|
title: i("brainyrich.goals.empty.title", "No financial goals yet"),
|
|
112
111
|
description: i("brainyrich.goals.empty.description", "Create your first goal to start tracking progress toward a milestone."),
|
|
113
|
-
action: /* @__PURE__ */
|
|
112
|
+
action: /* @__PURE__ */ D(k, {
|
|
114
113
|
size: "sm",
|
|
115
|
-
onClick:
|
|
116
|
-
children: [/* @__PURE__ */
|
|
114
|
+
onClick: X,
|
|
115
|
+
children: [/* @__PURE__ */ E(ce, {
|
|
117
116
|
className: "size-4",
|
|
118
117
|
"aria-hidden": "true"
|
|
119
118
|
}), i("brainyrich.goals.actions.createGoal", "New goal")]
|
|
120
119
|
})
|
|
121
|
-
}) : /* @__PURE__ */
|
|
122
|
-
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
className: "
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
-
className: "
|
|
152
|
-
children:
|
|
153
|
-
className: "
|
|
154
|
-
children: [/* @__PURE__ */
|
|
155
|
-
className: "
|
|
156
|
-
children: [/* @__PURE__ */
|
|
157
|
-
className: "
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
children:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
120
|
+
}) : /* @__PURE__ */ D(T, { children: [
|
|
121
|
+
/* @__PURE__ */ E(d, { items: [
|
|
122
|
+
{
|
|
123
|
+
label: i("brainyrich.goals.metrics.activeGoals", "Goals"),
|
|
124
|
+
value: String(a.length),
|
|
125
|
+
trend: i("brainyrich.goals.metrics.activeGoalsTrend", "Being tracked")
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: i("brainyrich.goals.metrics.totalTarget", "Total target"),
|
|
129
|
+
value: p(J.totalTarget, Y)
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: i("brainyrich.goals.metrics.monthly", "Monthly contributions"),
|
|
133
|
+
value: p(J.totalMonthly, Y),
|
|
134
|
+
trend: i("brainyrich.goals.metrics.monthlyTrend", "Across all goals")
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: i("brainyrich.goals.metrics.atRisk", "Needs attention"),
|
|
138
|
+
value: String(J.atRisk),
|
|
139
|
+
trend: i("brainyrich.goals.metrics.atRiskTrend", "Behind or at risk"),
|
|
140
|
+
deltaTone: J.atRisk > 0 ? "negative" : "positive"
|
|
141
|
+
}
|
|
142
|
+
] }),
|
|
143
|
+
/* @__PURE__ */ E("div", {
|
|
144
|
+
className: "grid gap-4 md:grid-cols-2 xl:grid-cols-3",
|
|
145
|
+
children: a.map((e) => {
|
|
146
|
+
let t = xe(e.projection), n = t.icon;
|
|
147
|
+
return /* @__PURE__ */ D(A, {
|
|
148
|
+
className: "flex flex-col",
|
|
149
|
+
children: [/* @__PURE__ */ E(N, {
|
|
150
|
+
className: "pb-3",
|
|
151
|
+
children: /* @__PURE__ */ D("div", {
|
|
152
|
+
className: "flex items-start justify-between gap-2",
|
|
153
|
+
children: [/* @__PURE__ */ D("div", {
|
|
154
|
+
className: "min-w-0",
|
|
155
|
+
children: [/* @__PURE__ */ D(fe, {
|
|
156
|
+
className: "flex items-center gap-2 text-base",
|
|
157
|
+
children: [/* @__PURE__ */ E(x, {
|
|
158
|
+
className: "size-4 shrink-0 text-text-secondary",
|
|
159
|
+
"aria-hidden": "true"
|
|
160
|
+
}), /* @__PURE__ */ E("span", {
|
|
161
|
+
className: "truncate",
|
|
162
|
+
children: e.name
|
|
163
|
+
})]
|
|
164
|
+
}), /* @__PURE__ */ D(M, {
|
|
165
|
+
className: "mt-1 flex flex-wrap items-center gap-2",
|
|
166
|
+
children: [/* @__PURE__ */ E(O, {
|
|
167
|
+
variant: "outline",
|
|
168
|
+
children: Q(e.type)
|
|
169
|
+
}), /* @__PURE__ */ E(O, {
|
|
170
|
+
variant: m(e.status),
|
|
171
|
+
children: Q(e.status)
|
|
172
|
+
})]
|
|
171
173
|
})]
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
children: /* @__PURE__ */ k(b, {
|
|
180
|
-
className: "size-4",
|
|
181
|
-
"aria-hidden": "true"
|
|
182
|
-
})
|
|
183
|
-
})
|
|
184
|
-
}), /* @__PURE__ */ A(le, {
|
|
185
|
-
align: "end",
|
|
186
|
-
children: [
|
|
187
|
-
/* @__PURE__ */ A(H, {
|
|
188
|
-
onSelect: () => V(e.id),
|
|
189
|
-
children: [/* @__PURE__ */ k(ie, {
|
|
174
|
+
}), /* @__PURE__ */ D(pe, { children: [/* @__PURE__ */ E(ge, {
|
|
175
|
+
asChild: !0,
|
|
176
|
+
children: /* @__PURE__ */ E(k, {
|
|
177
|
+
variant: "ghost",
|
|
178
|
+
size: "icon",
|
|
179
|
+
"aria-label": i("brainyrich.goals.actions.menu", "Goal actions"),
|
|
180
|
+
children: /* @__PURE__ */ E(b, {
|
|
190
181
|
className: "size-4",
|
|
191
182
|
"aria-hidden": "true"
|
|
192
|
-
})
|
|
183
|
+
})
|
|
184
|
+
})
|
|
185
|
+
}), /* @__PURE__ */ D(me, {
|
|
186
|
+
align: "end",
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ D(B, {
|
|
189
|
+
onSelect: () => H(e.id),
|
|
190
|
+
children: [/* @__PURE__ */ E(se, {
|
|
191
|
+
className: "size-4",
|
|
192
|
+
"aria-hidden": "true"
|
|
193
|
+
}), i("brainyrich.goals.actions.manageFunding", "Manage funding")]
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ D(B, {
|
|
196
|
+
onSelect: () => _e(e),
|
|
197
|
+
children: [/* @__PURE__ */ E(le, {
|
|
198
|
+
className: "size-4",
|
|
199
|
+
"aria-hidden": "true"
|
|
200
|
+
}), i("brainyrich.goals.actions.editGoal", "Edit goal")]
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ E(he, {}),
|
|
203
|
+
/* @__PURE__ */ D(B, {
|
|
204
|
+
className: "text-status-error-text focus:text-status-error-text",
|
|
205
|
+
onSelect: () => W(e),
|
|
206
|
+
children: [/* @__PURE__ */ E(S, {
|
|
207
|
+
className: "size-4",
|
|
208
|
+
"aria-hidden": "true"
|
|
209
|
+
}), i("brainyrich.goals.actions.archive", "Archive goal")]
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
})] })]
|
|
213
|
+
})
|
|
214
|
+
}), /* @__PURE__ */ D(j, {
|
|
215
|
+
className: "flex flex-1 flex-col gap-4",
|
|
216
|
+
children: [
|
|
217
|
+
/* @__PURE__ */ D("div", { children: [
|
|
218
|
+
/* @__PURE__ */ E("p", {
|
|
219
|
+
className: "text-xs text-text-secondary",
|
|
220
|
+
children: i("brainyrich.goals.card.target", "Target amount")
|
|
193
221
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
-
|
|
196
|
-
children:
|
|
197
|
-
className: "size-4",
|
|
198
|
-
"aria-hidden": "true"
|
|
199
|
-
}), i("brainyrich.goals.actions.editGoal", "Edit goal")]
|
|
222
|
+
/* @__PURE__ */ E("p", {
|
|
223
|
+
className: "text-2xl font-semibold text-text-primary",
|
|
224
|
+
children: p(e.targetAmount, e.currency)
|
|
200
225
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
onSelect: () => E.mutate(e.id),
|
|
206
|
-
children: [/* @__PURE__ */ k(C, {
|
|
207
|
-
className: "size-4",
|
|
226
|
+
/* @__PURE__ */ D("span", {
|
|
227
|
+
className: `mt-1 inline-flex items-center gap-1 text-xs font-medium ${t.tone}`,
|
|
228
|
+
children: [/* @__PURE__ */ E(n, {
|
|
229
|
+
className: "size-3.5",
|
|
208
230
|
"aria-hidden": "true"
|
|
209
|
-
}),
|
|
231
|
+
}), Q(e.projection)]
|
|
210
232
|
})
|
|
211
|
-
]
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
233
|
+
] }),
|
|
234
|
+
/* @__PURE__ */ D("dl", {
|
|
235
|
+
className: "grid grid-cols-2 gap-3 rounded-lg bg-bg-sunken p-3 text-sm",
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
238
|
+
className: "text-xs text-text-secondary",
|
|
239
|
+
children: i("brainyrich.goals.card.targetDate", "Target date")
|
|
240
|
+
}), /* @__PURE__ */ D("dd", {
|
|
241
|
+
className: "flex items-center gap-1 font-medium text-text-primary",
|
|
242
|
+
children: [/* @__PURE__ */ E(y, {
|
|
243
|
+
className: "size-3.5 text-text-secondary",
|
|
244
|
+
"aria-hidden": "true"
|
|
245
|
+
}), oe(e.targetDate)]
|
|
246
|
+
})] }),
|
|
247
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
248
|
+
className: "text-xs text-text-secondary",
|
|
249
|
+
children: i("brainyrich.goals.card.monthly", "Monthly")
|
|
250
|
+
}), /* @__PURE__ */ E("dd", {
|
|
251
|
+
className: "font-medium text-text-primary",
|
|
252
|
+
children: p(e.monthlyContribution, e.currency)
|
|
253
|
+
})] }),
|
|
254
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
255
|
+
className: "text-xs text-text-secondary",
|
|
256
|
+
children: i("brainyrich.goals.card.priority", "Priority")
|
|
257
|
+
}), /* @__PURE__ */ E("dd", {
|
|
258
|
+
className: "font-medium text-text-primary",
|
|
259
|
+
children: e.priority
|
|
260
|
+
})] }),
|
|
261
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("dt", {
|
|
262
|
+
className: "text-xs text-text-secondary",
|
|
263
|
+
children: i("brainyrich.goals.card.fundings", "Funding links")
|
|
264
|
+
}), /* @__PURE__ */ E("dd", {
|
|
265
|
+
className: "font-medium text-text-primary",
|
|
266
|
+
children: e.fundings.length
|
|
267
|
+
})] })
|
|
268
|
+
]
|
|
225
269
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
className:
|
|
228
|
-
children:
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
className: "grid grid-cols-2 gap-3 rounded-lg bg-bg-sunken p-3 text-sm",
|
|
236
|
-
children: [
|
|
237
|
-
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
238
|
-
className: "text-xs text-text-secondary",
|
|
239
|
-
children: i("brainyrich.goals.card.targetDate", "Target date")
|
|
240
|
-
}), /* @__PURE__ */ A("dd", {
|
|
241
|
-
className: "flex items-center gap-1 font-medium text-text-primary",
|
|
242
|
-
children: [/* @__PURE__ */ k(y, {
|
|
243
|
-
className: "size-3.5 text-text-secondary",
|
|
244
|
-
"aria-hidden": "true"
|
|
245
|
-
}), re(e.targetDate)]
|
|
246
|
-
})] }),
|
|
247
|
-
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
248
|
-
className: "text-xs text-text-secondary",
|
|
249
|
-
children: i("brainyrich.goals.card.monthly", "Monthly")
|
|
250
|
-
}), /* @__PURE__ */ k("dd", {
|
|
251
|
-
className: "font-medium text-text-primary",
|
|
252
|
-
children: m(e.monthlyContribution, e.currency)
|
|
253
|
-
})] }),
|
|
254
|
-
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
255
|
-
className: "text-xs text-text-secondary",
|
|
256
|
-
children: i("brainyrich.goals.card.priority", "Priority")
|
|
257
|
-
}), /* @__PURE__ */ k("dd", {
|
|
258
|
-
className: "font-medium text-text-primary",
|
|
259
|
-
children: e.priority
|
|
260
|
-
})] }),
|
|
261
|
-
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
262
|
-
className: "text-xs text-text-secondary",
|
|
263
|
-
children: i("brainyrich.goals.card.fundings", "Funding links")
|
|
264
|
-
}), /* @__PURE__ */ k("dd", {
|
|
265
|
-
className: "font-medium text-text-primary",
|
|
266
|
-
children: e.fundings.length
|
|
267
|
-
})] })
|
|
268
|
-
]
|
|
269
|
-
}),
|
|
270
|
-
/* @__PURE__ */ k("div", {
|
|
271
|
-
className: "mt-auto",
|
|
272
|
-
children: /* @__PURE__ */ k(M, {
|
|
273
|
-
variant: "outline",
|
|
274
|
-
size: "sm",
|
|
275
|
-
className: "w-full",
|
|
276
|
-
onClick: () => V(e.id),
|
|
277
|
-
children: i("brainyrich.goals.actions.viewDetails", "View details & funding")
|
|
270
|
+
/* @__PURE__ */ E("div", {
|
|
271
|
+
className: "mt-auto",
|
|
272
|
+
children: /* @__PURE__ */ E(k, {
|
|
273
|
+
variant: "outline",
|
|
274
|
+
size: "sm",
|
|
275
|
+
className: "w-full",
|
|
276
|
+
onClick: () => H(e.id),
|
|
277
|
+
children: i("brainyrich.goals.actions.viewDetails", "View details & funding")
|
|
278
|
+
})
|
|
278
279
|
})
|
|
279
|
-
|
|
280
|
-
]
|
|
281
|
-
})
|
|
282
|
-
}
|
|
280
|
+
]
|
|
281
|
+
})]
|
|
282
|
+
}, e.id);
|
|
283
|
+
})
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ E(te, {
|
|
286
|
+
hasMore: s,
|
|
287
|
+
loading: u,
|
|
288
|
+
onClick: l,
|
|
289
|
+
label: i("brainyrich.goals.actions.loadMore", "Load more goals"),
|
|
290
|
+
loadingLabel: i("brainyrich.goals.actions.loadingMore", "Loading…")
|
|
283
291
|
})
|
|
284
|
-
|
|
292
|
+
] })
|
|
285
293
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
open:
|
|
294
|
+
/* @__PURE__ */ E(De, {
|
|
295
|
+
open: I,
|
|
288
296
|
mode: "create",
|
|
289
|
-
form:
|
|
290
|
-
setField:
|
|
291
|
-
households:
|
|
297
|
+
form: G,
|
|
298
|
+
setField: q,
|
|
299
|
+
households: w.map((e) => ({
|
|
292
300
|
id: e.id,
|
|
293
301
|
name: e.name
|
|
294
302
|
})),
|
|
295
|
-
valid:
|
|
296
|
-
pending:
|
|
303
|
+
valid: Z,
|
|
304
|
+
pending: ue.isPending,
|
|
297
305
|
onSubmit: () => {
|
|
298
|
-
if (!
|
|
306
|
+
if (!Z) return;
|
|
299
307
|
let e = {
|
|
300
|
-
name:
|
|
301
|
-
type:
|
|
302
|
-
targetAmount: Number(
|
|
303
|
-
targetDate: new Date(
|
|
304
|
-
monthlyContribution: Number(
|
|
305
|
-
priority: Number(
|
|
306
|
-
currency:
|
|
307
|
-
notes:
|
|
308
|
-
tags:
|
|
309
|
-
...
|
|
308
|
+
name: G.name.trim(),
|
|
309
|
+
type: G.type,
|
|
310
|
+
targetAmount: Number(G.targetAmount),
|
|
311
|
+
targetDate: new Date(G.targetDate).toISOString(),
|
|
312
|
+
monthlyContribution: Number(G.monthlyContribution) || 0,
|
|
313
|
+
priority: Number(G.priority) || 1,
|
|
314
|
+
currency: G.currency.trim() || "USD",
|
|
315
|
+
notes: G.notes.trim() || null,
|
|
316
|
+
tags: [],
|
|
317
|
+
...G.householdId ? { householdId: G.householdId } : {}
|
|
310
318
|
};
|
|
311
|
-
|
|
319
|
+
ue.mutate(e, { onSuccess: () => L(!1) });
|
|
312
320
|
},
|
|
313
|
-
onOpenChange: (e) =>
|
|
321
|
+
onOpenChange: (e) => L(e),
|
|
314
322
|
translate: i
|
|
315
323
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
open: !!
|
|
324
|
+
/* @__PURE__ */ E(De, {
|
|
325
|
+
open: !!R,
|
|
318
326
|
mode: "edit",
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
327
|
+
goalId: R?.id,
|
|
328
|
+
form: G,
|
|
329
|
+
setField: q,
|
|
330
|
+
households: w.map((e) => ({
|
|
322
331
|
id: e.id,
|
|
323
332
|
name: e.name
|
|
324
333
|
})),
|
|
325
|
-
valid:
|
|
326
|
-
pending:
|
|
334
|
+
valid: Z,
|
|
335
|
+
pending: P.isPending,
|
|
327
336
|
onSubmit: () => {
|
|
328
|
-
if (!
|
|
337
|
+
if (!R || !Z) return;
|
|
329
338
|
let e = {
|
|
330
|
-
name:
|
|
331
|
-
type:
|
|
332
|
-
status:
|
|
333
|
-
targetAmount: Number(
|
|
334
|
-
targetDate: new Date(
|
|
335
|
-
monthlyContribution: Number(
|
|
336
|
-
priority: Number(
|
|
337
|
-
currency:
|
|
338
|
-
notes:
|
|
339
|
-
tags:
|
|
339
|
+
name: G.name.trim(),
|
|
340
|
+
type: G.type,
|
|
341
|
+
status: G.status,
|
|
342
|
+
targetAmount: Number(G.targetAmount),
|
|
343
|
+
targetDate: new Date(G.targetDate).toISOString(),
|
|
344
|
+
monthlyContribution: Number(G.monthlyContribution) || 0,
|
|
345
|
+
priority: Number(G.priority) || 1,
|
|
346
|
+
currency: G.currency.trim() || "USD",
|
|
347
|
+
notes: G.notes.trim() || null,
|
|
348
|
+
tags: R.tags
|
|
340
349
|
};
|
|
341
|
-
|
|
342
|
-
id:
|
|
350
|
+
P.mutate({
|
|
351
|
+
id: R.id,
|
|
343
352
|
input: e
|
|
344
|
-
}, { onSuccess: () =>
|
|
353
|
+
}, { onSuccess: () => z(null) });
|
|
345
354
|
},
|
|
346
355
|
onOpenChange: (e) => {
|
|
347
|
-
e ||
|
|
356
|
+
e || z(null);
|
|
348
357
|
},
|
|
349
358
|
translate: i
|
|
350
359
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
-
goalId:
|
|
353
|
-
onClose: () =>
|
|
360
|
+
/* @__PURE__ */ E(Oe, {
|
|
361
|
+
goalId: V,
|
|
362
|
+
onClose: () => H(null),
|
|
354
363
|
translate: i
|
|
364
|
+
}),
|
|
365
|
+
/* @__PURE__ */ E(ne, {
|
|
366
|
+
open: !!U,
|
|
367
|
+
onOpenChange: (e) => {
|
|
368
|
+
e || W(null);
|
|
369
|
+
},
|
|
370
|
+
title: i("brainyrich.goals.archive.title", "Archive goal?"),
|
|
371
|
+
description: i("brainyrich.goals.archive.description", "This removes “{name}” from your active goals. You can no longer track its progress.", { name: U?.name ?? "" }),
|
|
372
|
+
confirmLabel: i("brainyrich.goals.archive.confirm", "Archive goal"),
|
|
373
|
+
pendingLabel: i("brainyrich.goals.archive.pending", "Archiving…"),
|
|
374
|
+
destructive: !0,
|
|
375
|
+
pending: F.isPending,
|
|
376
|
+
onConfirm: () => {
|
|
377
|
+
U && F.mutate(U.id, { onSuccess: () => W(null) });
|
|
378
|
+
}
|
|
355
379
|
})
|
|
356
380
|
] });
|
|
357
381
|
}
|
|
358
|
-
function
|
|
359
|
-
return /* @__PURE__ */
|
|
382
|
+
function De({ open: e, mode: t, goalId: n, form: r, setField: i, households: a, valid: o, pending: s, onSubmit: c, onOpenChange: l, translate: u }) {
|
|
383
|
+
return /* @__PURE__ */ E(P, {
|
|
360
384
|
open: e,
|
|
361
|
-
onOpenChange:
|
|
362
|
-
children: /* @__PURE__ */
|
|
385
|
+
onOpenChange: l,
|
|
386
|
+
children: /* @__PURE__ */ D(F, {
|
|
363
387
|
className: "max-h-[90vh] overflow-y-auto sm:max-w-lg",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ D(R, { children: [/* @__PURE__ */ E(z, { children: t === "create" ? u("brainyrich.goals.form.createTitle", "New goal") : u("brainyrich.goals.form.editTitle", "Edit goal") }), /* @__PURE__ */ E(I, { children: u("brainyrich.goals.form.subtitle", "Define the milestone, target and contribution plan.") })] }), /* @__PURE__ */ D("form", {
|
|
365
389
|
className: "space-y-4",
|
|
366
390
|
onSubmit: (e) => {
|
|
367
|
-
e.preventDefault(),
|
|
391
|
+
e.preventDefault(), c();
|
|
368
392
|
},
|
|
369
393
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ D("div", {
|
|
371
395
|
className: "space-y-1.5",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
396
|
+
children: [/* @__PURE__ */ E(H, {
|
|
373
397
|
htmlFor: "goal-name",
|
|
374
|
-
children:
|
|
375
|
-
}), /* @__PURE__ */
|
|
398
|
+
children: u("brainyrich.goals.form.name", "Name")
|
|
399
|
+
}), /* @__PURE__ */ E(V, {
|
|
376
400
|
id: "goal-name",
|
|
377
|
-
value:
|
|
378
|
-
onChange: (e) =>
|
|
379
|
-
placeholder:
|
|
401
|
+
value: r.name,
|
|
402
|
+
onChange: (e) => i("name", e.target.value),
|
|
403
|
+
placeholder: u("brainyrich.goals.form.namePlaceholder", "e.g. Retirement fund"),
|
|
380
404
|
required: !0
|
|
381
405
|
})]
|
|
382
406
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ D("div", {
|
|
384
408
|
className: "grid grid-cols-2 gap-3",
|
|
385
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ D("div", {
|
|
386
410
|
className: "space-y-1.5",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ E(H, {
|
|
388
412
|
htmlFor: "goal-type",
|
|
389
|
-
children:
|
|
390
|
-
}), /* @__PURE__ */
|
|
391
|
-
value:
|
|
392
|
-
onValueChange: (e) =>
|
|
393
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: u("brainyrich.goals.form.type", "Type")
|
|
414
|
+
}), /* @__PURE__ */ D(U, {
|
|
415
|
+
value: r.type,
|
|
416
|
+
onValueChange: (e) => i("type", e),
|
|
417
|
+
children: [/* @__PURE__ */ E(K, {
|
|
394
418
|
id: "goal-type",
|
|
395
|
-
children: /* @__PURE__ */
|
|
396
|
-
}), /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ E(q, {})
|
|
420
|
+
}), /* @__PURE__ */ E(W, { children: ye.map((e) => /* @__PURE__ */ E(G, {
|
|
397
421
|
value: e,
|
|
398
|
-
children:
|
|
422
|
+
children: Q(e)
|
|
399
423
|
}, e)) })]
|
|
400
424
|
})]
|
|
401
|
-
}), t === "edit" ? /* @__PURE__ */
|
|
425
|
+
}), t === "edit" ? /* @__PURE__ */ D("div", {
|
|
402
426
|
className: "space-y-1.5",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ E(H, {
|
|
404
428
|
htmlFor: "goal-status",
|
|
405
|
-
children:
|
|
406
|
-
}), /* @__PURE__ */
|
|
407
|
-
value:
|
|
408
|
-
onValueChange: (e) =>
|
|
409
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: u("brainyrich.goals.form.status", "Status")
|
|
430
|
+
}), /* @__PURE__ */ D(U, {
|
|
431
|
+
value: r.status,
|
|
432
|
+
onValueChange: (e) => i("status", e),
|
|
433
|
+
children: [/* @__PURE__ */ E(K, {
|
|
410
434
|
id: "goal-status",
|
|
411
|
-
children: /* @__PURE__ */
|
|
412
|
-
}), /* @__PURE__ */
|
|
435
|
+
children: /* @__PURE__ */ E(q, {})
|
|
436
|
+
}), /* @__PURE__ */ E(W, { children: be.map((e) => /* @__PURE__ */ E(G, {
|
|
413
437
|
value: e,
|
|
414
|
-
children:
|
|
438
|
+
children: Q(e)
|
|
415
439
|
}, e)) })]
|
|
416
440
|
})]
|
|
417
|
-
}) : /* @__PURE__ */
|
|
441
|
+
}) : /* @__PURE__ */ D("div", {
|
|
418
442
|
className: "space-y-1.5",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
443
|
+
children: [/* @__PURE__ */ E(H, {
|
|
420
444
|
htmlFor: "goal-priority",
|
|
421
|
-
children:
|
|
422
|
-
}), /* @__PURE__ */
|
|
445
|
+
children: u("brainyrich.goals.form.priority", "Priority")
|
|
446
|
+
}), /* @__PURE__ */ E(V, {
|
|
423
447
|
id: "goal-priority",
|
|
424
448
|
type: "number",
|
|
425
449
|
min: 1,
|
|
426
|
-
value:
|
|
427
|
-
onChange: (e) =>
|
|
450
|
+
value: r.priority,
|
|
451
|
+
onChange: (e) => i("priority", e.target.value)
|
|
428
452
|
})]
|
|
429
453
|
})]
|
|
430
454
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ D("div", {
|
|
432
456
|
className: "grid grid-cols-2 gap-3",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ D("div", {
|
|
434
458
|
className: "space-y-1.5",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ E(H, {
|
|
436
460
|
htmlFor: "goal-target",
|
|
437
|
-
children:
|
|
438
|
-
}), /* @__PURE__ */
|
|
461
|
+
children: u("brainyrich.goals.form.targetAmount", "Target amount")
|
|
462
|
+
}), /* @__PURE__ */ E(V, {
|
|
439
463
|
id: "goal-target",
|
|
440
464
|
type: "number",
|
|
441
465
|
min: 0,
|
|
442
466
|
step: "0.01",
|
|
443
|
-
value:
|
|
444
|
-
onChange: (e) =>
|
|
467
|
+
value: r.targetAmount,
|
|
468
|
+
onChange: (e) => i("targetAmount", e.target.value),
|
|
445
469
|
required: !0
|
|
446
470
|
})]
|
|
447
|
-
}), /* @__PURE__ */
|
|
471
|
+
}), /* @__PURE__ */ D("div", {
|
|
448
472
|
className: "space-y-1.5",
|
|
449
|
-
children: [/* @__PURE__ */
|
|
473
|
+
children: [/* @__PURE__ */ E(H, {
|
|
450
474
|
htmlFor: "goal-date",
|
|
451
|
-
children:
|
|
452
|
-
}), /* @__PURE__ */
|
|
475
|
+
children: u("brainyrich.goals.form.targetDate", "Target date")
|
|
476
|
+
}), /* @__PURE__ */ E(V, {
|
|
453
477
|
id: "goal-date",
|
|
454
478
|
type: "date",
|
|
455
|
-
value:
|
|
456
|
-
onChange: (e) =>
|
|
479
|
+
value: r.targetDate,
|
|
480
|
+
onChange: (e) => i("targetDate", e.target.value),
|
|
457
481
|
required: !0
|
|
458
482
|
})]
|
|
459
483
|
})]
|
|
460
484
|
}),
|
|
461
|
-
/* @__PURE__ */
|
|
485
|
+
/* @__PURE__ */ D("div", {
|
|
462
486
|
className: "grid grid-cols-2 gap-3",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ D("div", {
|
|
464
488
|
className: "space-y-1.5",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
489
|
+
children: [/* @__PURE__ */ E(H, {
|
|
466
490
|
htmlFor: "goal-monthly",
|
|
467
|
-
children:
|
|
468
|
-
}), /* @__PURE__ */
|
|
491
|
+
children: u("brainyrich.goals.form.monthly", "Monthly contribution")
|
|
492
|
+
}), /* @__PURE__ */ E(V, {
|
|
469
493
|
id: "goal-monthly",
|
|
470
494
|
type: "number",
|
|
471
495
|
min: 0,
|
|
472
496
|
step: "0.01",
|
|
473
|
-
value:
|
|
474
|
-
onChange: (e) =>
|
|
497
|
+
value: r.monthlyContribution,
|
|
498
|
+
onChange: (e) => i("monthlyContribution", e.target.value)
|
|
475
499
|
})]
|
|
476
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ D("div", {
|
|
477
501
|
className: "space-y-1.5",
|
|
478
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ E(H, {
|
|
479
503
|
htmlFor: "goal-currency",
|
|
480
|
-
children:
|
|
481
|
-
}), /* @__PURE__ */
|
|
504
|
+
children: u("brainyrich.goals.form.currency", "Currency")
|
|
505
|
+
}), /* @__PURE__ */ E(V, {
|
|
482
506
|
id: "goal-currency",
|
|
483
|
-
value:
|
|
484
|
-
onChange: (e) =>
|
|
507
|
+
value: r.currency,
|
|
508
|
+
onChange: (e) => i("currency", e.target.value.toUpperCase()),
|
|
485
509
|
maxLength: 3
|
|
486
510
|
})]
|
|
487
511
|
})]
|
|
488
512
|
}),
|
|
489
|
-
t === "edit" ? /* @__PURE__ */
|
|
513
|
+
t === "edit" ? /* @__PURE__ */ D("div", {
|
|
490
514
|
className: "space-y-1.5",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ E(H, {
|
|
492
516
|
htmlFor: "goal-priority-edit",
|
|
493
|
-
children:
|
|
494
|
-
}), /* @__PURE__ */
|
|
517
|
+
children: u("brainyrich.goals.form.priority", "Priority")
|
|
518
|
+
}), /* @__PURE__ */ E(V, {
|
|
495
519
|
id: "goal-priority-edit",
|
|
496
520
|
type: "number",
|
|
497
521
|
min: 1,
|
|
498
|
-
value:
|
|
499
|
-
onChange: (e) =>
|
|
522
|
+
value: r.priority,
|
|
523
|
+
onChange: (e) => i("priority", e.target.value)
|
|
500
524
|
})]
|
|
501
525
|
}) : null,
|
|
502
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ D("div", {
|
|
503
527
|
className: "space-y-1.5",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
528
|
+
children: [/* @__PURE__ */ E(H, {
|
|
505
529
|
htmlFor: "goal-household",
|
|
506
|
-
children:
|
|
507
|
-
}), /* @__PURE__ */
|
|
508
|
-
value:
|
|
509
|
-
onValueChange: (e) =>
|
|
510
|
-
children: [/* @__PURE__ */
|
|
530
|
+
children: u("brainyrich.goals.form.household", "Household (optional)")
|
|
531
|
+
}), /* @__PURE__ */ D(U, {
|
|
532
|
+
value: r.householdId || Te,
|
|
533
|
+
onValueChange: (e) => i("householdId", e === Te ? "" : e),
|
|
534
|
+
children: [/* @__PURE__ */ E(K, {
|
|
511
535
|
id: "goal-household",
|
|
512
|
-
children: /* @__PURE__ */
|
|
513
|
-
}), /* @__PURE__ */
|
|
514
|
-
value:
|
|
515
|
-
children:
|
|
516
|
-
}),
|
|
536
|
+
children: /* @__PURE__ */ E(q, { placeholder: u("brainyrich.goals.form.householdNone", "None") })
|
|
537
|
+
}), /* @__PURE__ */ D(W, { children: [/* @__PURE__ */ E(G, {
|
|
538
|
+
value: Te,
|
|
539
|
+
children: u("brainyrich.goals.form.householdNone", "None")
|
|
540
|
+
}), a.map((e) => /* @__PURE__ */ E(G, {
|
|
517
541
|
value: e.id,
|
|
518
542
|
children: e.name
|
|
519
543
|
}, e.id))] })]
|
|
520
544
|
})]
|
|
521
545
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
546
|
+
t === "edit" && n ? /* @__PURE__ */ E(h, {
|
|
547
|
+
entityType: "brainyrich-goal",
|
|
548
|
+
entityId: n,
|
|
549
|
+
label: u("brainyrich.goals.form.tags", "Tags")
|
|
550
|
+
}) : /* @__PURE__ */ D("div", {
|
|
523
551
|
className: "space-y-1.5",
|
|
524
|
-
children: [/* @__PURE__ */
|
|
525
|
-
|
|
526
|
-
children:
|
|
527
|
-
}), /* @__PURE__ */ k(U, {
|
|
528
|
-
id: "goal-tags",
|
|
529
|
-
value: n.tags,
|
|
530
|
-
onChange: (e) => r("tags", e.target.value),
|
|
531
|
-
placeholder: l("brainyrich.goals.form.tagsPlaceholder", "e.g. long-term, family")
|
|
552
|
+
children: [/* @__PURE__ */ E(H, { children: u("brainyrich.goals.form.tags", "Tags") }), /* @__PURE__ */ E("p", {
|
|
553
|
+
className: "text-sm text-text-secondary",
|
|
554
|
+
children: u("brainyrich.goals.form.tagsAfterCreate", "You can add tags after creating the goal.")
|
|
532
555
|
})]
|
|
533
556
|
}),
|
|
534
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ D("div", {
|
|
535
558
|
className: "space-y-1.5",
|
|
536
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ E(H, {
|
|
537
560
|
htmlFor: "goal-notes",
|
|
538
|
-
children:
|
|
539
|
-
}), /* @__PURE__ */
|
|
561
|
+
children: u("brainyrich.goals.form.notes", "Notes")
|
|
562
|
+
}), /* @__PURE__ */ E(ve, {
|
|
540
563
|
id: "goal-notes",
|
|
541
|
-
value:
|
|
542
|
-
onChange: (e) =>
|
|
564
|
+
value: r.notes,
|
|
565
|
+
onChange: (e) => i("notes", e.target.value),
|
|
543
566
|
rows: 3
|
|
544
567
|
})]
|
|
545
568
|
}),
|
|
546
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ D(L, { children: [/* @__PURE__ */ E(k, {
|
|
547
570
|
type: "button",
|
|
548
571
|
variant: "outline",
|
|
549
|
-
onClick: () =>
|
|
550
|
-
disabled:
|
|
551
|
-
children:
|
|
552
|
-
}), /* @__PURE__ */ k
|
|
572
|
+
onClick: () => l(!1),
|
|
573
|
+
disabled: s,
|
|
574
|
+
children: u("brainyrich.goals.form.cancel", "Cancel")
|
|
575
|
+
}), /* @__PURE__ */ E(k, {
|
|
553
576
|
type: "submit",
|
|
554
|
-
disabled: !
|
|
555
|
-
children:
|
|
577
|
+
disabled: !o || s,
|
|
578
|
+
children: s ? u("brainyrich.goals.form.saving", "Saving…") : t === "create" ? u("brainyrich.goals.form.create", "Create goal") : u("brainyrich.goals.form.save", "Save changes")
|
|
556
579
|
})] })
|
|
557
580
|
]
|
|
558
581
|
})]
|
|
559
582
|
})
|
|
560
583
|
});
|
|
561
584
|
}
|
|
562
|
-
function
|
|
563
|
-
let { data: o, isLoading:
|
|
564
|
-
if (!e || !
|
|
565
|
-
let t = Number(
|
|
566
|
-
!Number.isFinite(t) || t <= 0 ||
|
|
585
|
+
function Oe({ goalId: e, onClose: n, translate: r }) {
|
|
586
|
+
let { data: o, isLoading: c, isError: ee, refetch: te } = i(e ?? void 0), { data: d } = a(e ?? void 0), { data: f } = t(), m = s(), h = u(), g = l(), [v, y] = _(""), [b, ce] = _("PERCENT"), [S, C] = _(""), [w, de] = _(""), [O, A] = _(null), j = d.reduce((e, t) => e + (t.fixedAmount ?? 0), 0), M = o?.currency ?? "USD", N = (e) => f.find((t) => t.id === e)?.name ?? e, fe = () => {
|
|
587
|
+
if (!e || !v) return;
|
|
588
|
+
let t = Number(S);
|
|
589
|
+
!Number.isFinite(t) || t <= 0 || m.mutate({
|
|
567
590
|
goalId: e,
|
|
568
|
-
accountId:
|
|
569
|
-
...
|
|
591
|
+
accountId: v,
|
|
592
|
+
...b === "PERCENT" ? { allocationPct: t } : { fixedAmount: t }
|
|
570
593
|
}, { onSuccess: () => {
|
|
571
|
-
|
|
594
|
+
y(""), C("");
|
|
572
595
|
} });
|
|
573
|
-
},
|
|
596
|
+
}, P = () => {
|
|
574
597
|
if (!e) return;
|
|
575
|
-
let t =
|
|
576
|
-
Number.isFinite(t) &&
|
|
598
|
+
let t = w === "" ? j : Number(w);
|
|
599
|
+
Number.isFinite(t) && g.mutate({
|
|
577
600
|
id: e,
|
|
578
601
|
fundedAmount: t
|
|
579
602
|
});
|
|
580
|
-
},
|
|
581
|
-
return /* @__PURE__ */
|
|
603
|
+
}, F = !!v && Number(S) > 0, I = O ? O.fixedAmount == null ? N(O.accountId) : p(O.fixedAmount, M) : "";
|
|
604
|
+
return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(J, {
|
|
582
605
|
open: !!e,
|
|
583
606
|
onOpenChange: (e) => {
|
|
584
607
|
e || n();
|
|
585
608
|
},
|
|
586
|
-
children: /* @__PURE__ */
|
|
609
|
+
children: /* @__PURE__ */ D(Y, {
|
|
587
610
|
className: "flex w-full flex-col gap-0 overflow-y-auto sm:max-w-md",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
611
|
+
children: [/* @__PURE__ */ D(_e, { children: [/* @__PURE__ */ E(Z, { children: o?.name ?? r("brainyrich.goals.detail.title", "Goal") }), /* @__PURE__ */ E(X, { children: r("brainyrich.goals.detail.subtitle", "Manage funding links and projection.") })] }), /* @__PURE__ */ E("div", {
|
|
589
612
|
className: "space-y-6 p-4",
|
|
590
|
-
children:
|
|
613
|
+
children: c ? /* @__PURE__ */ E(ae, { rows: 3 }) : ee ? /* @__PURE__ */ E(ie, {
|
|
591
614
|
title: r("brainyrich.goals.detail.error", "Could not load goal"),
|
|
592
615
|
onRetry: () => te()
|
|
593
|
-
}) : o ? /* @__PURE__ */
|
|
594
|
-
/* @__PURE__ */
|
|
616
|
+
}) : o ? /* @__PURE__ */ D(T, { children: [
|
|
617
|
+
/* @__PURE__ */ D("div", {
|
|
595
618
|
className: "grid grid-cols-2 gap-3",
|
|
596
619
|
children: [
|
|
597
|
-
/* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ E($, {
|
|
598
621
|
label: r("brainyrich.goals.detail.target", "Target"),
|
|
599
|
-
value:
|
|
622
|
+
value: p(o.targetAmount, M)
|
|
600
623
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ E($, {
|
|
602
625
|
label: r("brainyrich.goals.detail.funded", "Funded (fixed)"),
|
|
603
|
-
value:
|
|
626
|
+
value: p(j, M)
|
|
604
627
|
}),
|
|
605
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ E($, {
|
|
606
629
|
label: r("brainyrich.goals.detail.projection", "Projection"),
|
|
607
|
-
value:
|
|
608
|
-
tone:
|
|
630
|
+
value: Q(o.projection),
|
|
631
|
+
tone: xe(o.projection).tone
|
|
609
632
|
}),
|
|
610
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ E($, {
|
|
611
634
|
label: r("brainyrich.goals.detail.targetDate", "Target date"),
|
|
612
|
-
value:
|
|
635
|
+
value: oe(o.targetDate)
|
|
613
636
|
})
|
|
614
637
|
]
|
|
615
638
|
}),
|
|
616
|
-
/* @__PURE__ */
|
|
639
|
+
/* @__PURE__ */ D("section", {
|
|
617
640
|
className: "space-y-3",
|
|
618
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ E("h3", {
|
|
619
642
|
className: "text-sm font-semibold text-text-primary",
|
|
620
643
|
children: r("brainyrich.goals.detail.fundingLinks", "Funding links")
|
|
621
|
-
}),
|
|
644
|
+
}), d.length === 0 ? /* @__PURE__ */ E("p", {
|
|
622
645
|
className: "rounded-lg border border-dashed border-border-subtle bg-bg-surface px-4 py-6 text-center text-sm text-text-secondary",
|
|
623
646
|
children: r("brainyrich.goals.detail.noFundings", "No accounts linked to fund this goal yet.")
|
|
624
|
-
}) : /* @__PURE__ */
|
|
647
|
+
}) : /* @__PURE__ */ E("ul", {
|
|
625
648
|
className: "space-y-2",
|
|
626
|
-
children:
|
|
649
|
+
children: d.map((e) => /* @__PURE__ */ D("li", {
|
|
627
650
|
className: "flex items-center justify-between gap-2 rounded-lg border border-border-subtle bg-bg-surface px-3 py-2",
|
|
628
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ D("div", {
|
|
629
652
|
className: "min-w-0",
|
|
630
|
-
children: [/* @__PURE__ */
|
|
653
|
+
children: [/* @__PURE__ */ E("p", {
|
|
631
654
|
className: "truncate text-sm font-medium text-text-primary",
|
|
632
|
-
children:
|
|
633
|
-
}), /* @__PURE__ */
|
|
655
|
+
children: N(e.accountId)
|
|
656
|
+
}), /* @__PURE__ */ E("p", {
|
|
634
657
|
className: "text-xs text-text-secondary",
|
|
635
|
-
children: e.fixedAmount == null ? r("brainyrich.goals.detail.pctOfAccount", "{pct}% of account", { pct: e.allocationPct }) :
|
|
658
|
+
children: e.fixedAmount == null ? r("brainyrich.goals.detail.pctOfAccount", "{pct}% of account", { pct: e.allocationPct }) : p(e.fixedAmount, M)
|
|
636
659
|
})]
|
|
637
|
-
}), /* @__PURE__ */ k
|
|
660
|
+
}), /* @__PURE__ */ E(k, {
|
|
638
661
|
variant: "ghost",
|
|
639
662
|
size: "icon",
|
|
640
663
|
"aria-label": r("brainyrich.goals.detail.unlink", "Unlink funding"),
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
children: /* @__PURE__ */ k(E, {
|
|
664
|
+
onClick: () => A(e),
|
|
665
|
+
children: /* @__PURE__ */ E(ue, {
|
|
644
666
|
className: "size-4",
|
|
645
667
|
"aria-hidden": "true"
|
|
646
668
|
})
|
|
@@ -648,124 +670,124 @@ function Ee({ goalId: e, onClose: n, translate: r }) {
|
|
|
648
670
|
}, e.id))
|
|
649
671
|
})]
|
|
650
672
|
}),
|
|
651
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ D("section", {
|
|
652
674
|
className: "space-y-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
675
|
+
children: [/* @__PURE__ */ E("h3", {
|
|
654
676
|
className: "text-sm font-semibold text-text-primary",
|
|
655
677
|
children: r("brainyrich.goals.detail.linkTitle", "Link an account")
|
|
656
|
-
}),
|
|
678
|
+
}), f.length === 0 ? /* @__PURE__ */ E("p", {
|
|
657
679
|
className: "text-sm text-text-secondary",
|
|
658
680
|
children: r("brainyrich.goals.detail.noAccounts", "No accounts available to link.")
|
|
659
|
-
}) : /* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */
|
|
681
|
+
}) : /* @__PURE__ */ D(T, { children: [
|
|
682
|
+
/* @__PURE__ */ D("div", {
|
|
661
683
|
className: "space-y-1.5",
|
|
662
|
-
children: [/* @__PURE__ */
|
|
684
|
+
children: [/* @__PURE__ */ E(H, {
|
|
663
685
|
htmlFor: "funding-account",
|
|
664
686
|
children: r("brainyrich.goals.detail.account", "Account")
|
|
665
|
-
}), /* @__PURE__ */
|
|
666
|
-
value:
|
|
667
|
-
onValueChange:
|
|
668
|
-
children: [/* @__PURE__ */
|
|
687
|
+
}), /* @__PURE__ */ D(U, {
|
|
688
|
+
value: v,
|
|
689
|
+
onValueChange: y,
|
|
690
|
+
children: [/* @__PURE__ */ E(K, {
|
|
669
691
|
id: "funding-account",
|
|
670
|
-
children: /* @__PURE__ */
|
|
671
|
-
}), /* @__PURE__ */
|
|
692
|
+
children: /* @__PURE__ */ E(q, { placeholder: r("brainyrich.goals.detail.selectAccount", "Select account") })
|
|
693
|
+
}), /* @__PURE__ */ E(W, { children: f.map((e) => /* @__PURE__ */ E(G, {
|
|
672
694
|
value: e.id,
|
|
673
695
|
children: e.name
|
|
674
696
|
}, e.id)) })]
|
|
675
697
|
})]
|
|
676
698
|
}),
|
|
677
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ D("div", {
|
|
678
700
|
className: "grid grid-cols-2 gap-3",
|
|
679
|
-
children: [/* @__PURE__ */
|
|
701
|
+
children: [/* @__PURE__ */ D("div", {
|
|
680
702
|
className: "space-y-1.5",
|
|
681
|
-
children: [/* @__PURE__ */
|
|
703
|
+
children: [/* @__PURE__ */ E(H, {
|
|
682
704
|
htmlFor: "funding-mode",
|
|
683
705
|
children: r("brainyrich.goals.detail.mode", "Method")
|
|
684
|
-
}), /* @__PURE__ */
|
|
685
|
-
value:
|
|
686
|
-
onValueChange: (e) =>
|
|
687
|
-
children: [/* @__PURE__ */
|
|
706
|
+
}), /* @__PURE__ */ D(U, {
|
|
707
|
+
value: b,
|
|
708
|
+
onValueChange: (e) => ce(e),
|
|
709
|
+
children: [/* @__PURE__ */ E(K, {
|
|
688
710
|
id: "funding-mode",
|
|
689
|
-
children: /* @__PURE__ */
|
|
690
|
-
}), /* @__PURE__ */
|
|
711
|
+
children: /* @__PURE__ */ E(q, {})
|
|
712
|
+
}), /* @__PURE__ */ D(W, { children: [/* @__PURE__ */ E(G, {
|
|
691
713
|
value: "PERCENT",
|
|
692
714
|
children: r("brainyrich.goals.detail.percent", "Percentage")
|
|
693
|
-
}), /* @__PURE__ */
|
|
715
|
+
}), /* @__PURE__ */ E(G, {
|
|
694
716
|
value: "FIXED",
|
|
695
717
|
children: r("brainyrich.goals.detail.fixed", "Fixed amount")
|
|
696
718
|
})] })]
|
|
697
719
|
})]
|
|
698
|
-
}), /* @__PURE__ */
|
|
720
|
+
}), /* @__PURE__ */ D("div", {
|
|
699
721
|
className: "space-y-1.5",
|
|
700
|
-
children: [/* @__PURE__ */
|
|
722
|
+
children: [/* @__PURE__ */ E(H, {
|
|
701
723
|
htmlFor: "funding-value",
|
|
702
|
-
children:
|
|
703
|
-
}), /* @__PURE__ */
|
|
724
|
+
children: b === "PERCENT" ? r("brainyrich.goals.detail.pct", "Percent") : r("brainyrich.goals.detail.amount", "Amount")
|
|
725
|
+
}), /* @__PURE__ */ E(V, {
|
|
704
726
|
id: "funding-value",
|
|
705
727
|
type: "number",
|
|
706
728
|
min: 0,
|
|
707
729
|
step: "0.01",
|
|
708
|
-
value:
|
|
709
|
-
onChange: (e) =>
|
|
730
|
+
value: S,
|
|
731
|
+
onChange: (e) => C(e.target.value)
|
|
710
732
|
})]
|
|
711
733
|
})]
|
|
712
734
|
}),
|
|
713
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ D(k, {
|
|
714
736
|
size: "sm",
|
|
715
737
|
className: "w-full",
|
|
716
|
-
disabled: !
|
|
717
|
-
onClick:
|
|
718
|
-
children: [/* @__PURE__ */
|
|
738
|
+
disabled: !F || m.isPending,
|
|
739
|
+
onClick: fe,
|
|
740
|
+
children: [/* @__PURE__ */ E(se, {
|
|
719
741
|
className: "size-4",
|
|
720
742
|
"aria-hidden": "true"
|
|
721
|
-
}),
|
|
743
|
+
}), m.isPending ? r("brainyrich.goals.detail.linking", "Linking…") : r("brainyrich.goals.detail.link", "Link funding")]
|
|
722
744
|
})
|
|
723
745
|
] })]
|
|
724
746
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ D("section", {
|
|
726
748
|
className: "space-y-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
727
749
|
children: [
|
|
728
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ E("h3", {
|
|
729
751
|
className: "text-sm font-semibold text-text-primary",
|
|
730
752
|
children: r("brainyrich.goals.detail.recalcTitle", "Recalculate projection")
|
|
731
753
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ D("div", {
|
|
733
755
|
className: "space-y-1.5",
|
|
734
756
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ E(H, {
|
|
736
758
|
htmlFor: "recalc-funded",
|
|
737
759
|
children: r("brainyrich.goals.detail.fundedAmount", "Funded amount")
|
|
738
760
|
}),
|
|
739
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ E(V, {
|
|
740
762
|
id: "recalc-funded",
|
|
741
763
|
type: "number",
|
|
742
764
|
min: 0,
|
|
743
765
|
step: "0.01",
|
|
744
|
-
value:
|
|
745
|
-
placeholder: String(
|
|
746
|
-
onChange: (e) =>
|
|
766
|
+
value: w,
|
|
767
|
+
placeholder: String(j),
|
|
768
|
+
onChange: (e) => de(e.target.value)
|
|
747
769
|
}),
|
|
748
|
-
/* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ E("p", {
|
|
749
771
|
className: "text-xs text-text-secondary",
|
|
750
772
|
children: r("brainyrich.goals.detail.recalcHint", "Defaults to the sum of fixed fundings when left blank.")
|
|
751
773
|
})
|
|
752
774
|
]
|
|
753
775
|
}),
|
|
754
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ D(k, {
|
|
755
777
|
size: "sm",
|
|
756
778
|
variant: "outline",
|
|
757
779
|
className: "w-full",
|
|
758
|
-
disabled:
|
|
759
|
-
onClick:
|
|
760
|
-
children: [/* @__PURE__ */
|
|
780
|
+
disabled: g.isPending,
|
|
781
|
+
onClick: P,
|
|
782
|
+
children: [/* @__PURE__ */ E(le, {
|
|
761
783
|
className: "size-4",
|
|
762
784
|
"aria-hidden": "true"
|
|
763
|
-
}),
|
|
785
|
+
}), g.isPending ? r("brainyrich.goals.detail.recalculating", "Recalculating…") : r("brainyrich.goals.detail.recalc", "Recalculate")]
|
|
764
786
|
})
|
|
765
787
|
]
|
|
766
788
|
})
|
|
767
|
-
] }) : /* @__PURE__ */
|
|
768
|
-
icon: /* @__PURE__ */
|
|
789
|
+
] }) : /* @__PURE__ */ E(re, {
|
|
790
|
+
icon: /* @__PURE__ */ E(x, {
|
|
769
791
|
className: "size-6",
|
|
770
792
|
"aria-hidden": "true"
|
|
771
793
|
}),
|
|
@@ -773,21 +795,35 @@ function Ee({ goalId: e, onClose: n, translate: r }) {
|
|
|
773
795
|
})
|
|
774
796
|
})]
|
|
775
797
|
})
|
|
776
|
-
})
|
|
798
|
+
}), /* @__PURE__ */ E(ne, {
|
|
799
|
+
open: !!O,
|
|
800
|
+
onOpenChange: (e) => {
|
|
801
|
+
e || A(null);
|
|
802
|
+
},
|
|
803
|
+
title: r("brainyrich.goals.detail.unlinkTitle", "Unlink funding?"),
|
|
804
|
+
description: r("brainyrich.goals.detail.unlinkConfirm", "This removes the “{name}” funding link from this goal.", { name: I }),
|
|
805
|
+
confirmLabel: r("brainyrich.goals.detail.unlink", "Unlink funding"),
|
|
806
|
+
pendingLabel: r("brainyrich.goals.detail.unlinking", "Unlinking…"),
|
|
807
|
+
destructive: !0,
|
|
808
|
+
pending: h.isPending,
|
|
809
|
+
onConfirm: () => {
|
|
810
|
+
O && h.mutate(O.id, { onSuccess: () => A(null) });
|
|
811
|
+
}
|
|
812
|
+
})] });
|
|
777
813
|
}
|
|
778
814
|
function $({ label: e, value: t, tone: n }) {
|
|
779
|
-
return /* @__PURE__ */
|
|
815
|
+
return /* @__PURE__ */ D("div", {
|
|
780
816
|
className: "rounded-lg bg-bg-sunken p-3",
|
|
781
|
-
children: [/* @__PURE__ */
|
|
817
|
+
children: [/* @__PURE__ */ E("p", {
|
|
782
818
|
className: "text-xs text-text-secondary",
|
|
783
819
|
children: e
|
|
784
|
-
}), /* @__PURE__ */
|
|
820
|
+
}), /* @__PURE__ */ E("p", {
|
|
785
821
|
className: `text-sm font-semibold ${n ?? "text-text-primary"}`,
|
|
786
822
|
children: t
|
|
787
823
|
})]
|
|
788
824
|
});
|
|
789
825
|
}
|
|
790
826
|
//#endregion
|
|
791
|
-
export {
|
|
827
|
+
export { Ee as GoalsPage };
|
|
792
828
|
|
|
793
829
|
//# sourceMappingURL=GoalsPage.js.map
|