@mx-cartographer/experiences 9.1.0-alpha.bb1 → 9.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/README.md +10 -10
- package/dist/Account-DR7Plrqy.mjs +119 -0
- package/dist/Account-DR7Plrqy.mjs.map +1 -0
- package/dist/AccountDetailsDrawer-C1hhmlmI.mjs +922 -0
- package/dist/AccountDetailsDrawer-C1hhmlmI.mjs.map +1 -0
- package/dist/AccountDetailsHeader-BliEZhz7.mjs +230 -0
- package/dist/AccountDetailsHeader-BliEZhz7.mjs.map +1 -0
- package/dist/AccountUtils-Cbh8r9cP.mjs +29 -0
- package/dist/AccountUtils-Cbh8r9cP.mjs.map +1 -0
- package/dist/Analytics-CkYXKvco.mjs +54 -0
- package/dist/Analytics-CkYXKvco.mjs.map +1 -0
- package/dist/Analytics-WeZYytR0.mjs +140 -0
- package/dist/Analytics-WeZYytR0.mjs.map +1 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs +50 -0
- package/dist/ApiEndpoints-DXwIYNUV.mjs.map +1 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs +27 -0
- package/dist/BeatMaterialIcon-1KOfRZrA.mjs.map +1 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +75 -0
- package/dist/BudgetUtil-Bg2AQJpQ.mjs.map +1 -0
- package/dist/Category-DEKZGLYe.mjs +302 -0
- package/dist/Category-DEKZGLYe.mjs.map +1 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs +431 -0
- package/dist/CategorySelectorDrawer-NJsFsKP1.mjs.map +1 -0
- package/dist/Connect-BH0Pt6zc.mjs +43 -0
- package/dist/Connect-BH0Pt6zc.mjs.map +1 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs +55 -0
- package/dist/ConnectCard-D7uxoH5Y.mjs.map +1 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs +58 -0
- package/dist/ConnectDrawer-CW4LA3H3.mjs.map +1 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs +54 -0
- package/dist/ConnectionsDrawer-CZU9ku-k.mjs.map +1 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs +374 -0
- package/dist/CurrencyDialog-DumQCTPO.mjs.map +1 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs +88 -0
- package/dist/CurrencyInput-DaGEQaLW.mjs.map +1 -0
- package/dist/CurrencyText-CCbE6MmF.mjs +21 -0
- package/dist/CurrencyText-CCbE6MmF.mjs.map +1 -0
- package/dist/DateFormats-HudZ3Bjs.mjs +65 -0
- package/dist/DateFormats-HudZ3Bjs.mjs.map +1 -0
- package/dist/DateUtil-CzBmbjmA.mjs +75 -0
- package/dist/DateUtil-CzBmbjmA.mjs.map +1 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs +154 -0
- package/dist/DebtUtils-i4pI2Uoe.mjs.map +1 -0
- package/dist/Dialog-Bvd2n8hz.mjs +67 -0
- package/dist/Dialog-Bvd2n8hz.mjs.map +1 -0
- package/dist/Donut-SzzfZDHF.mjs +89 -0
- package/dist/Donut-SzzfZDHF.mjs.map +1 -0
- package/dist/Drawer-DsnW2o0v.mjs +175 -0
- package/dist/Drawer-DsnW2o0v.mjs.map +1 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs +859 -0
- package/dist/EmbeddedCard-DH8vQ3qN.mjs.map +1 -0
- package/dist/EmptyState-CJUDc3kD.mjs +85 -0
- package/dist/EmptyState-CJUDc3kD.mjs.map +1 -0
- package/dist/Error-Dtw6yxkf.mjs +85 -0
- package/dist/Error-Dtw6yxkf.mjs.map +1 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +24 -0
- package/dist/ErrorBoundary-CsdOcnJ9.mjs.map +1 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs +25 -0
- package/dist/ExportCsvAction-C9KWH3Az.mjs.map +1 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs +230 -0
- package/dist/GlobalAccountFilter-BhzR5Vb1.mjs.map +1 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +129 -0
- package/dist/GlobalCopyApi-wcnDUzMV.mjs.map +1 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs +108 -0
- package/dist/GoalsUtil-C9EnLWvC.mjs.map +1 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +7 -0
- package/dist/HeaderCell-P8w6CmfO.mjs.map +1 -0
- package/dist/Help-CkQTjORd.mjs +300 -0
- package/dist/Help-CkQTjORd.mjs.map +1 -0
- package/dist/Help-aERwhajy.mjs +3210 -0
- package/dist/Help-aERwhajy.mjs.map +1 -0
- package/dist/IconBacking-DgT8DCeh.mjs +40 -0
- package/dist/IconBacking-DgT8DCeh.mjs.map +1 -0
- package/dist/InformationTooltip-4su8bn1e.mjs +42 -0
- package/dist/InformationTooltip-4su8bn1e.mjs.map +1 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs +135 -0
- package/dist/InvestmentUtil-BItV7uEs.mjs.map +1 -0
- package/dist/LineChart-CUfiH86G.mjs +613 -0
- package/dist/LineChart-CUfiH86G.mjs.map +1 -0
- package/dist/ListItemAction-BqUCLj_w.mjs +70 -0
- package/dist/ListItemAction-BqUCLj_w.mjs.map +1 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs +68 -0
- package/dist/ListItemRow-kH1rn8Xu.mjs.map +1 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs +44 -0
- package/dist/ListItemWrapper-DRse79Iu.mjs.map +1 -0
- package/dist/Loader-CxeBwuPG.mjs +22 -0
- package/dist/Loader-CxeBwuPG.mjs.map +1 -0
- package/dist/Localization-DnoVyBNK.mjs +39 -0
- package/dist/Localization-DnoVyBNK.mjs.map +1 -0
- package/dist/ManageIncome-Be9WHv-s.mjs +906 -0
- package/dist/ManageIncome-Be9WHv-s.mjs.map +1 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs +46 -0
- package/dist/MicroWidgetContainer-B2NnKBgW.mjs.map +1 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs +67 -0
- package/dist/MiniWidgetContainer-Bmv_WeUd.mjs.map +1 -0
- package/dist/NetWorthUtils-Dj7CgAg2.mjs +96 -0
- package/dist/NetWorthUtils-Dj7CgAg2.mjs.map +1 -0
- package/dist/Notification-DTNYSd8P.mjs +8 -0
- package/dist/Notification-DTNYSd8P.mjs.map +1 -0
- package/dist/NotificationSettings-CW7okUrk.mjs +678 -0
- package/dist/NotificationSettings-CW7okUrk.mjs.map +1 -0
- package/dist/NotificationUtils-BRGFTePr.mjs +24 -0
- package/dist/NotificationUtils-BRGFTePr.mjs.map +1 -0
- package/dist/NumberFormatting--XMeeBfr.mjs +50 -0
- package/dist/NumberFormatting--XMeeBfr.mjs.map +1 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs +115 -0
- package/dist/OriginalBalanceAction-YrvxBYAl.mjs.map +1 -0
- package/dist/RecurringSettings-kRqAViNn.mjs +89 -0
- package/dist/RecurringSettings-kRqAViNn.mjs.map +1 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs +299 -0
- package/dist/RecurringTransactionsUtil-CHWmqvW5.mjs.map +1 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +46 -0
- package/dist/ResponsiveButton-CC9F_Ezk.mjs.map +1 -0
- package/dist/SearchBox-Cpgu_gdO.mjs +51 -0
- package/dist/SearchBox-Cpgu_gdO.mjs.map +1 -0
- package/dist/Select-CSpkK5cR.mjs +62 -0
- package/dist/Select-CSpkK5cR.mjs.map +1 -0
- package/dist/SelectionBox-B4xELRgp.mjs +49 -0
- package/dist/SelectionBox-B4xELRgp.mjs.map +1 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +70 -0
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs.map +1 -0
- package/dist/Sizes-DISGrlUg.mjs +7 -0
- package/dist/Sizes-DISGrlUg.mjs.map +1 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs +39 -0
- package/dist/SkeletonLoader-BaNboJjD.mjs.map +1 -0
- package/dist/SpendingData-Fii_xATx.mjs +54 -0
- package/dist/SpendingData-Fii_xATx.mjs.map +1 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs +204 -0
- package/dist/SpendingLegend-CxvNOg3c.mjs.map +1 -0
- package/dist/StatusBar-CPfSXe80.mjs +31 -0
- package/dist/StatusBar-CPfSXe80.mjs.map +1 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs +49 -0
- package/dist/TabContentContainer-B0eYJP5p.mjs.map +1 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs +92 -0
- package/dist/ToggleListItem-Dl1lXNwj.mjs.map +1 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs +1708 -0
- package/dist/TransactionDetails-roZ5xLq8.mjs.map +1 -0
- package/dist/TransactionUtils-BphBJBbU.mjs +235 -0
- package/dist/TransactionUtils-BphBJBbU.mjs.map +1 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs +70 -0
- package/dist/TrendsUtil-D9z3kIj_.mjs.map +1 -0
- package/dist/UserStore-BjnNCO5a.mjs +3121 -0
- package/dist/UserStore-BjnNCO5a.mjs.map +1 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs +1280 -0
- package/dist/ViewMoreMicroCard-fnwE0hqd.mjs.map +1 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs +483 -0
- package/dist/WidgetContainer-DJnp6t6c.mjs.map +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.d.ts +6 -0
- package/dist/accounts/index.d.ts +1 -0
- package/dist/accounts/index.es.js +784 -12
- package/dist/accounts/index.es.js.map +1 -0
- package/dist/analytics/index.es.js +140 -155
- package/dist/analytics/index.es.js.map +1 -0
- package/dist/budgets/index.es.js +1267 -1317
- package/dist/budgets/index.es.js.map +1 -0
- package/dist/cashflow/context/hooks.d.ts +7 -6
- package/dist/cashflow/index.es.js +944 -1076
- package/dist/cashflow/index.es.js.map +1 -0
- package/dist/categories/index.es.js +5 -4
- package/dist/categories/index.es.js.map +1 -0
- package/dist/common/components/DataRow.d.ts +1 -0
- package/dist/common/components/ListItemWrapper.d.ts +2 -1
- package/dist/common/constants/Analytics.d.ts +3 -0
- package/dist/common/index.es.js +310 -101
- package/dist/common/index.es.js.map +1 -0
- package/dist/core/index.es.js +105 -80
- package/dist/core/index.es.js.map +1 -0
- package/dist/core/stores/CashflowStore.d.ts +8 -7
- package/dist/core/stores/RecurringTransactionsStore.d.ts +53 -1
- package/dist/core/stores/TransactionStore.d.ts +1 -0
- package/dist/core/types/localization/RecurringCopy.d.ts +14 -1
- package/dist/core/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/core/utils/AccountUtils.d.ts +8 -0
- package/dist/core/utils/DateUtil.d.ts +2 -0
- package/dist/core/utils/RecurringTransactionsUtil.d.ts +2 -1
- package/dist/dashboard/index.es.js +142 -185
- package/dist/dashboard/index.es.js.map +1 -0
- package/dist/debts/index.es.js +1273 -1384
- package/dist/debts/index.es.js.map +1 -0
- package/dist/finstrong/index.es.js +3473 -3367
- package/dist/finstrong/index.es.js.map +1 -0
- package/dist/goals/index.es.js +984 -1103
- package/dist/goals/index.es.js.map +1 -0
- package/dist/help/index.es.js +26 -3
- package/dist/help/index.es.js.map +1 -0
- package/dist/hooks-97sNJ_lf.mjs +78 -0
- package/dist/hooks-97sNJ_lf.mjs.map +1 -0
- package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +4 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +4 -2
- package/dist/insights/index.es.js +4871 -93
- package/dist/insights/index.es.js.map +1 -0
- package/dist/investments/index.es.js +1523 -1533
- package/dist/investments/index.es.js.map +1 -0
- package/dist/merchants/index.es.js +65 -75
- package/dist/merchants/index.es.js.map +1 -0
- package/dist/microinsights/index.es.js +826 -15
- package/dist/microinsights/index.es.js.map +1 -0
- package/dist/networth/index.es.js +504 -550
- package/dist/networth/index.es.js.map +1 -0
- package/dist/notifications/index.es.js +162 -169
- package/dist/notifications/index.es.js.map +1 -0
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +3 -2
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.d.ts +3 -0
- package/dist/recurringtransactions/components/RecurringTransactionList.d.ts +11 -0
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.d.ts +8 -0
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.d.ts +10 -0
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.d.ts +7 -0
- package/dist/recurringtransactions/index.es.js +1012 -10
- package/dist/recurringtransactions/index.es.js.map +1 -0
- package/dist/settings/index.es.js +892 -13
- package/dist/settings/index.es.js.map +1 -0
- package/dist/spending/index.es.js +457 -400
- package/dist/spending/index.es.js.map +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -0
- package/dist/transactions/index.es.js +604 -10
- package/dist/transactions/index.es.js.map +1 -0
- package/dist/trends/index.es.js +1408 -1268
- package/dist/trends/index.es.js.map +1 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs +24 -0
- package/dist/useAccountDisplayName-BsiXA0qf.mjs.map +1 -0
- package/dist/useAriaLive-MkYebyUR.mjs +36 -0
- package/dist/useAriaLive-MkYebyUR.mjs.map +1 -0
- package/dist/useDimensions-CeDR9V8N.mjs +37 -0
- package/dist/useDimensions-CeDR9V8N.mjs.map +1 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs +12 -0
- package/dist/useInsightsEnabled-D5Sdm0TJ.mjs.map +1 -0
- package/dist/useScreenSize-mWpmnh5w.mjs +37 -0
- package/dist/useScreenSize-mWpmnh5w.mjs.map +1 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs +20 -0
- package/dist/useWidgetLoadTimer-B0tB-yzL.mjs.map +1 -0
- package/package.json +30 -30
- package/dist/Analytics-BKzTPees.mjs +0 -61
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +0 -487
- package/dist/HeaderCell-EhCUSjvj.mjs +0 -10
- package/dist/Loader-BlVzRtUd.mjs +0 -73
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +0 -110
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +0 -110
- package/dist/SpendingLegend-D15ixlQ1.mjs +0 -222
- package/dist/accounts-DkyAiLpg.mjs +0 -15632
- package/dist/core-BexP5oiV.mjs +0 -4047
- package/dist/help-CctDYrAH.mjs +0 -2308
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/microinsights-CRf3ChsJ.mjs +0 -1814
- package/dist/recurringtransactions-gbJ_NA8u.mjs +0 -1564
- package/dist/settings-ZMHe439l.mjs +0 -1526
package/dist/goals/index.es.js
CHANGED
|
@@ -1,1209 +1,1090 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as me, Dt as r, Et as U, J as S, M as Pe, Pt as ye, Tt as le, j as je, ln as ue, un as _e } from "../core-BexP5oiV.mjs";
|
|
3
|
-
import { An as Fe, Bn as Te, Gn as $e, Mn as Ce, Xn as He, _r as ve, gr as Ue, kn as Z, lr as q, mr as pe, qn as Ye, sr as $, ur as Ze, yr as qe } from "../accounts-DkyAiLpg.mjs";
|
|
4
|
-
import { n as Re } from "../Analytics-BKzTPees.mjs";
|
|
5
|
-
import { O as xe, d as Ee, g as N, h as he, i as be, n as j, p as R, t as Se } from "../Loader-BlVzRtUd.mjs";
|
|
6
|
-
import { n as Je, r as Xe, t as Qe } from "../OriginalBalanceAction-sbiqaxok.mjs";
|
|
1
|
+
import { jsxs as c, jsx as e, Fragment as F } from "react/jsx-runtime";
|
|
7
2
|
import T from "react";
|
|
8
|
-
import { observer as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { AddBox as Ge, ArrowUpwardAlt as tt, CheckCircle as nt, ChevronRight as z, ExpandLess as at, ExpandMore as it, Icon as fe, NoteStack as Ne, Payments as ke, Person as we, Trophy as ot } from "@mxenabled/mx-icons";
|
|
13
|
-
import { Fragment as F, jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
14
|
-
import { useTheme as rt } from "@mui/material/styles";
|
|
15
|
-
import st from "@mui/material/Box";
|
|
3
|
+
import { observer as D } from "mobx-react-lite";
|
|
4
|
+
import Pe from "@mui/material/Alert";
|
|
5
|
+
import je from "@mui/material/Snackbar";
|
|
6
|
+
import f from "@mui/material/Stack";
|
|
16
7
|
import re from "@mui/material/Tab";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
8
|
+
import Fe from "@mui/material/Tabs";
|
|
9
|
+
import { b as B } from "../Localization-DnoVyBNK.mjs";
|
|
10
|
+
import { f as I } from "../NumberFormatting--XMeeBfr.mjs";
|
|
11
|
+
import { Text as C, H3 as le, P as Y, Icon as $e, InstitutionLogo as X, H2 as Te } from "@mxenabled/mxui";
|
|
12
|
+
import me from "@mui/material/Button";
|
|
13
|
+
import Ce from "@mui/material/Card";
|
|
14
|
+
import Re from "@mui/material/CardActionArea";
|
|
15
|
+
import xe from "@mui/material/CardContent";
|
|
16
|
+
import ge from "@mui/material/Grid";
|
|
17
|
+
import te from "@mui/material/Avatar";
|
|
18
|
+
import He from "@mui/material/CardHeader";
|
|
19
|
+
import { Payments as Ee, NoteStack as Se, Person as ve, ArrowUpwardAlt as Ue, CheckCircle as Ye, ChevronRight as z, Icon as ye, ExpandLess as Ze, ExpandMore as qe, AddBox as Ie, Trophy as Je } from "@mxenabled/mx-icons";
|
|
20
|
+
import { g as ue, T as r, G as de, a as Qe, M as U, b as Xe } from "../GoalsUtil-C9EnLWvC.mjs";
|
|
21
|
+
import { u as x, k as N, a as _e, i as pe, c as j, C as Ge, f as Ne } from "../hooks-97sNJ_lf.mjs";
|
|
22
|
+
import { u as he } from "../useScreenSize-mWpmnh5w.mjs";
|
|
23
|
+
import { S as et } from "../StatusBar-CPfSXe80.mjs";
|
|
24
|
+
import v from "@mui/material/Divider";
|
|
26
25
|
import O from "@mui/material/List";
|
|
26
|
+
import { L as Z } from "../ListItemAction-BqUCLj_w.mjs";
|
|
27
|
+
import { C as ke } from "../CurrencyInput-DaGEQaLW.mjs";
|
|
28
|
+
import { fromUnixTime as ee } from "date-fns/fromUnixTime";
|
|
29
|
+
import tt from "@mui/material/IconButton";
|
|
27
30
|
import k from "@mui/material/ListItem";
|
|
31
|
+
import P from "@mui/material/ListItemAvatar";
|
|
28
32
|
import L from "@mui/material/ListItemButton";
|
|
29
|
-
import _t from "@mui/material/ListItemIcon";
|
|
30
33
|
import w from "@mui/material/ListItemText";
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import Ae from "
|
|
39
|
-
import
|
|
40
|
-
import {
|
|
41
|
-
import
|
|
42
|
-
import { isValid as
|
|
34
|
+
import { f as be, D as fe } from "../DateFormats-HudZ3Bjs.mjs";
|
|
35
|
+
import { D as q } from "../Drawer-DsnW2o0v.mjs";
|
|
36
|
+
import { g as we, u as nt } from "../useAccountDisplayName-BsiXA0qf.mjs";
|
|
37
|
+
import ot from "@mui/material/Collapse";
|
|
38
|
+
import at from "@mui/material/ListItemIcon";
|
|
39
|
+
import it from "@mui/material/Checkbox";
|
|
40
|
+
import { C as De } from "../ConnectCard-D7uxoH5Y.mjs";
|
|
41
|
+
import { c as Ae } from "../Account-DR7Plrqy.mjs";
|
|
42
|
+
import Ke from "@mui/material/TextField";
|
|
43
|
+
import { M as rt, I as st, O as ct } from "../OriginalBalanceAction-YrvxBYAl.mjs";
|
|
44
|
+
import { getUnixTime as lt } from "date-fns/getUnixTime";
|
|
45
|
+
import { isValid as dt } from "date-fns/isValid";
|
|
46
|
+
import { AdapterDateFns as mt } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
47
|
+
import { DatePicker as ut } from "@mui/x-date-pickers";
|
|
48
|
+
import { LocalizationProvider as _t } from "@mui/x-date-pickers/LocalizationProvider";
|
|
49
|
+
import { D as pt } from "../Dialog-Bvd2n8hz.mjs";
|
|
50
|
+
import { u as Me } from "../useWidgetLoadTimer-B0tB-yzL.mjs";
|
|
51
|
+
import { A as $ } from "../Analytics-WeZYytR0.mjs";
|
|
52
|
+
import { L as Le } from "../Loader-CxeBwuPG.mjs";
|
|
53
|
+
import { W as ht } from "../WidgetContainer-DJnp6t6c.mjs";
|
|
54
|
+
import { E as bt } from "../EmptyState-CJUDc3kD.mjs";
|
|
55
|
+
import ft from "@mui/material/Box";
|
|
56
|
+
import { useTheme as gt } from "@mui/material/styles";
|
|
57
|
+
import { S as yt } from "../SingleSegmentDonut-7Uy6VEld.mjs";
|
|
58
|
+
import { M as At } from "../MicroWidgetContainer-B2NnKBgW.mjs";
|
|
43
59
|
function se({ title: t, subtitle: n }) {
|
|
44
|
-
return /* @__PURE__ */ c(
|
|
45
|
-
bold: !0,
|
|
46
|
-
variant: "body1",
|
|
47
|
-
|
|
48
|
-
}), /* @__PURE__ */ e(C, {
|
|
49
|
-
sx: { fontWeight: 400 },
|
|
50
|
-
variant: "body1",
|
|
51
|
-
children: n
|
|
52
|
-
})] });
|
|
60
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
61
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t }),
|
|
62
|
+
/* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "body1", children: n })
|
|
63
|
+
] });
|
|
53
64
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
variant: "rounded",
|
|
78
|
-
children: f
|
|
79
|
-
}),
|
|
80
|
-
subheader: /* @__PURE__ */ e(C, {
|
|
81
|
-
sx: {
|
|
82
|
-
fontWeight: 700,
|
|
83
|
-
fontSize: n || m ? "18px" : "23px",
|
|
84
|
-
lineHeight: n || m ? "24px" : "32px"
|
|
85
|
-
},
|
|
86
|
-
children: `${S(t.current_amount, m ? "0,0" : "0,0.00")} / ${Tt(b, m)}`
|
|
87
|
-
}),
|
|
65
|
+
const Tt = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
66
|
+
/(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
|
|
67
|
+
"$1$2$3"
|
|
68
|
+
) : I(t, "0,0.00"), Oe = D(
|
|
69
|
+
({ goal: t, isInDrawer: n = !1, onClick: u }) => {
|
|
70
|
+
const { goals: d } = x(), { isMobile: _, isTablet: i } = he(), m = _ || i, {
|
|
71
|
+
backgroundColor: p,
|
|
72
|
+
color: s,
|
|
73
|
+
percentage: h,
|
|
74
|
+
percentageText: a,
|
|
75
|
+
projectedText: o
|
|
76
|
+
} = ue(d, t), b = t.track_type === r.DEBT_TRACK ? t.initial_amount : t.amount, l = [
|
|
77
|
+
{
|
|
78
|
+
color: p,
|
|
79
|
+
percentage: `${h}`
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
let y = /* @__PURE__ */ e(Ee, {});
|
|
83
|
+
return t.track_type === r.DEBT_TRACK ? y = /* @__PURE__ */ e(Se, {}) : t.track_type === r.RETIREMENT_TRACK && (y = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ e(
|
|
84
|
+
Ce,
|
|
85
|
+
{
|
|
86
|
+
elevation: 2,
|
|
88
87
|
sx: {
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
"&:focus-within": {
|
|
89
|
+
outline: "2px solid",
|
|
90
|
+
outlineColor: "primary.main"
|
|
91
|
+
}
|
|
91
92
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
93
|
+
children: /* @__PURE__ */ c(Re, { disabled: !u, onClick: u, children: [
|
|
94
|
+
/* @__PURE__ */ e(
|
|
95
|
+
He,
|
|
96
|
+
{
|
|
97
|
+
avatar: /* @__PURE__ */ e(te, { sx: { bgcolor: p, color: s, height: 48, width: 48 }, variant: "rounded", children: y }),
|
|
98
|
+
subheader: /* @__PURE__ */ e(
|
|
99
|
+
C,
|
|
100
|
+
{
|
|
101
|
+
sx: {
|
|
102
|
+
fontWeight: 700,
|
|
103
|
+
fontSize: n || m ? "18px" : "23px",
|
|
104
|
+
lineHeight: n || m ? "24px" : "32px"
|
|
105
|
+
},
|
|
106
|
+
children: `${I(t.current_amount, m ? "0,0" : "0,0.00")} / ${Tt(
|
|
107
|
+
b,
|
|
108
|
+
m
|
|
109
|
+
)}`
|
|
110
|
+
}
|
|
111
|
+
),
|
|
112
|
+
sx: { alignItems: "flex-start", "& .MuiCardHeader-content": { minWidth: 0 } },
|
|
113
|
+
title: /* @__PURE__ */ e(
|
|
114
|
+
C,
|
|
115
|
+
{
|
|
116
|
+
color: "text.secondary",
|
|
117
|
+
fontWeight: 400,
|
|
118
|
+
sx: {
|
|
119
|
+
fontSize: "15px",
|
|
120
|
+
lineHeight: "20px"
|
|
121
|
+
},
|
|
122
|
+
variant: "h4",
|
|
123
|
+
children: t.name
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ e(xe, { sx: { pt: 0 }, children: /* @__PURE__ */ c(f, { gap: 6, children: [
|
|
129
|
+
/* @__PURE__ */ e(et, { data: l, height: 24 }),
|
|
130
|
+
/* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
131
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: a }),
|
|
132
|
+
t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: o })
|
|
133
|
+
] })
|
|
134
|
+
] }) })
|
|
135
|
+
] })
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
), Ct = D(({ trackType: t }) => {
|
|
140
|
+
const { goals: n } = x(), { setAlert: u, monthlyCashFlowProfile: d, updateMonthlyCashFlowProfile: _ } = N(), i = T.useMemo(() => {
|
|
141
|
+
let a = 0;
|
|
142
|
+
return t === r.SAVINGS_TRACK ? a = d?.amount_allocated_for_savings_goals || 0 : t === r.DEBT_TRACK ? a = d?.amount_allocated_for_debt_goals || 0 : t === r.RETIREMENT_TRACK && (a = d?.amount_allocated_for_retirement_goals || 0), a;
|
|
131
143
|
}, [d]);
|
|
132
144
|
T.useEffect(() => {
|
|
133
|
-
p(
|
|
134
|
-
}, [
|
|
135
|
-
const [m, p] = T.useState(
|
|
145
|
+
p(i);
|
|
146
|
+
}, [i]);
|
|
147
|
+
const [m, p] = T.useState(i), s = m < 0 || m > 99999999, h = async () => {
|
|
136
148
|
if (d) {
|
|
137
|
-
const
|
|
138
|
-
t === r.SAVINGS_TRACK ?
|
|
149
|
+
const a = { ...d };
|
|
150
|
+
t === r.SAVINGS_TRACK ? a.amount_allocated_for_savings_goals = m : t === r.DEBT_TRACK ? a.amount_allocated_for_debt_goals = m : t === r.RETIREMENT_TRACK && (a.amount_allocated_for_retirement_goals = m), await _(a), u(n.alert_contribution_updated);
|
|
139
151
|
}
|
|
140
152
|
};
|
|
141
|
-
return /* @__PURE__ */ e(
|
|
142
|
-
|
|
143
|
-
|
|
153
|
+
return /* @__PURE__ */ e(f, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
|
|
154
|
+
Z,
|
|
155
|
+
{
|
|
144
156
|
isSaveDisabled: !m || isNaN(m),
|
|
145
157
|
label: n.contribution_label,
|
|
146
|
-
onCancel: () => p(
|
|
158
|
+
onCancel: () => p(i),
|
|
147
159
|
onSave: h,
|
|
148
160
|
primaryText: n.contribution_label,
|
|
149
|
-
secondaryText:
|
|
150
|
-
children: /* @__PURE__ */ e(
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
});
|
|
161
|
-
}), vt = ({ goal: t, index: n, onUpClick: u }) => {
|
|
162
|
-
const { goals: d } = R(), { percentage: _ } = me(d, t), o = t.goal_type === le.KEEP_BALANCE_BELOW || t.has_been_spent ? d.goal_completed : B(d.goal_percentage_reached, `${_ * 100}`);
|
|
163
|
-
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(L, {
|
|
164
|
-
disableRipple: !0,
|
|
165
|
-
sx: {
|
|
166
|
-
":hover": { backgroundColor: "unset" },
|
|
167
|
-
cursor: "default"
|
|
168
|
-
},
|
|
169
|
-
children: [t.track_type !== r.RETIREMENT_TRACK && /* @__PURE__ */ e(P, {
|
|
170
|
-
sx: {
|
|
171
|
-
alignItems: "center",
|
|
172
|
-
display: "flex",
|
|
173
|
-
justifyContent: "center",
|
|
174
|
-
".MuiAvatar-root": {
|
|
175
|
-
height: "16px",
|
|
176
|
-
width: "16px"
|
|
161
|
+
secondaryText: I(i, "0,0.00"),
|
|
162
|
+
children: /* @__PURE__ */ e(
|
|
163
|
+
ke,
|
|
164
|
+
{
|
|
165
|
+
amount: m,
|
|
166
|
+
autoFocus: !0,
|
|
167
|
+
error: s,
|
|
168
|
+
fullWidth: !0,
|
|
169
|
+
minAmount: 0,
|
|
170
|
+
setAmount: (a) => p(isNaN(Number(a)) ? m : Number(a)),
|
|
171
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
177
172
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
direction: "row",
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
})
|
|
213
|
-
})
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
})]
|
|
258
|
-
})
|
|
259
|
-
})]
|
|
260
|
-
}) }, t.guid);
|
|
261
|
-
}, xt = ({ trackType: t }) => {
|
|
262
|
-
const { goals: n, common: u } = R(), { loadGoals: d, orderedGoals: _, reorderGoals: o } = N(), m = _.filter((y) => y.track_type === t), p = m.filter((y) => y.track_type === r.SAVINGS_TRACK && !y.has_been_spent || y.track_type !== r.SAVINGS_TRACK && !y.is_complete), s = m.filter((y) => y.track_type === r.SAVINGS_TRACK && y.has_been_spent || y.track_type !== r.SAVINGS_TRACK && y.is_complete), [h, i] = T.useState(!1);
|
|
263
|
-
let a = n.manage_saving_goals, b = n.manage_saving_drawer_title, l = n.manage_saving_title, f = n.manage_saving_description;
|
|
264
|
-
t === r.DEBT_TRACK ? (a = n.manage_debt_goals, b = n.manage_debt_drawer_title, l = n.manage_debt_title, f = n.manage_debt_description) : t === r.RETIREMENT_TRACK && (a = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, l = n.manage_retirement_title, f = n.manage_retirement_description);
|
|
265
|
-
const x = async (y) => {
|
|
266
|
-
const A = [...p], v = A.findIndex((D) => D.guid === y.guid);
|
|
267
|
-
let G = v - 1;
|
|
268
|
-
G < 0 && (G = A.length - 1), A.splice(G, 0, A.splice(v, 1)[0]);
|
|
269
|
-
for (let D = 0; D < A.length; D++) A[D].position = D + 1;
|
|
270
|
-
await o(A), await d();
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
) });
|
|
176
|
+
}), Rt = ({ goal: t, index: n, onUpClick: u }) => {
|
|
177
|
+
const { goals: d } = x(), { percentage: _ } = ue(d, t), i = t.goal_type === de.KEEP_BALANCE_BELOW || t.has_been_spent ? d.goal_completed : B(d.goal_percentage_reached, `${_ * 100}`);
|
|
178
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
179
|
+
L,
|
|
180
|
+
{
|
|
181
|
+
disableRipple: !0,
|
|
182
|
+
sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
|
|
183
|
+
children: [
|
|
184
|
+
t.track_type !== r.RETIREMENT_TRACK && /* @__PURE__ */ e(
|
|
185
|
+
P,
|
|
186
|
+
{
|
|
187
|
+
sx: {
|
|
188
|
+
alignItems: "center",
|
|
189
|
+
display: "flex",
|
|
190
|
+
justifyContent: "center",
|
|
191
|
+
".MuiAvatar-root": { height: "16px", width: "16px" }
|
|
192
|
+
},
|
|
193
|
+
children: t.track_type === r.SAVINGS_TRACK ? /* @__PURE__ */ e(tt, { onClick: () => u?.(t), children: /* @__PURE__ */ e(Ue, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(te, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "caption", children: n + 1 }) })
|
|
194
|
+
}
|
|
195
|
+
),
|
|
196
|
+
/* @__PURE__ */ e(w, { slotProps: { primary: { variant: "body1" } }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
197
|
+
/* @__PURE__ */ c(f, { sx: { maxWidth: "70%" }, children: [
|
|
198
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
|
|
199
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: t.is_complete ? i : B(
|
|
200
|
+
d.goal_projection,
|
|
201
|
+
be(
|
|
202
|
+
ee(t.projected_to_complete_at || 0),
|
|
203
|
+
fe.MONTH_SHORT_YEAR
|
|
204
|
+
)
|
|
205
|
+
) })
|
|
206
|
+
] }),
|
|
207
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: I(t.amount, "0,0.00") })
|
|
208
|
+
] }) })
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
) });
|
|
212
|
+
}, xt = ({ goal: t }) => {
|
|
213
|
+
const { goals: n } = x();
|
|
214
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
215
|
+
L,
|
|
216
|
+
{
|
|
217
|
+
disableRipple: !0,
|
|
218
|
+
sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
|
|
219
|
+
children: [
|
|
220
|
+
/* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ye, { color: "success", filled: !0, size: 20 }) }),
|
|
221
|
+
/* @__PURE__ */ e(w, { slotProps: { primary: { variant: "body1" } }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
222
|
+
/* @__PURE__ */ c(f, { children: [
|
|
223
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: t.name }),
|
|
224
|
+
/* @__PURE__ */ e(C, { variant: "caption", children: B(
|
|
225
|
+
n.completed_label,
|
|
226
|
+
be(
|
|
227
|
+
ee(t.completed_at || 0),
|
|
228
|
+
fe.MONTH_SHORT_YEAR
|
|
229
|
+
)
|
|
230
|
+
) })
|
|
231
|
+
] }),
|
|
232
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: I(t.amount, "0,0.00") })
|
|
233
|
+
] }) })
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
) }, t.guid);
|
|
237
|
+
}, Et = ({ trackType: t }) => {
|
|
238
|
+
const { goals: n, common: u } = x(), { loadGoals: d, orderedGoals: _, reorderGoals: i } = N(), m = _.filter((g) => g.track_type === t), p = m.filter(
|
|
239
|
+
(g) => g.track_type === r.SAVINGS_TRACK && !g.has_been_spent || g.track_type !== r.SAVINGS_TRACK && !g.is_complete
|
|
240
|
+
), s = m.filter(
|
|
241
|
+
(g) => g.track_type === r.SAVINGS_TRACK && g.has_been_spent || g.track_type !== r.SAVINGS_TRACK && g.is_complete
|
|
242
|
+
), [h, a] = T.useState(!1);
|
|
243
|
+
let o = n.manage_saving_goals, b = n.manage_saving_drawer_title, l = n.manage_saving_title, y = n.manage_saving_description;
|
|
244
|
+
t === r.DEBT_TRACK ? (o = n.manage_debt_goals, b = n.manage_debt_drawer_title, l = n.manage_debt_title, y = n.manage_debt_description) : t === r.RETIREMENT_TRACK && (o = n.manage_retirement_goals, b = n.manage_retirement_drawer_title, l = n.manage_retirement_title, y = n.manage_retirement_description);
|
|
245
|
+
const E = async (g) => {
|
|
246
|
+
const A = [...p], R = A.findIndex((K) => K.guid === g.guid);
|
|
247
|
+
let G = R - 1;
|
|
248
|
+
G < 0 && (G = A.length - 1), A.splice(G, 0, A.splice(R, 1)[0]);
|
|
249
|
+
for (let K = 0; K < A.length; K++)
|
|
250
|
+
A[K].position = K + 1;
|
|
251
|
+
await i(A), await d();
|
|
271
252
|
};
|
|
272
|
-
return /* @__PURE__ */ c(
|
|
273
|
-
endIcon: /* @__PURE__ */ e(z, {}),
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
children:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
] })
|
|
329
|
-
})] });
|
|
330
|
-
}, ce = K(({ trackType: t, onAddGoals: n }) => {
|
|
331
|
-
const { isMobile: u } = pe(), { goals: d } = R(), { selectedAccountGuids: _ } = he(), { orderedGoals: o, setSelectedGoal: m } = N(), p = o.filter((a) => a.track_type === t && (a.track_type !== r.RETIREMENT_TRACK && _.includes(a.account_guid) || a.track_type === r.RETIREMENT_TRACK)), s = p.filter((a) => a.track_type === r.SAVINGS_TRACK && !a.has_been_spent || a.track_type !== r.SAVINGS_TRACK && !a.is_complete), h = p.filter((a) => a.track_type === r.SAVINGS_TRACK && a.has_been_spent || a.track_type !== r.SAVINGS_TRACK && a.is_complete), i = t === r.DEBT_TRACK ? d.zero_state_complete_debt : d.zero_state_complete_savings;
|
|
332
|
-
return /* @__PURE__ */ c(g, {
|
|
333
|
-
mt: 16,
|
|
334
|
-
mx: u ? 24 : 0,
|
|
335
|
-
children: [
|
|
336
|
-
/* @__PURE__ */ c(g, {
|
|
337
|
-
alignItems: "center",
|
|
338
|
-
direction: "row",
|
|
339
|
-
justifyContent: "space-between",
|
|
340
|
-
mb: 8,
|
|
341
|
-
children: [/* @__PURE__ */ e(de, {
|
|
342
|
-
color: "text.secondary",
|
|
343
|
-
variant: "body2",
|
|
344
|
-
children: d.ongoing_title
|
|
345
|
-
}), /* @__PURE__ */ e(xt, { trackType: t })]
|
|
346
|
-
}),
|
|
347
|
-
s.length > 0 ? /* @__PURE__ */ e(Ae, {
|
|
348
|
-
container: !0,
|
|
349
|
-
spacing: 24,
|
|
350
|
-
children: s.map((a, b, l) => /* @__PURE__ */ e(Ae, {
|
|
351
|
-
size: u || b === 0 && l.length !== 2 ? 12 : 6,
|
|
352
|
-
children: /* @__PURE__ */ e(Oe, {
|
|
353
|
-
goal: a,
|
|
354
|
-
onClick: () => m(a)
|
|
355
|
-
}, a.guid)
|
|
356
|
-
}, b))
|
|
357
|
-
}) : /* @__PURE__ */ c(g, {
|
|
253
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
254
|
+
/* @__PURE__ */ e(me, { endIcon: /* @__PURE__ */ e(z, {}), onClick: () => a(!0), children: o }),
|
|
255
|
+
/* @__PURE__ */ e(
|
|
256
|
+
q,
|
|
257
|
+
{
|
|
258
|
+
ariaLabelClose: u.close_aria,
|
|
259
|
+
isOpen: h,
|
|
260
|
+
onClose: () => a(!1),
|
|
261
|
+
title: b,
|
|
262
|
+
children: /* @__PURE__ */ c(f, { children: [
|
|
263
|
+
/* @__PURE__ */ c(f, { m: 24, children: [
|
|
264
|
+
/* @__PURE__ */ e(le, { children: l }),
|
|
265
|
+
/* @__PURE__ */ e(Y, { color: "text.secondary", variant: "subtitle2", children: y })
|
|
266
|
+
] }),
|
|
267
|
+
/* @__PURE__ */ e(Ct, { trackType: t }),
|
|
268
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.goal_priority }),
|
|
269
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: p.map((g, A) => {
|
|
270
|
+
const R = A >= p.length - 1;
|
|
271
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
272
|
+
/* @__PURE__ */ e(Rt, { goal: g, index: A, onUpClick: E }),
|
|
273
|
+
/* @__PURE__ */ e(v, { variant: R ? "fullWidth" : "inset" })
|
|
274
|
+
] }, `ongoing-${g.guid}`);
|
|
275
|
+
}) }),
|
|
276
|
+
t !== r.RETIREMENT_TRACK && s.length > 0 && /* @__PURE__ */ c(f, { children: [
|
|
277
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "caption", children: n.complete_title }),
|
|
278
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: s.map((g, A) => {
|
|
279
|
+
const R = A > p.length - 1;
|
|
280
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
281
|
+
/* @__PURE__ */ e(xt, { goal: g }),
|
|
282
|
+
/* @__PURE__ */ e(v, { variant: R ? "fullWidth" : "inset" })
|
|
283
|
+
] }, `complete-${g.guid}`);
|
|
284
|
+
}) })
|
|
285
|
+
] })
|
|
286
|
+
] })
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
] });
|
|
290
|
+
}, ce = D(({ trackType: t, onAddGoals: n }) => {
|
|
291
|
+
const { isMobile: u } = he(), { goals: d } = x(), { selectedAccountGuids: _ } = _e(), { orderedGoals: i, setSelectedGoal: m } = N(), p = i.filter(
|
|
292
|
+
(o) => o.track_type === t && (o.track_type !== r.RETIREMENT_TRACK && _.includes(o.account_guid) || o.track_type === r.RETIREMENT_TRACK)
|
|
293
|
+
), s = p.filter(
|
|
294
|
+
(o) => o.track_type === r.SAVINGS_TRACK && !o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && !o.is_complete
|
|
295
|
+
), h = p.filter(
|
|
296
|
+
(o) => o.track_type === r.SAVINGS_TRACK && o.has_been_spent || o.track_type !== r.SAVINGS_TRACK && o.is_complete
|
|
297
|
+
), a = t === r.DEBT_TRACK ? d.zero_state_complete_debt : d.zero_state_complete_savings;
|
|
298
|
+
return /* @__PURE__ */ c(f, { mt: 16, mx: u ? 24 : 0, children: [
|
|
299
|
+
/* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
|
|
300
|
+
/* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: d.ongoing_title }),
|
|
301
|
+
/* @__PURE__ */ e(Et, { trackType: t })
|
|
302
|
+
] }),
|
|
303
|
+
s.length > 0 ? /* @__PURE__ */ e(ge, { container: !0, spacing: 24, children: s.map((o, b, l) => (
|
|
304
|
+
// Goal should be full width in mobile or if it's the first goal (unless there are 2)
|
|
305
|
+
/* @__PURE__ */ e(ge, { size: u || b === 0 && l.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Oe, { goal: o, onClick: () => m(o) }, o.guid) }, b)
|
|
306
|
+
)) }) : /* @__PURE__ */ c(
|
|
307
|
+
f,
|
|
308
|
+
{
|
|
358
309
|
alignItems: "center",
|
|
359
310
|
bgcolor: "background.default",
|
|
360
311
|
borderRadius: 2,
|
|
361
312
|
height: 166,
|
|
362
313
|
justifyContent: "center",
|
|
363
314
|
py: 18,
|
|
364
|
-
children: [/* @__PURE__ */ e(Y, {
|
|
365
|
-
sx: (a) => ({
|
|
366
|
-
color: "text.secondary",
|
|
367
|
-
[a.breakpoints.down("sm")]: { px: 10 },
|
|
368
|
-
width: { sm: 381 }
|
|
369
|
-
}),
|
|
370
|
-
variant: "body2",
|
|
371
|
-
children: Pe(t, d)
|
|
372
|
-
}), /* @__PURE__ */ e(ge, {
|
|
373
|
-
onClick: n,
|
|
374
|
-
sx: {
|
|
375
|
-
mt: 16,
|
|
376
|
-
width: { sm: 224 }
|
|
377
|
-
},
|
|
378
|
-
variant: "contained",
|
|
379
|
-
children: d.add_goals_button
|
|
380
|
-
})]
|
|
381
|
-
}),
|
|
382
|
-
t !== r.RETIREMENT_TRACK && /* @__PURE__ */ c(g, {
|
|
383
|
-
gap: 16,
|
|
384
|
-
mt: 48,
|
|
385
315
|
children: [
|
|
386
|
-
/* @__PURE__ */ e(
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}),
|
|
391
|
-
h.length === 0 && /* @__PURE__ */ e(g, {
|
|
392
|
-
alignItems: "center",
|
|
393
|
-
bgcolor: "background.default",
|
|
394
|
-
borderRadius: 2,
|
|
395
|
-
py: 18,
|
|
396
|
-
children: /* @__PURE__ */ e(Y, {
|
|
397
|
-
sx: (a) => ({
|
|
316
|
+
/* @__PURE__ */ e(
|
|
317
|
+
Y,
|
|
318
|
+
{
|
|
319
|
+
sx: (o) => ({
|
|
398
320
|
color: "text.secondary",
|
|
399
|
-
|
|
400
|
-
|
|
321
|
+
[o.breakpoints.down("sm")]: {
|
|
322
|
+
px: 10
|
|
323
|
+
},
|
|
324
|
+
width: { sm: 381 }
|
|
401
325
|
}),
|
|
402
326
|
variant: "body2",
|
|
403
|
-
children:
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
elevation: 2,
|
|
408
|
-
children: /* @__PURE__ */ e(Le, {
|
|
409
|
-
onClick: () => m(a),
|
|
410
|
-
children: /* @__PURE__ */ e(De, {
|
|
411
|
-
sx: { ":last-child": { pb: 16 } },
|
|
412
|
-
children: /* @__PURE__ */ c(g, {
|
|
413
|
-
alignItems: "center",
|
|
414
|
-
direction: "row",
|
|
415
|
-
justifyContent: "space-between",
|
|
416
|
-
children: [/* @__PURE__ */ c(g, {
|
|
417
|
-
alignItems: "center",
|
|
418
|
-
direction: "row",
|
|
419
|
-
gap: 6,
|
|
420
|
-
children: [/* @__PURE__ */ e(et, {
|
|
421
|
-
color: "success",
|
|
422
|
-
fill: !0,
|
|
423
|
-
name: "check_circle",
|
|
424
|
-
size: 20
|
|
425
|
-
}), /* @__PURE__ */ e(C, {
|
|
426
|
-
color: "text.secondary",
|
|
427
|
-
variant: "body1",
|
|
428
|
-
children: a.name
|
|
429
|
-
})]
|
|
430
|
-
}), /* @__PURE__ */ e(C, {
|
|
431
|
-
bold: !0,
|
|
432
|
-
variant: "body1",
|
|
433
|
-
children: S(a.amount, "0,0.00")
|
|
434
|
-
})]
|
|
435
|
-
})
|
|
436
|
-
})
|
|
437
|
-
})
|
|
438
|
-
}, a.guid))
|
|
327
|
+
children: Qe(t, d)
|
|
328
|
+
}
|
|
329
|
+
),
|
|
330
|
+
/* @__PURE__ */ e(me, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: d.add_goals_button })
|
|
439
331
|
]
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
variant: "rounded",
|
|
454
|
-
children: /* @__PURE__ */ e(fe, {
|
|
455
|
-
name: _,
|
|
456
|
-
sx: { color: "grey.900" }
|
|
457
|
-
})
|
|
458
|
-
}) }),
|
|
459
|
-
/* @__PURE__ */ e(w, {
|
|
460
|
-
primary: o,
|
|
461
|
-
secondary: m,
|
|
462
|
-
sx: { mr: 24 }
|
|
332
|
+
}
|
|
333
|
+
),
|
|
334
|
+
t !== r.RETIREMENT_TRACK && /* @__PURE__ */ c(f, { gap: 16, mt: 48, children: [
|
|
335
|
+
/* @__PURE__ */ e(le, { color: "text.secondary", variant: "body2", children: d.complete_title }),
|
|
336
|
+
h.length === 0 && /* @__PURE__ */ e(f, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
|
|
337
|
+
Y,
|
|
338
|
+
{
|
|
339
|
+
sx: (o) => ({
|
|
340
|
+
color: "text.secondary",
|
|
341
|
+
width: { sm: 393 },
|
|
342
|
+
[o.breakpoints.down("sm")]: {
|
|
343
|
+
px: 10
|
|
344
|
+
}
|
|
463
345
|
}),
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
/* @__PURE__ */ e(
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
})
|
|
489
|
-
}, l))
|
|
490
|
-
})
|
|
491
|
-
})
|
|
492
|
-
]
|
|
493
|
-
}) });
|
|
494
|
-
}, Be = ({ accounts: t, isOpen: n, onClose: u, onSave: d, title: _ }) => {
|
|
495
|
-
const { goals: o, common: m } = R(), { config: p } = be(), [s, h] = T.useState([]), i = (a) => {
|
|
496
|
-
const b = s.findIndex((f) => f.guid === a.guid), l = [...s];
|
|
497
|
-
b >= 0 ? l.splice(b, 1) : l.push(a), h(l);
|
|
498
|
-
};
|
|
499
|
-
return /* @__PURE__ */ c(q, {
|
|
500
|
-
ariaLabelClose: m.close_aria,
|
|
501
|
-
isOpen: n,
|
|
502
|
-
onClose: u,
|
|
503
|
-
onPrimaryAction: () => d(s),
|
|
504
|
-
title: _,
|
|
505
|
-
children: [/* @__PURE__ */ c(O, {
|
|
506
|
-
sx: { bgcolor: "background.white" },
|
|
507
|
-
children: [/* @__PURE__ */ e(E, { variant: "fullWidth" }), t.map((a, b) => /* @__PURE__ */ c(T.Fragment, { children: [/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(L, {
|
|
508
|
-
onClick: () => i(a),
|
|
346
|
+
variant: "body2",
|
|
347
|
+
children: a
|
|
348
|
+
}
|
|
349
|
+
) }),
|
|
350
|
+
h.map((o) => /* @__PURE__ */ e(Ce, { elevation: 2, children: /* @__PURE__ */ e(Re, { onClick: () => m(o), children: /* @__PURE__ */ e(xe, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
351
|
+
/* @__PURE__ */ c(f, { alignItems: "center", direction: "row", gap: 6, children: [
|
|
352
|
+
/* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
|
|
353
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "body1", children: o.name })
|
|
354
|
+
] }),
|
|
355
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "body1", children: I(o.amount, "0,0.00") })
|
|
356
|
+
] }) }) }) }, o.guid))
|
|
357
|
+
] })
|
|
358
|
+
] });
|
|
359
|
+
}), St = ({ goalType: t, onClick: n }) => {
|
|
360
|
+
const { goals: u } = x(), { bgcolor: d, icon: _, label: i, description: m, subTypes: p, type: s } = t, [h, a] = T.useState(!1), o = p.length > 0;
|
|
361
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ c(O, { sx: { bgcolor: "background.paper" }, children: [
|
|
362
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(
|
|
363
|
+
L,
|
|
364
|
+
{
|
|
365
|
+
onClick: o ? () => a(!h) : () => n(
|
|
366
|
+
s === r.RETIREMENT_TRACK ? u.retirement : "",
|
|
367
|
+
s === r.RETIREMENT_TRACK ? U.RETIREMENT : U.OTHER,
|
|
368
|
+
s
|
|
369
|
+
),
|
|
509
370
|
children: [
|
|
510
|
-
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
}) })
|
|
514
|
-
/* @__PURE__ */ e(w, {
|
|
515
|
-
primary: ve(a, { allowNickname: p?.show_account_nicknames_in_master }),
|
|
516
|
-
secondary: S(a.balance || 0, "0,0.00")
|
|
517
|
-
}),
|
|
518
|
-
/* @__PURE__ */ e(ut, { checked: s.some((l) => l.guid === a.guid) })
|
|
371
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(te, { sx: { bgcolor: d }, variant: "rounded", children: /* @__PURE__ */ e(ye, { name: _, sx: { color: "grey.900" } }) }) }),
|
|
372
|
+
/* @__PURE__ */ e(w, { primary: i, secondary: m, sx: { mr: 24 } }),
|
|
373
|
+
!o && /* @__PURE__ */ e(z, {}),
|
|
374
|
+
o && (h ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(qe, {}))
|
|
519
375
|
]
|
|
520
|
-
}
|
|
521
|
-
}),
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
376
|
+
}
|
|
377
|
+
) }),
|
|
378
|
+
/* @__PURE__ */ e(v, { variant: "inset" }),
|
|
379
|
+
o && /* @__PURE__ */ e(ot, { in: h, children: /* @__PURE__ */ e(O, { sx: { bgcolor: "background.default" }, children: p.map((b, l) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ c(L, { onClick: () => n(b.label, b.metaType, s), children: [
|
|
380
|
+
/* @__PURE__ */ e(at, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ye, { name: b.icon }) }),
|
|
381
|
+
/* @__PURE__ */ e(
|
|
382
|
+
w,
|
|
383
|
+
{
|
|
384
|
+
primary: b.label,
|
|
385
|
+
slotProps: { primary: { variant: "body1" } }
|
|
386
|
+
}
|
|
387
|
+
),
|
|
388
|
+
/* @__PURE__ */ e(z, {})
|
|
389
|
+
] }) }, l)) }) })
|
|
390
|
+
] }) });
|
|
391
|
+
}, Be = ({
|
|
392
|
+
accounts: t,
|
|
393
|
+
isOpen: n,
|
|
394
|
+
onClose: u,
|
|
395
|
+
onSave: d,
|
|
396
|
+
title: _
|
|
397
|
+
}) => {
|
|
398
|
+
const { goals: i, common: m } = x(), { config: p } = pe(), [s, h] = T.useState([]), a = (o) => {
|
|
399
|
+
const b = s.findIndex((y) => y.guid === o.guid), l = [...s];
|
|
400
|
+
b >= 0 ? l.splice(b, 1) : l.push(o), h(l);
|
|
401
|
+
};
|
|
402
|
+
return /* @__PURE__ */ c(
|
|
403
|
+
q,
|
|
404
|
+
{
|
|
405
|
+
ariaLabelClose: m.close_aria,
|
|
406
|
+
isOpen: n,
|
|
407
|
+
onClose: u,
|
|
408
|
+
onPrimaryAction: () => d(s),
|
|
409
|
+
title: _,
|
|
410
|
+
children: [
|
|
411
|
+
/* @__PURE__ */ c(O, { sx: { bgcolor: "background.white" }, children: [
|
|
412
|
+
/* @__PURE__ */ e(v, { variant: "fullWidth" }),
|
|
413
|
+
t.map((o, b) => /* @__PURE__ */ c(T.Fragment, { children: [
|
|
414
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(L, { onClick: () => a(o), children: [
|
|
415
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
416
|
+
X,
|
|
417
|
+
{
|
|
418
|
+
alt: o?.name || "",
|
|
419
|
+
institutionGuid: o?.institution_guid || ""
|
|
420
|
+
}
|
|
421
|
+
) }),
|
|
422
|
+
/* @__PURE__ */ e(
|
|
423
|
+
w,
|
|
424
|
+
{
|
|
425
|
+
primary: we(o, {
|
|
426
|
+
allowNickname: p?.show_account_nicknames_in_master
|
|
427
|
+
}),
|
|
428
|
+
secondary: I(o.balance || 0, "0,0.00")
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
/* @__PURE__ */ e(it, { checked: s.some((l) => l.guid === o.guid) })
|
|
432
|
+
] }) }),
|
|
433
|
+
/* @__PURE__ */ e(v, { variant: b < t.length - 1 ? "inset" : "fullWidth" })
|
|
434
|
+
] }, o.guid))
|
|
435
|
+
] }),
|
|
436
|
+
p.show_connections_widget_in_master && /* @__PURE__ */ e(
|
|
437
|
+
De,
|
|
438
|
+
{
|
|
439
|
+
description: i.connect_description,
|
|
440
|
+
label: i.connect_button,
|
|
441
|
+
title: i.connect_title
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
);
|
|
447
|
+
}, vt = ({ onClose: t }) => {
|
|
448
|
+
const { goals: n } = x(), { addGoal: u, debtGoals: d, setAlert: _, setSelectedGoal: i } = N(), { config: m } = pe(), { visibleDebtAccounts: p } = j(), [s, h] = T.useState(!1), a = Xe(n), o = (l, y, E) => {
|
|
449
|
+
E === r.DEBT_TRACK ? h(!0) : i({
|
|
530
450
|
amount: 0,
|
|
531
451
|
current_amount: 0,
|
|
532
|
-
goal_type:
|
|
452
|
+
goal_type: de.SAVE_AMOUNT,
|
|
533
453
|
initial_amount: 0,
|
|
534
|
-
meta_type:
|
|
454
|
+
meta_type: y,
|
|
535
455
|
name: l,
|
|
536
|
-
track_type:
|
|
456
|
+
track_type: E
|
|
537
457
|
});
|
|
538
458
|
}, b = async (l) => {
|
|
539
|
-
for (const
|
|
540
|
-
let
|
|
541
|
-
|
|
542
|
-
account_guid:
|
|
459
|
+
for (const y of l) {
|
|
460
|
+
let E = U.CREDIT_CARD;
|
|
461
|
+
y.account_type === Ae.LOAN ? E = U.LOANS : y.account_type === Ae.LINE_OF_CREDIT && (E = U.LINE_OF_CREDIT), await u({
|
|
462
|
+
account_guid: y.guid,
|
|
543
463
|
amount: 0,
|
|
544
464
|
current_amount: 0,
|
|
545
|
-
goal_type:
|
|
546
|
-
initial_amount:
|
|
547
|
-
interest_rate:
|
|
548
|
-
meta_type:
|
|
549
|
-
monthly_payment:
|
|
550
|
-
name:
|
|
465
|
+
goal_type: de.KEEP_BALANCE_BELOW,
|
|
466
|
+
initial_amount: y.balance || 0,
|
|
467
|
+
interest_rate: y.interest_rate || 0,
|
|
468
|
+
meta_type: E,
|
|
469
|
+
monthly_payment: y.minimum_payment || 0,
|
|
470
|
+
name: we(y, {
|
|
471
|
+
allowNickname: m?.show_account_nicknames_in_master
|
|
472
|
+
}),
|
|
551
473
|
track_type: r.DEBT_TRACK
|
|
552
474
|
}), _(n.alert_goal_added);
|
|
553
475
|
}
|
|
554
476
|
h(!1), t?.(r.DEBT_TRACK);
|
|
555
477
|
};
|
|
556
|
-
return /* @__PURE__ */ c(
|
|
557
|
-
sx: { bgcolor: "background.paper" },
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
478
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
479
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: a.map((l, y) => /* @__PURE__ */ e(St, { goalType: l, onClick: o }, y)) }),
|
|
480
|
+
/* @__PURE__ */ e(
|
|
481
|
+
Be,
|
|
482
|
+
{
|
|
483
|
+
accounts: p.filter((l) => !d.find((y) => y.account_guid === l.guid)),
|
|
484
|
+
isOpen: s,
|
|
485
|
+
onClose: () => h(!1),
|
|
486
|
+
onSave: b,
|
|
487
|
+
title: n.select_debt_accounts_title
|
|
488
|
+
}
|
|
489
|
+
)
|
|
490
|
+
] });
|
|
569
491
|
}, We = ({ account: t }) => {
|
|
570
|
-
const n =
|
|
571
|
-
return /* @__PURE__ */ c(k, {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
};
|
|
590
|
-
t.amount = m, s ? d(l) : (t.track_type !== r.RETIREMENT_TRACK ? await _(l) : await
|
|
492
|
+
const n = nt(t);
|
|
493
|
+
return /* @__PURE__ */ c(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
|
|
494
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
495
|
+
X,
|
|
496
|
+
{
|
|
497
|
+
alt: t.name || "",
|
|
498
|
+
institutionGuid: t.institution_guid || ""
|
|
499
|
+
}
|
|
500
|
+
) }),
|
|
501
|
+
/* @__PURE__ */ e(
|
|
502
|
+
w,
|
|
503
|
+
{
|
|
504
|
+
primary: n,
|
|
505
|
+
secondary: I(t.balance || 0, "0,0.00")
|
|
506
|
+
}
|
|
507
|
+
)
|
|
508
|
+
] });
|
|
509
|
+
}, It = D(({ goal: t }) => {
|
|
510
|
+
const { goals: n } = x(), { setAlert: u, setSelectedGoal: d, updateGoal: _, updateRetirementGoal: i } = N(), [m, p] = T.useState(t.amount), s = !t.guid, h = m < 0 || m > 9999999999e-2, a = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, o = async () => {
|
|
511
|
+
const l = { ...t, amount: m };
|
|
512
|
+
t.amount = m, s ? d(l) : (t.track_type !== r.RETIREMENT_TRACK ? await _(l) : await i(l), u(n.alert_goal_updated_amount));
|
|
591
513
|
}, b = () => {
|
|
592
514
|
setTimeout(() => {
|
|
593
515
|
p(t.amount);
|
|
594
516
|
}, 250);
|
|
595
517
|
};
|
|
596
|
-
return /* @__PURE__ */ e(
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
amount:
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
518
|
+
return /* @__PURE__ */ e(
|
|
519
|
+
Z,
|
|
520
|
+
{
|
|
521
|
+
isDisabled: a,
|
|
522
|
+
isSaveDisabled: h,
|
|
523
|
+
label: n.details_amount_to_save,
|
|
524
|
+
onCancel: b,
|
|
525
|
+
onSave: o,
|
|
526
|
+
primaryText: n.details_amount_to_save,
|
|
527
|
+
secondaryText: I(t.amount, "0,0"),
|
|
528
|
+
zeroStateText: s && t.amount === 0 ? n.add_amount : void 0,
|
|
529
|
+
children: /* @__PURE__ */ e(
|
|
530
|
+
ke,
|
|
531
|
+
{
|
|
532
|
+
amount: m,
|
|
533
|
+
autoFocus: !0,
|
|
534
|
+
error: h,
|
|
535
|
+
fullWidth: !0,
|
|
536
|
+
minAmount: 0,
|
|
537
|
+
setAmount: (l) => p(isNaN(Number(l)) ? m : Number(l)),
|
|
538
|
+
sx: { ".MuiTypography-body1": { p: 0 } }
|
|
539
|
+
}
|
|
540
|
+
)
|
|
541
|
+
}
|
|
542
|
+
);
|
|
615
543
|
}), Gt = ({ goal: t }) => {
|
|
616
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = j(), { accounts: d, goals: _ } =
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
account_guid: f,
|
|
620
|
-
current_amount: l || 0
|
|
621
|
-
};
|
|
622
|
-
h ? p(x) : (await s(x), m(_.alert_account_changed)), a(!1);
|
|
544
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: u } = j(), { accounts: d, goals: _ } = x(), { config: i } = pe(), { setAlert: m, setSelectedGoal: p, updateGoal: s } = N(), h = !t.guid, [a, o] = T.useState(!1), b = async ({ balance: l, guid: y }) => {
|
|
545
|
+
const E = { ...t, account_guid: y, current_amount: l || 0 };
|
|
546
|
+
h ? p(E) : (await s(E), m(_.alert_account_changed)), o(!1);
|
|
623
547
|
};
|
|
624
|
-
return /* @__PURE__ */ c(
|
|
625
|
-
disableGutters: !0,
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
bold: !0,
|
|
688
|
-
sx: {
|
|
689
|
-
mb: 4,
|
|
690
|
-
ml: 24,
|
|
691
|
-
mt: 12
|
|
692
|
-
},
|
|
693
|
-
variant: "caption",
|
|
694
|
-
children: d.account_types[2]
|
|
695
|
-
}),
|
|
696
|
-
/* @__PURE__ */ e(O, {
|
|
697
|
-
sx: { bgcolor: "background.paper" },
|
|
698
|
-
children: u.map((l) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(L, {
|
|
699
|
-
onClick: () => b(l),
|
|
700
|
-
children: [
|
|
701
|
-
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(Q, {
|
|
702
|
-
alt: l?.name || "",
|
|
703
|
-
institutionGuid: l?.institution_guid || ""
|
|
704
|
-
}) }),
|
|
705
|
-
/* @__PURE__ */ e(w, {
|
|
706
|
-
primary: l?.name || l?.feed_name,
|
|
707
|
-
secondary: S(l?.balance || 0, "0,0.00")
|
|
708
|
-
}),
|
|
709
|
-
/* @__PURE__ */ e(z, {})
|
|
710
|
-
]
|
|
711
|
-
}) }, l.guid))
|
|
712
|
-
}),
|
|
713
|
-
o.show_connections_widget_in_master && /* @__PURE__ */ e(Ce, {
|
|
714
|
-
description: _.connect_description,
|
|
715
|
-
label: _.connect_button,
|
|
716
|
-
title: _.connect_title
|
|
717
|
-
})
|
|
718
|
-
] })
|
|
719
|
-
})] });
|
|
720
|
-
}, Nt = K(({ goal: t }) => {
|
|
721
|
-
const { goals: n } = R(), { setAlert: u, setSelectedGoal: d, updateGoal: _ } = N(), [o, m] = T.useState(t.name), p = !t.guid, s = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, h = async () => {
|
|
722
|
-
const a = {
|
|
723
|
-
...t,
|
|
724
|
-
name: o
|
|
725
|
-
};
|
|
726
|
-
t.name = o, p ? d(a) : (await _(a), u(n.alert_goal_updated_name));
|
|
727
|
-
}, i = () => {
|
|
548
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
549
|
+
h && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(L, { onClick: () => o(!0), children: [
|
|
550
|
+
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
551
|
+
/* @__PURE__ */ e(Ie, { filled: !0 }),
|
|
552
|
+
_.details_add_account
|
|
553
|
+
] }) }),
|
|
554
|
+
/* @__PURE__ */ e(z, { color: "primary" })
|
|
555
|
+
] }) }) : /* @__PURE__ */ c(f, { sx: { gap: 8, my: 24, mx: 24 }, children: [
|
|
556
|
+
/* @__PURE__ */ e(me, { onClick: () => o(!0), variant: "text", children: _.details_change_account }),
|
|
557
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { textAlign: "center" }, variant: "subtitle1", children: B(_.details_change_account_description, t.name) })
|
|
558
|
+
] }),
|
|
559
|
+
/* @__PURE__ */ e(q, { isOpen: a, onClose: () => o(!1), title: _.details_change_account, children: /* @__PURE__ */ c(f, { children: [
|
|
560
|
+
n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: d.account_types[1] }),
|
|
561
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: n.map((l) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(L, { onClick: () => b(l), children: [
|
|
562
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
563
|
+
X,
|
|
564
|
+
{
|
|
565
|
+
alt: l?.name || "",
|
|
566
|
+
institutionGuid: l?.institution_guid || ""
|
|
567
|
+
}
|
|
568
|
+
) }),
|
|
569
|
+
/* @__PURE__ */ e(
|
|
570
|
+
w,
|
|
571
|
+
{
|
|
572
|
+
primary: l?.name || l?.feed_name,
|
|
573
|
+
secondary: I(l?.balance || 0, "0,0.00")
|
|
574
|
+
}
|
|
575
|
+
),
|
|
576
|
+
/* @__PURE__ */ e(z, {})
|
|
577
|
+
] }) }, l.guid)) }),
|
|
578
|
+
u.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: d.account_types[2] }),
|
|
579
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "background.paper" }, children: u.map((l) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ c(L, { onClick: () => b(l), children: [
|
|
580
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
581
|
+
X,
|
|
582
|
+
{
|
|
583
|
+
alt: l?.name || "",
|
|
584
|
+
institutionGuid: l?.institution_guid || ""
|
|
585
|
+
}
|
|
586
|
+
) }),
|
|
587
|
+
/* @__PURE__ */ e(
|
|
588
|
+
w,
|
|
589
|
+
{
|
|
590
|
+
primary: l?.name || l?.feed_name,
|
|
591
|
+
secondary: I(l?.balance || 0, "0,0.00")
|
|
592
|
+
}
|
|
593
|
+
),
|
|
594
|
+
/* @__PURE__ */ e(z, {})
|
|
595
|
+
] }) }, l.guid)) }),
|
|
596
|
+
i.show_connections_widget_in_master && /* @__PURE__ */ e(
|
|
597
|
+
De,
|
|
598
|
+
{
|
|
599
|
+
description: _.connect_description,
|
|
600
|
+
label: _.connect_button,
|
|
601
|
+
title: _.connect_title
|
|
602
|
+
}
|
|
603
|
+
)
|
|
604
|
+
] }) })
|
|
605
|
+
] });
|
|
606
|
+
}, Nt = D(({ goal: t }) => {
|
|
607
|
+
const { goals: n } = x(), { setAlert: u, setSelectedGoal: d, updateGoal: _ } = N(), [i, m] = T.useState(t.name), p = !t.guid, s = t.track_type === r.SAVINGS_TRACK && t.has_been_spent || t.track_type !== r.SAVINGS_TRACK && t.is_complete, h = async () => {
|
|
608
|
+
const o = { ...t, name: i };
|
|
609
|
+
t.name = i, p ? d(o) : (await _(o), u(n.alert_goal_updated_name));
|
|
610
|
+
}, a = () => {
|
|
728
611
|
setTimeout(() => {
|
|
729
612
|
m(t.name);
|
|
730
613
|
}, 250);
|
|
731
614
|
};
|
|
732
|
-
return /* @__PURE__ */ e(
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
onSave: h,
|
|
738
|
-
primaryText: n.details_goal_name,
|
|
739
|
-
secondaryText: t.name,
|
|
740
|
-
children: /* @__PURE__ */ e(Me, {
|
|
741
|
-
error: !o,
|
|
742
|
-
fullWidth: !0,
|
|
615
|
+
return /* @__PURE__ */ e(
|
|
616
|
+
Z,
|
|
617
|
+
{
|
|
618
|
+
isDisabled: s,
|
|
619
|
+
isSaveDisabled: !i,
|
|
743
620
|
label: n.details_goal_name,
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
621
|
+
onCancel: a,
|
|
622
|
+
onSave: h,
|
|
623
|
+
primaryText: n.details_goal_name,
|
|
624
|
+
secondaryText: t.name,
|
|
625
|
+
children: /* @__PURE__ */ e(
|
|
626
|
+
Ke,
|
|
627
|
+
{
|
|
628
|
+
error: !i,
|
|
629
|
+
fullWidth: !0,
|
|
630
|
+
label: n.details_goal_name,
|
|
631
|
+
onChange: (o) => m(o.target.value),
|
|
632
|
+
value: i
|
|
633
|
+
}
|
|
634
|
+
)
|
|
635
|
+
}
|
|
636
|
+
);
|
|
748
637
|
}), kt = ({ goal: t }) => {
|
|
749
|
-
const { goals: n } =
|
|
750
|
-
if (!isNaN(
|
|
751
|
-
const
|
|
752
|
-
|
|
753
|
-
retirement_age: o
|
|
754
|
-
};
|
|
755
|
-
t.retirement_age = o, p ? d(a) : (await _(a), u(n.alert_goal_updated_retirement_age));
|
|
638
|
+
const { goals: n } = x(), { setAlert: u, setSelectedGoal: d, updateRetirementGoal: _ } = N(), [i, m] = T.useState(t.retirement_age || 65), p = !t.guid, s = async () => {
|
|
639
|
+
if (!isNaN(i)) {
|
|
640
|
+
const o = { ...t, retirement_age: i };
|
|
641
|
+
t.retirement_age = i, p ? d(o) : (await _(o), u(n.alert_goal_updated_retirement_age));
|
|
756
642
|
}
|
|
757
643
|
}, h = () => {
|
|
758
644
|
setTimeout(() => {
|
|
759
645
|
m(t.retirement_age || 65);
|
|
760
646
|
}, 250);
|
|
761
|
-
},
|
|
762
|
-
return /* @__PURE__ */ e(
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
onSave: s,
|
|
768
|
-
primaryText: n.details_retirement_age,
|
|
769
|
-
secondaryText: `${t.retirement_age}`,
|
|
770
|
-
zeroStateText: p && !t.retirement_age ? n.add_age : void 0,
|
|
771
|
-
children: /* @__PURE__ */ e(Me, {
|
|
772
|
-
error: i,
|
|
773
|
-
fullWidth: !0,
|
|
647
|
+
}, a = !i || isNaN(i) || i < 20 || i >= 100;
|
|
648
|
+
return /* @__PURE__ */ e(
|
|
649
|
+
Z,
|
|
650
|
+
{
|
|
651
|
+
isDisabled: t.is_complete,
|
|
652
|
+
isSaveDisabled: a,
|
|
774
653
|
label: n.details_retirement_age,
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
654
|
+
onCancel: h,
|
|
655
|
+
onSave: s,
|
|
656
|
+
primaryText: n.details_retirement_age,
|
|
657
|
+
secondaryText: `${t.retirement_age}`,
|
|
658
|
+
zeroStateText: p && !t.retirement_age ? n.add_age : void 0,
|
|
659
|
+
children: /* @__PURE__ */ e(
|
|
660
|
+
Ke,
|
|
661
|
+
{
|
|
662
|
+
error: a,
|
|
663
|
+
fullWidth: !0,
|
|
664
|
+
label: n.details_retirement_age,
|
|
665
|
+
onChange: (o) => m(Number(o.target.value)),
|
|
666
|
+
value: isNaN(i) ? "" : i
|
|
667
|
+
}
|
|
668
|
+
)
|
|
669
|
+
}
|
|
670
|
+
);
|
|
671
|
+
}, wt = D(({ goal: t }) => {
|
|
672
|
+
const { goals: n } = x(), { user: u, updateUser: d } = Ge(), { setAlert: _ } = N(), [i, m] = T.useState(ee(u.birthday ?? 0)), [p, s] = T.useState(null), h = t.is_complete, a = async () => {
|
|
673
|
+
i && dt(i) && (await d({ ...u, birthday: lt(i) }), _(n.alert_goal_updated_birthday));
|
|
785
674
|
};
|
|
786
|
-
return /* @__PURE__ */ e(
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
children: /* @__PURE__ */ e(
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
675
|
+
return /* @__PURE__ */ e(
|
|
676
|
+
Z,
|
|
677
|
+
{
|
|
678
|
+
isDisabled: h,
|
|
679
|
+
isSaveDisabled: !!p,
|
|
680
|
+
label: n.details_birthday,
|
|
681
|
+
onSave: a,
|
|
682
|
+
primaryText: n.details_birthday,
|
|
683
|
+
secondaryText: `${be(ee(u.birthday ?? 0), fe.MONTH_DAY_YEAR)}`,
|
|
684
|
+
zeroStateText: !t.guid && !u.birthday ? n.add_birthday : void 0,
|
|
685
|
+
children: /* @__PURE__ */ e(_t, { dateAdapter: mt, children: /* @__PURE__ */ e(
|
|
686
|
+
ut,
|
|
687
|
+
{
|
|
688
|
+
label: n.details_birthday,
|
|
689
|
+
onChange: m,
|
|
690
|
+
onError: (o) => s(o),
|
|
691
|
+
sx: { width: "100%" },
|
|
692
|
+
value: i
|
|
693
|
+
}
|
|
694
|
+
) })
|
|
695
|
+
}
|
|
696
|
+
);
|
|
697
|
+
}), Dt = ({ goal: t }) => {
|
|
698
|
+
const { goals: n } = x(), { visibleRetirementAccounts: u } = j(), {
|
|
699
|
+
addRetirementGoalAccount: d,
|
|
700
|
+
newRetirementGoalAccounts: _,
|
|
701
|
+
retirementGoalAccounts: i,
|
|
702
|
+
selectedGoal: m,
|
|
703
|
+
setAlert: p,
|
|
704
|
+
setNewRetirementGoalAccounts: s,
|
|
705
|
+
setSelectedGoal: h
|
|
706
|
+
} = N(), [a, o] = T.useState(!1), b = !t.guid, l = u.filter(
|
|
707
|
+
(g) => b ? _.find((A) => A.account_guid === g.guid) : i.find((A) => A.account_guid === g.guid)
|
|
708
|
+
), y = u.filter(
|
|
709
|
+
(g) => !i.find((A) => A.account_guid === g.guid)
|
|
710
|
+
), E = async (g) => {
|
|
711
|
+
const A = g.map((R) => ({
|
|
712
|
+
account_guid: R.guid,
|
|
809
713
|
retirement_goal_guid: t.guid
|
|
810
714
|
}));
|
|
811
|
-
if (b)
|
|
812
|
-
|
|
813
|
-
|
|
715
|
+
if (b)
|
|
716
|
+
s(A);
|
|
717
|
+
else
|
|
718
|
+
for (const R of A)
|
|
719
|
+
await d(R), p(n.alert_account_added);
|
|
814
720
|
h({
|
|
815
721
|
...m,
|
|
816
|
-
current_amount:
|
|
817
|
-
}),
|
|
722
|
+
current_amount: g.reduce((R, G) => R + (G.balance || 0), 0)
|
|
723
|
+
}), o(!1);
|
|
818
724
|
};
|
|
819
|
-
return /* @__PURE__ */ c(
|
|
820
|
-
l.map((
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
children: /* @__PURE__ */ c(
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
title: n.add_select_accounts
|
|
842
|
-
})
|
|
725
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
726
|
+
l.map((g) => /* @__PURE__ */ c(f, { children: [
|
|
727
|
+
/* @__PURE__ */ e(We, { account: g }),
|
|
728
|
+
/* @__PURE__ */ e(v, {})
|
|
729
|
+
] }, g.guid)),
|
|
730
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ c(L, { onClick: () => o(!0), children: [
|
|
731
|
+
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ c(f, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
732
|
+
/* @__PURE__ */ e(Ie, { filled: !0 }),
|
|
733
|
+
n.details_add_account
|
|
734
|
+
] }) }),
|
|
735
|
+
/* @__PURE__ */ e(z, { color: "primary" })
|
|
736
|
+
] }) }),
|
|
737
|
+
/* @__PURE__ */ e(
|
|
738
|
+
Be,
|
|
739
|
+
{
|
|
740
|
+
accounts: y,
|
|
741
|
+
isOpen: a,
|
|
742
|
+
onClose: () => o(!1),
|
|
743
|
+
onSave: E,
|
|
744
|
+
title: n.add_select_accounts
|
|
745
|
+
}
|
|
746
|
+
)
|
|
843
747
|
] });
|
|
844
|
-
},
|
|
845
|
-
const { goals: n } =
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
slotProps: { primary: { variant: "body1" } }
|
|
897
|
-
})
|
|
898
|
-
}),
|
|
899
|
-
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
900
|
-
(_ === r.SAVINGS_TRACK || _ === r.RETIREMENT_TRACK) && /* @__PURE__ */ c(F, { children: [/* @__PURE__ */ e(It, { goal: t }), /* @__PURE__ */ e(E, { sx: { ml: _ === r.RETIREMENT_TRACK ? 24 : 0 } })] }),
|
|
901
|
-
t.track_type === r.DEBT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
902
|
-
/* @__PURE__ */ e(Je, { goal: t }),
|
|
903
|
-
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
904
|
-
/* @__PURE__ */ e(Xe, { goal: t }),
|
|
905
|
-
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
906
|
-
/* @__PURE__ */ e(Qe, { goal: t }),
|
|
907
|
-
/* @__PURE__ */ e(E, { variant: "fullWidth" })
|
|
908
|
-
] }),
|
|
909
|
-
t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
910
|
-
/* @__PURE__ */ e(kt, { goal: t }),
|
|
911
|
-
/* @__PURE__ */ e(E, { sx: { ml: 24 } }),
|
|
912
|
-
/* @__PURE__ */ e(wt, { goal: t }),
|
|
913
|
-
/* @__PURE__ */ e(E, { variant: "fullWidth" })
|
|
914
|
-
] })
|
|
915
|
-
]
|
|
916
|
-
}),
|
|
917
|
-
/* @__PURE__ */ e(C, {
|
|
918
|
-
color: "text.secondary",
|
|
919
|
-
sx: {
|
|
920
|
-
mb: 4,
|
|
921
|
-
ml: 24,
|
|
922
|
-
mt: 12
|
|
923
|
-
},
|
|
924
|
-
variant: "caption",
|
|
925
|
-
children: t.track_type === r.RETIREMENT_TRACK ? n.details_accounts : n.details_account
|
|
926
|
-
}),
|
|
927
|
-
t.track_type !== r.RETIREMENT_TRACK && d && /* @__PURE__ */ c(F, { children: [/* @__PURE__ */ e(We, { account: d }), /* @__PURE__ */ e(E, {})] }),
|
|
928
|
-
t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c(F, { children: [/* @__PURE__ */ e(Kt, { goal: t }), /* @__PURE__ */ e(E, {})] }),
|
|
748
|
+
}, Kt = D(({ goal: t }) => {
|
|
749
|
+
const { goals: n } = x(), { visibleAccounts: u } = j(), d = T.useMemo(
|
|
750
|
+
() => u.find((m) => m.guid === t.account_guid),
|
|
751
|
+
[u, t]
|
|
752
|
+
), _ = t.track_type;
|
|
753
|
+
let i = n.details_save_title;
|
|
754
|
+
return t.track_type === r.DEBT_TRACK ? i = n.details_debt_title : t.track_type === r.RETIREMENT_TRACK && (i = n.details_retirement_title), /* @__PURE__ */ c(f, { children: [
|
|
755
|
+
/* @__PURE__ */ c(f, { mx: 24, children: [
|
|
756
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: i }),
|
|
757
|
+
/* @__PURE__ */ e(Oe, { goal: t, isInDrawer: !0 }),
|
|
758
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "caption", children: n.details_title })
|
|
759
|
+
] }),
|
|
760
|
+
/* @__PURE__ */ c(O, { sx: { bgcolor: "background.paper" }, children: [
|
|
761
|
+
_ !== r.RETIREMENT_TRACK ? /* @__PURE__ */ e(Nt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
762
|
+
w,
|
|
763
|
+
{
|
|
764
|
+
primary: /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
765
|
+
/* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
|
|
766
|
+
/* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
|
|
767
|
+
] }),
|
|
768
|
+
slotProps: { primary: { variant: "body1" } }
|
|
769
|
+
}
|
|
770
|
+
) }),
|
|
771
|
+
/* @__PURE__ */ e(v, { sx: { ml: 24 } }),
|
|
772
|
+
(_ === r.SAVINGS_TRACK || _ === r.RETIREMENT_TRACK) && /* @__PURE__ */ c(F, { children: [
|
|
773
|
+
/* @__PURE__ */ e(It, { goal: t }),
|
|
774
|
+
/* @__PURE__ */ e(v, { sx: { ml: _ === r.RETIREMENT_TRACK ? 24 : 0 } })
|
|
775
|
+
] }),
|
|
776
|
+
t.track_type === r.DEBT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
777
|
+
/* @__PURE__ */ e(rt, { goal: t }),
|
|
778
|
+
/* @__PURE__ */ e(v, { sx: { ml: 24 } }),
|
|
779
|
+
/* @__PURE__ */ e(st, { goal: t }),
|
|
780
|
+
/* @__PURE__ */ e(v, { sx: { ml: 24 } }),
|
|
781
|
+
/* @__PURE__ */ e(ct, { goal: t }),
|
|
782
|
+
/* @__PURE__ */ e(v, { variant: "fullWidth" })
|
|
783
|
+
] }),
|
|
784
|
+
t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
785
|
+
/* @__PURE__ */ e(kt, { goal: t }),
|
|
786
|
+
/* @__PURE__ */ e(v, { sx: { ml: 24 } }),
|
|
787
|
+
/* @__PURE__ */ e(wt, { goal: t }),
|
|
788
|
+
/* @__PURE__ */ e(v, { variant: "fullWidth" })
|
|
789
|
+
] })
|
|
790
|
+
] }),
|
|
791
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "caption", children: t.track_type === r.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
|
|
792
|
+
t.track_type !== r.RETIREMENT_TRACK && d && /* @__PURE__ */ c(F, { children: [
|
|
793
|
+
/* @__PURE__ */ e(We, { account: d }),
|
|
794
|
+
/* @__PURE__ */ e(v, {})
|
|
795
|
+
] }),
|
|
796
|
+
t.track_type === r.RETIREMENT_TRACK && /* @__PURE__ */ c(F, { children: [
|
|
797
|
+
/* @__PURE__ */ e(Dt, { goal: t }),
|
|
798
|
+
/* @__PURE__ */ e(v, {})
|
|
799
|
+
] }),
|
|
929
800
|
t.track_type === r.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(Gt, { goal: t })
|
|
930
801
|
] });
|
|
931
|
-
}), Mt =
|
|
932
|
-
const { visibleRetirementAccounts: n } = j(), { goals: u, common: d } =
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
802
|
+
}), Mt = D(({ onClose: t }) => {
|
|
803
|
+
const { visibleRetirementAccounts: n } = j(), { goals: u, common: d } = x(), {
|
|
804
|
+
addGoal: _,
|
|
805
|
+
addRetirementGoal: i,
|
|
806
|
+
deleteGoal: m,
|
|
807
|
+
deleteRetirementGoal: p,
|
|
808
|
+
newRetirementGoalAccounts: s,
|
|
809
|
+
retirementGoalAccounts: h,
|
|
810
|
+
selectedGoal: a,
|
|
811
|
+
setAlert: o,
|
|
812
|
+
setSelectedGoal: b,
|
|
813
|
+
updateGoal: l
|
|
814
|
+
} = N(), { user: y } = Ge(), [E, g] = T.useState(!1), A = !a?.guid, R = a?.track_type === r.SAVINGS_TRACK && a.is_complete && !a.has_been_spent, G = T.useMemo(() => {
|
|
815
|
+
const S = A ? s : h;
|
|
816
|
+
return n.filter((V) => S.some((M) => M.account_guid === V.guid));
|
|
817
|
+
}, [A, n, s, h]), K = T.useMemo(() => {
|
|
818
|
+
if (!a) return !1;
|
|
819
|
+
if (!A && !R) return !0;
|
|
820
|
+
const { account_guid: S, track_type: V, name: M, amount: J, retirement_age: ie } = a;
|
|
821
|
+
return V === r.SAVINGS_TRACK ? S ? !!M && !!J : !1 : V === r.RETIREMENT_TRACK ? G.length ? !!M && !!J && !!ie && !!y.birthday : !1 : !0;
|
|
822
|
+
}, [a, G, y.birthday]);
|
|
823
|
+
let W = d.delete_button, H = () => g(!0);
|
|
824
|
+
A ? (H = () => ne(), W = d.save_button) : R && (H = () => ae(), W = u.mark_as_complete_button);
|
|
952
825
|
const ne = async () => {
|
|
953
|
-
if (
|
|
954
|
-
const
|
|
955
|
-
|
|
956
|
-
...i,
|
|
957
|
-
target_amount: i.amount
|
|
958
|
-
}), a(u.alert_goal_added), b(void 0), I && t?.(I);
|
|
826
|
+
if (a) {
|
|
827
|
+
const S = a.track_type;
|
|
828
|
+
S !== r.RETIREMENT_TRACK ? await _(a) : S === r.RETIREMENT_TRACK && await i({ ...a, target_amount: a.amount }), o(u.alert_goal_added), b(void 0), S && t?.(S);
|
|
959
829
|
}
|
|
830
|
+
}, oe = async () => {
|
|
831
|
+
a && (a.track_type !== r.RETIREMENT_TRACK ? await m(a.guid) : a.track_type === r.RETIREMENT_TRACK && await p(a), o(u.alert_goal_deleted), b(void 0));
|
|
960
832
|
}, ae = async () => {
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
await l({
|
|
964
|
-
...i,
|
|
833
|
+
const S = {
|
|
834
|
+
...a,
|
|
965
835
|
has_been_spent: !0
|
|
966
|
-
}
|
|
836
|
+
};
|
|
837
|
+
await l(S), o(u.alert_goal_completed), b(void 0);
|
|
967
838
|
};
|
|
968
|
-
return /* @__PURE__ */ c(
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
|
|
839
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
840
|
+
/* @__PURE__ */ e(
|
|
841
|
+
q,
|
|
842
|
+
{
|
|
843
|
+
ariaLabelClose: d.close_aria,
|
|
844
|
+
hasSecondaryAction: A,
|
|
845
|
+
isOpen: !!a,
|
|
846
|
+
isPrimaryDisabled: !K,
|
|
847
|
+
onClose: () => b(void 0),
|
|
848
|
+
onPrimaryAction: H,
|
|
849
|
+
primaryColor: A || R ? "primary" : "error",
|
|
850
|
+
primaryText: W,
|
|
851
|
+
secondaryColor: "primary",
|
|
852
|
+
title: u.goal_details,
|
|
853
|
+
children: a && /* @__PURE__ */ e(Kt, { goal: a })
|
|
854
|
+
}
|
|
855
|
+
),
|
|
856
|
+
/* @__PURE__ */ e(
|
|
857
|
+
pt,
|
|
858
|
+
{
|
|
859
|
+
copy: { close_aria: d.close_aria, title: u.delete_goal },
|
|
860
|
+
isOpen: E,
|
|
861
|
+
maxWidth: "xs",
|
|
862
|
+
onClose: () => g(!1),
|
|
863
|
+
onPrimaryAction: oe,
|
|
864
|
+
primaryColor: "error",
|
|
865
|
+
primaryText: d.delete_button,
|
|
866
|
+
children: /* @__PURE__ */ e(C, { variant: "subtitle1", children: B(u.delete_description, a?.name || "") })
|
|
867
|
+
}
|
|
868
|
+
)
|
|
869
|
+
] });
|
|
870
|
+
}), jn = D(({ onBackClick: t, onMenuClick: n, sx: u }) => {
|
|
871
|
+
const { onEvent: d } = Ne(), { isMobile: _ } = he(), { isAccountDataLoaded: i, loadAccountData: m } = j(), { isInitialized: p } = _e(), { goals: s, common: h } = x(), {
|
|
872
|
+
alert: a,
|
|
873
|
+
allGoals: o,
|
|
874
|
+
goals: b,
|
|
875
|
+
isAllGoalDataLoaded: l,
|
|
876
|
+
loadGoalData: y,
|
|
877
|
+
monthlyCashFlowProfile: E,
|
|
878
|
+
setAlert: g,
|
|
879
|
+
retirmentGoals: A
|
|
880
|
+
} = N(), [R, G] = T.useState(0), [K, W] = T.useState(!1), H = E?.amount_allocated_for_savings_goals || 0, ne = E?.amount_allocated_for_debt_goals || 0, oe = E?.amount_allocated_for_retirement_goals || 0;
|
|
881
|
+
Me({
|
|
999
882
|
widgetName: "GoalsWidget",
|
|
1000
883
|
isLoaded: l
|
|
1001
884
|
}), T.useEffect(() => {
|
|
1002
|
-
|
|
885
|
+
i || m().finally(), d($.GOALS_VIEW);
|
|
1003
886
|
}, []), T.useEffect(() => {
|
|
1004
|
-
p &&
|
|
887
|
+
p && y().finally();
|
|
1005
888
|
}, [p]);
|
|
1006
|
-
const
|
|
889
|
+
const ae = () => {
|
|
1007
890
|
d($.GOALS_CLICK_FILTER);
|
|
1008
|
-
},
|
|
891
|
+
}, S = () => {
|
|
1009
892
|
W(!0), d($.GOALS_CLICK_ADD);
|
|
1010
|
-
}, V = (
|
|
1011
|
-
W(!1),
|
|
1012
|
-
}, M = T.useMemo(
|
|
1013
|
-
|
|
1014
|
-
l,
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
const J = B(
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
893
|
+
}, V = (Q) => {
|
|
894
|
+
W(!1), Q === r.SAVINGS_TRACK ? G(0) : Q === r.DEBT_TRACK ? G(1) : Q === r.RETIREMENT_TRACK && G(2);
|
|
895
|
+
}, M = T.useMemo(
|
|
896
|
+
() => l && o.length === 0,
|
|
897
|
+
[b, l, A]
|
|
898
|
+
);
|
|
899
|
+
if (!p || !l)
|
|
900
|
+
return /* @__PURE__ */ e(Le, {});
|
|
901
|
+
const J = B(
|
|
902
|
+
_ ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
903
|
+
I(H, "0,0")
|
|
904
|
+
), ie = B(
|
|
905
|
+
_ ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
906
|
+
I(ne, "0,0")
|
|
907
|
+
), Ve = B(
|
|
908
|
+
_ ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
909
|
+
I(oe, "0,0")
|
|
910
|
+
);
|
|
911
|
+
return /* @__PURE__ */ c(
|
|
912
|
+
ht,
|
|
913
|
+
{
|
|
914
|
+
actions: [
|
|
915
|
+
{
|
|
916
|
+
iconName: "add",
|
|
917
|
+
label: s.add_title,
|
|
918
|
+
onClick: S
|
|
919
|
+
}
|
|
920
|
+
],
|
|
921
|
+
onAccountsFilterClick: ae,
|
|
922
|
+
onBackClick: t,
|
|
923
|
+
onMenuClick: n,
|
|
924
|
+
sx: u,
|
|
925
|
+
title: s.title,
|
|
926
|
+
children: [
|
|
927
|
+
/* @__PURE__ */ c(f, { mx: _ ? 0 : 48, my: 24, children: [
|
|
928
|
+
/* @__PURE__ */ c(
|
|
929
|
+
Fe,
|
|
930
|
+
{
|
|
931
|
+
onChange: (Q, ze) => G(ze),
|
|
932
|
+
sx: { bgcolor: "background.paper" },
|
|
933
|
+
textColor: "primary",
|
|
934
|
+
value: M ? !1 : R,
|
|
935
|
+
variant: "fullWidth",
|
|
936
|
+
children: [
|
|
937
|
+
/* @__PURE__ */ e(
|
|
938
|
+
re,
|
|
939
|
+
{
|
|
940
|
+
disabled: M,
|
|
941
|
+
label: /* @__PURE__ */ e(se, { subtitle: J, title: s.tab_saving_title })
|
|
942
|
+
}
|
|
943
|
+
),
|
|
944
|
+
/* @__PURE__ */ e(
|
|
945
|
+
re,
|
|
946
|
+
{
|
|
947
|
+
disabled: M,
|
|
948
|
+
label: /* @__PURE__ */ e(se, { subtitle: ie, title: s.tab_debt_title })
|
|
949
|
+
}
|
|
950
|
+
),
|
|
951
|
+
/* @__PURE__ */ e(
|
|
952
|
+
re,
|
|
953
|
+
{
|
|
954
|
+
disabled: M,
|
|
955
|
+
label: /* @__PURE__ */ e(se, { subtitle: Ve, title: s.tab_retirement_title })
|
|
956
|
+
}
|
|
957
|
+
)
|
|
958
|
+
]
|
|
959
|
+
}
|
|
960
|
+
),
|
|
961
|
+
M ? /* @__PURE__ */ e(
|
|
962
|
+
bt,
|
|
963
|
+
{
|
|
964
|
+
header: s.create_goals_header,
|
|
965
|
+
icon: "trophy",
|
|
966
|
+
onClick: S,
|
|
967
|
+
primaryButton: s.add_goals_button,
|
|
968
|
+
subText: s.empty_state_subheader,
|
|
969
|
+
sx: {
|
|
970
|
+
width: { sm: 432 },
|
|
971
|
+
".buttons-footer": {
|
|
972
|
+
width: 139
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
) : /* @__PURE__ */ c(F, { children: [
|
|
977
|
+
R === 0 && /* @__PURE__ */ e(ce, { onAddGoals: S, trackType: r.SAVINGS_TRACK }),
|
|
978
|
+
R === 1 && /* @__PURE__ */ e(ce, { onAddGoals: S, trackType: r.DEBT_TRACK }),
|
|
979
|
+
R === 2 && /* @__PURE__ */ e(ce, { onAddGoals: S, trackType: r.RETIREMENT_TRACK })
|
|
980
|
+
] })
|
|
981
|
+
] }),
|
|
982
|
+
/* @__PURE__ */ e(Mt, { onClose: V }),
|
|
983
|
+
/* @__PURE__ */ e(
|
|
984
|
+
q,
|
|
985
|
+
{
|
|
986
|
+
ariaLabelClose: h.close_aria,
|
|
987
|
+
isOpen: K,
|
|
988
|
+
onClose: () => W(!1),
|
|
989
|
+
title: s.add_goal_title,
|
|
990
|
+
children: /* @__PURE__ */ e(vt, { onClose: V })
|
|
1072
991
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
/* @__PURE__ */ e(
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}),
|
|
1096
|
-
/* @__PURE__ */ e(bt, {
|
|
1097
|
-
onClose: () => y(""),
|
|
1098
|
-
open: !!i,
|
|
1099
|
-
children: /* @__PURE__ */ e(ht, {
|
|
1100
|
-
onClose: () => y(""),
|
|
1101
|
-
severity: "success",
|
|
1102
|
-
variant: "filled",
|
|
1103
|
-
children: i
|
|
1104
|
-
})
|
|
1105
|
-
})
|
|
1106
|
-
]
|
|
1107
|
-
});
|
|
1108
|
-
}), Lt = K(({ goal: t }) => {
|
|
1109
|
-
const { goals: n } = R(), u = rt(), { backgroundColor: d, color: _, percentage: o, projectedText: m } = me(n, t), p = Math.round(o * 100);
|
|
1110
|
-
let s = /* @__PURE__ */ e(ke, {});
|
|
1111
|
-
return t.track_type === r.DEBT_TRACK ? s = /* @__PURE__ */ e(Ne, {}) : t.track_type === r.RETIREMENT_TRACK && (s = /* @__PURE__ */ e(we, {})), /* @__PURE__ */ c(g, {
|
|
1112
|
-
alignItems: "center",
|
|
1113
|
-
direction: "row",
|
|
1114
|
-
spacing: 12,
|
|
1115
|
-
sx: { py: 12 },
|
|
1116
|
-
children: [
|
|
1117
|
-
/* @__PURE__ */ e(te, {
|
|
1118
|
-
sx: {
|
|
1119
|
-
bgcolor: d,
|
|
1120
|
-
color: _,
|
|
1121
|
-
height: 32,
|
|
1122
|
-
width: 32
|
|
1123
|
-
},
|
|
1124
|
-
variant: "rounded",
|
|
1125
|
-
children: s
|
|
1126
|
-
}),
|
|
1127
|
-
/* @__PURE__ */ c(st, {
|
|
1128
|
-
sx: { width: "100%" },
|
|
1129
|
-
children: [/* @__PURE__ */ e(Ie, {
|
|
1130
|
-
fontSize: 15,
|
|
1131
|
-
fontWeight: 600,
|
|
1132
|
-
variant: "body1",
|
|
1133
|
-
children: t.name
|
|
1134
|
-
}), t.projected_to_complete_at && /* @__PURE__ */ e(C, {
|
|
1135
|
-
color: "text.secondary",
|
|
1136
|
-
variant: "caption",
|
|
1137
|
-
children: m
|
|
1138
|
-
})]
|
|
1139
|
-
}),
|
|
1140
|
-
/* @__PURE__ */ e(He, {
|
|
992
|
+
),
|
|
993
|
+
/* @__PURE__ */ e(je, { onClose: () => g(""), open: !!a, children: /* @__PURE__ */ e(Pe, { onClose: () => g(""), severity: "success", variant: "filled", children: a }) })
|
|
994
|
+
]
|
|
995
|
+
}
|
|
996
|
+
);
|
|
997
|
+
}), Lt = D(({ goal: t }) => {
|
|
998
|
+
const { goals: n } = x(), u = gt(), {
|
|
999
|
+
backgroundColor: d,
|
|
1000
|
+
color: _,
|
|
1001
|
+
percentage: i,
|
|
1002
|
+
projectedText: m
|
|
1003
|
+
} = ue(n, t), p = Math.round(i * 100);
|
|
1004
|
+
let s = /* @__PURE__ */ e(Ee, {});
|
|
1005
|
+
return t.track_type === r.DEBT_TRACK ? s = /* @__PURE__ */ e(Se, {}) : t.track_type === r.RETIREMENT_TRACK && (s = /* @__PURE__ */ e(ve, {})), /* @__PURE__ */ c(f, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
|
|
1006
|
+
/* @__PURE__ */ e(te, { sx: { bgcolor: d, color: _, height: 32, width: 32 }, variant: "rounded", children: s }),
|
|
1007
|
+
/* @__PURE__ */ c(ft, { sx: { width: "100%" }, children: [
|
|
1008
|
+
/* @__PURE__ */ e(Te, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
|
|
1009
|
+
t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "caption", children: m })
|
|
1010
|
+
] }),
|
|
1011
|
+
/* @__PURE__ */ e(
|
|
1012
|
+
yt,
|
|
1013
|
+
{
|
|
1141
1014
|
backgroundStrokeColor: u.palette.neutral.light,
|
|
1142
1015
|
color: u.palette.primary.main,
|
|
1143
1016
|
percent: p,
|
|
1144
1017
|
size: 40,
|
|
1145
1018
|
strokeWidth: 3,
|
|
1146
|
-
children: /* @__PURE__ */ e(Y, {
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1019
|
+
children: /* @__PURE__ */ e(Y, { fontWeight: 700, variant: "caption", children: `${p}%` })
|
|
1020
|
+
}
|
|
1021
|
+
)
|
|
1022
|
+
] });
|
|
1023
|
+
}), Ot = ({ header: t, subText: n, sx: u }) => /* @__PURE__ */ c(
|
|
1024
|
+
f,
|
|
1025
|
+
{
|
|
1026
|
+
sx: {
|
|
1027
|
+
alignItems: "center",
|
|
1028
|
+
alignSelf: "center",
|
|
1029
|
+
px: 24,
|
|
1030
|
+
...u
|
|
1031
|
+
},
|
|
1032
|
+
children: [
|
|
1033
|
+
/* @__PURE__ */ e(Je, { size: 32 }),
|
|
1034
|
+
/* @__PURE__ */ e(Te, { fontSize: 15, fontWeight: 600, children: t }),
|
|
1035
|
+
/* @__PURE__ */ e(
|
|
1036
|
+
Y,
|
|
1037
|
+
{
|
|
1038
|
+
color: "text.secondary",
|
|
1039
|
+
sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
|
|
1040
|
+
variant: "subtitle2",
|
|
1041
|
+
children: n
|
|
1042
|
+
}
|
|
1043
|
+
)
|
|
1152
1044
|
]
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
alignSelf: "center",
|
|
1158
|
-
px: 24,
|
|
1159
|
-
...u
|
|
1160
|
-
},
|
|
1161
|
-
children: [
|
|
1162
|
-
/* @__PURE__ */ e(ot, { size: 32 }),
|
|
1163
|
-
/* @__PURE__ */ e(Ie, {
|
|
1164
|
-
fontSize: 15,
|
|
1165
|
-
fontWeight: 600,
|
|
1166
|
-
children: t
|
|
1167
|
-
}),
|
|
1168
|
-
/* @__PURE__ */ e(Y, {
|
|
1169
|
-
color: "text.secondary",
|
|
1170
|
-
sx: {
|
|
1171
|
-
fontWeight: 400,
|
|
1172
|
-
maxWidth: { sm: 424 },
|
|
1173
|
-
textAlign: "center"
|
|
1174
|
-
},
|
|
1175
|
-
variant: "subtitle2",
|
|
1176
|
-
children: n
|
|
1177
|
-
})
|
|
1178
|
-
]
|
|
1179
|
-
}), In = K(({ onCTAClick: t }) => {
|
|
1180
|
-
const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: d } = j(), { onEvent: _ } = Ee(), { goals: o } = R(), { isInitialized: m } = he(), { ongoingGoalsForMicroWidget: p, isAllGoalDataLoaded: s, loadGoalData: h } = N();
|
|
1181
|
-
Re({
|
|
1045
|
+
}
|
|
1046
|
+
), Fn = D(({ onCTAClick: t }) => {
|
|
1047
|
+
const { isAccountDataLoaded: n, loadAccountData: u, visibleAccounts: d } = j(), { onEvent: _ } = Ne(), { goals: i } = x(), { isInitialized: m } = _e(), { ongoingGoalsForMicroWidget: p, isAllGoalDataLoaded: s, loadGoalData: h } = N();
|
|
1048
|
+
Me({
|
|
1182
1049
|
widgetName: "GoalsMicroWidget",
|
|
1183
1050
|
isLoaded: s
|
|
1184
1051
|
}), T.useEffect(() => {
|
|
1185
1052
|
n || u().finally();
|
|
1186
1053
|
}, []), T.useEffect(() => {
|
|
1187
|
-
m && (h().finally(), _($.GOALS_LOAD_WIDGET, {
|
|
1054
|
+
m && (h().finally(), _($.GOALS_LOAD_WIDGET, {
|
|
1055
|
+
state: d?.length ? "default" : "zeroState"
|
|
1056
|
+
}));
|
|
1188
1057
|
}, [m]);
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1058
|
+
const a = T.useMemo(
|
|
1059
|
+
() => s && p.length === 0,
|
|
1060
|
+
[p, s]
|
|
1061
|
+
), o = () => {
|
|
1062
|
+
_(
|
|
1063
|
+
a ? $.GOALS_CLICK_GET_STARTED : $.GOALS_CLICK_VIEW_DETAILS
|
|
1064
|
+
), t();
|
|
1191
1065
|
};
|
|
1192
|
-
return !m || !s ? /* @__PURE__ */ e(
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1066
|
+
return !m || !s ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
1067
|
+
At,
|
|
1068
|
+
{
|
|
1069
|
+
className: "mx-goals-microwidget",
|
|
1070
|
+
ctaLabel: a ? i.get_started : i.view_details,
|
|
1071
|
+
onCTAClick: o,
|
|
1072
|
+
title: i.title,
|
|
1073
|
+
children: a ? /* @__PURE__ */ e(
|
|
1074
|
+
Ot,
|
|
1075
|
+
{
|
|
1076
|
+
header: i.create_goals_header,
|
|
1077
|
+
subText: i.micro_zero_state_description
|
|
1078
|
+
}
|
|
1079
|
+
) : /* @__PURE__ */ e(f, { sx: { justifyContent: "space-between" }, children: p.map((b, l) => /* @__PURE__ */ c(T.Fragment, { children: [
|
|
1080
|
+
/* @__PURE__ */ e(Lt, { goal: b }),
|
|
1081
|
+
l !== p.length - 1 && /* @__PURE__ */ e(v, {})
|
|
1082
|
+
] }, b.guid)) })
|
|
1083
|
+
}
|
|
1084
|
+
);
|
|
1205
1085
|
});
|
|
1206
1086
|
export {
|
|
1207
|
-
|
|
1208
|
-
|
|
1087
|
+
Fn as GoalsMicroWidget,
|
|
1088
|
+
jn as GoalsWidget
|
|
1209
1089
|
};
|
|
1090
|
+
//# sourceMappingURL=index.es.js.map
|