@mx-cartographer/experiences 8.0.0-alpha.sms2 → 9.0.0-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 +217 -0
- package/dist/{Account-Cp30A3ad.mjs → Account-BIKn4XEZ.mjs} +1 -1
- package/dist/Account-CMjOp7S2.mjs +118 -0
- package/dist/AccountApi-DgZ8ILj1.mjs +19 -0
- package/dist/AccountDetailsHeader-BOV91g1o.mjs +95 -0
- package/dist/AccountDisplayName-CO7z3v99.mjs +11 -0
- package/dist/{AccountFields-CW6cIthP.mjs → AccountFields-BRRH37K1.mjs} +10 -11
- package/dist/{AccountListItem-DxmAs98Z.mjs → AccountListItem-Ds5C0mOT.mjs} +4 -4
- package/dist/{AccountStore-hIs-yA6W.mjs → AccountStore-BFKvXJSD.mjs} +79 -69
- package/dist/{Accounts-DUHkUyK4.mjs → Accounts-CuE8aSZN.mjs} +1 -1
- package/dist/{BudgetUtil-CIDAPPPT.mjs → BudgetUtil-CDSOZXem.mjs} +4 -4
- package/dist/CategorySelectorDrawer-C4aZYP4N.mjs +418 -0
- package/dist/CategoryStore-DEqAnHbi.mjs +186 -0
- package/dist/{CategoryUtil-DfVKKkRf.mjs → CategoryUtil-CFHBvaV4.mjs} +1 -1
- package/dist/{ConnectionsDrawer-CSo6AFkG.mjs → ConnectionsDrawer-BExzgE16.mjs} +5 -5
- package/dist/{CurrencyInput-BrGvhgVK.mjs → CurrencyInput-DDQ4DBrE.mjs} +1 -1
- package/dist/{CurrencyText-Dr0EZ7bp.mjs → CurrencyText-C-85TnUF.mjs} +3 -3
- package/dist/{DateUtil-CDPZw_-m.mjs → DateUtil-CVsMhbZU.mjs} +3 -3
- package/dist/{DebtsStore-hi1cqrRk.mjs → DebtsStore-Dv_T7Dts.mjs} +12 -12
- package/dist/{Dialog-CDV0kKxj.mjs → Dialog-CWymUiuO.mjs} +32 -35
- package/dist/Drawer-Bet2ZPJo.mjs +176 -0
- package/dist/{ExportCsvAction-CQ1grpwo.mjs → ExportCsvAction-oG_Mn66T.mjs} +3 -3
- package/dist/{FinstrongStore-dKZOZ2hM.mjs → FinstrongStore-BjFkMTIL.mjs} +6 -6
- package/dist/GlobalAccountFilter-BpWlPAl5.mjs +316 -0
- package/dist/{GoalStore-CFeAJloA.mjs → GoalStore-Dbjgft2i.mjs} +155 -137
- package/dist/{Help-i4OasOO-.mjs → Help-BW_ar-4B.mjs} +2 -2
- package/dist/LineChart-DHj-Bufi.mjs +580 -0
- package/dist/{ListItemAction-BNCWQAN_.mjs → ListItemAction-Cbr3417C.mjs} +10 -10
- package/dist/{ManageIncome-D_qVX5dN.mjs → ManageIncome-DIIyqDTp.mjs} +85 -85
- package/dist/{MicroWidgetContainer-BGpNl5ZS.mjs → MicroWidgetContainer-DSyYwRCU.mjs} +2 -2
- package/dist/{MiniWidgetContainer-D7MkHG15.mjs → MiniWidgetContainer-DKn7ndO6.mjs} +1 -1
- package/dist/NetWorthStore-B6ziBtaH.mjs +168 -0
- package/dist/NotificationSettings-e789PcRb.mjs +676 -0
- package/dist/{OriginalBalanceAction-62e0mU_3.mjs → OriginalBalanceAction-DFoG79Ba.mjs} +3 -3
- package/dist/{RecurringSettings-RfZ8Wuhh.mjs → RecurringSettings-BpCUcE8w.mjs} +4 -4
- package/dist/{RecurringTransactionsStore-D3EOKZ2B.mjs → RecurringTransactionsStore-D_--5PWH.mjs} +1 -1
- package/dist/{RecurringTransactions-Bhx56aA3.mjs → RepeatingTransaction-C2txVA9O.mjs} +3 -3
- package/dist/{SettingsStore-BASMQSIp.mjs → SettingsStore-CInvh-rQ.mjs} +1 -1
- package/dist/SpendingData-B7NuTQ9s.mjs +53 -0
- package/dist/SpendingLegend-BxefXiQd.mjs +193 -0
- package/dist/TransactionDetails-CPwv9xtZ.mjs +1374 -0
- package/dist/{TransactionStore-DgLrYW4C.mjs → TransactionStore-D2aMUClq.mjs} +128 -111
- package/dist/TrendsStore-BdsYfCc7.mjs +183 -0
- package/dist/{User-DqNX2GAK.mjs → User-CulNdZUr.mjs} +21 -20
- package/dist/ViewMoreMicroCard-CDWR16_h.mjs +1147 -0
- package/dist/WidgetContainer-mzejMmz2.mjs +555 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -0
- package/dist/accounts/index.es.js +933 -232
- package/dist/accounts/stores/AccountStore.d.ts +6 -2
- package/dist/accounts/utils/AccountDetails.d.ts +5 -0
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +561 -522
- package/dist/cashflow/index.es.js +397 -396
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -0
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -0
- package/dist/categories/components/SubcategoryRow.d.ts +1 -0
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +5 -3
- package/dist/common/components/GlobalAccountFilter.d.ts +11 -0
- package/dist/common/components/WidgetContainer.d.ts +7 -6
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +6 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.d.ts +5 -2
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +7 -0
- package/dist/common/components/index.d.ts +2 -2
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +6 -0
- package/dist/common/index.es.js +325 -306
- package/dist/common/stores/GlobalUiStore.d.ts +7 -4
- package/dist/common/types/localization/AccountsCopy.d.ts +6 -0
- package/dist/common/types/localization/CategoryCopy.d.ts +3 -0
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/common/types/localization/GoalsCopy.d.ts +3 -1
- package/dist/common/types/localization/MicroInsightsCopy.d.ts +1 -0
- package/dist/common/types/localization/TransactionsCopy.d.ts +4 -0
- package/dist/common/types/localization/TrendsCopy.d.ts +4 -0
- package/dist/dashboard/index.es.js +95 -125
- package/dist/debts/index.es.js +466 -460
- package/dist/{exportTransactionsToCSV-BFpuIAXW.mjs → exportTransactionsToCSV-BU1jTY0Q.mjs} +4 -4
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +4 -5
- package/dist/finstrong/index.es.js +1660 -1553
- package/dist/goals/index.es.js +716 -677
- package/dist/goals/stores/GoalStore.d.ts +2 -0
- package/dist/help/index.es.js +14 -10
- package/dist/{hooks-C41HAxM5.mjs → hooks-fY_n74f7.mjs} +16 -16
- package/dist/investments/index.es.js +464 -457
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/MicroCardTemplate.d.ts +23 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +8 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +1 -2
- package/dist/microinsights/beaticons/index.d.ts +1 -0
- package/dist/microinsights/cards/InsightCard.d.ts +0 -2
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +2 -5
- package/dist/microinsights/index.d.ts +2 -2
- package/dist/microinsights/index.es.js +824 -14
- package/dist/networth/components/NetWorthChart.d.ts +3 -2
- package/dist/networth/components/NetWorthList.d.ts +3 -3
- package/dist/networth/index.es.js +433 -438
- package/dist/networth/stores/NetWorthStore.d.ts +20 -9
- package/dist/networth/utils/NetWorthUtils.d.ts +2 -2
- package/dist/notifications/index.es.js +5 -5
- package/dist/recurringtransactions/index.es.js +331 -325
- package/dist/settings/index.es.js +293 -285
- package/dist/spending/components/SpendingChart.d.ts +1 -1
- package/dist/spending/components/SpendingList.d.ts +1 -1
- package/dist/spending/components/SpendingTabLabel.d.ts +1 -0
- package/dist/spending/index.es.js +250 -235
- package/dist/transactions/index.es.js +288 -281
- package/dist/transactions/stores/TransactionStore.d.ts +5 -0
- package/dist/trends/components/TrendsTable.d.ts +0 -2
- package/dist/trends/index.es.js +876 -802
- package/dist/trends/utils/TrendsData.d.ts +1 -0
- package/dist/trends/utils/TrendsTable.d.ts +12 -0
- package/dist/{useAccountDisplayName-usSZCQ7I.mjs → useAccountDisplayName-DbkgGLdg.mjs} +2 -2
- package/dist/useAriaLive-B3_pRUio.mjs +35 -0
- package/dist/{useInsightsEnabled-CNjP5cfR.mjs → useInsightsEnabled-dhmXeSyF.mjs} +1 -1
- package/dist/useWidgetLoadTimer-CrUzxN-P.mjs +19 -0
- package/package.json +26 -21
- package/dist/AccountDetailsContent-C1HumFnW.mjs +0 -683
- package/dist/AccountDetailsHeader-NMx79DGs.mjs +0 -87
- package/dist/CategorySelectorDrawer-DqDAA_5I.mjs +0 -399
- package/dist/CategoryStore-MUwRWH9e.mjs +0 -176
- package/dist/ConnectDrawer-Dn1MlqLz.mjs +0 -545
- package/dist/Drawer-Dqe5EqvA.mjs +0 -163
- package/dist/LineChart-bc1D9xBE.mjs +0 -581
- package/dist/NetWorthStore-8FFC1Bs0.mjs +0 -150
- package/dist/NotificationSettings-BsWiYD94.mjs +0 -672
- package/dist/SpendingData-DPQ96k3x.mjs +0 -55
- package/dist/SpendingLegend-CZzDb-7d.mjs +0 -193
- package/dist/TransactionDetails-Duv1X9ec.mjs +0 -1379
- package/dist/TrendsStore-_mRaFUdf.mjs +0 -182
- package/dist/ViewMoreMicroCard-CH9E-jOx.mjs +0 -1930
- package/dist/WidgetContainer-B1Jzb4XA.mjs +0 -565
- package/dist/common/components/accountfilter/AccountFilter.d.ts +0 -20
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +0 -31
- package/dist/common/components/accountfilter/index.d.ts +0 -1
- package/dist/microinsights/cards/BaseCard.d.ts +0 -13
- package/dist/{ToggleListItem-ciFTiqRS.mjs → Notification-Bs1fdbzI.mjs} +1 -1
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as o, Fragment as B, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p, { useState as Y } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
|
-
import { addMonths as
|
|
4
|
+
import { addMonths as Xe } from "date-fns/addMonths";
|
|
5
5
|
import { startOfToday as W } from "date-fns/startOfToday";
|
|
6
6
|
import D from "@mui/material/Box";
|
|
7
7
|
import v from "@mui/material/Divider";
|
|
8
8
|
import s from "@mui/material/Stack";
|
|
9
9
|
import se from "@mui/material/styles/useTheme";
|
|
10
|
-
import { Text as
|
|
11
|
-
import { G as
|
|
12
|
-
import { C as
|
|
10
|
+
import { Text as m, P as N, Icon as $, InstitutionLogo as Ce, H2 as de, H3 as Ve } from "@mxenabled/mxui";
|
|
11
|
+
import { G as Ye, t as me, u as L, p as ce, d as Ne, b as P, j as U, g as ke, a as Qe, h as He, o as Ke } from "../hooks-fY_n74f7.mjs";
|
|
12
|
+
import { C as R } from "../CurrencyText-C-85TnUF.mjs";
|
|
13
13
|
import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
|
-
import { L as
|
|
14
|
+
import { L as Z } from "../Loader-BSWSYqvn.mjs";
|
|
15
15
|
import { I as he } from "../CashflowStore-naOtJcwo.mjs";
|
|
16
|
-
import { C as
|
|
17
|
-
import { b as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import et from "
|
|
16
|
+
import { C as Pn } from "../CashflowStore-naOtJcwo.mjs";
|
|
17
|
+
import { b as G } from "../Localization-2MODESHW.mjs";
|
|
18
|
+
import { u as Oe } from "../useWidgetLoadTimer-CrUzxN-P.mjs";
|
|
19
|
+
import { M as Je } from "../MiniWidgetContainer-DKn7ndO6.mjs";
|
|
20
|
+
import { E as Ze } from "../EmptyState-DoxNUae-.mjs";
|
|
21
|
+
import { R as et } from "../RecurringSettings-BpCUcE8w.mjs";
|
|
22
|
+
import tt from "@mui/material/Tabs";
|
|
22
23
|
import ye from "@mui/material/Tab";
|
|
23
|
-
import { getUnixTime as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import { A as
|
|
27
|
-
import { f as
|
|
28
|
-
import
|
|
29
|
-
import { f as
|
|
30
|
-
import { isAfter as
|
|
31
|
-
import { isBefore as
|
|
32
|
-
import { isToday as
|
|
33
|
-
import { addDays as
|
|
34
|
-
import { alpha as
|
|
35
|
-
import { DataGridPro as
|
|
36
|
-
import { T as
|
|
37
|
-
import
|
|
38
|
-
import { M as
|
|
39
|
-
import { D as
|
|
40
|
-
import { subDays as
|
|
41
|
-
import { endOfToday as
|
|
42
|
-
import { W as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
|
|
51
|
-
|
|
24
|
+
import { getUnixTime as z } from "date-fns/getUnixTime";
|
|
25
|
+
import J from "@mui/material/List";
|
|
26
|
+
import ee from "@mui/material/ListItem";
|
|
27
|
+
import { A as nt } from "../AccountListItem-Ds5C0mOT.mjs";
|
|
28
|
+
import { f as q, D as X } from "../Dialog-CWymUiuO.mjs";
|
|
29
|
+
import ot from "@mui/material/ListSubheader";
|
|
30
|
+
import { f as K } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
31
|
+
import { isAfter as Fe } from "date-fns/isAfter";
|
|
32
|
+
import { isBefore as We } from "date-fns/isBefore";
|
|
33
|
+
import { isToday as Ge } from "date-fns/isToday";
|
|
34
|
+
import { addDays as Se } from "date-fns/addDays";
|
|
35
|
+
import { alpha as at, keyframes as it } from "@mui/material/styles";
|
|
36
|
+
import { DataGridPro as rt } from "@mui/x-data-grid-pro";
|
|
37
|
+
import { T as we } from "../TabContentContainer-CnMXkVqr.mjs";
|
|
38
|
+
import M from "@mui/material/Button";
|
|
39
|
+
import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-DIIyqDTp.mjs";
|
|
40
|
+
import { D as Me } from "../Drawer-Bet2ZPJo.mjs";
|
|
41
|
+
import { subDays as $e } from "date-fns/subDays";
|
|
42
|
+
import { endOfToday as mt } from "date-fns/endOfToday";
|
|
43
|
+
import { W as ut, A as Ie } from "../WidgetContainer-mzejMmz2.mjs";
|
|
44
|
+
import { A as Q } from "../Account-CMjOp7S2.mjs";
|
|
45
|
+
import { formatISO as ht } from "date-fns/formatISO";
|
|
46
|
+
import { fromUnixTime as De } from "date-fns/fromUnixTime";
|
|
47
|
+
import { startOfMonth as pt } from "date-fns/startOfMonth";
|
|
48
|
+
import { S as ft, b as gt } from "../TransactionDetails-CPwv9xtZ.mjs";
|
|
49
|
+
import { F as bt, R as ve, e as Ae } from "../RepeatingTransaction-C2txVA9O.mjs";
|
|
50
|
+
import { h as xt } from "../DateUtil-CVsMhbZU.mjs";
|
|
51
|
+
import { F as Ct, A as j } from "../Fetch-DecPFeGU.mjs";
|
|
52
|
+
const V = () => {
|
|
53
|
+
if (!p.useContext(Ye))
|
|
52
54
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
53
55
|
return me().uiStore;
|
|
54
56
|
}, yt = ({ remaining: a }) => {
|
|
55
|
-
const { cashflow: n } =
|
|
56
|
-
return /* @__PURE__ */ o(
|
|
57
|
+
const { cashflow: n } = L();
|
|
58
|
+
return /* @__PURE__ */ o(B, { children: [
|
|
57
59
|
/* @__PURE__ */ e(
|
|
58
60
|
D,
|
|
59
61
|
{
|
|
@@ -65,38 +67,36 @@ const Q = () => {
|
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
69
|
-
/* @__PURE__ */ e(
|
|
70
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
71
|
+
/* @__PURE__ */ e(R, { amount: a, bold: !0, sx: { fontSize: 12 } })
|
|
70
72
|
] });
|
|
71
|
-
}, pe = T(yt),
|
|
72
|
-
const a = se(), { availableWidth: n } = ce(), { isMobile: t } = ue(), { visibleCashAccounts: i, visibleCashBalance:
|
|
73
|
-
daysUntilNextIncome:
|
|
74
|
-
expensesTilNextIncome:
|
|
75
|
-
selectedCashAccounts:
|
|
76
|
-
setNextIncome:
|
|
77
|
-
setSelectedCashAccounts:
|
|
78
|
-
setUpcomingExpenses:
|
|
79
|
-
} =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
C(
|
|
84
|
-
i.filter((I) => u.includes(I.guid))
|
|
73
|
+
}, pe = T(yt), St = () => {
|
|
74
|
+
const a = se(), { availableWidth: n } = ce(), { isMobile: t } = ue(), { visibleCashAccounts: i, visibleCashBalance: f } = Ne(), { selectedAccountGuids: u } = P(), { cashflow: c } = L(), {
|
|
75
|
+
daysUntilNextIncome: l,
|
|
76
|
+
expensesTilNextIncome: g,
|
|
77
|
+
selectedCashAccounts: r,
|
|
78
|
+
setNextIncome: h,
|
|
79
|
+
setSelectedCashAccounts: d,
|
|
80
|
+
setUpcomingExpenses: x
|
|
81
|
+
} = V(), { isDataLoaded: S, nextIncomeRecurrence: w, upcomingExpenses: A } = U();
|
|
82
|
+
p.useEffect(() => {
|
|
83
|
+
d(
|
|
84
|
+
i.filter((C) => u.includes(C.guid))
|
|
85
85
|
);
|
|
86
|
-
}, [i,
|
|
87
|
-
|
|
88
|
-
}, [
|
|
89
|
-
const
|
|
90
|
-
() => i.filter((
|
|
91
|
-
[u,
|
|
92
|
-
),
|
|
93
|
-
() =>
|
|
94
|
-
[u,
|
|
95
|
-
),
|
|
96
|
-
() =>
|
|
97
|
-
[
|
|
86
|
+
}, [i, u]), p.useEffect(() => {
|
|
87
|
+
w && h(w), x(A);
|
|
88
|
+
}, [w, A]);
|
|
89
|
+
const _ = p.useMemo(
|
|
90
|
+
() => i.filter((C) => u.includes(C.guid)).reduce((C, I) => C + (I?.balance || 0), 0),
|
|
91
|
+
[u, A]
|
|
92
|
+
), k = p.useMemo(
|
|
93
|
+
() => g.filter((C) => u.includes(C.accountGuid || "")).reduce((C, I) => C + I.amount, 0),
|
|
94
|
+
[u, g]
|
|
95
|
+
), b = p.useMemo(
|
|
96
|
+
() => _ - k,
|
|
97
|
+
[_, k]
|
|
98
98
|
);
|
|
99
|
-
return
|
|
99
|
+
return S ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
|
|
100
100
|
s,
|
|
101
101
|
{
|
|
102
102
|
border: `1px solid ${a.palette.border.light}`,
|
|
@@ -106,43 +106,43 @@ const Q = () => {
|
|
|
106
106
|
px: 24,
|
|
107
107
|
children: [
|
|
108
108
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
/* @__PURE__ */ e(R, { amount: _, variant: "H2" }),
|
|
110
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: G(
|
|
111
|
+
c.total_cash_accounts,
|
|
112
|
+
r.length
|
|
113
113
|
) })
|
|
114
114
|
] }),
|
|
115
|
-
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(
|
|
115
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e($, { name: "remove" }) }),
|
|
116
116
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
117
|
-
/* @__PURE__ */ e(
|
|
118
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
117
|
+
/* @__PURE__ */ e(R, { amount: k, variant: "H2" }),
|
|
118
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: G(c.expenses_due, g.length) })
|
|
119
119
|
] }),
|
|
120
|
-
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(
|
|
120
|
+
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e($, { name: "equal" }) }),
|
|
121
121
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
122
|
-
/* @__PURE__ */ e(
|
|
122
|
+
/* @__PURE__ */ e(R, { amount: b, variant: "H2" }),
|
|
123
123
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
124
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
125
|
-
/* @__PURE__ */ e(he, { body:
|
|
124
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.available_to_spend }),
|
|
125
|
+
/* @__PURE__ */ e(he, { body: c.tooltip_body, title: c.tooltip_title })
|
|
126
126
|
] })
|
|
127
127
|
] }),
|
|
128
|
-
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(
|
|
129
|
-
/* @__PURE__ */ e(
|
|
130
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
128
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(B, { children: [
|
|
129
|
+
/* @__PURE__ */ e(m, { variant: "H2", children: G(c.days, l) }),
|
|
130
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: c.next_paycheck })
|
|
131
131
|
] }) })
|
|
132
132
|
]
|
|
133
133
|
}
|
|
134
134
|
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
|
|
135
135
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
136
|
-
/* @__PURE__ */ e(
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: G(
|
|
137
|
+
c.total_cash_accounts,
|
|
138
|
+
r.length
|
|
139
139
|
) }),
|
|
140
|
-
/* @__PURE__ */ e(
|
|
140
|
+
/* @__PURE__ */ e(R, { amount: f, bold: !0, variant: "XSmall" })
|
|
141
141
|
] }),
|
|
142
142
|
/* @__PURE__ */ e(v, {}),
|
|
143
143
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
144
|
-
/* @__PURE__ */ e(
|
|
145
|
-
/* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: G(c.expenses_due, g.length) }),
|
|
145
|
+
/* @__PURE__ */ e(R, { amount: k, bold: !0, symbol: "-", variant: "XSmall" })
|
|
146
146
|
] }),
|
|
147
147
|
/* @__PURE__ */ e(v, {}),
|
|
148
148
|
/* @__PURE__ */ e(
|
|
@@ -156,38 +156,41 @@ const Q = () => {
|
|
|
156
156
|
justifyContent: "space-between",
|
|
157
157
|
px: 16,
|
|
158
158
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
159
|
-
children: /* @__PURE__ */ e(pe, { remaining:
|
|
159
|
+
children: /* @__PURE__ */ e(pe, { remaining: b })
|
|
160
160
|
}
|
|
161
161
|
),
|
|
162
162
|
/* @__PURE__ */ e(v, {}),
|
|
163
163
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
164
|
-
/* @__PURE__ */ e(
|
|
165
|
-
/* @__PURE__ */ e(
|
|
164
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: c.next_paycheck }),
|
|
165
|
+
/* @__PURE__ */ e(m, { bold: !0, variant: "XSmall", children: G(c.days, l) })
|
|
166
166
|
] })
|
|
167
|
-
] }) }) : /* @__PURE__ */ e(
|
|
168
|
-
},
|
|
167
|
+
] }) }) : /* @__PURE__ */ e(Z, { height: t ? 210 : 120 });
|
|
168
|
+
}, wt = T(St), _t = ({
|
|
169
169
|
onPrimaryCtaClick: a,
|
|
170
170
|
onSecondaryCtaClick: n,
|
|
171
171
|
sx: t = {}
|
|
172
172
|
}) => {
|
|
173
|
-
const { cashflow: i } =
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}, [])
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
173
|
+
const { cashflow: i } = L(), { isInitialized: f } = P(), { loadRepeatingTransactionData: u, income: c, isDataLoaded: l, setDateRange: g } = U();
|
|
174
|
+
p.useEffect(() => {
|
|
175
|
+
g({ start: W(), end: Xe(W(), 1) }), l || u().finally();
|
|
176
|
+
}, []), Oe({
|
|
177
|
+
widgetName: "CashflowMiniWidget",
|
|
178
|
+
isLoaded: l
|
|
179
|
+
});
|
|
180
|
+
const r = l && !c.length;
|
|
181
|
+
return f ? /* @__PURE__ */ o(
|
|
182
|
+
Je,
|
|
180
183
|
{
|
|
181
184
|
className: "mx-exp-cashflow-miniwidget",
|
|
182
185
|
onPrimaryCtaClick: a,
|
|
183
186
|
primaryCtaLabel: i.primary_cta,
|
|
184
|
-
subTitle: r || !
|
|
187
|
+
subTitle: r || !l ? void 0 : i.sub_title,
|
|
185
188
|
sx: { height: "100%", ...t },
|
|
186
189
|
title: i.title,
|
|
187
190
|
children: [
|
|
188
|
-
!
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
!l && /* @__PURE__ */ e(Z, {}),
|
|
192
|
+
l && (r ? /* @__PURE__ */ e(
|
|
193
|
+
Ze,
|
|
191
194
|
{
|
|
192
195
|
header: i.create,
|
|
193
196
|
icon: "local_atm",
|
|
@@ -196,12 +199,12 @@ const Q = () => {
|
|
|
196
199
|
primaryButtonStartIcon: "add",
|
|
197
200
|
subText: i.create_description
|
|
198
201
|
}
|
|
199
|
-
) : /* @__PURE__ */ e(
|
|
202
|
+
) : /* @__PURE__ */ e(wt, {}))
|
|
200
203
|
]
|
|
201
204
|
}
|
|
202
|
-
) : /* @__PURE__ */ e(
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
+
) : /* @__PURE__ */ e(Z, {});
|
|
206
|
+
}, Mn = T(_t), It = ({ remaining: a }) => /* @__PURE__ */ e(
|
|
207
|
+
ee,
|
|
205
208
|
{
|
|
206
209
|
sx: {
|
|
207
210
|
alignItems: "center",
|
|
@@ -216,16 +219,16 @@ const Q = () => {
|
|
|
216
219
|
children: /* @__PURE__ */ e(pe, { remaining: a })
|
|
217
220
|
}
|
|
218
221
|
);
|
|
219
|
-
var
|
|
220
|
-
const
|
|
221
|
-
/* @__PURE__ */ o(
|
|
222
|
+
var te = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(te || {});
|
|
223
|
+
const Dt = ({ recurrence: a }) => /* @__PURE__ */ o(B, { children: [
|
|
224
|
+
/* @__PURE__ */ o(ee, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
222
225
|
/* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
223
|
-
/* @__PURE__ */ e(
|
|
224
|
-
/* @__PURE__ */ e(
|
|
226
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: q(a.expectedDate, X.MONTH) }),
|
|
227
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: q(a.expectedDate, X.DAY) })
|
|
225
228
|
] }),
|
|
226
|
-
/* @__PURE__ */ e(
|
|
229
|
+
/* @__PURE__ */ e(m, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
|
|
227
230
|
/* @__PURE__ */ e(
|
|
228
|
-
|
|
231
|
+
R,
|
|
229
232
|
{
|
|
230
233
|
amount: a.amount,
|
|
231
234
|
bold: !0,
|
|
@@ -234,11 +237,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
234
237
|
)
|
|
235
238
|
] }),
|
|
236
239
|
/* @__PURE__ */ e(v, {})
|
|
237
|
-
] }),
|
|
238
|
-
const { cashflow: t } =
|
|
239
|
-
return /* @__PURE__ */ o(
|
|
240
|
+
] }), Ee = T(Dt), vt = ({ total: a, type: n }) => {
|
|
241
|
+
const { cashflow: t } = L();
|
|
242
|
+
return /* @__PURE__ */ o(B, { children: [
|
|
240
243
|
/* @__PURE__ */ o(
|
|
241
|
-
|
|
244
|
+
ot,
|
|
242
245
|
{
|
|
243
246
|
sx: {
|
|
244
247
|
alignItems: "center",
|
|
@@ -250,40 +253,40 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
250
253
|
px: 24
|
|
251
254
|
},
|
|
252
255
|
children: [
|
|
253
|
-
/* @__PURE__ */ e(
|
|
254
|
-
/* @__PURE__ */ o(
|
|
255
|
-
n ===
|
|
256
|
-
|
|
256
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: n === te.EXPENSE ? t.expenses : t.income }),
|
|
257
|
+
/* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
258
|
+
n === te.EXPENSE ? "-" : "+",
|
|
259
|
+
K(a, "0,0.00")
|
|
257
260
|
] })
|
|
258
261
|
]
|
|
259
262
|
}
|
|
260
263
|
),
|
|
261
264
|
/* @__PURE__ */ e(v, {})
|
|
262
265
|
] });
|
|
263
|
-
},
|
|
264
|
-
const { availableWidth: a } = ce(), { cashflow: n } =
|
|
266
|
+
}, Te = T(vt), re = (a, n) => (t) => t.accountGuid === a.guid && (Ge(t.expectedDate) || Fe(t.expectedDate, n.start)) && We(t.expectedDate, n.end), At = () => {
|
|
267
|
+
const { availableWidth: a } = ce(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: i } = U(), { dateRange: f, selectedCashAccounts: u } = V();
|
|
265
268
|
return /* @__PURE__ */ o(s, { children: [
|
|
266
269
|
/* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
267
|
-
/* @__PURE__ */ e(
|
|
268
|
-
/* @__PURE__ */ o(
|
|
269
|
-
|
|
270
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
271
|
+
/* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
|
|
272
|
+
q(f.start, X.FULL_MONTH_DAY),
|
|
270
273
|
" -",
|
|
271
274
|
" ",
|
|
272
|
-
|
|
275
|
+
q(f.end, X.FULL_MONTH_DAY)
|
|
273
276
|
] })
|
|
274
277
|
] }),
|
|
275
|
-
/* @__PURE__ */ e(s, { children:
|
|
276
|
-
const
|
|
277
|
-
re(
|
|
278
|
-
), r =
|
|
279
|
-
(d,
|
|
278
|
+
/* @__PURE__ */ e(s, { children: u.map((c) => {
|
|
279
|
+
const l = i.filter(re(c, f)).sort((d, x) => z(d.expectedDate) - z(x.expectedDate)), g = t.filter(
|
|
280
|
+
re(c, f)
|
|
281
|
+
), r = l.reduce(
|
|
282
|
+
(d, x) => d + x.amount,
|
|
280
283
|
0
|
|
281
|
-
),
|
|
282
|
-
(d,
|
|
284
|
+
), h = g.reduce(
|
|
285
|
+
(d, x) => d + x.amount,
|
|
283
286
|
0
|
|
284
287
|
);
|
|
285
288
|
return /* @__PURE__ */ o(
|
|
286
|
-
|
|
289
|
+
J,
|
|
287
290
|
{
|
|
288
291
|
sx: {
|
|
289
292
|
border: "1px solid",
|
|
@@ -293,9 +296,9 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
293
296
|
},
|
|
294
297
|
children: [
|
|
295
298
|
/* @__PURE__ */ e(
|
|
296
|
-
|
|
299
|
+
nt,
|
|
297
300
|
{
|
|
298
|
-
account:
|
|
301
|
+
account: c,
|
|
299
302
|
listItemProps: {
|
|
300
303
|
disableGutters: !1,
|
|
301
304
|
disablePadding: !1,
|
|
@@ -304,52 +307,52 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
304
307
|
}
|
|
305
308
|
),
|
|
306
309
|
/* @__PURE__ */ e(v, {}),
|
|
307
|
-
|
|
308
|
-
|
|
310
|
+
l.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
|
|
311
|
+
J,
|
|
309
312
|
{
|
|
310
|
-
subheader: /* @__PURE__ */ e(
|
|
313
|
+
subheader: /* @__PURE__ */ e(Te, { total: r, type: te.INCOME }),
|
|
311
314
|
sx: { width: "100%" },
|
|
312
|
-
children:
|
|
315
|
+
children: l.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
313
316
|
}
|
|
314
317
|
) }),
|
|
315
|
-
|
|
316
|
-
|
|
318
|
+
g.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
|
|
319
|
+
J,
|
|
317
320
|
{
|
|
318
|
-
subheader: /* @__PURE__ */ e(
|
|
321
|
+
subheader: /* @__PURE__ */ e(Te, { total: h, type: te.EXPENSE }),
|
|
319
322
|
sx: { width: "100%" },
|
|
320
|
-
children:
|
|
323
|
+
children: g.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
321
324
|
}
|
|
322
325
|
) }),
|
|
323
326
|
/* @__PURE__ */ e(
|
|
324
|
-
|
|
327
|
+
It,
|
|
325
328
|
{
|
|
326
|
-
remaining: (
|
|
329
|
+
remaining: (c.available_balance || c.balance || 0) + r - h
|
|
327
330
|
}
|
|
328
331
|
)
|
|
329
332
|
]
|
|
330
333
|
},
|
|
331
|
-
|
|
334
|
+
c.guid
|
|
332
335
|
);
|
|
333
336
|
}) })
|
|
334
337
|
] });
|
|
335
|
-
},
|
|
336
|
-
const { availableWidth: a } = ce(), n = se(), { cashflow: t } =
|
|
338
|
+
}, Et = T(At), Tt = () => {
|
|
339
|
+
const { availableWidth: a } = ce(), n = se(), { cashflow: t } = L(), { upcomingExpenses: i, upcomingIncome: f } = U(), { dateRange: u, selectedCashAccounts: c } = V(), l = [
|
|
337
340
|
{
|
|
338
341
|
field: "account",
|
|
339
342
|
flex: 1.5,
|
|
340
343
|
headerName: t.accounts,
|
|
341
|
-
renderCell: ({ value: { name: r, nickname:
|
|
342
|
-
const
|
|
344
|
+
renderCell: ({ value: { name: r, nickname: h, institution_guid: d, account_number: x } }) => {
|
|
345
|
+
const S = h || r;
|
|
343
346
|
return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
344
347
|
/* @__PURE__ */ e(
|
|
345
|
-
|
|
348
|
+
Ce,
|
|
346
349
|
{
|
|
347
350
|
alt: t.institution_logo,
|
|
348
351
|
institutionGuid: d || "",
|
|
349
352
|
size: 16
|
|
350
353
|
}
|
|
351
354
|
),
|
|
352
|
-
/* @__PURE__ */ e(
|
|
355
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: `${S} ${x ? `*${x}` : ""}` })
|
|
353
356
|
] });
|
|
354
357
|
}
|
|
355
358
|
},
|
|
@@ -358,21 +361,21 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
358
361
|
flex: 1,
|
|
359
362
|
headerName: t.balance,
|
|
360
363
|
type: "number",
|
|
361
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
364
|
+
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "Small", children: K(r.value, "0,0.00") })
|
|
362
365
|
},
|
|
363
366
|
{
|
|
364
367
|
field: "income",
|
|
365
368
|
flex: 1,
|
|
366
369
|
headerName: t.projected_income,
|
|
367
370
|
type: "number",
|
|
368
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
371
|
+
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "Small", children: `+${K(r.value, "0,0.00")}` })
|
|
369
372
|
},
|
|
370
373
|
{
|
|
371
374
|
field: "expenses",
|
|
372
375
|
flex: 1.1,
|
|
373
376
|
headerName: t.projected_expenses,
|
|
374
377
|
type: "number",
|
|
375
|
-
renderCell: (r) => /* @__PURE__ */ e(
|
|
378
|
+
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "Small", children: `-${K(r.value, "0,0.00")}` })
|
|
376
379
|
},
|
|
377
380
|
{
|
|
378
381
|
field: "remaining",
|
|
@@ -380,32 +383,32 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
380
383
|
headerName: t.remaining,
|
|
381
384
|
type: "number",
|
|
382
385
|
renderCell: (r) => {
|
|
383
|
-
const
|
|
386
|
+
const h = r.row.balance + r.row.income - r.row.expenses;
|
|
384
387
|
return /* @__PURE__ */ e(
|
|
385
|
-
|
|
388
|
+
m,
|
|
386
389
|
{
|
|
387
|
-
color: Math.sign(
|
|
390
|
+
color: Math.sign(h) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
388
391
|
variant: "Small",
|
|
389
|
-
children:
|
|
392
|
+
children: K(h, "0,0.00")
|
|
390
393
|
}
|
|
391
394
|
);
|
|
392
395
|
}
|
|
393
396
|
}
|
|
394
|
-
],
|
|
395
|
-
const
|
|
396
|
-
re(r, { start: W(), end:
|
|
397
|
-
).reduce((
|
|
398
|
-
re(r, { start: W(), end:
|
|
399
|
-
).reduce((
|
|
397
|
+
], g = p.useMemo(() => c.map((r) => {
|
|
398
|
+
const h = i.filter(
|
|
399
|
+
re(r, { start: W(), end: Se(W(), 30) })
|
|
400
|
+
).reduce((S, w) => S + w.amount, 0), d = f.filter(
|
|
401
|
+
re(r, { start: W(), end: Se(W(), 30) })
|
|
402
|
+
).reduce((S, w) => S + w.amount, 0), x = (r.balance || 0) + d - h;
|
|
400
403
|
return {
|
|
401
404
|
account: r,
|
|
402
405
|
balance: r.balance || 0,
|
|
403
406
|
id: r.guid,
|
|
404
407
|
income: d,
|
|
405
|
-
expenses:
|
|
406
|
-
remaining:
|
|
408
|
+
expenses: h,
|
|
409
|
+
remaining: x
|
|
407
410
|
};
|
|
408
|
-
}), [
|
|
411
|
+
}), [c, i, f]);
|
|
409
412
|
return /* @__PURE__ */ o(
|
|
410
413
|
D,
|
|
411
414
|
{
|
|
@@ -422,7 +425,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
422
425
|
children: [
|
|
423
426
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
424
427
|
/* @__PURE__ */ e(
|
|
425
|
-
|
|
428
|
+
m,
|
|
426
429
|
{
|
|
427
430
|
bold: !0,
|
|
428
431
|
sx: {
|
|
@@ -440,26 +443,26 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
440
443
|
}
|
|
441
444
|
)
|
|
442
445
|
] }),
|
|
443
|
-
/* @__PURE__ */ o(
|
|
444
|
-
|
|
446
|
+
/* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
447
|
+
q(u.start, X.FULL_MONTH_DAY),
|
|
445
448
|
" -",
|
|
446
449
|
" ",
|
|
447
|
-
|
|
450
|
+
q(u.end, X.FULL_MONTH_DAY)
|
|
448
451
|
] })
|
|
449
452
|
]
|
|
450
453
|
}
|
|
451
454
|
),
|
|
452
455
|
a > 650 ? /* @__PURE__ */ e(
|
|
453
|
-
|
|
456
|
+
rt,
|
|
454
457
|
{
|
|
455
458
|
columnHeaderHeight: 48,
|
|
456
|
-
columns:
|
|
459
|
+
columns: l,
|
|
457
460
|
density: "standard",
|
|
458
461
|
disableColumnMenu: !0,
|
|
459
462
|
disableRowSelectionOnClick: !0,
|
|
460
463
|
hideFooter: !0,
|
|
461
464
|
rowHeight: 48,
|
|
462
|
-
rows:
|
|
465
|
+
rows: g,
|
|
463
466
|
sx: {
|
|
464
467
|
border: "1px solid",
|
|
465
468
|
borderColor: "border.light",
|
|
@@ -467,7 +470,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
467
470
|
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
468
471
|
color: n.palette.primary.main,
|
|
469
472
|
"&:hover": {
|
|
470
|
-
backgroundColor:
|
|
473
|
+
backgroundColor: at(n.palette.primary.main, 0.1)
|
|
471
474
|
}
|
|
472
475
|
},
|
|
473
476
|
"& .MuiDataGrid-columnHeaderTitle": {
|
|
@@ -479,10 +482,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
479
482
|
}
|
|
480
483
|
}
|
|
481
484
|
}
|
|
482
|
-
) :
|
|
483
|
-
const { name:
|
|
485
|
+
) : g.map((r) => {
|
|
486
|
+
const { name: h, nickname: d, institution_guid: x, account_number: S } = r.account, w = d || h;
|
|
484
487
|
return /* @__PURE__ */ e(
|
|
485
|
-
|
|
488
|
+
J,
|
|
486
489
|
{
|
|
487
490
|
sx: {
|
|
488
491
|
border: "1px solid",
|
|
@@ -490,7 +493,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
490
493
|
borderRadius: 1,
|
|
491
494
|
marginBottom: 24
|
|
492
495
|
},
|
|
493
|
-
children: /* @__PURE__ */ e(
|
|
496
|
+
children: /* @__PURE__ */ e(ee, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
|
|
494
497
|
/* @__PURE__ */ o(
|
|
495
498
|
s,
|
|
496
499
|
{
|
|
@@ -502,16 +505,16 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
502
505
|
children: [
|
|
503
506
|
/* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
|
|
504
507
|
/* @__PURE__ */ e(
|
|
505
|
-
|
|
508
|
+
Ce,
|
|
506
509
|
{
|
|
507
510
|
alt: t.institution_logo,
|
|
508
|
-
institutionGuid:
|
|
511
|
+
institutionGuid: x || "",
|
|
509
512
|
size: 16
|
|
510
513
|
}
|
|
511
514
|
),
|
|
512
|
-
/* @__PURE__ */ e(
|
|
515
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: `${w} ${S ? `*${S}` : ""}` })
|
|
513
516
|
] }),
|
|
514
|
-
/* @__PURE__ */ e(
|
|
517
|
+
/* @__PURE__ */ e(R, { amount: r.balance, bold: !0, variant: "Small" })
|
|
515
518
|
]
|
|
516
519
|
}
|
|
517
520
|
),
|
|
@@ -525,8 +528,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
525
528
|
px: 16,
|
|
526
529
|
py: 12,
|
|
527
530
|
children: [
|
|
528
|
-
/* @__PURE__ */ e(
|
|
529
|
-
/* @__PURE__ */ e(
|
|
531
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: t.projected_income }),
|
|
532
|
+
/* @__PURE__ */ e(R, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
|
|
530
533
|
]
|
|
531
534
|
}
|
|
532
535
|
),
|
|
@@ -540,8 +543,8 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
540
543
|
px: 16,
|
|
541
544
|
py: 12,
|
|
542
545
|
children: [
|
|
543
|
-
/* @__PURE__ */ e(
|
|
544
|
-
/* @__PURE__ */ e(
|
|
546
|
+
/* @__PURE__ */ e(m, { variant: "Small", children: t.projected_expenses }),
|
|
547
|
+
/* @__PURE__ */ e(R, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
|
|
545
548
|
]
|
|
546
549
|
}
|
|
547
550
|
),
|
|
@@ -568,19 +571,19 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
568
571
|
]
|
|
569
572
|
}
|
|
570
573
|
);
|
|
571
|
-
},
|
|
572
|
-
const { cashflow: a } =
|
|
573
|
-
|
|
574
|
+
}, Rt = T(Tt), Lt = () => {
|
|
575
|
+
const { cashflow: a } = L(), { isDesktop: n } = ue(), { onEvent: t } = ke(), [i, f] = p.useState(0), u = (c, l) => {
|
|
576
|
+
f(l);
|
|
574
577
|
};
|
|
575
|
-
return
|
|
578
|
+
return p.useEffect(() => {
|
|
576
579
|
t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
577
580
|
}, [i]), /* @__PURE__ */ o(D, { children: [
|
|
578
581
|
/* @__PURE__ */ o(
|
|
579
|
-
|
|
582
|
+
tt,
|
|
580
583
|
{
|
|
581
584
|
"aria-label": a.cashflow_summary_and_details,
|
|
582
585
|
centered: !0,
|
|
583
|
-
onChange:
|
|
586
|
+
onChange: u,
|
|
584
587
|
textColor: "primary",
|
|
585
588
|
value: i,
|
|
586
589
|
variant: "fullWidth",
|
|
@@ -611,16 +614,16 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
611
614
|
}
|
|
612
615
|
),
|
|
613
616
|
/* @__PURE__ */ e(D, { sx: { mb: 32 } }),
|
|
614
|
-
/* @__PURE__ */ e(
|
|
615
|
-
/* @__PURE__ */ e(
|
|
617
|
+
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Rt, {}) }) }),
|
|
618
|
+
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Et, {}) }) })
|
|
616
619
|
] });
|
|
617
|
-
},
|
|
620
|
+
}, Nt = T(Lt), ie = ({
|
|
618
621
|
amount: a,
|
|
619
622
|
isMobile: n = !1,
|
|
620
623
|
isTotal: t = !1,
|
|
621
624
|
label: i,
|
|
622
|
-
symbol:
|
|
623
|
-
tooltip:
|
|
625
|
+
symbol: f,
|
|
626
|
+
tooltip: u
|
|
624
627
|
}) => /* @__PURE__ */ o(
|
|
625
628
|
s,
|
|
626
629
|
{
|
|
@@ -630,82 +633,82 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
630
633
|
padding: n ? "14px 16px" : 0,
|
|
631
634
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
632
635
|
children: [
|
|
633
|
-
!n && /* @__PURE__ */ e(
|
|
636
|
+
!n && /* @__PURE__ */ e(R, { amount: a, component: "h2", variant: "H2" }),
|
|
634
637
|
/* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
635
|
-
/* @__PURE__ */ e(
|
|
636
|
-
|
|
638
|
+
/* @__PURE__ */ e(m, { bold: t, variant: "Small", children: i }),
|
|
639
|
+
u
|
|
637
640
|
] }),
|
|
638
|
-
n && /* @__PURE__ */ e(
|
|
641
|
+
n && /* @__PURE__ */ e(R, { amount: a, component: "h2", symbol: f, variant: "Small" })
|
|
639
642
|
]
|
|
640
643
|
}
|
|
641
|
-
),
|
|
642
|
-
const { availableWidth: a } = ce(), { cashflow: n } =
|
|
643
|
-
() =>
|
|
644
|
-
[
|
|
645
|
-
),
|
|
646
|
-
() =>
|
|
647
|
-
[c, u
|
|
648
|
-
),
|
|
649
|
-
() =>
|
|
650
|
-
[
|
|
651
|
-
),
|
|
652
|
-
return /* @__PURE__ */ o(s, { sx: { mx:
|
|
644
|
+
), Re = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Ge(t.expectedDate) || Fe(t.expectedDate, n.start)) && We(t.expectedDate, n.end), kt = () => {
|
|
645
|
+
const { availableWidth: a } = ce(), { cashflow: n } = L(), { income: t, isDataLoaded: i, upcomingExpenses: f, upcomingIncome: u } = U(), { selectedAccountGuids: c } = P(), { dateRange: l, selectedCashAccounts: g } = V(), [r, h] = p.useState(!1), d = p.useMemo(
|
|
646
|
+
() => f.filter(Re(c, l)),
|
|
647
|
+
[l, c, f]
|
|
648
|
+
), x = p.useMemo(
|
|
649
|
+
() => u.filter(Re(c, l)),
|
|
650
|
+
[l, c, u]
|
|
651
|
+
), S = p.useMemo(
|
|
652
|
+
() => g.reduce((C, I) => C + (I?.balance || 0), 0),
|
|
653
|
+
[g]
|
|
654
|
+
), w = d.reduce((C, I) => C + I.amount, 0), A = x.reduce((C, I) => C + I.amount, 0), _ = S - w + A, k = i && t.length > 0, b = a < 725;
|
|
655
|
+
return /* @__PURE__ */ o(s, { sx: { mx: b ? 16 : 0, my: b ? 24 : 42 }, children: [
|
|
653
656
|
/* @__PURE__ */ o(
|
|
654
657
|
s,
|
|
655
658
|
{
|
|
656
|
-
border:
|
|
659
|
+
border: b ? "1px solid" : "none",
|
|
657
660
|
borderColor: "border.light",
|
|
658
661
|
borderRadius: 2,
|
|
659
|
-
flexDirection:
|
|
660
|
-
gap:
|
|
662
|
+
flexDirection: b ? "column" : "row",
|
|
663
|
+
gap: b ? 0 : 24,
|
|
661
664
|
justifyContent: "center",
|
|
662
665
|
children: [
|
|
663
666
|
/* @__PURE__ */ e(
|
|
664
667
|
ie,
|
|
665
668
|
{
|
|
666
|
-
amount:
|
|
667
|
-
isMobile:
|
|
668
|
-
label:
|
|
669
|
+
amount: S,
|
|
670
|
+
isMobile: b,
|
|
671
|
+
label: G(n.cash_and_bank, g.length)
|
|
669
672
|
}
|
|
670
673
|
),
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
!
|
|
674
|
+
b && /* @__PURE__ */ e(v, {}),
|
|
675
|
+
k ? /* @__PURE__ */ o(B, { children: [
|
|
676
|
+
!b && /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
674
677
|
/* @__PURE__ */ e(
|
|
675
678
|
ie,
|
|
676
679
|
{
|
|
677
|
-
amount:
|
|
678
|
-
isMobile:
|
|
680
|
+
amount: A,
|
|
681
|
+
isMobile: b,
|
|
679
682
|
label: n.to_be_received,
|
|
680
|
-
symbol:
|
|
683
|
+
symbol: b ? "+" : void 0
|
|
681
684
|
}
|
|
682
685
|
)
|
|
683
686
|
] }) : /* @__PURE__ */ e(
|
|
684
|
-
|
|
687
|
+
M,
|
|
685
688
|
{
|
|
686
|
-
onClick: () =>
|
|
687
|
-
startIcon: /* @__PURE__ */ e(
|
|
689
|
+
onClick: () => h(!0),
|
|
690
|
+
startIcon: /* @__PURE__ */ e($, { name: "add" }),
|
|
688
691
|
sx: { fontSize: 13 },
|
|
689
692
|
children: n.add_income
|
|
690
693
|
}
|
|
691
694
|
),
|
|
692
|
-
|
|
695
|
+
b ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
693
696
|
/* @__PURE__ */ e(
|
|
694
697
|
ie,
|
|
695
698
|
{
|
|
696
|
-
amount:
|
|
697
|
-
isMobile:
|
|
698
|
-
label:
|
|
699
|
-
symbol:
|
|
699
|
+
amount: w,
|
|
700
|
+
isMobile: b,
|
|
701
|
+
label: G(n.to_be_paid_out, d.length),
|
|
702
|
+
symbol: b ? "-" : void 0
|
|
700
703
|
}
|
|
701
704
|
),
|
|
702
|
-
|
|
705
|
+
b ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
703
706
|
/* @__PURE__ */ e(
|
|
704
707
|
ie,
|
|
705
708
|
{
|
|
706
|
-
amount:
|
|
707
|
-
isMobile:
|
|
708
|
-
isTotal:
|
|
709
|
+
amount: _,
|
|
710
|
+
isMobile: b,
|
|
711
|
+
isTotal: b,
|
|
709
712
|
label: n.remaining_cash,
|
|
710
713
|
tooltip: /* @__PURE__ */ e(
|
|
711
714
|
he,
|
|
@@ -720,93 +723,91 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
720
723
|
}
|
|
721
724
|
),
|
|
722
725
|
/* @__PURE__ */ e(
|
|
723
|
-
|
|
726
|
+
Me,
|
|
724
727
|
{
|
|
725
728
|
ariaLabelClose: n.close_manage_income_aria,
|
|
726
729
|
isOpen: r,
|
|
727
|
-
onClose: () =>
|
|
730
|
+
onClose: () => h(!1),
|
|
728
731
|
shouldShowHeaderBorders: !1,
|
|
729
732
|
title: n.manage_income,
|
|
730
|
-
children: /* @__PURE__ */ e(
|
|
733
|
+
children: /* @__PURE__ */ e(st, {})
|
|
731
734
|
}
|
|
732
735
|
)
|
|
733
736
|
] });
|
|
734
|
-
},
|
|
735
|
-
const {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
} = q(), { onEvent: c } = ke(), { onLoad: m } = Ye(), { clientConfig: r } = Qe(), { visibleCashAccounts: l } = Le(), { setFilter: d } = Ne(), { dateRange: b, setSelectedCashAccounts: C } = Q(), { loadRepeatingTransactionData: _, isDataLoaded: O, setDateRange: A } = P(), { cashflow: H, recurring: p } = k(), { isInitialized: w } = q(), I = r?.master?.deep_link_params?.view === "manage_income", [M, ae] = f.useState(I);
|
|
742
|
-
return f.useEffect(() => {
|
|
743
|
-
A(b), O || _().finally(() => {
|
|
744
|
-
m?.("CashflowWidget");
|
|
745
|
-
});
|
|
746
|
-
}, []), f.useEffect(() => {
|
|
747
|
-
g(l);
|
|
748
|
-
}, [l]), f.useEffect(() => {
|
|
749
|
-
const V = l.map((S) => S.guid), K = t.filter(
|
|
750
|
-
(S) => i.includes(S.guid) && V.includes(S.guid)
|
|
737
|
+
}, Ht = T(kt), Ot = ({ onBackClick: a, sx: n = {} }) => {
|
|
738
|
+
const { selectedAccounts: t, selectedAccountGuids: i, shouldDisableNextDate: f, shouldDisablePrevDate: u } = P(), { onEvent: c } = ke(), { clientConfig: l } = Qe(), { visibleCashAccounts: g } = Ne(), { setFilter: r } = He(), { dateRange: h, setSelectedCashAccounts: d } = V(), { loadRepeatingTransactionData: x, isDataLoaded: S, setDateRange: w } = U(), { cashflow: A, recurring: _ } = L(), { isInitialized: k } = P(), C = l?.master?.deep_link_params?.view === "manage_income", [I, ne] = p.useState(C);
|
|
739
|
+
return p.useEffect(() => {
|
|
740
|
+
w(h), S || x().finally();
|
|
741
|
+
}, []), p.useEffect(() => {
|
|
742
|
+
const oe = g.map((H) => H.guid), ae = t.filter(
|
|
743
|
+
(H) => i.includes(H.guid) && oe.includes(H.guid)
|
|
751
744
|
);
|
|
752
|
-
|
|
753
|
-
dateRange: { start:
|
|
754
|
-
accounts:
|
|
745
|
+
d(ae), r({
|
|
746
|
+
dateRange: { start: $e(W(), 90), end: mt() },
|
|
747
|
+
accounts: ae.map((H) => H.guid)
|
|
755
748
|
});
|
|
756
|
-
}, [
|
|
757
|
-
|
|
749
|
+
}, [g, t]), Oe({
|
|
750
|
+
widgetName: "CashflowWidget",
|
|
751
|
+
isLoaded: S
|
|
752
|
+
}), k ? /* @__PURE__ */ o(
|
|
753
|
+
ut,
|
|
758
754
|
{
|
|
759
|
-
accountOptions: l,
|
|
760
755
|
actions: [
|
|
761
756
|
{
|
|
762
|
-
label:
|
|
757
|
+
label: _.action_title,
|
|
763
758
|
iconName: "credit_card_gear",
|
|
764
759
|
onClick: () => {
|
|
765
|
-
|
|
760
|
+
ne(!0), c(Ie.CASH_FLOW_CLICK_SETTINGS);
|
|
766
761
|
}
|
|
767
762
|
}
|
|
768
763
|
],
|
|
764
|
+
allowedAccountTypes: [
|
|
765
|
+
Q.CASH,
|
|
766
|
+
Q.CHECKING,
|
|
767
|
+
Q.PREPAID,
|
|
768
|
+
Q.SAVINGS,
|
|
769
|
+
Q.CHECKING_LINE_OF_CREDIT
|
|
770
|
+
],
|
|
769
771
|
calendarActions: {
|
|
770
|
-
shouldDisableNext:
|
|
772
|
+
shouldDisableNext: f,
|
|
771
773
|
shouldDisablePrevious: u,
|
|
772
774
|
shouldDisablePicker: !0,
|
|
773
775
|
onRangeChanged: () => {
|
|
774
776
|
}
|
|
775
777
|
},
|
|
776
|
-
dateRange:
|
|
778
|
+
dateRange: h,
|
|
777
779
|
dateRangeVariant: "readonly",
|
|
778
|
-
onAccountsFilterClick: () => c(
|
|
780
|
+
onAccountsFilterClick: () => c(Ie.CASH_FLOW_CLICK_FILTER),
|
|
779
781
|
onBackClick: a,
|
|
780
782
|
sx: n,
|
|
781
|
-
title:
|
|
783
|
+
title: A.title,
|
|
782
784
|
children: [
|
|
785
|
+
/* @__PURE__ */ e(Ht, {}),
|
|
783
786
|
/* @__PURE__ */ e(Nt, {}),
|
|
784
|
-
/* @__PURE__ */ e(Lt, {}),
|
|
785
787
|
/* @__PURE__ */ e(
|
|
786
|
-
|
|
788
|
+
Me,
|
|
787
789
|
{
|
|
788
|
-
ariaLabelClose:
|
|
789
|
-
isOpen:
|
|
790
|
-
onClose: () =>
|
|
790
|
+
ariaLabelClose: A.close_settings_aria,
|
|
791
|
+
isOpen: I,
|
|
792
|
+
onClose: () => ne(!1),
|
|
791
793
|
shouldShowHeaderBorders: !1,
|
|
792
|
-
title:
|
|
793
|
-
children: /* @__PURE__ */ e(
|
|
794
|
+
title: _.action_title,
|
|
795
|
+
children: /* @__PURE__ */ e(et, { defaultSelectedTab: C ? 1 : 0 })
|
|
794
796
|
}
|
|
795
797
|
)
|
|
796
798
|
]
|
|
797
799
|
}
|
|
798
|
-
) : /* @__PURE__ */ e(
|
|
799
|
-
},
|
|
800
|
-
const { completeOnboarding: n } = me(), { cashflow: t } =
|
|
800
|
+
) : /* @__PURE__ */ e(Z, {});
|
|
801
|
+
}, $n = T(Ot), Ft = ({ handleNextStep: a }) => {
|
|
802
|
+
const { completeOnboarding: n } = me(), { cashflow: t } = L(), i = se();
|
|
801
803
|
return /* @__PURE__ */ o(s, { children: [
|
|
802
|
-
/* @__PURE__ */ e(de, { pb: 12, children: t.welcome_title }),
|
|
804
|
+
/* @__PURE__ */ e(de, { pb: 12, variant: "H1", children: t.welcome_title }),
|
|
803
805
|
/* @__PURE__ */ e(
|
|
804
|
-
|
|
806
|
+
Ve,
|
|
805
807
|
{
|
|
806
808
|
color: i.palette.primary.light,
|
|
807
809
|
pb: 8,
|
|
808
810
|
sx: { wordBreak: "break-word", whiteSpace: "initial" },
|
|
809
|
-
variant: "H3",
|
|
810
811
|
children: t.welcome_sub_title
|
|
811
812
|
}
|
|
812
813
|
),
|
|
@@ -823,7 +824,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
823
824
|
mr: 24,
|
|
824
825
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
825
826
|
width: 44,
|
|
826
|
-
children: /* @__PURE__ */ e(
|
|
827
|
+
children: /* @__PURE__ */ e($, { color: "primary", name: "currency_exchange" })
|
|
827
828
|
}
|
|
828
829
|
),
|
|
829
830
|
t.bullet_one
|
|
@@ -839,7 +840,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
839
840
|
mr: 24,
|
|
840
841
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
841
842
|
width: 44,
|
|
842
|
-
children: /* @__PURE__ */ e(
|
|
843
|
+
children: /* @__PURE__ */ e($, { color: "primary", name: "cardiology" })
|
|
843
844
|
}
|
|
844
845
|
),
|
|
845
846
|
t.bullet_two
|
|
@@ -855,181 +856,181 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
855
856
|
mr: 24,
|
|
856
857
|
sx: { display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 },
|
|
857
858
|
width: 44,
|
|
858
|
-
children: /* @__PURE__ */ e(
|
|
859
|
+
children: /* @__PURE__ */ e($, { color: "primary", name: "flare" })
|
|
859
860
|
}
|
|
860
861
|
),
|
|
861
862
|
t.bullet_three
|
|
862
863
|
] })
|
|
863
864
|
] }),
|
|
864
865
|
/* @__PURE__ */ o(s, { direction: "row", spacing: 16, children: [
|
|
865
|
-
/* @__PURE__ */ e(
|
|
866
|
-
/* @__PURE__ */ e(
|
|
866
|
+
/* @__PURE__ */ e(M, { onClick: a, variant: "contained", children: t.get_started_button }),
|
|
867
|
+
/* @__PURE__ */ e(M, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
867
868
|
] })
|
|
868
869
|
] });
|
|
869
|
-
},
|
|
870
|
-
CASHFLOW_ONBOARDING: `${
|
|
871
|
-
CASHFLOW_LOADING_ANIMATION: `${
|
|
872
|
-
},
|
|
873
|
-
const { cashflow: a } =
|
|
874
|
-
return /* @__PURE__ */ o(
|
|
875
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src:
|
|
876
|
-
/* @__PURE__ */ e(de, { pb: 12, children: a.loading_title }),
|
|
870
|
+
}, Wt = T(Ft), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", je = {
|
|
871
|
+
CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
|
|
872
|
+
CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
|
|
873
|
+
}, Gt = () => {
|
|
874
|
+
const { cashflow: a } = L();
|
|
875
|
+
return /* @__PURE__ */ o(p.Fragment, { children: [
|
|
876
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: je.CASHFLOW_LOADING_ANIMATION }) }),
|
|
877
|
+
/* @__PURE__ */ e(de, { pb: 12, variant: "H1", children: a.loading_title }),
|
|
877
878
|
/* @__PURE__ */ e(N, { children: a.loading_description })
|
|
878
879
|
] });
|
|
879
|
-
}, Mt = T(
|
|
880
|
+
}, Mt = T(Gt), $t = it`
|
|
880
881
|
from {
|
|
881
882
|
transform: rotate(0deg);
|
|
882
883
|
}
|
|
883
884
|
to {
|
|
884
885
|
transform: rotate(360deg);
|
|
885
886
|
}
|
|
886
|
-
`,
|
|
887
|
-
const { addRepeatingTransaction: a, repeatingTransactions: n } =
|
|
888
|
-
() =>
|
|
889
|
-
[
|
|
890
|
-
),
|
|
891
|
-
(y) => y.repeating_transaction_type ===
|
|
892
|
-
).length,
|
|
893
|
-
|
|
887
|
+
`, jt = () => {
|
|
888
|
+
const { addRepeatingTransaction: a, repeatingTransactions: n } = U(), { cashflow: t, common: i } = L(), { user: f } = Ke(), { completeOnboarding: u } = me(), { isDirty: c } = V(), { isMobile: l } = ue(), { isCopyLoaded: g, setDisplayedDate: r } = P(), { filter: h, setFilter: d, transactions: x } = He(), S = se(), [w, A] = Y(!0), [_, k] = p.useState(bt.EveryMonth), [b, C] = p.useState(1), [I, ne] = p.useState(15), [oe, ae] = Y(!1), [H, fe] = Y(1), [O, ze] = Y([]), [ge, le] = Y(""), F = p.useMemo(
|
|
889
|
+
() => x.find((y) => y.guid === ge),
|
|
890
|
+
[ge, x]
|
|
891
|
+
), Be = !!n.filter(
|
|
892
|
+
(y) => y.repeating_transaction_type === ve.Income
|
|
893
|
+
).length, be = async () => {
|
|
894
|
+
fe(2), r(
|
|
894
895
|
// Beginning of the month, 90 days before today
|
|
895
|
-
|
|
896
|
+
pt($e(W(), 90)),
|
|
896
897
|
W()
|
|
897
|
-
), d({ ...
|
|
898
|
-
},
|
|
899
|
-
if (!(
|
|
898
|
+
), d({ ...h, custom: _e }), fe(3);
|
|
899
|
+
}, Ue = async () => {
|
|
900
|
+
if (!(O.length < 1)) {
|
|
900
901
|
ae(!0);
|
|
901
|
-
for (let y = 0; y <
|
|
902
|
-
const E =
|
|
902
|
+
for (let y = 0; y < O.length; y++) {
|
|
903
|
+
const E = O[y], xe = Ae(_, De(E.date)), qe = {
|
|
903
904
|
account_guid: E.account_guid,
|
|
904
905
|
amount: E.amount,
|
|
905
906
|
created_by: 0,
|
|
906
907
|
//user
|
|
907
908
|
merchant_guid: E.merchant_guid,
|
|
908
909
|
description: E.feed_description || E.description,
|
|
909
|
-
predicted_occurs_on:
|
|
910
|
-
recurrence_day:
|
|
911
|
-
recurrence_type:
|
|
912
|
-
repeating_transaction_type:
|
|
913
|
-
second_recurrence_day:
|
|
910
|
+
predicted_occurs_on: ht(xe, { representation: "date" }),
|
|
911
|
+
recurrence_day: xe.getDay(),
|
|
912
|
+
recurrence_type: _,
|
|
913
|
+
repeating_transaction_type: ve.Income,
|
|
914
|
+
second_recurrence_day: I,
|
|
914
915
|
transaction_type: E.transaction_type,
|
|
915
|
-
user_guid:
|
|
916
|
+
user_guid: f.guid
|
|
916
917
|
};
|
|
917
|
-
await a(
|
|
918
|
+
await a(qe, E);
|
|
918
919
|
}
|
|
919
|
-
await
|
|
920
|
+
await u();
|
|
920
921
|
}
|
|
921
|
-
},
|
|
922
|
-
return
|
|
922
|
+
}, Pe = !F && w || !F && O.length < 1;
|
|
923
|
+
return g ? /* @__PURE__ */ o(
|
|
923
924
|
D,
|
|
924
925
|
{
|
|
925
926
|
sx: {
|
|
926
927
|
display: "flex",
|
|
927
|
-
alignItems:
|
|
928
|
-
backgroundColor:
|
|
929
|
-
backgroundImage:
|
|
928
|
+
alignItems: l ? "flex-start" : "center",
|
|
929
|
+
backgroundColor: S.palette.background.paper,
|
|
930
|
+
backgroundImage: l ? null : `url(${je.CASHFLOW_ONBOARDING})`,
|
|
930
931
|
backgroundRepeat: "no-repeat",
|
|
931
932
|
backgroundPosition: "left 100px",
|
|
932
933
|
backgroundSize: "35%",
|
|
933
934
|
py: 24
|
|
934
935
|
},
|
|
935
936
|
children: [
|
|
936
|
-
|
|
937
|
+
H === 1 && /* @__PURE__ */ e(
|
|
937
938
|
D,
|
|
938
939
|
{
|
|
939
940
|
sx: {
|
|
940
|
-
...
|
|
941
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
941
942
|
},
|
|
942
|
-
children: /* @__PURE__ */ e(
|
|
943
|
+
children: /* @__PURE__ */ e(Wt, { handleNextStep: be })
|
|
943
944
|
}
|
|
944
945
|
),
|
|
945
|
-
|
|
946
|
+
H === 2 && /* @__PURE__ */ e(
|
|
946
947
|
D,
|
|
947
948
|
{
|
|
948
949
|
sx: {
|
|
949
|
-
...
|
|
950
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
950
951
|
},
|
|
951
952
|
children: /* @__PURE__ */ e(Mt, {})
|
|
952
953
|
}
|
|
953
954
|
),
|
|
954
|
-
|
|
955
|
+
H === 3 && /* @__PURE__ */ o(
|
|
955
956
|
D,
|
|
956
957
|
{
|
|
957
958
|
sx: {
|
|
958
|
-
...
|
|
959
|
+
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
959
960
|
},
|
|
960
961
|
children: [
|
|
961
|
-
/* @__PURE__ */ e(de, { pb: 12, children: t.add_income_title }),
|
|
962
|
+
/* @__PURE__ */ e(de, { pb: 12, variant: "H1", children: t.add_income_title }),
|
|
962
963
|
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
963
|
-
|
|
964
|
-
/* @__PURE__ */ e(
|
|
965
|
-
/* @__PURE__ */ e(
|
|
966
|
-
|
|
964
|
+
O.length > 0 && !F && /* @__PURE__ */ o(B, { children: [
|
|
965
|
+
/* @__PURE__ */ e(J, { children: O.map((y, E) => /* @__PURE__ */ o(p.Fragment, { children: [
|
|
966
|
+
/* @__PURE__ */ e(ft, { bgcolor: "background.paper", children: xt(
|
|
967
|
+
z(y.nextDate || y.date)
|
|
967
968
|
) }),
|
|
968
|
-
/* @__PURE__ */ e(
|
|
969
|
-
E !==
|
|
969
|
+
/* @__PURE__ */ e(gt, { transaction: y }),
|
|
970
|
+
E !== O.length - 1 && /* @__PURE__ */ e(v, {})
|
|
970
971
|
] }, y.guid)) }),
|
|
971
972
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
972
973
|
/* @__PURE__ */ e(v, { sx: { flexGrow: 1 } }),
|
|
973
974
|
/* @__PURE__ */ e(
|
|
974
|
-
|
|
975
|
+
M,
|
|
975
976
|
{
|
|
976
|
-
onClick: () =>
|
|
977
|
-
startIcon: /* @__PURE__ */ e(
|
|
977
|
+
onClick: () => A(!0),
|
|
978
|
+
startIcon: /* @__PURE__ */ e($, { name: "add", size: 20 }),
|
|
978
979
|
children: t.add_income
|
|
979
980
|
}
|
|
980
981
|
)
|
|
981
982
|
] })
|
|
982
983
|
] }),
|
|
983
|
-
|
|
984
|
-
|
|
984
|
+
Pe && /* @__PURE__ */ e(
|
|
985
|
+
ct,
|
|
985
986
|
{
|
|
986
987
|
bgcolor: "background.paper",
|
|
987
988
|
onSearch: (y) => d({
|
|
988
|
-
...
|
|
989
|
-
custom: (E) => y ?
|
|
989
|
+
...h,
|
|
990
|
+
custom: (E) => y ? lt(E, y) : _e(E)
|
|
990
991
|
}),
|
|
991
992
|
onSelected: (y) => {
|
|
992
|
-
le(y),
|
|
993
|
+
le(y), A(!1);
|
|
993
994
|
}
|
|
994
995
|
}
|
|
995
996
|
),
|
|
996
|
-
!
|
|
997
|
-
F && /* @__PURE__ */ o(
|
|
997
|
+
!Be && c && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
998
|
+
F && /* @__PURE__ */ o(B, { children: [
|
|
998
999
|
/* @__PURE__ */ e(
|
|
999
|
-
|
|
1000
|
+
dt,
|
|
1000
1001
|
{
|
|
1001
1002
|
bgcolor: "background.paper",
|
|
1002
|
-
firstDay:
|
|
1003
|
-
frequency:
|
|
1004
|
-
onFirstDayChange:
|
|
1005
|
-
onFrequencyChange:
|
|
1006
|
-
onSecondDayChange:
|
|
1007
|
-
secondDay:
|
|
1003
|
+
firstDay: b,
|
|
1004
|
+
frequency: _,
|
|
1005
|
+
onFirstDayChange: C,
|
|
1006
|
+
onFrequencyChange: k,
|
|
1007
|
+
onSecondDayChange: ne,
|
|
1008
|
+
secondDay: I,
|
|
1008
1009
|
transaction: F
|
|
1009
1010
|
}
|
|
1010
1011
|
),
|
|
1011
1012
|
/* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1012
1013
|
/* @__PURE__ */ e(
|
|
1013
|
-
|
|
1014
|
+
M,
|
|
1014
1015
|
{
|
|
1015
1016
|
"aria-disabled": !F,
|
|
1016
1017
|
onClick: () => {
|
|
1017
|
-
const y = [...
|
|
1018
|
+
const y = [...O];
|
|
1018
1019
|
y.push({
|
|
1019
1020
|
...F,
|
|
1020
|
-
nextDate:
|
|
1021
|
-
frequency:
|
|
1022
|
-
}),
|
|
1021
|
+
nextDate: Ae(_, De(F.date)),
|
|
1022
|
+
frequency: _
|
|
1023
|
+
}), ze(y), le("");
|
|
1023
1024
|
},
|
|
1024
1025
|
variant: "contained",
|
|
1025
1026
|
children: i.confirm_button
|
|
1026
1027
|
}
|
|
1027
1028
|
),
|
|
1028
1029
|
/* @__PURE__ */ e(
|
|
1029
|
-
|
|
1030
|
+
M,
|
|
1030
1031
|
{
|
|
1031
1032
|
onClick: () => {
|
|
1032
|
-
le(""),
|
|
1033
|
+
le(""), A(!0), be().finally();
|
|
1033
1034
|
},
|
|
1034
1035
|
variant: "outlined",
|
|
1035
1036
|
children: i.cancel_button
|
|
@@ -1037,14 +1038,14 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1037
1038
|
)
|
|
1038
1039
|
] })
|
|
1039
1040
|
] }),
|
|
1040
|
-
|
|
1041
|
+
O.length > 0 && !F && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1041
1042
|
/* @__PURE__ */ e(
|
|
1042
|
-
|
|
1043
|
+
M,
|
|
1043
1044
|
{
|
|
1044
|
-
"aria-disabled":
|
|
1045
|
-
onClick:
|
|
1046
|
-
startIcon:
|
|
1047
|
-
|
|
1045
|
+
"aria-disabled": O.length < 1 || oe,
|
|
1046
|
+
onClick: Ue,
|
|
1047
|
+
startIcon: oe ? /* @__PURE__ */ e(
|
|
1048
|
+
$,
|
|
1048
1049
|
{
|
|
1049
1050
|
name: "progress_activity",
|
|
1050
1051
|
sx: {
|
|
@@ -1056,38 +1057,38 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1056
1057
|
children: t.confirm_income_button
|
|
1057
1058
|
}
|
|
1058
1059
|
),
|
|
1059
|
-
/* @__PURE__ */ e(
|
|
1060
|
+
/* @__PURE__ */ e(M, { onClick: u, variant: "outlined", children: t.skip_button })
|
|
1060
1061
|
] })
|
|
1061
1062
|
]
|
|
1062
1063
|
}
|
|
1063
1064
|
)
|
|
1064
1065
|
]
|
|
1065
1066
|
}
|
|
1066
|
-
) : /* @__PURE__ */ e(
|
|
1067
|
-
},
|
|
1068
|
-
class
|
|
1067
|
+
) : /* @__PURE__ */ e(Z, {});
|
|
1068
|
+
}, jn = T(jt);
|
|
1069
|
+
class zn {
|
|
1069
1070
|
fetchInstance;
|
|
1070
1071
|
constructor(n, t, i) {
|
|
1071
|
-
this.fetchInstance = new
|
|
1072
|
+
this.fetchInstance = new Ct(n, t, void 0, i);
|
|
1072
1073
|
}
|
|
1073
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1074
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1075
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1074
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(j.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1075
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(j.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1076
|
+
getCashflowSequences = async () => this.fetchInstance.get(j.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1076
1077
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1077
|
-
`${
|
|
1078
|
+
`${j.CASHFLOW_EVENTS}/from/${z(n)}/to/${z(t)}`
|
|
1078
1079
|
).then((i) => i.cashflow_events);
|
|
1079
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1080
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${j.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1080
1081
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1081
|
-
`${
|
|
1082
|
+
`${j.CASHFLOW_SEQUENCES}/projected_events/from/${z(
|
|
1082
1083
|
n
|
|
1083
|
-
)}/to/${
|
|
1084
|
+
)}/to/${z(t)}`
|
|
1084
1085
|
).then((i) => i.cashflow_events);
|
|
1085
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1086
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${j.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1086
1087
|
}
|
|
1087
1088
|
export {
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1089
|
+
zn as CashflowApi,
|
|
1090
|
+
Mn as CashflowMiniWidget,
|
|
1091
|
+
jn as CashflowOnboarding,
|
|
1092
|
+
Pn as CashflowStore,
|
|
1093
|
+
$n as CashflowWidget
|
|
1093
1094
|
};
|