@mx-cartographer/experiences 7.8.2-alpha.mm0 → 7.9.1-alpha.mega1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/{AccountDetailsHeader-Cf2TUJnM.mjs → AccountDetailsHeader-3ZD1Of4i.mjs} +19 -19
- package/dist/{AccountFields-UdOvbQ5H.mjs → AccountFields-CiofAlEI.mjs} +2 -2
- package/dist/{AccountListItem-BPVxmNT_.mjs → AccountListItem-CvYjSc-O.mjs} +3 -3
- package/dist/{AccountStore-BbPWe2C9.mjs → AccountStore-DxfUstUk.mjs} +1 -1
- package/dist/{BudgetUtil-BmZXkL0C.mjs → BudgetUtil-CrAD2kHT.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-cQKX5dZb.mjs → CategorySelectorDrawer-euTDUflY.mjs} +3 -3
- package/dist/{CategoryStore-BYICdb9m.mjs → CategoryStore-CqSW9TsW.mjs} +1 -1
- package/dist/{CategoryUtil-meuejJqP.mjs → CategoryUtil-CCY_tiFg.mjs} +1 -1
- package/dist/{ConnectionsDrawer-BDpVTTSe.mjs → ConnectionsDrawer-GcyfM8yJ.mjs} +6 -6
- package/dist/{CurrencyInput-itK0R3wV.mjs → CurrencyInput-BBifPjuC.mjs} +6 -6
- package/dist/{DateUtil-D7U-nc1Y.mjs → DateUtil-gRDTwAoC.mjs} +1 -1
- package/dist/{Dialog-B4PI-_bL.mjs → Dialog-CwiqpTGe.mjs} +4 -4
- package/dist/{Donut-Dmy3JTWd.mjs → Donut-DKY8mL3P.mjs} +2 -2
- package/dist/{ExportCsvAction-CDuzTva1.mjs → ExportCsvAction-BMWhHM8W.mjs} +3 -3
- package/dist/{FinstrongStore-bEn_im_e.mjs → FinstrongStore-DuvM8Gfg.mjs} +6 -6
- package/dist/{GlobalAccountFilter-DQCPNc95.mjs → GlobalAccountFilter-xZ4Z8AE-.mjs} +11 -11
- package/dist/{GoalStore-B4LVt_kH.mjs → GoalStore-2UZjY0z_.mjs} +3 -3
- package/dist/{Help-DhcC-C05.mjs → Help-B8mD4aLJ.mjs} +2 -2
- package/dist/{Help-DODxp9uw.mjs → Help-C0hzCqyd.mjs} +2 -2
- package/dist/{LineChart-kFoTu9Pi.mjs → LineChart-CfkLqqXU.mjs} +1 -1
- package/dist/{ListItemAction-CU42h39I.mjs → ListItemAction-pvmKK9RU.mjs} +6 -6
- package/dist/{ManageIncome-Da1ktIdG.mjs → ManageIncome-KIBMKnI6.mjs} +82 -86
- package/dist/{MicroWidgetContainer-B2hO9rOG.mjs → MicroWidgetContainer-CX0qZ57D.mjs} +2 -2
- package/dist/{MiniWidgetContainer-98-hKFqm.mjs → MiniWidgetContainer-BHk-RlKA.mjs} +2 -2
- package/dist/{NotificationSettings-SPg3pwbX.mjs → NotificationSettings-DeLwFzIJ.mjs} +81 -81
- package/dist/{OriginalBalanceAction-ChGGq5AH.mjs → OriginalBalanceAction-CQzvRZ7u.mjs} +3 -3
- package/dist/{RecurringSettings-B4sByhIM.mjs → RecurringSettings-CvQSL1ny.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-BQBEJOPP.mjs → RecurringTransactionsStore-DMKtMn2C.mjs} +1 -1
- package/dist/{RepeatingTransaction-miZVnk_A.mjs → RepeatingTransaction-C5AV8wLs.mjs} +2 -2
- package/dist/{SpendingData-BmL0bwnS.mjs → SpendingData-DtNL2mQL.mjs} +1 -1
- package/dist/{SpendingLegend-CD60HCYS.mjs → SpendingLegend-DCQtF8Wf.mjs} +22 -22
- package/dist/{TransactionDetails-B9NQYa6j.mjs → TransactionDetails-CuviEVDJ.mjs} +8 -8
- package/dist/{TransactionStore-BSp5bOKg.mjs → TransactionStore-DhG1AyOA.mjs} +3 -3
- package/dist/{TrendsStore-DXQnmdc8.mjs → TrendsStore-C6mrxcHX.mjs} +1 -1
- package/dist/{User-B0LnmiKO.mjs → User-CCYFbd5i.mjs} +14 -14
- package/dist/{ViewMoreMicroCard-DQhcjIOS.mjs → ViewMoreMicroCard-B8C76vIW.mjs} +2 -2
- package/dist/{WidgetContainer-CYdQ0BSm.mjs → WidgetContainer-AuyAcUXL.mjs} +150 -153
- package/dist/accounts/index.es.js +17 -17
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/index.es.js +12 -12
- package/dist/cashflow/index.es.js +11 -11
- package/dist/categories/index.es.js +2 -2
- package/dist/common/index.es.js +33 -34
- package/dist/common/types/AppData.d.ts +0 -1
- package/dist/dashboard/index.es.js +7 -7
- package/dist/debts/index.es.js +8 -8
- package/dist/{exportTransactionsToCSV-DtQ7ovAR.mjs → exportTransactionsToCSV-DNbCbq9P.mjs} +2 -2
- package/dist/finstrong/index.es.js +17 -17
- package/dist/goals/components/managegoals/OngoingListItem.d.ts +2 -1
- package/dist/goals/index.es.js +545 -640
- package/dist/help/index.es.js +4 -4
- package/dist/{hooks-ZMp65DFz.mjs → hooks-BUCn6FeJ.mjs} +8 -8
- package/dist/insights-ui/components/index.d.ts +39 -0
- package/dist/insights-ui/components/insights/AccountDiscoverability/AccountDiscoverability.d.ts +3 -0
- package/dist/insights-ui/components/insights/AccountDiscoverability/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/AccountDiscoverability/types/AccountDiscoverability.d.ts +3 -0
- package/dist/insights-ui/components/insights/AmericanUpcomingTaxDeadlineAlert/AmericanUpcomingTaxDeadlineAlert.d.ts +2 -0
- package/dist/insights-ui/components/insights/AmericanUpcomingTaxDeadlineAlert/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/AmericanUpcomingTaxDeadlineAlert/types/AmericanUpcomingTaxDeadlineProps.d.ts +4 -0
- package/dist/insights-ui/components/insights/BillAmountNotStandard/BillAmountNotStandard.d.ts +3 -0
- package/dist/insights-ui/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.d.ts +3 -0
- package/dist/insights-ui/components/insights/BillAmountNotStandard/index.d.ts +2 -0
- package/dist/insights-ui/components/insights/BillAmountNotStandard/types/BillAmountNotStandard.d.ts +4 -0
- package/dist/insights-ui/components/insights/CategoryBudget/CategoryBudget.d.ts +3 -0
- package/dist/insights-ui/components/insights/CategoryBudget/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/CategoryBudget/types/CategoryBudget.d.ts +8 -0
- package/dist/insights-ui/components/insights/CategorySpendingV2/CategorySpendingV2.d.ts +2 -0
- package/dist/insights-ui/components/insights/CategorySpendingV2/CategorySpendingV2MUI.d.ts +2 -0
- package/dist/insights-ui/components/insights/CategorySpendingV2/index.d.ts +2 -0
- package/dist/insights-ui/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +6 -0
- package/dist/insights-ui/components/insights/CelebrateCreditCardPayoff/CelebrateCreditCardPayoff.d.ts +3 -0
- package/dist/insights-ui/components/insights/CelebrateCreditCardPayoff/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/CelebrateCreditCardPayoff/types/CelebrateCreditCardPayoffProps.d.ts +9 -0
- package/dist/insights-ui/components/insights/CustomTransaction/CustomTransaction.d.ts +3 -0
- package/dist/insights-ui/components/insights/CustomTransaction/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/DiscoveredAccounts/DiscoveredAccountsBody.d.ts +9 -0
- package/dist/insights-ui/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.d.ts +21 -0
- package/dist/insights-ui/components/insights/DiscoveredAccounts/DiscoveredAccountsMiniInsight.d.ts +6 -0
- package/dist/insights-ui/components/insights/DiscoveredAccounts/index.d.ts +3 -0
- package/dist/insights-ui/components/insights/FederalBankHoliday/FederalBankHoliday.d.ts +3 -0
- package/dist/insights-ui/components/insights/FederalBankHoliday/FederalBankHolidayMUI.d.ts +3 -0
- package/dist/insights-ui/components/insights/FederalBankHoliday/index.d.ts +2 -0
- package/dist/insights-ui/components/insights/FederalBankHoliday/types/FederalBankHoliday.d.ts +4 -0
- package/dist/insights-ui/components/insights/MarketingHub/Offer.d.ts +3 -0
- package/dist/insights-ui/components/insights/MarketingHub/Types.d.ts +33 -0
- package/dist/insights-ui/components/insights/MarketingHub/index.d.ts +2 -0
- package/dist/insights-ui/components/insights/MonthlyDebtToIncomeComparisonV2/MonthlyDebtToIncomeComparisonV2.d.ts +2 -0
- package/dist/insights-ui/components/insights/MonthlyDebtToIncomeComparisonV2/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/MonthlyDebtToIncomeComparisonV2/types/index.d.ts +4 -0
- package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/LastMonthsContributionSection.d.ts +6 -0
- package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/MonthlyEmergencyFundReviewBody.d.ts +21 -0
- package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/ProjectedCompletionSection.d.ts +6 -0
- package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/TotalSection.d.ts +7 -0
- package/dist/insights-ui/components/insights/MonthlyEmergencyFundReview/index.d.ts +4 -0
- package/dist/insights-ui/components/insights/MonthlySavingsToIncomeComparison/MonthlySavingsToIncomeComparison.d.ts +2 -0
- package/dist/insights-ui/components/insights/MonthlySavingsToIncomeComparison/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/MonthlySavingsToIncomeComparison/types/index.d.ts +4 -0
- package/dist/insights-ui/components/insights/MonthlySpendToIncomeComparisonV2/MonthlySpendToIncomeComparisonV2.d.ts +2 -0
- package/dist/insights-ui/components/insights/MonthlySpendToIncomeComparisonV2/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/MonthlySpendToIncomeComparisonV2/types/index.d.ts +4 -0
- package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.d.ts +3 -0
- package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/__test__/MonthlySpendComparisonV2.test.d.ts +1 -0
- package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/MonthlySpendingComparisonV2/types/MonthlySpendComparisonV2.d.ts +4 -0
- package/dist/insights-ui/components/insights/P2pCategorization/P2pCategorization.d.ts +3 -0
- package/dist/insights-ui/components/insights/P2pCategorization/_tests_/P2pCategorizationMultipleTransaction.test.d.ts +0 -0
- package/dist/insights-ui/components/insights/P2pCategorization/_tests_/P2pCategorizationSingleTransaction.test.d.ts +0 -0
- package/dist/insights-ui/components/insights/P2pCategorization/index.d.ts +4 -0
- package/dist/insights-ui/components/insights/P2pCategorization/shared/P2pCategorizationMultipleTransactions.d.ts +3 -0
- package/dist/insights-ui/components/insights/P2pCategorization/shared/P2pCategorizationSingleTransaction.d.ts +3 -0
- package/dist/insights-ui/components/insights/P2pCategorization/types/P2pCategorization.d.ts +17 -0
- package/dist/insights-ui/components/insights/SavingsAccountBalancesSummary/SavingsAccountBalancesSummary.d.ts +2 -0
- package/dist/insights-ui/components/insights/SavingsAccountBalancesSummary/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/SavingsAccountBalancesSummary/types/SavingsAccountBalancesSummary.d.ts +4 -0
- package/dist/insights-ui/components/insights/SetUpDirectDeposit/SetUpDirectDepositBody.d.ts +3 -0
- package/dist/insights-ui/components/insights/SetUpDirectDeposit/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/SharedDeposit/SharedDeposit.d.ts +2 -0
- package/dist/insights-ui/components/insights/SharedDeposit/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/SharedDeposit/types/index.d.ts +7 -0
- package/dist/insights-ui/components/insights/SwitchDirectDeposit/AccountBox.d.ts +7 -0
- package/dist/insights-ui/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.d.ts +10 -0
- package/dist/insights-ui/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.d.ts +9 -0
- package/dist/insights-ui/components/insights/SwitchDirectDeposit/index.d.ts +3 -0
- package/dist/insights-ui/components/insights/UnifiedDeposit/UnifiedDeposit.d.ts +7 -0
- package/dist/insights-ui/components/insights/UnifiedDeposit/UnifiedDepositBody.d.ts +11 -0
- package/dist/insights-ui/components/insights/UnifiedDeposit/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/UserFeedback/StyledToggleButton.d.ts +7 -0
- package/dist/insights-ui/components/insights/UserFeedback/Types.d.ts +27 -0
- package/dist/insights-ui/components/insights/UserFeedback/UserFeedback.d.ts +3 -0
- package/dist/insights-ui/components/insights/UserFeedback/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/WeeklyNoSpendDays/BubbleWeek.d.ts +9 -0
- package/dist/insights-ui/components/insights/WeeklyNoSpendDays/NoSpendIcons.d.ts +1 -0
- package/dist/insights-ui/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.d.ts +12 -0
- package/dist/insights-ui/components/insights/WeeklyNoSpendDays/_tests_/WeeklyNoSpendDays.test.d.ts +0 -0
- package/dist/insights-ui/components/insights/WeeklyNoSpendDays/index.d.ts +1 -0
- package/dist/insights-ui/components/insights/index.d.ts +24 -0
- package/dist/insights-ui/components/shared/BottomSheet.d.ts +13 -0
- package/dist/insights-ui/components/shared/CarouselControls.d.ts +14 -0
- package/dist/insights-ui/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +29 -0
- package/dist/insights-ui/components/shared/ChartDrawerTemplate/TipSection.d.ts +7 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/BarChart.d.ts +2 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/BarChartV2.d.ts +2 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/ChartLegend.d.ts +9 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/ChartLegendV2.d.ts +10 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/CustomBarPlot.d.ts +18 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/CustomBarPlotV2.d.ts +18 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/CustomDoubleBarPlot.d.ts +24 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/DoubleBarChart.d.ts +2 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/DoubleBarChartLegend.d.ts +10 -0
- package/dist/insights-ui/components/shared/Charts/BarChart/index.d.ts +3 -0
- package/dist/insights-ui/components/shared/Charts/EmptyBarChart.d.ts +1 -0
- package/dist/insights-ui/components/shared/Charts/index.d.ts +2 -0
- package/dist/insights-ui/components/shared/Confetti.d.ts +5 -0
- package/dist/insights-ui/components/shared/DeepLinks/DeepLinkDialog.d.ts +11 -0
- package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/Circle.d.ts +6 -0
- package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.d.ts +24 -0
- package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/Dot.d.ts +1 -0
- package/dist/insights-ui/components/shared/DeepLinks/DirectDeposit/Oval.d.ts +1 -0
- package/dist/insights-ui/components/shared/DirectDeposit/DirectDeposit.d.ts +3 -0
- package/dist/insights-ui/components/shared/DirectDeposit/DirectDepositSubHeader.d.ts +14 -0
- package/dist/insights-ui/components/shared/DirectDeposit/FullFeedBodyHeader.d.ts +10 -0
- package/dist/insights-ui/components/shared/DirectDeposit/LeftBox.d.ts +7 -0
- package/dist/insights-ui/components/shared/DirectDeposit/MiniBodyHeader.d.ts +10 -0
- package/dist/insights-ui/components/shared/DirectDeposit/RightBox.d.ts +8 -0
- package/dist/insights-ui/components/shared/ErrorCard/ErrorCard.d.ts +7 -0
- package/dist/insights-ui/components/shared/FormDialog.d.ts +16 -0
- package/dist/insights-ui/components/shared/GenericFeedback/FeedbackButtons.d.ts +15 -0
- package/dist/insights-ui/components/shared/GenericFeedback/FeedbackDescription.d.ts +5 -0
- package/dist/insights-ui/components/shared/GenericFeedback/FeedbackHeader.d.ts +15 -0
- package/dist/insights-ui/components/shared/GenericFeedback/FeedbackOptions.d.ts +12 -0
- package/dist/insights-ui/components/shared/GenericFeedback/FeedbackText.d.ts +13 -0
- package/dist/insights-ui/components/shared/GoalProgress.d.ts +10 -0
- package/dist/insights-ui/components/shared/GradientBox.d.ts +8 -0
- package/dist/insights-ui/components/shared/InsightsCard/BeatCard.d.ts +20 -0
- package/dist/insights-ui/components/shared/InsightsCard/CardButtonSection.d.ts +7 -0
- package/dist/insights-ui/components/shared/InsightsCard/CardError.d.ts +5 -0
- package/dist/insights-ui/components/shared/InsightsCard/CardFooter.d.ts +7 -0
- package/dist/insights-ui/components/shared/InsightsCard/CardHeader.d.ts +11 -0
- package/dist/insights-ui/components/shared/InsightsCard/CardLoading.d.ts +5 -0
- package/dist/insights-ui/components/shared/InsightsCard/ContentAndDescription.d.ts +17 -0
- package/dist/insights-ui/components/shared/InsightsCard/Description.d.ts +12 -0
- package/dist/insights-ui/components/shared/InsightsCard/EmbeddedCard.d.ts +10 -0
- package/dist/insights-ui/components/shared/InsightsCard/FeedbackCard.d.ts +13 -0
- package/dist/insights-ui/components/shared/InsightsCard/InsightButton.d.ts +12 -0
- package/dist/insights-ui/components/shared/InsightsCard/MiniDescription.d.ts +9 -0
- package/dist/insights-ui/components/shared/MenuAction.d.ts +15 -0
- package/dist/insights-ui/components/shared/MiniInsightCard.d.ts +16 -0
- package/dist/insights-ui/components/shared/ProgressBar.d.ts +9 -0
- package/dist/insights-ui/components/shared/StatusIndicator.d.ts +14 -0
- package/dist/insights-ui/components/shared/ThemedSVGImage.d.ts +2 -0
- package/dist/insights-ui/components/shared/ZeroState/LinedCardZeroState.d.ts +1 -0
- package/dist/insights-ui/components/shared/index.d.ts +1 -0
- package/dist/insights-ui/hooks/useContainerDimensions.d.ts +5 -0
- package/dist/insights-ui/index.d.ts +1 -0
- package/dist/insights-ui/index.es.js +4206 -0
- package/dist/insights-ui/themes/Typography.d.ts +3 -0
- package/dist/insights-ui/themes/index.d.ts +1 -0
- package/dist/insights-ui/types/Charts/BarChart.d.ts +77 -0
- package/dist/insights-ui/types/CommonBeat.d.ts +368 -0
- package/dist/insights-ui/types/DirectDeposit.d.ts +16 -0
- package/dist/insights-ui/types/ThemedSVGImage.d.ts +5 -0
- package/dist/investments/index.es.js +5 -5
- package/dist/merchants/index.es.js +14 -14
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +35 -35
- package/dist/notifications/index.es.js +3 -3
- package/dist/recurringtransactions/index.es.js +14 -14
- package/dist/settings/index.es.js +64 -64
- package/dist/spending/index.es.js +7 -7
- package/dist/transactions/index.es.js +16 -16
- package/dist/trends/index.es.js +17 -17
- package/dist/{useAccountDisplayName-Bot2tb4n.mjs → useAccountDisplayName-D27PXvdj.mjs} +5 -5
- package/dist/{useAriaLive-B3_pRUio.mjs → useAriaLive-MkYebyUR.mjs} +4 -4
- package/dist/{useCombineEvents-CRwX-qWE.mjs → useCombineEvents-ARuNN9Xh.mjs} +8 -8
- package/dist/{useDimensions-27p2evRx.mjs → useDimensions-CeDR9V8N.mjs} +6 -6
- package/dist/{useInsightsEnabled-B7dxpDrX.mjs → useInsightsEnabled-CzhMEHNx.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-hIOioiKx.mjs → useWidgetLoadTimer-BYMP5Q8g.mjs} +1 -1
- package/package.json +10 -1
package/dist/goals/index.es.js
CHANGED
|
@@ -1,87 +1,86 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { c as
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import
|
|
1
|
+
import { g as de, T as i, G as le, a as Ve, M as Z, C as Ae, b as Pe } from "../GoalStore-2UZjY0z_.mjs";
|
|
2
|
+
import { c as $n, d as Xn } from "../GoalStore-2UZjY0z_.mjs";
|
|
3
|
+
import { jsxs as l, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
4
|
+
import T from "react";
|
|
5
5
|
import { observer as D } from "mobx-react-lite";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import ze from "@mui/material/Alert";
|
|
7
|
+
import je from "@mui/material/Snackbar";
|
|
8
8
|
import g from "@mui/material/Stack";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { Text as
|
|
12
|
-
import
|
|
9
|
+
import re from "@mui/material/Tab";
|
|
10
|
+
import Fe from "@mui/material/Tabs";
|
|
11
|
+
import { Text as C, H2 as me, H3 as ce, P as H, Icon as $e, InstitutionLogo as te } from "@mxenabled/mxui";
|
|
12
|
+
import ue from "@mui/material/Button";
|
|
13
13
|
import Te from "@mui/material/Card";
|
|
14
14
|
import Ce from "@mui/material/CardActionArea";
|
|
15
15
|
import Se from "@mui/material/CardContent";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { Payments as Re, NoteStack as Ee, Person as xe,
|
|
20
|
-
import { u as
|
|
21
|
-
import { u as
|
|
22
|
-
import { f as
|
|
16
|
+
import ye from "@mui/material/Unstable_Grid2";
|
|
17
|
+
import ae from "@mui/material/Avatar";
|
|
18
|
+
import Xe from "@mui/material/CardHeader";
|
|
19
|
+
import { Payments as Re, NoteStack as Ee, Person as xe, ArrowUpwardAlt as He, CheckCircle as Ue, ChevronRight as V, Icon as ge, ExpandLess as Ye, ExpandMore as Ze, AddBox as ve, Trophy as qe } from "@mxenabled/mx-icons";
|
|
20
|
+
import { u as S, l as G, b as _e, a as Ie, d as z, o as Ge, g as Ne } from "../hooks-BUCn6FeJ.mjs";
|
|
21
|
+
import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
22
|
+
import { f as I } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
23
23
|
import { S as Je } from "../StatusBar-BK_uYHAB.mjs";
|
|
24
|
-
import
|
|
24
|
+
import x from "@mui/material/Divider";
|
|
25
25
|
import L from "@mui/material/List";
|
|
26
|
-
import { L as
|
|
27
|
-
import { C as
|
|
28
|
-
import { fromUnixTime as
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import nt from "@mui/material/
|
|
40
|
-
import at from "@mui/material/
|
|
41
|
-
import ot from "@mui/material/Checkbox";
|
|
26
|
+
import { L as q } from "../ListItemAction-pvmKK9RU.mjs";
|
|
27
|
+
import { C as ke } from "../CurrencyInput-BBifPjuC.mjs";
|
|
28
|
+
import { fromUnixTime as ne } from "date-fns/fromUnixTime";
|
|
29
|
+
import Qe from "@mui/material/IconButton";
|
|
30
|
+
import k from "@mui/material/ListItem";
|
|
31
|
+
import P from "@mui/material/ListItemAvatar";
|
|
32
|
+
import M from "@mui/material/ListItemButton";
|
|
33
|
+
import w from "@mui/material/ListItemText";
|
|
34
|
+
import { b as O } from "../Localization-2MODESHW.mjs";
|
|
35
|
+
import { f as he, D as be, a as et } from "../Dialog-CwiqpTGe.mjs";
|
|
36
|
+
import { D as J } from "../Drawer-DV4NTsFg.mjs";
|
|
37
|
+
import { g as we } from "../AccountDisplayName-CO7z3v99.mjs";
|
|
38
|
+
import tt from "@mui/material/Collapse";
|
|
39
|
+
import nt from "@mui/material/ListItemIcon";
|
|
40
|
+
import at from "@mui/material/Checkbox";
|
|
42
41
|
import { A as fe } from "../Account-BiB1F8lL.mjs";
|
|
43
|
-
import { u as
|
|
42
|
+
import { u as ot } from "../useAccountDisplayName-D27PXvdj.mjs";
|
|
44
43
|
import De from "@mui/material/TextField";
|
|
45
|
-
import { M as
|
|
46
|
-
import { getUnixTime as
|
|
47
|
-
import { isValid as
|
|
48
|
-
import { AdapterDateFns as
|
|
49
|
-
import { DatePicker as
|
|
44
|
+
import { M as rt, I as it, O as st } from "../OriginalBalanceAction-CQzvRZ7u.mjs";
|
|
45
|
+
import { getUnixTime as lt } from "date-fns/getUnixTime";
|
|
46
|
+
import { isValid as ct } from "date-fns/isValid";
|
|
47
|
+
import { AdapterDateFns as dt } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
48
|
+
import { DatePicker as mt } from "@mui/x-date-pickers";
|
|
50
49
|
import { LocalizationProvider as ut } from "@mui/x-date-pickers/LocalizationProvider";
|
|
51
|
-
import { u as Ke } from "../useWidgetLoadTimer-
|
|
52
|
-
import { A as
|
|
50
|
+
import { u as Ke } from "../useWidgetLoadTimer-BYMP5Q8g.mjs";
|
|
51
|
+
import { A as X, W as _t } from "../WidgetContainer-AuyAcUXL.mjs";
|
|
53
52
|
import { L as Me } from "../Loader-DUaFpDGv.mjs";
|
|
54
|
-
import { E as
|
|
55
|
-
import
|
|
56
|
-
import
|
|
53
|
+
import { E as pt } from "../EmptyState-DoxNUae-.mjs";
|
|
54
|
+
import ht from "@mui/material/Stack/Stack";
|
|
55
|
+
import bt from "@mui/material/Box";
|
|
57
56
|
import yt from "@mui/material/styles/useTheme";
|
|
58
|
-
import { S as
|
|
59
|
-
import { M as
|
|
60
|
-
function
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
-
/* @__PURE__ */ e(
|
|
57
|
+
import { S as gt } from "../SingleSegmentDonut-BgbLgwHi.mjs";
|
|
58
|
+
import { M as ft } from "../MicroWidgetContainer-CX0qZ57D.mjs";
|
|
59
|
+
function ie({ title: t, subtitle: n }) {
|
|
60
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
61
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t }),
|
|
62
|
+
/* @__PURE__ */ e(C, { sx: { fontWeight: 400 }, variant: "Body", children: n })
|
|
64
63
|
] });
|
|
65
64
|
}
|
|
66
|
-
const
|
|
65
|
+
const At = (t, n) => n ? I(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
67
66
|
/(\d+)(?:\.0+|(\.\d*?[1-9])0*)([a-zA-Z]* ?\$?)/g,
|
|
68
67
|
"$1$2$3"
|
|
69
|
-
) :
|
|
70
|
-
({ goal: t, isInDrawer: n = !1, onClick:
|
|
71
|
-
const { goals:
|
|
72
|
-
backgroundColor:
|
|
73
|
-
color:
|
|
68
|
+
) : I(t, "0,0.00"), Le = D(
|
|
69
|
+
({ goal: t, isInDrawer: n = !1, onClick: m }) => {
|
|
70
|
+
const { goals: c } = S(), { isMobile: p, isTablet: r } = pe(), d = p || r, {
|
|
71
|
+
backgroundColor: s,
|
|
72
|
+
color: _,
|
|
74
73
|
percentage: b,
|
|
75
74
|
percentageText: o,
|
|
76
75
|
projectedText: a
|
|
77
|
-
} =
|
|
76
|
+
} = de(c, t), u = t.track_type === i.DEBT_TRACK ? t.initial_amount : t.amount, h = [
|
|
78
77
|
{
|
|
79
|
-
color:
|
|
78
|
+
color: s,
|
|
80
79
|
percentage: `${b}`
|
|
81
80
|
}
|
|
82
81
|
];
|
|
83
|
-
let
|
|
84
|
-
return t.track_type ===
|
|
82
|
+
let f = /* @__PURE__ */ e(Re, {});
|
|
83
|
+
return t.track_type === i.DEBT_TRACK ? f = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (f = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ e(
|
|
85
84
|
Te,
|
|
86
85
|
{
|
|
87
86
|
elevation: 2,
|
|
@@ -91,291 +90,197 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
91
90
|
outlineColor: "primary.main"
|
|
92
91
|
}
|
|
93
92
|
},
|
|
94
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ l(Ce, { disabled: !m, onClick: m, children: [
|
|
95
94
|
/* @__PURE__ */ e(
|
|
96
|
-
|
|
95
|
+
Xe,
|
|
97
96
|
{
|
|
98
|
-
avatar: /* @__PURE__ */ e(
|
|
99
|
-
subheader: /* @__PURE__ */ e(
|
|
97
|
+
avatar: /* @__PURE__ */ e(ae, { sx: { bgcolor: s, color: _, height: 48, width: 48 }, variant: "rounded", children: f }),
|
|
98
|
+
subheader: /* @__PURE__ */ e(C, { variant: n || d ? "H3" : "H2", children: `${I(t.current_amount, d ? "0,0" : "0,0.00")} / ${At(
|
|
100
99
|
u,
|
|
101
100
|
d
|
|
102
101
|
)}` }),
|
|
103
|
-
title: /* @__PURE__ */ e(
|
|
102
|
+
title: /* @__PURE__ */ e(me, { color: "text.secondary", fontWeight: 400, variant: "Body", children: t.name })
|
|
104
103
|
}
|
|
105
104
|
),
|
|
106
|
-
/* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */ e(Je, { data:
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
t.projected_to_complete_at && /* @__PURE__ */ e(
|
|
105
|
+
/* @__PURE__ */ e(Se, { sx: { pt: 0 }, children: /* @__PURE__ */ l(g, { gap: 6, children: [
|
|
106
|
+
/* @__PURE__ */ e(Je, { data: h, height: 24 }),
|
|
107
|
+
/* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
108
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: o }),
|
|
109
|
+
t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: a })
|
|
111
110
|
] })
|
|
112
111
|
] }) })
|
|
113
112
|
] })
|
|
114
113
|
}
|
|
115
114
|
);
|
|
116
115
|
}
|
|
117
|
-
),
|
|
118
|
-
const { goals: n } =
|
|
116
|
+
), Tt = D(({ trackType: t }) => {
|
|
117
|
+
const { goals: n } = S(), { setAlert: m, monthlyCashFlowProfile: c, updateMonthlyCashFlowProfile: p } = G(), r = T.useMemo(() => {
|
|
119
118
|
let o = 0;
|
|
120
|
-
return t ===
|
|
121
|
-
}, [
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
return t === i.SAVINGS_TRACK ? o = c?.amount_allocated_for_savings_goals || 0 : t === i.DEBT_TRACK ? o = c?.amount_allocated_for_debt_goals || 0 : t === i.RETIREMENT_TRACK && (o = c?.amount_allocated_for_retirement_goals || 0), o;
|
|
120
|
+
}, [c]);
|
|
121
|
+
T.useEffect(() => {
|
|
122
|
+
s(r);
|
|
124
123
|
}, [r]);
|
|
125
|
-
const [d,
|
|
126
|
-
if (
|
|
127
|
-
const o = { ...
|
|
128
|
-
t ===
|
|
124
|
+
const [d, s] = T.useState(r), _ = d < 0 || d > 99999999, b = async () => {
|
|
125
|
+
if (c) {
|
|
126
|
+
const o = { ...c };
|
|
127
|
+
t === i.SAVINGS_TRACK ? o.amount_allocated_for_savings_goals = d : t === i.DEBT_TRACK ? o.amount_allocated_for_debt_goals = d : t === i.RETIREMENT_TRACK && (o.amount_allocated_for_retirement_goals = d), await p(o), m(n.alert_contribution_updated);
|
|
129
128
|
}
|
|
130
129
|
};
|
|
131
130
|
return /* @__PURE__ */ e(g, { bgcolor: "background.paper", children: /* @__PURE__ */ e(
|
|
132
|
-
|
|
131
|
+
q,
|
|
133
132
|
{
|
|
134
133
|
isSaveDisabled: !d || isNaN(d),
|
|
135
134
|
label: n.contribution_label,
|
|
136
|
-
onCancel: () =>
|
|
135
|
+
onCancel: () => s(r),
|
|
137
136
|
onSave: b,
|
|
138
137
|
primaryText: n.contribution_label,
|
|
139
|
-
secondaryText:
|
|
138
|
+
secondaryText: I(r, "0,0.00"),
|
|
140
139
|
children: /* @__PURE__ */ e(
|
|
141
|
-
|
|
140
|
+
ke,
|
|
142
141
|
{
|
|
143
142
|
amount: d,
|
|
144
143
|
autoFocus: !0,
|
|
145
|
-
error:
|
|
144
|
+
error: _,
|
|
146
145
|
fullWidth: !0,
|
|
147
146
|
minAmount: 0,
|
|
148
|
-
setAmount: (o) =>
|
|
147
|
+
setAmount: (o) => s(isNaN(Number(o)) ? d : Number(o)),
|
|
149
148
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
150
149
|
}
|
|
151
150
|
)
|
|
152
151
|
}
|
|
153
152
|
) });
|
|
154
|
-
}),
|
|
155
|
-
const { goals:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}, [l]);
|
|
159
|
-
const a = [
|
|
153
|
+
}), Ct = ({ goal: t, index: n, onUpClick: m }) => {
|
|
154
|
+
const { goals: c } = S(), { percentage: p } = de(c, t), r = t.goal_type === le.KEEP_BALANCE_BELOW || t.has_been_spent ? c.goal_completed : O(c.goal_percentage_reached, `${p * 100}`);
|
|
155
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
|
|
156
|
+
M,
|
|
160
157
|
{
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
158
|
+
disableRipple: !0,
|
|
159
|
+
sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
|
|
160
|
+
children: [
|
|
161
|
+
t.track_type !== i.RETIREMENT_TRACK && /* @__PURE__ */ e(
|
|
162
|
+
P,
|
|
163
|
+
{
|
|
164
|
+
sx: {
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
display: "flex",
|
|
167
|
+
justifyContent: "center",
|
|
168
|
+
".MuiAvatar-root": { height: "16px", width: "16px" }
|
|
169
|
+
},
|
|
170
|
+
children: t.track_type === i.SAVINGS_TRACK ? /* @__PURE__ */ e(Qe, { onClick: () => m?.(t), children: /* @__PURE__ */ e(He, { color: "primary", size: 24 }) }) : /* @__PURE__ */ e(ae, { sx: { bgcolor: "text.primary", height: "16px", width: "16px" }, children: /* @__PURE__ */ e(C, { bold: !0, variant: "XSmall", children: n + 1 }) })
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
174
|
+
/* @__PURE__ */ l(g, { children: [
|
|
175
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
|
|
176
|
+
/* @__PURE__ */ e(C, { variant: "XSmall", children: t.is_complete ? r : O(
|
|
177
|
+
c.goal_projection,
|
|
178
|
+
he(
|
|
179
|
+
ne(t.projected_to_complete_at || 0),
|
|
180
|
+
be.MONTH_SHORT_YEAR
|
|
181
|
+
)
|
|
182
|
+
) })
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(t.amount, "0,0.00") })
|
|
185
|
+
] }) })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
) });
|
|
189
|
+
}, St = ({ goal: t }) => {
|
|
190
|
+
const { goals: n } = S();
|
|
191
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
|
|
192
|
+
M,
|
|
178
193
|
{
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
194
|
+
disableRipple: !0,
|
|
195
|
+
sx: { ":hover": { backgroundColor: "unset" }, cursor: "default" },
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ e(P, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
|
|
198
|
+
/* @__PURE__ */ e(w, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
199
|
+
/* @__PURE__ */ l(g, { children: [
|
|
200
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: t.name }),
|
|
201
|
+
/* @__PURE__ */ e(C, { variant: "XSmall", children: O(
|
|
202
|
+
n.completed_label,
|
|
203
|
+
he(
|
|
204
|
+
ne(t.completed_at || 0),
|
|
205
|
+
be.MONTH_SHORT_YEAR
|
|
206
|
+
)
|
|
207
|
+
) })
|
|
208
|
+
] }),
|
|
209
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(t.amount, "0,0.00") })
|
|
210
|
+
] }) })
|
|
211
|
+
]
|
|
187
212
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
)
|
|
205
|
-
);
|
|
206
|
-
}, y = async () => {
|
|
207
|
-
await m(b), h(n.alert_goals_reordered), p(!1);
|
|
213
|
+
) }, t.guid);
|
|
214
|
+
}, Rt = ({ trackType: t }) => {
|
|
215
|
+
const { goals: n, common: m } = S(), { loadGoals: c, orderedGoals: p, reorderGoals: r } = G(), d = p.filter((y) => y.track_type === t), s = d.filter(
|
|
216
|
+
(y) => y.track_type === i.SAVINGS_TRACK && !y.has_been_spent || y.track_type !== i.SAVINGS_TRACK && !y.is_complete
|
|
217
|
+
), _ = d.filter(
|
|
218
|
+
(y) => y.track_type === i.SAVINGS_TRACK && y.has_been_spent || y.track_type !== i.SAVINGS_TRACK && y.is_complete
|
|
219
|
+
), [b, o] = T.useState(!1);
|
|
220
|
+
let a = n.manage_saving_goals, u = n.manage_saving_drawer_title, h = n.manage_saving_title, f = n.manage_saving_description;
|
|
221
|
+
t === i.DEBT_TRACK ? (a = n.manage_debt_goals, u = n.manage_debt_drawer_title, h = n.manage_debt_title, f = n.manage_debt_description) : t === i.RETIREMENT_TRACK && (a = n.manage_retirement_goals, u = n.manage_retirement_drawer_title, h = n.manage_retirement_title, f = n.manage_retirement_description);
|
|
222
|
+
const v = async (y) => {
|
|
223
|
+
const A = [...s], R = A.findIndex((K) => K.guid === y.guid);
|
|
224
|
+
let N = R - 1;
|
|
225
|
+
N < 0 && (N = A.length - 1), A.splice(N, 0, A.splice(R, 1)[0]);
|
|
226
|
+
for (let K = 0; K < A.length; K++)
|
|
227
|
+
A[K].position = K + 1;
|
|
228
|
+
await r(A), await c();
|
|
208
229
|
};
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */ e(
|
|
211
|
-
g,
|
|
212
|
-
{
|
|
213
|
-
alignItems: "center",
|
|
214
|
-
color: "action.active",
|
|
215
|
-
direction: "row",
|
|
216
|
-
justifyContent: "space-between",
|
|
217
|
-
children: [
|
|
218
|
-
/* @__PURE__ */ e(T, { color: "primary.light", variant: "Body", children: n.reorder_goals_title }),
|
|
219
|
-
/* @__PURE__ */ e(O, { color: "primary" })
|
|
220
|
-
]
|
|
221
|
-
}
|
|
222
|
-
) }) }) }),
|
|
230
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
231
|
+
/* @__PURE__ */ e(ue, { endIcon: /* @__PURE__ */ e(V, {}), onClick: () => o(!0), children: a }),
|
|
223
232
|
/* @__PURE__ */ e(
|
|
224
|
-
|
|
225
|
-
{
|
|
226
|
-
ariaLabelClose: c.close_aria,
|
|
227
|
-
isOpen: l,
|
|
228
|
-
onClose: () => p(!1),
|
|
229
|
-
onPrimaryAction: y,
|
|
230
|
-
title: n.reorder_goals_title,
|
|
231
|
-
children: /* @__PURE__ */ i(g, { children: [
|
|
232
|
-
d,
|
|
233
|
-
/* @__PURE__ */ e(P, { id: "reorder-instructions", sx: { my: 12, mx: 24 }, children: n.reorder_goals_description }),
|
|
234
|
-
/* @__PURE__ */ e(
|
|
235
|
-
Qe,
|
|
236
|
-
{
|
|
237
|
-
"aria-describedby": "reorder-instructions",
|
|
238
|
-
columnHeaderHeight: 0,
|
|
239
|
-
columns: a,
|
|
240
|
-
disableColumnFilter: !0,
|
|
241
|
-
disableColumnMenu: !0,
|
|
242
|
-
hideFooter: !0,
|
|
243
|
-
onRowOrderChange: _,
|
|
244
|
-
rowReordering: !0,
|
|
245
|
-
rows: u,
|
|
246
|
-
slots: {
|
|
247
|
-
rowReorderIcon: () => /* @__PURE__ */ e(Xe, { "aria-label": n.reorder_goals_drag_aria_label, sx: { ml: 12 } })
|
|
248
|
-
},
|
|
249
|
-
sx: {
|
|
250
|
-
"& .MuiDataGrid-columnHeaders": {
|
|
251
|
-
borderBottomWidth: 0
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
)
|
|
256
|
-
] })
|
|
257
|
-
}
|
|
258
|
-
)
|
|
259
|
-
] });
|
|
260
|
-
}, Rt = ({ goal: t, index: n }) => {
|
|
261
|
-
const { goals: c } = R(), { percentage: m } = _e(c, t), h = t.goal_type === de.KEEP_BALANCE_BELOW || t.has_been_spent ? c.goal_completed : M(c.goal_percentage_reached, `${m * 100}`);
|
|
262
|
-
return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(K, { children: [
|
|
263
|
-
t.track_type !== s.RETIREMENT_TRACK && /* @__PURE__ */ e(
|
|
264
|
-
V,
|
|
233
|
+
J,
|
|
265
234
|
{
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
),
|
|
275
|
-
/* @__PURE__ */ e(k, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
276
|
-
/* @__PURE__ */ i(g, { children: [
|
|
277
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.name }),
|
|
278
|
-
/* @__PURE__ */ e(T, { variant: "XSmall", children: t.is_complete ? h : M(
|
|
279
|
-
c.goal_projection,
|
|
280
|
-
ae(
|
|
281
|
-
q(t.projected_to_complete_at || 0),
|
|
282
|
-
oe.MONTH_SHORT_YEAR
|
|
283
|
-
)
|
|
284
|
-
) })
|
|
285
|
-
] }),
|
|
286
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: v(t.amount, "0,0.00") })
|
|
287
|
-
] }) })
|
|
288
|
-
] }) });
|
|
289
|
-
}, Et = ({ goal: t }) => {
|
|
290
|
-
const { goals: n } = R();
|
|
291
|
-
return /* @__PURE__ */ e(w, { children: /* @__PURE__ */ i(K, { children: [
|
|
292
|
-
/* @__PURE__ */ e(V, { sx: { alignItems: "center", display: "flex", justifyContent: "center" }, children: /* @__PURE__ */ e(Ue, { color: "success", filled: !0, size: 20 }) }),
|
|
293
|
-
/* @__PURE__ */ e(k, { primaryTypographyProps: { variant: "Body" }, children: /* @__PURE__ */ i(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
294
|
-
/* @__PURE__ */ i(g, { children: [
|
|
295
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.name }),
|
|
296
|
-
/* @__PURE__ */ e(T, { variant: "XSmall", children: M(
|
|
297
|
-
n.completed_label,
|
|
298
|
-
ae(
|
|
299
|
-
q(t.completed_at || 0),
|
|
300
|
-
oe.MONTH_SHORT_YEAR
|
|
301
|
-
)
|
|
302
|
-
) })
|
|
303
|
-
] }),
|
|
304
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: v(t.amount, "0,0.00") })
|
|
305
|
-
] }) })
|
|
306
|
-
] }) }, t.guid);
|
|
307
|
-
}, xt = ({ trackType: t }) => {
|
|
308
|
-
const { goals: n, common: c } = R(), { orderedGoals: m } = G(), h = m.filter((_) => _.track_type === t), r = h.filter(
|
|
309
|
-
(_) => _.track_type === s.SAVINGS_TRACK && !_.has_been_spent || _.track_type !== s.SAVINGS_TRACK && !_.is_complete
|
|
310
|
-
), d = h.filter(
|
|
311
|
-
(_) => _.track_type === s.SAVINGS_TRACK && _.has_been_spent || _.track_type !== s.SAVINGS_TRACK && _.is_complete
|
|
312
|
-
), [l, p] = A.useState(!1);
|
|
313
|
-
let b = n.manage_saving_goals, o = n.manage_saving_drawer_title, a = n.manage_saving_title, u = n.manage_saving_description;
|
|
314
|
-
return t === s.DEBT_TRACK ? (b = n.manage_debt_goals, o = n.manage_debt_drawer_title, a = n.manage_debt_title, u = n.manage_debt_description) : t === s.RETIREMENT_TRACK && (b = n.manage_retirement_goals, o = n.manage_retirement_drawer_title, a = n.manage_retirement_title, u = n.manage_retirement_description), /* @__PURE__ */ i(g, { children: [
|
|
315
|
-
/* @__PURE__ */ e(pe, { endIcon: /* @__PURE__ */ e(O, {}), onClick: () => p(!0), children: b }),
|
|
316
|
-
/* @__PURE__ */ e(
|
|
317
|
-
X,
|
|
318
|
-
{
|
|
319
|
-
ariaLabelClose: c.close_aria,
|
|
320
|
-
isOpen: l,
|
|
321
|
-
onClose: () => p(!1),
|
|
322
|
-
title: o,
|
|
323
|
-
children: /* @__PURE__ */ i(g, { children: [
|
|
324
|
-
/* @__PURE__ */ i(g, { m: 24, children: [
|
|
325
|
-
/* @__PURE__ */ e(me, { children: a }),
|
|
326
|
-
/* @__PURE__ */ e(P, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: u })
|
|
327
|
-
] }),
|
|
328
|
-
/* @__PURE__ */ e(Ct, { trackType: t }),
|
|
329
|
-
/* @__PURE__ */ e(T, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
|
|
330
|
-
/* @__PURE__ */ i(L, { sx: { bgcolor: "background.paper" }, children: [
|
|
331
|
-
r.map((_, y) => {
|
|
332
|
-
const f = y >= r.length - 1;
|
|
333
|
-
return /* @__PURE__ */ i(g, { children: [
|
|
334
|
-
/* @__PURE__ */ e(Rt, { goal: _, index: y }),
|
|
335
|
-
/* @__PURE__ */ e(
|
|
336
|
-
E,
|
|
337
|
-
{
|
|
338
|
-
variant: f && t === s.RETIREMENT_TRACK ? "fullWidth" : "inset"
|
|
339
|
-
}
|
|
340
|
-
)
|
|
341
|
-
] }, `ongoing-${_.guid}`);
|
|
342
|
-
}),
|
|
343
|
-
t !== s.RETIREMENT_TRACK && /* @__PURE__ */ i(g, { children: [
|
|
344
|
-
/* @__PURE__ */ e(St, { goals: r }),
|
|
345
|
-
/* @__PURE__ */ e(E, {})
|
|
346
|
-
] })
|
|
235
|
+
ariaLabelClose: m.close_aria,
|
|
236
|
+
isOpen: b,
|
|
237
|
+
onClose: () => o(!1),
|
|
238
|
+
title: u,
|
|
239
|
+
children: /* @__PURE__ */ l(g, { children: [
|
|
240
|
+
/* @__PURE__ */ l(g, { m: 24, children: [
|
|
241
|
+
/* @__PURE__ */ e(ce, { children: h }),
|
|
242
|
+
/* @__PURE__ */ e(H, { color: "text.secondary", sx: { textWrap: "wrap" }, variant: "ParagraphSmall", children: f })
|
|
347
243
|
] }),
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
244
|
+
/* @__PURE__ */ e(Tt, { trackType: t }),
|
|
245
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.goal_priority }),
|
|
246
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: s.map((y, A) => {
|
|
247
|
+
const R = A >= s.length - 1;
|
|
248
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
249
|
+
/* @__PURE__ */ e(Ct, { goal: y, index: A, onUpClick: v }),
|
|
250
|
+
/* @__PURE__ */ e(x, { variant: R ? "fullWidth" : "inset" })
|
|
251
|
+
] }, `ongoing-${y.guid}`);
|
|
252
|
+
}) }),
|
|
253
|
+
t !== i.RETIREMENT_TRACK && _.length > 0 && /* @__PURE__ */ l(g, { children: [
|
|
254
|
+
/* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, mx: 24, mt: 12 }, variant: "XSmall", children: n.complete_title }),
|
|
255
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: _.map((y, A) => {
|
|
256
|
+
const R = A > s.length - 1;
|
|
257
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
258
|
+
/* @__PURE__ */ e(St, { goal: y }),
|
|
259
|
+
/* @__PURE__ */ e(x, { variant: R ? "fullWidth" : "inset" })
|
|
260
|
+
] }, `complete-${y.guid}`);
|
|
356
261
|
}) })
|
|
357
262
|
] })
|
|
358
263
|
] })
|
|
359
264
|
}
|
|
360
265
|
)
|
|
361
266
|
] });
|
|
362
|
-
},
|
|
363
|
-
const { isMobile:
|
|
364
|
-
(a) => a.track_type === t && (a.track_type !==
|
|
365
|
-
),
|
|
366
|
-
(a) => a.track_type ===
|
|
367
|
-
), b =
|
|
368
|
-
(a) => a.track_type ===
|
|
369
|
-
), o = t ===
|
|
370
|
-
return /* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */ e(
|
|
373
|
-
/* @__PURE__ */ e(
|
|
267
|
+
}, se = D(({ trackType: t, onAddGoals: n }) => {
|
|
268
|
+
const { isMobile: m } = pe(), { goals: c } = S(), { selectedAccountGuids: p } = _e(), { orderedGoals: r, setSelectedGoal: d } = G(), s = r.filter(
|
|
269
|
+
(a) => a.track_type === t && (a.track_type !== i.RETIREMENT_TRACK && p.includes(a.account_guid) || a.track_type === i.RETIREMENT_TRACK)
|
|
270
|
+
), _ = s.filter(
|
|
271
|
+
(a) => a.track_type === i.SAVINGS_TRACK && !a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && !a.is_complete
|
|
272
|
+
), b = s.filter(
|
|
273
|
+
(a) => a.track_type === i.SAVINGS_TRACK && a.has_been_spent || a.track_type !== i.SAVINGS_TRACK && a.is_complete
|
|
274
|
+
), o = t === i.DEBT_TRACK ? c.zero_state_complete_debt : c.zero_state_complete_savings;
|
|
275
|
+
return /* @__PURE__ */ l(g, { mt: 16, mx: m ? 24 : 0, children: [
|
|
276
|
+
/* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", mb: 8, children: [
|
|
277
|
+
/* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.ongoing_title }),
|
|
278
|
+
/* @__PURE__ */ e(Rt, { trackType: t })
|
|
374
279
|
] }),
|
|
375
|
-
|
|
280
|
+
_.length > 0 ? /* @__PURE__ */ e(ye, { container: !0, spacing: 24, children: _.map((a, u, h) => (
|
|
376
281
|
// Goal should be full width in mobile or if it's the first goal (unless there are 2)
|
|
377
|
-
/* @__PURE__ */ e(
|
|
378
|
-
)) }) : /* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ e(ye, { xs: m || u === 0 && h.length !== 2 ? 12 : 6, children: /* @__PURE__ */ e(Le, { goal: a, onClick: () => d(a) }, a.guid) }, u)
|
|
283
|
+
)) }) : /* @__PURE__ */ l(
|
|
379
284
|
g,
|
|
380
285
|
{
|
|
381
286
|
alignItems: "center",
|
|
@@ -386,7 +291,7 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
386
291
|
py: 18,
|
|
387
292
|
children: [
|
|
388
293
|
/* @__PURE__ */ e(
|
|
389
|
-
|
|
294
|
+
H,
|
|
390
295
|
{
|
|
391
296
|
sx: (a) => ({
|
|
392
297
|
color: "text.secondary",
|
|
@@ -396,17 +301,17 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
396
301
|
width: { sm: 381 }
|
|
397
302
|
}),
|
|
398
303
|
variant: "Small",
|
|
399
|
-
children:
|
|
304
|
+
children: Ve(t, c)
|
|
400
305
|
}
|
|
401
306
|
),
|
|
402
|
-
/* @__PURE__ */ e(
|
|
307
|
+
/* @__PURE__ */ e(ue, { onClick: n, sx: { mt: 16, width: { sm: 224 } }, variant: "contained", children: c.add_goals_button })
|
|
403
308
|
]
|
|
404
309
|
}
|
|
405
310
|
),
|
|
406
|
-
t !==
|
|
407
|
-
/* @__PURE__ */ e(
|
|
311
|
+
t !== i.RETIREMENT_TRACK && /* @__PURE__ */ l(g, { gap: 16, mt: 48, children: [
|
|
312
|
+
/* @__PURE__ */ e(ce, { color: "text.secondary", variant: "Small", children: c.complete_title }),
|
|
408
313
|
b.length === 0 && /* @__PURE__ */ e(g, { alignItems: "center", bgcolor: "background.default", borderRadius: 2, py: 18, children: /* @__PURE__ */ e(
|
|
409
|
-
|
|
314
|
+
H,
|
|
410
315
|
{
|
|
411
316
|
sx: (a) => ({
|
|
412
317
|
color: "text.secondary",
|
|
@@ -419,73 +324,73 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
419
324
|
children: o
|
|
420
325
|
}
|
|
421
326
|
) }),
|
|
422
|
-
b.map((a) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => d(a), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
/* @__PURE__ */ e(
|
|
425
|
-
/* @__PURE__ */ e(
|
|
327
|
+
b.map((a) => /* @__PURE__ */ e(Te, { elevation: 2, children: /* @__PURE__ */ e(Ce, { onClick: () => d(a), children: /* @__PURE__ */ e(Se, { sx: { ":last-child": { pb: 16 } }, children: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
328
|
+
/* @__PURE__ */ l(g, { alignItems: "center", direction: "row", gap: 6, children: [
|
|
329
|
+
/* @__PURE__ */ e($e, { color: "success", fill: !0, name: "check_circle", size: 20 }),
|
|
330
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", variant: "Body", children: a.name })
|
|
426
331
|
] }),
|
|
427
|
-
/* @__PURE__ */ e(
|
|
332
|
+
/* @__PURE__ */ e(C, { bold: !0, variant: "Body", children: I(a.amount, "0,0.00") })
|
|
428
333
|
] }) }) }) }, a.guid))
|
|
429
334
|
] })
|
|
430
335
|
] });
|
|
431
|
-
}),
|
|
432
|
-
const { goals:
|
|
433
|
-
return /* @__PURE__ */ e(g, { children: /* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */ e(
|
|
435
|
-
|
|
336
|
+
}), Et = ({ goalType: t, onClick: n }) => {
|
|
337
|
+
const { goals: m } = S(), { bgcolor: c, icon: p, label: r, description: d, subTypes: s, type: _ } = t, [b, o] = T.useState(!1), a = s.length > 0;
|
|
338
|
+
return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
|
|
339
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(
|
|
340
|
+
M,
|
|
436
341
|
{
|
|
437
342
|
onClick: a ? () => o(!b) : () => n(
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
343
|
+
_ === i.RETIREMENT_TRACK ? m.retirement : "",
|
|
344
|
+
_ === i.RETIREMENT_TRACK ? Z.RETIREMENT : Z.OTHER,
|
|
345
|
+
_
|
|
441
346
|
),
|
|
442
347
|
children: [
|
|
443
|
-
/* @__PURE__ */ e(
|
|
444
|
-
/* @__PURE__ */ e(
|
|
445
|
-
!a && /* @__PURE__ */ e(
|
|
348
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(ae, { sx: { bgcolor: c }, variant: "rounded", children: /* @__PURE__ */ e(ge, { name: p, sx: { color: "grey.900" } }) }) }),
|
|
349
|
+
/* @__PURE__ */ e(w, { primary: r, secondary: d, sx: { mr: 24 } }),
|
|
350
|
+
!a && /* @__PURE__ */ e(V, {}),
|
|
446
351
|
a && (b ? /* @__PURE__ */ e(Ye, {}) : /* @__PURE__ */ e(Ze, {}))
|
|
447
352
|
]
|
|
448
353
|
}
|
|
449
354
|
) }),
|
|
450
|
-
/* @__PURE__ */ e(
|
|
451
|
-
a && /* @__PURE__ */ e(
|
|
452
|
-
/* @__PURE__ */ e(
|
|
355
|
+
/* @__PURE__ */ e(x, { variant: "inset" }),
|
|
356
|
+
a && /* @__PURE__ */ e(tt, { in: b, children: /* @__PURE__ */ e(L, { sx: { bgcolor: "background.default" }, children: s.map((u, h) => /* @__PURE__ */ e(k, { sx: { pl: 48 }, children: /* @__PURE__ */ l(M, { onClick: () => n(u.label, u.metaType, _), children: [
|
|
357
|
+
/* @__PURE__ */ e(nt, { sx: { mr: 8 }, children: /* @__PURE__ */ e(ge, { name: u.icon }) }),
|
|
453
358
|
/* @__PURE__ */ e(
|
|
454
|
-
|
|
359
|
+
w,
|
|
455
360
|
{
|
|
456
361
|
primary: u.label,
|
|
457
362
|
primaryTypographyProps: { variant: "Body" }
|
|
458
363
|
}
|
|
459
364
|
),
|
|
460
|
-
/* @__PURE__ */ e(
|
|
461
|
-
] }) },
|
|
365
|
+
/* @__PURE__ */ e(V, {})
|
|
366
|
+
] }) }, h)) }) })
|
|
462
367
|
] }) });
|
|
463
368
|
}, Be = ({
|
|
464
369
|
accounts: t,
|
|
465
370
|
isOpen: n,
|
|
466
|
-
onClose:
|
|
467
|
-
onSave:
|
|
468
|
-
title:
|
|
371
|
+
onClose: m,
|
|
372
|
+
onSave: c,
|
|
373
|
+
title: p
|
|
469
374
|
}) => {
|
|
470
|
-
const { goals: r, common: d } =
|
|
471
|
-
const u =
|
|
472
|
-
u >= 0 ?
|
|
375
|
+
const { goals: r, common: d } = S(), { config: s } = Ie(), [_, b] = T.useState([]), o = (a) => {
|
|
376
|
+
const u = _.findIndex((f) => f.guid === a.guid), h = [..._];
|
|
377
|
+
u >= 0 ? h.splice(u, 1) : h.push(a), b(h);
|
|
473
378
|
};
|
|
474
|
-
return /* @__PURE__ */
|
|
475
|
-
|
|
379
|
+
return /* @__PURE__ */ l(
|
|
380
|
+
J,
|
|
476
381
|
{
|
|
477
382
|
ariaLabelClose: d.close_aria,
|
|
478
383
|
isOpen: n,
|
|
479
|
-
onClose:
|
|
480
|
-
onPrimaryAction: () =>
|
|
481
|
-
title:
|
|
384
|
+
onClose: m,
|
|
385
|
+
onPrimaryAction: () => c(_),
|
|
386
|
+
title: p,
|
|
482
387
|
children: [
|
|
483
|
-
/* @__PURE__ */ e(
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
/* @__PURE__ */ e(
|
|
486
|
-
t.map((a, u) => /* @__PURE__ */
|
|
487
|
-
/* @__PURE__ */ e(
|
|
488
|
-
/* @__PURE__ */ e(
|
|
388
|
+
/* @__PURE__ */ e(H, { color: "text.secondary", sx: { mx: 24, my: 12 }, children: r.select_debt_accounts_description }),
|
|
389
|
+
/* @__PURE__ */ l(L, { sx: { bgcolor: "background.white" }, children: [
|
|
390
|
+
/* @__PURE__ */ e(x, { variant: "fullWidth" }),
|
|
391
|
+
t.map((a, u) => /* @__PURE__ */ l(T.Fragment, { children: [
|
|
392
|
+
/* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => o(a), children: [
|
|
393
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
489
394
|
te,
|
|
490
395
|
{
|
|
491
396
|
alt: a?.name || "",
|
|
@@ -493,17 +398,17 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
493
398
|
}
|
|
494
399
|
) }),
|
|
495
400
|
/* @__PURE__ */ e(
|
|
496
|
-
|
|
401
|
+
w,
|
|
497
402
|
{
|
|
498
|
-
primary:
|
|
499
|
-
allowNickname:
|
|
403
|
+
primary: we(a, {
|
|
404
|
+
allowNickname: s?.show_account_nicknames_in_master
|
|
500
405
|
}),
|
|
501
|
-
secondary:
|
|
406
|
+
secondary: I(a.balance || 0, "0,0.00")
|
|
502
407
|
}
|
|
503
408
|
),
|
|
504
|
-
/* @__PURE__ */ e(
|
|
409
|
+
/* @__PURE__ */ e(at, { checked: _.some((h) => h.guid === a.guid) })
|
|
505
410
|
] }) }),
|
|
506
|
-
/* @__PURE__ */ e(
|
|
411
|
+
/* @__PURE__ */ e(x, { variant: u < t.length - 1 ? "inset" : "fullWidth" })
|
|
507
412
|
] }, a.guid))
|
|
508
413
|
] }),
|
|
509
414
|
/* @__PURE__ */ e(
|
|
@@ -517,44 +422,44 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
517
422
|
]
|
|
518
423
|
}
|
|
519
424
|
);
|
|
520
|
-
},
|
|
521
|
-
const { goals: n } =
|
|
522
|
-
|
|
425
|
+
}, xt = ({ onClose: t }) => {
|
|
426
|
+
const { goals: n } = S(), { addGoal: m, debtGoals: c, setAlert: p, setSelectedGoal: r } = G(), { config: d } = Ie(), { visibleDebtAccounts: s } = z(), [_, b] = T.useState(!1), o = Pe(n), a = (h, f, v) => {
|
|
427
|
+
v === i.DEBT_TRACK ? b(!0) : r({
|
|
523
428
|
amount: 0,
|
|
524
429
|
current_amount: 0,
|
|
525
|
-
goal_type:
|
|
430
|
+
goal_type: le.SAVE_AMOUNT,
|
|
526
431
|
initial_amount: 0,
|
|
527
|
-
meta_type:
|
|
528
|
-
name:
|
|
529
|
-
track_type:
|
|
432
|
+
meta_type: f,
|
|
433
|
+
name: h,
|
|
434
|
+
track_type: v
|
|
530
435
|
});
|
|
531
|
-
}, u = async (
|
|
532
|
-
for (const
|
|
533
|
-
let
|
|
534
|
-
|
|
535
|
-
account_guid:
|
|
436
|
+
}, u = async (h) => {
|
|
437
|
+
for (const f of h) {
|
|
438
|
+
let v = Z.CREDIT_CARD;
|
|
439
|
+
f.account_type === fe.LOAN ? v = Z.LOANS : f.account_type === fe.LINE_OF_CREDIT && (v = Z.LINE_OF_CREDIT), await m({
|
|
440
|
+
account_guid: f.guid,
|
|
536
441
|
amount: 0,
|
|
537
442
|
current_amount: 0,
|
|
538
|
-
goal_type:
|
|
539
|
-
initial_amount:
|
|
540
|
-
interest_rate:
|
|
541
|
-
meta_type:
|
|
542
|
-
monthly_payment:
|
|
543
|
-
name:
|
|
443
|
+
goal_type: le.KEEP_BALANCE_BELOW,
|
|
444
|
+
initial_amount: f.balance || 0,
|
|
445
|
+
interest_rate: f.interest_rate || 0,
|
|
446
|
+
meta_type: v,
|
|
447
|
+
monthly_payment: f.minimum_payment || 0,
|
|
448
|
+
name: we(f, {
|
|
544
449
|
allowNickname: d?.show_account_nicknames_in_master
|
|
545
450
|
}),
|
|
546
|
-
track_type:
|
|
547
|
-
}),
|
|
451
|
+
track_type: i.DEBT_TRACK
|
|
452
|
+
}), p(n.alert_goal_added);
|
|
548
453
|
}
|
|
549
|
-
b(!1), t?.(
|
|
454
|
+
b(!1), t?.(i.DEBT_TRACK);
|
|
550
455
|
};
|
|
551
|
-
return /* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((
|
|
456
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
457
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: o.map((h, f) => /* @__PURE__ */ e(Et, { goalType: h, onClick: a }, f)) }),
|
|
553
458
|
/* @__PURE__ */ e(
|
|
554
459
|
Be,
|
|
555
460
|
{
|
|
556
|
-
accounts:
|
|
557
|
-
isOpen:
|
|
461
|
+
accounts: s.filter((h) => !c.find((f) => f.account_guid === h.guid)),
|
|
462
|
+
isOpen: _,
|
|
558
463
|
onClose: () => b(!1),
|
|
559
464
|
onSave: u,
|
|
560
465
|
title: n.select_debt_accounts_title
|
|
@@ -562,9 +467,9 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
562
467
|
)
|
|
563
468
|
] });
|
|
564
469
|
}, Oe = ({ account: t }) => {
|
|
565
|
-
const n =
|
|
566
|
-
return /* @__PURE__ */
|
|
567
|
-
/* @__PURE__ */ e(
|
|
470
|
+
const n = ot(t);
|
|
471
|
+
return /* @__PURE__ */ l(k, { sx: { bgcolor: "background.paper", p: 24 }, children: [
|
|
472
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
568
473
|
te,
|
|
569
474
|
{
|
|
570
475
|
alt: t.name || "",
|
|
@@ -572,24 +477,24 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
572
477
|
}
|
|
573
478
|
) }),
|
|
574
479
|
/* @__PURE__ */ e(
|
|
575
|
-
|
|
480
|
+
w,
|
|
576
481
|
{
|
|
577
482
|
primary: n,
|
|
578
|
-
secondary:
|
|
483
|
+
secondary: I(t.balance || 0, "0,0.00")
|
|
579
484
|
}
|
|
580
485
|
)
|
|
581
486
|
] });
|
|
582
|
-
},
|
|
583
|
-
const { goals: n } =
|
|
584
|
-
const
|
|
585
|
-
t.amount = d,
|
|
487
|
+
}, vt = D(({ goal: t }) => {
|
|
488
|
+
const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateGoal: p, updateRetirementGoal: r } = G(), [d, s] = T.useState(t.amount), _ = !t.guid, b = d < 0 || d > 9999999999e-2, o = t.track_type === i.SAVINGS_TRACK && t.has_been_spent || t.track_type !== i.SAVINGS_TRACK && t.is_complete, a = async () => {
|
|
489
|
+
const h = { ...t, amount: d };
|
|
490
|
+
t.amount = d, _ ? c(h) : (t.track_type !== i.RETIREMENT_TRACK ? await p(h) : await r(h), m(n.alert_goal_updated_amount));
|
|
586
491
|
}, u = () => {
|
|
587
492
|
setTimeout(() => {
|
|
588
|
-
|
|
493
|
+
s(t.amount);
|
|
589
494
|
}, 250);
|
|
590
495
|
};
|
|
591
496
|
return /* @__PURE__ */ e(
|
|
592
|
-
|
|
497
|
+
q,
|
|
593
498
|
{
|
|
594
499
|
isDisabled: o,
|
|
595
500
|
isSaveDisabled: b,
|
|
@@ -597,50 +502,50 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
597
502
|
onCancel: u,
|
|
598
503
|
onSave: a,
|
|
599
504
|
primaryText: n.details_amount_to_save,
|
|
600
|
-
secondaryText:
|
|
601
|
-
zeroStateText:
|
|
505
|
+
secondaryText: I(t.amount, "0,0"),
|
|
506
|
+
zeroStateText: _ && t.amount === 0 ? n.add_amount : void 0,
|
|
602
507
|
children: /* @__PURE__ */ e(
|
|
603
|
-
|
|
508
|
+
ke,
|
|
604
509
|
{
|
|
605
510
|
amount: d,
|
|
606
511
|
autoFocus: !0,
|
|
607
512
|
error: b,
|
|
608
513
|
fullWidth: !0,
|
|
609
514
|
minAmount: 0,
|
|
610
|
-
setAmount: (
|
|
515
|
+
setAmount: (h) => s(isNaN(Number(h)) ? d : Number(h)),
|
|
611
516
|
sx: { ".MuiTypography-Body": { p: 0 } }
|
|
612
517
|
}
|
|
613
518
|
)
|
|
614
519
|
}
|
|
615
520
|
);
|
|
616
|
-
}),
|
|
617
|
-
const { visibleCheckingAccounts: n, visibleSavingsAccounts:
|
|
618
|
-
const
|
|
619
|
-
|
|
521
|
+
}), It = ({ goal: t }) => {
|
|
522
|
+
const { visibleCheckingAccounts: n, visibleSavingsAccounts: m } = z(), { accounts: c, goals: p } = S(), { setAlert: r, setSelectedGoal: d, updateGoal: s } = G(), _ = !t.guid, [b, o] = T.useState(!1), a = async ({ balance: u, guid: h }) => {
|
|
523
|
+
const f = { ...t, account_guid: h, current_amount: u || 0 };
|
|
524
|
+
_ ? d(f) : (await s(f), r(p.alert_account_changed)), o(!1);
|
|
620
525
|
};
|
|
621
|
-
return /* @__PURE__ */
|
|
622
|
-
|
|
623
|
-
/* @__PURE__ */ e(
|
|
526
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
527
|
+
_ && !t.account_guid ? /* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => o(!0), children: [
|
|
528
|
+
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
624
529
|
/* @__PURE__ */ e(ve, { filled: !0 }),
|
|
625
|
-
|
|
530
|
+
p.details_add_account
|
|
626
531
|
] }) }),
|
|
627
|
-
/* @__PURE__ */ e(
|
|
628
|
-
] }) }) : /* @__PURE__ */
|
|
629
|
-
/* @__PURE__ */ e(
|
|
532
|
+
/* @__PURE__ */ e(V, { color: "primary" })
|
|
533
|
+
] }) }) : /* @__PURE__ */ l(g, { sx: { gap: 8, my: 24, mx: 24 }, children: [
|
|
534
|
+
/* @__PURE__ */ e(ue, { onClick: () => o(!0), variant: "text", children: p.details_change_account }),
|
|
630
535
|
/* @__PURE__ */ e(
|
|
631
|
-
|
|
536
|
+
C,
|
|
632
537
|
{
|
|
633
538
|
color: "text.secondary",
|
|
634
539
|
sx: { textAlign: "center", whiteSpace: "wrap" },
|
|
635
540
|
variant: "Paragraph",
|
|
636
|
-
children:
|
|
541
|
+
children: O(p.details_change_account_description, t.name)
|
|
637
542
|
}
|
|
638
543
|
)
|
|
639
544
|
] }),
|
|
640
|
-
/* @__PURE__ */ e(
|
|
641
|
-
n.length > 0 && /* @__PURE__ */ e(
|
|
642
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((u) => /* @__PURE__ */ e(
|
|
643
|
-
/* @__PURE__ */ e(
|
|
545
|
+
/* @__PURE__ */ e(J, { isOpen: b, onClose: () => o(!1), title: p.details_change_account, children: /* @__PURE__ */ l(g, { children: [
|
|
546
|
+
n.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[1] }),
|
|
547
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: n.map((u) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => a(u), children: [
|
|
548
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
644
549
|
te,
|
|
645
550
|
{
|
|
646
551
|
alt: u?.name || "",
|
|
@@ -648,17 +553,17 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
648
553
|
}
|
|
649
554
|
) }),
|
|
650
555
|
/* @__PURE__ */ e(
|
|
651
|
-
|
|
556
|
+
w,
|
|
652
557
|
{
|
|
653
558
|
primary: u?.name || u?.feed_name,
|
|
654
|
-
secondary:
|
|
559
|
+
secondary: I(u?.balance || 0, "0,0.00")
|
|
655
560
|
}
|
|
656
561
|
),
|
|
657
|
-
/* @__PURE__ */ e(
|
|
562
|
+
/* @__PURE__ */ e(V, {})
|
|
658
563
|
] }) }, u.guid)) }),
|
|
659
|
-
|
|
660
|
-
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children:
|
|
661
|
-
/* @__PURE__ */ e(
|
|
564
|
+
m.length > 0 && /* @__PURE__ */ e(C, { bold: !0, sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: c.account_types[2] }),
|
|
565
|
+
/* @__PURE__ */ e(L, { sx: { bgcolor: "background.paper" }, children: m.map((u) => /* @__PURE__ */ e(k, { children: /* @__PURE__ */ l(M, { onClick: () => a(u), children: [
|
|
566
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
662
567
|
te,
|
|
663
568
|
{
|
|
664
569
|
alt: u?.name || "",
|
|
@@ -666,37 +571,37 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
666
571
|
}
|
|
667
572
|
) }),
|
|
668
573
|
/* @__PURE__ */ e(
|
|
669
|
-
|
|
574
|
+
w,
|
|
670
575
|
{
|
|
671
576
|
primary: u?.name || u?.feed_name,
|
|
672
|
-
secondary:
|
|
577
|
+
secondary: I(u?.balance || 0, "0,0.00")
|
|
673
578
|
}
|
|
674
579
|
),
|
|
675
|
-
/* @__PURE__ */ e(
|
|
580
|
+
/* @__PURE__ */ e(V, {})
|
|
676
581
|
] }) }, u.guid)) }),
|
|
677
582
|
/* @__PURE__ */ e(
|
|
678
583
|
Ae,
|
|
679
584
|
{
|
|
680
|
-
description:
|
|
681
|
-
label:
|
|
682
|
-
title:
|
|
585
|
+
description: p.connect_description,
|
|
586
|
+
label: p.connect_button,
|
|
587
|
+
title: p.connect_title
|
|
683
588
|
}
|
|
684
589
|
)
|
|
685
590
|
] }) })
|
|
686
591
|
] });
|
|
687
|
-
},
|
|
688
|
-
const { goals: n } =
|
|
592
|
+
}, Gt = D(({ goal: t }) => {
|
|
593
|
+
const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateGoal: p } = G(), [r, d] = T.useState(t.name), s = !t.guid, _ = t.track_type === i.SAVINGS_TRACK && t.has_been_spent || t.track_type !== i.SAVINGS_TRACK && t.is_complete, b = async () => {
|
|
689
594
|
const a = { ...t, name: r };
|
|
690
|
-
t.name = r,
|
|
595
|
+
t.name = r, s ? c(a) : (await p(a), m(n.alert_goal_updated_name));
|
|
691
596
|
}, o = () => {
|
|
692
597
|
setTimeout(() => {
|
|
693
598
|
d(t.name);
|
|
694
599
|
}, 250);
|
|
695
600
|
};
|
|
696
601
|
return /* @__PURE__ */ e(
|
|
697
|
-
|
|
602
|
+
q,
|
|
698
603
|
{
|
|
699
|
-
isDisabled:
|
|
604
|
+
isDisabled: _,
|
|
700
605
|
isSaveDisabled: !r,
|
|
701
606
|
label: n.details_goal_name,
|
|
702
607
|
onCancel: o,
|
|
@@ -715,11 +620,11 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
715
620
|
)
|
|
716
621
|
}
|
|
717
622
|
);
|
|
718
|
-
}),
|
|
719
|
-
const { goals: n } =
|
|
623
|
+
}), Nt = ({ goal: t }) => {
|
|
624
|
+
const { goals: n } = S(), { setAlert: m, setSelectedGoal: c, updateRetirementGoal: p } = G(), [r, d] = T.useState(t.retirement_age || 65), s = !t.guid, _ = async () => {
|
|
720
625
|
if (!isNaN(r)) {
|
|
721
626
|
const a = { ...t, retirement_age: r };
|
|
722
|
-
t.retirement_age = r,
|
|
627
|
+
t.retirement_age = r, s ? c(a) : (await p(a), m(n.alert_goal_updated_retirement_age));
|
|
723
628
|
}
|
|
724
629
|
}, b = () => {
|
|
725
630
|
setTimeout(() => {
|
|
@@ -727,16 +632,16 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
727
632
|
}, 250);
|
|
728
633
|
}, o = !r || isNaN(r) || r < 20 || r >= 100;
|
|
729
634
|
return /* @__PURE__ */ e(
|
|
730
|
-
|
|
635
|
+
q,
|
|
731
636
|
{
|
|
732
637
|
isDisabled: t.is_complete,
|
|
733
638
|
isSaveDisabled: o,
|
|
734
639
|
label: n.details_retirement_age,
|
|
735
640
|
onCancel: b,
|
|
736
|
-
onSave:
|
|
641
|
+
onSave: _,
|
|
737
642
|
primaryText: n.details_retirement_age,
|
|
738
643
|
secondaryText: `${t.retirement_age}`,
|
|
739
|
-
zeroStateText:
|
|
644
|
+
zeroStateText: s && !t.retirement_age ? n.add_age : void 0,
|
|
740
645
|
children: /* @__PURE__ */ e(
|
|
741
646
|
De,
|
|
742
647
|
{
|
|
@@ -749,302 +654,302 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
749
654
|
)
|
|
750
655
|
}
|
|
751
656
|
);
|
|
752
|
-
},
|
|
753
|
-
const { goals: n } =
|
|
754
|
-
r &&
|
|
657
|
+
}, kt = D(({ goal: t }) => {
|
|
658
|
+
const { goals: n } = S(), { user: m, updateUser: c } = Ge(), { setAlert: p } = G(), [r, d] = T.useState(ne(m.birthday ?? 0)), [s, _] = T.useState(null), b = t.is_complete, o = async () => {
|
|
659
|
+
r && ct(r) && (await c({ ...m, birthday: lt(r) }), p(n.alert_goal_updated_birthday));
|
|
755
660
|
};
|
|
756
661
|
return /* @__PURE__ */ e(
|
|
757
|
-
|
|
662
|
+
q,
|
|
758
663
|
{
|
|
759
664
|
isDisabled: b,
|
|
760
|
-
isSaveDisabled: !!
|
|
665
|
+
isSaveDisabled: !!s,
|
|
761
666
|
label: n.details_birthday,
|
|
762
667
|
onSave: o,
|
|
763
668
|
primaryText: n.details_birthday,
|
|
764
|
-
secondaryText: `${
|
|
765
|
-
zeroStateText: !t.guid && !
|
|
766
|
-
children: /* @__PURE__ */ e(ut, { dateAdapter:
|
|
767
|
-
|
|
669
|
+
secondaryText: `${he(ne(m.birthday ?? 0), be.MONTH_DAY_YEAR)}`,
|
|
670
|
+
zeroStateText: !t.guid && !m.birthday ? n.add_birthday : void 0,
|
|
671
|
+
children: /* @__PURE__ */ e(ut, { dateAdapter: dt, children: /* @__PURE__ */ e(
|
|
672
|
+
mt,
|
|
768
673
|
{
|
|
769
674
|
label: n.details_birthday,
|
|
770
675
|
onChange: d,
|
|
771
|
-
onError: (a) =>
|
|
676
|
+
onError: (a) => _(a),
|
|
772
677
|
sx: { width: "100%" },
|
|
773
678
|
value: r
|
|
774
679
|
}
|
|
775
680
|
) })
|
|
776
681
|
}
|
|
777
682
|
);
|
|
778
|
-
}),
|
|
779
|
-
const { goals: n } =
|
|
780
|
-
addRetirementGoalAccount:
|
|
781
|
-
newRetirementGoalAccounts:
|
|
683
|
+
}), wt = ({ goal: t }) => {
|
|
684
|
+
const { goals: n } = S(), { visibleRetirementAccounts: m } = z(), {
|
|
685
|
+
addRetirementGoalAccount: c,
|
|
686
|
+
newRetirementGoalAccounts: p,
|
|
782
687
|
retirementGoalAccounts: r,
|
|
783
688
|
selectedGoal: d,
|
|
784
|
-
setAlert:
|
|
785
|
-
setNewRetirementGoalAccounts:
|
|
689
|
+
setAlert: s,
|
|
690
|
+
setNewRetirementGoalAccounts: _,
|
|
786
691
|
setSelectedGoal: b
|
|
787
|
-
} = G(), [o, a] =
|
|
788
|
-
(
|
|
789
|
-
),
|
|
790
|
-
(
|
|
791
|
-
),
|
|
792
|
-
const
|
|
793
|
-
account_guid:
|
|
692
|
+
} = G(), [o, a] = T.useState(!1), u = !t.guid, h = m.filter(
|
|
693
|
+
(y) => u ? p.find((A) => A.account_guid === y.guid) : r.find((A) => A.account_guid === y.guid)
|
|
694
|
+
), f = m.filter(
|
|
695
|
+
(y) => !r.find((A) => A.account_guid === y.guid)
|
|
696
|
+
), v = async (y) => {
|
|
697
|
+
const A = y.map((R) => ({
|
|
698
|
+
account_guid: R.guid,
|
|
794
699
|
retirement_goal_guid: t.guid
|
|
795
700
|
}));
|
|
796
701
|
if (u)
|
|
797
|
-
|
|
702
|
+
_(A);
|
|
798
703
|
else
|
|
799
|
-
for (const
|
|
800
|
-
await
|
|
704
|
+
for (const R of A)
|
|
705
|
+
await c(R), s(n.alert_account_added);
|
|
801
706
|
b({
|
|
802
707
|
...d,
|
|
803
|
-
current_amount:
|
|
708
|
+
current_amount: y.reduce((R, N) => R + (N.balance || 0), 0)
|
|
804
709
|
}), a(!1);
|
|
805
710
|
};
|
|
806
|
-
return /* @__PURE__ */
|
|
807
|
-
|
|
808
|
-
/* @__PURE__ */ e(Oe, { account:
|
|
809
|
-
/* @__PURE__ */ e(
|
|
810
|
-
] },
|
|
811
|
-
/* @__PURE__ */ e(
|
|
812
|
-
/* @__PURE__ */ e(
|
|
711
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
712
|
+
h.map((y) => /* @__PURE__ */ l(g, { children: [
|
|
713
|
+
/* @__PURE__ */ e(Oe, { account: y }),
|
|
714
|
+
/* @__PURE__ */ e(x, {})
|
|
715
|
+
] }, y.guid)),
|
|
716
|
+
/* @__PURE__ */ e(k, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ l(M, { onClick: () => a(!0), children: [
|
|
717
|
+
/* @__PURE__ */ e(w, { children: /* @__PURE__ */ l(g, { alignItems: "center", color: "primary.main", direction: "row", gap: 8, children: [
|
|
813
718
|
/* @__PURE__ */ e(ve, { filled: !0 }),
|
|
814
719
|
n.details_add_account
|
|
815
720
|
] }) }),
|
|
816
|
-
/* @__PURE__ */ e(
|
|
721
|
+
/* @__PURE__ */ e(V, { color: "primary" })
|
|
817
722
|
] }) }),
|
|
818
723
|
/* @__PURE__ */ e(
|
|
819
724
|
Be,
|
|
820
725
|
{
|
|
821
|
-
accounts:
|
|
726
|
+
accounts: f,
|
|
822
727
|
isOpen: o,
|
|
823
728
|
onClose: () => a(!1),
|
|
824
|
-
onSave:
|
|
729
|
+
onSave: v,
|
|
825
730
|
title: n.add_select_accounts
|
|
826
731
|
}
|
|
827
732
|
)
|
|
828
733
|
] });
|
|
829
|
-
},
|
|
830
|
-
const { goals: n } =
|
|
831
|
-
() =>
|
|
832
|
-
[
|
|
833
|
-
),
|
|
734
|
+
}, Dt = D(({ goal: t }) => {
|
|
735
|
+
const { goals: n } = S(), { visibleAccounts: m } = z(), c = T.useMemo(
|
|
736
|
+
() => m.find((d) => d.guid === t.account_guid),
|
|
737
|
+
[m, t]
|
|
738
|
+
), p = t.track_type;
|
|
834
739
|
let r = n.details_save_title;
|
|
835
|
-
return t.track_type ===
|
|
836
|
-
/* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */ e(
|
|
740
|
+
return t.track_type === i.DEBT_TRACK ? r = n.details_debt_title : t.track_type === i.RETIREMENT_TRACK && (r = n.details_retirement_title), /* @__PURE__ */ l(g, { children: [
|
|
741
|
+
/* @__PURE__ */ l(g, { mx: 24, children: [
|
|
742
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: r }),
|
|
838
743
|
/* @__PURE__ */ e(Le, { goal: t, isInDrawer: !0 }),
|
|
839
|
-
/* @__PURE__ */ e(
|
|
744
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, mt: 24 }, variant: "XSmall", children: n.details_title })
|
|
840
745
|
] }),
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
|
|
843
|
-
|
|
746
|
+
/* @__PURE__ */ l(L, { sx: { bgcolor: "background.paper" }, children: [
|
|
747
|
+
p !== i.RETIREMENT_TRACK ? /* @__PURE__ */ e(Gt, { goal: t }) : /* @__PURE__ */ e(k, { sx: { px: 24 }, children: /* @__PURE__ */ e(
|
|
748
|
+
w,
|
|
844
749
|
{
|
|
845
|
-
primary: /* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */ e(
|
|
847
|
-
/* @__PURE__ */ e(
|
|
750
|
+
primary: /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
751
|
+
/* @__PURE__ */ e(C, { variant: "body1", children: n.details_goal_name }),
|
|
752
|
+
/* @__PURE__ */ e(C, { bold: !0, color: "text.primary", sx: { mr: 4 }, variant: "body1", children: n.retirement })
|
|
848
753
|
] }),
|
|
849
754
|
primaryTypographyProps: { variant: "body1" }
|
|
850
755
|
}
|
|
851
756
|
) }),
|
|
852
|
-
/* @__PURE__ */ e(
|
|
853
|
-
(
|
|
854
|
-
/* @__PURE__ */ e(
|
|
855
|
-
/* @__PURE__ */ e(
|
|
757
|
+
/* @__PURE__ */ e(x, { sx: { ml: 24 } }),
|
|
758
|
+
(p === i.SAVINGS_TRACK || p === i.RETIREMENT_TRACK) && /* @__PURE__ */ l($, { children: [
|
|
759
|
+
/* @__PURE__ */ e(vt, { goal: t }),
|
|
760
|
+
/* @__PURE__ */ e(x, { sx: { ml: p === i.RETIREMENT_TRACK ? 24 : 0 } })
|
|
856
761
|
] }),
|
|
857
|
-
t.track_type ===
|
|
762
|
+
t.track_type === i.DEBT_TRACK && /* @__PURE__ */ l($, { children: [
|
|
763
|
+
/* @__PURE__ */ e(rt, { goal: t }),
|
|
764
|
+
/* @__PURE__ */ e(x, { sx: { ml: 24 } }),
|
|
858
765
|
/* @__PURE__ */ e(it, { goal: t }),
|
|
859
|
-
/* @__PURE__ */ e(
|
|
766
|
+
/* @__PURE__ */ e(x, { sx: { ml: 24 } }),
|
|
860
767
|
/* @__PURE__ */ e(st, { goal: t }),
|
|
861
|
-
/* @__PURE__ */ e(
|
|
862
|
-
/* @__PURE__ */ e(lt, { goal: t }),
|
|
863
|
-
/* @__PURE__ */ e(E, { variant: "fullWidth" })
|
|
768
|
+
/* @__PURE__ */ e(x, { variant: "fullWidth" })
|
|
864
769
|
] }),
|
|
865
|
-
t.track_type ===
|
|
770
|
+
t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
|
|
771
|
+
/* @__PURE__ */ e(Nt, { goal: t }),
|
|
772
|
+
/* @__PURE__ */ e(x, { sx: { ml: 24 } }),
|
|
866
773
|
/* @__PURE__ */ e(kt, { goal: t }),
|
|
867
|
-
/* @__PURE__ */ e(
|
|
868
|
-
/* @__PURE__ */ e(Dt, { goal: t }),
|
|
869
|
-
/* @__PURE__ */ e(E, { variant: "fullWidth" })
|
|
774
|
+
/* @__PURE__ */ e(x, { variant: "fullWidth" })
|
|
870
775
|
] })
|
|
871
776
|
] }),
|
|
872
|
-
/* @__PURE__ */ e(
|
|
873
|
-
t.track_type !==
|
|
874
|
-
/* @__PURE__ */ e(Oe, { account:
|
|
875
|
-
/* @__PURE__ */ e(
|
|
777
|
+
/* @__PURE__ */ e(C, { color: "text.secondary", sx: { mb: 4, ml: 24, mt: 12 }, variant: "XSmall", children: t.track_type === i.RETIREMENT_TRACK ? n.details_accounts : n.details_account }),
|
|
778
|
+
t.track_type !== i.RETIREMENT_TRACK && c && /* @__PURE__ */ l($, { children: [
|
|
779
|
+
/* @__PURE__ */ e(Oe, { account: c }),
|
|
780
|
+
/* @__PURE__ */ e(x, {})
|
|
876
781
|
] }),
|
|
877
|
-
t.track_type ===
|
|
878
|
-
/* @__PURE__ */ e(
|
|
879
|
-
/* @__PURE__ */ e(
|
|
782
|
+
t.track_type === i.RETIREMENT_TRACK && /* @__PURE__ */ l($, { children: [
|
|
783
|
+
/* @__PURE__ */ e(wt, { goal: t }),
|
|
784
|
+
/* @__PURE__ */ e(x, {})
|
|
880
785
|
] }),
|
|
881
|
-
t.track_type ===
|
|
786
|
+
t.track_type === i.SAVINGS_TRACK && !t.is_complete && /* @__PURE__ */ e(It, { goal: t })
|
|
882
787
|
] });
|
|
883
|
-
}),
|
|
884
|
-
const { visibleRetirementAccounts: n } =
|
|
885
|
-
addGoal:
|
|
788
|
+
}), Kt = D(({ onClose: t }) => {
|
|
789
|
+
const { visibleRetirementAccounts: n } = z(), { goals: m, common: c } = S(), {
|
|
790
|
+
addGoal: p,
|
|
886
791
|
addRetirementGoal: r,
|
|
887
792
|
deleteGoal: d,
|
|
888
|
-
deleteRetirementGoal:
|
|
889
|
-
newRetirementGoalAccounts:
|
|
793
|
+
deleteRetirementGoal: s,
|
|
794
|
+
newRetirementGoalAccounts: _,
|
|
890
795
|
retirementGoalAccounts: b,
|
|
891
796
|
selectedGoal: o,
|
|
892
797
|
setAlert: a,
|
|
893
798
|
setSelectedGoal: u,
|
|
894
|
-
updateGoal:
|
|
895
|
-
} = G(), { user:
|
|
896
|
-
const
|
|
897
|
-
return n.filter((
|
|
898
|
-
}, [
|
|
799
|
+
updateGoal: h
|
|
800
|
+
} = G(), { user: f } = Ge(), [v, y] = T.useState(!1), A = !o?.guid, R = o?.track_type === i.SAVINGS_TRACK && o.is_complete && !o.has_been_spent, N = T.useMemo(() => {
|
|
801
|
+
const E = A ? _ : b;
|
|
802
|
+
return n.filter((j) => E.some((F) => F.account_guid === j.guid));
|
|
803
|
+
}, [A, n, _, b]), K = T.useMemo(() => {
|
|
899
804
|
if (!o) return !1;
|
|
900
|
-
if (!
|
|
901
|
-
const { account_guid:
|
|
902
|
-
return
|
|
903
|
-
}, [o, N,
|
|
904
|
-
let U =
|
|
905
|
-
|
|
906
|
-
const
|
|
805
|
+
if (!A && !R) return !0;
|
|
806
|
+
const { account_guid: E, track_type: j, name: F, amount: ee, retirement_age: B } = o;
|
|
807
|
+
return j === i.SAVINGS_TRACK ? E ? !!F && !!ee : !1 : j === i.RETIREMENT_TRACK ? N.length ? !!F && !!ee && !!B && !!f.birthday : !1 : !0;
|
|
808
|
+
}, [o, N, f.birthday]);
|
|
809
|
+
let U = c.delete_button, Y = () => y(!0);
|
|
810
|
+
A ? (Y = () => oe(), U = c.save_button) : R && (Y = () => Q(), U = m.mark_as_complete_button);
|
|
811
|
+
const oe = async () => {
|
|
907
812
|
if (o) {
|
|
908
|
-
const
|
|
909
|
-
|
|
813
|
+
const E = o.track_type;
|
|
814
|
+
E !== i.RETIREMENT_TRACK ? await p(o) : E === i.RETIREMENT_TRACK && await r({ ...o, target_amount: o.amount }), a(m.alert_goal_added), u(void 0), E && t?.(E);
|
|
910
815
|
}
|
|
911
816
|
}, W = async () => {
|
|
912
|
-
o && (o.track_type !==
|
|
817
|
+
o && (o.track_type !== i.RETIREMENT_TRACK ? await d(o.guid) : o.track_type === i.RETIREMENT_TRACK && await s(o), a(m.alert_goal_deleted), u(void 0));
|
|
913
818
|
}, Q = async () => {
|
|
914
|
-
const
|
|
819
|
+
const E = {
|
|
915
820
|
...o,
|
|
916
821
|
has_been_spent: !0
|
|
917
822
|
};
|
|
918
|
-
await
|
|
823
|
+
await h(E), a(m.alert_goal_completed), u(void 0);
|
|
919
824
|
};
|
|
920
|
-
return /* @__PURE__ */
|
|
825
|
+
return /* @__PURE__ */ l(g, { children: [
|
|
921
826
|
/* @__PURE__ */ e(
|
|
922
|
-
|
|
827
|
+
J,
|
|
923
828
|
{
|
|
924
|
-
ariaLabelClose:
|
|
925
|
-
hasSecondaryAction:
|
|
829
|
+
ariaLabelClose: c.close_aria,
|
|
830
|
+
hasSecondaryAction: A,
|
|
926
831
|
isOpen: !!o,
|
|
927
|
-
isPrimaryDisabled: !
|
|
832
|
+
isPrimaryDisabled: !K,
|
|
928
833
|
onClose: () => u(void 0),
|
|
929
834
|
onPrimaryAction: Y,
|
|
930
|
-
primaryColor:
|
|
835
|
+
primaryColor: A || R ? "primary" : "error",
|
|
931
836
|
primaryText: U,
|
|
932
837
|
secondaryColor: "primary",
|
|
933
|
-
title:
|
|
934
|
-
children: o && /* @__PURE__ */ e(
|
|
838
|
+
title: m.goal_details,
|
|
839
|
+
children: o && /* @__PURE__ */ e(Dt, { goal: o })
|
|
935
840
|
}
|
|
936
841
|
),
|
|
937
842
|
/* @__PURE__ */ e(
|
|
938
|
-
|
|
843
|
+
et,
|
|
939
844
|
{
|
|
940
|
-
copy: { close_aria:
|
|
941
|
-
isOpen:
|
|
845
|
+
copy: { close_aria: c.close_aria, title: m.delete_goal },
|
|
846
|
+
isOpen: v,
|
|
942
847
|
maxWidth: "xs",
|
|
943
|
-
onClose: () =>
|
|
848
|
+
onClose: () => y(!1),
|
|
944
849
|
onPrimaryAction: W,
|
|
945
850
|
primaryColor: "error",
|
|
946
|
-
primaryText:
|
|
947
|
-
children: /* @__PURE__ */ e(
|
|
851
|
+
primaryText: c.delete_button,
|
|
852
|
+
children: /* @__PURE__ */ e(C, { sx: { textWrap: "wrap" }, variant: "Paragraph", children: O(m.delete_description, o?.name || "") })
|
|
948
853
|
}
|
|
949
854
|
)
|
|
950
855
|
] });
|
|
951
|
-
}),
|
|
952
|
-
const { onEvent:
|
|
856
|
+
}), Pn = D(({ onBackClick: t, sx: n }) => {
|
|
857
|
+
const { onEvent: m } = Ne(), { isMobile: c } = pe(), { isAccountDataLoaded: p, loadAccountData: r } = z(), { isInitialized: d } = _e(), { goals: s, common: _ } = S(), {
|
|
953
858
|
alert: b,
|
|
954
859
|
goals: o,
|
|
955
860
|
isAllGoalDataLoaded: a,
|
|
956
861
|
loadGoalData: u,
|
|
957
|
-
monthlyCashFlowProfile:
|
|
958
|
-
setAlert:
|
|
959
|
-
retirmentGoals:
|
|
960
|
-
} = G(), [
|
|
862
|
+
monthlyCashFlowProfile: h,
|
|
863
|
+
setAlert: f,
|
|
864
|
+
retirmentGoals: v
|
|
865
|
+
} = G(), [y, A] = T.useState(0), [R, N] = T.useState(!1), K = h?.amount_allocated_for_savings_goals || 0, U = h?.amount_allocated_for_debt_goals || 0, Y = h?.amount_allocated_for_retirement_goals || 0;
|
|
961
866
|
Ke({
|
|
962
867
|
widgetName: "GoalsWidget",
|
|
963
868
|
isLoaded: a
|
|
964
|
-
}),
|
|
965
|
-
|
|
966
|
-
}, []),
|
|
869
|
+
}), T.useEffect(() => {
|
|
870
|
+
p || r().finally(), m(X.GOALS_VIEW);
|
|
871
|
+
}, []), T.useEffect(() => {
|
|
967
872
|
d && u().finally();
|
|
968
873
|
}, [d]);
|
|
969
|
-
const
|
|
970
|
-
|
|
874
|
+
const oe = () => {
|
|
875
|
+
m(X.GOALS_CLICK_FILTER);
|
|
971
876
|
}, W = () => {
|
|
972
|
-
N(!0),
|
|
877
|
+
N(!0), m(X.GOALS_CLICK_ADD);
|
|
973
878
|
}, Q = (B) => {
|
|
974
|
-
N(!1), B ===
|
|
975
|
-
},
|
|
976
|
-
() => a && (o.length === 0 || o.every(({ track_type: B }) => !B) &&
|
|
977
|
-
[o, a,
|
|
879
|
+
N(!1), B === i.SAVINGS_TRACK ? A(0) : B === i.DEBT_TRACK ? A(1) : B === i.RETIREMENT_TRACK && A(2);
|
|
880
|
+
}, E = T.useMemo(
|
|
881
|
+
() => a && (o.length === 0 || o.every(({ track_type: B }) => !B) && v.length === 0),
|
|
882
|
+
[o, a, v]
|
|
978
883
|
);
|
|
979
884
|
if (!d || !a)
|
|
980
885
|
return /* @__PURE__ */ e(Me, {});
|
|
981
|
-
const
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
),
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
), ee =
|
|
988
|
-
|
|
989
|
-
|
|
886
|
+
const j = O(
|
|
887
|
+
c ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
888
|
+
I(K, "0,0")
|
|
889
|
+
), F = O(
|
|
890
|
+
c ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
891
|
+
I(U, "0,0")
|
|
892
|
+
), ee = O(
|
|
893
|
+
c ? s.tab_subtitle_mobile : s.tab_subtitle,
|
|
894
|
+
I(Y, "0,0")
|
|
990
895
|
);
|
|
991
|
-
return /* @__PURE__ */
|
|
992
|
-
|
|
896
|
+
return /* @__PURE__ */ l(
|
|
897
|
+
_t,
|
|
993
898
|
{
|
|
994
899
|
actions: [
|
|
995
900
|
{
|
|
996
901
|
iconName: "add",
|
|
997
|
-
label:
|
|
902
|
+
label: s.add_title,
|
|
998
903
|
onClick: W
|
|
999
904
|
}
|
|
1000
905
|
],
|
|
1001
|
-
onAccountsFilterClick:
|
|
906
|
+
onAccountsFilterClick: oe,
|
|
1002
907
|
onBackClick: t,
|
|
1003
908
|
sx: n,
|
|
1004
|
-
title:
|
|
909
|
+
title: s.title,
|
|
1005
910
|
children: [
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1008
|
-
|
|
911
|
+
/* @__PURE__ */ l(g, { mx: c ? 0 : 48, my: 24, children: [
|
|
912
|
+
/* @__PURE__ */ l(
|
|
913
|
+
Fe,
|
|
1009
914
|
{
|
|
1010
|
-
onChange: (B, We) =>
|
|
915
|
+
onChange: (B, We) => A(We),
|
|
1011
916
|
sx: { bgcolor: "background.paper" },
|
|
1012
917
|
textColor: "primary",
|
|
1013
|
-
value:
|
|
918
|
+
value: E ? !1 : y,
|
|
1014
919
|
variant: "fullWidth",
|
|
1015
920
|
children: [
|
|
1016
921
|
/* @__PURE__ */ e(
|
|
1017
|
-
|
|
922
|
+
re,
|
|
1018
923
|
{
|
|
1019
|
-
disabled:
|
|
1020
|
-
label: /* @__PURE__ */ e(
|
|
924
|
+
disabled: E,
|
|
925
|
+
label: /* @__PURE__ */ e(ie, { subtitle: j, title: s.tab_saving_title })
|
|
1021
926
|
}
|
|
1022
927
|
),
|
|
1023
928
|
/* @__PURE__ */ e(
|
|
1024
|
-
|
|
929
|
+
re,
|
|
1025
930
|
{
|
|
1026
|
-
disabled:
|
|
1027
|
-
label: /* @__PURE__ */ e(
|
|
931
|
+
disabled: E,
|
|
932
|
+
label: /* @__PURE__ */ e(ie, { subtitle: F, title: s.tab_debt_title })
|
|
1028
933
|
}
|
|
1029
934
|
),
|
|
1030
935
|
/* @__PURE__ */ e(
|
|
1031
|
-
|
|
936
|
+
re,
|
|
1032
937
|
{
|
|
1033
|
-
disabled:
|
|
1034
|
-
label: /* @__PURE__ */ e(
|
|
938
|
+
disabled: E,
|
|
939
|
+
label: /* @__PURE__ */ e(ie, { subtitle: ee, title: s.tab_retirement_title })
|
|
1035
940
|
}
|
|
1036
941
|
)
|
|
1037
942
|
]
|
|
1038
943
|
}
|
|
1039
944
|
),
|
|
1040
|
-
|
|
1041
|
-
|
|
945
|
+
E ? /* @__PURE__ */ e(
|
|
946
|
+
pt,
|
|
1042
947
|
{
|
|
1043
|
-
header:
|
|
948
|
+
header: s.create_goals_header,
|
|
1044
949
|
icon: "trophy",
|
|
1045
950
|
onClick: W,
|
|
1046
|
-
primaryButton:
|
|
1047
|
-
subText:
|
|
951
|
+
primaryButton: s.add_goals_button,
|
|
952
|
+
subText: s.empty_state_subheader,
|
|
1048
953
|
sx: {
|
|
1049
954
|
width: { sm: 432 },
|
|
1050
955
|
".buttons-footer": {
|
|
@@ -1052,67 +957,67 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1052
957
|
}
|
|
1053
958
|
}
|
|
1054
959
|
}
|
|
1055
|
-
) : /* @__PURE__ */
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
960
|
+
) : /* @__PURE__ */ l($, { children: [
|
|
961
|
+
y === 0 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.SAVINGS_TRACK }),
|
|
962
|
+
y === 1 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.DEBT_TRACK }),
|
|
963
|
+
y === 2 && /* @__PURE__ */ e(se, { onAddGoals: W, trackType: i.RETIREMENT_TRACK })
|
|
1059
964
|
] })
|
|
1060
965
|
] }),
|
|
1061
|
-
/* @__PURE__ */ e(
|
|
966
|
+
/* @__PURE__ */ e(Kt, { onClose: Q }),
|
|
1062
967
|
/* @__PURE__ */ e(
|
|
1063
|
-
|
|
968
|
+
J,
|
|
1064
969
|
{
|
|
1065
|
-
ariaLabelClose:
|
|
1066
|
-
isOpen:
|
|
970
|
+
ariaLabelClose: _.close_aria,
|
|
971
|
+
isOpen: R,
|
|
1067
972
|
onClose: () => N(!1),
|
|
1068
|
-
title:
|
|
1069
|
-
children: /* @__PURE__ */ e(
|
|
973
|
+
title: s.add_goal_title,
|
|
974
|
+
children: /* @__PURE__ */ e(xt, { onClose: Q })
|
|
1070
975
|
}
|
|
1071
976
|
),
|
|
1072
|
-
/* @__PURE__ */ e(
|
|
977
|
+
/* @__PURE__ */ e(je, { onClose: () => f(""), open: !!b, children: /* @__PURE__ */ e(ze, { onClose: () => f(""), severity: "success", variant: "filled", children: b }) })
|
|
1073
978
|
]
|
|
1074
979
|
}
|
|
1075
980
|
);
|
|
1076
|
-
}),
|
|
1077
|
-
const { goals: n } =
|
|
1078
|
-
backgroundColor:
|
|
1079
|
-
color:
|
|
981
|
+
}), Mt = D(({ goal: t }) => {
|
|
982
|
+
const { goals: n } = S(), m = yt(), {
|
|
983
|
+
backgroundColor: c,
|
|
984
|
+
color: p,
|
|
1080
985
|
percentage: r,
|
|
1081
986
|
projectedText: d
|
|
1082
|
-
} =
|
|
1083
|
-
let
|
|
1084
|
-
return t.track_type ===
|
|
1085
|
-
/* @__PURE__ */ e(
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */ e(
|
|
1088
|
-
t.projected_to_complete_at && /* @__PURE__ */ e(
|
|
987
|
+
} = de(n, t), s = Math.round(r * 100);
|
|
988
|
+
let _ = /* @__PURE__ */ e(Re, {});
|
|
989
|
+
return t.track_type === i.DEBT_TRACK ? _ = /* @__PURE__ */ e(Ee, {}) : t.track_type === i.RETIREMENT_TRACK && (_ = /* @__PURE__ */ e(xe, {})), /* @__PURE__ */ l(g, { alignItems: "center", direction: "row", spacing: 12, sx: { py: 12 }, children: [
|
|
990
|
+
/* @__PURE__ */ e(ae, { sx: { bgcolor: c, color: p, height: 32, width: 32 }, variant: "rounded", children: _ }),
|
|
991
|
+
/* @__PURE__ */ l(bt, { sx: { width: "100%" }, children: [
|
|
992
|
+
/* @__PURE__ */ e(me, { fontSize: 15, fontWeight: 600, variant: "body1", children: t.name }),
|
|
993
|
+
t.projected_to_complete_at && /* @__PURE__ */ e(C, { color: "text.secondary", variant: "XSmall", children: d })
|
|
1089
994
|
] }),
|
|
1090
995
|
/* @__PURE__ */ e(
|
|
1091
|
-
|
|
996
|
+
gt,
|
|
1092
997
|
{
|
|
1093
|
-
backgroundStrokeColor:
|
|
1094
|
-
color:
|
|
1095
|
-
percent:
|
|
998
|
+
backgroundStrokeColor: m.palette.border.lighter,
|
|
999
|
+
color: m.palette.primary.main,
|
|
1000
|
+
percent: s,
|
|
1096
1001
|
size: 40,
|
|
1097
1002
|
strokeWidth: 3,
|
|
1098
|
-
children: /* @__PURE__ */ e(
|
|
1003
|
+
children: /* @__PURE__ */ e(H, { fontWeight: 700, variant: "caption", children: `${s}%` })
|
|
1099
1004
|
}
|
|
1100
1005
|
)
|
|
1101
1006
|
] });
|
|
1102
|
-
}),
|
|
1007
|
+
}), Lt = ({ header: t, subText: n, sx: m }) => /* @__PURE__ */ l(
|
|
1103
1008
|
g,
|
|
1104
1009
|
{
|
|
1105
1010
|
sx: {
|
|
1106
1011
|
alignItems: "center",
|
|
1107
1012
|
alignSelf: "center",
|
|
1108
1013
|
px: 24,
|
|
1109
|
-
...
|
|
1014
|
+
...m
|
|
1110
1015
|
},
|
|
1111
1016
|
children: [
|
|
1112
1017
|
/* @__PURE__ */ e(qe, { size: 32 }),
|
|
1113
|
-
/* @__PURE__ */ e(
|
|
1018
|
+
/* @__PURE__ */ e(me, { fontSize: 15, fontWeight: 600, children: t }),
|
|
1114
1019
|
/* @__PURE__ */ e(
|
|
1115
|
-
|
|
1020
|
+
H,
|
|
1116
1021
|
{
|
|
1117
1022
|
color: "text.secondary",
|
|
1118
1023
|
sx: { fontWeight: 400, maxWidth: { sm: 424 }, textAlign: "center" },
|
|
@@ -1122,49 +1027,49 @@ const Tt = (t, n) => n ? v(t, t < 1e3 ? "0" : "0.00a").replace(
|
|
|
1122
1027
|
)
|
|
1123
1028
|
]
|
|
1124
1029
|
}
|
|
1125
|
-
),
|
|
1126
|
-
const { isAccountDataLoaded: n, loadAccountData:
|
|
1030
|
+
), zn = D(({ onCTAClick: t }) => {
|
|
1031
|
+
const { isAccountDataLoaded: n, loadAccountData: m, visibleAccounts: c } = z(), { onEvent: p } = Ne(), { goals: r } = S(), { isInitialized: d } = _e(), { ongoingGoalsForMicroWidget: s, isAllGoalDataLoaded: _, loadGoalData: b } = G();
|
|
1127
1032
|
Ke({
|
|
1128
1033
|
widgetName: "GoalsMicroWidget",
|
|
1129
|
-
isLoaded:
|
|
1130
|
-
}),
|
|
1131
|
-
n ||
|
|
1132
|
-
}, []),
|
|
1133
|
-
d && (b().finally(),
|
|
1134
|
-
state:
|
|
1034
|
+
isLoaded: _
|
|
1035
|
+
}), T.useEffect(() => {
|
|
1036
|
+
n || m().finally();
|
|
1037
|
+
}, []), T.useEffect(() => {
|
|
1038
|
+
d && (b().finally(), p(X.GOALS_LOAD_WIDGET, {
|
|
1039
|
+
state: c?.length ? "default" : "zeroState"
|
|
1135
1040
|
}));
|
|
1136
1041
|
}, [d]);
|
|
1137
|
-
const o =
|
|
1138
|
-
() =>
|
|
1139
|
-
[
|
|
1042
|
+
const o = T.useMemo(
|
|
1043
|
+
() => _ && s.length === 0,
|
|
1044
|
+
[s, _]
|
|
1140
1045
|
), a = () => {
|
|
1141
|
-
|
|
1142
|
-
o ?
|
|
1046
|
+
p(
|
|
1047
|
+
o ? X.GOALS_CLICK_GET_STARTED : X.GOALS_CLICK_VIEW_DETAILS
|
|
1143
1048
|
), t();
|
|
1144
1049
|
};
|
|
1145
|
-
return !d || !
|
|
1146
|
-
|
|
1050
|
+
return !d || !_ ? /* @__PURE__ */ e(Me, {}) : /* @__PURE__ */ e(
|
|
1051
|
+
ft,
|
|
1147
1052
|
{
|
|
1148
1053
|
className: "mx-goals-microwidget",
|
|
1149
1054
|
ctaLabel: o ? r.get_started : r.view_details,
|
|
1150
1055
|
onCTAClick: a,
|
|
1151
1056
|
title: r.title,
|
|
1152
1057
|
children: o ? /* @__PURE__ */ e(
|
|
1153
|
-
|
|
1058
|
+
Lt,
|
|
1154
1059
|
{
|
|
1155
1060
|
header: r.create_goals_header,
|
|
1156
1061
|
subText: r.micro_zero_state_description
|
|
1157
1062
|
}
|
|
1158
|
-
) : /* @__PURE__ */ e(
|
|
1159
|
-
/* @__PURE__ */ e(
|
|
1160
|
-
|
|
1063
|
+
) : /* @__PURE__ */ e(ht, { sx: { justifyContent: "space-between" }, children: s.map((u, h) => /* @__PURE__ */ l(T.Fragment, { children: [
|
|
1064
|
+
/* @__PURE__ */ e(Mt, { goal: u }),
|
|
1065
|
+
h !== s.length - 1 && /* @__PURE__ */ e(x, {})
|
|
1161
1066
|
] }, u.guid)) })
|
|
1162
1067
|
}
|
|
1163
1068
|
);
|
|
1164
1069
|
});
|
|
1165
1070
|
export {
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1071
|
+
$n as GoalApi,
|
|
1072
|
+
Xn as GoalStore,
|
|
1073
|
+
zn as GoalsMicroWidget,
|
|
1074
|
+
Pn as GoalsWidget
|
|
1170
1075
|
};
|