@mx-cartographer/experiences 7.0.13 → 7.0.14-alpha-debts-missing-sorting-option-ram1
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 +8 -0
- package/dist/{AccountDetailsContent-Tm7IjJIc.mjs → AccountDetailsContent-BzD6CDIm.mjs} +3 -3
- package/dist/{AccountDetailsHeader-sum_Bgdy.mjs → AccountDetailsHeader-Eb3WvBGm.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-BPvjZ-Xo.mjs → CategorySelectorDrawer-BJ9jlCyt.mjs} +1 -1
- package/dist/{DebtsStore-Dp-CraCD.mjs → DebtsStore-VkyMADzd.mjs} +18 -15
- package/dist/{Help-B3oENhkG.mjs → Help-KAAMEubC.mjs} +1 -1
- package/dist/Loader-DUaFpDGv.mjs +24 -0
- package/dist/{ManageIncome-Bef4VWt7.mjs → ManageIncome-DcKHpJ9V.mjs} +2 -2
- package/dist/{NotificationSettings-uXVwpIa1.mjs → NotificationSettings-aZFVTc8B.mjs} +1 -1
- package/dist/{RecurringSettings-1EOh67IT.mjs → RecurringSettings-C9r4s1Cz.mjs} +2 -2
- package/dist/{TransactionDetails-DYF-P762.mjs → TransactionDetails-bja6hKJk.mjs} +3 -3
- package/dist/{ViewMoreMicroCard-BZI5VMNW.mjs → ViewMoreMicroCard-BPEzFZRG.mjs} +1 -1
- package/dist/{WidgetContainer-C2NBfpDg.mjs → WidgetContainer-CdBs9WOZ.mjs} +1 -1
- package/dist/accounts/index.es.js +5 -5
- package/dist/analytics/index.es.js +1 -1
- package/dist/budgets/index.es.js +5 -5
- package/dist/cashflow/index.es.js +5 -5
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +3 -3
- package/dist/common/types/localization/DebtsCopy.d.ts +1 -0
- package/dist/debts/constants/index.d.ts +7 -4
- package/dist/debts/index.es.js +544 -482
- package/dist/debts/store/DebtsUiStore.d.ts +3 -3
- package/dist/debts/utils/DebtsWidget.d.ts +2 -2
- package/dist/debts/utils/SnowballCard.d.ts +2 -2
- package/dist/debts/utils/shared.d.ts +11 -2
- package/dist/finstrong/index.es.js +3 -3
- package/dist/goals/index.es.js +4 -4
- package/dist/help/index.es.js +3 -3
- package/dist/investments/index.es.js +2 -2
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +2 -2
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +6 -6
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +3 -3
- package/dist/transactions/index.es.js +5 -5
- package/dist/trends/index.es.js +4 -4
- package/package.json +1 -1
- package/dist/Loader-Dp1P2gNw.mjs +0 -14
package/dist/debts/index.es.js
CHANGED
|
@@ -1,111 +1,168 @@
|
|
|
1
1
|
import { jsx as e, jsxs as s, Fragment as L } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import x from "react";
|
|
3
3
|
import { observer as S } from "mobx-react-lite";
|
|
4
|
-
import
|
|
5
|
-
import { useTheme as j, Card as
|
|
6
|
-
import { Text as
|
|
7
|
-
import { intervalToDuration as
|
|
8
|
-
import { D as
|
|
9
|
-
import { a as
|
|
10
|
-
import { f as
|
|
4
|
+
import g from "@mui/material/Stack";
|
|
5
|
+
import { useTheme as j, Card as be, Stack as _, Box as O } from "@mui/material";
|
|
6
|
+
import { Text as l, H3 as ve, InstitutionLogo as De, Icon as ee } from "@mxenabled/mxui";
|
|
7
|
+
import { getUnixTime as le, addMonths as se, fromUnixTime as ce, intervalToDuration as Te, formatDuration as Ae } from "date-fns";
|
|
8
|
+
import { D as M, M as Ee, I as Ie } from "../DebtsStore-VkyMADzd.mjs";
|
|
9
|
+
import { a as Pr } from "../DebtsStore-VkyMADzd.mjs";
|
|
10
|
+
import { f as P, a as Be } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
11
11
|
import { f as K, D as U } from "../Dialog-CWW597AF.mjs";
|
|
12
|
-
import { G as
|
|
12
|
+
import { G as Me, x as q, u as C, j as z, e as k, c as Z, a as Pe } from "../hooks-DkUqN6JE.mjs";
|
|
13
13
|
import { u as X } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
14
|
import { D as te } from "../Drawer-kEE73B87.mjs";
|
|
15
|
-
import { b as
|
|
16
|
-
import { A as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { LineChart as
|
|
15
|
+
import { b as A } from "../Localization-2MODESHW.mjs";
|
|
16
|
+
import { A as ke, u as Fe } from "../AccountDetailsHeader-Eb3WvBGm.mjs";
|
|
17
|
+
import Ne from "@mui/material/Card";
|
|
18
|
+
import Re from "@mui/material/CardContent";
|
|
19
|
+
import Le from "@mui/material/CardHeader";
|
|
20
|
+
import { LineChart as $e } from "@mui/x-charts";
|
|
21
21
|
import re from "@mui/material/Box";
|
|
22
|
-
import { useTheme as
|
|
23
|
-
import { A as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
22
|
+
import { useTheme as He } from "@mui/material/styles";
|
|
23
|
+
import { A as T, W as Oe } from "../WidgetContainer-CdBs9WOZ.mjs";
|
|
24
|
+
import de from "@mui/material/Tab";
|
|
25
|
+
import We from "@mui/material/Tabs";
|
|
26
|
+
import _e from "@mui/material/List";
|
|
27
27
|
import W from "@mui/material/Divider";
|
|
28
|
-
import { M as
|
|
29
|
-
import
|
|
28
|
+
import { M as Ge, I as je, O as ze } from "../OriginalBalanceAction-DepsKiJz.mjs";
|
|
29
|
+
import Xe from "@mui/material/TextField";
|
|
30
30
|
import { L as J } from "../ListItemAction-DNZZ5fSa.mjs";
|
|
31
31
|
import { C as ae } from "../CurrencyInput-bEx2Mbd0.mjs";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import { Error as
|
|
36
|
-
import { T as
|
|
37
|
-
import { DataGridPro as
|
|
32
|
+
import pe from "@mui/material/Alert";
|
|
33
|
+
import me from "@mui/material/AlertTitle";
|
|
34
|
+
import he from "@mui/material/Paper";
|
|
35
|
+
import { Error as Ve, CheckCircle as ye } from "@mxenabled/mx-icons";
|
|
36
|
+
import { T as ue } from "../TabContentContainer-j01JYR_7.mjs";
|
|
37
|
+
import { DataGridPro as Ye } from "@mui/x-data-grid-pro";
|
|
38
38
|
import { H as G } from "../HeaderCell-DjuifqHJ.mjs";
|
|
39
|
-
import { f as
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import { L as
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
39
|
+
import { f as Ke } from "../ConnectDrawer-phFH6OHt.mjs";
|
|
40
|
+
import fe from "@mui/material/Button";
|
|
41
|
+
import Ue from "@mui/material/IconButton";
|
|
42
|
+
import qe from "@mui/material/ListItem";
|
|
43
|
+
import Ze from "@mui/material/Popover";
|
|
44
|
+
import { L as Je } from "../Loader-DUaFpDGv.mjs";
|
|
45
|
+
const Qe = (a, n = 0, o = 0) => {
|
|
46
|
+
const r = n / (Ee * Ie);
|
|
47
|
+
return o === 0 ? 0 : Math.ceil(
|
|
48
|
+
r === 0 ? a / o : -Math.log(1 - r * a / o) / Math.log(1 + r)
|
|
49
|
+
);
|
|
50
|
+
}, et = (a, n, o, r, t) => {
|
|
51
|
+
const i = [];
|
|
52
|
+
if (o === 0) {
|
|
53
|
+
for (let d = 0; d < a; d++) {
|
|
54
|
+
const c = n - r * (d + 1), h = n - r * d, m = c >= 0 ? r : h;
|
|
55
|
+
i.push({
|
|
56
|
+
balance: c >= 0 ? c : 0,
|
|
57
|
+
interest: o,
|
|
58
|
+
payment: m,
|
|
59
|
+
principal: m,
|
|
60
|
+
timestamp: le(
|
|
61
|
+
se(
|
|
62
|
+
ce(t),
|
|
63
|
+
// convert seconds → Date
|
|
64
|
+
d + 1
|
|
65
|
+
// add (index + 1) months
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return i;
|
|
71
|
+
}
|
|
72
|
+
const p = o / 1200;
|
|
73
|
+
for (let d = 0; d < a; d++) {
|
|
74
|
+
const c = le(se(ce(t), d + 1)), h = Math.pow(1 + p, d), m = n * h - r * ((h - 1) / p), y = Math.pow(1 + p, d + 1), f = n * y - r * ((y - 1) / p), v = r + Math.min(f, 0), E = m * p;
|
|
75
|
+
i.push({
|
|
76
|
+
balance: Math.max(0, f),
|
|
77
|
+
interest: E,
|
|
78
|
+
payment: v,
|
|
79
|
+
principal: v - E,
|
|
80
|
+
timestamp: c
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return i;
|
|
84
|
+
}, tt = (a) => (a[a.length - 1] || {}).timestamp, rt = (a) => a.map((n) => {
|
|
85
|
+
const { monthly_payment: o, interest_rate: r, balance: t, payment_due_date: i } = n, p = Qe(t, r ?? 0, o ?? 0), d = et(
|
|
86
|
+
p,
|
|
87
|
+
t,
|
|
88
|
+
r ?? 0,
|
|
89
|
+
o ?? 0,
|
|
90
|
+
i
|
|
91
|
+
), c = tt(d);
|
|
92
|
+
return {
|
|
93
|
+
...n,
|
|
94
|
+
minimumFinalPayment: c,
|
|
95
|
+
minimumPayments: d
|
|
96
|
+
};
|
|
97
|
+
}), xe = (a, n) => {
|
|
98
|
+
const o = rt(
|
|
99
|
+
a.filter((t) => !t.is_paid_off && !t.is_impossible)
|
|
100
|
+
), r = a.filter((t) => t.is_paid_off || t.is_impossible).map((t) => ({ ...t, minimumPayments: [] }));
|
|
101
|
+
switch (n) {
|
|
102
|
+
case M.FASTEST_PAYOFF_FIRST:
|
|
103
|
+
o.sort((t, i) => (t.minimumFinalPayment ?? 0) - (i.minimumFinalPayment ?? 0));
|
|
104
|
+
break;
|
|
105
|
+
case M.HIGHEST_INTEREST:
|
|
106
|
+
o.sort((t, i) => (i.interest_rate ?? 0) - (t.interest_rate ?? 0));
|
|
50
107
|
break;
|
|
51
|
-
case
|
|
52
|
-
|
|
108
|
+
case M.LOWEST_BALANCE:
|
|
109
|
+
o.sort((t, i) => t.balance - i.balance);
|
|
53
110
|
break;
|
|
54
|
-
case
|
|
55
|
-
|
|
111
|
+
case M.HIGHEST_BALANCE:
|
|
112
|
+
o.sort((t, i) => i.balance - t.balance);
|
|
56
113
|
break;
|
|
57
114
|
default:
|
|
58
|
-
|
|
115
|
+
o.sort((t, i) => t.balance - i.balance);
|
|
59
116
|
}
|
|
60
|
-
a.splice(0, a.length, ...
|
|
117
|
+
a.splice(0, a.length, ...o, ...r);
|
|
61
118
|
};
|
|
62
|
-
function
|
|
63
|
-
const r = a.map((
|
|
64
|
-
(
|
|
119
|
+
function at(a, n, o = 0) {
|
|
120
|
+
const r = a.map((m) => ({ ...m })).filter(
|
|
121
|
+
(m) => m.interest_rate !== void 0 && m.monthly_payment !== void 0 && !m.is_paid_off
|
|
65
122
|
);
|
|
66
|
-
|
|
67
|
-
let t = 0,
|
|
68
|
-
const
|
|
69
|
-
for (; r.some((
|
|
70
|
-
let
|
|
71
|
-
for (const [
|
|
72
|
-
if (
|
|
73
|
-
const
|
|
74
|
-
let u =
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
|
|
123
|
+
xe(r, n);
|
|
124
|
+
let t = 0, i = 0;
|
|
125
|
+
const p = /* @__PURE__ */ new Date(), d = /* @__PURE__ */ new Date();
|
|
126
|
+
for (; r.some((m) => m.balance >= 0.01 && !m.is_impossible); ) {
|
|
127
|
+
let m = !1;
|
|
128
|
+
for (const [y, f] of r.entries()) {
|
|
129
|
+
if (f.balance <= 0.01 || f.is_impossible) continue;
|
|
130
|
+
const E = (f.interest_rate ?? 0) / 100 / 12, D = f.balance * E;
|
|
131
|
+
let u = f.monthly_payment ?? 0;
|
|
132
|
+
y === 0 && o && (u += o), f.balance += D;
|
|
133
|
+
const I = Math.min(f.balance, u + i);
|
|
134
|
+
if (I <= D) {
|
|
135
|
+
f.is_impossible = !0;
|
|
79
136
|
continue;
|
|
80
137
|
}
|
|
81
|
-
|
|
138
|
+
f.balance -= I, f.balance = f.balance < 0.01 ? 0 : f.balance, t += D, f.balance <= 0 && (i += u), I > 0 && (m = !0);
|
|
82
139
|
}
|
|
83
|
-
|
|
140
|
+
m && d.setMonth(d.getMonth() + 1);
|
|
84
141
|
}
|
|
85
|
-
const c = r.some((
|
|
142
|
+
const c = r.some((m) => m.is_impossible && m.balance > 0), h = Te({ start: p, end: d });
|
|
86
143
|
return {
|
|
87
|
-
payoffSavings: c ? "N/A" :
|
|
88
|
-
payoffDate: c ? "Never" : K(
|
|
89
|
-
payoffDuration: c ? "Stagnant" :
|
|
144
|
+
payoffSavings: c ? "N/A" : P(t, "0,0.00"),
|
|
145
|
+
payoffDate: c ? "Never" : K(d, U.MONTH_YEAR),
|
|
146
|
+
payoffDuration: c ? "Stagnant" : Ae(h, { format: ["years", "months"] }) || "0 months"
|
|
90
147
|
};
|
|
91
148
|
}
|
|
92
149
|
const R = () => {
|
|
93
|
-
if (!
|
|
150
|
+
if (!x.useContext(Me))
|
|
94
151
|
throw new Error("useCateUiStore() must be used within the GlobalDataContext");
|
|
95
152
|
return q().uiStore;
|
|
96
|
-
},
|
|
97
|
-
const r = j(), { isMobile: t } = X(), { debts:
|
|
98
|
-
const
|
|
99
|
-
return
|
|
100
|
-
}, [a,
|
|
153
|
+
}, nt = ({ debts: a, onClickCta: n, sx: o }) => {
|
|
154
|
+
const r = j(), { isMobile: t } = X(), { debts: i } = C(), { selectedDebtPriority: p } = R(), { monthlyCashFlowProfile: d } = z(), { payoffDate: c, payoffSavings: h, payoffDuration: m } = x.useMemo(() => {
|
|
155
|
+
const y = d?.extra_payment ?? 0;
|
|
156
|
+
return at(a, p, y);
|
|
157
|
+
}, [a, p, d]);
|
|
101
158
|
return /* @__PURE__ */ e(
|
|
102
|
-
|
|
159
|
+
be,
|
|
103
160
|
{
|
|
104
161
|
sx: {
|
|
105
162
|
boxShadow: r.shadows[2],
|
|
106
163
|
width: t ? "100%" : "186px",
|
|
107
164
|
minWidth: "186px",
|
|
108
|
-
...
|
|
165
|
+
...o
|
|
109
166
|
},
|
|
110
167
|
children: /* @__PURE__ */ s(_, { sx: { gap: "12px", p: "16px" }, children: [
|
|
111
168
|
/* @__PURE__ */ s(
|
|
@@ -118,79 +175,79 @@ const R = () => {
|
|
|
118
175
|
pb: "8px"
|
|
119
176
|
},
|
|
120
177
|
children: [
|
|
121
|
-
/* @__PURE__ */ e(
|
|
122
|
-
/* @__PURE__ */ e(
|
|
178
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_date_description }),
|
|
179
|
+
/* @__PURE__ */ e(l, { bold: !0, color: r.palette.primary.main, variant: "Small", children: c })
|
|
123
180
|
]
|
|
124
181
|
}
|
|
125
182
|
),
|
|
126
183
|
/* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
|
|
127
|
-
/* @__PURE__ */ e(
|
|
128
|
-
/* @__PURE__ */ e(
|
|
184
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: h }),
|
|
185
|
+
/* @__PURE__ */ e(l, { sx: { whiteSpace: "normal" }, variant: "XSmall", children: i.snowball_card_amount_description })
|
|
129
186
|
] }),
|
|
130
187
|
/* @__PURE__ */ s(_, { gap: t ? "4px" : "0", children: [
|
|
131
|
-
/* @__PURE__ */ e(
|
|
132
|
-
/* @__PURE__ */ e(
|
|
188
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Small", children: m }),
|
|
189
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: i.snowball_card_duration_description })
|
|
133
190
|
] }),
|
|
134
191
|
/* @__PURE__ */ e(
|
|
135
|
-
|
|
192
|
+
l,
|
|
136
193
|
{
|
|
137
194
|
bold: !0,
|
|
138
195
|
color: r.palette.primary.main,
|
|
139
|
-
onClick:
|
|
196
|
+
onClick: n,
|
|
140
197
|
sx: { cursor: "pointer" },
|
|
141
198
|
variant: "Small",
|
|
142
|
-
children:
|
|
199
|
+
children: i.snowball_card_cta
|
|
143
200
|
}
|
|
144
201
|
)
|
|
145
202
|
] })
|
|
146
203
|
}
|
|
147
204
|
);
|
|
148
|
-
},
|
|
149
|
-
const r = j(), { debts: t } = C(), [
|
|
205
|
+
}, ot = S(nt), it = ({ isOpen: a, onClose: n, sx: o }) => {
|
|
206
|
+
const r = j(), { debts: t } = C(), [i, p] = x.useState(!1);
|
|
150
207
|
return /* @__PURE__ */ e(
|
|
151
208
|
te,
|
|
152
209
|
{
|
|
153
210
|
ariaLabelClose: "",
|
|
154
211
|
isOpen: a,
|
|
155
|
-
onClose:
|
|
156
|
-
sx: { ...
|
|
212
|
+
onClose: n,
|
|
213
|
+
sx: { ...o },
|
|
157
214
|
title: t.snowball_drawer_title,
|
|
158
215
|
children: /* @__PURE__ */ s(_, { bgcolor: r.palette.background.default, height: "100%", children: [
|
|
159
216
|
/* @__PURE__ */ s(_, { alignItems: "center", px: 24, py: 24, children: [
|
|
160
217
|
/* @__PURE__ */ s(_, { alignItems: "center", pb: 24, children: [
|
|
161
|
-
/* @__PURE__ */ e(
|
|
162
|
-
/* @__PURE__ */ e(
|
|
163
|
-
/* @__PURE__ */ e(
|
|
164
|
-
/* @__PURE__ */ e(
|
|
218
|
+
/* @__PURE__ */ e(l, { mb: 12, variant: "H3", children: t.snowball_drawer_subtitle }),
|
|
219
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_amount_description }),
|
|
220
|
+
/* @__PURE__ */ e(l, { variant: "H1", children: t.snowball_drawer_savings }),
|
|
221
|
+
/* @__PURE__ */ e(l, { color: r.palette.secondary.main, variant: "Small", children: t.snowball_drawer_duration_description })
|
|
165
222
|
] }),
|
|
166
|
-
/* @__PURE__ */ s(
|
|
167
|
-
/* @__PURE__ */ e(
|
|
223
|
+
/* @__PURE__ */ s(be, { sx: { display: "grid", py: 16, px: 24 }, children: [
|
|
224
|
+
/* @__PURE__ */ e(l, { mb: 4, variant: "H3", children: t.snowball_drawer_question }),
|
|
168
225
|
/* @__PURE__ */ e(
|
|
169
|
-
|
|
226
|
+
l,
|
|
170
227
|
{
|
|
171
228
|
color: r.palette.secondary.main,
|
|
172
229
|
mb: 8,
|
|
173
|
-
sx: { whiteSpace:
|
|
230
|
+
sx: { whiteSpace: i ? "normal" : "nowrap" },
|
|
174
231
|
variant: "ParagraphSmall",
|
|
175
232
|
children: t.snowball_drawer_answer
|
|
176
233
|
}
|
|
177
234
|
),
|
|
178
235
|
/* @__PURE__ */ e(
|
|
179
|
-
|
|
236
|
+
l,
|
|
180
237
|
{
|
|
181
238
|
bold: !0,
|
|
182
239
|
color: r.palette.primary.main,
|
|
183
|
-
onClick: () =>
|
|
240
|
+
onClick: () => p(!i),
|
|
184
241
|
sx: { cursor: "pointer" },
|
|
185
242
|
variant: "Small",
|
|
186
|
-
children:
|
|
243
|
+
children: i ? t.snowball_drawer_less : t.snowball_drawer_more
|
|
187
244
|
}
|
|
188
245
|
)
|
|
189
246
|
] })
|
|
190
247
|
] }),
|
|
191
248
|
/* @__PURE__ */ s(_, { children: [
|
|
192
249
|
/* @__PURE__ */ e(
|
|
193
|
-
|
|
250
|
+
l,
|
|
194
251
|
{
|
|
195
252
|
color: r.palette.secondary.main,
|
|
196
253
|
px: 24,
|
|
@@ -200,8 +257,8 @@ const R = () => {
|
|
|
200
257
|
}
|
|
201
258
|
),
|
|
202
259
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
203
|
-
/* @__PURE__ */ e(
|
|
204
|
-
/* @__PURE__ */ e(
|
|
260
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 1) }),
|
|
261
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
205
262
|
] }),
|
|
206
263
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
207
264
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -218,7 +275,7 @@ const R = () => {
|
|
|
218
275
|
backgroundColor: r.palette.success.main,
|
|
219
276
|
marginRight: 12
|
|
220
277
|
},
|
|
221
|
-
children: /* @__PURE__ */ e(
|
|
278
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
222
279
|
}
|
|
223
280
|
),
|
|
224
281
|
/* @__PURE__ */ s(
|
|
@@ -233,20 +290,20 @@ const R = () => {
|
|
|
233
290
|
},
|
|
234
291
|
children: [
|
|
235
292
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
236
|
-
/* @__PURE__ */ e(
|
|
237
|
-
/* @__PURE__ */ s(
|
|
238
|
-
|
|
293
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "A") }),
|
|
294
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
|
|
295
|
+
A(
|
|
239
296
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
240
297
|
"$100"
|
|
241
298
|
),
|
|
242
|
-
/* @__PURE__ */ e("strong", { children:
|
|
299
|
+
/* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "B") }),
|
|
243
300
|
t.snowball_drawer_rollover_explainer_pt2
|
|
244
301
|
] })
|
|
245
302
|
] }),
|
|
246
303
|
/* @__PURE__ */ s(_, { children: [
|
|
247
|
-
/* @__PURE__ */ e(
|
|
304
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$100.00" }),
|
|
248
305
|
/* @__PURE__ */ e(
|
|
249
|
-
|
|
306
|
+
l,
|
|
250
307
|
{
|
|
251
308
|
bold: !0,
|
|
252
309
|
color: r.palette.success.main,
|
|
@@ -284,8 +341,8 @@ const R = () => {
|
|
|
284
341
|
pr: 24
|
|
285
342
|
},
|
|
286
343
|
children: [
|
|
287
|
-
/* @__PURE__ */ e(
|
|
288
|
-
/* @__PURE__ */ e(
|
|
344
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
|
|
345
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$400.00" })
|
|
289
346
|
]
|
|
290
347
|
}
|
|
291
348
|
)
|
|
@@ -304,8 +361,8 @@ const R = () => {
|
|
|
304
361
|
}
|
|
305
362
|
),
|
|
306
363
|
/* @__PURE__ */ s(_, { flexDirection: "row", flexGrow: 1, pr: 24, children: [
|
|
307
|
-
/* @__PURE__ */ e(
|
|
308
|
-
/* @__PURE__ */ e(
|
|
364
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
|
|
365
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
|
|
309
366
|
] })
|
|
310
367
|
] }),
|
|
311
368
|
/* @__PURE__ */ s(
|
|
@@ -320,15 +377,15 @@ const R = () => {
|
|
|
320
377
|
borderBottom: `1px solid ${r.palette.border.light}`
|
|
321
378
|
},
|
|
322
379
|
children: [
|
|
323
|
-
/* @__PURE__ */ e(
|
|
324
|
-
/* @__PURE__ */ e(
|
|
380
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
381
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
325
382
|
]
|
|
326
383
|
}
|
|
327
384
|
)
|
|
328
385
|
] }),
|
|
329
386
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
330
|
-
/* @__PURE__ */ e(
|
|
331
|
-
/* @__PURE__ */ e(
|
|
387
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 2) }),
|
|
388
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
332
389
|
] }),
|
|
333
390
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
334
391
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -345,7 +402,7 @@ const R = () => {
|
|
|
345
402
|
backgroundColor: r.palette.success.main,
|
|
346
403
|
marginRight: 12
|
|
347
404
|
},
|
|
348
|
-
children: /* @__PURE__ */ e(
|
|
405
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
349
406
|
}
|
|
350
407
|
),
|
|
351
408
|
/* @__PURE__ */ s(
|
|
@@ -360,20 +417,20 @@ const R = () => {
|
|
|
360
417
|
},
|
|
361
418
|
children: [
|
|
362
419
|
/* @__PURE__ */ s(_, { flexGrow: 1, children: [
|
|
363
|
-
/* @__PURE__ */ e(
|
|
364
|
-
/* @__PURE__ */ s(
|
|
365
|
-
|
|
420
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "B") }),
|
|
421
|
+
/* @__PURE__ */ s(l, { color: r.palette.secondary.main, variant: "XSmall", children: [
|
|
422
|
+
A(
|
|
366
423
|
t.snowball_drawer_rollover_explainer_pt1,
|
|
367
424
|
"$500"
|
|
368
425
|
),
|
|
369
|
-
/* @__PURE__ */ e("strong", { children:
|
|
426
|
+
/* @__PURE__ */ e("strong", { children: A(t.snowball_drawer_debt_label, "C") }),
|
|
370
427
|
t.snowball_drawer_rollover_explainer_pt2
|
|
371
428
|
] })
|
|
372
429
|
] }),
|
|
373
430
|
/* @__PURE__ */ s(_, { children: [
|
|
374
|
-
/* @__PURE__ */ e(
|
|
431
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$500.00" }),
|
|
375
432
|
/* @__PURE__ */ e(
|
|
376
|
-
|
|
433
|
+
l,
|
|
377
434
|
{
|
|
378
435
|
bold: !0,
|
|
379
436
|
color: r.palette.success.main,
|
|
@@ -410,8 +467,8 @@ const R = () => {
|
|
|
410
467
|
pr: 24
|
|
411
468
|
},
|
|
412
469
|
children: [
|
|
413
|
-
/* @__PURE__ */ e(
|
|
414
|
-
/* @__PURE__ */ e(
|
|
470
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }),
|
|
471
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,000.00" })
|
|
415
472
|
]
|
|
416
473
|
}
|
|
417
474
|
)
|
|
@@ -428,15 +485,15 @@ const R = () => {
|
|
|
428
485
|
borderBottom: `1px solid ${r.palette.border.light}`
|
|
429
486
|
},
|
|
430
487
|
children: [
|
|
431
|
-
/* @__PURE__ */ e(
|
|
432
|
-
/* @__PURE__ */ e(
|
|
488
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
489
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
433
490
|
]
|
|
434
491
|
}
|
|
435
492
|
)
|
|
436
493
|
] }),
|
|
437
494
|
/* @__PURE__ */ s(_, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
438
|
-
/* @__PURE__ */ e(
|
|
439
|
-
/* @__PURE__ */ e(
|
|
495
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: A(t.snowball_drawer_month_header, 3) }),
|
|
496
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: t.snowball_drawer_payment_header })
|
|
440
497
|
] }),
|
|
441
498
|
/* @__PURE__ */ s(_, { bgcolor: r.palette.background.paper, mb: 24, children: [
|
|
442
499
|
/* @__PURE__ */ s(_, { alignItems: "center", flexDirection: "row", pl: 24, children: [
|
|
@@ -453,7 +510,7 @@ const R = () => {
|
|
|
453
510
|
backgroundColor: r.palette.success.main,
|
|
454
511
|
marginRight: 12
|
|
455
512
|
},
|
|
456
|
-
children: /* @__PURE__ */ e(
|
|
513
|
+
children: /* @__PURE__ */ e(l, { color: "white", fontWeight: 700, variant: "Small", children: "✓" })
|
|
457
514
|
}
|
|
458
515
|
),
|
|
459
516
|
/* @__PURE__ */ s(
|
|
@@ -467,11 +524,11 @@ const R = () => {
|
|
|
467
524
|
pr: 24
|
|
468
525
|
},
|
|
469
526
|
children: [
|
|
470
|
-
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(
|
|
527
|
+
/* @__PURE__ */ e(_, { flexGrow: 1, children: /* @__PURE__ */ e(l, { variant: "Body", children: A(t.snowball_drawer_debt_label, "C") }) }),
|
|
471
528
|
/* @__PURE__ */ s(_, { children: [
|
|
472
|
-
/* @__PURE__ */ e(
|
|
529
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "$1,500.00" }),
|
|
473
530
|
/* @__PURE__ */ e(
|
|
474
|
-
|
|
531
|
+
l,
|
|
475
532
|
{
|
|
476
533
|
bold: !0,
|
|
477
534
|
color: r.palette.success.main,
|
|
@@ -497,8 +554,8 @@ const R = () => {
|
|
|
497
554
|
borderBottom: `1px solid ${r.palette.border.light}`
|
|
498
555
|
},
|
|
499
556
|
children: [
|
|
500
|
-
/* @__PURE__ */ e(
|
|
501
|
-
/* @__PURE__ */ e(
|
|
557
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: t.snowball_drawer_total_label }),
|
|
558
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: "$1,500.00" })
|
|
502
559
|
]
|
|
503
560
|
}
|
|
504
561
|
)
|
|
@@ -507,50 +564,50 @@ const R = () => {
|
|
|
507
564
|
] })
|
|
508
565
|
}
|
|
509
566
|
);
|
|
510
|
-
},
|
|
511
|
-
function
|
|
512
|
-
const [
|
|
513
|
-
Math.max(0, Math.min(255, Math.round(
|
|
514
|
-
Math.max(0, Math.min(255, Math.round(r *
|
|
515
|
-
Math.max(0, Math.min(255, Math.round(t *
|
|
567
|
+
}, lt = S(it), st = "#FF7B08";
|
|
568
|
+
function ct(a, n) {
|
|
569
|
+
const [o, r, t] = a.replace(/^#/, "").match(/.{1,2}/g).map((p) => parseInt(p, 16)), i = [
|
|
570
|
+
Math.max(0, Math.min(255, Math.round(o * n))),
|
|
571
|
+
Math.max(0, Math.min(255, Math.round(r * n))),
|
|
572
|
+
Math.max(0, Math.min(255, Math.round(t * n)))
|
|
516
573
|
];
|
|
517
|
-
return `rgb(${
|
|
574
|
+
return `rgb(${i[0]}, ${i[1]}, ${i[2]})`;
|
|
518
575
|
}
|
|
519
|
-
const
|
|
576
|
+
const ge = ({
|
|
520
577
|
sx: a,
|
|
521
|
-
height:
|
|
522
|
-
width:
|
|
578
|
+
height: n = 500,
|
|
579
|
+
width: o,
|
|
523
580
|
debts: r,
|
|
524
581
|
hoveredDebtGuid: t,
|
|
525
|
-
onClickArea:
|
|
526
|
-
onHoverArea:
|
|
582
|
+
onClickArea: i,
|
|
583
|
+
onHoverArea: p
|
|
527
584
|
}) => {
|
|
528
|
-
const
|
|
585
|
+
const d = He(), { onEvent: c } = k(), h = r.filter((b) => !b.is_impossible), m = [
|
|
529
586
|
...new Set(
|
|
530
587
|
h.flatMap((b) => b.dataset.map((w) => new Date(w.x).getTime()))
|
|
531
588
|
)
|
|
532
|
-
].sort((b, w) => b - w).map((b) => new Date(b)),
|
|
589
|
+
].sort((b, w) => b - w).map((b) => new Date(b)), y = h.map((b) => {
|
|
533
590
|
const w = new Map(b.dataset.map((N) => [new Date(N.x).getTime(), N.y]));
|
|
534
|
-
let
|
|
535
|
-
const
|
|
536
|
-
const
|
|
537
|
-
return
|
|
591
|
+
let B = w.get(m[0].getTime()) ?? 0;
|
|
592
|
+
const F = m.map((N) => {
|
|
593
|
+
const $ = w.get(N.getTime()) ?? B;
|
|
594
|
+
return B = $, { x: N, y: $ };
|
|
538
595
|
});
|
|
539
|
-
return { ...b, dataset:
|
|
540
|
-
}),
|
|
596
|
+
return { ...b, dataset: F };
|
|
597
|
+
}), f = y.reduce(
|
|
541
598
|
(b, w) => b + (w.dataset[0]?.y ?? 0),
|
|
542
599
|
0
|
|
543
|
-
),
|
|
544
|
-
const
|
|
545
|
-
return { x: b, y:
|
|
546
|
-
}),
|
|
547
|
-
const
|
|
600
|
+
), v = m.map((b, w) => {
|
|
601
|
+
const B = w / (m.length - 1), F = f * (1 - B);
|
|
602
|
+
return { x: b, y: F };
|
|
603
|
+
}), E = Math.ceil(f / 100) * 100, D = m, u = y.map((b, w) => {
|
|
604
|
+
const B = 1 - w / y.length * 0.5, F = ct(st, B);
|
|
548
605
|
return {
|
|
549
606
|
id: `debt-${w}`,
|
|
550
607
|
guid: b.guid,
|
|
551
608
|
label: b.name,
|
|
552
609
|
data: b.dataset.map((N) => N.y),
|
|
553
|
-
color:
|
|
610
|
+
color: F,
|
|
554
611
|
curve: "linear",
|
|
555
612
|
type: "line",
|
|
556
613
|
area: !0,
|
|
@@ -561,15 +618,15 @@ const ye = ({
|
|
|
561
618
|
u.push({
|
|
562
619
|
id: "payoff-line",
|
|
563
620
|
label: "Payoff Line",
|
|
564
|
-
data:
|
|
565
|
-
color:
|
|
621
|
+
data: v.map((b) => b.y),
|
|
622
|
+
color: d.palette.grey[700],
|
|
566
623
|
curve: "linear",
|
|
567
624
|
type: "line",
|
|
568
625
|
stack: void 0,
|
|
569
626
|
showMark: !1,
|
|
570
627
|
disableHighlight: !0
|
|
571
628
|
});
|
|
572
|
-
const
|
|
629
|
+
const I = (b) => u.findIndex((w) => w?.guid === b);
|
|
573
630
|
return /* @__PURE__ */ e(
|
|
574
631
|
re,
|
|
575
632
|
{
|
|
@@ -586,19 +643,19 @@ const ye = ({
|
|
|
586
643
|
}
|
|
587
644
|
},
|
|
588
645
|
children: /* @__PURE__ */ e(
|
|
589
|
-
|
|
646
|
+
$e,
|
|
590
647
|
{
|
|
591
648
|
axisHighlight: { x: "none" },
|
|
592
649
|
disableLineItemHighlight: !0,
|
|
593
|
-
height:
|
|
650
|
+
height: n,
|
|
594
651
|
onAreaClick: (b, w) => {
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
c(
|
|
652
|
+
i?.();
|
|
653
|
+
const B = u.find((F) => F.id === w.seriesId);
|
|
654
|
+
c(T.DEBTS_CLICK_CHART_AREA, { account_guid: B?.guid });
|
|
598
655
|
},
|
|
599
656
|
onHighlightChange: (b) => {
|
|
600
|
-
const w = u.find((
|
|
601
|
-
|
|
657
|
+
const w = u.find((B) => B.id === b?.seriesId)?.guid;
|
|
658
|
+
p?.(w ?? "");
|
|
602
659
|
},
|
|
603
660
|
series: u,
|
|
604
661
|
skipAnimation: !0,
|
|
@@ -624,21 +681,21 @@ const ye = ({
|
|
|
624
681
|
strokeDasharray: "10 5",
|
|
625
682
|
strokeWidth: 1
|
|
626
683
|
},
|
|
627
|
-
[`& .MuiLineElement-series-debt-${
|
|
684
|
+
[`& .MuiLineElement-series-debt-${I(t ?? "0")}`]: {
|
|
628
685
|
opacity: 1
|
|
629
686
|
},
|
|
630
|
-
[`& .MuiAreaElement-series-debt-${
|
|
687
|
+
[`& .MuiAreaElement-series-debt-${I(t ?? "0")}`]: {
|
|
631
688
|
opacity: 1
|
|
632
689
|
},
|
|
633
690
|
...a
|
|
634
691
|
},
|
|
635
692
|
tooltip: { trigger: "none" },
|
|
636
|
-
width:
|
|
693
|
+
width: o,
|
|
637
694
|
xAxis: [
|
|
638
695
|
{
|
|
639
696
|
data: D,
|
|
640
697
|
scaleType: "time",
|
|
641
|
-
min:
|
|
698
|
+
min: m[0],
|
|
642
699
|
disableTicks: !0,
|
|
643
700
|
valueFormatter: (b) => K(b, U.MONTH_SHORT_YEAR)
|
|
644
701
|
}
|
|
@@ -646,20 +703,20 @@ const ye = ({
|
|
|
646
703
|
yAxis: [
|
|
647
704
|
{
|
|
648
705
|
min: 0,
|
|
649
|
-
max:
|
|
706
|
+
max: E,
|
|
650
707
|
disableTicks: !0,
|
|
651
|
-
valueFormatter: (b) =>
|
|
708
|
+
valueFormatter: (b) => P(b, "0a")
|
|
652
709
|
}
|
|
653
710
|
]
|
|
654
711
|
}
|
|
655
712
|
)
|
|
656
713
|
}
|
|
657
714
|
);
|
|
658
|
-
},
|
|
659
|
-
const a = j(), { debts:
|
|
715
|
+
}, dt = () => {
|
|
716
|
+
const a = j(), { debts: n } = C(), { selectedDebtChartData: o } = R();
|
|
660
717
|
return /* @__PURE__ */ s(L, { children: [
|
|
661
718
|
/* @__PURE__ */ s(
|
|
662
|
-
|
|
719
|
+
Ne,
|
|
663
720
|
{
|
|
664
721
|
sx: {
|
|
665
722
|
"& .MuiCardContent-root:last-child": {
|
|
@@ -667,39 +724,39 @@ const ye = ({
|
|
|
667
724
|
}
|
|
668
725
|
},
|
|
669
726
|
children: [
|
|
670
|
-
/* @__PURE__ */ e(
|
|
671
|
-
/* @__PURE__ */ e(
|
|
727
|
+
/* @__PURE__ */ e(Le, { sx: { pb: 0 }, title: /* @__PURE__ */ e(ve, { sx: { pb: 4 }, children: n.details_chart_title }) }),
|
|
728
|
+
/* @__PURE__ */ e(Re, { sx: { p: 0 }, children: /* @__PURE__ */ e(ge, { debts: [o], height: 250 }) })
|
|
672
729
|
]
|
|
673
730
|
}
|
|
674
731
|
),
|
|
675
732
|
/* @__PURE__ */ e(
|
|
676
|
-
|
|
733
|
+
l,
|
|
677
734
|
{
|
|
678
735
|
color: a.palette.text.secondary,
|
|
679
736
|
sx: { whiteSpace: "normal", textAlign: "center", px: 8, py: 12 },
|
|
680
737
|
variant: "Small",
|
|
681
|
-
children:
|
|
738
|
+
children: n.details_chart_description
|
|
682
739
|
}
|
|
683
740
|
)
|
|
684
741
|
] });
|
|
685
|
-
},
|
|
686
|
-
const a = j(), { onEvent:
|
|
687
|
-
return
|
|
688
|
-
|
|
742
|
+
}, pt = S(dt), mt = () => {
|
|
743
|
+
const a = j(), { onEvent: n } = k(), { debts: o } = C(), { selectedDebtChartData: r, showCompleted: t, showError: i } = R();
|
|
744
|
+
return x.useEffect(() => n(T.DEBT_SCHEDULE_VIEW), []), /* @__PURE__ */ e(_e, { children: i || t ? /* @__PURE__ */ e(
|
|
745
|
+
l,
|
|
689
746
|
{
|
|
690
747
|
color: a.palette.secondary.main,
|
|
691
748
|
component: "div",
|
|
692
749
|
sx: { p: 32, textAlign: "center", whiteSpace: "normal" },
|
|
693
750
|
variant: "Small",
|
|
694
|
-
children:
|
|
751
|
+
children: i ? o.schedule_error_message : o.schedule_complete_message
|
|
695
752
|
}
|
|
696
753
|
) : /* @__PURE__ */ s(L, { children: [
|
|
697
|
-
/* @__PURE__ */ s(
|
|
698
|
-
/* @__PURE__ */ e(
|
|
699
|
-
/* @__PURE__ */ e(
|
|
754
|
+
/* @__PURE__ */ s(g, { flexDirection: "row", justifyContent: "space-between", sx: { pt: 12, px: 24, pb: 8 }, children: [
|
|
755
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: o.schedule_month_heading }),
|
|
756
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "XSmall", children: o.schedule_amount_heading })
|
|
700
757
|
] }),
|
|
701
|
-
r.dataset.slice(1).map(({ x:
|
|
702
|
-
|
|
758
|
+
r.dataset.slice(1).map(({ x: p, y: d, payment: c }) => /* @__PURE__ */ e(g, { bgcolor: a.palette.background.paper, children: /* @__PURE__ */ e(g, { alignItems: "center", flexDirection: "row", pl: 24, children: /* @__PURE__ */ s(
|
|
759
|
+
g,
|
|
703
760
|
{
|
|
704
761
|
sx: {
|
|
705
762
|
borderBottom: `1px solid ${a.palette.border.light}`,
|
|
@@ -709,28 +766,28 @@ const ye = ({
|
|
|
709
766
|
pr: 24
|
|
710
767
|
},
|
|
711
768
|
children: [
|
|
712
|
-
/* @__PURE__ */ s(
|
|
713
|
-
/* @__PURE__ */ e(
|
|
714
|
-
/* @__PURE__ */ e(
|
|
769
|
+
/* @__PURE__ */ s(g, { flexGrow: 1, children: [
|
|
770
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: K(p, U.MONTH_YEAR) }),
|
|
771
|
+
/* @__PURE__ */ e(l, { color: a.palette.secondary.main, variant: "XSmall", children: o.schedule_month_label })
|
|
715
772
|
] }),
|
|
716
|
-
/* @__PURE__ */ s(
|
|
717
|
-
/* @__PURE__ */ e(
|
|
773
|
+
/* @__PURE__ */ s(g, { children: [
|
|
774
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "Body", children: P(d, "0,0.00") }),
|
|
718
775
|
/* @__PURE__ */ e(
|
|
719
|
-
|
|
776
|
+
l,
|
|
720
777
|
{
|
|
721
778
|
bold: !0,
|
|
722
779
|
color: a.palette.success.main,
|
|
723
780
|
textAlign: "end",
|
|
724
781
|
variant: "Tiny",
|
|
725
|
-
children: `+${
|
|
782
|
+
children: `+${P(c, "0,0")}`
|
|
726
783
|
}
|
|
727
784
|
)
|
|
728
785
|
] })
|
|
729
786
|
]
|
|
730
787
|
}
|
|
731
|
-
) }) }, String(
|
|
732
|
-
/* @__PURE__ */ e(
|
|
733
|
-
|
|
788
|
+
) }) }, String(p))),
|
|
789
|
+
/* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ s(
|
|
790
|
+
g,
|
|
734
791
|
{
|
|
735
792
|
sx: {
|
|
736
793
|
alignItems: "center",
|
|
@@ -740,135 +797,135 @@ const ye = ({
|
|
|
740
797
|
px: 24
|
|
741
798
|
},
|
|
742
799
|
children: [
|
|
743
|
-
/* @__PURE__ */ e(
|
|
744
|
-
/* @__PURE__ */ e(
|
|
800
|
+
/* @__PURE__ */ e(l, { flexGrow: 1, variant: "Body", children: o.schedule_payoff_label }),
|
|
801
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: "-" })
|
|
745
802
|
]
|
|
746
803
|
}
|
|
747
804
|
) })
|
|
748
805
|
] }) });
|
|
749
|
-
},
|
|
750
|
-
const { debts:
|
|
751
|
-
await
|
|
806
|
+
}, ht = S(mt), ut = S(({ debt: a }) => {
|
|
807
|
+
const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.interest_rate ?? 0), p = t < 0, d = async () => {
|
|
808
|
+
await o({ ...a.account, interest_rate: t }), a.interest_rate = t, r(T.DEBTS_SAVE_RATE_ACTION, { account_guid: a.guid });
|
|
752
809
|
}, c = () => {
|
|
753
810
|
setTimeout(() => {
|
|
754
|
-
|
|
811
|
+
i(a.interest_rate ?? 0);
|
|
755
812
|
}, 250);
|
|
756
813
|
};
|
|
757
814
|
return /* @__PURE__ */ e(
|
|
758
815
|
J,
|
|
759
816
|
{
|
|
760
|
-
isSaveDisabled:
|
|
761
|
-
label: `${
|
|
817
|
+
isSaveDisabled: p,
|
|
818
|
+
label: `${n.details_interest_rate} (%)`,
|
|
762
819
|
onCancel: c,
|
|
763
|
-
onSave:
|
|
764
|
-
primaryText:
|
|
765
|
-
secondaryText:
|
|
766
|
-
zeroStateText: a.interest_rate ? void 0 :
|
|
820
|
+
onSave: d,
|
|
821
|
+
primaryText: n.details_interest_rate,
|
|
822
|
+
secondaryText: Be(Number(a.interest_rate) / 100),
|
|
823
|
+
zeroStateText: a.interest_rate ? void 0 : n.add_interest_rate,
|
|
767
824
|
children: /* @__PURE__ */ e(
|
|
768
|
-
|
|
825
|
+
Xe,
|
|
769
826
|
{
|
|
770
|
-
error:
|
|
827
|
+
error: p,
|
|
771
828
|
fullWidth: !0,
|
|
772
|
-
onChange: (h) =>
|
|
829
|
+
onChange: (h) => i(isNaN(parseFloat(h.target.value)) ? 0 : parseFloat(h.target.value)),
|
|
773
830
|
type: "number",
|
|
774
831
|
value: t
|
|
775
832
|
}
|
|
776
833
|
)
|
|
777
834
|
}
|
|
778
835
|
);
|
|
779
|
-
}),
|
|
780
|
-
const { debts:
|
|
781
|
-
await
|
|
836
|
+
}), bt = S(({ debt: a }) => {
|
|
837
|
+
const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.monthly_payment ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
|
|
838
|
+
await o({ ...a.account, minimum_payment: t }), a.monthly_payment = t, r(T.DEBTS_SAVE_PAYMENT_ACTION, { account_guid: a.guid });
|
|
782
839
|
}, c = () => {
|
|
783
840
|
setTimeout(() => {
|
|
784
|
-
|
|
841
|
+
i(a.monthly_payment ?? 0);
|
|
785
842
|
}, 250);
|
|
786
843
|
};
|
|
787
844
|
return /* @__PURE__ */ e(
|
|
788
845
|
J,
|
|
789
846
|
{
|
|
790
|
-
isSaveDisabled:
|
|
791
|
-
label:
|
|
847
|
+
isSaveDisabled: p,
|
|
848
|
+
label: n.details_monthly_payment,
|
|
792
849
|
onCancel: c,
|
|
793
|
-
onSave:
|
|
794
|
-
primaryText:
|
|
795
|
-
secondaryText:
|
|
796
|
-
zeroStateText: a.monthly_payment ? void 0 :
|
|
850
|
+
onSave: d,
|
|
851
|
+
primaryText: n.details_monthly_payment,
|
|
852
|
+
secondaryText: P(a.monthly_payment, "0,0"),
|
|
853
|
+
zeroStateText: a.monthly_payment ? void 0 : n.add_monthly_payment,
|
|
797
854
|
children: /* @__PURE__ */ e(
|
|
798
855
|
ae,
|
|
799
856
|
{
|
|
800
857
|
amount: t,
|
|
801
858
|
autoFocus: !0,
|
|
802
|
-
error:
|
|
859
|
+
error: p,
|
|
803
860
|
fullWidth: !0,
|
|
804
861
|
minAmount: 0,
|
|
805
|
-
setAmount: (h) =>
|
|
862
|
+
setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
|
|
806
863
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
807
864
|
}
|
|
808
865
|
)
|
|
809
866
|
}
|
|
810
867
|
);
|
|
811
|
-
}),
|
|
812
|
-
const { debts:
|
|
813
|
-
await
|
|
868
|
+
}), _t = S(({ debt: a }) => {
|
|
869
|
+
const { debts: n } = C(), { updateAccount: o } = Z(), { onEvent: r } = k(), [t, i] = x.useState(a.original_balance ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
|
|
870
|
+
await o({ ...a.account, original_balance: t }), a.original_balance = t, r(T.DEBTS_SAVE_BALANCE_ACTION, { account_guid: a.guid });
|
|
814
871
|
}, c = () => {
|
|
815
872
|
setTimeout(() => {
|
|
816
|
-
|
|
873
|
+
i(a.original_balance ?? 0);
|
|
817
874
|
}, 250);
|
|
818
875
|
};
|
|
819
876
|
return /* @__PURE__ */ e(
|
|
820
877
|
J,
|
|
821
878
|
{
|
|
822
|
-
isSaveDisabled:
|
|
823
|
-
label:
|
|
879
|
+
isSaveDisabled: p,
|
|
880
|
+
label: n.details_original_balance,
|
|
824
881
|
onCancel: c,
|
|
825
|
-
onSave:
|
|
826
|
-
primaryText:
|
|
827
|
-
secondaryText:
|
|
828
|
-
zeroStateText: a.original_balance ? void 0 :
|
|
882
|
+
onSave: d,
|
|
883
|
+
primaryText: n.details_original_balance,
|
|
884
|
+
secondaryText: P(a.original_balance, "0,0"),
|
|
885
|
+
zeroStateText: a.original_balance ? void 0 : n.add_original_balance,
|
|
829
886
|
children: /* @__PURE__ */ e(
|
|
830
887
|
ae,
|
|
831
888
|
{
|
|
832
889
|
amount: t,
|
|
833
890
|
autoFocus: !0,
|
|
834
|
-
error:
|
|
891
|
+
error: p,
|
|
835
892
|
fullWidth: !0,
|
|
836
893
|
minAmount: 0,
|
|
837
|
-
setAmount: (h) =>
|
|
894
|
+
setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
|
|
838
895
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
839
896
|
}
|
|
840
897
|
)
|
|
841
898
|
}
|
|
842
899
|
);
|
|
843
|
-
}),
|
|
844
|
-
const { onEvent: a } =
|
|
845
|
-
return
|
|
846
|
-
|
|
847
|
-
/* @__PURE__ */ e(
|
|
900
|
+
}), yt = () => {
|
|
901
|
+
const { onEvent: a } = k(), { selectedDebtChartData: n } = R();
|
|
902
|
+
return x.useEffect(() => a(T.DEBT_DETAILS_VIEW), []), /* @__PURE__ */ s(g, { bgcolor: "background.paper", children: [
|
|
903
|
+
n?.goal && /* @__PURE__ */ s(L, { children: [
|
|
904
|
+
/* @__PURE__ */ e(Ge, { goal: n.goal }),
|
|
848
905
|
/* @__PURE__ */ e(W, {}),
|
|
849
|
-
/* @__PURE__ */ e(
|
|
906
|
+
/* @__PURE__ */ e(je, { goal: n.goal }),
|
|
850
907
|
/* @__PURE__ */ e(W, {}),
|
|
851
|
-
/* @__PURE__ */ e(
|
|
908
|
+
/* @__PURE__ */ e(ze, { goal: n.goal }),
|
|
852
909
|
/* @__PURE__ */ e(W, {})
|
|
853
910
|
] }),
|
|
854
|
-
!
|
|
855
|
-
/* @__PURE__ */ e(
|
|
911
|
+
!n?.goal && n?.account && /* @__PURE__ */ s(L, { children: [
|
|
912
|
+
/* @__PURE__ */ e(bt, { debt: n }),
|
|
856
913
|
/* @__PURE__ */ e(W, {}),
|
|
857
|
-
/* @__PURE__ */ e(
|
|
914
|
+
/* @__PURE__ */ e(ut, { debt: n }),
|
|
858
915
|
/* @__PURE__ */ e(W, {}),
|
|
859
|
-
/* @__PURE__ */ e(
|
|
916
|
+
/* @__PURE__ */ e(_t, { debt: n }),
|
|
860
917
|
/* @__PURE__ */ e(W, {})
|
|
861
918
|
] })
|
|
862
919
|
] });
|
|
863
|
-
},
|
|
864
|
-
const { debts:
|
|
865
|
-
return
|
|
920
|
+
}, ft = S(yt), xt = ({ setTabValue: a, sx: n }) => {
|
|
921
|
+
const { debts: o } = C(), { showError: r, showCompleted: t } = R();
|
|
922
|
+
return x.useEffect(() => {
|
|
866
923
|
r && a(1);
|
|
867
|
-
}, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(
|
|
868
|
-
/* @__PURE__ */ e(
|
|
869
|
-
|
|
924
|
+
}, [r]), !r && !t ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ s(g, { gap: 16, children: [
|
|
925
|
+
/* @__PURE__ */ e(he, { sx: { my: 16, mx: 24, ...n }, children: /* @__PURE__ */ s(
|
|
926
|
+
pe,
|
|
870
927
|
{
|
|
871
|
-
icon: r ? /* @__PURE__ */ e(
|
|
928
|
+
icon: r ? /* @__PURE__ */ e(Ve, { filled: !0 }) : /* @__PURE__ */ e(ye, { color: "success", filled: !0 }),
|
|
872
929
|
severity: "error",
|
|
873
930
|
sx: {
|
|
874
931
|
alignItems: "start",
|
|
@@ -881,13 +938,13 @@ const ye = ({
|
|
|
881
938
|
}
|
|
882
939
|
},
|
|
883
940
|
children: [
|
|
884
|
-
/* @__PURE__ */ e(
|
|
885
|
-
/* @__PURE__ */ e(
|
|
941
|
+
/* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: r ? o.status_error_title : o.status_complete_title }),
|
|
942
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: r ? o.status_error_description : o.status_complete_description })
|
|
886
943
|
]
|
|
887
944
|
}
|
|
888
945
|
) }),
|
|
889
|
-
r && /* @__PURE__ */ e(
|
|
890
|
-
|
|
946
|
+
r && /* @__PURE__ */ e(he, { sx: { mb: 16, mt: 100, mx: 24, ...n }, children: /* @__PURE__ */ s(
|
|
947
|
+
pe,
|
|
891
948
|
{
|
|
892
949
|
icon: /* @__PURE__ */ e(L, {}),
|
|
893
950
|
severity: "error",
|
|
@@ -899,28 +956,28 @@ const ye = ({
|
|
|
899
956
|
}
|
|
900
957
|
},
|
|
901
958
|
children: [
|
|
902
|
-
/* @__PURE__ */ e(
|
|
903
|
-
/* @__PURE__ */ e(
|
|
959
|
+
/* @__PURE__ */ e(me, { sx: { fontWeight: 600, marginTop: 2 }, variant: "Body", children: o.status_info_title }),
|
|
960
|
+
/* @__PURE__ */ e(l, { component: "p", sx: { whiteSpace: "wrap" }, variant: "ParagraphSmall", children: o.status_info_description })
|
|
904
961
|
]
|
|
905
962
|
}
|
|
906
963
|
) })
|
|
907
964
|
] });
|
|
908
|
-
},
|
|
909
|
-
const { debts: a } = C(), { showError:
|
|
965
|
+
}, gt = S(xt), wt = () => {
|
|
966
|
+
const { debts: a } = C(), { showError: n, showCompleted: o } = R(), [r, t] = x.useState(0);
|
|
910
967
|
return /* @__PURE__ */ s(L, { children: [
|
|
911
|
-
(
|
|
968
|
+
(n || o) && /* @__PURE__ */ e(gt, { setTabValue: t, sx: { mt: -24 } }),
|
|
912
969
|
/* @__PURE__ */ s(
|
|
913
|
-
|
|
970
|
+
We,
|
|
914
971
|
{
|
|
915
972
|
"aria-label": a.details_tabs_aria_label,
|
|
916
973
|
centered: !0,
|
|
917
|
-
onChange: (
|
|
974
|
+
onChange: (i, p) => t(p),
|
|
918
975
|
textColor: "primary",
|
|
919
976
|
value: r,
|
|
920
977
|
variant: "fullWidth",
|
|
921
978
|
children: [
|
|
922
979
|
/* @__PURE__ */ e(
|
|
923
|
-
|
|
980
|
+
de,
|
|
924
981
|
{
|
|
925
982
|
"aria-controls": "debt-schedule-tabpanel-0",
|
|
926
983
|
id: "debt-schedule-tab-0",
|
|
@@ -928,7 +985,7 @@ const ye = ({
|
|
|
928
985
|
}
|
|
929
986
|
),
|
|
930
987
|
/* @__PURE__ */ e(
|
|
931
|
-
|
|
988
|
+
de,
|
|
932
989
|
{
|
|
933
990
|
"aria-controls": "debt-details-tabpanel-1",
|
|
934
991
|
id: "debt-details-tab-1",
|
|
@@ -938,112 +995,112 @@ const ye = ({
|
|
|
938
995
|
]
|
|
939
996
|
}
|
|
940
997
|
),
|
|
941
|
-
/* @__PURE__ */ e(
|
|
942
|
-
/* @__PURE__ */ e(
|
|
998
|
+
/* @__PURE__ */ e(ue, { index: 0, name: "debt-schedule", value: r, children: /* @__PURE__ */ e(ht, {}) }),
|
|
999
|
+
/* @__PURE__ */ e(ue, { index: 1, name: "debt-details", value: r, children: /* @__PURE__ */ e(ft, {}) })
|
|
943
1000
|
] });
|
|
944
|
-
},
|
|
945
|
-
const { debts: r } = C(), { showError: t, showCompleted:
|
|
1001
|
+
}, Ct = S(wt), St = ({ isOpen: a, onClose: n, sx: o }) => {
|
|
1002
|
+
const { debts: r } = C(), { showError: t, showCompleted: i } = R(), p = t || i ? /* @__PURE__ */ e(L, {}) : /* @__PURE__ */ e(pt, {});
|
|
946
1003
|
return /* @__PURE__ */ e(
|
|
947
1004
|
te,
|
|
948
1005
|
{
|
|
949
1006
|
ariaLabelClose: r.details_close_aria,
|
|
950
1007
|
isOpen: a,
|
|
951
|
-
onClose:
|
|
952
|
-
sx: { ...
|
|
1008
|
+
onClose: n,
|
|
1009
|
+
sx: { ...o },
|
|
953
1010
|
title: r.details_title,
|
|
954
|
-
children: /* @__PURE__ */ s(
|
|
955
|
-
/* @__PURE__ */ e(
|
|
956
|
-
/* @__PURE__ */ e(
|
|
1011
|
+
children: /* @__PURE__ */ s(g, { bgcolor: "background.default", children: [
|
|
1012
|
+
/* @__PURE__ */ e(ke, { customDetailsChart: p }),
|
|
1013
|
+
/* @__PURE__ */ e(Ct, {})
|
|
957
1014
|
] })
|
|
958
1015
|
}
|
|
959
1016
|
);
|
|
960
|
-
},
|
|
961
|
-
const { debts: a } = C(), { monthlyCashFlowProfile:
|
|
962
|
-
|
|
963
|
-
user_guid:
|
|
1017
|
+
}, vt = S(() => {
|
|
1018
|
+
const { debts: a } = C(), { monthlyCashFlowProfile: n, updateMonthlyCashFlowProfile: o } = z(), { onEvent: r } = k(), [t, i] = x.useState(n?.extra_payment ?? 0), p = t < 0 || t > 9999999999e-2, d = async () => {
|
|
1019
|
+
n && (await o({ ...n, extra_payment: t }), n.extra_payment = t, r(T.DEBTS_SAVE_PAYDOWN_ACTION, {
|
|
1020
|
+
user_guid: n?.user_guid
|
|
964
1021
|
}));
|
|
965
1022
|
}, c = () => {
|
|
966
1023
|
setTimeout(() => {
|
|
967
|
-
|
|
1024
|
+
i(n?.extra_payment ?? 0);
|
|
968
1025
|
}, 250);
|
|
969
1026
|
};
|
|
970
1027
|
return /* @__PURE__ */ e(
|
|
971
1028
|
J,
|
|
972
1029
|
{
|
|
973
|
-
isSaveDisabled:
|
|
1030
|
+
isSaveDisabled: p,
|
|
974
1031
|
label: a.paydown_drawer_extra_payment,
|
|
975
1032
|
onCancel: c,
|
|
976
|
-
onSave:
|
|
1033
|
+
onSave: d,
|
|
977
1034
|
primaryText: a.paydown_drawer_extra_payment,
|
|
978
|
-
secondaryText:
|
|
979
|
-
zeroStateText:
|
|
1035
|
+
secondaryText: P(n?.extra_payment, "0,0"),
|
|
1036
|
+
zeroStateText: n?.extra_payment ? void 0 : a.add_extra_payment,
|
|
980
1037
|
children: /* @__PURE__ */ e(
|
|
981
1038
|
ae,
|
|
982
1039
|
{
|
|
983
1040
|
amount: t,
|
|
984
1041
|
autoFocus: !0,
|
|
985
|
-
error:
|
|
1042
|
+
error: p,
|
|
986
1043
|
fullWidth: !0,
|
|
987
1044
|
minAmount: 0,
|
|
988
|
-
setAmount: (h) =>
|
|
1045
|
+
setAmount: (h) => i(isNaN(Number(h)) ? t : Number(h)),
|
|
989
1046
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
990
1047
|
}
|
|
991
1048
|
)
|
|
992
1049
|
}
|
|
993
1050
|
);
|
|
994
|
-
}),
|
|
995
|
-
const { debts: a } = C(), { totalMonthlyPayments:
|
|
996
|
-
return /* @__PURE__ */ s(
|
|
997
|
-
/* @__PURE__ */ s(
|
|
998
|
-
/* @__PURE__ */ s(
|
|
999
|
-
/* @__PURE__ */ e(
|
|
1000
|
-
/* @__PURE__ */ e(
|
|
1001
|
-
/* @__PURE__ */ e(
|
|
1051
|
+
}), Dt = () => {
|
|
1052
|
+
const { debts: a } = C(), { totalMonthlyPayments: n } = q(), { monthlyCashFlowProfile: o } = z(), r = n + Number(o?.extra_payment);
|
|
1053
|
+
return /* @__PURE__ */ s(g, { sx: { backgroundColor: "background.default", height: "100%" }, children: [
|
|
1054
|
+
/* @__PURE__ */ s(g, { p: 24, children: [
|
|
1055
|
+
/* @__PURE__ */ s(g, { alignItems: "center", gap: 4, mb: 24, children: [
|
|
1056
|
+
/* @__PURE__ */ e(l, { variant: "Body", children: a.paydown_drawer_mimimum_label }),
|
|
1057
|
+
/* @__PURE__ */ e(l, { bold: !0, variant: "H1", children: P(n, "0,0") }),
|
|
1058
|
+
/* @__PURE__ */ e(l, { textAlign: "center", truncate: !1, variant: "Small", width: 208, children: a.paydown_drawer_minimum_info })
|
|
1002
1059
|
] }),
|
|
1003
|
-
/* @__PURE__ */ s(
|
|
1004
|
-
/* @__PURE__ */ e(
|
|
1005
|
-
/* @__PURE__ */ e(
|
|
1060
|
+
/* @__PURE__ */ s(g, { children: [
|
|
1061
|
+
/* @__PURE__ */ e(l, { variant: "H3", children: a.paydown_drawer_subtitle }),
|
|
1062
|
+
/* @__PURE__ */ e(l, { truncate: !1, variant: "ParagraphSmall", children: a.paydown_drawer_description })
|
|
1006
1063
|
] })
|
|
1007
1064
|
] }),
|
|
1008
|
-
/* @__PURE__ */ e(
|
|
1009
|
-
/* @__PURE__ */ e(
|
|
1010
|
-
/* @__PURE__ */ e(
|
|
1011
|
-
/* @__PURE__ */ e(
|
|
1065
|
+
/* @__PURE__ */ e(g, { sx: { backgroundColor: "background.paper" }, children: /* @__PURE__ */ e(vt, {}) }),
|
|
1066
|
+
/* @__PURE__ */ e(g, { flexDirection: "row-reverse", px: 24, py: 12, children: /* @__PURE__ */ s(g, { gap: 4, children: [
|
|
1067
|
+
/* @__PURE__ */ e(l, { variant: "Small", children: a.paydown_drawer_total_payment }),
|
|
1068
|
+
/* @__PURE__ */ e(l, { bold: !0, textAlign: "right", variant: "Body", children: P(r, "0,0") })
|
|
1012
1069
|
] }) })
|
|
1013
1070
|
] });
|
|
1014
|
-
},
|
|
1071
|
+
}, Tt = S(Dt), At = ({ isOpen: a, onClose: n, sx: o }) => {
|
|
1015
1072
|
const { debts: r } = C();
|
|
1016
1073
|
return /* @__PURE__ */ e(
|
|
1017
1074
|
te,
|
|
1018
1075
|
{
|
|
1019
1076
|
ariaLabelClose: r.paydown_drawer_close_aria,
|
|
1020
1077
|
isOpen: a,
|
|
1021
|
-
onClose:
|
|
1022
|
-
sx: { ...
|
|
1078
|
+
onClose: n,
|
|
1079
|
+
sx: { ...o },
|
|
1023
1080
|
title: r.paydown_drawer_title,
|
|
1024
|
-
children: /* @__PURE__ */ e(
|
|
1081
|
+
children: /* @__PURE__ */ e(Tt, {})
|
|
1025
1082
|
}
|
|
1026
1083
|
);
|
|
1027
1084
|
};
|
|
1028
|
-
function
|
|
1029
|
-
const
|
|
1085
|
+
function Et(a, n) {
|
|
1086
|
+
const o = (r) => {
|
|
1030
1087
|
if (typeof r == "number") return r;
|
|
1031
1088
|
if (r === "!" || r === "✓") return 1 / 0;
|
|
1032
1089
|
throw new Error("Unsupported value");
|
|
1033
1090
|
};
|
|
1034
|
-
return
|
|
1091
|
+
return o(a) - o(n);
|
|
1035
1092
|
}
|
|
1036
|
-
function
|
|
1093
|
+
function It(a) {
|
|
1037
1094
|
return a.is_paid_off ? "✓" : a.priority === void 0 || a.is_impossible ? "!" : a.priority;
|
|
1038
1095
|
}
|
|
1039
|
-
const
|
|
1040
|
-
const
|
|
1096
|
+
const Bt = (a) => {
|
|
1097
|
+
const n = {
|
|
1041
1098
|
text: "#121417",
|
|
1042
1099
|
background: "#FFB252"
|
|
1043
1100
|
};
|
|
1044
|
-
return a === "!" && (
|
|
1045
|
-
},
|
|
1046
|
-
const
|
|
1101
|
+
return a === "!" && (n.text = "#FFFFFF", n.background = "#DF320C"), a === "✓" && (n.text = "#FFFFFF", n.background = "#09A57F"), n;
|
|
1102
|
+
}, Mt = (a) => {
|
|
1103
|
+
const n = String(a.formattedValue), o = Bt(n);
|
|
1047
1104
|
return /* @__PURE__ */ e(
|
|
1048
1105
|
re,
|
|
1049
1106
|
{
|
|
@@ -1055,75 +1112,75 @@ const wt = (a) => {
|
|
|
1055
1112
|
// Adjust the size as needed
|
|
1056
1113
|
height: 20,
|
|
1057
1114
|
borderRadius: "50%",
|
|
1058
|
-
backgroundColor:
|
|
1115
|
+
backgroundColor: o.background,
|
|
1059
1116
|
marginLeft: "10px"
|
|
1060
1117
|
},
|
|
1061
|
-
children: /* @__PURE__ */ e(
|
|
1118
|
+
children: /* @__PURE__ */ e(l, { color: o.text, fontWeight: 700, variant: "Small", children: n })
|
|
1062
1119
|
}
|
|
1063
1120
|
);
|
|
1064
|
-
},
|
|
1065
|
-
const
|
|
1066
|
-
return /* @__PURE__ */ s(
|
|
1121
|
+
}, Pt = (a) => {
|
|
1122
|
+
const n = a.row.account, o = Ke[n.account_type];
|
|
1123
|
+
return /* @__PURE__ */ s(g, { alignItems: "center", flexDirection: "row", children: [
|
|
1067
1124
|
/* @__PURE__ */ e(
|
|
1068
|
-
|
|
1125
|
+
De,
|
|
1069
1126
|
{
|
|
1070
|
-
alt: `${
|
|
1071
|
-
institutionGuid:
|
|
1127
|
+
alt: `${n.institutionName}`,
|
|
1128
|
+
institutionGuid: n.institution_guid || ""
|
|
1072
1129
|
}
|
|
1073
1130
|
),
|
|
1074
|
-
/* @__PURE__ */ s(
|
|
1075
|
-
/* @__PURE__ */ e(
|
|
1076
|
-
/* @__PURE__ */ e(
|
|
1131
|
+
/* @__PURE__ */ s(g, { ml: 12, children: [
|
|
1132
|
+
/* @__PURE__ */ e(l, { variant: "Small", children: n.name }),
|
|
1133
|
+
/* @__PURE__ */ e(l, { variant: "XSmall", children: o })
|
|
1077
1134
|
] })
|
|
1078
1135
|
] });
|
|
1079
|
-
},
|
|
1136
|
+
}, kt = ({
|
|
1080
1137
|
sx: a = {},
|
|
1081
|
-
debts:
|
|
1082
|
-
hoveredDebtGuid:
|
|
1138
|
+
debts: n,
|
|
1139
|
+
hoveredDebtGuid: o,
|
|
1083
1140
|
onHoverRow: r,
|
|
1084
1141
|
onClickRow: t
|
|
1085
1142
|
}) => {
|
|
1086
|
-
const
|
|
1143
|
+
const i = j(), { onEvent: p } = k(), { isMobile: d } = X(), { debts: c } = C(), [h, m] = x.useState([
|
|
1087
1144
|
{ field: "priority", sort: "asc" }
|
|
1088
|
-
]),
|
|
1145
|
+
]), y = [
|
|
1089
1146
|
{
|
|
1090
1147
|
field: "priority",
|
|
1091
1148
|
headerName: c.table_column_priority,
|
|
1092
1149
|
renderHeader: G,
|
|
1093
|
-
renderCell:
|
|
1094
|
-
sortComparator:
|
|
1150
|
+
renderCell: Mt,
|
|
1151
|
+
sortComparator: Et,
|
|
1095
1152
|
sortable: !0,
|
|
1096
1153
|
hideSortIcons: !0,
|
|
1097
1154
|
type: "custom",
|
|
1098
1155
|
align: "left",
|
|
1099
1156
|
headerAlign: "left",
|
|
1100
|
-
minWidth:
|
|
1101
|
-
flex:
|
|
1157
|
+
minWidth: d ? 67 : 72,
|
|
1158
|
+
flex: d ? 0.2 : 0.4
|
|
1102
1159
|
},
|
|
1103
1160
|
{
|
|
1104
1161
|
field: "account",
|
|
1105
1162
|
headerName: c.table_column_account,
|
|
1106
1163
|
renderHeader: G,
|
|
1107
|
-
renderCell:
|
|
1164
|
+
renderCell: Pt,
|
|
1108
1165
|
sortable: !1,
|
|
1109
1166
|
type: "custom",
|
|
1110
1167
|
align: "left",
|
|
1111
1168
|
headerAlign: "left",
|
|
1112
|
-
minWidth:
|
|
1169
|
+
minWidth: d ? 180 : 225,
|
|
1113
1170
|
flex: 1
|
|
1114
1171
|
},
|
|
1115
1172
|
{
|
|
1116
1173
|
field: "balance",
|
|
1117
1174
|
headerName: c.table_column_balance,
|
|
1118
1175
|
renderHeader: G,
|
|
1119
|
-
valueFormatter: (u) =>
|
|
1176
|
+
valueFormatter: (u) => P(u, "0,0"),
|
|
1120
1177
|
sortable: !0,
|
|
1121
|
-
hideSortIcons:
|
|
1178
|
+
hideSortIcons: d,
|
|
1122
1179
|
type: "number",
|
|
1123
|
-
align:
|
|
1124
|
-
headerAlign:
|
|
1125
|
-
minWidth:
|
|
1126
|
-
flex:
|
|
1180
|
+
align: d ? "right" : "left",
|
|
1181
|
+
headerAlign: d ? "right" : "left",
|
|
1182
|
+
minWidth: d ? 70 : 122,
|
|
1183
|
+
flex: d ? 0.4 : 0.6
|
|
1127
1184
|
},
|
|
1128
1185
|
{
|
|
1129
1186
|
field: "interest_rate",
|
|
@@ -1131,7 +1188,7 @@ const wt = (a) => {
|
|
|
1131
1188
|
renderHeader: G,
|
|
1132
1189
|
valueFormatter: (u) => isNaN(u) ? "---" : `${Number(u).toFixed(2)}%`,
|
|
1133
1190
|
sortable: !0,
|
|
1134
|
-
hideSortIcons:
|
|
1191
|
+
hideSortIcons: d,
|
|
1135
1192
|
type: "number",
|
|
1136
1193
|
align: "left",
|
|
1137
1194
|
headerAlign: "left",
|
|
@@ -1144,7 +1201,7 @@ const wt = (a) => {
|
|
|
1144
1201
|
renderHeader: G,
|
|
1145
1202
|
valueFormatter: (u) => u ? K(u, U.MONTH_SHORT_YEAR) : "---",
|
|
1146
1203
|
sortable: !0,
|
|
1147
|
-
hideSortIcons:
|
|
1204
|
+
hideSortIcons: d,
|
|
1148
1205
|
type: "number",
|
|
1149
1206
|
align: "left",
|
|
1150
1207
|
headerAlign: "left",
|
|
@@ -1155,17 +1212,17 @@ const wt = (a) => {
|
|
|
1155
1212
|
field: "monthly_payment",
|
|
1156
1213
|
headerName: c.table_column_amount_due,
|
|
1157
1214
|
renderHeader: G,
|
|
1158
|
-
valueFormatter: (u) => typeof u == "number" ?
|
|
1215
|
+
valueFormatter: (u) => typeof u == "number" ? P(u, "0,0") : "---",
|
|
1159
1216
|
sortable: !0,
|
|
1160
|
-
hideSortIcons:
|
|
1217
|
+
hideSortIcons: d,
|
|
1161
1218
|
type: "number",
|
|
1162
1219
|
align: "left",
|
|
1163
1220
|
headerAlign: "left",
|
|
1164
1221
|
minWidth: 122,
|
|
1165
1222
|
flex: 0.6
|
|
1166
1223
|
}
|
|
1167
|
-
],
|
|
1168
|
-
...
|
|
1224
|
+
], f = [
|
|
1225
|
+
...y.slice(0, 3),
|
|
1169
1226
|
{
|
|
1170
1227
|
field: "chevron",
|
|
1171
1228
|
headerName: "",
|
|
@@ -1178,14 +1235,14 @@ const wt = (a) => {
|
|
|
1178
1235
|
headerAlign: "right",
|
|
1179
1236
|
width: 20
|
|
1180
1237
|
}
|
|
1181
|
-
],
|
|
1238
|
+
], v = x.useMemo(() => n.map((u, I) => ({
|
|
1182
1239
|
...u,
|
|
1183
|
-
id:
|
|
1184
|
-
priority:
|
|
1185
|
-
})), [
|
|
1186
|
-
const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b =
|
|
1240
|
+
id: I,
|
|
1241
|
+
priority: It(u)
|
|
1242
|
+
})), [n]), E = (u) => {
|
|
1243
|
+
const Y = u.target.closest("[data-id]")?.getAttribute("data-id"), b = n[Number(Y)];
|
|
1187
1244
|
r?.(b?.guid ?? "");
|
|
1188
|
-
}, D = (u) =>
|
|
1245
|
+
}, D = (u) => v.find((I) => I.guid === u)?.id;
|
|
1189
1246
|
return /* @__PURE__ */ e(
|
|
1190
1247
|
re,
|
|
1191
1248
|
{
|
|
@@ -1198,32 +1255,32 @@ const wt = (a) => {
|
|
|
1198
1255
|
...a
|
|
1199
1256
|
},
|
|
1200
1257
|
children: /* @__PURE__ */ e(
|
|
1201
|
-
|
|
1258
|
+
Ye,
|
|
1202
1259
|
{
|
|
1203
|
-
columns:
|
|
1260
|
+
columns: d ? f : y,
|
|
1204
1261
|
disableColumnFilter: !0,
|
|
1205
1262
|
disableColumnMenu: !0,
|
|
1206
1263
|
hideFooter: !0,
|
|
1207
1264
|
initialState: { sorting: { sortModel: h } },
|
|
1208
1265
|
onRowClick: (u) => {
|
|
1209
|
-
t(),
|
|
1266
|
+
t(), p(T.DEBTS_CLICK_TABLE_ROW, { account_guid: u.row.guid });
|
|
1210
1267
|
},
|
|
1211
1268
|
onSortModelChange: (u) => {
|
|
1212
|
-
|
|
1269
|
+
m(u), p(T.DEBTS_CLICK_TABLE_SORT);
|
|
1213
1270
|
},
|
|
1214
|
-
rows:
|
|
1271
|
+
rows: v,
|
|
1215
1272
|
slotProps: {
|
|
1216
1273
|
baseIconButton: { color: "secondary", sx: { ml: 8 } },
|
|
1217
1274
|
row: {
|
|
1218
|
-
onMouseEnter:
|
|
1275
|
+
onMouseEnter: E,
|
|
1219
1276
|
onMouseLeave: () => r?.("")
|
|
1220
1277
|
}
|
|
1221
1278
|
},
|
|
1222
1279
|
sortModel: h,
|
|
1223
1280
|
sortingOrder: ["asc", "desc"],
|
|
1224
1281
|
sx: {
|
|
1225
|
-
[`& .MuiDataGrid-row[data-id="${D(
|
|
1226
|
-
backgroundColor:
|
|
1282
|
+
[`& .MuiDataGrid-row[data-id="${D(o)}"]`]: {
|
|
1283
|
+
backgroundColor: i.palette.mode === "light" ? "#f8f9fb" : "#1f2329",
|
|
1227
1284
|
filter: "brightness(98%)"
|
|
1228
1285
|
}
|
|
1229
1286
|
}
|
|
@@ -1231,50 +1288,54 @@ const wt = (a) => {
|
|
|
1231
1288
|
)
|
|
1232
1289
|
}
|
|
1233
1290
|
);
|
|
1234
|
-
},
|
|
1235
|
-
const { isDesktop: r, isTablet: t } = X(),
|
|
1291
|
+
}, Ft = ({ buttonText: a, isOpen: n, onClick: o }) => {
|
|
1292
|
+
const { isDesktop: r, isTablet: t } = X(), i = n ? "unfold_less" : "unfold_more";
|
|
1236
1293
|
return r || t ? /* @__PURE__ */ e(
|
|
1237
|
-
|
|
1294
|
+
fe,
|
|
1238
1295
|
{
|
|
1239
1296
|
"aria-controls": "prioritize-debts",
|
|
1240
1297
|
"aria-describedby": "prioritize-debts",
|
|
1241
1298
|
"aria-haspopup": !0,
|
|
1242
1299
|
"aria-label": "prioritize-debts",
|
|
1243
|
-
onClick:
|
|
1244
|
-
startIcon: /* @__PURE__ */ e(ee, { name:
|
|
1300
|
+
onClick: o,
|
|
1301
|
+
startIcon: /* @__PURE__ */ e(ee, { name: i }),
|
|
1245
1302
|
sx: { justifyContent: "start", minWidth: 214, mx: 4 },
|
|
1246
1303
|
children: a
|
|
1247
1304
|
}
|
|
1248
1305
|
) : /* @__PURE__ */ e(
|
|
1249
|
-
|
|
1306
|
+
Ue,
|
|
1250
1307
|
{
|
|
1251
1308
|
"aria-controls": "prioritize-debts",
|
|
1252
1309
|
"aria-describedby": "prioritize-debts",
|
|
1253
1310
|
"aria-haspopup": !0,
|
|
1254
1311
|
"aria-label": "prioritize-debts",
|
|
1255
|
-
onClick:
|
|
1256
|
-
children: /* @__PURE__ */ e(ee, { name:
|
|
1312
|
+
onClick: o,
|
|
1313
|
+
children: /* @__PURE__ */ e(ee, { name: i })
|
|
1257
1314
|
}
|
|
1258
1315
|
);
|
|
1259
|
-
},
|
|
1260
|
-
const { onEvent:
|
|
1316
|
+
}, Nt = S(({ buttonEl: a, onClose: n }) => {
|
|
1317
|
+
const { onEvent: o } = k(), { debts: r } = C(), { selectedDebtPriority: t, setSelectedDebtPriority: i } = R(), p = !!a, d = [
|
|
1261
1318
|
{
|
|
1262
|
-
priority:
|
|
1319
|
+
priority: M.FASTEST_PAYOFF_FIRST,
|
|
1320
|
+
text: r.priority_sort_fastest_payoff
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
priority: M.HIGHEST_INTEREST,
|
|
1263
1324
|
text: r.priority_sort_highest_interest
|
|
1264
1325
|
},
|
|
1265
1326
|
{
|
|
1266
|
-
priority:
|
|
1327
|
+
priority: M.LOWEST_BALANCE,
|
|
1267
1328
|
text: r.priority_sort_lowest_balance
|
|
1268
1329
|
},
|
|
1269
1330
|
{
|
|
1270
|
-
priority:
|
|
1331
|
+
priority: M.HIGHEST_BALANCE,
|
|
1271
1332
|
text: r.priority_sort_highest_balance
|
|
1272
1333
|
}
|
|
1273
1334
|
], c = (h) => {
|
|
1274
|
-
|
|
1335
|
+
i(h), o(T.DEBTS_CLICK_PRIORITY, { debts_priority: h });
|
|
1275
1336
|
};
|
|
1276
1337
|
return /* @__PURE__ */ e(
|
|
1277
|
-
|
|
1338
|
+
Ze,
|
|
1278
1339
|
{
|
|
1279
1340
|
anchorEl: a,
|
|
1280
1341
|
anchorOrigin: {
|
|
@@ -1282,14 +1343,14 @@ const wt = (a) => {
|
|
|
1282
1343
|
horizontal: "left"
|
|
1283
1344
|
},
|
|
1284
1345
|
id: "prioritize-debts",
|
|
1285
|
-
onClose:
|
|
1286
|
-
open:
|
|
1346
|
+
onClose: n,
|
|
1347
|
+
open: p,
|
|
1287
1348
|
transformOrigin: {
|
|
1288
1349
|
vertical: "top",
|
|
1289
1350
|
horizontal: "left"
|
|
1290
1351
|
},
|
|
1291
|
-
children: /* @__PURE__ */ e(
|
|
1292
|
-
|
|
1352
|
+
children: /* @__PURE__ */ e(_e, { children: d.map(({ priority: h, text: m }) => /* @__PURE__ */ s(
|
|
1353
|
+
qe,
|
|
1293
1354
|
{
|
|
1294
1355
|
onClick: () => c(h),
|
|
1295
1356
|
sx: {
|
|
@@ -1307,69 +1368,70 @@ const wt = (a) => {
|
|
|
1307
1368
|
}
|
|
1308
1369
|
},
|
|
1309
1370
|
children: [
|
|
1310
|
-
/* @__PURE__ */ e(
|
|
1311
|
-
t === h && /* @__PURE__ */ e(
|
|
1371
|
+
/* @__PURE__ */ e(l, { color: "inherit", variant: "Small", children: m }),
|
|
1372
|
+
t === h && /* @__PURE__ */ e(ye, { color: "inherit", filled: !0, fontSize: "small" })
|
|
1312
1373
|
]
|
|
1313
1374
|
},
|
|
1314
1375
|
h
|
|
1315
1376
|
)) })
|
|
1316
1377
|
}
|
|
1317
1378
|
);
|
|
1318
|
-
}),
|
|
1319
|
-
const { onEvent: a } =
|
|
1320
|
-
t(h.currentTarget), a(
|
|
1321
|
-
},
|
|
1379
|
+
}), Rt = S(() => {
|
|
1380
|
+
const { onEvent: a } = k(), { debts: n } = C(), { selectedDebtPriority: o } = R(), [r, t] = x.useState(null), i = (h) => {
|
|
1381
|
+
t(h.currentTarget), a(T.DEBTS_CLICK_PRIORITIZE);
|
|
1382
|
+
}, p = () => {
|
|
1322
1383
|
t(null);
|
|
1323
|
-
},
|
|
1324
|
-
[
|
|
1325
|
-
[
|
|
1326
|
-
[
|
|
1327
|
-
|
|
1384
|
+
}, d = !!r, c = x.useMemo(() => ({
|
|
1385
|
+
[M.FASTEST_PAYOFF_FIRST]: n.priority_sort_fastest_payoff,
|
|
1386
|
+
[M.HIGHEST_INTEREST]: n.priority_sort_highest_interest,
|
|
1387
|
+
[M.HIGHEST_BALANCE]: n.priority_sort_highest_balance,
|
|
1388
|
+
[M.LOWEST_BALANCE]: n.priority_sort_lowest_balance
|
|
1389
|
+
})[o] ?? n.priority_sort_lowest_balance, [o]);
|
|
1328
1390
|
return /* @__PURE__ */ s(_, { children: [
|
|
1329
|
-
/* @__PURE__ */ e(
|
|
1330
|
-
/* @__PURE__ */ e(
|
|
1391
|
+
/* @__PURE__ */ e(Ft, { buttonText: c, isOpen: d, onClick: i }),
|
|
1392
|
+
/* @__PURE__ */ e(Nt, { buttonEl: r, onClose: p })
|
|
1331
1393
|
] });
|
|
1332
|
-
}),
|
|
1394
|
+
}), Lt = (a, n, o = 0) => {
|
|
1333
1395
|
const r = a.map((c) => ({ ...c }));
|
|
1334
|
-
|
|
1335
|
-
const t = /* @__PURE__ */ new Date(),
|
|
1336
|
-
let
|
|
1396
|
+
xe(r, n);
|
|
1397
|
+
const t = /* @__PURE__ */ new Date(), i = [];
|
|
1398
|
+
let p = 0, d = 1;
|
|
1337
1399
|
for (const c of r)
|
|
1338
|
-
|
|
1400
|
+
i.push({
|
|
1339
1401
|
...c,
|
|
1340
1402
|
// Start with the initial balance
|
|
1341
1403
|
dataset: [{ x: new Date(t), y: c.balance }]
|
|
1342
1404
|
});
|
|
1343
1405
|
for (; r.some((c) => c.balance >= 0.01 && !c.is_impossible); ) {
|
|
1344
1406
|
let c = !1;
|
|
1345
|
-
for (const [h,
|
|
1346
|
-
if (
|
|
1347
|
-
const
|
|
1348
|
-
let D =
|
|
1349
|
-
h === 0 && (D +=
|
|
1350
|
-
const u = Math.min(
|
|
1351
|
-
if (u <=
|
|
1352
|
-
|
|
1407
|
+
for (const [h, m] of r.entries()) {
|
|
1408
|
+
if (m.balance <= 0.01) continue;
|
|
1409
|
+
const y = i[h].dataset, v = (m.interest_rate ?? 0) / 100 / 12, E = m.balance * v;
|
|
1410
|
+
let D = m.monthly_payment ?? 0;
|
|
1411
|
+
h === 0 && (D += o), m.balance += E;
|
|
1412
|
+
const u = Math.min(m.balance, D + p);
|
|
1413
|
+
if (u <= E) {
|
|
1414
|
+
m.is_impossible = !0, i[h].is_impossible = !0, i[h].priority = void 0, y.push({ x: new Date(t), y: m.balance });
|
|
1353
1415
|
continue;
|
|
1354
1416
|
}
|
|
1355
|
-
|
|
1417
|
+
m.balance -= u, m.balance = m.balance < 0.01 ? 0 : m.balance, y.push({
|
|
1356
1418
|
x: new Date(t),
|
|
1357
|
-
y: Math.max(0,
|
|
1419
|
+
y: Math.max(0, m.balance),
|
|
1358
1420
|
payment: u,
|
|
1359
|
-
extra:
|
|
1360
|
-
}),
|
|
1421
|
+
extra: p
|
|
1422
|
+
}), m.balance <= 0 && (p += D, i[h].projected_payoff_date = new Date(t)), u > 0 && (c = !0);
|
|
1361
1423
|
}
|
|
1362
1424
|
c && t.setMonth(t.getMonth() + 1);
|
|
1363
1425
|
}
|
|
1364
|
-
return
|
|
1426
|
+
return i.forEach((c) => {
|
|
1365
1427
|
(c.interest_rate === void 0 || c.interest_rate === void 0) && (c.projected_payoff_date = void 0);
|
|
1366
|
-
}),
|
|
1367
|
-
c.priority = !c.is_paid_off && !c.is_impossible ?
|
|
1368
|
-
}),
|
|
1369
|
-
},
|
|
1370
|
-
const { debts:
|
|
1428
|
+
}), i.forEach((c) => {
|
|
1429
|
+
c.priority = !c.is_paid_off && !c.is_impossible ? d++ : void 0;
|
|
1430
|
+
}), i;
|
|
1431
|
+
}, $t = S(({ onClick: a }) => {
|
|
1432
|
+
const { debts: n } = C(), { isDesktop: o } = X(), { totalMonthlyPayments: r } = q(), { monthlyCashFlowProfile: t } = z(), i = r + Number(t?.extra_payment), p = o ? n.paydown_button_long : n.paydown_button_short;
|
|
1371
1433
|
return /* @__PURE__ */ e(
|
|
1372
|
-
|
|
1434
|
+
fe,
|
|
1373
1435
|
{
|
|
1374
1436
|
"aria-controls": "extra-paydown",
|
|
1375
1437
|
"aria-describedby": "extra-paydown",
|
|
@@ -1377,100 +1439,100 @@ const wt = (a) => {
|
|
|
1377
1439
|
"aria-label": "extra-paydown",
|
|
1378
1440
|
onClick: a,
|
|
1379
1441
|
sx: { justifyContent: "start", minWidth: 100, mx: 4 },
|
|
1380
|
-
children:
|
|
1442
|
+
children: A(p, P(i, "0,0"))
|
|
1381
1443
|
}
|
|
1382
1444
|
);
|
|
1383
|
-
}),
|
|
1384
|
-
const [
|
|
1385
|
-
const
|
|
1386
|
-
return
|
|
1387
|
-
}, [N, V,
|
|
1388
|
-
|
|
1389
|
-
u(b),
|
|
1390
|
-
}, []),
|
|
1445
|
+
}), Ht = ({ onBackClick: a, sx: n }) => {
|
|
1446
|
+
const [o, r] = x.useState(!1), [t, i] = x.useState(!1), [p, d] = x.useState(!1), [c, h] = x.useState(""), { isDesktop: m, isMobile: y } = X(), { debts: f } = C(), { onEvent: v } = k(), { isCopyLoaded: E, isInitialized: D, setSelectedAccounts: u } = Pe(), { setSelectedAccount: I } = Fe(), { selectedDebtPriority: V, setSelectedDebtChartData: Y } = R(), { visibleDebtAccounts: b } = Z(), { goalsLoaded: w, loadGoals: B, monthlyCashFlowProfile: F } = z(), { debts: N } = q(), $ = x.useMemo(() => {
|
|
1447
|
+
const H = F?.extra_payment ?? 0;
|
|
1448
|
+
return Lt(N, V, H);
|
|
1449
|
+
}, [N, V, F]);
|
|
1450
|
+
x.useEffect(() => {
|
|
1451
|
+
u(b), v(T.DEBTS_VIEW);
|
|
1452
|
+
}, []), x.useEffect(() => {
|
|
1391
1453
|
u(b);
|
|
1392
|
-
}, [b]),
|
|
1393
|
-
D &&
|
|
1454
|
+
}, [b]), x.useEffect(() => {
|
|
1455
|
+
D && B().finally();
|
|
1394
1456
|
}, [D]);
|
|
1395
|
-
const
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1399
|
-
|
|
1400
|
-
},
|
|
1401
|
-
|
|
1457
|
+
const ne = (H) => h(H), oe = () => {
|
|
1458
|
+
const H = b.find((Q) => Q.guid === c), ie = $.find((Q) => Q.guid === c);
|
|
1459
|
+
H && I(H), ie && Y(ie), r(!0);
|
|
1460
|
+
}, we = () => v(T.DEBTS_CLICK_FILTER), Ce = () => {
|
|
1461
|
+
d(!0), v(T.DEBTS_CLICK_SNOWBALL_CTA);
|
|
1462
|
+
}, Se = () => {
|
|
1463
|
+
i(!0), v(T.DEBTS_CLICK_PAYDOWN);
|
|
1402
1464
|
};
|
|
1403
|
-
return !w || !
|
|
1404
|
-
|
|
1465
|
+
return !w || !E || !D ? /* @__PURE__ */ e(Je, {}) : /* @__PURE__ */ s(
|
|
1466
|
+
Oe,
|
|
1405
1467
|
{
|
|
1406
1468
|
accountOptions: b,
|
|
1407
1469
|
actions: [
|
|
1408
|
-
/* @__PURE__ */ e(
|
|
1409
|
-
/* @__PURE__ */ e(
|
|
1470
|
+
/* @__PURE__ */ e(Rt, {}, "prioritize-debts"),
|
|
1471
|
+
/* @__PURE__ */ e($t, { onClick: Se }, "extra-paydown")
|
|
1410
1472
|
],
|
|
1411
|
-
onAccountsFilterClick:
|
|
1473
|
+
onAccountsFilterClick: we,
|
|
1412
1474
|
onBackClick: a,
|
|
1413
|
-
sx:
|
|
1414
|
-
title:
|
|
1475
|
+
sx: n,
|
|
1476
|
+
title: f.title,
|
|
1415
1477
|
children: [
|
|
1416
|
-
/* @__PURE__ */ s(
|
|
1478
|
+
/* @__PURE__ */ s(g, { sx: { px: m ? "48px" : "24px" }, children: [
|
|
1417
1479
|
/* @__PURE__ */ s(
|
|
1418
|
-
|
|
1480
|
+
g,
|
|
1419
1481
|
{
|
|
1420
1482
|
sx: {
|
|
1421
|
-
alignItems:
|
|
1422
|
-
flexDirection:
|
|
1423
|
-
mx:
|
|
1483
|
+
alignItems: y ? "flex-start" : "flex-end",
|
|
1484
|
+
flexDirection: y ? "column" : "row",
|
|
1485
|
+
mx: y ? "-12px" : 0
|
|
1424
1486
|
},
|
|
1425
1487
|
children: [
|
|
1426
1488
|
/* @__PURE__ */ e(
|
|
1427
|
-
|
|
1489
|
+
ge,
|
|
1428
1490
|
{
|
|
1429
|
-
debts:
|
|
1430
|
-
height:
|
|
1491
|
+
debts: $,
|
|
1492
|
+
height: y ? 250 : void 0,
|
|
1431
1493
|
hoveredDebtGuid: c,
|
|
1432
|
-
onClickArea:
|
|
1433
|
-
onHoverArea:
|
|
1434
|
-
sx: { mr:
|
|
1494
|
+
onClickArea: oe,
|
|
1495
|
+
onHoverArea: ne,
|
|
1496
|
+
sx: { mr: y ? "4px" : "-48px" }
|
|
1435
1497
|
}
|
|
1436
1498
|
),
|
|
1437
1499
|
/* @__PURE__ */ e(
|
|
1438
|
-
|
|
1500
|
+
ot,
|
|
1439
1501
|
{
|
|
1440
|
-
debts:
|
|
1441
|
-
onClickCta:
|
|
1442
|
-
sx: { mb:
|
|
1502
|
+
debts: $,
|
|
1503
|
+
onClickCta: Ce,
|
|
1504
|
+
sx: { mb: y ? "0px" : "64px" }
|
|
1443
1505
|
}
|
|
1444
1506
|
)
|
|
1445
1507
|
]
|
|
1446
1508
|
}
|
|
1447
1509
|
),
|
|
1448
|
-
/* @__PURE__ */ e(
|
|
1449
|
-
|
|
1510
|
+
/* @__PURE__ */ e(g, { sx: { mx: y ? "-24px" : 0 }, children: /* @__PURE__ */ e(
|
|
1511
|
+
kt,
|
|
1450
1512
|
{
|
|
1451
|
-
debts:
|
|
1513
|
+
debts: $,
|
|
1452
1514
|
hoveredDebtGuid: c,
|
|
1453
|
-
onClickRow:
|
|
1454
|
-
onHoverRow:
|
|
1515
|
+
onClickRow: oe,
|
|
1516
|
+
onHoverRow: ne
|
|
1455
1517
|
}
|
|
1456
1518
|
) })
|
|
1457
1519
|
] }),
|
|
1458
1520
|
/* @__PURE__ */ e(
|
|
1459
|
-
|
|
1521
|
+
lt,
|
|
1460
1522
|
{
|
|
1461
|
-
isOpen:
|
|
1462
|
-
onClose: () =>
|
|
1523
|
+
isOpen: p,
|
|
1524
|
+
onClose: () => d(!1)
|
|
1463
1525
|
}
|
|
1464
1526
|
),
|
|
1465
|
-
/* @__PURE__ */ e(
|
|
1466
|
-
/* @__PURE__ */ e(
|
|
1527
|
+
/* @__PURE__ */ e(St, { isOpen: o, onClose: () => r(!1) }),
|
|
1528
|
+
/* @__PURE__ */ e(At, { isOpen: t, onClose: () => i(!1) })
|
|
1467
1529
|
]
|
|
1468
1530
|
}
|
|
1469
1531
|
);
|
|
1470
|
-
},
|
|
1532
|
+
}, Ir = S(Ht);
|
|
1471
1533
|
export {
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1534
|
+
ge as DebtsChart,
|
|
1535
|
+
Pr as DebtsStore,
|
|
1536
|
+
kt as DebtsTable,
|
|
1537
|
+
Ir as DebtsWidget
|
|
1476
1538
|
};
|