@mx-cartographer/experiences 9.0.2 → 9.1.0-alpha.bb1
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/dist/Analytics-BKzTPees.mjs +61 -0
- package/dist/GlobalCopyApi-BeXzaDH9.mjs +487 -0
- package/dist/HeaderCell-EhCUSjvj.mjs +10 -0
- package/dist/Loader-BlVzRtUd.mjs +73 -0
- package/dist/MiniWidgetContainer-COwnjfy7.mjs +110 -0
- package/dist/OriginalBalanceAction-sbiqaxok.mjs +110 -0
- package/dist/SpendingLegend-D15ixlQ1.mjs +222 -0
- package/dist/accounts/index.es.js +12 -1598
- package/dist/accounts-DkyAiLpg.mjs +15632 -0
- package/dist/analytics/index.es.js +155 -139
- package/dist/budgets/index.es.js +1317 -1266
- package/dist/cashflow/index.es.js +1047 -942
- package/dist/categories/index.es.js +4 -4
- package/dist/common/index.es.js +101 -310
- package/dist/core/index.es.js +80 -104
- package/dist/core-BexP5oiV.mjs +4047 -0
- package/dist/dashboard/index.es.js +185 -141
- package/dist/debts/index.es.js +1384 -1272
- package/dist/finstrong/index.es.js +3366 -3471
- package/dist/goals/index.es.js +1103 -984
- package/dist/help/index.es.js +3 -25
- package/dist/help-CctDYrAH.mjs +2308 -0
- package/dist/insights/index.es.js +93 -4843
- package/dist/investments/index.es.js +1533 -1522
- package/dist/merchants/index.es.js +75 -64
- package/dist/microinsights/index.es.js +15 -824
- package/dist/microinsights-CRf3ChsJ.mjs +1814 -0
- package/dist/networth/index.es.js +550 -503
- package/dist/notifications/index.es.js +169 -161
- package/dist/recurringtransactions/index.es.js +10 -962
- package/dist/recurringtransactions-gbJ_NA8u.mjs +1564 -0
- package/dist/settings/index.es.js +13 -880
- package/dist/settings-ZMHe439l.mjs +1526 -0
- package/dist/spending/index.es.js +400 -456
- package/dist/transactions/index.es.js +10 -603
- package/dist/trends/index.es.js +1268 -1407
- package/package.json +28 -28
- package/dist/Account-BaJmiJAG.mjs +0 -118
- package/dist/Account-BxHMlV9R.mjs +0 -30
- package/dist/AccountDetailsHeader-DIysk_4w.mjs +0 -95
- package/dist/AccountDisplayName-CO7z3v99.mjs +0 -11
- package/dist/AccountFields-mwJ8NXsX.mjs +0 -141
- package/dist/AccountListItem-BDXHs4tV.mjs +0 -94
- package/dist/AccountUtils-T5_Odvos.mjs +0 -27
- package/dist/Accounts-CseLC3lL.mjs +0 -5
- package/dist/Analytics-CkYXKvco.mjs +0 -53
- package/dist/Analytics-CzGzz_sE.mjs +0 -136
- package/dist/ApiEndpoints-DXwIYNUV.mjs +0 -49
- package/dist/BudgetUtil-Bg2AQJpQ.mjs +0 -74
- package/dist/Category-DEKZGLYe.mjs +0 -301
- package/dist/CategorySelectorDrawer-8soGrhB8.mjs +0 -430
- package/dist/Connect-Dk6GZEsA.mjs +0 -39
- package/dist/ConnectCard-CCep7Zqe.mjs +0 -54
- package/dist/ConnectDrawer-Cnjr3Ddg.mjs +0 -58
- package/dist/ConnectionsDrawer-CtfPXk0M.mjs +0 -54
- package/dist/CurrencyDialog-DumQCTPO.mjs +0 -373
- package/dist/CurrencyInput-adTIRtL3.mjs +0 -87
- package/dist/CurrencyText-CCbE6MmF.mjs +0 -20
- package/dist/DateFormats-HudZ3Bjs.mjs +0 -64
- package/dist/DateUtil-Bhq59ZVg.mjs +0 -58
- package/dist/DebtUtils-DD3186U-.mjs +0 -153
- package/dist/Dialog-Bvd2n8hz.mjs +0 -66
- package/dist/Donut-SzzfZDHF.mjs +0 -88
- package/dist/Drawer-BXqqBMxg.mjs +0 -174
- package/dist/EmbeddedCard-DPwJjqMH.mjs +0 -856
- package/dist/EmptyState-CJUDc3kD.mjs +0 -84
- package/dist/Error-Dogaw2jO.mjs +0 -84
- package/dist/ErrorBoundary-CsdOcnJ9.mjs +0 -23
- package/dist/ExportCsvAction-Bw02ZJEj.mjs +0 -24
- package/dist/GlobalAccountFilter-7Cg2-9A5.mjs +0 -237
- package/dist/GlobalCopyApi-wcnDUzMV.mjs +0 -128
- package/dist/GoalsUtil-C9EnLWvC.mjs +0 -107
- package/dist/HeaderCell-P8w6CmfO.mjs +0 -6
- package/dist/Help-CkQTjORd.mjs +0 -299
- package/dist/Help-DJ8PrVHX.mjs +0 -3209
- package/dist/IconBacking-DgT8DCeh.mjs +0 -39
- package/dist/InformationTooltip-4su8bn1e.mjs +0 -41
- package/dist/InvestmentUtil-BItV7uEs.mjs +0 -134
- package/dist/LineChart-CejWS_rh.mjs +0 -612
- package/dist/ListItemAction-CzZ8s39Z.mjs +0 -69
- package/dist/ListItemRow-kH1rn8Xu.mjs +0 -67
- package/dist/ListItemWrapper-B5r-YQQ_.mjs +0 -42
- package/dist/Loader-CxeBwuPG.mjs +0 -21
- package/dist/Localization-DnoVyBNK.mjs +0 -38
- package/dist/ManageIncome-D1yBODQi.mjs +0 -595
- package/dist/MicroWidgetContainer-CfKdQfhi.mjs +0 -45
- package/dist/MiniWidgetContainer-BdPiUU-u.mjs +0 -66
- package/dist/NetWorthUtils-DilGN1nW.mjs +0 -95
- package/dist/Notification-DTNYSd8P.mjs +0 -7
- package/dist/NotificationSettings-B4JA5IKE.mjs +0 -677
- package/dist/NotificationUtils-BRGFTePr.mjs +0 -23
- package/dist/NumberFormatting--XMeeBfr.mjs +0 -49
- package/dist/OriginalBalanceAction-BybTXDtO.mjs +0 -114
- package/dist/RecurringSettings-D2xbNb67.mjs +0 -88
- package/dist/RecurringTransactionsUtil-B3rLEx_g.mjs +0 -253
- package/dist/ResponsiveButton-CC9F_Ezk.mjs +0 -45
- package/dist/SearchBox-Cpgu_gdO.mjs +0 -50
- package/dist/Select-BFt-HD-L.mjs +0 -55
- package/dist/SelectionBox-B4xELRgp.mjs +0 -48
- package/dist/SingleSegmentDonut-7Uy6VEld.mjs +0 -69
- package/dist/Sizes-DISGrlUg.mjs +0 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +0 -38
- package/dist/SpendingData-PKlh8caU.mjs +0 -53
- package/dist/SpendingLegend-5Ct_FZ8o.mjs +0 -193
- package/dist/StatusBar-CPfSXe80.mjs +0 -30
- package/dist/TabContentContainer-CnMXkVqr.mjs +0 -21
- package/dist/ToggleListItem-Dl1lXNwj.mjs +0 -91
- package/dist/TransactionDetails-DctXr07p.mjs +0 -1714
- package/dist/TransactionUtils-BphBJBbU.mjs +0 -234
- package/dist/TrendsUtil-D9z3kIj_.mjs +0 -69
- package/dist/UserStore-CRpKQjpP.mjs +0 -3002
- package/dist/ViewMoreMicroCard-BD_MNc2z.mjs +0 -1295
- package/dist/WidgetContainer-CmbU4CBH.mjs +0 -482
- package/dist/hooks-BaO_gOI6.mjs +0 -77
- package/dist/useAccountDisplayName-CFa_MrS6.mjs +0 -15
- package/dist/useAriaLive-MkYebyUR.mjs +0 -35
- package/dist/useDimensions-CeDR9V8N.mjs +0 -36
- package/dist/useInsightsEnabled-DaNLPmUU.mjs +0 -11
- package/dist/useScreenSize-mWpmnh5w.mjs +0 -36
- package/dist/useWidgetLoadTimer-CJb-RELP.mjs +0 -19
|
@@ -1,358 +1,410 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import h,
|
|
1
|
+
import { s as F } from "../GlobalCopyApi-BeXzaDH9.mjs";
|
|
2
|
+
import { J as V, Pt as q, _t as xe, f as ye, h as $e, ln as P, mt as Ye, un as U } from "../core-BexP5oiV.mjs";
|
|
3
|
+
import { An as qe, Gn as Ke, In as _e, Nn as le, jn as E, ln as Ve, lr as Ne, mr as de, nn as Xe, rn as Je, sr as Ce } from "../accounts-DkyAiLpg.mjs";
|
|
4
|
+
import { n as ke } from "../Analytics-BKzTPees.mjs";
|
|
5
|
+
import { E as Le, M as Qe, O as Ze, d as Oe, h as $, i as et, k as ie, n as Ge, o as me, p as N, t as J, w as B } from "../Loader-BlVzRtUd.mjs";
|
|
6
|
+
import { t as tt } from "../MiniWidgetContainer-COwnjfy7.mjs";
|
|
7
|
+
import { a as nt, c as we, d as at, l as ot, o as it, u as rt } from "../recurringtransactions-gbJ_NA8u.mjs";
|
|
8
|
+
import h, { useState as K } from "react";
|
|
3
9
|
import { observer as A } from "mobx-react-lite";
|
|
4
|
-
import { addMonths as Ye } from "date-fns/addMonths";
|
|
5
|
-
import { startOfToday as F } from "date-fns/startOfToday";
|
|
6
|
-
import I from "@mui/material/Box";
|
|
7
|
-
import v from "@mui/material/Divider";
|
|
8
10
|
import s from "@mui/material/Stack";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { G as Xe, p as me, u as L, D as ae, d as Le, b as P, i as B, g as Ne, a as Je, h as ke, C as Qe } from "../hooks-BaO_gOI6.mjs";
|
|
13
|
-
import { C as E } from "../CurrencyText-CCbE6MmF.mjs";
|
|
14
|
-
import { u as ue } from "../useScreenSize-mWpmnh5w.mjs";
|
|
15
|
-
import { L as Z } from "../Loader-CxeBwuPG.mjs";
|
|
16
|
-
import { I as pe } from "../InformationTooltip-4su8bn1e.mjs";
|
|
17
|
-
import { u as Oe } from "../useWidgetLoadTimer-CJb-RELP.mjs";
|
|
18
|
-
import { M as Ze } from "../MiniWidgetContainer-BdPiUU-u.mjs";
|
|
19
|
-
import { E as et } from "../EmptyState-CJUDc3kD.mjs";
|
|
20
|
-
import { R as tt } from "../RecurringSettings-D2xbNb67.mjs";
|
|
21
|
-
import nt from "@mui/material/Tabs";
|
|
22
|
-
import ye from "@mui/material/Tab";
|
|
23
|
-
import { getUnixTime as le } from "date-fns/getUnixTime";
|
|
24
|
-
import Q from "@mui/material/List";
|
|
25
|
-
import ee from "@mui/material/ListItem";
|
|
26
|
-
import { A as ot } from "../AccountListItem-BDXHs4tV.mjs";
|
|
27
|
-
import { f as U, D as Y } from "../DateFormats-HudZ3Bjs.mjs";
|
|
28
|
-
import it from "@mui/material/ListSubheader";
|
|
29
|
-
import { f as J } from "../NumberFormatting--XMeeBfr.mjs";
|
|
30
|
-
import { isAfter as Ge } from "date-fns/isAfter";
|
|
11
|
+
import { H2 as ue, H3 as st, Icon as z, InstitutionLogo as ve, P as L, Text as m } from "@mxenabled/mxui";
|
|
12
|
+
import { addDays as Se } from "date-fns/addDays";
|
|
13
|
+
import { addMonths as ct } from "date-fns/addMonths";
|
|
31
14
|
import { isBefore as Me } from "date-fns/isBefore";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { DataGridPro as at } from "@mui/x-data-grid-pro";
|
|
35
|
-
import { T as Ce } from "../TabContentContainer-CnMXkVqr.mjs";
|
|
15
|
+
import { startOfMonth as lt } from "date-fns/startOfMonth";
|
|
16
|
+
import { startOfToday as H } from "date-fns/startOfToday";
|
|
36
17
|
import W from "@mui/material/Button";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import
|
|
40
|
-
import { endOfToday as
|
|
41
|
-
import {
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import {
|
|
45
|
-
import { fromUnixTime as
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
18
|
+
import { Fragment as j, jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
19
|
+
import { alpha as dt, keyframes as mt, useTheme as re } from "@mui/material/styles";
|
|
20
|
+
import D from "@mui/material/Box";
|
|
21
|
+
import { endOfToday as ut } from "date-fns/endOfToday";
|
|
22
|
+
import { subDays as He } from "date-fns/subDays";
|
|
23
|
+
import De from "@mui/material/Tab";
|
|
24
|
+
import pt from "@mui/material/Tabs";
|
|
25
|
+
import { getUnixTime as ce } from "date-fns/getUnixTime";
|
|
26
|
+
import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
|
|
27
|
+
import { isAfter as Fe } from "date-fns/isAfter";
|
|
28
|
+
import { formatISO as ht } from "date-fns/formatISO";
|
|
29
|
+
import I from "@mui/material/Divider";
|
|
30
|
+
import X from "@mui/material/List";
|
|
31
|
+
import Q from "@mui/material/ListItem";
|
|
32
|
+
import ft from "@mui/material/ListSubheader";
|
|
33
|
+
import { isToday as We } from "date-fns/isToday";
|
|
34
|
+
import { DataGridPro as gt } from "@mui/x-data-grid-pro";
|
|
35
|
+
var Y = () => {
|
|
36
|
+
if (!h.useContext(Qe)) throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
53
37
|
return me().uiStore;
|
|
54
|
-
},
|
|
55
|
-
const { cashflow:
|
|
38
|
+
}, bt = ({ remaining: o }) => {
|
|
39
|
+
const { cashflow: a } = N();
|
|
56
40
|
return /* @__PURE__ */ n(j, { children: [
|
|
57
|
-
/* @__PURE__ */ e(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
41
|
+
/* @__PURE__ */ e(D, { sx: {
|
|
42
|
+
borderRadius: "1px",
|
|
43
|
+
backgroundColor: o < 0 ? "error.main" : o > 0 ? "success.main" : "warning.main",
|
|
44
|
+
height: 6,
|
|
45
|
+
width: 6
|
|
46
|
+
} }),
|
|
47
|
+
/* @__PURE__ */ e(m, {
|
|
48
|
+
bold: !0,
|
|
49
|
+
sx: {
|
|
50
|
+
flexGrow: 1,
|
|
51
|
+
fontSize: 12
|
|
52
|
+
},
|
|
53
|
+
children: a.remaining_cash
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ e(E, {
|
|
56
|
+
amount: o,
|
|
57
|
+
bold: !0,
|
|
58
|
+
sx: { fontSize: 12 }
|
|
59
|
+
})
|
|
70
60
|
] });
|
|
71
|
-
},
|
|
72
|
-
const
|
|
73
|
-
daysUntilNextIncome: l,
|
|
74
|
-
expensesTilNextIncome: b,
|
|
75
|
-
selectedCashAccounts: a,
|
|
76
|
-
setNextIncome: g,
|
|
77
|
-
setSelectedCashAccounts: d,
|
|
78
|
-
setUpcomingExpenses: x
|
|
79
|
-
} = q(), { isDataLoaded: C, nextIncomeRecurrence: w, upcomingExpenses: R } = B();
|
|
61
|
+
}, pe = A(bt), xt = () => {
|
|
62
|
+
const o = re(), { availableWidth: a } = ie(), { isMobile: t } = de(), { visibleCashAccounts: r, visibleCashBalance: f } = Ge(), { selectedAccountGuids: u } = $(), { cashflow: c } = N(), { daysUntilNextIncome: l, expensesTilNextIncome: b, selectedCashAccounts: i, setNextIncome: g, setSelectedCashAccounts: d, setUpcomingExpenses: x } = Y(), { isDataLoaded: C, nextIncomeRecurrence: w, upcomingExpenses: R } = B();
|
|
80
63
|
h.useEffect(() => {
|
|
81
|
-
d(
|
|
82
|
-
r.filter((_) => u.includes(_.guid))
|
|
83
|
-
);
|
|
64
|
+
d(r.filter((y) => u.includes(y.guid)));
|
|
84
65
|
}, [r, u]), h.useEffect(() => {
|
|
85
66
|
w && g(w), x(R);
|
|
86
67
|
}, [w, R]);
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
[D, N]
|
|
96
|
-
);
|
|
97
|
-
return C ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: o > 710 ? /* @__PURE__ */ n(
|
|
98
|
-
s,
|
|
99
|
-
{
|
|
100
|
-
border: `1px solid ${i.palette.divider}`,
|
|
68
|
+
const v = h.useMemo(() => r.filter((y) => u.includes(y.guid)).reduce((y, S) => y + (S?.balance || 0), 0), [u, R]), k = h.useMemo(() => b.filter((y) => u.includes(y.accountGuid || "")).reduce((y, S) => y + S.amount, 0), [u, b]), p = h.useMemo(() => v - k, [v, k]);
|
|
69
|
+
return C ? /* @__PURE__ */ e(D, {
|
|
70
|
+
className: "mx-cashflow",
|
|
71
|
+
pl: 16,
|
|
72
|
+
pr: 16,
|
|
73
|
+
pt: 16,
|
|
74
|
+
children: a > 710 ? /* @__PURE__ */ n(s, {
|
|
75
|
+
border: `1px solid ${o.palette.divider}`,
|
|
101
76
|
borderRadius: 1,
|
|
102
77
|
direction: "row",
|
|
103
78
|
justifyContent: "space-between",
|
|
104
79
|
px: 24,
|
|
105
80
|
children: [
|
|
106
|
-
/* @__PURE__ */ n(s, {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
/* @__PURE__ */ e(s, {
|
|
119
|
-
|
|
120
|
-
/* @__PURE__ */ e(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
/* @__PURE__ */ e(
|
|
129
|
-
|
|
81
|
+
/* @__PURE__ */ n(s, {
|
|
82
|
+
pb: 14,
|
|
83
|
+
pt: 12,
|
|
84
|
+
children: [/* @__PURE__ */ e(E, {
|
|
85
|
+
amount: v,
|
|
86
|
+
variant: "h2"
|
|
87
|
+
}), /* @__PURE__ */ e(L, {
|
|
88
|
+
variant: "caption",
|
|
89
|
+
whiteSpace: "nowrap",
|
|
90
|
+
children: F(c.total_cash_accounts, i.length)
|
|
91
|
+
})]
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ e(s, {
|
|
94
|
+
pt: 18,
|
|
95
|
+
children: /* @__PURE__ */ e(z, { name: "remove" })
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ n(s, {
|
|
98
|
+
pb: 14,
|
|
99
|
+
pt: 12,
|
|
100
|
+
children: [/* @__PURE__ */ e(E, {
|
|
101
|
+
amount: k,
|
|
102
|
+
variant: "h2"
|
|
103
|
+
}), /* @__PURE__ */ e(L, {
|
|
104
|
+
variant: "caption",
|
|
105
|
+
whiteSpace: "nowrap",
|
|
106
|
+
children: F(c.expenses_due, b.length)
|
|
107
|
+
})]
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ e(s, {
|
|
110
|
+
pt: 18,
|
|
111
|
+
children: /* @__PURE__ */ e(z, { name: "equal" })
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ n(s, {
|
|
114
|
+
pb: 14,
|
|
115
|
+
pr: 24,
|
|
116
|
+
pt: 12,
|
|
117
|
+
children: [/* @__PURE__ */ e(E, {
|
|
118
|
+
amount: p,
|
|
119
|
+
variant: "h2"
|
|
120
|
+
}), /* @__PURE__ */ n(s, {
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
direction: "row",
|
|
123
|
+
gap: 8,
|
|
124
|
+
children: [/* @__PURE__ */ e(L, {
|
|
125
|
+
variant: "caption",
|
|
126
|
+
whiteSpace: "nowrap",
|
|
127
|
+
children: c.available_to_spend
|
|
128
|
+
}), /* @__PURE__ */ e(le, {
|
|
129
|
+
body: c.tooltip_body,
|
|
130
|
+
title: c.tooltip_title
|
|
131
|
+
})]
|
|
132
|
+
})]
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ e(s, {
|
|
135
|
+
borderLeft: `1px solid ${o.palette.divider}`,
|
|
136
|
+
pb: 12,
|
|
137
|
+
pl: 24,
|
|
138
|
+
pt: 12,
|
|
139
|
+
children: /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ e(m, {
|
|
140
|
+
variant: "h2",
|
|
141
|
+
children: F(c.days, l)
|
|
142
|
+
}), /* @__PURE__ */ e(L, {
|
|
143
|
+
variant: "caption",
|
|
144
|
+
whiteSpace: "nowrap",
|
|
145
|
+
children: c.next_paycheck
|
|
146
|
+
})] })
|
|
147
|
+
})
|
|
130
148
|
]
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
149
|
+
}) : /* @__PURE__ */ n(s, {
|
|
150
|
+
border: `1px solid ${o.palette.divider}`,
|
|
151
|
+
borderRadius: 1,
|
|
152
|
+
children: [
|
|
153
|
+
/* @__PURE__ */ n(s, {
|
|
154
|
+
direction: "row",
|
|
155
|
+
justifyContent: "space-between",
|
|
156
|
+
p: 16,
|
|
157
|
+
children: [/* @__PURE__ */ e(m, {
|
|
158
|
+
variant: "body2",
|
|
159
|
+
children: F(c.total_cash_accounts, i.length)
|
|
160
|
+
}), /* @__PURE__ */ e(E, {
|
|
161
|
+
amount: f,
|
|
162
|
+
bold: !0,
|
|
163
|
+
variant: "caption"
|
|
164
|
+
})]
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ e(I, {}),
|
|
167
|
+
/* @__PURE__ */ n(s, {
|
|
168
|
+
direction: "row",
|
|
169
|
+
justifyContent: "space-between",
|
|
170
|
+
p: 16,
|
|
171
|
+
children: [/* @__PURE__ */ e(m, {
|
|
172
|
+
variant: "body2",
|
|
173
|
+
children: F(c.expenses_due, b.length)
|
|
174
|
+
}), /* @__PURE__ */ e(E, {
|
|
175
|
+
amount: k,
|
|
176
|
+
bold: !0,
|
|
177
|
+
symbol: "-",
|
|
178
|
+
variant: "caption"
|
|
179
|
+
})]
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ e(I, {}),
|
|
182
|
+
/* @__PURE__ */ e(s, {
|
|
183
|
+
alignItems: "center",
|
|
184
|
+
bgcolor: "background.default",
|
|
185
|
+
direction: "row",
|
|
186
|
+
gap: 8,
|
|
187
|
+
height: 48,
|
|
188
|
+
justifyContent: "space-between",
|
|
189
|
+
px: 16,
|
|
190
|
+
sx: {
|
|
191
|
+
borderBottomLeftRadius: 4,
|
|
192
|
+
borderBottomRightRadius: 4
|
|
193
|
+
},
|
|
194
|
+
children: /* @__PURE__ */ e(pe, { remaining: p })
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ e(I, {}),
|
|
197
|
+
/* @__PURE__ */ n(s, {
|
|
198
|
+
direction: "row",
|
|
199
|
+
justifyContent: "space-between",
|
|
200
|
+
p: 16,
|
|
201
|
+
children: [/* @__PURE__ */ e(m, {
|
|
202
|
+
variant: "body2",
|
|
203
|
+
children: c.next_paycheck
|
|
204
|
+
}), /* @__PURE__ */ e(m, {
|
|
205
|
+
bold: !0,
|
|
206
|
+
variant: "caption",
|
|
207
|
+
children: F(c.days, l)
|
|
208
|
+
})]
|
|
209
|
+
})
|
|
210
|
+
]
|
|
211
|
+
})
|
|
212
|
+
}) : /* @__PURE__ */ e(J, { height: t ? 210 : 120 });
|
|
213
|
+
}, yt = A(xt), _t = ({ onPrimaryCtaClick: o, onSecondaryCtaClick: a, sx: t = {} }) => {
|
|
214
|
+
const { cashflow: r } = N(), { isInitialized: f } = $(), { loadRepeatingTransactionData: u, income: c, isDataLoaded: l, setDateRange: b } = B();
|
|
172
215
|
h.useEffect(() => {
|
|
173
|
-
b({
|
|
174
|
-
|
|
216
|
+
b({
|
|
217
|
+
start: H(),
|
|
218
|
+
end: ct(H(), 1)
|
|
219
|
+
}), l || u().finally();
|
|
220
|
+
}, []), ke({
|
|
175
221
|
widgetName: "CashflowMiniWidget",
|
|
176
222
|
isLoaded: l
|
|
177
223
|
});
|
|
178
|
-
const
|
|
179
|
-
return f ? /* @__PURE__ */ n(
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
224
|
+
const i = l && !c.length;
|
|
225
|
+
return f ? /* @__PURE__ */ n(tt, {
|
|
226
|
+
className: "mx-exp-cashflow-miniwidget",
|
|
227
|
+
onPrimaryCtaClick: o,
|
|
228
|
+
primaryCtaLabel: r.primary_cta,
|
|
229
|
+
primaryCtaLabelAria: r.primary_cta_aria,
|
|
230
|
+
subTitle: i || !l ? void 0 : r.sub_title,
|
|
231
|
+
sx: {
|
|
232
|
+
height: "100%",
|
|
233
|
+
...t
|
|
234
|
+
},
|
|
235
|
+
title: r.title,
|
|
236
|
+
children: [!l && /* @__PURE__ */ e(J, {}), l && (i ? /* @__PURE__ */ e(qe, {
|
|
237
|
+
header: r.create,
|
|
238
|
+
icon: "local_atm",
|
|
239
|
+
onClick: a,
|
|
240
|
+
primaryButton: r.add_income,
|
|
241
|
+
primaryButtonStartIcon: "add",
|
|
242
|
+
subText: r.create_description
|
|
243
|
+
}) : /* @__PURE__ */ e(yt, {}))]
|
|
244
|
+
}) : /* @__PURE__ */ e(J, {});
|
|
245
|
+
}, _n = A(_t), Ct = ({ remaining: o }) => /* @__PURE__ */ e(Q, {
|
|
246
|
+
sx: {
|
|
247
|
+
alignItems: "center",
|
|
248
|
+
backgroundColor: "background.highlight",
|
|
249
|
+
display: "flex",
|
|
250
|
+
gap: 12,
|
|
251
|
+
padding: "12px 24px",
|
|
252
|
+
borderBottomLeftRadius: "3px",
|
|
253
|
+
borderBottomRightRadius: "3px",
|
|
254
|
+
minHeight: "auto"
|
|
255
|
+
},
|
|
256
|
+
children: /* @__PURE__ */ e(pe, { remaining: o })
|
|
257
|
+
}), ae = /* @__PURE__ */ (function(o) {
|
|
258
|
+
return o.EXPENSE = "expense", o.INCOME = "income", o;
|
|
259
|
+
})({}), wt = ({ recurrence: o }) => /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n(Q, {
|
|
260
|
+
sx: {
|
|
261
|
+
display: "flex",
|
|
262
|
+
alignItems: "center",
|
|
263
|
+
gap: 16,
|
|
264
|
+
px: 24,
|
|
265
|
+
py: 12
|
|
266
|
+
},
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ n(s, {
|
|
269
|
+
alignItems: "center",
|
|
270
|
+
height: 32,
|
|
271
|
+
width: 32,
|
|
272
|
+
children: [/* @__PURE__ */ e(m, {
|
|
273
|
+
bold: !0,
|
|
274
|
+
sx: { fontSize: 11 },
|
|
275
|
+
children: U(o.expectedDate, P.MONTH)
|
|
276
|
+
}), /* @__PURE__ */ e(m, {
|
|
277
|
+
bold: !0,
|
|
278
|
+
sx: { fontSize: 11 },
|
|
279
|
+
children: U(o.expectedDate, P.DAY)
|
|
280
|
+
})]
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ e(m, {
|
|
283
|
+
sx: {
|
|
284
|
+
flexGrow: 1,
|
|
285
|
+
fontSize: 13
|
|
286
|
+
},
|
|
287
|
+
children: o.name
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ e(E, {
|
|
290
|
+
amount: o.amount,
|
|
291
|
+
bold: !0,
|
|
292
|
+
sx: {
|
|
293
|
+
textAlign: "right",
|
|
294
|
+
fontSize: 13
|
|
295
|
+
}
|
|
296
|
+
})
|
|
297
|
+
]
|
|
298
|
+
}), /* @__PURE__ */ e(I, {})] }), Te = A(wt), vt = ({ total: o, type: a }) => {
|
|
299
|
+
const { cashflow: t } = N();
|
|
300
|
+
return /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ n(ft, {
|
|
208
301
|
sx: {
|
|
209
302
|
alignItems: "center",
|
|
210
303
|
backgroundColor: "background.highlight",
|
|
211
304
|
display: "flex",
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
minHeight: "auto"
|
|
305
|
+
justifyContent: "space-between",
|
|
306
|
+
pb: 4,
|
|
307
|
+
pt: 12,
|
|
308
|
+
px: 24
|
|
217
309
|
},
|
|
218
|
-
children: /* @__PURE__ */ e(
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
display: "flex",
|
|
249
|
-
justifyContent: "space-between",
|
|
250
|
-
pb: 4,
|
|
251
|
-
pt: 12,
|
|
252
|
-
px: 24
|
|
253
|
-
},
|
|
254
|
-
children: [
|
|
255
|
-
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: o === te.EXPENSE ? t.expenses : t.income }),
|
|
256
|
-
/* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
257
|
-
o === te.EXPENSE ? "-" : "+",
|
|
258
|
-
J(i, "0,0.00")
|
|
259
|
-
] })
|
|
260
|
-
]
|
|
261
|
-
}
|
|
262
|
-
),
|
|
263
|
-
/* @__PURE__ */ e(v, {})
|
|
264
|
-
] });
|
|
265
|
-
}, Ae = A(Dt), oe = (i, o) => (t) => t.accountGuid === i.guid && (Fe(t.expectedDate) || Ge(t.expectedDate, o.start)) && Me(t.expectedDate, o.end), It = () => {
|
|
266
|
-
const { availableWidth: i } = ae(), { cashflow: o } = L(), { upcomingExpenses: t, upcomingIncome: r } = B(), { dateRange: f, selectedCashAccounts: u } = q();
|
|
267
|
-
return /* @__PURE__ */ n(s, { children: [
|
|
268
|
-
/* @__PURE__ */ n(s, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
269
|
-
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 15, mb: 12 }, children: o.accounts_breakdown }),
|
|
270
|
-
/* @__PURE__ */ n(m, { bold: !0, sx: { fontSize: 15, mb: 12 }, children: [
|
|
271
|
-
U(f.start, Y.FULL_MONTH_DAY),
|
|
310
|
+
children: [/* @__PURE__ */ e(m, {
|
|
311
|
+
bold: !0,
|
|
312
|
+
sx: { fontSize: 12 },
|
|
313
|
+
children: a === ae.EXPENSE ? t.expenses : t.income
|
|
314
|
+
}), /* @__PURE__ */ n(m, {
|
|
315
|
+
bold: !0,
|
|
316
|
+
sx: { fontSize: 13 },
|
|
317
|
+
children: [a === ae.EXPENSE ? "-" : "+", V(o, "0,0.00")]
|
|
318
|
+
})]
|
|
319
|
+
}), /* @__PURE__ */ e(I, {})] });
|
|
320
|
+
}, Ae = A(vt), oe = (o, a) => (t) => t.accountGuid === o.guid && (We(t.expectedDate) || Fe(t.expectedDate, a.start)) && Me(t.expectedDate, a.end), St = () => {
|
|
321
|
+
const { availableWidth: o } = ie(), { cashflow: a } = N(), { upcomingExpenses: t, upcomingIncome: r } = B(), { dateRange: f, selectedCashAccounts: u } = Y();
|
|
322
|
+
return /* @__PURE__ */ n(s, { children: [/* @__PURE__ */ n(s, {
|
|
323
|
+
direction: o < 400 ? "column" : "row",
|
|
324
|
+
justifyContent: "space-between",
|
|
325
|
+
children: [/* @__PURE__ */ e(m, {
|
|
326
|
+
bold: !0,
|
|
327
|
+
sx: {
|
|
328
|
+
fontSize: 15,
|
|
329
|
+
mb: 12
|
|
330
|
+
},
|
|
331
|
+
children: a.accounts_breakdown
|
|
332
|
+
}), /* @__PURE__ */ n(m, {
|
|
333
|
+
bold: !0,
|
|
334
|
+
sx: {
|
|
335
|
+
fontSize: 15,
|
|
336
|
+
mb: 12
|
|
337
|
+
},
|
|
338
|
+
children: [
|
|
339
|
+
U(f.start, P.FULL_MONTH_DAY),
|
|
272
340
|
" -",
|
|
273
341
|
" ",
|
|
274
|
-
U(f.end,
|
|
275
|
-
]
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
sx: { width: "100%" },
|
|
322
|
-
children: b.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
|
|
323
|
-
}
|
|
324
|
-
) }),
|
|
325
|
-
/* @__PURE__ */ e(
|
|
326
|
-
wt,
|
|
327
|
-
{
|
|
328
|
-
remaining: (c.available_balance || c.balance || 0) + a - g
|
|
329
|
-
}
|
|
330
|
-
)
|
|
331
|
-
]
|
|
332
|
-
},
|
|
333
|
-
c.guid
|
|
334
|
-
);
|
|
335
|
-
}) })
|
|
336
|
-
] });
|
|
337
|
-
}, vt = A(It), Tt = () => {
|
|
338
|
-
const { availableWidth: i } = ae(), o = ie(), { cashflow: t } = L(), { upcomingExpenses: r, upcomingIncome: f } = B(), { dateRange: u, selectedCashAccounts: c } = q(), l = [
|
|
342
|
+
U(f.end, P.FULL_MONTH_DAY)
|
|
343
|
+
]
|
|
344
|
+
})]
|
|
345
|
+
}), /* @__PURE__ */ e(s, { children: u.map((c) => {
|
|
346
|
+
const l = r.filter(oe(c, f)).sort((d, x) => ce(d.expectedDate) - ce(x.expectedDate)), b = t.filter(oe(c, f)), i = l.reduce((d, x) => d + x.amount, 0), g = b.reduce((d, x) => d + x.amount, 0);
|
|
347
|
+
return /* @__PURE__ */ n(X, {
|
|
348
|
+
sx: {
|
|
349
|
+
border: "1px solid",
|
|
350
|
+
borderColor: "neutral.light",
|
|
351
|
+
mb: 24,
|
|
352
|
+
borderRadius: 1
|
|
353
|
+
},
|
|
354
|
+
children: [
|
|
355
|
+
/* @__PURE__ */ e(Ve, {
|
|
356
|
+
account: c,
|
|
357
|
+
listItemProps: {
|
|
358
|
+
disableGutters: !1,
|
|
359
|
+
disablePadding: !1,
|
|
360
|
+
sx: {
|
|
361
|
+
borderTopRadius: 1,
|
|
362
|
+
pr: 24
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ e(I, {}),
|
|
367
|
+
l.length > 0 && /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(X, {
|
|
368
|
+
subheader: /* @__PURE__ */ e(Ae, {
|
|
369
|
+
total: i,
|
|
370
|
+
type: ae.INCOME
|
|
371
|
+
}),
|
|
372
|
+
sx: { width: "100%" },
|
|
373
|
+
children: l.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
|
|
374
|
+
}) }),
|
|
375
|
+
b.length > 0 && /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(X, {
|
|
376
|
+
subheader: /* @__PURE__ */ e(Ae, {
|
|
377
|
+
total: g,
|
|
378
|
+
type: ae.EXPENSE
|
|
379
|
+
}),
|
|
380
|
+
sx: { width: "100%" },
|
|
381
|
+
children: b.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
|
|
382
|
+
}) }),
|
|
383
|
+
/* @__PURE__ */ e(Ct, { remaining: (c.available_balance || c.balance || 0) + i - g })
|
|
384
|
+
]
|
|
385
|
+
}, c.guid);
|
|
386
|
+
}) })] });
|
|
387
|
+
}, Dt = A(St), It = () => {
|
|
388
|
+
const { availableWidth: o } = ie(), a = re(), { cashflow: t } = N(), { upcomingExpenses: r, upcomingIncome: f } = B(), { dateRange: u, selectedCashAccounts: c } = Y(), l = [
|
|
339
389
|
{
|
|
340
390
|
field: "account",
|
|
341
391
|
flex: 1.5,
|
|
342
392
|
headerName: t.accounts,
|
|
343
|
-
renderCell: ({ value: { name:
|
|
344
|
-
const C = g ||
|
|
345
|
-
return /* @__PURE__ */ n(s, {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
),
|
|
354
|
-
|
|
355
|
-
|
|
393
|
+
renderCell: ({ value: { name: i, nickname: g, institution_guid: d, account_number: x } }) => {
|
|
394
|
+
const C = g || i;
|
|
395
|
+
return /* @__PURE__ */ n(s, {
|
|
396
|
+
alignItems: "center",
|
|
397
|
+
flexDirection: "row",
|
|
398
|
+
gap: 12,
|
|
399
|
+
children: [/* @__PURE__ */ e(ve, {
|
|
400
|
+
alt: t.institution_logo,
|
|
401
|
+
institutionGuid: d || "",
|
|
402
|
+
size: 16
|
|
403
|
+
}), /* @__PURE__ */ e(m, {
|
|
404
|
+
variant: "body2",
|
|
405
|
+
children: `${C} ${x ? `*${x}` : ""}`
|
|
406
|
+
})]
|
|
407
|
+
});
|
|
356
408
|
}
|
|
357
409
|
},
|
|
358
410
|
{
|
|
@@ -360,706 +412,759 @@ const St = ({ recurrence: i }) => /* @__PURE__ */ n(j, { children: [
|
|
|
360
412
|
flex: 1,
|
|
361
413
|
headerName: t.balance,
|
|
362
414
|
type: "number",
|
|
363
|
-
renderCell: (
|
|
415
|
+
renderCell: (i) => /* @__PURE__ */ e(m, {
|
|
416
|
+
color: a.palette.text.primary,
|
|
417
|
+
variant: "body2",
|
|
418
|
+
children: V(i.value, "0,0.00")
|
|
419
|
+
})
|
|
364
420
|
},
|
|
365
421
|
{
|
|
366
422
|
field: "income",
|
|
367
423
|
flex: 1,
|
|
368
424
|
headerName: t.projected_income,
|
|
369
425
|
type: "number",
|
|
370
|
-
renderCell: (
|
|
426
|
+
renderCell: (i) => /* @__PURE__ */ e(m, {
|
|
427
|
+
color: a.palette.text.primary,
|
|
428
|
+
variant: "body2",
|
|
429
|
+
children: `+${V(i.value, "0,0.00")}`
|
|
430
|
+
})
|
|
371
431
|
},
|
|
372
432
|
{
|
|
373
433
|
field: "expenses",
|
|
374
434
|
flex: 1.1,
|
|
375
435
|
headerName: t.projected_expenses,
|
|
376
436
|
type: "number",
|
|
377
|
-
renderCell: (
|
|
437
|
+
renderCell: (i) => /* @__PURE__ */ e(m, {
|
|
438
|
+
color: a.palette.text.primary,
|
|
439
|
+
variant: "body2",
|
|
440
|
+
children: `-${V(i.value, "0,0.00")}`
|
|
441
|
+
})
|
|
378
442
|
},
|
|
379
443
|
{
|
|
380
444
|
field: "remaining",
|
|
381
445
|
flex: 1,
|
|
382
446
|
headerName: t.remaining,
|
|
383
447
|
type: "number",
|
|
384
|
-
renderCell: (
|
|
385
|
-
const g =
|
|
386
|
-
return /* @__PURE__ */ e(
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
children: J(g, "0,0.00")
|
|
392
|
-
}
|
|
393
|
-
);
|
|
448
|
+
renderCell: (i) => {
|
|
449
|
+
const g = i.row.balance + i.row.income - i.row.expenses;
|
|
450
|
+
return /* @__PURE__ */ e(m, {
|
|
451
|
+
color: Math.sign(g) === -1 ? a.palette.error.main : a.palette.text.primary,
|
|
452
|
+
variant: "body2",
|
|
453
|
+
children: V(g, "0,0.00")
|
|
454
|
+
});
|
|
394
455
|
}
|
|
395
456
|
}
|
|
396
|
-
], b = h.useMemo(() => c.map((
|
|
397
|
-
const g = r.filter(
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
457
|
+
], b = h.useMemo(() => c.map((i) => {
|
|
458
|
+
const g = r.filter(oe(i, {
|
|
459
|
+
start: H(),
|
|
460
|
+
end: Se(H(), 30)
|
|
461
|
+
})).reduce((C, w) => C + w.amount, 0), d = f.filter(oe(i, {
|
|
462
|
+
start: H(),
|
|
463
|
+
end: Se(H(), 30)
|
|
464
|
+
})).reduce((C, w) => C + w.amount, 0), x = (i.balance || 0) + d - g;
|
|
402
465
|
return {
|
|
403
|
-
account:
|
|
404
|
-
balance:
|
|
405
|
-
id:
|
|
466
|
+
account: i,
|
|
467
|
+
balance: i.balance || 0,
|
|
468
|
+
id: i.guid,
|
|
406
469
|
income: d,
|
|
407
470
|
expenses: g,
|
|
408
471
|
remaining: x
|
|
409
472
|
};
|
|
410
|
-
}), [
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
473
|
+
}), [
|
|
474
|
+
c,
|
|
475
|
+
r,
|
|
476
|
+
f
|
|
477
|
+
]);
|
|
478
|
+
return /* @__PURE__ */ n(D, {
|
|
479
|
+
sx: { width: "100%" },
|
|
480
|
+
children: [/* @__PURE__ */ n(s, {
|
|
481
|
+
direction: o < 540 ? "column" : "row",
|
|
482
|
+
justifyContent: "space-between",
|
|
483
|
+
mb: 12,
|
|
484
|
+
children: [/* @__PURE__ */ n(s, {
|
|
485
|
+
alignItems: "center",
|
|
486
|
+
direction: "row",
|
|
487
|
+
gap: 8,
|
|
488
|
+
children: [/* @__PURE__ */ e(m, {
|
|
489
|
+
bold: !0,
|
|
490
|
+
sx: { fontSize: 15 },
|
|
491
|
+
children: t.cash_inflow_and_outflow
|
|
492
|
+
}), /* @__PURE__ */ e(le, {
|
|
493
|
+
body: t.table_tooltip_body,
|
|
494
|
+
title: t.table_tooltip_title
|
|
495
|
+
})]
|
|
496
|
+
}), /* @__PURE__ */ n(m, {
|
|
497
|
+
bold: !0,
|
|
498
|
+
sx: { fontSize: 15 },
|
|
499
|
+
children: [
|
|
500
|
+
U(u.start, P.FULL_MONTH_DAY),
|
|
501
|
+
" -",
|
|
502
|
+
" ",
|
|
503
|
+
U(u.end, P.FULL_MONTH_DAY)
|
|
504
|
+
]
|
|
505
|
+
})]
|
|
506
|
+
}), o > 650 ? /* @__PURE__ */ e(gt, {
|
|
507
|
+
columnHeaderHeight: 48,
|
|
508
|
+
columns: l,
|
|
509
|
+
density: "standard",
|
|
510
|
+
disableColumnMenu: !0,
|
|
511
|
+
disableRowSelectionOnClick: !0,
|
|
512
|
+
hideFooter: !0,
|
|
513
|
+
rowHeight: 48,
|
|
514
|
+
rows: b,
|
|
414
515
|
sx: {
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
{
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
516
|
+
border: "1px solid",
|
|
517
|
+
borderColor: "neutral.light",
|
|
518
|
+
borderRadius: 1,
|
|
519
|
+
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
520
|
+
color: a.palette.primary.main,
|
|
521
|
+
"&:hover": { backgroundColor: dt(a.palette.primary.main, 0.1) }
|
|
522
|
+
},
|
|
523
|
+
"& .MuiDataGrid-columnHeaderTitle": {
|
|
524
|
+
fontFamily: a.typography.h3.fontFamily,
|
|
525
|
+
fontSize: a.typography.body2.fontSize
|
|
526
|
+
},
|
|
527
|
+
"& .MuiDataGrid-sortIcon": { color: a.palette.primary.main }
|
|
528
|
+
}
|
|
529
|
+
}) : b.map((i) => {
|
|
530
|
+
const { name: g, nickname: d, institution_guid: x, account_number: C } = i.account, w = d || g;
|
|
531
|
+
return /* @__PURE__ */ e(X, {
|
|
532
|
+
sx: {
|
|
533
|
+
border: "1px solid",
|
|
534
|
+
borderColor: "neutral.light",
|
|
535
|
+
borderRadius: 1,
|
|
536
|
+
marginBottom: 24
|
|
537
|
+
},
|
|
538
|
+
children: /* @__PURE__ */ e(Q, {
|
|
539
|
+
sx: { minHeight: "auto" },
|
|
540
|
+
children: /* @__PURE__ */ n(s, {
|
|
541
|
+
width: "100%",
|
|
424
542
|
children: [
|
|
425
|
-
/* @__PURE__ */ n(s, {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
543
|
+
/* @__PURE__ */ n(s, {
|
|
544
|
+
alignItems: "center",
|
|
545
|
+
flexDirection: "row",
|
|
546
|
+
justifyContent: "space-between",
|
|
547
|
+
px: 16,
|
|
548
|
+
py: 12,
|
|
549
|
+
children: [/* @__PURE__ */ n(s, {
|
|
550
|
+
alignItems: "center",
|
|
551
|
+
flexDirection: "row",
|
|
552
|
+
gap: 8,
|
|
553
|
+
width: "50%",
|
|
554
|
+
children: [/* @__PURE__ */ e(ve, {
|
|
555
|
+
alt: t.institution_logo,
|
|
556
|
+
institutionGuid: x || "",
|
|
557
|
+
size: 16
|
|
558
|
+
}), /* @__PURE__ */ e(m, {
|
|
559
|
+
variant: "body2",
|
|
560
|
+
children: `${w} ${C ? `*${C}` : ""}`
|
|
561
|
+
})]
|
|
562
|
+
}), /* @__PURE__ */ e(E, {
|
|
563
|
+
amount: i.balance,
|
|
564
|
+
bold: !0,
|
|
565
|
+
variant: "body2"
|
|
566
|
+
})]
|
|
567
|
+
}),
|
|
568
|
+
/* @__PURE__ */ e(I, { sx: { width: "100%" } }),
|
|
569
|
+
/* @__PURE__ */ n(s, {
|
|
570
|
+
alignItems: "center",
|
|
571
|
+
flexDirection: "row",
|
|
572
|
+
justifyContent: "space-between",
|
|
573
|
+
px: 16,
|
|
574
|
+
py: 12,
|
|
575
|
+
children: [/* @__PURE__ */ e(m, {
|
|
576
|
+
variant: "body2",
|
|
577
|
+
children: t.projected_income
|
|
578
|
+
}), /* @__PURE__ */ e(E, {
|
|
579
|
+
amount: i.income,
|
|
580
|
+
bold: !0,
|
|
581
|
+
symbol: "+",
|
|
582
|
+
variant: "body2"
|
|
583
|
+
})]
|
|
584
|
+
}),
|
|
585
|
+
/* @__PURE__ */ e(I, { sx: { width: "100%" } }),
|
|
586
|
+
/* @__PURE__ */ n(s, {
|
|
587
|
+
alignItems: "center",
|
|
588
|
+
flexDirection: "row",
|
|
589
|
+
justifyContent: "space-between",
|
|
590
|
+
px: 16,
|
|
591
|
+
py: 12,
|
|
592
|
+
children: [/* @__PURE__ */ e(m, {
|
|
593
|
+
variant: "body2",
|
|
594
|
+
children: t.projected_expenses
|
|
595
|
+
}), /* @__PURE__ */ e(E, {
|
|
596
|
+
amount: i.expenses,
|
|
597
|
+
bold: !0,
|
|
598
|
+
symbol: "-",
|
|
599
|
+
variant: "body2"
|
|
600
|
+
})]
|
|
601
|
+
}),
|
|
602
|
+
/* @__PURE__ */ e(I, { sx: { width: "100%" } }),
|
|
603
|
+
/* @__PURE__ */ e(s, {
|
|
604
|
+
alignItems: "center",
|
|
605
|
+
bgcolor: "background.default",
|
|
606
|
+
flexDirection: "row",
|
|
607
|
+
gap: 8,
|
|
608
|
+
justifyContent: "space-between",
|
|
609
|
+
px: 16,
|
|
610
|
+
py: 12,
|
|
611
|
+
sx: {
|
|
612
|
+
borderBottomLeftRadius: "4px",
|
|
613
|
+
borderBottomRightRadius: "4px"
|
|
614
|
+
},
|
|
615
|
+
children: /* @__PURE__ */ e(pe, { remaining: i.remaining })
|
|
616
|
+
})
|
|
450
617
|
]
|
|
451
|
-
}
|
|
452
|
-
),
|
|
453
|
-
i > 650 ? /* @__PURE__ */ e(
|
|
454
|
-
at,
|
|
455
|
-
{
|
|
456
|
-
columnHeaderHeight: 48,
|
|
457
|
-
columns: l,
|
|
458
|
-
density: "standard",
|
|
459
|
-
disableColumnMenu: !0,
|
|
460
|
-
disableRowSelectionOnClick: !0,
|
|
461
|
-
hideFooter: !0,
|
|
462
|
-
rowHeight: 48,
|
|
463
|
-
rows: b,
|
|
464
|
-
sx: {
|
|
465
|
-
border: "1px solid",
|
|
466
|
-
borderColor: "neutral.light",
|
|
467
|
-
borderRadius: 1,
|
|
468
|
-
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
469
|
-
color: o.palette.primary.main,
|
|
470
|
-
"&:hover": {
|
|
471
|
-
backgroundColor: qe(o.palette.primary.main, 0.1)
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
"& .MuiDataGrid-columnHeaderTitle": {
|
|
475
|
-
fontFamily: o.typography.h3.fontFamily,
|
|
476
|
-
fontSize: o.typography.body2.fontSize
|
|
477
|
-
},
|
|
478
|
-
"& .MuiDataGrid-sortIcon": {
|
|
479
|
-
color: o.palette.primary.main
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
) : b.map((a) => {
|
|
484
|
-
const { name: g, nickname: d, institution_guid: x, account_number: C } = a.account, w = d || g;
|
|
485
|
-
return /* @__PURE__ */ e(
|
|
486
|
-
Q,
|
|
487
|
-
{
|
|
488
|
-
sx: {
|
|
489
|
-
border: "1px solid",
|
|
490
|
-
borderColor: "neutral.light",
|
|
491
|
-
borderRadius: 1,
|
|
492
|
-
marginBottom: 24
|
|
493
|
-
},
|
|
494
|
-
children: /* @__PURE__ */ e(ee, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ n(s, { width: "100%", children: [
|
|
495
|
-
/* @__PURE__ */ n(
|
|
496
|
-
s,
|
|
497
|
-
{
|
|
498
|
-
alignItems: "center",
|
|
499
|
-
flexDirection: "row",
|
|
500
|
-
justifyContent: "space-between",
|
|
501
|
-
px: 16,
|
|
502
|
-
py: 12,
|
|
503
|
-
children: [
|
|
504
|
-
/* @__PURE__ */ n(s, { alignItems: "center", flexDirection: "row", gap: 8, width: "50%", children: [
|
|
505
|
-
/* @__PURE__ */ e(
|
|
506
|
-
xe,
|
|
507
|
-
{
|
|
508
|
-
alt: t.institution_logo,
|
|
509
|
-
institutionGuid: x || "",
|
|
510
|
-
size: 16
|
|
511
|
-
}
|
|
512
|
-
),
|
|
513
|
-
/* @__PURE__ */ e(m, { variant: "body2", children: `${w} ${C ? `*${C}` : ""}` })
|
|
514
|
-
] }),
|
|
515
|
-
/* @__PURE__ */ e(E, { amount: a.balance, bold: !0, variant: "body2" })
|
|
516
|
-
]
|
|
517
|
-
}
|
|
518
|
-
),
|
|
519
|
-
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
520
|
-
/* @__PURE__ */ n(
|
|
521
|
-
s,
|
|
522
|
-
{
|
|
523
|
-
alignItems: "center",
|
|
524
|
-
flexDirection: "row",
|
|
525
|
-
justifyContent: "space-between",
|
|
526
|
-
px: 16,
|
|
527
|
-
py: 12,
|
|
528
|
-
children: [
|
|
529
|
-
/* @__PURE__ */ e(m, { variant: "body2", children: t.projected_income }),
|
|
530
|
-
/* @__PURE__ */ e(E, { amount: a.income, bold: !0, symbol: "+", variant: "body2" })
|
|
531
|
-
]
|
|
532
|
-
}
|
|
533
|
-
),
|
|
534
|
-
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
535
|
-
/* @__PURE__ */ n(
|
|
536
|
-
s,
|
|
537
|
-
{
|
|
538
|
-
alignItems: "center",
|
|
539
|
-
flexDirection: "row",
|
|
540
|
-
justifyContent: "space-between",
|
|
541
|
-
px: 16,
|
|
542
|
-
py: 12,
|
|
543
|
-
children: [
|
|
544
|
-
/* @__PURE__ */ e(m, { variant: "body2", children: t.projected_expenses }),
|
|
545
|
-
/* @__PURE__ */ e(E, { amount: a.expenses, bold: !0, symbol: "-", variant: "body2" })
|
|
546
|
-
]
|
|
547
|
-
}
|
|
548
|
-
),
|
|
549
|
-
/* @__PURE__ */ e(v, { sx: { width: "100%" } }),
|
|
550
|
-
/* @__PURE__ */ e(
|
|
551
|
-
s,
|
|
552
|
-
{
|
|
553
|
-
alignItems: "center",
|
|
554
|
-
bgcolor: "background.default",
|
|
555
|
-
flexDirection: "row",
|
|
556
|
-
gap: 8,
|
|
557
|
-
justifyContent: "space-between",
|
|
558
|
-
px: 16,
|
|
559
|
-
py: 12,
|
|
560
|
-
sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
|
|
561
|
-
children: /* @__PURE__ */ e(he, { remaining: a.remaining })
|
|
562
|
-
}
|
|
563
|
-
)
|
|
564
|
-
] }) })
|
|
565
|
-
},
|
|
566
|
-
a.id
|
|
567
|
-
);
|
|
618
|
+
})
|
|
568
619
|
})
|
|
569
|
-
|
|
570
|
-
}
|
|
571
|
-
);
|
|
572
|
-
},
|
|
573
|
-
const { cashflow:
|
|
620
|
+
}, i.id);
|
|
621
|
+
})]
|
|
622
|
+
});
|
|
623
|
+
}, Tt = A(It), At = () => {
|
|
624
|
+
const { cashflow: o } = N(), { isDesktop: a } = de(), { onEvent: t } = Oe(), [r, f] = h.useState(0), u = (c, l) => {
|
|
574
625
|
f(l);
|
|
575
626
|
};
|
|
576
627
|
return h.useEffect(() => {
|
|
577
628
|
t(r === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
578
|
-
}, [r]), /* @__PURE__ */ n(
|
|
579
|
-
/* @__PURE__ */ n(
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
] });
|
|
618
|
-
}, Et = A(Rt), ne = ({
|
|
619
|
-
amount: i,
|
|
620
|
-
isMobile: o = !1,
|
|
621
|
-
isTotal: t = !1,
|
|
622
|
-
label: r,
|
|
623
|
-
symbol: f,
|
|
624
|
-
tooltip: u
|
|
625
|
-
}) => /* @__PURE__ */ n(
|
|
626
|
-
s,
|
|
627
|
-
{
|
|
628
|
-
bgcolor: t ? "background.default" : "transparent",
|
|
629
|
-
direction: o ? "row" : "column",
|
|
630
|
-
justifyContent: o ? "space-between" : "initial",
|
|
631
|
-
padding: o ? "14px 16px" : 0,
|
|
632
|
-
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
633
|
-
children: [
|
|
634
|
-
!o && /* @__PURE__ */ e(E, { amount: i, component: "h2", variant: "h2" }),
|
|
635
|
-
/* @__PURE__ */ n(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
636
|
-
/* @__PURE__ */ e(m, { bold: t, variant: "body2", children: r }),
|
|
637
|
-
u
|
|
638
|
-
] }),
|
|
639
|
-
o && /* @__PURE__ */ e(E, { amount: i, component: "h2", symbol: f, variant: "body2" })
|
|
640
|
-
]
|
|
641
|
-
}
|
|
642
|
-
), Re = (i, o) => (t) => t.accountGuid && i.includes(t.accountGuid) && (Fe(t.expectedDate) || Ge(t.expectedDate, o.start)) && Me(t.expectedDate, o.end), Lt = () => {
|
|
643
|
-
const { availableWidth: i } = ae(), { cashflow: o } = L(), { income: t, isDataLoaded: r, upcomingExpenses: f, upcomingIncome: u } = B(), { selectedAccountGuids: c } = P(), { dateRange: l, selectedCashAccounts: b } = q(), [a, g] = h.useState(!1), d = h.useMemo(
|
|
644
|
-
() => f.filter(Re(c, l)),
|
|
645
|
-
[l, c, f]
|
|
646
|
-
), x = h.useMemo(
|
|
647
|
-
() => u.filter(Re(c, l)),
|
|
648
|
-
[l, c, u]
|
|
649
|
-
), C = h.useMemo(
|
|
650
|
-
() => b.reduce((_, S) => _ + (S?.balance || 0), 0),
|
|
651
|
-
[b]
|
|
652
|
-
), w = d.reduce((_, S) => _ + S.amount, 0), R = x.reduce((_, S) => _ + S.amount, 0), D = C - w + R, N = r && t.length > 0, p = i < 725;
|
|
653
|
-
return /* @__PURE__ */ n(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
654
|
-
/* @__PURE__ */ n(
|
|
655
|
-
s,
|
|
656
|
-
{
|
|
657
|
-
border: p ? "1px solid" : "none",
|
|
658
|
-
borderColor: "neutral.light",
|
|
659
|
-
borderRadius: 2,
|
|
660
|
-
flexDirection: p ? "column" : "row",
|
|
661
|
-
gap: p ? 0 : 24,
|
|
662
|
-
justifyContent: "center",
|
|
663
|
-
children: [
|
|
664
|
-
/* @__PURE__ */ e(
|
|
665
|
-
ne,
|
|
666
|
-
{
|
|
667
|
-
amount: C,
|
|
668
|
-
isMobile: p,
|
|
669
|
-
label: H(o.cash_and_bank, b.length)
|
|
670
|
-
}
|
|
671
|
-
),
|
|
672
|
-
p && /* @__PURE__ */ e(v, {}),
|
|
673
|
-
N ? /* @__PURE__ */ n(j, { children: [
|
|
674
|
-
!p && /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
675
|
-
/* @__PURE__ */ e(
|
|
676
|
-
ne,
|
|
677
|
-
{
|
|
678
|
-
amount: R,
|
|
679
|
-
isMobile: p,
|
|
680
|
-
label: o.to_be_received,
|
|
681
|
-
symbol: p ? "+" : void 0
|
|
682
|
-
}
|
|
683
|
-
)
|
|
684
|
-
] }) : /* @__PURE__ */ e(
|
|
685
|
-
W,
|
|
686
|
-
{
|
|
687
|
-
onClick: () => g(!0),
|
|
688
|
-
startIcon: /* @__PURE__ */ e(z, { name: "add" }),
|
|
689
|
-
sx: { fontSize: 13 },
|
|
690
|
-
children: o.add_income
|
|
691
|
-
}
|
|
692
|
-
),
|
|
693
|
-
p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
694
|
-
/* @__PURE__ */ e(
|
|
695
|
-
ne,
|
|
696
|
-
{
|
|
697
|
-
amount: w,
|
|
698
|
-
isMobile: p,
|
|
699
|
-
label: H(o.to_be_paid_out, d.length),
|
|
700
|
-
symbol: p ? "-" : void 0
|
|
701
|
-
}
|
|
702
|
-
),
|
|
703
|
-
p ? /* @__PURE__ */ e(v, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
704
|
-
/* @__PURE__ */ e(
|
|
705
|
-
ne,
|
|
706
|
-
{
|
|
707
|
-
amount: D,
|
|
708
|
-
isMobile: p,
|
|
709
|
-
isTotal: p,
|
|
710
|
-
label: o.remaining_cash,
|
|
711
|
-
tooltip: /* @__PURE__ */ e(
|
|
712
|
-
pe,
|
|
713
|
-
{
|
|
714
|
-
body: o.remaining_income_tooltip_body,
|
|
715
|
-
title: o.remaining_income_tooltip_title
|
|
716
|
-
}
|
|
717
|
-
)
|
|
718
|
-
}
|
|
719
|
-
)
|
|
720
|
-
]
|
|
721
|
-
}
|
|
722
|
-
),
|
|
723
|
-
/* @__PURE__ */ e(
|
|
724
|
-
He,
|
|
725
|
-
{
|
|
726
|
-
ariaLabelClose: o.close_manage_income_aria,
|
|
727
|
-
isOpen: a,
|
|
728
|
-
onClose: () => g(!1),
|
|
729
|
-
shouldShowHeaderBorders: !1,
|
|
730
|
-
title: o.manage_income,
|
|
731
|
-
children: /* @__PURE__ */ e(rt, {})
|
|
732
|
-
}
|
|
733
|
-
)
|
|
629
|
+
}, [r]), /* @__PURE__ */ n(D, { children: [
|
|
630
|
+
/* @__PURE__ */ n(pt, {
|
|
631
|
+
"aria-label": o.cashflow_summary_and_details,
|
|
632
|
+
centered: !0,
|
|
633
|
+
onChange: u,
|
|
634
|
+
textColor: "primary",
|
|
635
|
+
value: r,
|
|
636
|
+
variant: "fullWidth",
|
|
637
|
+
children: [/* @__PURE__ */ e(De, {
|
|
638
|
+
"aria-controls": "cashflow-tabpanel-0",
|
|
639
|
+
id: "cashflow-tab-0",
|
|
640
|
+
label: o.summary,
|
|
641
|
+
sx: { textTransform: "none" }
|
|
642
|
+
}), /* @__PURE__ */ e(De, {
|
|
643
|
+
"aria-controls": "cashflow-tabpanel-1",
|
|
644
|
+
id: "cashflow-tab-1",
|
|
645
|
+
label: o.details,
|
|
646
|
+
sx: { textTransform: "none" }
|
|
647
|
+
})]
|
|
648
|
+
}),
|
|
649
|
+
/* @__PURE__ */ e(D, { sx: { mb: 32 } }),
|
|
650
|
+
/* @__PURE__ */ e(_e, {
|
|
651
|
+
index: 0,
|
|
652
|
+
name: "cashflow",
|
|
653
|
+
value: r,
|
|
654
|
+
children: /* @__PURE__ */ e(D, {
|
|
655
|
+
sx: { m: a ? 48 : 16 },
|
|
656
|
+
children: /* @__PURE__ */ e(Tt, {})
|
|
657
|
+
})
|
|
658
|
+
}),
|
|
659
|
+
/* @__PURE__ */ e(_e, {
|
|
660
|
+
index: 1,
|
|
661
|
+
name: "cashflow",
|
|
662
|
+
value: r,
|
|
663
|
+
children: /* @__PURE__ */ e(D, {
|
|
664
|
+
sx: { m: a ? 48 : 16 },
|
|
665
|
+
children: /* @__PURE__ */ e(Dt, {})
|
|
666
|
+
})
|
|
667
|
+
})
|
|
734
668
|
] });
|
|
735
|
-
},
|
|
736
|
-
|
|
669
|
+
}, Rt = A(At), ne = ({ amount: o, isMobile: a = !1, isTotal: t = !1, label: r, symbol: f, tooltip: u }) => /* @__PURE__ */ n(s, {
|
|
670
|
+
bgcolor: t ? "background.default" : "transparent",
|
|
671
|
+
direction: a ? "row" : "column",
|
|
672
|
+
justifyContent: a ? "space-between" : "initial",
|
|
673
|
+
padding: a ? "14px 16px" : 0,
|
|
674
|
+
sx: {
|
|
675
|
+
borderBottomLeftRadius: 4,
|
|
676
|
+
borderBottomRightRadius: 4
|
|
677
|
+
},
|
|
678
|
+
children: [
|
|
679
|
+
!a && /* @__PURE__ */ e(E, {
|
|
680
|
+
amount: o,
|
|
681
|
+
component: "h2",
|
|
682
|
+
variant: "h2"
|
|
683
|
+
}),
|
|
684
|
+
/* @__PURE__ */ n(s, {
|
|
685
|
+
alignItems: "center",
|
|
686
|
+
component: "span",
|
|
687
|
+
direction: "row",
|
|
688
|
+
gap: 8,
|
|
689
|
+
mt: 2,
|
|
690
|
+
children: [/* @__PURE__ */ e(m, {
|
|
691
|
+
bold: t,
|
|
692
|
+
variant: "body2",
|
|
693
|
+
children: r
|
|
694
|
+
}), u]
|
|
695
|
+
}),
|
|
696
|
+
a && /* @__PURE__ */ e(E, {
|
|
697
|
+
amount: o,
|
|
698
|
+
component: "h2",
|
|
699
|
+
symbol: f,
|
|
700
|
+
variant: "body2"
|
|
701
|
+
})
|
|
702
|
+
]
|
|
703
|
+
}), Re = (o, a) => (t) => t.accountGuid && o.includes(t.accountGuid) && (We(t.expectedDate) || Fe(t.expectedDate, a.start)) && Me(t.expectedDate, a.end), Et = () => {
|
|
704
|
+
const { availableWidth: o } = ie(), { cashflow: a } = N(), { income: t, isDataLoaded: r, upcomingExpenses: f, upcomingIncome: u } = B(), { selectedAccountGuids: c } = $(), { dateRange: l, selectedCashAccounts: b } = Y(), [i, g] = h.useState(!1), d = h.useMemo(() => f.filter(Re(c, l)), [
|
|
705
|
+
l,
|
|
706
|
+
c,
|
|
707
|
+
f
|
|
708
|
+
]), x = h.useMemo(() => u.filter(Re(c, l)), [
|
|
709
|
+
l,
|
|
710
|
+
c,
|
|
711
|
+
u
|
|
712
|
+
]), C = h.useMemo(() => b.reduce((y, S) => y + (S?.balance || 0), 0), [b]), w = d.reduce((y, S) => y + S.amount, 0), R = x.reduce((y, S) => y + S.amount, 0), v = C - w + R, k = r && t.length > 0, p = o < 725;
|
|
713
|
+
return /* @__PURE__ */ n(s, {
|
|
714
|
+
sx: {
|
|
715
|
+
mx: p ? 16 : 0,
|
|
716
|
+
my: p ? 24 : 42
|
|
717
|
+
},
|
|
718
|
+
children: [/* @__PURE__ */ n(s, {
|
|
719
|
+
border: p ? "1px solid" : "none",
|
|
720
|
+
borderColor: "neutral.light",
|
|
721
|
+
borderRadius: 2,
|
|
722
|
+
flexDirection: p ? "column" : "row",
|
|
723
|
+
gap: p ? 0 : 24,
|
|
724
|
+
justifyContent: "center",
|
|
725
|
+
children: [
|
|
726
|
+
/* @__PURE__ */ e(ne, {
|
|
727
|
+
amount: C,
|
|
728
|
+
isMobile: p,
|
|
729
|
+
label: F(a.cash_and_bank, b.length)
|
|
730
|
+
}),
|
|
731
|
+
p && /* @__PURE__ */ e(I, {}),
|
|
732
|
+
k ? /* @__PURE__ */ n(j, { children: [!p && /* @__PURE__ */ e(m, {
|
|
733
|
+
sx: {
|
|
734
|
+
fontSize: 25,
|
|
735
|
+
lineHeight: 1
|
|
736
|
+
},
|
|
737
|
+
children: "+"
|
|
738
|
+
}), /* @__PURE__ */ e(ne, {
|
|
739
|
+
amount: R,
|
|
740
|
+
isMobile: p,
|
|
741
|
+
label: a.to_be_received,
|
|
742
|
+
symbol: p ? "+" : void 0
|
|
743
|
+
})] }) : /* @__PURE__ */ e(W, {
|
|
744
|
+
onClick: () => g(!0),
|
|
745
|
+
startIcon: /* @__PURE__ */ e(z, { name: "add" }),
|
|
746
|
+
sx: { fontSize: 13 },
|
|
747
|
+
children: a.add_income
|
|
748
|
+
}),
|
|
749
|
+
p ? /* @__PURE__ */ e(I, {}) : /* @__PURE__ */ e(m, {
|
|
750
|
+
sx: {
|
|
751
|
+
fontSize: 25,
|
|
752
|
+
lineHeight: 1
|
|
753
|
+
},
|
|
754
|
+
children: "-"
|
|
755
|
+
}),
|
|
756
|
+
/* @__PURE__ */ e(ne, {
|
|
757
|
+
amount: w,
|
|
758
|
+
isMobile: p,
|
|
759
|
+
label: F(a.to_be_paid_out, d.length),
|
|
760
|
+
symbol: p ? "-" : void 0
|
|
761
|
+
}),
|
|
762
|
+
p ? /* @__PURE__ */ e(I, {}) : /* @__PURE__ */ e(m, {
|
|
763
|
+
sx: {
|
|
764
|
+
fontSize: 25,
|
|
765
|
+
lineHeight: 1
|
|
766
|
+
},
|
|
767
|
+
children: "="
|
|
768
|
+
}),
|
|
769
|
+
/* @__PURE__ */ e(ne, {
|
|
770
|
+
amount: v,
|
|
771
|
+
isMobile: p,
|
|
772
|
+
isTotal: p,
|
|
773
|
+
label: a.remaining_cash,
|
|
774
|
+
tooltip: /* @__PURE__ */ e(le, {
|
|
775
|
+
body: a.remaining_income_tooltip_body,
|
|
776
|
+
title: a.remaining_income_tooltip_title
|
|
777
|
+
})
|
|
778
|
+
})
|
|
779
|
+
]
|
|
780
|
+
}), /* @__PURE__ */ e(Ne, {
|
|
781
|
+
ariaLabelClose: a.close_manage_income_aria,
|
|
782
|
+
isOpen: i,
|
|
783
|
+
onClose: () => g(!1),
|
|
784
|
+
shouldShowHeaderBorders: !1,
|
|
785
|
+
title: a.manage_income,
|
|
786
|
+
children: /* @__PURE__ */ e(it, {})
|
|
787
|
+
})]
|
|
788
|
+
});
|
|
789
|
+
}, Nt = A(Et), kt = ({ onBackClick: o, onMenuClick: a, sx: t = {} }) => {
|
|
790
|
+
const { selectedAccounts: r, selectedAccountGuids: f, shouldDisableNextDate: u, shouldDisablePrevDate: c } = $(), { onEvent: l } = Oe(), { clientConfig: b } = et(), { visibleCashAccounts: i } = Ge(), { setFilter: g } = Le(), { dateRange: d, setSelectedCashAccounts: x } = Y(), { loadRepeatingTransactionData: C, isDataLoaded: w, setDateRange: R } = B(), { cashflow: v, recurring: k } = N(), { isInitialized: p } = $(), y = b?.master?.deep_link_params?.view === "manage_income", [S, Z] = h.useState(y);
|
|
737
791
|
return h.useEffect(() => {
|
|
738
792
|
R(d), w || C().finally();
|
|
739
793
|
}, []), h.useEffect(() => {
|
|
740
|
-
const
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
794
|
+
const ee = i.map((O) => O.guid), te = r.filter((O) => f.includes(O.guid) && ee.includes(O.guid));
|
|
795
|
+
x(te), g({
|
|
796
|
+
dateRange: {
|
|
797
|
+
start: He(H(), 90),
|
|
798
|
+
end: ut()
|
|
799
|
+
},
|
|
800
|
+
accounts: te.map((O) => O.guid)
|
|
746
801
|
});
|
|
747
|
-
}, [
|
|
802
|
+
}, [i, r]), ke({
|
|
748
803
|
widgetName: "CashflowWidget",
|
|
749
804
|
isLoaded: w
|
|
750
|
-
}), p ? /* @__PURE__ */ n(
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
children: /* @__PURE__ */ e(tt, { defaultSelectedTab: S ? 1 : 0 })
|
|
796
|
-
}
|
|
797
|
-
)
|
|
798
|
-
]
|
|
799
|
-
}
|
|
800
|
-
) : /* @__PURE__ */ e(Z, {});
|
|
801
|
-
}, Fn = A(kt), Ot = ({ handleNextStep: i }) => {
|
|
802
|
-
const { completeOnboarding: o } = me(), { cashflow: t } = L(), r = ie();
|
|
805
|
+
}), p ? /* @__PURE__ */ n(Ke, {
|
|
806
|
+
actions: [{
|
|
807
|
+
label: k.action_title,
|
|
808
|
+
iconName: "credit_card_gear",
|
|
809
|
+
onClick: () => {
|
|
810
|
+
Z(!0), l(Ce.CASH_FLOW_CLICK_SETTINGS);
|
|
811
|
+
}
|
|
812
|
+
}],
|
|
813
|
+
allowedAccountTypes: [
|
|
814
|
+
q.CASH,
|
|
815
|
+
q.CHECKING,
|
|
816
|
+
q.PREPAID,
|
|
817
|
+
q.SAVINGS,
|
|
818
|
+
q.CHECKING_LINE_OF_CREDIT
|
|
819
|
+
],
|
|
820
|
+
calendarActions: {
|
|
821
|
+
shouldDisableNext: u,
|
|
822
|
+
shouldDisablePrevious: c,
|
|
823
|
+
shouldDisablePicker: !0,
|
|
824
|
+
onRangeChanged: () => {
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
dateRange: d,
|
|
828
|
+
dateRangeVariant: "readonly",
|
|
829
|
+
hasDivider: !0,
|
|
830
|
+
onAccountsFilterClick: () => l(Ce.CASH_FLOW_CLICK_FILTER),
|
|
831
|
+
onBackClick: o,
|
|
832
|
+
onMenuClick: a,
|
|
833
|
+
sx: t,
|
|
834
|
+
title: v.title,
|
|
835
|
+
children: [
|
|
836
|
+
/* @__PURE__ */ e(Nt, {}),
|
|
837
|
+
/* @__PURE__ */ e(Rt, {}),
|
|
838
|
+
/* @__PURE__ */ e(Ne, {
|
|
839
|
+
ariaLabelClose: v.close_settings_aria,
|
|
840
|
+
isOpen: S,
|
|
841
|
+
onClose: () => Z(!1),
|
|
842
|
+
shouldShowHeaderBorders: !1,
|
|
843
|
+
title: k.action_title,
|
|
844
|
+
children: /* @__PURE__ */ e(nt, { defaultSelectedTab: y ? 1 : 0 })
|
|
845
|
+
})
|
|
846
|
+
]
|
|
847
|
+
}) : /* @__PURE__ */ e(J, {});
|
|
848
|
+
}, Cn = A(kt), Lt = ({ handleNextStep: o }) => {
|
|
849
|
+
const { completeOnboarding: a } = me(), { cashflow: t } = N(), r = re();
|
|
803
850
|
return /* @__PURE__ */ n(s, { children: [
|
|
804
|
-
/* @__PURE__ */ e(
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
851
|
+
/* @__PURE__ */ e(ue, {
|
|
852
|
+
pb: 12,
|
|
853
|
+
variant: "h1",
|
|
854
|
+
children: t.welcome_title
|
|
855
|
+
}),
|
|
856
|
+
/* @__PURE__ */ e(st, {
|
|
857
|
+
color: r.palette.primary.light,
|
|
858
|
+
pb: 8,
|
|
859
|
+
children: t.welcome_sub_title
|
|
860
|
+
}),
|
|
861
|
+
/* @__PURE__ */ e(L, {
|
|
862
|
+
pb: 32,
|
|
863
|
+
children: t.welcome_description
|
|
864
|
+
}),
|
|
865
|
+
/* @__PURE__ */ n(s, {
|
|
866
|
+
direction: "column",
|
|
867
|
+
mb: 32,
|
|
868
|
+
spacing: 32,
|
|
869
|
+
children: [
|
|
870
|
+
/* @__PURE__ */ n(L, {
|
|
871
|
+
sx: {
|
|
872
|
+
display: "flex",
|
|
873
|
+
alignItems: "center",
|
|
874
|
+
fontSize: 18
|
|
875
|
+
},
|
|
876
|
+
children: [/* @__PURE__ */ e(D, {
|
|
812
877
|
bgcolor: r.palette.primary.lighter,
|
|
813
878
|
borderRadius: 1,
|
|
814
879
|
component: "span",
|
|
815
880
|
height: 44,
|
|
816
881
|
mr: 24,
|
|
817
|
-
sx: {
|
|
882
|
+
sx: {
|
|
883
|
+
display: "flex",
|
|
884
|
+
alignItems: "center",
|
|
885
|
+
justifyContent: "center",
|
|
886
|
+
flexShrink: 0
|
|
887
|
+
},
|
|
818
888
|
width: 44,
|
|
819
|
-
children: /* @__PURE__ */ e(z, {
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
/* @__PURE__ */
|
|
826
|
-
|
|
827
|
-
|
|
889
|
+
children: /* @__PURE__ */ e(z, {
|
|
890
|
+
color: "primary",
|
|
891
|
+
name: "currency_exchange"
|
|
892
|
+
})
|
|
893
|
+
}), t.bullet_one]
|
|
894
|
+
}),
|
|
895
|
+
/* @__PURE__ */ n(L, {
|
|
896
|
+
sx: {
|
|
897
|
+
display: "flex",
|
|
898
|
+
alignItems: "center",
|
|
899
|
+
fontSize: 18
|
|
900
|
+
},
|
|
901
|
+
children: [/* @__PURE__ */ e(D, {
|
|
828
902
|
bgcolor: r.palette.primary.lighter,
|
|
829
903
|
borderRadius: 1,
|
|
830
904
|
component: "span",
|
|
831
905
|
height: 44,
|
|
832
906
|
mr: 24,
|
|
833
|
-
sx: {
|
|
907
|
+
sx: {
|
|
908
|
+
display: "flex",
|
|
909
|
+
alignItems: "center",
|
|
910
|
+
justifyContent: "center",
|
|
911
|
+
flexShrink: 0
|
|
912
|
+
},
|
|
834
913
|
width: 44,
|
|
835
|
-
children: /* @__PURE__ */ e(z, {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
|
|
843
|
-
|
|
914
|
+
children: /* @__PURE__ */ e(z, {
|
|
915
|
+
color: "primary",
|
|
916
|
+
name: "cardiology"
|
|
917
|
+
})
|
|
918
|
+
}), t.bullet_two]
|
|
919
|
+
}),
|
|
920
|
+
/* @__PURE__ */ n(L, {
|
|
921
|
+
sx: {
|
|
922
|
+
display: "flex",
|
|
923
|
+
alignItems: "center",
|
|
924
|
+
fontSize: 18
|
|
925
|
+
},
|
|
926
|
+
children: [/* @__PURE__ */ e(D, {
|
|
844
927
|
bgcolor: r.palette.primary.lighter,
|
|
845
928
|
borderRadius: 1,
|
|
846
929
|
component: "span",
|
|
847
930
|
height: 44,
|
|
848
931
|
mr: 24,
|
|
849
|
-
sx: {
|
|
932
|
+
sx: {
|
|
933
|
+
display: "flex",
|
|
934
|
+
alignItems: "center",
|
|
935
|
+
justifyContent: "center",
|
|
936
|
+
flexShrink: 0
|
|
937
|
+
},
|
|
850
938
|
width: 44,
|
|
851
|
-
children: /* @__PURE__ */ e(z, {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
939
|
+
children: /* @__PURE__ */ e(z, {
|
|
940
|
+
color: "primary",
|
|
941
|
+
name: "flare"
|
|
942
|
+
})
|
|
943
|
+
}), t.bullet_three]
|
|
944
|
+
})
|
|
945
|
+
]
|
|
946
|
+
}),
|
|
947
|
+
/* @__PURE__ */ n(s, {
|
|
948
|
+
direction: "row",
|
|
949
|
+
spacing: 16,
|
|
950
|
+
children: [/* @__PURE__ */ e(W, {
|
|
951
|
+
onClick: o,
|
|
952
|
+
variant: "contained",
|
|
953
|
+
children: t.get_started_button
|
|
954
|
+
}), /* @__PURE__ */ e(W, {
|
|
955
|
+
onClick: a,
|
|
956
|
+
variant: "outlined",
|
|
957
|
+
children: t.skip_button
|
|
958
|
+
})]
|
|
959
|
+
})
|
|
861
960
|
] });
|
|
862
|
-
},
|
|
961
|
+
}, Ot = A(Lt), Ee = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", ze = {
|
|
863
962
|
CASHFLOW_ONBOARDING: `${Ee}/cashflow-onboarding.png`,
|
|
864
963
|
CASHFLOW_LOADING_ANIMATION: `${Ee}/loading-animation.gif`
|
|
865
|
-
},
|
|
866
|
-
const { cashflow:
|
|
964
|
+
}, Gt = () => {
|
|
965
|
+
const { cashflow: o } = N();
|
|
867
966
|
return /* @__PURE__ */ n(h.Fragment, { children: [
|
|
868
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", {
|
|
869
|
-
|
|
870
|
-
|
|
967
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", {
|
|
968
|
+
alt: "Loading",
|
|
969
|
+
src: ze.CASHFLOW_LOADING_ANIMATION
|
|
970
|
+
}) }),
|
|
971
|
+
/* @__PURE__ */ e(ue, {
|
|
972
|
+
pb: 12,
|
|
973
|
+
variant: "h1",
|
|
974
|
+
children: o.loading_title
|
|
975
|
+
}),
|
|
976
|
+
/* @__PURE__ */ e(L, { children: o.loading_description })
|
|
871
977
|
] });
|
|
872
|
-
},
|
|
978
|
+
}, Mt = A(Gt), Ht = mt`
|
|
873
979
|
from {
|
|
874
980
|
transform: rotate(0deg);
|
|
875
981
|
}
|
|
876
982
|
to {
|
|
877
983
|
transform: rotate(360deg);
|
|
878
984
|
}
|
|
879
|
-
`,
|
|
880
|
-
const { addRepeatingTransaction:
|
|
881
|
-
()
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
(
|
|
885
|
-
|
|
886
|
-
G
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
}, $e = async () => {
|
|
892
|
-
if (!(O.length < 1)) {
|
|
893
|
-
se(!0);
|
|
894
|
-
for (let y = 0; y < O.length; y++) {
|
|
895
|
-
const T = O[y], be = ve(D, De(T.date)), Ue = {
|
|
985
|
+
`, Ft = () => {
|
|
986
|
+
const { addRepeatingTransaction: o, repeatingTransactions: a } = B(), { cashflow: t, common: r } = N(), { user: f } = Ze(), { completeOnboarding: u } = me(), { isDirty: c } = Y(), { isMobile: l } = de(), { isCopyLoaded: b, setDisplayedDate: i } = $(), { filter: g, setFilter: d, transactions: x } = Le(), C = re(), [w, R] = K(!0), [v, k] = h.useState(Ye.EveryMonth), [p, y] = h.useState(1), [S, Z] = h.useState(15), [ee, te] = K(!1), [O, he] = K(1), [G, je] = K([]), [fe, se] = K(""), M = h.useMemo(() => x.find((_) => _.guid === fe), [fe, x]), Be = !!a.filter((_) => _.repeating_transaction_type === xe.Income).length, ge = async () => {
|
|
987
|
+
he(2), i(lt(He(H(), 90)), H()), d({
|
|
988
|
+
...g,
|
|
989
|
+
custom: we
|
|
990
|
+
}), he(3);
|
|
991
|
+
}, Pe = async () => {
|
|
992
|
+
if (!(G.length < 1)) {
|
|
993
|
+
te(!0);
|
|
994
|
+
for (let _ = 0; _ < G.length; _++) {
|
|
995
|
+
const T = G[_], be = ye(v, Ie(T.date));
|
|
996
|
+
await o({
|
|
896
997
|
account_guid: T.account_guid,
|
|
897
998
|
amount: T.amount,
|
|
898
999
|
created_by: 0,
|
|
899
|
-
//user
|
|
900
1000
|
merchant_guid: T.merchant_guid,
|
|
901
1001
|
description: T.feed_description || T.description,
|
|
902
|
-
predicted_occurs_on:
|
|
1002
|
+
predicted_occurs_on: ht(be, { representation: "date" }),
|
|
903
1003
|
recurrence_day: be.getDay(),
|
|
904
|
-
recurrence_type:
|
|
905
|
-
repeating_transaction_type:
|
|
1004
|
+
recurrence_type: v,
|
|
1005
|
+
repeating_transaction_type: xe.Income,
|
|
906
1006
|
second_recurrence_day: S,
|
|
907
1007
|
transaction_type: T.transaction_type,
|
|
908
1008
|
user_guid: f.guid
|
|
909
|
-
};
|
|
910
|
-
await i(Ue, T);
|
|
1009
|
+
}, T);
|
|
911
1010
|
}
|
|
912
1011
|
await u();
|
|
913
1012
|
}
|
|
914
|
-
},
|
|
915
|
-
return b ? /* @__PURE__ */ n(
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
}
|
|
1013
|
+
}, Ue = !M && w || !M && G.length < 1;
|
|
1014
|
+
return b ? /* @__PURE__ */ n(D, {
|
|
1015
|
+
sx: {
|
|
1016
|
+
display: "flex",
|
|
1017
|
+
alignItems: l ? "flex-start" : "center",
|
|
1018
|
+
backgroundColor: C.palette.background.paper,
|
|
1019
|
+
backgroundImage: l ? null : `url(${ze.CASHFLOW_ONBOARDING})`,
|
|
1020
|
+
backgroundRepeat: "no-repeat",
|
|
1021
|
+
backgroundPosition: "left 100px",
|
|
1022
|
+
backgroundSize: "35%",
|
|
1023
|
+
py: 24
|
|
1024
|
+
},
|
|
1025
|
+
children: [
|
|
1026
|
+
O === 1 && /* @__PURE__ */ e(D, {
|
|
1027
|
+
sx: { ...l ? {
|
|
1028
|
+
display: "flex",
|
|
1029
|
+
flexDirection: "column",
|
|
1030
|
+
maxWidth: "100%",
|
|
1031
|
+
padding: "0 16px"
|
|
1032
|
+
} : {
|
|
1033
|
+
maxWidth: 590,
|
|
1034
|
+
ml: "40%",
|
|
1035
|
+
mr: 90
|
|
1036
|
+
} },
|
|
1037
|
+
children: /* @__PURE__ */ e(Ot, { handleNextStep: ge })
|
|
1038
|
+
}),
|
|
1039
|
+
O === 2 && /* @__PURE__ */ e(D, {
|
|
1040
|
+
sx: { ...l ? {
|
|
1041
|
+
display: "flex",
|
|
1042
|
+
flexDirection: "column",
|
|
1043
|
+
maxWidth: "100%",
|
|
1044
|
+
padding: "0 16px"
|
|
1045
|
+
} : {
|
|
1046
|
+
maxWidth: 590,
|
|
1047
|
+
ml: "40%",
|
|
1048
|
+
mr: 90
|
|
1049
|
+
} },
|
|
1050
|
+
children: /* @__PURE__ */ e(Mt, {})
|
|
1051
|
+
}),
|
|
1052
|
+
O === 3 && /* @__PURE__ */ n(D, {
|
|
1053
|
+
sx: { ...l ? {
|
|
1054
|
+
display: "flex",
|
|
1055
|
+
flexDirection: "column",
|
|
1056
|
+
maxWidth: "100%",
|
|
1057
|
+
padding: "0 16px"
|
|
1058
|
+
} : {
|
|
1059
|
+
maxWidth: 590,
|
|
1060
|
+
ml: "40%",
|
|
1061
|
+
mr: 90
|
|
1062
|
+
} },
|
|
1063
|
+
children: [
|
|
1064
|
+
/* @__PURE__ */ e(ue, {
|
|
1065
|
+
pb: 12,
|
|
1066
|
+
variant: "h1",
|
|
1067
|
+
children: t.add_income_title
|
|
1068
|
+
}),
|
|
1069
|
+
/* @__PURE__ */ e(L, {
|
|
1070
|
+
mb: 24,
|
|
1071
|
+
children: t.add_income_description
|
|
1072
|
+
}),
|
|
1073
|
+
G.length > 0 && !M && /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ e(X, { children: G.map((_, T) => /* @__PURE__ */ n(h.Fragment, { children: [
|
|
1074
|
+
/* @__PURE__ */ e(Xe, {
|
|
1075
|
+
bgcolor: "background.paper",
|
|
1076
|
+
children: $e(ce(_.nextDate || _.date))
|
|
1077
|
+
}),
|
|
1078
|
+
/* @__PURE__ */ e(Je, { transaction: _ }),
|
|
1079
|
+
T !== G.length - 1 && /* @__PURE__ */ e(I, {})
|
|
1080
|
+
] }, _.guid)) }), /* @__PURE__ */ n(s, {
|
|
1081
|
+
alignItems: "center",
|
|
1082
|
+
direction: "row",
|
|
1083
|
+
children: [/* @__PURE__ */ e(I, { sx: { flexGrow: 1 } }), /* @__PURE__ */ e(W, {
|
|
1084
|
+
onClick: () => R(!0),
|
|
1085
|
+
startIcon: /* @__PURE__ */ e(z, {
|
|
1086
|
+
name: "add",
|
|
1087
|
+
size: 20
|
|
1088
|
+
}),
|
|
1089
|
+
children: t.add_income
|
|
1090
|
+
})]
|
|
1091
|
+
})] }),
|
|
1092
|
+
Ue && /* @__PURE__ */ e(at, {
|
|
1093
|
+
bgcolor: "background.paper",
|
|
1094
|
+
onSearch: (_) => d({
|
|
1095
|
+
...g,
|
|
1096
|
+
custom: (T) => _ ? ot(T, _) : we(T)
|
|
1097
|
+
}),
|
|
1098
|
+
onSelected: (_) => {
|
|
1099
|
+
se(_), R(!1);
|
|
1100
|
+
}
|
|
1101
|
+
}),
|
|
1102
|
+
!Be && c && /* @__PURE__ */ e(L, {
|
|
1103
|
+
color: "error",
|
|
1104
|
+
mt: 16,
|
|
1105
|
+
children: t.confirm_error
|
|
1106
|
+
}),
|
|
1107
|
+
M && /* @__PURE__ */ n(j, { children: [/* @__PURE__ */ e(rt, {
|
|
1108
|
+
bgcolor: "background.paper",
|
|
1109
|
+
firstDay: p,
|
|
1110
|
+
frequency: v,
|
|
1111
|
+
onFirstDayChange: y,
|
|
1112
|
+
onFrequencyChange: k,
|
|
1113
|
+
onSecondDayChange: Z,
|
|
1114
|
+
secondDay: S,
|
|
1115
|
+
transaction: M
|
|
1116
|
+
}), /* @__PURE__ */ n(s, {
|
|
1117
|
+
direction: "row",
|
|
1118
|
+
gap: 16,
|
|
1119
|
+
ml: 24,
|
|
1120
|
+
mt: 32,
|
|
1121
|
+
children: [/* @__PURE__ */ e(W, {
|
|
1122
|
+
"aria-disabled": !M,
|
|
1123
|
+
onClick: () => {
|
|
1124
|
+
const _ = [...G];
|
|
1125
|
+
_.push({
|
|
1126
|
+
...M,
|
|
1127
|
+
nextDate: ye(v, Ie(M.date)),
|
|
1128
|
+
frequency: v
|
|
1129
|
+
}), je(_), se("");
|
|
1130
|
+
},
|
|
1131
|
+
variant: "contained",
|
|
1132
|
+
children: r.confirm_button
|
|
1133
|
+
}), /* @__PURE__ */ e(W, {
|
|
1134
|
+
onClick: () => {
|
|
1135
|
+
se(""), R(!0), ge().finally();
|
|
1136
|
+
},
|
|
1137
|
+
variant: "outlined",
|
|
1138
|
+
children: r.cancel_button
|
|
1139
|
+
})]
|
|
1140
|
+
})] }),
|
|
1141
|
+
G.length > 0 && !M && /* @__PURE__ */ n(s, {
|
|
1142
|
+
direction: "row",
|
|
1143
|
+
gap: 16,
|
|
1144
|
+
ml: 24,
|
|
1145
|
+
mt: 32,
|
|
1146
|
+
children: [/* @__PURE__ */ e(W, {
|
|
1147
|
+
"aria-disabled": G.length < 1 || ee,
|
|
1148
|
+
onClick: Pe,
|
|
1149
|
+
startIcon: ee ? /* @__PURE__ */ e(z, {
|
|
1150
|
+
name: "progress_activity",
|
|
1151
|
+
sx: { animation: `${Ht} 2s linear infinite` }
|
|
1152
|
+
}) : null,
|
|
1153
|
+
variant: "contained",
|
|
1154
|
+
children: t.confirm_income_button
|
|
1155
|
+
}), /* @__PURE__ */ e(W, {
|
|
1156
|
+
onClick: u,
|
|
1157
|
+
variant: "outlined",
|
|
1158
|
+
children: t.skip_button
|
|
1159
|
+
})]
|
|
1160
|
+
})
|
|
1161
|
+
]
|
|
1162
|
+
})
|
|
1163
|
+
]
|
|
1164
|
+
}) : /* @__PURE__ */ e(J, {});
|
|
1165
|
+
}, wn = A(Ft);
|
|
1061
1166
|
export {
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1167
|
+
_n as CashflowMiniWidget,
|
|
1168
|
+
wn as CashflowOnboarding,
|
|
1169
|
+
Cn as CashflowWidget
|
|
1065
1170
|
};
|