@mx-cartographer/experiences 7.0.35 → 7.0.36
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/CHANGELOG.md +4 -0
- package/dist/{AccountDetailsContent-BwTOak3W.mjs → AccountDetailsContent-r2edUIO6.mjs} +2 -2
- package/dist/{ManageIncome-C0CbczlY.mjs → ManageIncome-BDAuo2eh.mjs} +2 -2
- package/dist/{RecurringSettings-DR9KuVEN.mjs → RecurringSettings-DlZ8qeDR.mjs} +2 -2
- package/dist/{TransactionDetails-BafSm7_T.mjs → TransactionDetails-Fdf0sKuB.mjs} +1 -1
- package/dist/{WidgetContainer-CPBhSP3k.mjs → WidgetContainer-C6H2vwT9.mjs} +28 -27
- package/dist/accounts/index.es.js +3 -3
- package/dist/budgets/index.es.js +3 -3
- package/dist/cashflow/index.es.js +4 -4
- package/dist/common/constants/Analytics.d.ts +1 -0
- package/dist/common/index.es.js +1 -1
- package/dist/debts/index.es.js +1 -1
- package/dist/finstrong/index.es.js +2 -2
- package/dist/goals/index.es.js +504 -505
- package/dist/help/index.es.js +1 -1
- package/dist/investments/index.es.js +1 -1
- package/dist/networth/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +5 -5
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +2 -2
- package/dist/transactions/index.es.js +3 -3
- package/dist/trends/index.es.js +379 -367
- package/package.json +1 -1
package/dist/goals/index.es.js
CHANGED
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { c as
|
|
1
|
+
import { g as _e, T as m, G as me, a as Le, M as J, C as ye, b as Oe } from "../GoalStore-D2A2Lqd5.mjs";
|
|
2
|
+
import { c as Hn, d as $n } from "../GoalStore-D2A2Lqd5.mjs";
|
|
3
3
|
import { jsxs as i, jsx as e, Fragment as U } from "react/jsx-runtime";
|
|
4
4
|
import y from "react";
|
|
5
5
|
import { observer as K } from "mobx-react-lite";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import We from "@mui/material/Alert";
|
|
7
|
+
import Pe from "@mui/material/Snackbar";
|
|
8
8
|
import g from "@mui/material/Stack";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { Text as A, H2 as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { Payments as
|
|
20
|
-
import { u as T, k as x, c as
|
|
21
|
-
import { u as
|
|
9
|
+
import le from "@mui/material/Tab";
|
|
10
|
+
import Ve from "@mui/material/Tabs";
|
|
11
|
+
import { Text as A, H2 as ue, P as W, H3 as je, Icon as Fe, InstitutionLogo as ne } from "@mxenabled/mxui";
|
|
12
|
+
import pe from "@mui/material/Button";
|
|
13
|
+
import Ae from "@mui/material/Card";
|
|
14
|
+
import Te from "@mui/material/CardActionArea";
|
|
15
|
+
import Ce from "@mui/material/CardContent";
|
|
16
|
+
import be from "@mui/material/Unstable_Grid2";
|
|
17
|
+
import oe from "@mui/material/Avatar";
|
|
18
|
+
import ze from "@mui/material/CardHeader";
|
|
19
|
+
import { Payments as Se, NoteStack as Re, Person as Ee, ChevronRight as M, DragHandle as He, CheckCircle as $e, Icon as ge, ExpandLess as Xe, ExpandMore as Ue, AddBox as ve, Trophy as Ye } from "@mxenabled/mx-icons";
|
|
20
|
+
import { u as T, k as x, c as V, o as xe, f as Ie, a as Ge } from "../hooks-BhSK6dal.mjs";
|
|
21
|
+
import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
22
22
|
import { f as v } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
23
|
-
import { S as
|
|
24
|
-
import
|
|
23
|
+
import { S as Ze } from "../StatusBar-BK_uYHAB.mjs";
|
|
24
|
+
import R from "@mui/material/Divider";
|
|
25
25
|
import L from "@mui/material/List";
|
|
26
|
-
import { L as
|
|
27
|
-
import { C as
|
|
28
|
-
import { fromUnixTime as
|
|
26
|
+
import { L as ee } from "../ListItemAction-Dt9A2GQk.mjs";
|
|
27
|
+
import { C as Ne } from "../CurrencyInput-C0wTgNV6.mjs";
|
|
28
|
+
import { fromUnixTime as Q } from "date-fns/fromUnixTime";
|
|
29
29
|
import N from "@mui/material/ListItem";
|
|
30
30
|
import k from "@mui/material/ListItemButton";
|
|
31
31
|
import w from "@mui/material/ListItemText";
|
|
32
|
-
import { DataGridPro as
|
|
33
|
-
import { D as
|
|
32
|
+
import { DataGridPro as qe } from "@mui/x-data-grid-pro";
|
|
33
|
+
import { D as j } from "../Drawer-kEE73B87.mjs";
|
|
34
34
|
import { b as B } from "../Localization-2MODESHW.mjs";
|
|
35
|
-
import { f as
|
|
35
|
+
import { f as ae, D as re, a as Je } from "../Dialog-CWW597AF.mjs";
|
|
36
36
|
import P from "@mui/material/ListItemAvatar";
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import { A as
|
|
41
|
-
import { u as
|
|
42
|
-
import { A as
|
|
43
|
-
import
|
|
44
|
-
import { M as
|
|
45
|
-
import { getUnixTime as
|
|
46
|
-
import { isValid as
|
|
47
|
-
import { AdapterDateFns as
|
|
48
|
-
import { DatePicker as
|
|
49
|
-
import { LocalizationProvider as
|
|
50
|
-
import { E as
|
|
51
|
-
import { A as Y, W as
|
|
52
|
-
import { L as
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import { S as
|
|
57
|
-
import { M as
|
|
58
|
-
function
|
|
37
|
+
import Qe from "@mui/material/Collapse";
|
|
38
|
+
import et from "@mui/material/ListItemIcon";
|
|
39
|
+
import tt from "@mui/material/Checkbox";
|
|
40
|
+
import { A as fe } from "../ConnectDrawer-jeSmGg38.mjs";
|
|
41
|
+
import { u as nt, A as ot } from "../AccountDetailsHeader-BCW4d-j4.mjs";
|
|
42
|
+
import { A as at } from "../AccountDetailsContent-r2edUIO6.mjs";
|
|
43
|
+
import ke from "@mui/material/TextField";
|
|
44
|
+
import { M as rt, I as it, O as st } from "../OriginalBalanceAction-CqQ5j4OW.mjs";
|
|
45
|
+
import { getUnixTime as lt } from "date-fns/getUnixTime";
|
|
46
|
+
import { isValid as ct } from "date-fns/isValid";
|
|
47
|
+
import { AdapterDateFns as dt } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
48
|
+
import { DatePicker as mt } from "@mui/x-date-pickers";
|
|
49
|
+
import { LocalizationProvider as _t } from "@mui/x-date-pickers/LocalizationProvider";
|
|
50
|
+
import { E as ut } from "../EmptyState-C0lr9E5T.mjs";
|
|
51
|
+
import { A as Y, W as pt } from "../WidgetContainer-C6H2vwT9.mjs";
|
|
52
|
+
import { L as we } from "../Loader-DUaFpDGv.mjs";
|
|
53
|
+
import ht from "@mui/material/Stack/Stack";
|
|
54
|
+
import bt from "@mui/material/Box";
|
|
55
|
+
import gt from "@mui/material/styles/useTheme";
|
|
56
|
+
import { S as ft } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
57
|
+
import { M as yt } from "../MicroWidgetContainer-DVRe-MJs.mjs";
|
|
58
|
+
function ce({ title: t, subtitle: n }) {
|
|
59
59
|
return /* @__PURE__ */ i(g, { children: [
|
|
60
60
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t }),
|
|
61
61
|
/* @__PURE__ */ e(A, { sx: { fontWeight: 400 }, variant: "Body", children: n })
|
|
62
62
|
] });
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const At = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
65
65
|
/(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
|
|
66
66
|
"$1$2$3"
|
|
67
|
-
) : v(t, "0,0.00"),
|
|
68
|
-
({ goal: t, isInDrawer: n = !1, onClick:
|
|
69
|
-
const { goals:
|
|
70
|
-
backgroundColor:
|
|
71
|
-
color:
|
|
72
|
-
percentage:
|
|
67
|
+
) : v(t, "0,0.00"), Ke = K(
|
|
68
|
+
({ goal: t, isInDrawer: n = !1, onClick: s }) => {
|
|
69
|
+
const { goals: l } = T(), { isMobile: u, isTablet: a } = he(), _ = u || a, {
|
|
70
|
+
backgroundColor: b,
|
|
71
|
+
color: c,
|
|
72
|
+
percentage: h,
|
|
73
73
|
percentageText: o,
|
|
74
|
-
projectedText:
|
|
75
|
-
} =
|
|
74
|
+
projectedText: p
|
|
75
|
+
} = _e(l, t), r = t.track_type === m.DEBT_TRACK ? t.initial_amount : t.amount, d = [
|
|
76
76
|
{
|
|
77
|
-
color:
|
|
78
|
-
percentage: `${
|
|
77
|
+
color: b,
|
|
78
|
+
percentage: `${h}`
|
|
79
79
|
}
|
|
80
80
|
];
|
|
81
|
-
let f = /* @__PURE__ */ e(
|
|
82
|
-
return t.track_type === m.DEBT_TRACK ? f = /* @__PURE__ */ e(
|
|
81
|
+
let f = /* @__PURE__ */ e(Se, {});
|
|
82
|
+
return t.track_type === m.DEBT_TRACK ? f = /* @__PURE__ */ e(Re, {}) : t.track_type === m.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ i(Te, { disabled: !s, onClick: s, children: [
|
|
83
83
|
/* @__PURE__ */ e(
|
|
84
|
-
|
|
84
|
+
ze,
|
|
85
85
|
{
|
|
86
|
-
avatar: /* @__PURE__ */ e(
|
|
87
|
-
subheader: /* @__PURE__ */ e(A, { variant: n ||
|
|
86
|
+
avatar: /* @__PURE__ */ e(oe, { sx: { bgcolor: b, color: c, height: 48, width: 48 }, variant: "rounded", children: f }),
|
|
87
|
+
subheader: /* @__PURE__ */ e(A, { variant: n || _ ? "H3" : "H2", children: `${v(t.current_amount, _ ? "0,0" : "0,0.00")} / ${At(
|
|
88
88
|
r,
|
|
89
|
-
|
|
89
|
+
_
|
|
90
90
|
)}` }),
|
|
91
|
-
title: /* @__PURE__ */ e(
|
|
91
|
+
title: /* @__PURE__ */ e(ue, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
|
|
92
92
|
}
|
|
93
93
|
),
|
|
94
|
-
/* @__PURE__ */ e(
|
|
95
|
-
/* @__PURE__ */ e(
|
|
94
|
+
/* @__PURE__ */ e(Ce, { sx: { pt: 0 }, children: /* @__PURE__ */ i(g, { gap: 6, children: [
|
|
95
|
+
/* @__PURE__ */ e(Ze, { data: d, height: 24 }),
|
|
96
96
|
/* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
97
97
|
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: o }),
|
|
98
|
-
t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children:
|
|
98
|
+
t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: p })
|
|
99
99
|
] })
|
|
100
100
|
] }) })
|
|
101
101
|
] }) });
|
|
102
102
|
}
|
|
103
|
-
),
|
|
104
|
-
const { goals: n } = T(), { setAlert:
|
|
105
|
-
let
|
|
106
|
-
return t === m.SAVINGS_TRACK ?
|
|
107
|
-
}, [
|
|
108
|
-
if (
|
|
109
|
-
const
|
|
110
|
-
t === m.SAVINGS_TRACK ?
|
|
103
|
+
), Tt = K(({ trackType: t }) => {
|
|
104
|
+
const { goals: n } = T(), { setAlert: s, monthlyCashFlowProfile: l, updateMonthlyCashFlowProfile: u } = x(), a = y.useMemo(() => {
|
|
105
|
+
let h = 0;
|
|
106
|
+
return t === m.SAVINGS_TRACK ? h = l?.amount_allocated_for_savings_goals || 0 : t === m.DEBT_TRACK ? h = l?.amount_allocated_for_debt_goals || 0 : t === m.RETIREMENT_TRACK && (h = l?.amount_allocated_for_retirement_goals || 0), h;
|
|
107
|
+
}, [l]), [_, b] = y.useState(a), c = async () => {
|
|
108
|
+
if (l) {
|
|
109
|
+
const h = { ...l };
|
|
110
|
+
t === m.SAVINGS_TRACK ? h.amount_allocated_for_savings_goals = _ : t === m.DEBT_TRACK ? h.amount_allocated_for_debt_goals = _ : t === m.RETIREMENT_TRACK && (h.amount_allocated_for_retirement_goals = _), await u(h), s(n.alert_contribution_updated);
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
return /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
|
|
114
|
-
|
|
114
|
+
ee,
|
|
115
115
|
{
|
|
116
|
-
isSaveDisabled: !
|
|
116
|
+
isSaveDisabled: !_ || isNaN(_),
|
|
117
117
|
label: n.contribution_label,
|
|
118
|
-
onCancel: () =>
|
|
119
|
-
onSave:
|
|
118
|
+
onCancel: () => b(a),
|
|
119
|
+
onSave: c,
|
|
120
120
|
primaryText: n.contribution_label,
|
|
121
121
|
secondaryText: v(a, "0,0.00"),
|
|
122
122
|
children: /* @__PURE__ */ e(
|
|
123
|
-
|
|
123
|
+
Ne,
|
|
124
124
|
{
|
|
125
|
-
amount:
|
|
125
|
+
amount: _,
|
|
126
126
|
autoFocus: !0,
|
|
127
|
-
error: !
|
|
127
|
+
error: !_ || isNaN(_),
|
|
128
128
|
fullWidth: !0,
|
|
129
129
|
minAmount: 0,
|
|
130
|
-
setAmount: (
|
|
130
|
+
setAmount: (h) => b(isNaN(Number(h)) ? _ : Number(h)),
|
|
131
131
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
132
132
|
}
|
|
133
133
|
)
|
|
134
134
|
}
|
|
135
135
|
) });
|
|
136
|
-
}),
|
|
137
|
-
const { goals: n, common:
|
|
136
|
+
}), Ct = ({ goals: t }) => {
|
|
137
|
+
const { goals: n, common: s } = T(), { reorderGoals: l, setAlert: u } = x(), [a, _] = y.useState(!1), [b, c] = y.useState(t.map((d) => ({ ...d })));
|
|
138
138
|
y.useEffect(() => {
|
|
139
|
-
a &&
|
|
139
|
+
a && c(t.map((d) => ({ ...d })));
|
|
140
140
|
}, [a]);
|
|
141
|
-
const
|
|
141
|
+
const h = [
|
|
142
142
|
{
|
|
143
143
|
field: "name",
|
|
144
144
|
flex: 1,
|
|
145
|
-
renderCell: (
|
|
146
|
-
const f =
|
|
145
|
+
renderCell: (d) => {
|
|
146
|
+
const f = d.row;
|
|
147
147
|
return /* @__PURE__ */ i(g, { children: [
|
|
148
148
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: f.name }),
|
|
149
149
|
/* @__PURE__ */ e(A, { variant: "XSmall", children: B(
|
|
150
150
|
n.goal_projection,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
ae(
|
|
152
|
+
Q(f.projected_to_complete_at || 0),
|
|
153
|
+
re.MONTH_SHORT_YEAR
|
|
154
154
|
)
|
|
155
155
|
) })
|
|
156
156
|
] });
|
|
@@ -161,28 +161,28 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
161
161
|
align: "right",
|
|
162
162
|
field: "amount",
|
|
163
163
|
minWidth: 140,
|
|
164
|
-
renderCell: (
|
|
165
|
-
const f =
|
|
164
|
+
renderCell: (d) => {
|
|
165
|
+
const f = d.row;
|
|
166
166
|
return /* @__PURE__ */ e(A, { bold: !0, sx: { mr: 12 }, variant: "Body", children: v(f.amount, "0,0.00") });
|
|
167
167
|
},
|
|
168
168
|
sortable: !1
|
|
169
169
|
}
|
|
170
|
-
], o =
|
|
171
|
-
id:
|
|
170
|
+
], o = b.map((d) => ({
|
|
171
|
+
id: d.guid,
|
|
172
172
|
isHovering: !1,
|
|
173
|
-
__reorder__:
|
|
174
|
-
...
|
|
175
|
-
})),
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
for (let C = 0; C <
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
__reorder__: d.name,
|
|
174
|
+
...d
|
|
175
|
+
})), p = ({ oldIndex: d, targetIndex: f }) => {
|
|
176
|
+
const E = [...b];
|
|
177
|
+
E.splice(f, 0, E.splice(d, 1)[0]);
|
|
178
|
+
for (let C = 0; C < E.length; C += 1)
|
|
179
|
+
E[C].position = C + 1;
|
|
180
|
+
c(E);
|
|
181
181
|
}, r = async () => {
|
|
182
|
-
await
|
|
182
|
+
await l(b), u(n.alert_goals_reordered), _(!1);
|
|
183
183
|
};
|
|
184
184
|
return /* @__PURE__ */ i(g, { children: [
|
|
185
|
-
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () =>
|
|
185
|
+
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(k, { onClick: () => _(!0), children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(
|
|
186
186
|
g,
|
|
187
187
|
{
|
|
188
188
|
alignItems: "center",
|
|
@@ -196,28 +196,28 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
196
196
|
}
|
|
197
197
|
) }) }) }),
|
|
198
198
|
/* @__PURE__ */ e(
|
|
199
|
-
|
|
199
|
+
j,
|
|
200
200
|
{
|
|
201
|
-
ariaLabelClose:
|
|
201
|
+
ariaLabelClose: s.close_aria,
|
|
202
202
|
isOpen: a,
|
|
203
|
-
onClose: () =>
|
|
203
|
+
onClose: () => _(!1),
|
|
204
204
|
onPrimaryAction: r,
|
|
205
205
|
title: n.reorder_goals_title,
|
|
206
206
|
children: /* @__PURE__ */ i(g, { children: [
|
|
207
|
-
/* @__PURE__ */ e(
|
|
207
|
+
/* @__PURE__ */ e(W, { sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
|
|
208
208
|
/* @__PURE__ */ e(
|
|
209
|
-
|
|
209
|
+
qe,
|
|
210
210
|
{
|
|
211
211
|
columnHeaderHeight: 0,
|
|
212
|
-
columns:
|
|
212
|
+
columns: h,
|
|
213
213
|
disableColumnFilter: !0,
|
|
214
214
|
disableColumnMenu: !0,
|
|
215
215
|
hideFooter: !0,
|
|
216
|
-
onRowOrderChange:
|
|
216
|
+
onRowOrderChange: p,
|
|
217
217
|
rowReordering: !0,
|
|
218
218
|
rows: o,
|
|
219
219
|
slots: {
|
|
220
|
-
rowReorderIcon: () => /* @__PURE__ */ e(
|
|
220
|
+
rowReorderIcon: () => /* @__PURE__ */ e(He, { sx: { ml: 12 } })
|
|
221
221
|
//TODO: Add to mx-icons
|
|
222
222
|
},
|
|
223
223
|
sx: {
|
|
@@ -231,8 +231,8 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
231
231
|
}
|
|
232
232
|
)
|
|
233
233
|
] });
|
|
234
|
-
},
|
|
235
|
-
const { goals:
|
|
234
|
+
}, St = ({ goal: t, index: n }) => {
|
|
235
|
+
const { goals: s } = T(), { percentage: l } = _e(s, t), u = t.goal_type === me.KEEP_BALANCE_BELOW || t.has_been_spent ? s.goal_completed : B(s.goal_percentage_reached, `${l * 100}`);
|
|
236
236
|
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
|
|
237
237
|
t.track_type !== m.RETIREMENT_TRACK && /* @__PURE__ */ e(
|
|
238
238
|
P,
|
|
@@ -243,110 +243,110 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
243
243
|
justifyContent: "center",
|
|
244
244
|
".MuiAvatar-root": { height: "16px", width: "16px" }
|
|
245
245
|
},
|
|
246
|
-
children: /* @__PURE__ */ e(
|
|
246
|
+
children: /* @__PURE__ */ e(oe, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(A, { bold: !0, variant: "XSmall", children: n + 1 }) })
|
|
247
247
|
}
|
|
248
248
|
),
|
|
249
249
|
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
250
250
|
/* @__PURE__ */ i(g, { children: [
|
|
251
251
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
|
|
252
|
-
/* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ?
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
252
|
+
/* @__PURE__ */ e(A, { variant: "XSmall", children: t.is_complete ? u : B(
|
|
253
|
+
s.goal_projection,
|
|
254
|
+
ae(
|
|
255
|
+
Q(t.projected_to_complete_at || 0),
|
|
256
|
+
re.MONTH_SHORT_YEAR
|
|
257
257
|
)
|
|
258
258
|
) })
|
|
259
259
|
] }),
|
|
260
260
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: v(t.amount, "0,0.00") })
|
|
261
261
|
] }) })
|
|
262
262
|
] }) });
|
|
263
|
-
},
|
|
263
|
+
}, Rt = ({ goal: t }) => {
|
|
264
264
|
const { goals: n } = T();
|
|
265
265
|
return /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { children: [
|
|
266
|
-
/* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(
|
|
266
|
+
/* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e($e, { color: "success", filled: !0, size: 20 }) }),
|
|
267
267
|
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
268
268
|
/* @__PURE__ */ i(g, { children: [
|
|
269
269
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: t.name }),
|
|
270
270
|
/* @__PURE__ */ e(A, { variant: "XSmall", children: B(
|
|
271
271
|
n.completed_label,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
ae(
|
|
273
|
+
Q(t.completed_at || 0),
|
|
274
|
+
re.MONTH_SHORT_YEAR
|
|
275
275
|
)
|
|
276
276
|
) })
|
|
277
277
|
] }),
|
|
278
278
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: v(t.amount, "0,0.00") })
|
|
279
279
|
] }) })
|
|
280
280
|
] }) }, t.guid);
|
|
281
|
-
},
|
|
282
|
-
const { goals: n, common:
|
|
283
|
-
(
|
|
284
|
-
),
|
|
285
|
-
(
|
|
286
|
-
), [
|
|
287
|
-
let
|
|
288
|
-
return t === m.DEBT_TRACK ? (
|
|
289
|
-
/* @__PURE__ */ e(
|
|
281
|
+
}, Et = ({ trackType: t }) => {
|
|
282
|
+
const { goals: n, common: s } = T(), { orderedGoals: l } = x(), u = l.filter((d) => d.track_type === t), a = u.filter(
|
|
283
|
+
(d) => d.track_type === m.SAVINGS_TRACK && !d.has_been_spent || d.track_type !== m.SAVINGS_TRACK && !d.is_complete
|
|
284
|
+
), _ = u.filter(
|
|
285
|
+
(d) => d.track_type === m.SAVINGS_TRACK && d.has_been_spent || d.track_type !== m.SAVINGS_TRACK && d.is_complete
|
|
286
|
+
), [b, c] = y.useState(!1);
|
|
287
|
+
let h = n.manage_saving_goals, o = n.manage_saving_drawer_title, p = n.manage_saving_title, r = n.manage_saving_description;
|
|
288
|
+
return t === m.DEBT_TRACK ? (h = n.manage_debt_goals, o = n.manage_debt_drawer_title, p = n.manage_debt_title, r = n.manage_debt_description) : t === m.RETIREMENT_TRACK && (h = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, p = n.manage_retirement_title, r = n.manage_retirement_description), /* @__PURE__ */ i(g, { children: [
|
|
289
|
+
/* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(M, {}), onClick: () => c(!0), children: h }),
|
|
290
290
|
/* @__PURE__ */ e(
|
|
291
|
-
|
|
291
|
+
j,
|
|
292
292
|
{
|
|
293
|
-
ariaLabelClose:
|
|
294
|
-
isOpen:
|
|
295
|
-
onClose: () =>
|
|
293
|
+
ariaLabelClose: s.close_aria,
|
|
294
|
+
isOpen: b,
|
|
295
|
+
onClose: () => c(!1),
|
|
296
296
|
title: o,
|
|
297
297
|
children: /* @__PURE__ */ i(g, { children: [
|
|
298
298
|
/* @__PURE__ */ i(g, { m: 24, children: [
|
|
299
|
-
/* @__PURE__ */ e(
|
|
300
|
-
/* @__PURE__ */ e(
|
|
299
|
+
/* @__PURE__ */ e(je, { children: p }),
|
|
300
|
+
/* @__PURE__ */ e(W, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: r })
|
|
301
301
|
] }),
|
|
302
|
-
/* @__PURE__ */ e(
|
|
302
|
+
/* @__PURE__ */ e(Tt, { trackType: t }),
|
|
303
303
|
/* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
|
|
304
304
|
/* @__PURE__ */ i(L, { sx: { bgcolor: "background.paper" }, children: [
|
|
305
|
-
a.map((
|
|
306
|
-
const
|
|
305
|
+
a.map((d, f) => {
|
|
306
|
+
const E = f >= a.length - 1;
|
|
307
307
|
return /* @__PURE__ */ i(g, { children: [
|
|
308
|
-
/* @__PURE__ */ e(
|
|
308
|
+
/* @__PURE__ */ e(St, { goal: d, index: f }),
|
|
309
309
|
/* @__PURE__ */ e(
|
|
310
|
-
|
|
310
|
+
R,
|
|
311
311
|
{
|
|
312
|
-
variant:
|
|
312
|
+
variant: E && t === m.RETIREMENT_TRACK ? "fullWidth" : "inset"
|
|
313
313
|
}
|
|
314
314
|
)
|
|
315
|
-
] }, `ongoing-${
|
|
315
|
+
] }, `ongoing-${d.guid}`);
|
|
316
316
|
}),
|
|
317
317
|
t !== m.RETIREMENT_TRACK && /* @__PURE__ */ i(g, { children: [
|
|
318
|
-
/* @__PURE__ */ e(
|
|
319
|
-
/* @__PURE__ */ e(
|
|
318
|
+
/* @__PURE__ */ e(Ct, { goals: a }),
|
|
319
|
+
/* @__PURE__ */ e(R, {})
|
|
320
320
|
] })
|
|
321
321
|
] }),
|
|
322
|
-
t !== m.RETIREMENT_TRACK &&
|
|
322
|
+
t !== m.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ i(g, { children: [
|
|
323
323
|
/* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
|
|
324
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children:
|
|
325
|
-
const
|
|
324
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((d, f) => {
|
|
325
|
+
const E = f > a.length - 1;
|
|
326
326
|
return /* @__PURE__ */ i(g, { children: [
|
|
327
|
-
/* @__PURE__ */ e(
|
|
328
|
-
/* @__PURE__ */ e(
|
|
329
|
-
] }, `complete-${
|
|
327
|
+
/* @__PURE__ */ e(Rt, { goal: d }),
|
|
328
|
+
/* @__PURE__ */ e(R, { variant: E ? "fullWidth" : "inset" })
|
|
329
|
+
] }, `complete-${d.guid}`);
|
|
330
330
|
}) })
|
|
331
331
|
] })
|
|
332
332
|
] })
|
|
333
333
|
}
|
|
334
334
|
)
|
|
335
335
|
] });
|
|
336
|
-
},
|
|
337
|
-
const { isMobile:
|
|
336
|
+
}, de = K(({ trackType: t, onAddGoals: n }) => {
|
|
337
|
+
const { isMobile: s } = he(), { goals: l } = T(), { orderedGoals: u, setSelectedGoal: a } = x(), _ = u.filter((o) => o.track_type === t), b = _.filter(
|
|
338
338
|
(o) => o.track_type === m.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== m.SAVINGS_TRACK && !o.is_complete
|
|
339
|
-
),
|
|
339
|
+
), c = _.filter(
|
|
340
340
|
(o) => o.track_type === m.SAVINGS_TRACK && o.has_been_spent || o.track_type !== m.SAVINGS_TRACK && o.is_complete
|
|
341
|
-
),
|
|
342
|
-
return /* @__PURE__ */ i(g, { mt: 16, mx:
|
|
341
|
+
), h = t === m.DEBT_TRACK ? l.zero_state_complete_debt : l.zero_state_complete_savings;
|
|
342
|
+
return /* @__PURE__ */ i(g, { mt: 16, mx: s ? 24 : 0, children: [
|
|
343
343
|
/* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
|
|
344
|
-
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children:
|
|
345
|
-
/* @__PURE__ */ e(
|
|
344
|
+
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: l.ongoing_title }),
|
|
345
|
+
/* @__PURE__ */ e(Et, { trackType: t })
|
|
346
346
|
] }),
|
|
347
|
-
|
|
347
|
+
b.length > 0 ? /* @__PURE__ */ e(be, { container: !0, spacing: 24, children: b.map((o, p, r) => (
|
|
348
348
|
// Goal should be full width in mobile or if it's the first goal (unless there are 2)
|
|
349
|
-
/* @__PURE__ */ e(
|
|
349
|
+
/* @__PURE__ */ e(be, { xs: s || p === 0 && r.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Ke, { goal: o, onClick: () => a(o) }, o.guid) }, p)
|
|
350
350
|
)) }) : /* @__PURE__ */ i(
|
|
351
351
|
g,
|
|
352
352
|
{
|
|
@@ -358,7 +358,7 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
358
358
|
py: 18,
|
|
359
359
|
children: [
|
|
360
360
|
/* @__PURE__ */ e(
|
|
361
|
-
|
|
361
|
+
W,
|
|
362
362
|
{
|
|
363
363
|
sx: (o) => ({
|
|
364
364
|
color: "text.secondary",
|
|
@@ -368,17 +368,17 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
368
368
|
width: { sm: 381 }
|
|
369
369
|
}),
|
|
370
370
|
variant: "Small",
|
|
371
|
-
children:
|
|
371
|
+
children: Le(t, l)
|
|
372
372
|
}
|
|
373
373
|
),
|
|
374
|
-
/* @__PURE__ */ e(
|
|
374
|
+
/* @__PURE__ */ e(pe, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: l.add_goals_button })
|
|
375
375
|
]
|
|
376
376
|
}
|
|
377
377
|
),
|
|
378
378
|
t !== m.RETIREMENT_TRACK && /* @__PURE__ */ i(g, { gap: 16, mt: 48, children: [
|
|
379
|
-
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children:
|
|
380
|
-
|
|
381
|
-
|
|
379
|
+
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Small", children: l.complete_title }),
|
|
380
|
+
c.length === 0 && /* @__PURE__ */ e(g, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
|
|
381
|
+
W,
|
|
382
382
|
{
|
|
383
383
|
sx: (o) => ({
|
|
384
384
|
color: "text.secondary",
|
|
@@ -388,40 +388,40 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
388
388
|
}
|
|
389
389
|
}),
|
|
390
390
|
variant: "Small",
|
|
391
|
-
children:
|
|
391
|
+
children: h
|
|
392
392
|
}
|
|
393
393
|
) }),
|
|
394
|
-
|
|
394
|
+
c.map((o) => /* @__PURE__ */ e(Ae, { elevation: 2, children: /* @__PURE__ */ e(Te, { onClick: () => a(o), children: /* @__PURE__ */ e(Ce, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
395
395
|
/* @__PURE__ */ i(g, { alignItems: "center", direction: "row", gap: 6, children: [
|
|
396
|
-
/* @__PURE__ */ e(
|
|
396
|
+
/* @__PURE__ */ e(Fe, { color: "success", fill: !0, name: "check_circle", size: 20 }),
|
|
397
397
|
/* @__PURE__ */ e(A, { color: "text.secondary", variant: "Body", children: o.name })
|
|
398
398
|
] }),
|
|
399
399
|
/* @__PURE__ */ e(A, { bold: !0, variant: "Body", children: v(o.amount, "0,0.00") })
|
|
400
400
|
] }) }) }) }, o.guid))
|
|
401
401
|
] })
|
|
402
402
|
] });
|
|
403
|
-
}),
|
|
404
|
-
const { goals:
|
|
403
|
+
}), vt = ({ goalType: t, onClick: n }) => {
|
|
404
|
+
const { goals: s } = T(), { bgcolor: l, icon: u, label: a, description: _, subTypes: b, type: c } = t, [h, o] = y.useState(!1), p = b.length > 0;
|
|
405
405
|
return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ i(L, { sx: { bgcolor: "background.paper" }, children: [
|
|
406
406
|
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(
|
|
407
407
|
k,
|
|
408
408
|
{
|
|
409
|
-
onClick:
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
409
|
+
onClick: p ? () => o(!h) : () => n(
|
|
410
|
+
c === m.RETIREMENT_TRACK ? s.retirement : "",
|
|
411
|
+
c === m.RETIREMENT_TRACK ? J.RETIREMENT : J.OTHER,
|
|
412
|
+
c
|
|
413
413
|
),
|
|
414
414
|
children: [
|
|
415
|
-
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
416
|
-
/* @__PURE__ */ e(w, { primary: a, secondary:
|
|
417
|
-
!
|
|
418
|
-
|
|
415
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(oe, { sx: { bgcolor: l }, variant: "rounded", children: /* @__PURE__ */ e(ge, { name: u, sx: { color: "grey.900" } }) }) }),
|
|
416
|
+
/* @__PURE__ */ e(w, { primary: a, secondary: _, sx: { mr: 24 } }),
|
|
417
|
+
!p && /* @__PURE__ */ e(M, {}),
|
|
418
|
+
p && (h ? /* @__PURE__ */ e(Xe, {}) : /* @__PURE__ */ e(Ue, {}))
|
|
419
419
|
]
|
|
420
420
|
}
|
|
421
421
|
) }),
|
|
422
|
-
/* @__PURE__ */ e(
|
|
423
|
-
|
|
424
|
-
/* @__PURE__ */ e(
|
|
422
|
+
/* @__PURE__ */ e(R, { variant: "inset" }),
|
|
423
|
+
p && /* @__PURE__ */ e(Qe, { in: h, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: b.map((r, d) => /* @__PURE__ */ e(N, { sx: { pl: 48 }, children: /* @__PURE__ */ i(k, { onClick: () => n(r.label, r.metaType, c), children: [
|
|
424
|
+
/* @__PURE__ */ e(et, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ge, { name: r.icon }) }),
|
|
425
425
|
/* @__PURE__ */ e(
|
|
426
426
|
w,
|
|
427
427
|
{
|
|
@@ -430,35 +430,35 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
430
430
|
}
|
|
431
431
|
),
|
|
432
432
|
/* @__PURE__ */ e(M, {})
|
|
433
|
-
] }) },
|
|
433
|
+
] }) }, d)) }) })
|
|
434
434
|
] }) });
|
|
435
|
-
},
|
|
435
|
+
}, De = ({
|
|
436
436
|
accounts: t,
|
|
437
437
|
isOpen: n,
|
|
438
|
-
onClose:
|
|
439
|
-
onSave:
|
|
440
|
-
title:
|
|
438
|
+
onClose: s,
|
|
439
|
+
onSave: l,
|
|
440
|
+
title: u
|
|
441
441
|
}) => {
|
|
442
|
-
const { goals: a, common:
|
|
443
|
-
const
|
|
444
|
-
|
|
442
|
+
const { goals: a, common: _ } = T(), [b, c] = y.useState([]), h = (o) => {
|
|
443
|
+
const p = b.findIndex((d) => d.guid === o.guid), r = [...b];
|
|
444
|
+
p >= 0 ? r.splice(p, 1) : r.push(o), c(r);
|
|
445
445
|
};
|
|
446
446
|
return /* @__PURE__ */ i(
|
|
447
|
-
|
|
447
|
+
j,
|
|
448
448
|
{
|
|
449
|
-
ariaLabelClose:
|
|
449
|
+
ariaLabelClose: _.close_aria,
|
|
450
450
|
isOpen: n,
|
|
451
|
-
onClose:
|
|
452
|
-
onPrimaryAction: () =>
|
|
453
|
-
title:
|
|
451
|
+
onClose: s,
|
|
452
|
+
onPrimaryAction: () => l(b),
|
|
453
|
+
title: u,
|
|
454
454
|
children: [
|
|
455
|
-
/* @__PURE__ */ e(
|
|
455
|
+
/* @__PURE__ */ e(W, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: a.select_debt_accounts_description }),
|
|
456
456
|
/* @__PURE__ */ i(L, { sx: { bgcolor: "background.white" }, children: [
|
|
457
|
-
/* @__PURE__ */ e(
|
|
458
|
-
t.map((o,
|
|
459
|
-
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () =>
|
|
457
|
+
/* @__PURE__ */ e(R, { variant: "fullWidth" }),
|
|
458
|
+
t.map((o, p) => /* @__PURE__ */ i(y.Fragment, { children: [
|
|
459
|
+
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => h(o), children: [
|
|
460
460
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
461
|
-
|
|
461
|
+
ne,
|
|
462
462
|
{
|
|
463
463
|
alt: o?.name || "",
|
|
464
464
|
institutionGuid: o?.institution_guid || ""
|
|
@@ -471,13 +471,13 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
471
471
|
secondary: v(o.balance || 0, "0,0.00")
|
|
472
472
|
}
|
|
473
473
|
),
|
|
474
|
-
/* @__PURE__ */ e(
|
|
474
|
+
/* @__PURE__ */ e(tt, { checked: b.some((r) => r.guid === o.guid) })
|
|
475
475
|
] }) }),
|
|
476
|
-
/* @__PURE__ */ e(
|
|
476
|
+
/* @__PURE__ */ e(R, { variant: p < t.length - 1 ? "inset" : "fullWidth" })
|
|
477
477
|
] }, o.guid))
|
|
478
478
|
] }),
|
|
479
479
|
/* @__PURE__ */ e(
|
|
480
|
-
|
|
480
|
+
ye,
|
|
481
481
|
{
|
|
482
482
|
description: a.connect_description,
|
|
483
483
|
label: a.connect_button,
|
|
@@ -487,56 +487,56 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
487
487
|
]
|
|
488
488
|
}
|
|
489
489
|
);
|
|
490
|
-
},
|
|
491
|
-
const { goals: n } = T(), { addGoal:
|
|
492
|
-
f === m.DEBT_TRACK ?
|
|
490
|
+
}, xt = ({ onClose: t }) => {
|
|
491
|
+
const { goals: n } = T(), { addGoal: s, debtGoals: l, setAlert: u, setSelectedGoal: a } = x(), { visibleDebtAccounts: _ } = V(), [b, c] = y.useState(!1), h = Oe(n), o = (r, d, f) => {
|
|
492
|
+
f === m.DEBT_TRACK ? c(!0) : a({
|
|
493
493
|
amount: 0,
|
|
494
494
|
current_amount: 0,
|
|
495
|
-
goal_type:
|
|
495
|
+
goal_type: me.SAVE_AMOUNT,
|
|
496
496
|
initial_amount: 0,
|
|
497
|
-
meta_type:
|
|
497
|
+
meta_type: d,
|
|
498
498
|
name: r,
|
|
499
499
|
track_type: f
|
|
500
500
|
});
|
|
501
|
-
},
|
|
502
|
-
for (const
|
|
503
|
-
let f =
|
|
504
|
-
|
|
505
|
-
account_guid:
|
|
501
|
+
}, p = async (r) => {
|
|
502
|
+
for (const d of r) {
|
|
503
|
+
let f = J.CREDIT_CARD;
|
|
504
|
+
d.account_type === fe.LOAN ? f = J.LOANS : d.account_type === fe.LINE_OF_CREDIT && (f = J.LINE_OF_CREDIT), await s({
|
|
505
|
+
account_guid: d.guid,
|
|
506
506
|
amount: 0,
|
|
507
507
|
current_amount: 0,
|
|
508
|
-
goal_type:
|
|
509
|
-
initial_amount:
|
|
510
|
-
interest_rate:
|
|
508
|
+
goal_type: me.KEEP_BALANCE_BELOW,
|
|
509
|
+
initial_amount: d.balance || 0,
|
|
510
|
+
interest_rate: d.interest_rate || 0,
|
|
511
511
|
meta_type: f,
|
|
512
|
-
monthly_payment:
|
|
513
|
-
name:
|
|
512
|
+
monthly_payment: d.minimum_payment || 0,
|
|
513
|
+
name: d.name || d.feed_name || "",
|
|
514
514
|
track_type: m.DEBT_TRACK
|
|
515
|
-
}),
|
|
515
|
+
}), u(n.alert_goal_added);
|
|
516
516
|
}
|
|
517
|
-
|
|
517
|
+
c(!1), t?.(m.DEBT_TRACK);
|
|
518
518
|
};
|
|
519
519
|
return /* @__PURE__ */ i(g, { children: [
|
|
520
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children:
|
|
520
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: h.map((r, d) => /* @__PURE__ */ e(vt, { goalType: r, onClick: o }, d)) }),
|
|
521
521
|
/* @__PURE__ */ e(
|
|
522
|
-
|
|
522
|
+
De,
|
|
523
523
|
{
|
|
524
|
-
accounts:
|
|
525
|
-
isOpen:
|
|
526
|
-
onClose: () =>
|
|
527
|
-
onSave:
|
|
524
|
+
accounts: _.filter((r) => !l.find((d) => d.account_guid === r.guid)),
|
|
525
|
+
isOpen: b,
|
|
526
|
+
onClose: () => c(!1),
|
|
527
|
+
onSave: p,
|
|
528
528
|
title: n.select_debt_accounts_title
|
|
529
529
|
}
|
|
530
530
|
)
|
|
531
531
|
] });
|
|
532
|
-
},
|
|
533
|
-
const { accounts: n } = T(), { setSelectedAccount:
|
|
532
|
+
}, Me = ({ account: t }) => {
|
|
533
|
+
const { accounts: n } = T(), { setSelectedAccount: s } = nt(), [l, u] = y.useState(!1);
|
|
534
534
|
return /* @__PURE__ */ i(N, { sx: { bgcolor: "background.paper" }, children: [
|
|
535
535
|
/* @__PURE__ */ i(k, { onClick: () => {
|
|
536
|
-
|
|
536
|
+
s(t), u(!0);
|
|
537
537
|
}, children: [
|
|
538
538
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
539
|
-
|
|
539
|
+
ne,
|
|
540
540
|
{
|
|
541
541
|
alt: t.name || "",
|
|
542
542
|
institutionGuid: t.institution_guid || ""
|
|
@@ -551,74 +551,74 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
551
551
|
),
|
|
552
552
|
/* @__PURE__ */ e(M, {})
|
|
553
553
|
] }),
|
|
554
|
-
/* @__PURE__ */ e(
|
|
555
|
-
/* @__PURE__ */ e(
|
|
556
|
-
/* @__PURE__ */ e(
|
|
554
|
+
/* @__PURE__ */ e(j, { isOpen: l, onClose: () => u(!1), title: n.account_details, children: /* @__PURE__ */ i(g, { children: [
|
|
555
|
+
/* @__PURE__ */ e(ot, {}),
|
|
556
|
+
/* @__PURE__ */ e(at, {})
|
|
557
557
|
] }) })
|
|
558
558
|
] });
|
|
559
|
-
},
|
|
560
|
-
const { goals: n } = T(), { setAlert:
|
|
559
|
+
}, It = K(({ goal: t }) => {
|
|
560
|
+
const { goals: n } = T(), { setAlert: s, setSelectedGoal: l, updateGoal: u } = x(), [a, _] = y.useState(t.amount), b = !t.guid, c = a < 0 || a > 9999999999e-2, h = t.track_type === m.SAVINGS_TRACK && t.has_been_spent || t.track_type !== m.SAVINGS_TRACK && t.is_complete, o = async () => {
|
|
561
561
|
const r = { ...t, amount: a };
|
|
562
|
-
t.amount = a,
|
|
563
|
-
},
|
|
562
|
+
t.amount = a, b ? l(r) : (await u(r), s(n.alert_goal_updated_amount));
|
|
563
|
+
}, p = () => {
|
|
564
564
|
setTimeout(() => {
|
|
565
|
-
|
|
565
|
+
_(t.amount);
|
|
566
566
|
}, 250);
|
|
567
567
|
};
|
|
568
568
|
return /* @__PURE__ */ e(
|
|
569
|
-
|
|
569
|
+
ee,
|
|
570
570
|
{
|
|
571
|
-
isDisabled:
|
|
572
|
-
isSaveDisabled:
|
|
571
|
+
isDisabled: h,
|
|
572
|
+
isSaveDisabled: c,
|
|
573
573
|
label: n.details_amount_to_save,
|
|
574
|
-
onCancel:
|
|
574
|
+
onCancel: p,
|
|
575
575
|
onSave: o,
|
|
576
576
|
primaryText: n.details_amount_to_save,
|
|
577
577
|
secondaryText: v(t.amount, "0,0"),
|
|
578
|
-
zeroStateText:
|
|
578
|
+
zeroStateText: b && t.amount === 0 ? n.add_amount : void 0,
|
|
579
579
|
children: /* @__PURE__ */ e(
|
|
580
|
-
|
|
580
|
+
Ne,
|
|
581
581
|
{
|
|
582
582
|
amount: a,
|
|
583
583
|
autoFocus: !0,
|
|
584
|
-
error:
|
|
584
|
+
error: c,
|
|
585
585
|
fullWidth: !0,
|
|
586
586
|
minAmount: 0,
|
|
587
|
-
setAmount: (r) =>
|
|
587
|
+
setAmount: (r) => _(isNaN(Number(r)) ? a : Number(r)),
|
|
588
588
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
589
589
|
}
|
|
590
590
|
)
|
|
591
591
|
}
|
|
592
592
|
);
|
|
593
|
-
}),
|
|
594
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts:
|
|
595
|
-
const f = { ...t, account_guid:
|
|
596
|
-
|
|
593
|
+
}), Gt = ({ goal: t }) => {
|
|
594
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: s } = V(), { accounts: l, goals: u } = T(), { setAlert: a, setSelectedGoal: _, updateGoal: b } = x(), c = !t.guid, [h, o] = y.useState(!1), p = async ({ balance: r, guid: d }) => {
|
|
595
|
+
const f = { ...t, account_guid: d, current_amount: r || 0 };
|
|
596
|
+
c ? _(f) : (await b(f), a(u.alert_account_changed)), o(!1);
|
|
597
597
|
};
|
|
598
598
|
return /* @__PURE__ */ i(g, { children: [
|
|
599
|
-
|
|
599
|
+
c && !t.account_guid ? /* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => o(!0), children: [
|
|
600
600
|
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
601
|
-
/* @__PURE__ */ e(
|
|
602
|
-
|
|
601
|
+
/* @__PURE__ */ e(ve, { filled: !0 }),
|
|
602
|
+
u.details_add_account
|
|
603
603
|
] }) }),
|
|
604
604
|
/* @__PURE__ */ e(M, { color: "primary" })
|
|
605
605
|
] }) }) : /* @__PURE__ */ i(g, { sx: { gap: 8, my: 24, mx: 24 }, children: [
|
|
606
|
-
/* @__PURE__ */ e(
|
|
606
|
+
/* @__PURE__ */ e(pe, { onClick: () => o(!0), variant: "text", children: u.details_change_account }),
|
|
607
607
|
/* @__PURE__ */ e(
|
|
608
608
|
A,
|
|
609
609
|
{
|
|
610
610
|
color: "text.secondary",
|
|
611
611
|
sx: { textAlign: "center", whiteSpace: "wrap" },
|
|
612
612
|
variant: "Paragraph",
|
|
613
|
-
children: B(
|
|
613
|
+
children: B(u.details_change_account_description, t.name)
|
|
614
614
|
}
|
|
615
615
|
)
|
|
616
616
|
] }),
|
|
617
|
-
/* @__PURE__ */ e(
|
|
618
|
-
n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children:
|
|
619
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((r) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () =>
|
|
617
|
+
/* @__PURE__ */ e(j, { isOpen: h, onClose: () => o(!1), title: u.details_change_account, children: /* @__PURE__ */ i(g, { children: [
|
|
618
|
+
n.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[1] }),
|
|
619
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((r) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => p(r), children: [
|
|
620
620
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
621
|
-
|
|
621
|
+
ne,
|
|
622
622
|
{
|
|
623
623
|
alt: r?.name || "",
|
|
624
624
|
institutionGuid: r?.institution_guid || ""
|
|
@@ -633,10 +633,10 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
633
633
|
),
|
|
634
634
|
/* @__PURE__ */ e(M, {})
|
|
635
635
|
] }) }, r.guid)) }),
|
|
636
|
-
|
|
637
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children:
|
|
636
|
+
s.length > 0 && /* @__PURE__ */ e(A, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: l.account_types[2] }),
|
|
637
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((r) => /* @__PURE__ */ e(N, { children: /* @__PURE__ */ i(k, { onClick: () => p(r), children: [
|
|
638
638
|
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
639
|
-
|
|
639
|
+
ne,
|
|
640
640
|
{
|
|
641
641
|
alt: r?.name || "",
|
|
642
642
|
institutionGuid: r?.institution_guid || ""
|
|
@@ -652,422 +652,421 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
652
652
|
/* @__PURE__ */ e(M, {})
|
|
653
653
|
] }) }, r.guid)) }),
|
|
654
654
|
/* @__PURE__ */ e(
|
|
655
|
-
|
|
655
|
+
ye,
|
|
656
656
|
{
|
|
657
|
-
description:
|
|
658
|
-
label:
|
|
659
|
-
title:
|
|
657
|
+
description: u.connect_description,
|
|
658
|
+
label: u.connect_button,
|
|
659
|
+
title: u.connect_title
|
|
660
660
|
}
|
|
661
661
|
)
|
|
662
662
|
] }) })
|
|
663
663
|
] });
|
|
664
|
-
},
|
|
665
|
-
const { goals: n } = T(), { setAlert:
|
|
666
|
-
const
|
|
667
|
-
t.name = a,
|
|
664
|
+
}, Nt = K(({ goal: t }) => {
|
|
665
|
+
const { goals: n } = T(), { setAlert: s, setSelectedGoal: l, updateGoal: u } = x(), [a, _] = y.useState(t.name), b = !t.guid, c = t.track_type === m.SAVINGS_TRACK && t.has_been_spent || t.track_type !== m.SAVINGS_TRACK && t.is_complete, h = async () => {
|
|
666
|
+
const p = { ...t, name: a };
|
|
667
|
+
t.name = a, b ? l(p) : (await u(p), s(n.alert_goal_updated_name));
|
|
668
668
|
}, o = () => {
|
|
669
669
|
setTimeout(() => {
|
|
670
|
-
|
|
670
|
+
_(t.name);
|
|
671
671
|
}, 250);
|
|
672
672
|
};
|
|
673
673
|
return /* @__PURE__ */ e(
|
|
674
|
-
|
|
674
|
+
ee,
|
|
675
675
|
{
|
|
676
|
-
isDisabled:
|
|
676
|
+
isDisabled: c,
|
|
677
677
|
isSaveDisabled: !a,
|
|
678
678
|
label: n.details_goal_name,
|
|
679
679
|
onCancel: o,
|
|
680
|
-
onSave:
|
|
680
|
+
onSave: h,
|
|
681
681
|
primaryText: n.details_goal_name,
|
|
682
682
|
secondaryText: t.name,
|
|
683
683
|
children: /* @__PURE__ */ e(
|
|
684
|
-
|
|
684
|
+
ke,
|
|
685
685
|
{
|
|
686
686
|
error: !a,
|
|
687
687
|
fullWidth: !0,
|
|
688
688
|
label: n.details_goal_name,
|
|
689
|
-
onChange: (
|
|
689
|
+
onChange: (p) => _(p.target.value),
|
|
690
690
|
value: a
|
|
691
691
|
}
|
|
692
692
|
)
|
|
693
693
|
}
|
|
694
694
|
);
|
|
695
|
-
}),
|
|
696
|
-
const { goals: n } = T(), { setAlert:
|
|
695
|
+
}), kt = ({ goal: t }) => {
|
|
696
|
+
const { goals: n } = T(), { setAlert: s, setSelectedGoal: l, updateGoal: u } = x(), [a, _] = y.useState(t.retirement_age || 65), b = !t.guid, c = async () => {
|
|
697
697
|
if (!isNaN(a)) {
|
|
698
|
-
const
|
|
699
|
-
t.retirement_age = a,
|
|
698
|
+
const p = { ...t, retirement_age: a };
|
|
699
|
+
t.retirement_age = a, b ? l(p) : (await u(p), s(n.alert_goal_updated_retirement_age));
|
|
700
700
|
}
|
|
701
|
-
},
|
|
701
|
+
}, h = () => {
|
|
702
702
|
setTimeout(() => {
|
|
703
|
-
|
|
703
|
+
_(t.retirement_age || 65);
|
|
704
704
|
}, 250);
|
|
705
705
|
}, o = !a || isNaN(a) || a < 20 || a >= 100;
|
|
706
706
|
return /* @__PURE__ */ e(
|
|
707
|
-
|
|
707
|
+
ee,
|
|
708
708
|
{
|
|
709
709
|
isDisabled: t.is_complete,
|
|
710
710
|
isSaveDisabled: o,
|
|
711
711
|
label: n.details_retirement_age,
|
|
712
|
-
onCancel:
|
|
713
|
-
onSave:
|
|
712
|
+
onCancel: h,
|
|
713
|
+
onSave: c,
|
|
714
714
|
primaryText: n.details_retirement_age,
|
|
715
715
|
secondaryText: `${t.retirement_age}`,
|
|
716
|
-
zeroStateText:
|
|
716
|
+
zeroStateText: b && !t.retirement_age ? n.add_age : void 0,
|
|
717
717
|
children: /* @__PURE__ */ e(
|
|
718
|
-
|
|
718
|
+
ke,
|
|
719
719
|
{
|
|
720
720
|
error: o,
|
|
721
721
|
fullWidth: !0,
|
|
722
722
|
label: n.details_retirement_age,
|
|
723
|
-
onChange: (
|
|
723
|
+
onChange: (p) => _(Number(p.target.value)),
|
|
724
724
|
value: isNaN(a) ? "" : a
|
|
725
725
|
}
|
|
726
726
|
)
|
|
727
727
|
}
|
|
728
728
|
);
|
|
729
|
-
},
|
|
730
|
-
const { goals: n } = T(), { user:
|
|
731
|
-
a &&
|
|
729
|
+
}, wt = K(({ goal: t }) => {
|
|
730
|
+
const { goals: n } = T(), { user: s, updateUser: l } = xe(), { setAlert: u } = x(), [a, _] = y.useState(Q(s.birthday ?? 0)), [b, c] = y.useState(null), h = t.is_complete, o = async () => {
|
|
731
|
+
a && ct(a) && (await l({ ...s, birthday: lt(a) }), u(n.alert_goal_updated_birthday));
|
|
732
732
|
};
|
|
733
733
|
return /* @__PURE__ */ e(
|
|
734
|
-
|
|
734
|
+
ee,
|
|
735
735
|
{
|
|
736
|
-
isDisabled:
|
|
737
|
-
isSaveDisabled: !!
|
|
736
|
+
isDisabled: h,
|
|
737
|
+
isSaveDisabled: !!b,
|
|
738
738
|
label: n.details_birthday,
|
|
739
739
|
onSave: o,
|
|
740
740
|
primaryText: n.details_birthday,
|
|
741
|
-
secondaryText: `${
|
|
742
|
-
zeroStateText: !t.guid && !
|
|
743
|
-
children: /* @__PURE__ */ e(
|
|
744
|
-
|
|
741
|
+
secondaryText: `${ae(Q(s.birthday ?? 0), re.MONTH_DAY_YEAR)}`,
|
|
742
|
+
zeroStateText: !t.guid && !s.birthday ? n.add_birthday : void 0,
|
|
743
|
+
children: /* @__PURE__ */ e(_t, { dateAdapter: dt, children: /* @__PURE__ */ e(
|
|
744
|
+
mt,
|
|
745
745
|
{
|
|
746
746
|
label: n.details_birthday,
|
|
747
|
-
onChange:
|
|
748
|
-
onError: (
|
|
747
|
+
onChange: _,
|
|
748
|
+
onError: (p) => c(p),
|
|
749
749
|
sx: { width: "100%" },
|
|
750
750
|
value: a
|
|
751
751
|
}
|
|
752
752
|
) })
|
|
753
753
|
}
|
|
754
754
|
);
|
|
755
|
-
}),
|
|
756
|
-
const { goals: n } = T(), { visibleInvestmentAccounts:
|
|
757
|
-
addRetirementGoalAccount:
|
|
758
|
-
newRetirementGoalAccounts:
|
|
755
|
+
}), Kt = ({ goal: t }) => {
|
|
756
|
+
const { goals: n } = T(), { visibleInvestmentAccounts: s } = V(), {
|
|
757
|
+
addRetirementGoalAccount: l,
|
|
758
|
+
newRetirementGoalAccounts: u,
|
|
759
759
|
retirementGoalAccounts: a,
|
|
760
|
-
selectedGoal:
|
|
761
|
-
setAlert:
|
|
762
|
-
setNewRetirementGoalAccounts:
|
|
763
|
-
setSelectedGoal:
|
|
764
|
-
} = x(), [o,
|
|
765
|
-
(C) => r ?
|
|
766
|
-
), f =
|
|
767
|
-
(C) => !a.find((
|
|
768
|
-
),
|
|
769
|
-
const
|
|
760
|
+
selectedGoal: _,
|
|
761
|
+
setAlert: b,
|
|
762
|
+
setNewRetirementGoalAccounts: c,
|
|
763
|
+
setSelectedGoal: h
|
|
764
|
+
} = x(), [o, p] = y.useState(!1), r = !t.guid, d = s.filter(
|
|
765
|
+
(C) => r ? u.find((S) => S.account_guid === C.guid) : a.find((S) => S.account_guid === C.guid)
|
|
766
|
+
), f = s.filter(
|
|
767
|
+
(C) => !a.find((S) => S.account_guid === C.guid)
|
|
768
|
+
), E = async (C) => {
|
|
769
|
+
const S = C.map((I) => ({
|
|
770
770
|
account_guid: I.guid,
|
|
771
771
|
retirement_goal_guid: t.guid
|
|
772
772
|
}));
|
|
773
773
|
if (r)
|
|
774
|
-
|
|
774
|
+
c(S);
|
|
775
775
|
else
|
|
776
|
-
for (const I of
|
|
777
|
-
await
|
|
778
|
-
|
|
779
|
-
...
|
|
780
|
-
current_amount: C.reduce((I,
|
|
781
|
-
}),
|
|
776
|
+
for (const I of S)
|
|
777
|
+
await l(I), b(n.alert_account_added);
|
|
778
|
+
h({
|
|
779
|
+
..._,
|
|
780
|
+
current_amount: C.reduce((I, F) => I + (F.balance || 0), 0)
|
|
781
|
+
}), p(!1);
|
|
782
782
|
};
|
|
783
783
|
return /* @__PURE__ */ i(g, { children: [
|
|
784
|
-
|
|
785
|
-
/* @__PURE__ */ e(
|
|
786
|
-
/* @__PURE__ */ e(
|
|
784
|
+
d.map((C) => /* @__PURE__ */ i(g, { children: [
|
|
785
|
+
/* @__PURE__ */ e(Me, { account: C }),
|
|
786
|
+
/* @__PURE__ */ e(R, {})
|
|
787
787
|
] }, C.guid)),
|
|
788
|
-
/* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () =>
|
|
788
|
+
/* @__PURE__ */ e(N, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ i(k, { onClick: () => p(!0), children: [
|
|
789
789
|
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
790
|
-
/* @__PURE__ */ e(
|
|
790
|
+
/* @__PURE__ */ e(ve, { filled: !0 }),
|
|
791
791
|
n.details_add_account
|
|
792
792
|
] }) }),
|
|
793
793
|
/* @__PURE__ */ e(M, { color: "primary" })
|
|
794
794
|
] }) }),
|
|
795
795
|
/* @__PURE__ */ e(
|
|
796
|
-
|
|
796
|
+
De,
|
|
797
797
|
{
|
|
798
798
|
accounts: f,
|
|
799
799
|
isOpen: o,
|
|
800
|
-
onClose: () =>
|
|
801
|
-
onSave:
|
|
800
|
+
onClose: () => p(!1),
|
|
801
|
+
onSave: E,
|
|
802
802
|
title: n.add_select_accounts
|
|
803
803
|
}
|
|
804
804
|
)
|
|
805
805
|
] });
|
|
806
|
-
},
|
|
807
|
-
const { goals: n } = T(), { visibleAccounts:
|
|
808
|
-
() =>
|
|
809
|
-
[
|
|
810
|
-
),
|
|
806
|
+
}, Dt = K(({ goal: t }) => {
|
|
807
|
+
const { goals: n } = T(), { visibleAccounts: s } = V(), l = y.useMemo(
|
|
808
|
+
() => s.find((_) => _.guid === t.account_guid),
|
|
809
|
+
[s, t]
|
|
810
|
+
), u = t.track_type;
|
|
811
811
|
let a = n.details_save_title;
|
|
812
812
|
return t.track_type === m.DEBT_TRACK ? a = n.details_debt_title : t.track_type === m.RETIREMENT_TRACK && (a = n.details_retirement_title), /* @__PURE__ */ i(g, { children: [
|
|
813
813
|
/* @__PURE__ */ i(g, { mx: 24, children: [
|
|
814
814
|
/* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: a }),
|
|
815
|
-
/* @__PURE__ */ e(
|
|
815
|
+
/* @__PURE__ */ e(Ke, { goal: t, isInDrawer: !0 }),
|
|
816
816
|
/* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
|
|
817
817
|
] }),
|
|
818
818
|
/* @__PURE__ */ i(L, { sx: { bgcolor: "background.paper" }, children: [
|
|
819
|
-
/* @__PURE__ */ e(
|
|
820
|
-
/* @__PURE__ */ e(
|
|
821
|
-
(
|
|
822
|
-
/* @__PURE__ */ e(
|
|
823
|
-
/* @__PURE__ */ e(
|
|
819
|
+
/* @__PURE__ */ e(Nt, { goal: t }),
|
|
820
|
+
/* @__PURE__ */ e(R, { sx: { ml: 24 } }),
|
|
821
|
+
(u === m.SAVINGS_TRACK || u === m.RETIREMENT_TRACK) && /* @__PURE__ */ i(U, { children: [
|
|
822
|
+
/* @__PURE__ */ e(It, { goal: t }),
|
|
823
|
+
/* @__PURE__ */ e(R, { sx: { ml: u === m.RETIREMENT_TRACK ? 24 : 0 } })
|
|
824
824
|
] }),
|
|
825
825
|
t.track_type === m.DEBT_TRACK && /* @__PURE__ */ i(U, { children: [
|
|
826
|
-
/* @__PURE__ */ e(
|
|
827
|
-
/* @__PURE__ */ e(
|
|
828
|
-
/* @__PURE__ */ e(
|
|
829
|
-
/* @__PURE__ */ e(
|
|
830
|
-
/* @__PURE__ */ e(
|
|
831
|
-
/* @__PURE__ */ e(
|
|
826
|
+
/* @__PURE__ */ e(rt, { goal: t }),
|
|
827
|
+
/* @__PURE__ */ e(R, { sx: { ml: 24 } }),
|
|
828
|
+
/* @__PURE__ */ e(it, { goal: t }),
|
|
829
|
+
/* @__PURE__ */ e(R, { sx: { ml: 24 } }),
|
|
830
|
+
/* @__PURE__ */ e(st, { goal: t }),
|
|
831
|
+
/* @__PURE__ */ e(R, { variant: "fullWidth" })
|
|
832
832
|
] }),
|
|
833
833
|
t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
|
|
834
|
-
/* @__PURE__ */ e(
|
|
835
|
-
/* @__PURE__ */ e(
|
|
836
|
-
/* @__PURE__ */ e(
|
|
837
|
-
/* @__PURE__ */ e(
|
|
834
|
+
/* @__PURE__ */ e(kt, { goal: t }),
|
|
835
|
+
/* @__PURE__ */ e(R, { sx: { ml: 24 } }),
|
|
836
|
+
/* @__PURE__ */ e(wt, { goal: t }),
|
|
837
|
+
/* @__PURE__ */ e(R, { variant: "fullWidth" })
|
|
838
838
|
] })
|
|
839
839
|
] }),
|
|
840
840
|
/* @__PURE__ */ e(A, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === m.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
|
|
841
|
-
t.track_type !== m.RETIREMENT_TRACK &&
|
|
842
|
-
/* @__PURE__ */ e(
|
|
843
|
-
/* @__PURE__ */ e(
|
|
841
|
+
t.track_type !== m.RETIREMENT_TRACK && l && /* @__PURE__ */ i(U, { children: [
|
|
842
|
+
/* @__PURE__ */ e(Me, { account: l }),
|
|
843
|
+
/* @__PURE__ */ e(R, {})
|
|
844
844
|
] }),
|
|
845
845
|
t.track_type === m.RETIREMENT_TRACK && /* @__PURE__ */ i(U, { children: [
|
|
846
|
-
/* @__PURE__ */ e(
|
|
847
|
-
/* @__PURE__ */ e(
|
|
846
|
+
/* @__PURE__ */ e(Kt, { goal: t }),
|
|
847
|
+
/* @__PURE__ */ e(R, {})
|
|
848
848
|
] }),
|
|
849
|
-
t.track_type === m.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(
|
|
849
|
+
t.track_type === m.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Gt, { goal: t })
|
|
850
850
|
] });
|
|
851
|
-
}),
|
|
852
|
-
const { visibleInvestmentAccounts: n } =
|
|
853
|
-
addGoal:
|
|
851
|
+
}), Mt = K(({ onClose: t }) => {
|
|
852
|
+
const { visibleInvestmentAccounts: n } = V(), { goals: s, common: l } = T(), {
|
|
853
|
+
addGoal: u,
|
|
854
854
|
addRetirementGoal: a,
|
|
855
|
-
deleteGoal:
|
|
856
|
-
deleteRetirementGoal:
|
|
857
|
-
newRetirementGoalAccounts:
|
|
858
|
-
retirementGoalAccounts:
|
|
855
|
+
deleteGoal: _,
|
|
856
|
+
deleteRetirementGoal: b,
|
|
857
|
+
newRetirementGoalAccounts: c,
|
|
858
|
+
retirementGoalAccounts: h,
|
|
859
859
|
selectedGoal: o,
|
|
860
|
-
setAlert:
|
|
860
|
+
setAlert: p,
|
|
861
861
|
setSelectedGoal: r,
|
|
862
|
-
updateGoal:
|
|
863
|
-
} = x(), { user: f } =
|
|
864
|
-
const G =
|
|
865
|
-
return n.filter((
|
|
866
|
-
}, [
|
|
862
|
+
updateGoal: d
|
|
863
|
+
} = x(), { user: f } = xe(), [E, C] = y.useState(!1), S = !o?.guid, I = o?.track_type === m.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, F = y.useMemo(() => {
|
|
864
|
+
const G = S ? c : h;
|
|
865
|
+
return n.filter(($) => G.some((D) => D.account_guid === $.guid));
|
|
866
|
+
}, [S, n, c, h]), Z = y.useMemo(() => {
|
|
867
867
|
if (!o) return !1;
|
|
868
|
-
const { account_guid: G, track_type:
|
|
869
|
-
return
|
|
870
|
-
}, [o,
|
|
871
|
-
let
|
|
872
|
-
|
|
873
|
-
const
|
|
868
|
+
const { account_guid: G, track_type: $, name: D, amount: q, retirement_age: O } = o;
|
|
869
|
+
return $ === m.SAVINGS_TRACK ? G ? !!D && !!q : !1 : $ === m.RETIREMENT_TRACK ? F.length ? !!D && !!q && !!O && !!f.birthday : !1 : !0;
|
|
870
|
+
}, [o, F, f.birthday]);
|
|
871
|
+
let z = l.delete_button, H = () => C(!0);
|
|
872
|
+
S ? (H = () => te(), z = l.save_button) : I && (H = () => se(), z = s.mark_as_complete_button);
|
|
873
|
+
const te = async () => {
|
|
874
874
|
if (o) {
|
|
875
875
|
const G = o.track_type;
|
|
876
|
-
G !== m.RETIREMENT_TRACK ? await
|
|
876
|
+
G !== m.RETIREMENT_TRACK ? await u(o) : G === m.RETIREMENT_TRACK && await a({ ...o, target_amount: o.amount }), p(s.alert_goal_added), r(void 0), G && t?.(G);
|
|
877
877
|
}
|
|
878
|
-
},
|
|
879
|
-
o && (o.track_type !== m.RETIREMENT_TRACK ? await
|
|
880
|
-
},
|
|
878
|
+
}, ie = async () => {
|
|
879
|
+
o && (o.track_type !== m.RETIREMENT_TRACK ? await _(o.guid) : o.track_type === m.RETIREMENT_TRACK && await b(o), p(s.alert_goal_deleted), r(void 0));
|
|
880
|
+
}, se = async () => {
|
|
881
881
|
const G = {
|
|
882
882
|
...o,
|
|
883
883
|
has_been_spent: !0
|
|
884
884
|
};
|
|
885
|
-
await
|
|
885
|
+
await d(G), p(s.alert_goal_completed), r(void 0);
|
|
886
886
|
};
|
|
887
887
|
return /* @__PURE__ */ i(g, { children: [
|
|
888
888
|
/* @__PURE__ */ e(
|
|
889
|
-
|
|
889
|
+
j,
|
|
890
890
|
{
|
|
891
|
-
ariaLabelClose:
|
|
892
|
-
hasSecondaryAction:
|
|
891
|
+
ariaLabelClose: l.close_aria,
|
|
892
|
+
hasSecondaryAction: S,
|
|
893
893
|
isOpen: !!o,
|
|
894
|
-
isPrimaryDisabled: !
|
|
894
|
+
isPrimaryDisabled: !Z,
|
|
895
895
|
onClose: () => r(void 0),
|
|
896
|
-
onPrimaryAction:
|
|
897
|
-
primaryColor:
|
|
898
|
-
primaryText:
|
|
896
|
+
onPrimaryAction: H,
|
|
897
|
+
primaryColor: S || I ? "primary" : "error",
|
|
898
|
+
primaryText: z,
|
|
899
899
|
secondaryColor: "primary",
|
|
900
|
-
title:
|
|
901
|
-
children: o && /* @__PURE__ */ e(
|
|
900
|
+
title: s.goal_details,
|
|
901
|
+
children: o && /* @__PURE__ */ e(Dt, { goal: o })
|
|
902
902
|
}
|
|
903
903
|
),
|
|
904
904
|
/* @__PURE__ */ e(
|
|
905
|
-
|
|
905
|
+
Je,
|
|
906
906
|
{
|
|
907
|
-
copy: { close_aria:
|
|
908
|
-
isOpen:
|
|
907
|
+
copy: { close_aria: l.close_aria, title: s.delete_goal },
|
|
908
|
+
isOpen: E,
|
|
909
909
|
maxWidth: "xs",
|
|
910
910
|
onClose: () => C(!1),
|
|
911
|
-
onPrimaryAction:
|
|
911
|
+
onPrimaryAction: ie,
|
|
912
912
|
primaryColor: "error",
|
|
913
|
-
primaryText:
|
|
914
|
-
children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: B(
|
|
913
|
+
primaryText: l.delete_button,
|
|
914
|
+
children: /* @__PURE__ */ e(A, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: B(s.delete_description, o?.name || "") })
|
|
915
915
|
}
|
|
916
916
|
)
|
|
917
917
|
] });
|
|
918
|
-
}),
|
|
919
|
-
const { onEvent:
|
|
920
|
-
|
|
918
|
+
}), Vn = K(({ onBackClick: t, sx: n }) => {
|
|
919
|
+
const { onEvent: s } = Ie(), { isMobile: l } = he(), { visibleAccounts: u } = V(), { isCopyLoaded: a, isInitialized: _, setSelectedAccounts: b } = Ge(), { goals: c, common: h } = T(), { alert: o, goals: p, goalsLoaded: r, loadGoals: d, monthlyCashFlowProfile: f, setAlert: E, retirmentGoals: C } = x(), [S, I] = y.useState(0), [F, Z] = y.useState(!1), z = f?.amount_allocated_for_savings_goals || 0, H = f?.amount_allocated_for_debt_goals || 0, te = f?.amount_allocated_for_retirement_goals || 0, ie = a ? B(
|
|
920
|
+
l ? c.tab_subtitle_mobile : c.tab_subtitle,
|
|
921
921
|
v(z, "0,0")
|
|
922
|
-
) : "",
|
|
923
|
-
|
|
924
|
-
v(
|
|
925
|
-
) : "",
|
|
926
|
-
|
|
922
|
+
) : "", se = a ? B(
|
|
923
|
+
l ? c.tab_subtitle_mobile : c.tab_subtitle,
|
|
924
|
+
v(H, "0,0")
|
|
925
|
+
) : "", G = a ? B(
|
|
926
|
+
l ? c.tab_subtitle_mobile : c.tab_subtitle,
|
|
927
927
|
v(te, "0,0")
|
|
928
928
|
) : "";
|
|
929
929
|
y.useEffect(() => {
|
|
930
|
-
b(
|
|
930
|
+
b(u), s(Y.GOALS_VIEW);
|
|
931
931
|
}, []), y.useEffect(() => {
|
|
932
|
-
|
|
933
|
-
}, [
|
|
932
|
+
_ && d().finally();
|
|
933
|
+
}, [_, z, H, te]);
|
|
934
934
|
const $ = () => {
|
|
935
|
-
|
|
936
|
-
},
|
|
937
|
-
|
|
938
|
-
},
|
|
939
|
-
|
|
940
|
-
},
|
|
941
|
-
() =>
|
|
942
|
-
[
|
|
943
|
-
)
|
|
944
|
-
return !
|
|
945
|
-
|
|
935
|
+
s(Y.GOALS_CLICK_FILTER);
|
|
936
|
+
}, D = () => {
|
|
937
|
+
Z(!0), s(Y.GOALS_CLICK_ADD);
|
|
938
|
+
}, q = (X) => {
|
|
939
|
+
Z(!1), X === m.SAVINGS_TRACK ? I(0) : X === m.DEBT_TRACK ? I(1) : X === m.RETIREMENT_TRACK && I(2);
|
|
940
|
+
}, O = y.useMemo(
|
|
941
|
+
() => r && (p.length === 0 || p.every(({ track_type: X }) => !X) && C.length === 0),
|
|
942
|
+
[p, r, C]
|
|
943
|
+
);
|
|
944
|
+
return !r || !a || !_ ? /* @__PURE__ */ e(we, {}) : /* @__PURE__ */ i(
|
|
945
|
+
pt,
|
|
946
946
|
{
|
|
947
|
-
accountOptions:
|
|
947
|
+
accountOptions: u,
|
|
948
948
|
actions: [
|
|
949
949
|
{
|
|
950
950
|
iconName: "add",
|
|
951
|
-
label:
|
|
952
|
-
onClick:
|
|
951
|
+
label: c.add_title,
|
|
952
|
+
onClick: D
|
|
953
953
|
}
|
|
954
954
|
],
|
|
955
955
|
onAccountsFilterClick: $,
|
|
956
956
|
onBackClick: t,
|
|
957
957
|
sx: n,
|
|
958
|
-
title:
|
|
958
|
+
title: c.title,
|
|
959
959
|
children: [
|
|
960
|
-
/* @__PURE__ */ i(g, { mx:
|
|
960
|
+
/* @__PURE__ */ i(g, { mx: l ? 0 : 48, my: 24, children: [
|
|
961
961
|
/* @__PURE__ */ i(
|
|
962
|
-
|
|
962
|
+
Ve,
|
|
963
963
|
{
|
|
964
|
-
onChange: (X,
|
|
964
|
+
onChange: (X, Be) => I(Be),
|
|
965
965
|
sx: { bgcolor: "background.paper" },
|
|
966
966
|
textColor: "primary",
|
|
967
|
-
value:
|
|
967
|
+
value: O ? !1 : S,
|
|
968
968
|
variant: "fullWidth",
|
|
969
969
|
children: [
|
|
970
970
|
/* @__PURE__ */ e(
|
|
971
|
-
|
|
971
|
+
le,
|
|
972
972
|
{
|
|
973
|
-
disabled:
|
|
974
|
-
label: /* @__PURE__ */ e(
|
|
973
|
+
disabled: O,
|
|
974
|
+
label: /* @__PURE__ */ e(ce, { subtitle: ie, title: c.tab_saving_title })
|
|
975
975
|
}
|
|
976
976
|
),
|
|
977
977
|
/* @__PURE__ */ e(
|
|
978
|
-
|
|
978
|
+
le,
|
|
979
979
|
{
|
|
980
|
-
disabled:
|
|
981
|
-
label: /* @__PURE__ */ e(
|
|
980
|
+
disabled: O,
|
|
981
|
+
label: /* @__PURE__ */ e(ce, { subtitle: se, title: c.tab_debt_title })
|
|
982
982
|
}
|
|
983
983
|
),
|
|
984
984
|
/* @__PURE__ */ e(
|
|
985
|
-
|
|
985
|
+
le,
|
|
986
986
|
{
|
|
987
|
-
disabled:
|
|
988
|
-
label: /* @__PURE__ */ e(
|
|
987
|
+
disabled: O,
|
|
988
|
+
label: /* @__PURE__ */ e(ce, { subtitle: G, title: c.tab_retirement_title })
|
|
989
989
|
}
|
|
990
990
|
)
|
|
991
991
|
]
|
|
992
992
|
}
|
|
993
993
|
),
|
|
994
|
-
|
|
995
|
-
|
|
994
|
+
O ? /* @__PURE__ */ e(
|
|
995
|
+
ut,
|
|
996
996
|
{
|
|
997
|
-
header:
|
|
997
|
+
header: c.create_goals_header,
|
|
998
998
|
icon: "trophy",
|
|
999
|
-
onClick:
|
|
1000
|
-
primaryButton:
|
|
1001
|
-
subText:
|
|
999
|
+
onClick: D,
|
|
1000
|
+
primaryButton: c.add_goals_button,
|
|
1001
|
+
subText: c.empty_state_subheader,
|
|
1002
1002
|
sx: {
|
|
1003
1003
|
width: { sm: 432 },
|
|
1004
1004
|
".buttons-footer": {
|
|
1005
1005
|
width: 139
|
|
1006
1006
|
}
|
|
1007
|
-
}
|
|
1008
|
-
variant: Le
|
|
1007
|
+
}
|
|
1009
1008
|
}
|
|
1010
1009
|
) : /* @__PURE__ */ i(U, { children: [
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1010
|
+
S === 0 && /* @__PURE__ */ e(de, { onAddGoals: D, trackType: m.SAVINGS_TRACK }),
|
|
1011
|
+
S === 1 && /* @__PURE__ */ e(de, { onAddGoals: D, trackType: m.DEBT_TRACK }),
|
|
1012
|
+
S === 2 && /* @__PURE__ */ e(de, { onAddGoals: D, trackType: m.RETIREMENT_TRACK })
|
|
1014
1013
|
] })
|
|
1015
1014
|
] }),
|
|
1016
|
-
/* @__PURE__ */ e(
|
|
1015
|
+
/* @__PURE__ */ e(Mt, { onClose: q }),
|
|
1017
1016
|
/* @__PURE__ */ e(
|
|
1018
|
-
|
|
1017
|
+
j,
|
|
1019
1018
|
{
|
|
1020
|
-
ariaLabelClose:
|
|
1021
|
-
isOpen:
|
|
1022
|
-
onClose: () =>
|
|
1023
|
-
title:
|
|
1024
|
-
children: /* @__PURE__ */ e(
|
|
1019
|
+
ariaLabelClose: h.close_aria,
|
|
1020
|
+
isOpen: F,
|
|
1021
|
+
onClose: () => Z(!1),
|
|
1022
|
+
title: c.add_goal_title,
|
|
1023
|
+
children: /* @__PURE__ */ e(xt, { onClose: q })
|
|
1025
1024
|
}
|
|
1026
1025
|
),
|
|
1027
|
-
/* @__PURE__ */ e(
|
|
1026
|
+
/* @__PURE__ */ e(Pe, { onClose: () => E(""), open: !!o, children: /* @__PURE__ */ e(We, { onClose: () => E(""), severity: "success", variant: "filled", children: o }) })
|
|
1028
1027
|
]
|
|
1029
1028
|
}
|
|
1030
1029
|
);
|
|
1031
|
-
}),
|
|
1032
|
-
const { goals: n } = T(),
|
|
1033
|
-
backgroundColor:
|
|
1034
|
-
color:
|
|
1030
|
+
}), Bt = K(({ goal: t }) => {
|
|
1031
|
+
const { goals: n } = T(), s = gt(), {
|
|
1032
|
+
backgroundColor: l,
|
|
1033
|
+
color: u,
|
|
1035
1034
|
percentage: a,
|
|
1036
|
-
projectedText:
|
|
1037
|
-
} =
|
|
1038
|
-
let
|
|
1039
|
-
return t.track_type === m.DEBT_TRACK ?
|
|
1040
|
-
/* @__PURE__ */ e(
|
|
1041
|
-
/* @__PURE__ */ i(
|
|
1042
|
-
/* @__PURE__ */ e(
|
|
1043
|
-
t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children:
|
|
1035
|
+
projectedText: _
|
|
1036
|
+
} = _e(n, t), b = Math.round(a * 100);
|
|
1037
|
+
let c = /* @__PURE__ */ e(Se, {});
|
|
1038
|
+
return t.track_type === m.DEBT_TRACK ? c = /* @__PURE__ */ e(Re, {}) : t.track_type === m.RETIREMENT_TRACK && (c = /* @__PURE__ */ e(Ee, {})), /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
|
|
1039
|
+
/* @__PURE__ */ e(oe, { sx: { bgcolor: l, color: u, height: 32, width: 32 }, variant: "rounded", children: c }),
|
|
1040
|
+
/* @__PURE__ */ i(bt, { sx: { width: "100%" }, children: [
|
|
1041
|
+
/* @__PURE__ */ e(ue, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
|
|
1042
|
+
t.projected_to_complete_at && /* @__PURE__ */ e(A, { color: "text.secondary", variant: "XSmall", children: _ })
|
|
1044
1043
|
] }),
|
|
1045
1044
|
/* @__PURE__ */ e(
|
|
1046
|
-
|
|
1045
|
+
ft,
|
|
1047
1046
|
{
|
|
1048
|
-
backgroundStrokeColor:
|
|
1049
|
-
color:
|
|
1050
|
-
percent:
|
|
1047
|
+
backgroundStrokeColor: s.palette.border.lighter,
|
|
1048
|
+
color: s.palette.primary.main,
|
|
1049
|
+
percent: b,
|
|
1051
1050
|
size: 40,
|
|
1052
1051
|
strokeWidth: 3,
|
|
1053
|
-
children: /* @__PURE__ */ e(
|
|
1052
|
+
children: /* @__PURE__ */ e(W, { fontWeight: 700, variant: "caption", children: `${b}%` })
|
|
1054
1053
|
}
|
|
1055
1054
|
)
|
|
1056
1055
|
] });
|
|
1057
|
-
}),
|
|
1056
|
+
}), Lt = ({ header: t, subText: n, sx: s }) => /* @__PURE__ */ i(
|
|
1058
1057
|
g,
|
|
1059
1058
|
{
|
|
1060
1059
|
sx: {
|
|
1061
1060
|
alignItems: "center",
|
|
1062
1061
|
alignSelf: "center",
|
|
1063
1062
|
px: 24,
|
|
1064
|
-
...
|
|
1063
|
+
...s
|
|
1065
1064
|
},
|
|
1066
1065
|
children: [
|
|
1067
|
-
/* @__PURE__ */ e(
|
|
1068
|
-
/* @__PURE__ */ e(
|
|
1066
|
+
/* @__PURE__ */ e(Ye, { size: 32 }),
|
|
1067
|
+
/* @__PURE__ */ e(ue, { fontSize: 15, fontWeight: 600, children: t }),
|
|
1069
1068
|
/* @__PURE__ */ e(
|
|
1070
|
-
|
|
1069
|
+
W,
|
|
1071
1070
|
{
|
|
1072
1071
|
color: "text.secondary",
|
|
1073
1072
|
sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
|
|
@@ -1077,46 +1076,46 @@ const St = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1077
1076
|
)
|
|
1078
1077
|
]
|
|
1079
1078
|
}
|
|
1080
|
-
),
|
|
1081
|
-
const { visibleAccounts: n } =
|
|
1079
|
+
), jn = K(({ onCTAClick: t }) => {
|
|
1080
|
+
const { visibleAccounts: n } = V(), { onEvent: s } = Ie(), { goals: l } = T(), { isInitialized: u, setSelectedAccounts: a, isCopyLoaded: _ } = Ge(), { ongoingGoalsForMicroWidget: b, loadGoals: c, goalsLoaded: h } = x();
|
|
1082
1081
|
y.useEffect(() => {
|
|
1083
1082
|
a(n);
|
|
1084
1083
|
}, []), y.useEffect(() => {
|
|
1085
|
-
|
|
1084
|
+
u && (c().finally(), s(Y.GOALS_LOAD_WIDGET, {
|
|
1086
1085
|
state: n?.length ? "default" : "zeroState"
|
|
1087
1086
|
}));
|
|
1088
|
-
}, [
|
|
1087
|
+
}, [u]);
|
|
1089
1088
|
const o = y.useMemo(
|
|
1090
|
-
() =>
|
|
1091
|
-
[
|
|
1092
|
-
),
|
|
1093
|
-
|
|
1089
|
+
() => h && b.length === 0,
|
|
1090
|
+
[b, h]
|
|
1091
|
+
), p = () => {
|
|
1092
|
+
s(
|
|
1094
1093
|
o ? Y.GOALS_CLICK_GET_STARTED : Y.GOALS_CLICK_VIEW_DETAILS
|
|
1095
1094
|
), t();
|
|
1096
1095
|
};
|
|
1097
|
-
return !
|
|
1098
|
-
|
|
1096
|
+
return !h || !_ || !u ? /* @__PURE__ */ e(we, {}) : /* @__PURE__ */ e(
|
|
1097
|
+
yt,
|
|
1099
1098
|
{
|
|
1100
1099
|
className: "mx-goals-microwidget",
|
|
1101
|
-
ctaLabel: o ?
|
|
1102
|
-
onCTAClick:
|
|
1103
|
-
title:
|
|
1100
|
+
ctaLabel: o ? l.get_started : l.view_details,
|
|
1101
|
+
onCTAClick: p,
|
|
1102
|
+
title: l.title,
|
|
1104
1103
|
children: o ? /* @__PURE__ */ e(
|
|
1105
|
-
|
|
1104
|
+
Lt,
|
|
1106
1105
|
{
|
|
1107
|
-
header:
|
|
1108
|
-
subText:
|
|
1106
|
+
header: l.create_goals_header,
|
|
1107
|
+
subText: l.micro_zero_state_description
|
|
1109
1108
|
}
|
|
1110
|
-
) : /* @__PURE__ */ e(
|
|
1111
|
-
/* @__PURE__ */ e(
|
|
1112
|
-
|
|
1109
|
+
) : /* @__PURE__ */ e(ht, { sx: { justifyContent: "space-between" }, children: b.map((r, d) => /* @__PURE__ */ i(y.Fragment, { children: [
|
|
1110
|
+
/* @__PURE__ */ e(Bt, { goal: r }),
|
|
1111
|
+
d !== b.length - 1 && /* @__PURE__ */ e(R, {})
|
|
1113
1112
|
] }, r.guid)) })
|
|
1114
1113
|
}
|
|
1115
1114
|
);
|
|
1116
1115
|
});
|
|
1117
1116
|
export {
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1117
|
+
Hn as GoalApi,
|
|
1118
|
+
$n as GoalStore,
|
|
1119
|
+
jn as GoalsMicroWidget,
|
|
1120
|
+
Vn as GoalsWidget
|
|
1122
1121
|
};
|