@mx-cartographer/experiences 7.4.8-alpha.mm1 → 7.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/{Account-BrOTlmeK.mjs → Account-01wOyrH1.mjs} +1 -1
- package/dist/{AccountDetailsContent-B7FqH05C.mjs → AccountDetailsContent-COMjOzwr.mjs} +8 -8
- package/dist/{AccountDetailsHeader-C8MxsxhN.mjs → AccountDetailsHeader-Cbi5G6fJ.mjs} +4 -4
- package/dist/{AccountFields-BQZ-o6Kj.mjs → AccountFields-Cd_nOWmf.mjs} +2 -2
- package/dist/{AccountListItem-aIE9WWTO.mjs → AccountListItem-DxY4cCF1.mjs} +4 -4
- package/dist/{AccountStore-DqO84Aer.mjs → AccountStore-C1zMBzHq.mjs} +2 -2
- package/dist/{Accounts-DC_A4UCa.mjs → Accounts-D7QljYas.mjs} +1 -1
- package/dist/{BudgetUtil-BmZXkL0C.mjs → BudgetUtil-Df2nII9u.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-SUgfE5GN.mjs → CategorySelectorDrawer-DqJK_rrL.mjs} +1 -1
- package/dist/{ConnectDrawer-KL8t1qSC.mjs → ConnectDrawer-CuUj16NH.mjs} +1 -1
- package/dist/{ConnectionsDrawer-DaK5uIL5.mjs → ConnectionsDrawer-Bz4uwdFE.mjs} +2 -2
- package/dist/{CurrencyInput-itK0R3wV.mjs → CurrencyInput-BFKcs-_K.mjs} +1 -1
- package/dist/{DebtsStore-DVPZbv2C.mjs → DebtsStore-Bu8rRRSL.mjs} +1 -1
- package/dist/{ExportCsvAction-Cglo8Mca.mjs → ExportCsvAction-DzTrtPzk.mjs} +3 -3
- package/dist/{GoalStore-o4rrjGSJ.mjs → GoalStore-CrNhjvNc.mjs} +2 -2
- package/dist/{Help-BjLMsuMS.mjs → Help-BnPXM_N2.mjs} +1 -1
- package/dist/{LineChart-BQRxZF3p.mjs → LineChart-bc1D9xBE.mjs} +1 -1
- package/dist/{ListItemAction-BxTkF6Tz.mjs → ListItemAction-uobBrm_a.mjs} +1 -1
- package/dist/{ManageIncome-rcnDYsBJ.mjs → ManageIncome-A69EUO5u.mjs} +75 -75
- package/dist/{MicroWidgetContainer-B2hO9rOG.mjs → MicroWidgetContainer-DEiRnYVa.mjs} +1 -1
- package/dist/{MiniWidgetContainer-98-hKFqm.mjs → MiniWidgetContainer-CmXpTylX.mjs} +1 -1
- package/dist/{NetWorthStore-DG2X69jG.mjs → NetWorthStore-CpL_kqvx.mjs} +2 -2
- package/dist/{NotificationSettings-C7FYNM7I.mjs → NotificationSettings-CNmJWVeI.mjs} +248 -250
- package/dist/{OriginalBalanceAction-C6jdS4ws.mjs → OriginalBalanceAction-DK8_LkPz.mjs} +3 -3
- package/dist/{RecurringSettings-C81H1l38.mjs → RecurringSettings-B0uObPlD.mjs} +3 -3
- package/dist/{SpendingLegend-DqZxN_BZ.mjs → SpendingLegend-Bf-wbJvb.mjs} +2 -2
- package/dist/{TransactionDetails-BA_E5nQ-.mjs → TransactionDetails-COH0OKNG.mjs} +5 -5
- package/dist/{TransactionStore-PRlwE-TF.mjs → TransactionStore-Dz-G8Wd0.mjs} +2 -2
- package/dist/{User-Cnlegl1N.mjs → User-wXzDI4M8.mjs} +1 -1
- package/dist/{ViewMoreMicroCard-DfPXJzbv.mjs → ViewMoreMicroCard-C0832BMe.mjs} +101 -105
- package/dist/{WidgetContainer-CaPjoWeE.mjs → WidgetContainer-6dsjtOVg.mjs} +2 -2
- package/dist/accounts/index.es.js +140 -148
- package/dist/analytics/index.es.js +2 -2
- package/dist/budgets/components/AddBudgets.d.ts +2 -1
- package/dist/budgets/index.es.js +627 -599
- package/dist/cashflow/index.es.js +362 -367
- package/dist/categories/index.es.js +1 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/index.es.js +33 -35
- package/dist/dashboard/index.es.js +88 -90
- package/dist/debts/index.es.js +342 -346
- package/dist/{exportTransactionsToCSV-DuAaI5XA.mjs → exportTransactionsToCSV-Cz2t0lmA.mjs} +1 -1
- package/dist/finstrong/index.es.js +350 -352
- package/dist/goals/index.es.js +511 -518
- package/dist/help/index.es.js +9 -13
- package/dist/{hooks-ZMp65DFz.mjs → hooks-C41HAxM5.mjs} +11 -11
- package/dist/investments/index.es.js +393 -395
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +240 -245
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +285 -293
- package/dist/settings/index.es.js +249 -252
- package/dist/spending/index.es.js +126 -138
- package/dist/transactions/index.es.js +73 -77
- package/dist/trends/index.es.js +588 -601
- package/dist/{useAccountDisplayName-Cjx8YmKK.mjs → useAccountDisplayName-CMMlIOXF.mjs} +2 -2
- package/dist/{useInsightsEnabled-B7dxpDrX.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/package.json +1 -1
- package/dist/common/hooks/useWidgetLoadTimer.d.ts +0 -6
- package/dist/useWidgetLoadTimer-C1NBkyLd.mjs +0 -23
|
@@ -1,62 +1,61 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
4
|
-
import { addMonths as
|
|
1
|
+
import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p, { useState as J } from "react";
|
|
3
|
+
import { observer as L } from "mobx-react-lite";
|
|
4
|
+
import { addMonths as Xe } from "date-fns/addMonths";
|
|
5
5
|
import { startOfToday as $ } from "date-fns/startOfToday";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import v from "@mui/material/Box";
|
|
7
|
+
import D from "@mui/material/Divider";
|
|
8
8
|
import s from "@mui/material/Stack";
|
|
9
|
-
import
|
|
10
|
-
import { Text as u, P as
|
|
11
|
-
import { G as
|
|
12
|
-
import { C as
|
|
13
|
-
import { u as
|
|
14
|
-
import { L as
|
|
15
|
-
import { I as
|
|
16
|
-
import { C as
|
|
9
|
+
import ce from "@mui/material/styles/useTheme";
|
|
10
|
+
import { Text as u, P as k, Icon as j, InstitutionLogo as ye, H1 as me, H2 as Ye } from "@mxenabled/mxui";
|
|
11
|
+
import { G as Qe, v as ue, u as N, q as le, d as Ne, b as Y, j as P, g as ke, p as He, h as Fe, n as Ve, a as Ke } from "../hooks-C41HAxM5.mjs";
|
|
12
|
+
import { C as O } from "../CurrencyText-Dr0EZ7bp.mjs";
|
|
13
|
+
import { u as he } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
14
|
+
import { L as te } from "../Loader-DUaFpDGv.mjs";
|
|
15
|
+
import { I as pe } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
16
|
+
import { C as zn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
17
17
|
import { b as M } from "../Localization-2MODESHW.mjs";
|
|
18
|
-
import {
|
|
19
|
-
import { M as Je } from "../MiniWidgetContainer-98-hKFqm.mjs";
|
|
18
|
+
import { M as Je } from "../MiniWidgetContainer-CmXpTylX.mjs";
|
|
20
19
|
import { E as Ze } from "../EmptyState-DoxNUae-.mjs";
|
|
21
|
-
import { R as et } from "../RecurringSettings-
|
|
20
|
+
import { R as et } from "../RecurringSettings-B0uObPlD.mjs";
|
|
22
21
|
import tt from "@mui/material/Tabs";
|
|
23
22
|
import Ce from "@mui/material/Tab";
|
|
24
|
-
import { getUnixTime as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import { A as nt } from "../AccountListItem-
|
|
28
|
-
import { f as
|
|
23
|
+
import { getUnixTime as B } from "date-fns/getUnixTime";
|
|
24
|
+
import ee from "@mui/material/List";
|
|
25
|
+
import ne from "@mui/material/ListItem";
|
|
26
|
+
import { A as nt } from "../AccountListItem-DxY4cCF1.mjs";
|
|
27
|
+
import { f as Q, a as V } from "../Dialog-BPTr3qHE.mjs";
|
|
29
28
|
import ot from "@mui/material/ListSubheader";
|
|
30
|
-
import { f as
|
|
31
|
-
import { isAfter as
|
|
32
|
-
import { isBefore as
|
|
33
|
-
import { isToday as
|
|
29
|
+
import { f as Z } from "../NumberFormatting-DjTD0t3W.mjs";
|
|
30
|
+
import { isAfter as We } from "date-fns/isAfter";
|
|
31
|
+
import { isBefore as $e } from "date-fns/isBefore";
|
|
32
|
+
import { isToday as Me } from "date-fns/isToday";
|
|
34
33
|
import { addDays as we } from "date-fns/addDays";
|
|
35
34
|
import { alpha as at, keyframes as it } from "@mui/material/styles";
|
|
36
35
|
import { DataGridPro as rt } from "@mui/x-data-grid-pro";
|
|
37
36
|
import { T as Se } from "../TabContentContainer-j01JYR_7.mjs";
|
|
38
37
|
import G from "@mui/material/Button";
|
|
39
|
-
import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-
|
|
40
|
-
import { D as
|
|
38
|
+
import { M as st, S as ct, i as lt, d as _e, c as dt } from "../ManageIncome-A69EUO5u.mjs";
|
|
39
|
+
import { D as Ge } from "../Drawer-BEtCk82g.mjs";
|
|
41
40
|
import { formatISO as mt } from "date-fns/formatISO";
|
|
42
41
|
import { fromUnixTime as Ie } from "date-fns/fromUnixTime";
|
|
43
42
|
import { startOfMonth as ut } from "date-fns/startOfMonth";
|
|
44
|
-
import { subDays as
|
|
45
|
-
import { S as ht, c as pt } from "../TransactionDetails-
|
|
46
|
-
import { F as ft, R as
|
|
43
|
+
import { subDays as je } from "date-fns/subDays";
|
|
44
|
+
import { S as ht, c as pt } from "../TransactionDetails-COH0OKNG.mjs";
|
|
45
|
+
import { F as ft, R as ve, e as De } from "../RecurringTransactions-BqijW_8S.mjs";
|
|
47
46
|
import { h as gt } from "../DateUtil-CBdcsyuk.mjs";
|
|
48
47
|
import { endOfToday as bt } from "date-fns/endOfToday";
|
|
49
|
-
import { W as Ae, A as Ee } from "../WidgetContainer-
|
|
50
|
-
import { F as xt, A as
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
48
|
+
import { W as Ae, A as Ee } from "../WidgetContainer-6dsjtOVg.mjs";
|
|
49
|
+
import { F as xt, A as z } from "../Fetch-DecPFeGU.mjs";
|
|
50
|
+
const K = () => {
|
|
51
|
+
if (!p.useContext(Qe))
|
|
53
52
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
54
|
-
return
|
|
53
|
+
return ue().uiStore;
|
|
55
54
|
}, yt = ({ remaining: a }) => {
|
|
56
55
|
const { cashflow: n } = N();
|
|
57
|
-
return /* @__PURE__ */ o(
|
|
56
|
+
return /* @__PURE__ */ o(U, { children: [
|
|
58
57
|
/* @__PURE__ */ e(
|
|
59
|
-
|
|
58
|
+
v,
|
|
60
59
|
{
|
|
61
60
|
sx: {
|
|
62
61
|
borderRadius: "1px",
|
|
@@ -67,37 +66,37 @@ const V = () => {
|
|
|
67
66
|
}
|
|
68
67
|
),
|
|
69
68
|
/* @__PURE__ */ e(u, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
70
|
-
/* @__PURE__ */ e(
|
|
69
|
+
/* @__PURE__ */ e(O, { amount: a, bold: !0, sx: { fontSize: 12 } })
|
|
71
70
|
] });
|
|
72
|
-
},
|
|
73
|
-
const a =
|
|
71
|
+
}, fe = L(yt), Ct = () => {
|
|
72
|
+
const a = ce(), { availableWidth: n } = le(), { isMobile: t } = he(), { visibleCashAccounts: i, visibleCashBalance: g } = Ne(), { selectedAccounts: b, selectedAccountGuids: m, setSelectedAccounts: h } = Y(), { cashflow: l } = N(), {
|
|
74
73
|
daysUntilNextIncome: r,
|
|
75
|
-
expensesTilNextIncome:
|
|
76
|
-
selectedCashAccounts:
|
|
77
|
-
setNextIncome:
|
|
74
|
+
expensesTilNextIncome: c,
|
|
75
|
+
selectedCashAccounts: d,
|
|
76
|
+
setNextIncome: x,
|
|
78
77
|
setSelectedCashAccounts: C,
|
|
79
78
|
setUpcomingExpenses: _
|
|
80
|
-
} =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, [i]),
|
|
79
|
+
} = K(), { isDataLoaded: H, nextIncomeRecurrence: A, upcomingExpenses: W } = P();
|
|
80
|
+
p.useEffect(() => {
|
|
81
|
+
h(i);
|
|
82
|
+
}, [i]), p.useEffect(() => {
|
|
84
83
|
C(
|
|
85
|
-
i.filter((
|
|
84
|
+
i.filter((E) => m.includes(E.guid))
|
|
86
85
|
);
|
|
87
|
-
}, [i,
|
|
88
|
-
|
|
89
|
-
}, [
|
|
90
|
-
const
|
|
91
|
-
() => i.filter((
|
|
92
|
-
[m,
|
|
93
|
-
), w =
|
|
94
|
-
() =>
|
|
95
|
-
[m,
|
|
96
|
-
),
|
|
97
|
-
() =>
|
|
98
|
-
[
|
|
86
|
+
}, [i, b]), p.useEffect(() => {
|
|
87
|
+
A && x(A), _(W);
|
|
88
|
+
}, [A, W]);
|
|
89
|
+
const f = p.useMemo(
|
|
90
|
+
() => i.filter((E) => m.includes(E.guid)).reduce((E, F) => E + (F?.balance || 0), 0),
|
|
91
|
+
[m, W]
|
|
92
|
+
), w = p.useMemo(
|
|
93
|
+
() => c.filter((E) => m.includes(E.accountGuid || "")).reduce((E, F) => E + F.amount, 0),
|
|
94
|
+
[m, c]
|
|
95
|
+
), I = p.useMemo(
|
|
96
|
+
() => f - w,
|
|
97
|
+
[f, w]
|
|
99
98
|
);
|
|
100
|
-
return
|
|
99
|
+
return H ? /* @__PURE__ */ e(v, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
|
|
101
100
|
s,
|
|
102
101
|
{
|
|
103
102
|
border: `1px solid ${a.palette.border.light}`,
|
|
@@ -107,45 +106,45 @@ const V = () => {
|
|
|
107
106
|
px: 24,
|
|
108
107
|
children: [
|
|
109
108
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
110
|
-
/* @__PURE__ */ e(
|
|
111
|
-
/* @__PURE__ */ e(
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
/* @__PURE__ */ e(O, { amount: f, variant: "H2" }),
|
|
110
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: M(
|
|
111
|
+
l.total_cash_accounts,
|
|
112
|
+
d.length
|
|
114
113
|
) })
|
|
115
114
|
] }),
|
|
116
115
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "remove" }) }),
|
|
117
116
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
-
/* @__PURE__ */ e(
|
|
117
|
+
/* @__PURE__ */ e(O, { amount: w, variant: "H2" }),
|
|
118
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: M(l.expenses_due, c.length) })
|
|
120
119
|
] }),
|
|
121
120
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(j, { name: "equal" }) }),
|
|
122
121
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
123
|
-
/* @__PURE__ */ e(
|
|
122
|
+
/* @__PURE__ */ e(O, { amount: I, variant: "H2" }),
|
|
124
123
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
125
|
-
/* @__PURE__ */ e(
|
|
126
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: l.available_to_spend }),
|
|
125
|
+
/* @__PURE__ */ e(pe, { body: l.tooltip_body, title: l.tooltip_title })
|
|
127
126
|
] })
|
|
128
127
|
] }),
|
|
129
|
-
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(
|
|
130
|
-
/* @__PURE__ */ e(u, { variant: "H2", children: M(
|
|
131
|
-
/* @__PURE__ */ e(
|
|
128
|
+
/* @__PURE__ */ e(s, { borderLeft: `1px solid ${a.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: /* @__PURE__ */ o(U, { children: [
|
|
129
|
+
/* @__PURE__ */ e(u, { variant: "H2", children: M(l.days, r) }),
|
|
130
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: l.next_paycheck })
|
|
132
131
|
] }) })
|
|
133
132
|
]
|
|
134
133
|
}
|
|
135
134
|
) : /* @__PURE__ */ o(s, { border: `1px solid ${a.palette.border.light}`, borderRadius: 1, children: [
|
|
136
135
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
137
136
|
/* @__PURE__ */ e(u, { variant: "Small", children: M(
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
l.total_cash_accounts,
|
|
138
|
+
d.length
|
|
140
139
|
) }),
|
|
141
|
-
/* @__PURE__ */ e(
|
|
140
|
+
/* @__PURE__ */ e(O, { amount: g, bold: !0, variant: "XSmall" })
|
|
142
141
|
] }),
|
|
143
|
-
/* @__PURE__ */ e(
|
|
142
|
+
/* @__PURE__ */ e(D, {}),
|
|
144
143
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
145
|
-
/* @__PURE__ */ e(u, { variant: "Small", children: M(
|
|
146
|
-
/* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: M(l.expenses_due, c.length) }),
|
|
145
|
+
/* @__PURE__ */ e(O, { amount: w, bold: !0, symbol: "-", variant: "XSmall" })
|
|
147
146
|
] }),
|
|
148
|
-
/* @__PURE__ */ e(
|
|
147
|
+
/* @__PURE__ */ e(D, {}),
|
|
149
148
|
/* @__PURE__ */ e(
|
|
150
149
|
s,
|
|
151
150
|
{
|
|
@@ -157,40 +156,37 @@ const V = () => {
|
|
|
157
156
|
justifyContent: "space-between",
|
|
158
157
|
px: 16,
|
|
159
158
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
160
|
-
children: /* @__PURE__ */ e(
|
|
159
|
+
children: /* @__PURE__ */ e(fe, { remaining: I })
|
|
161
160
|
}
|
|
162
161
|
),
|
|
163
|
-
/* @__PURE__ */ e(
|
|
162
|
+
/* @__PURE__ */ e(D, {}),
|
|
164
163
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
165
|
-
/* @__PURE__ */ e(u, { variant: "Small", children:
|
|
166
|
-
/* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: M(
|
|
164
|
+
/* @__PURE__ */ e(u, { variant: "Small", children: l.next_paycheck }),
|
|
165
|
+
/* @__PURE__ */ e(u, { bold: !0, variant: "XSmall", children: M(l.days, r) })
|
|
167
166
|
] })
|
|
168
|
-
] }) }) : /* @__PURE__ */ e(
|
|
169
|
-
}, wt =
|
|
167
|
+
] }) }) : /* @__PURE__ */ e(te, { height: t ? 210 : 120 });
|
|
168
|
+
}, wt = L(Ct), St = ({
|
|
170
169
|
onPrimaryCtaClick: a,
|
|
171
170
|
onSecondaryCtaClick: n,
|
|
172
171
|
sx: t = {}
|
|
173
172
|
}) => {
|
|
174
|
-
const { cashflow: i } = N(), { isCopyLoaded: g, isInitialized:
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}, [
|
|
178
|
-
|
|
179
|
-
isLoaded: c
|
|
180
|
-
});
|
|
181
|
-
const d = c && !p.length;
|
|
173
|
+
const { cashflow: i } = N(), { isCopyLoaded: g, isInitialized: b } = Y(), { loadRepeatingTransactions: m, income: h, isDataLoaded: l, setDateRange: r } = P();
|
|
174
|
+
p.useEffect(() => {
|
|
175
|
+
b && (r({ start: $(), end: Xe($(), 1) }), m().finally());
|
|
176
|
+
}, [b]);
|
|
177
|
+
const c = l && !h.length;
|
|
182
178
|
return g ? /* @__PURE__ */ o(
|
|
183
179
|
Je,
|
|
184
180
|
{
|
|
185
181
|
className: "mx-exp-cashflow-miniwidget",
|
|
186
182
|
onPrimaryCtaClick: a,
|
|
187
183
|
primaryCtaLabel: i.primary_cta,
|
|
188
|
-
subTitle:
|
|
184
|
+
subTitle: c || !l ? void 0 : i.sub_title,
|
|
189
185
|
sx: { height: "100%", ...t },
|
|
190
186
|
title: i.title,
|
|
191
187
|
children: [
|
|
192
|
-
!
|
|
193
|
-
|
|
188
|
+
!l && /* @__PURE__ */ e(te, {}),
|
|
189
|
+
l && (c ? /* @__PURE__ */ e(
|
|
194
190
|
Ze,
|
|
195
191
|
{
|
|
196
192
|
header: i.create,
|
|
@@ -203,9 +199,9 @@ const V = () => {
|
|
|
203
199
|
) : /* @__PURE__ */ e(wt, {}))
|
|
204
200
|
]
|
|
205
201
|
}
|
|
206
|
-
) : /* @__PURE__ */ e(
|
|
207
|
-
},
|
|
208
|
-
|
|
202
|
+
) : /* @__PURE__ */ e(te, {});
|
|
203
|
+
}, Wn = L(St), _t = ({ remaining: a }) => /* @__PURE__ */ e(
|
|
204
|
+
ne,
|
|
209
205
|
{
|
|
210
206
|
sx: {
|
|
211
207
|
alignItems: "center",
|
|
@@ -217,19 +213,19 @@ const V = () => {
|
|
|
217
213
|
borderBottomRightRadius: "3px",
|
|
218
214
|
minHeight: "auto"
|
|
219
215
|
},
|
|
220
|
-
children: /* @__PURE__ */ e(
|
|
216
|
+
children: /* @__PURE__ */ e(fe, { remaining: a })
|
|
221
217
|
}
|
|
222
218
|
);
|
|
223
|
-
var
|
|
224
|
-
const It = ({ recurrence: a }) => /* @__PURE__ */ o(
|
|
225
|
-
/* @__PURE__ */ o(
|
|
219
|
+
var oe = /* @__PURE__ */ ((a) => (a.EXPENSE = "expense", a.INCOME = "income", a))(oe || {});
|
|
220
|
+
const It = ({ recurrence: a }) => /* @__PURE__ */ o(U, { children: [
|
|
221
|
+
/* @__PURE__ */ o(ne, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
226
222
|
/* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
227
|
-
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children:
|
|
228
|
-
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children:
|
|
223
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.MONTH) }),
|
|
224
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 11 }, children: Q(a.expectedDate, V.DAY) })
|
|
229
225
|
] }),
|
|
230
226
|
/* @__PURE__ */ e(u, { sx: { flexGrow: 1, fontSize: 13 }, children: a.name }),
|
|
231
227
|
/* @__PURE__ */ e(
|
|
232
|
-
|
|
228
|
+
O,
|
|
233
229
|
{
|
|
234
230
|
amount: a.amount,
|
|
235
231
|
bold: !0,
|
|
@@ -237,10 +233,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
237
233
|
}
|
|
238
234
|
)
|
|
239
235
|
] }),
|
|
240
|
-
/* @__PURE__ */ e(
|
|
241
|
-
] }), Te =
|
|
236
|
+
/* @__PURE__ */ e(D, {})
|
|
237
|
+
] }), Te = L(It), vt = ({ total: a, type: n }) => {
|
|
242
238
|
const { cashflow: t } = N();
|
|
243
|
-
return /* @__PURE__ */ o(
|
|
239
|
+
return /* @__PURE__ */ o(U, { children: [
|
|
244
240
|
/* @__PURE__ */ o(
|
|
245
241
|
ot,
|
|
246
242
|
{
|
|
@@ -254,40 +250,40 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
254
250
|
px: 24
|
|
255
251
|
},
|
|
256
252
|
children: [
|
|
257
|
-
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 12 }, children: n ===
|
|
253
|
+
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 12 }, children: n === oe.EXPENSE ? t.expenses : t.income }),
|
|
258
254
|
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
259
|
-
n ===
|
|
260
|
-
|
|
255
|
+
n === oe.EXPENSE ? "-" : "+",
|
|
256
|
+
Z(a, "0,0.00")
|
|
261
257
|
] })
|
|
262
258
|
]
|
|
263
259
|
}
|
|
264
260
|
),
|
|
265
|
-
/* @__PURE__ */ e(
|
|
261
|
+
/* @__PURE__ */ e(D, {})
|
|
266
262
|
] });
|
|
267
|
-
}, Re =
|
|
268
|
-
const { availableWidth: a } =
|
|
263
|
+
}, Re = L(vt), se = (a, n) => (t) => t.accountGuid === a.guid && (Me(t.expectedDate) || We(t.expectedDate, n.start)) && $e(t.expectedDate, n.end), Dt = () => {
|
|
264
|
+
const { availableWidth: a } = le(), { cashflow: n } = N(), { upcomingExpenses: t, upcomingIncome: i } = P(), { dateRange: g, selectedCashAccounts: b } = K();
|
|
269
265
|
return /* @__PURE__ */ o(s, { children: [
|
|
270
266
|
/* @__PURE__ */ o(s, { direction: a < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
271
267
|
/* @__PURE__ */ e(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
272
268
|
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
|
|
273
|
-
|
|
269
|
+
Q(g.start, V.FULL_MONTH_DAY),
|
|
274
270
|
" -",
|
|
275
271
|
" ",
|
|
276
|
-
|
|
272
|
+
Q(g.end, V.FULL_MONTH_DAY)
|
|
277
273
|
] })
|
|
278
274
|
] }),
|
|
279
|
-
/* @__PURE__ */ e(s, { children:
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
), r =
|
|
283
|
-
(
|
|
275
|
+
/* @__PURE__ */ e(s, { children: b.map((m) => {
|
|
276
|
+
const h = i.filter(se(m, g)).sort((d, x) => B(d.expectedDate) - B(x.expectedDate)), l = t.filter(
|
|
277
|
+
se(m, g)
|
|
278
|
+
), r = h.reduce(
|
|
279
|
+
(d, x) => d + x.amount,
|
|
284
280
|
0
|
|
285
|
-
),
|
|
286
|
-
(
|
|
281
|
+
), c = l.reduce(
|
|
282
|
+
(d, x) => d + x.amount,
|
|
287
283
|
0
|
|
288
284
|
);
|
|
289
285
|
return /* @__PURE__ */ o(
|
|
290
|
-
|
|
286
|
+
ee,
|
|
291
287
|
{
|
|
292
288
|
sx: {
|
|
293
289
|
border: "1px solid",
|
|
@@ -307,27 +303,27 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
307
303
|
}
|
|
308
304
|
}
|
|
309
305
|
),
|
|
310
|
-
/* @__PURE__ */ e(
|
|
311
|
-
|
|
312
|
-
|
|
306
|
+
/* @__PURE__ */ e(D, {}),
|
|
307
|
+
h.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
|
|
308
|
+
ee,
|
|
313
309
|
{
|
|
314
|
-
subheader: /* @__PURE__ */ e(Re, { total: r, type:
|
|
310
|
+
subheader: /* @__PURE__ */ e(Re, { total: r, type: oe.INCOME }),
|
|
315
311
|
sx: { width: "100%" },
|
|
316
|
-
children:
|
|
312
|
+
children: h.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
|
|
317
313
|
}
|
|
318
314
|
) }),
|
|
319
|
-
|
|
320
|
-
|
|
315
|
+
l.length > 0 && /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e(
|
|
316
|
+
ee,
|
|
321
317
|
{
|
|
322
|
-
subheader: /* @__PURE__ */ e(Re, { total:
|
|
318
|
+
subheader: /* @__PURE__ */ e(Re, { total: c, type: oe.EXPENSE }),
|
|
323
319
|
sx: { width: "100%" },
|
|
324
|
-
children:
|
|
320
|
+
children: l.map((d) => /* @__PURE__ */ e(Te, { recurrence: d }, d.repeatingTransactionGuid))
|
|
325
321
|
}
|
|
326
322
|
) }),
|
|
327
323
|
/* @__PURE__ */ e(
|
|
328
324
|
_t,
|
|
329
325
|
{
|
|
330
|
-
remaining: (m.available_balance || m.balance || 0) + r -
|
|
326
|
+
remaining: (m.available_balance || m.balance || 0) + r - c
|
|
331
327
|
}
|
|
332
328
|
)
|
|
333
329
|
]
|
|
@@ -336,24 +332,24 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
336
332
|
);
|
|
337
333
|
}) })
|
|
338
334
|
] });
|
|
339
|
-
}, At =
|
|
340
|
-
const { availableWidth: a } =
|
|
335
|
+
}, At = L(Dt), Et = () => {
|
|
336
|
+
const { availableWidth: a } = le(), n = ce(), { cashflow: t } = N(), { upcomingExpenses: i, upcomingIncome: g } = P(), { dateRange: b, selectedCashAccounts: m } = K(), h = [
|
|
341
337
|
{
|
|
342
338
|
field: "account",
|
|
343
339
|
flex: 1.5,
|
|
344
340
|
headerName: t.accounts,
|
|
345
|
-
renderCell: ({ value: { name: r, nickname:
|
|
346
|
-
const C =
|
|
341
|
+
renderCell: ({ value: { name: r, nickname: c, institution_guid: d, account_number: x } }) => {
|
|
342
|
+
const C = c || r;
|
|
347
343
|
return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
348
344
|
/* @__PURE__ */ e(
|
|
349
345
|
ye,
|
|
350
346
|
{
|
|
351
347
|
alt: t.institution_logo,
|
|
352
|
-
institutionGuid:
|
|
348
|
+
institutionGuid: d || "",
|
|
353
349
|
size: 16
|
|
354
350
|
}
|
|
355
351
|
),
|
|
356
|
-
/* @__PURE__ */ e(u, { variant: "body2", children: `${C} ${
|
|
352
|
+
/* @__PURE__ */ e(u, { variant: "body2", children: `${C} ${x ? `*${x}` : ""}` })
|
|
357
353
|
] });
|
|
358
354
|
}
|
|
359
355
|
},
|
|
@@ -362,21 +358,21 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
362
358
|
flex: 1,
|
|
363
359
|
headerName: t.balance,
|
|
364
360
|
type: "number",
|
|
365
|
-
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children:
|
|
361
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: Z(r.value, "0,0.00") })
|
|
366
362
|
},
|
|
367
363
|
{
|
|
368
364
|
field: "income",
|
|
369
365
|
flex: 1,
|
|
370
366
|
headerName: t.projected_income,
|
|
371
367
|
type: "number",
|
|
372
|
-
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `+${
|
|
368
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `+${Z(r.value, "0,0.00")}` })
|
|
373
369
|
},
|
|
374
370
|
{
|
|
375
371
|
field: "expenses",
|
|
376
372
|
flex: 1.1,
|
|
377
373
|
headerName: t.projected_expenses,
|
|
378
374
|
type: "number",
|
|
379
|
-
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `-${
|
|
375
|
+
renderCell: (r) => /* @__PURE__ */ e(u, { color: n.palette.text.primary, variant: "Small", children: `-${Z(r.value, "0,0.00")}` })
|
|
380
376
|
},
|
|
381
377
|
{
|
|
382
378
|
field: "remaining",
|
|
@@ -384,34 +380,34 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
384
380
|
headerName: t.remaining,
|
|
385
381
|
type: "number",
|
|
386
382
|
renderCell: (r) => {
|
|
387
|
-
const
|
|
383
|
+
const c = r.row.balance + r.row.income - r.row.expenses;
|
|
388
384
|
return /* @__PURE__ */ e(
|
|
389
385
|
u,
|
|
390
386
|
{
|
|
391
|
-
color: Math.sign(
|
|
387
|
+
color: Math.sign(c) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
392
388
|
variant: "Small",
|
|
393
|
-
children:
|
|
389
|
+
children: Z(c, "0,0.00")
|
|
394
390
|
}
|
|
395
391
|
);
|
|
396
392
|
}
|
|
397
393
|
}
|
|
398
|
-
],
|
|
399
|
-
const
|
|
400
|
-
|
|
401
|
-
).reduce((C, _) => C + _.amount, 0),
|
|
402
|
-
|
|
403
|
-
).reduce((C, _) => C + _.amount, 0),
|
|
394
|
+
], l = p.useMemo(() => m.map((r) => {
|
|
395
|
+
const c = i.filter(
|
|
396
|
+
se(r, { start: $(), end: we($(), 30) })
|
|
397
|
+
).reduce((C, _) => C + _.amount, 0), d = g.filter(
|
|
398
|
+
se(r, { start: $(), end: we($(), 30) })
|
|
399
|
+
).reduce((C, _) => C + _.amount, 0), x = (r.balance || 0) + d - c;
|
|
404
400
|
return {
|
|
405
401
|
account: r,
|
|
406
402
|
balance: r.balance || 0,
|
|
407
403
|
id: r.guid,
|
|
408
|
-
income:
|
|
409
|
-
expenses:
|
|
410
|
-
remaining:
|
|
404
|
+
income: d,
|
|
405
|
+
expenses: c,
|
|
406
|
+
remaining: x
|
|
411
407
|
};
|
|
412
408
|
}), [m, i, g]);
|
|
413
409
|
return /* @__PURE__ */ o(
|
|
414
|
-
|
|
410
|
+
v,
|
|
415
411
|
{
|
|
416
412
|
sx: {
|
|
417
413
|
width: "100%"
|
|
@@ -437,7 +433,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
437
433
|
}
|
|
438
434
|
),
|
|
439
435
|
/* @__PURE__ */ e(
|
|
440
|
-
|
|
436
|
+
pe,
|
|
441
437
|
{
|
|
442
438
|
body: t.table_tooltip_body,
|
|
443
439
|
title: t.table_tooltip_title
|
|
@@ -445,10 +441,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
445
441
|
)
|
|
446
442
|
] }),
|
|
447
443
|
/* @__PURE__ */ o(u, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
448
|
-
|
|
444
|
+
Q(b.start, V.FULL_MONTH_DAY),
|
|
449
445
|
" -",
|
|
450
446
|
" ",
|
|
451
|
-
|
|
447
|
+
Q(b.end, V.FULL_MONTH_DAY)
|
|
452
448
|
] })
|
|
453
449
|
]
|
|
454
450
|
}
|
|
@@ -457,13 +453,13 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
457
453
|
rt,
|
|
458
454
|
{
|
|
459
455
|
columnHeaderHeight: 48,
|
|
460
|
-
columns:
|
|
456
|
+
columns: h,
|
|
461
457
|
density: "standard",
|
|
462
458
|
disableColumnMenu: !0,
|
|
463
459
|
disableRowSelectionOnClick: !0,
|
|
464
460
|
hideFooter: !0,
|
|
465
461
|
rowHeight: 48,
|
|
466
|
-
rows:
|
|
462
|
+
rows: l,
|
|
467
463
|
sx: {
|
|
468
464
|
border: "1px solid",
|
|
469
465
|
borderColor: "border.light",
|
|
@@ -483,10 +479,10 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
483
479
|
}
|
|
484
480
|
}
|
|
485
481
|
}
|
|
486
|
-
) :
|
|
487
|
-
const { name:
|
|
482
|
+
) : l.map((r) => {
|
|
483
|
+
const { name: c, nickname: d, institution_guid: x, account_number: C } = r.account, _ = d || c;
|
|
488
484
|
return /* @__PURE__ */ e(
|
|
489
|
-
|
|
485
|
+
ee,
|
|
490
486
|
{
|
|
491
487
|
sx: {
|
|
492
488
|
border: "1px solid",
|
|
@@ -494,7 +490,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
494
490
|
borderRadius: 1,
|
|
495
491
|
marginBottom: 24
|
|
496
492
|
},
|
|
497
|
-
children: /* @__PURE__ */ e(
|
|
493
|
+
children: /* @__PURE__ */ e(ne, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
|
|
498
494
|
/* @__PURE__ */ o(
|
|
499
495
|
s,
|
|
500
496
|
{
|
|
@@ -509,17 +505,17 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
509
505
|
ye,
|
|
510
506
|
{
|
|
511
507
|
alt: t.institution_logo,
|
|
512
|
-
institutionGuid:
|
|
508
|
+
institutionGuid: x || "",
|
|
513
509
|
size: 16
|
|
514
510
|
}
|
|
515
511
|
),
|
|
516
512
|
/* @__PURE__ */ e(u, { variant: "Small", children: `${_} ${C ? `*${C}` : ""}` })
|
|
517
513
|
] }),
|
|
518
|
-
/* @__PURE__ */ e(
|
|
514
|
+
/* @__PURE__ */ e(O, { amount: r.balance, bold: !0, variant: "Small" })
|
|
519
515
|
]
|
|
520
516
|
}
|
|
521
517
|
),
|
|
522
|
-
/* @__PURE__ */ e(
|
|
518
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
523
519
|
/* @__PURE__ */ o(
|
|
524
520
|
s,
|
|
525
521
|
{
|
|
@@ -530,11 +526,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
530
526
|
py: 12,
|
|
531
527
|
children: [
|
|
532
528
|
/* @__PURE__ */ e(u, { variant: "Small", children: t.projected_income }),
|
|
533
|
-
/* @__PURE__ */ e(
|
|
529
|
+
/* @__PURE__ */ e(O, { amount: r.income, bold: !0, symbol: "+", variant: "Small" })
|
|
534
530
|
]
|
|
535
531
|
}
|
|
536
532
|
),
|
|
537
|
-
/* @__PURE__ */ e(
|
|
533
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
538
534
|
/* @__PURE__ */ o(
|
|
539
535
|
s,
|
|
540
536
|
{
|
|
@@ -545,11 +541,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
545
541
|
py: 12,
|
|
546
542
|
children: [
|
|
547
543
|
/* @__PURE__ */ e(u, { variant: "Small", children: t.projected_expenses }),
|
|
548
|
-
/* @__PURE__ */ e(
|
|
544
|
+
/* @__PURE__ */ e(O, { amount: r.expenses, bold: !0, symbol: "-", variant: "Small" })
|
|
549
545
|
]
|
|
550
546
|
}
|
|
551
547
|
),
|
|
552
|
-
/* @__PURE__ */ e(
|
|
548
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
553
549
|
/* @__PURE__ */ e(
|
|
554
550
|
s,
|
|
555
551
|
{
|
|
@@ -561,7 +557,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
561
557
|
px: 16,
|
|
562
558
|
py: 12,
|
|
563
559
|
sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
|
|
564
|
-
children: /* @__PURE__ */ e(
|
|
560
|
+
children: /* @__PURE__ */ e(fe, { remaining: r.remaining })
|
|
565
561
|
}
|
|
566
562
|
)
|
|
567
563
|
] }) })
|
|
@@ -572,19 +568,19 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
572
568
|
]
|
|
573
569
|
}
|
|
574
570
|
);
|
|
575
|
-
}, Tt =
|
|
576
|
-
const { cashflow: a } = N(), { isDesktop: n } =
|
|
577
|
-
g(
|
|
571
|
+
}, Tt = L(Et), Rt = () => {
|
|
572
|
+
const { cashflow: a } = N(), { isDesktop: n } = he(), { onEvent: t } = ke(), [i, g] = p.useState(0), b = (m, h) => {
|
|
573
|
+
g(h);
|
|
578
574
|
};
|
|
579
|
-
return
|
|
575
|
+
return p.useEffect(() => {
|
|
580
576
|
t(i === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
581
|
-
}, [i]), /* @__PURE__ */ o(
|
|
577
|
+
}, [i]), /* @__PURE__ */ o(v, { children: [
|
|
582
578
|
/* @__PURE__ */ o(
|
|
583
579
|
tt,
|
|
584
580
|
{
|
|
585
581
|
"aria-label": a.cashflow_summary_and_details,
|
|
586
582
|
centered: !0,
|
|
587
|
-
onChange:
|
|
583
|
+
onChange: b,
|
|
588
584
|
textColor: "primary",
|
|
589
585
|
value: i,
|
|
590
586
|
variant: "fullWidth",
|
|
@@ -614,17 +610,17 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
614
610
|
]
|
|
615
611
|
}
|
|
616
612
|
),
|
|
617
|
-
/* @__PURE__ */ e(
|
|
618
|
-
/* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(
|
|
619
|
-
/* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(
|
|
613
|
+
/* @__PURE__ */ e(v, { sx: { mb: 32 } }),
|
|
614
|
+
/* @__PURE__ */ e(Se, { index: 0, name: "cashflow", value: i, children: /* @__PURE__ */ e(v, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Tt, {}) }) }),
|
|
615
|
+
/* @__PURE__ */ e(Se, { index: 1, name: "cashflow", value: i, children: /* @__PURE__ */ e(v, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(At, {}) }) })
|
|
620
616
|
] });
|
|
621
|
-
}, Lt =
|
|
617
|
+
}, Lt = L(Rt), re = ({
|
|
622
618
|
amount: a,
|
|
623
619
|
isMobile: n = !1,
|
|
624
620
|
isTotal: t = !1,
|
|
625
621
|
label: i,
|
|
626
622
|
symbol: g,
|
|
627
|
-
tooltip:
|
|
623
|
+
tooltip: b
|
|
628
624
|
}) => /* @__PURE__ */ o(
|
|
629
625
|
s,
|
|
630
626
|
{
|
|
@@ -634,85 +630,85 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
634
630
|
padding: n ? "14px 16px" : 0,
|
|
635
631
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
636
632
|
children: [
|
|
637
|
-
!n && /* @__PURE__ */ e(
|
|
633
|
+
!n && /* @__PURE__ */ e(O, { amount: a, component: "h2", variant: "H2" }),
|
|
638
634
|
/* @__PURE__ */ o(s, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
639
635
|
/* @__PURE__ */ e(u, { bold: t, variant: "Small", children: i }),
|
|
640
|
-
|
|
636
|
+
b
|
|
641
637
|
] }),
|
|
642
|
-
n && /* @__PURE__ */ e(
|
|
638
|
+
n && /* @__PURE__ */ e(O, { amount: a, component: "h2", symbol: g, variant: "Small" })
|
|
643
639
|
]
|
|
644
640
|
}
|
|
645
|
-
), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (
|
|
646
|
-
const { availableWidth: a } =
|
|
647
|
-
() => g.filter(Le(m,
|
|
648
|
-
[
|
|
649
|
-
),
|
|
650
|
-
() =>
|
|
651
|
-
[
|
|
652
|
-
), C =
|
|
653
|
-
() =>
|
|
654
|
-
[
|
|
655
|
-
), _ =
|
|
656
|
-
return /* @__PURE__ */ o(s, { sx: { mx:
|
|
641
|
+
), Le = (a, n) => (t) => t.accountGuid && a.includes(t.accountGuid) && (Me(t.expectedDate) || We(t.expectedDate, n.start)) && $e(t.expectedDate, n.end), Ot = () => {
|
|
642
|
+
const { availableWidth: a } = le(), { cashflow: n } = N(), { income: t, isDataLoaded: i, upcomingExpenses: g, upcomingIncome: b } = P(), { selectedAccountGuids: m } = Y(), { dateRange: h, selectedCashAccounts: l } = K(), [r, c] = p.useState(!1), d = p.useMemo(
|
|
643
|
+
() => g.filter(Le(m, h)),
|
|
644
|
+
[h, m, g]
|
|
645
|
+
), x = p.useMemo(
|
|
646
|
+
() => b.filter(Le(m, h)),
|
|
647
|
+
[h, m, b]
|
|
648
|
+
), C = p.useMemo(
|
|
649
|
+
() => l.reduce((w, I) => w + (I?.balance || 0), 0),
|
|
650
|
+
[l]
|
|
651
|
+
), _ = d.reduce((w, I) => w + I.amount, 0), H = x.reduce((w, I) => w + I.amount, 0), A = C - _ + H, W = i && t.length > 0, f = a < 725;
|
|
652
|
+
return /* @__PURE__ */ o(s, { sx: { mx: f ? 16 : 0, my: f ? 24 : 42 }, children: [
|
|
657
653
|
/* @__PURE__ */ o(
|
|
658
654
|
s,
|
|
659
655
|
{
|
|
660
|
-
border:
|
|
656
|
+
border: f ? "1px solid" : "none",
|
|
661
657
|
borderColor: "border.light",
|
|
662
658
|
borderRadius: 2,
|
|
663
|
-
flexDirection:
|
|
664
|
-
gap:
|
|
659
|
+
flexDirection: f ? "column" : "row",
|
|
660
|
+
gap: f ? 0 : 24,
|
|
665
661
|
justifyContent: "center",
|
|
666
662
|
children: [
|
|
667
663
|
/* @__PURE__ */ e(
|
|
668
|
-
|
|
664
|
+
re,
|
|
669
665
|
{
|
|
670
666
|
amount: C,
|
|
671
|
-
isMobile:
|
|
672
|
-
label: M(n.cash_and_bank,
|
|
667
|
+
isMobile: f,
|
|
668
|
+
label: M(n.cash_and_bank, l.length)
|
|
673
669
|
}
|
|
674
670
|
),
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
!
|
|
671
|
+
f && /* @__PURE__ */ e(D, {}),
|
|
672
|
+
W ? /* @__PURE__ */ o(U, { children: [
|
|
673
|
+
!f && /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
678
674
|
/* @__PURE__ */ e(
|
|
679
|
-
|
|
675
|
+
re,
|
|
680
676
|
{
|
|
681
|
-
amount:
|
|
682
|
-
isMobile:
|
|
677
|
+
amount: H,
|
|
678
|
+
isMobile: f,
|
|
683
679
|
label: n.to_be_received,
|
|
684
|
-
symbol:
|
|
680
|
+
symbol: f ? "+" : void 0
|
|
685
681
|
}
|
|
686
682
|
)
|
|
687
683
|
] }) : /* @__PURE__ */ e(
|
|
688
684
|
G,
|
|
689
685
|
{
|
|
690
|
-
onClick: () =>
|
|
686
|
+
onClick: () => c(!0),
|
|
691
687
|
startIcon: /* @__PURE__ */ e(j, { name: "add" }),
|
|
692
688
|
sx: { fontSize: 13 },
|
|
693
689
|
children: n.add_income
|
|
694
690
|
}
|
|
695
691
|
),
|
|
696
|
-
|
|
692
|
+
f ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
697
693
|
/* @__PURE__ */ e(
|
|
698
|
-
|
|
694
|
+
re,
|
|
699
695
|
{
|
|
700
696
|
amount: _,
|
|
701
|
-
isMobile:
|
|
702
|
-
label: M(n.to_be_paid_out,
|
|
703
|
-
symbol:
|
|
697
|
+
isMobile: f,
|
|
698
|
+
label: M(n.to_be_paid_out, d.length),
|
|
699
|
+
symbol: f ? "-" : void 0
|
|
704
700
|
}
|
|
705
701
|
),
|
|
706
|
-
|
|
702
|
+
f ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(u, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
707
703
|
/* @__PURE__ */ e(
|
|
708
|
-
|
|
704
|
+
re,
|
|
709
705
|
{
|
|
710
|
-
amount:
|
|
711
|
-
isMobile:
|
|
712
|
-
isTotal:
|
|
706
|
+
amount: A,
|
|
707
|
+
isMobile: f,
|
|
708
|
+
isTotal: f,
|
|
713
709
|
label: n.remaining_cash,
|
|
714
710
|
tooltip: /* @__PURE__ */ e(
|
|
715
|
-
|
|
711
|
+
pe,
|
|
716
712
|
{
|
|
717
713
|
body: n.remaining_income_tooltip_body,
|
|
718
714
|
title: n.remaining_income_tooltip_title
|
|
@@ -724,23 +720,23 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
724
720
|
}
|
|
725
721
|
),
|
|
726
722
|
/* @__PURE__ */ e(
|
|
727
|
-
|
|
723
|
+
Ge,
|
|
728
724
|
{
|
|
729
725
|
ariaLabelClose: n.close_manage_income_aria,
|
|
730
726
|
isOpen: r,
|
|
731
|
-
onClose: () =>
|
|
727
|
+
onClose: () => c(!1),
|
|
732
728
|
shouldShowHeaderBorders: !1,
|
|
733
729
|
title: n.manage_income,
|
|
734
730
|
children: /* @__PURE__ */ e(st, {})
|
|
735
731
|
}
|
|
736
732
|
)
|
|
737
733
|
] });
|
|
738
|
-
},
|
|
739
|
-
const { completeOnboarding: n } =
|
|
734
|
+
}, Nt = L(Ot), kt = ({ handleNextStep: a }) => {
|
|
735
|
+
const { completeOnboarding: n } = ue(), { cashflow: t } = N(), i = ce();
|
|
740
736
|
return /* @__PURE__ */ o(s, { children: [
|
|
741
|
-
/* @__PURE__ */ e(
|
|
737
|
+
/* @__PURE__ */ e(me, { pb: 12, children: t.welcome_title }),
|
|
742
738
|
/* @__PURE__ */ e(
|
|
743
|
-
|
|
739
|
+
Ye,
|
|
744
740
|
{
|
|
745
741
|
color: i.palette.primary.light,
|
|
746
742
|
pb: 8,
|
|
@@ -749,11 +745,11 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
749
745
|
children: t.welcome_sub_title
|
|
750
746
|
}
|
|
751
747
|
),
|
|
752
|
-
/* @__PURE__ */ e(
|
|
748
|
+
/* @__PURE__ */ e(k, { pb: 32, children: t.welcome_description }),
|
|
753
749
|
/* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
|
|
754
|
-
/* @__PURE__ */ o(
|
|
750
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
755
751
|
/* @__PURE__ */ e(
|
|
756
|
-
|
|
752
|
+
v,
|
|
757
753
|
{
|
|
758
754
|
bgcolor: i.palette.primary.lighter,
|
|
759
755
|
borderRadius: 1,
|
|
@@ -767,9 +763,9 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
767
763
|
),
|
|
768
764
|
t.bullet_one
|
|
769
765
|
] }),
|
|
770
|
-
/* @__PURE__ */ o(
|
|
766
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
771
767
|
/* @__PURE__ */ e(
|
|
772
|
-
|
|
768
|
+
v,
|
|
773
769
|
{
|
|
774
770
|
bgcolor: i.palette.primary.lighter,
|
|
775
771
|
borderRadius: 1,
|
|
@@ -783,9 +779,9 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
783
779
|
),
|
|
784
780
|
t.bullet_two
|
|
785
781
|
] }),
|
|
786
|
-
/* @__PURE__ */ o(
|
|
782
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
787
783
|
/* @__PURE__ */ e(
|
|
788
|
-
|
|
784
|
+
v,
|
|
789
785
|
{
|
|
790
786
|
bgcolor: i.palette.primary.lighter,
|
|
791
787
|
borderRadius: 1,
|
|
@@ -805,17 +801,17 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
805
801
|
/* @__PURE__ */ e(G, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
806
802
|
] })
|
|
807
803
|
] });
|
|
808
|
-
}, Ht =
|
|
809
|
-
CASHFLOW_ONBOARDING: `${
|
|
810
|
-
CASHFLOW_LOADING_ANIMATION: `${
|
|
804
|
+
}, Ht = L(kt), Oe = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", ze = {
|
|
805
|
+
CASHFLOW_ONBOARDING: `${Oe}/cashflow-onboarding.png`,
|
|
806
|
+
CASHFLOW_LOADING_ANIMATION: `${Oe}/loading-animation.gif`
|
|
811
807
|
}, Ft = () => {
|
|
812
808
|
const { cashflow: a } = N();
|
|
813
|
-
return /* @__PURE__ */ o(
|
|
814
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src:
|
|
815
|
-
/* @__PURE__ */ e(
|
|
816
|
-
/* @__PURE__ */ e(
|
|
809
|
+
return /* @__PURE__ */ o(p.Fragment, { children: [
|
|
810
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: ze.CASHFLOW_LOADING_ANIMATION }) }),
|
|
811
|
+
/* @__PURE__ */ e(me, { pb: 12, children: a.loading_title }),
|
|
812
|
+
/* @__PURE__ */ e(k, { children: a.loading_description })
|
|
817
813
|
] });
|
|
818
|
-
}, Wt =
|
|
814
|
+
}, Wt = L(Ft), $t = it`
|
|
819
815
|
from {
|
|
820
816
|
transform: rotate(0deg);
|
|
821
817
|
}
|
|
@@ -823,142 +819,142 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
823
819
|
transform: rotate(360deg);
|
|
824
820
|
}
|
|
825
821
|
`, Mt = () => {
|
|
826
|
-
const { addRepeatingTransaction: a, repeatingTransactions: n } =
|
|
827
|
-
() =>
|
|
828
|
-
[
|
|
829
|
-
),
|
|
830
|
-
(y) => y.repeating_transaction_type ===
|
|
822
|
+
const { addRepeatingTransaction: a, repeatingTransactions: n } = P(), { cashflow: t, common: i } = N(), { user: g } = He(), { completeOnboarding: b } = ue(), { isDirty: m } = K(), { isMobile: h } = he(), { isCopyLoaded: l, setDisplayedDate: r } = Y(), { filter: c, setFilter: d, transactions: x } = Fe(), C = ce(), [_, H] = J(!0), [A, W] = p.useState(ft.EveryMonth), [f, w] = p.useState(1), [I, E] = p.useState(15), [F, ge] = J(!1), [q, ae] = J(1), [T, de] = J([]), [ie, X] = J(""), S = p.useMemo(
|
|
823
|
+
() => x.find((y) => y.guid === ie),
|
|
824
|
+
[ie, x]
|
|
825
|
+
), Be = !!n.filter(
|
|
826
|
+
(y) => y.repeating_transaction_type === ve.Income
|
|
831
827
|
).length, be = async () => {
|
|
832
|
-
|
|
828
|
+
ae(2), r(
|
|
833
829
|
// Beginning of the month, 90 days before today
|
|
834
|
-
ut(
|
|
830
|
+
ut(je($(), 90)),
|
|
835
831
|
$()
|
|
836
|
-
),
|
|
837
|
-
},
|
|
838
|
-
if (!(
|
|
839
|
-
|
|
840
|
-
for (let y = 0; y <
|
|
841
|
-
const
|
|
842
|
-
account_guid:
|
|
843
|
-
amount:
|
|
832
|
+
), d({ ...c, custom: _e }), ae(3);
|
|
833
|
+
}, Ue = async () => {
|
|
834
|
+
if (!(T.length < 1)) {
|
|
835
|
+
ge(!0);
|
|
836
|
+
for (let y = 0; y < T.length; y++) {
|
|
837
|
+
const R = T[y], xe = De(A, Ie(R.date)), qe = {
|
|
838
|
+
account_guid: R.account_guid,
|
|
839
|
+
amount: R.amount,
|
|
844
840
|
created_by: 0,
|
|
845
841
|
//user
|
|
846
|
-
merchant_guid:
|
|
847
|
-
description:
|
|
842
|
+
merchant_guid: R.merchant_guid,
|
|
843
|
+
description: R.feed_description || R.description,
|
|
848
844
|
predicted_occurs_on: mt(xe, { representation: "date" }),
|
|
849
845
|
recurrence_day: xe.getDay(),
|
|
850
|
-
recurrence_type:
|
|
851
|
-
repeating_transaction_type:
|
|
852
|
-
second_recurrence_day:
|
|
853
|
-
transaction_type:
|
|
846
|
+
recurrence_type: A,
|
|
847
|
+
repeating_transaction_type: ve.Income,
|
|
848
|
+
second_recurrence_day: I,
|
|
849
|
+
transaction_type: R.transaction_type,
|
|
854
850
|
user_guid: g.guid
|
|
855
851
|
};
|
|
856
|
-
await a(
|
|
852
|
+
await a(qe, R);
|
|
857
853
|
}
|
|
858
|
-
await
|
|
854
|
+
await b();
|
|
859
855
|
}
|
|
860
|
-
},
|
|
861
|
-
return
|
|
862
|
-
|
|
856
|
+
}, Pe = !S && _ || !S && T.length < 1;
|
|
857
|
+
return l ? /* @__PURE__ */ o(
|
|
858
|
+
v,
|
|
863
859
|
{
|
|
864
860
|
sx: {
|
|
865
861
|
display: "flex",
|
|
866
|
-
alignItems:
|
|
862
|
+
alignItems: h ? "flex-start" : "center",
|
|
867
863
|
backgroundColor: C.palette.background.paper,
|
|
868
|
-
backgroundImage:
|
|
864
|
+
backgroundImage: h ? null : `url(${ze.CASHFLOW_ONBOARDING})`,
|
|
869
865
|
backgroundRepeat: "no-repeat",
|
|
870
866
|
backgroundPosition: "left 100px",
|
|
871
867
|
backgroundSize: "35%",
|
|
872
868
|
py: 24
|
|
873
869
|
},
|
|
874
870
|
children: [
|
|
875
|
-
|
|
876
|
-
|
|
871
|
+
q === 1 && /* @__PURE__ */ e(
|
|
872
|
+
v,
|
|
877
873
|
{
|
|
878
874
|
sx: {
|
|
879
|
-
...
|
|
875
|
+
...h ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
880
876
|
},
|
|
881
877
|
children: /* @__PURE__ */ e(Ht, { handleNextStep: be })
|
|
882
878
|
}
|
|
883
879
|
),
|
|
884
|
-
|
|
885
|
-
|
|
880
|
+
q === 2 && /* @__PURE__ */ e(
|
|
881
|
+
v,
|
|
886
882
|
{
|
|
887
883
|
sx: {
|
|
888
|
-
...
|
|
884
|
+
...h ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
889
885
|
},
|
|
890
886
|
children: /* @__PURE__ */ e(Wt, {})
|
|
891
887
|
}
|
|
892
888
|
),
|
|
893
|
-
|
|
894
|
-
|
|
889
|
+
q === 3 && /* @__PURE__ */ o(
|
|
890
|
+
v,
|
|
895
891
|
{
|
|
896
892
|
sx: {
|
|
897
|
-
...
|
|
893
|
+
...h ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
898
894
|
},
|
|
899
895
|
children: [
|
|
900
|
-
/* @__PURE__ */ e(
|
|
901
|
-
/* @__PURE__ */ e(
|
|
902
|
-
|
|
903
|
-
/* @__PURE__ */ e(
|
|
896
|
+
/* @__PURE__ */ e(me, { pb: 12, children: t.add_income_title }),
|
|
897
|
+
/* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
|
|
898
|
+
T.length > 0 && !S && /* @__PURE__ */ o(U, { children: [
|
|
899
|
+
/* @__PURE__ */ e(ee, { children: T.map((y, R) => /* @__PURE__ */ o(p.Fragment, { children: [
|
|
904
900
|
/* @__PURE__ */ e(ht, { bgcolor: "background.paper", children: gt(
|
|
905
|
-
|
|
901
|
+
B(y.nextDate || y.date)
|
|
906
902
|
) }),
|
|
907
903
|
/* @__PURE__ */ e(pt, { transaction: y }),
|
|
908
|
-
|
|
904
|
+
R !== T.length - 1 && /* @__PURE__ */ e(D, {})
|
|
909
905
|
] }, y.guid)) }),
|
|
910
906
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
911
|
-
/* @__PURE__ */ e(
|
|
907
|
+
/* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
|
|
912
908
|
/* @__PURE__ */ e(
|
|
913
909
|
G,
|
|
914
910
|
{
|
|
915
|
-
onClick: () =>
|
|
911
|
+
onClick: () => H(!0),
|
|
916
912
|
startIcon: /* @__PURE__ */ e(j, { name: "add", size: 20 }),
|
|
917
913
|
children: t.add_income
|
|
918
914
|
}
|
|
919
915
|
)
|
|
920
916
|
] })
|
|
921
917
|
] }),
|
|
922
|
-
|
|
918
|
+
Pe && /* @__PURE__ */ e(
|
|
923
919
|
ct,
|
|
924
920
|
{
|
|
925
921
|
bgcolor: "background.paper",
|
|
926
|
-
onSearch: (y) =>
|
|
927
|
-
...
|
|
928
|
-
custom: (
|
|
922
|
+
onSearch: (y) => d({
|
|
923
|
+
...c,
|
|
924
|
+
custom: (R) => y ? lt(R, y) : _e(R)
|
|
929
925
|
}),
|
|
930
926
|
onSelected: (y) => {
|
|
931
|
-
|
|
927
|
+
X(y), H(!1);
|
|
932
928
|
}
|
|
933
929
|
}
|
|
934
930
|
),
|
|
935
|
-
!
|
|
936
|
-
|
|
931
|
+
!Be && m && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
|
|
932
|
+
S && /* @__PURE__ */ o(U, { children: [
|
|
937
933
|
/* @__PURE__ */ e(
|
|
938
934
|
dt,
|
|
939
935
|
{
|
|
940
936
|
bgcolor: "background.paper",
|
|
941
|
-
firstDay:
|
|
942
|
-
frequency:
|
|
937
|
+
firstDay: f,
|
|
938
|
+
frequency: A,
|
|
943
939
|
onFirstDayChange: w,
|
|
944
|
-
onFrequencyChange:
|
|
945
|
-
onSecondDayChange:
|
|
946
|
-
secondDay:
|
|
947
|
-
transaction:
|
|
940
|
+
onFrequencyChange: W,
|
|
941
|
+
onSecondDayChange: E,
|
|
942
|
+
secondDay: I,
|
|
943
|
+
transaction: S
|
|
948
944
|
}
|
|
949
945
|
),
|
|
950
946
|
/* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
951
947
|
/* @__PURE__ */ e(
|
|
952
948
|
G,
|
|
953
949
|
{
|
|
954
|
-
"aria-disabled": !
|
|
950
|
+
"aria-disabled": !S,
|
|
955
951
|
onClick: () => {
|
|
956
|
-
const y = [...
|
|
952
|
+
const y = [...T];
|
|
957
953
|
y.push({
|
|
958
|
-
...
|
|
959
|
-
nextDate:
|
|
960
|
-
frequency:
|
|
961
|
-
}),
|
|
954
|
+
...S,
|
|
955
|
+
nextDate: De(A, Ie(S.date)),
|
|
956
|
+
frequency: A
|
|
957
|
+
}), de(y), X("");
|
|
962
958
|
},
|
|
963
959
|
variant: "contained",
|
|
964
960
|
children: i.confirm_button
|
|
@@ -968,7 +964,7 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
968
964
|
G,
|
|
969
965
|
{
|
|
970
966
|
onClick: () => {
|
|
971
|
-
|
|
967
|
+
X(""), H(!0), be().finally();
|
|
972
968
|
},
|
|
973
969
|
variant: "outlined",
|
|
974
970
|
children: i.cancel_button
|
|
@@ -976,13 +972,13 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
976
972
|
)
|
|
977
973
|
] })
|
|
978
974
|
] }),
|
|
979
|
-
|
|
975
|
+
T.length > 0 && !S && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
980
976
|
/* @__PURE__ */ e(
|
|
981
977
|
G,
|
|
982
978
|
{
|
|
983
|
-
"aria-disabled":
|
|
984
|
-
onClick:
|
|
985
|
-
startIcon:
|
|
979
|
+
"aria-disabled": T.length < 1 || F,
|
|
980
|
+
onClick: Ue,
|
|
981
|
+
startIcon: F ? /* @__PURE__ */ e(
|
|
986
982
|
j,
|
|
987
983
|
{
|
|
988
984
|
name: "progress_activity",
|
|
@@ -995,114 +991,113 @@ const It = ({ recurrence: a }) => /* @__PURE__ */ o(P, { children: [
|
|
|
995
991
|
children: t.confirm_income_button
|
|
996
992
|
}
|
|
997
993
|
),
|
|
998
|
-
/* @__PURE__ */ e(G, { onClick:
|
|
994
|
+
/* @__PURE__ */ e(G, { onClick: b, variant: "outlined", children: t.skip_button })
|
|
999
995
|
] })
|
|
1000
996
|
]
|
|
1001
997
|
}
|
|
1002
998
|
)
|
|
1003
999
|
]
|
|
1004
1000
|
}
|
|
1005
|
-
) : /* @__PURE__ */ e(
|
|
1006
|
-
}, Gt =
|
|
1001
|
+
) : /* @__PURE__ */ e(te, {});
|
|
1002
|
+
}, Gt = L(Mt), jt = ({ onBackClick: a, sx: n = {} }) => {
|
|
1007
1003
|
const {
|
|
1008
1004
|
selectedAccounts: t,
|
|
1009
1005
|
selectedAccountGuids: i,
|
|
1010
1006
|
setSelectedAccounts: g,
|
|
1011
|
-
shouldDisableNextDate:
|
|
1007
|
+
shouldDisableNextDate: b,
|
|
1012
1008
|
shouldDisablePrevDate: m
|
|
1013
|
-
} =
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
}, [
|
|
1019
|
-
|
|
1020
|
-
|
|
1009
|
+
} = Y(), { onEvent: h } = ke(), { onLoad: l } = Ve(), { clientConfig: r } = Ke(), { visibleCashAccounts: c } = Ne(), { setFilter: d } = Fe(), { userProfile: x } = He(), { dateRange: C, setSelectedCashAccounts: _ } = K(), { loadRepeatingTransactions: H, income: A, isDataLoaded: W, setDateRange: f } = P(), { cashflow: w, recurring: I } = N(), { isCopyLoaded: E, isInitialized: F } = Y(), q = r?.master?.deep_link_params?.view === "manage_income", [ae, T] = p.useState(q);
|
|
1010
|
+
p.useEffect(() => {
|
|
1011
|
+
F && (f(C), H().finally(() => {
|
|
1012
|
+
l?.("CashflowWidget");
|
|
1013
|
+
}));
|
|
1014
|
+
}, [F]), p.useEffect(() => {
|
|
1015
|
+
g(c);
|
|
1016
|
+
}, [c]), p.useEffect(() => {
|
|
1017
|
+
const ie = c.map((S) => S.guid), X = t.filter(
|
|
1018
|
+
(S) => i.includes(S.guid) && ie.includes(S.guid)
|
|
1021
1019
|
);
|
|
1022
|
-
|
|
1023
|
-
dateRange: { start:
|
|
1024
|
-
accounts:
|
|
1020
|
+
_(X), d({
|
|
1021
|
+
dateRange: { start: je($(), 90), end: bt() },
|
|
1022
|
+
accounts: X.map((S) => S.guid)
|
|
1025
1023
|
});
|
|
1026
|
-
}, [
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
});
|
|
1030
|
-
const R = I && !l?.has_completed_cash_flow_onboarding && !k.length;
|
|
1031
|
-
return !A || !S ? /* @__PURE__ */ e(oe, {}) : R ? /* @__PURE__ */ e(
|
|
1024
|
+
}, [c, t]);
|
|
1025
|
+
const de = W && !x?.has_completed_cash_flow_onboarding && !A.length;
|
|
1026
|
+
return !E || !F ? /* @__PURE__ */ e(te, {}) : de ? /* @__PURE__ */ e(
|
|
1032
1027
|
Ae,
|
|
1033
1028
|
{
|
|
1034
1029
|
onBackClick: a,
|
|
1035
1030
|
sx: { height: "100%", overflow: "auto" },
|
|
1036
|
-
title:
|
|
1031
|
+
title: w.title,
|
|
1037
1032
|
children: /* @__PURE__ */ e(Gt, {})
|
|
1038
1033
|
}
|
|
1039
1034
|
) : /* @__PURE__ */ o(
|
|
1040
1035
|
Ae,
|
|
1041
1036
|
{
|
|
1042
|
-
accountOptions:
|
|
1037
|
+
accountOptions: c,
|
|
1043
1038
|
actions: [
|
|
1044
1039
|
{
|
|
1045
|
-
label:
|
|
1040
|
+
label: I.action_title,
|
|
1046
1041
|
iconName: "credit_card_gear",
|
|
1047
1042
|
onClick: () => {
|
|
1048
|
-
|
|
1043
|
+
T(!0), h(Ee.CASH_FLOW_CLICK_SETTINGS);
|
|
1049
1044
|
}
|
|
1050
1045
|
}
|
|
1051
1046
|
],
|
|
1052
1047
|
calendarActions: {
|
|
1053
|
-
shouldDisableNext:
|
|
1048
|
+
shouldDisableNext: b,
|
|
1054
1049
|
shouldDisablePrevious: m,
|
|
1055
1050
|
shouldDisablePicker: !0,
|
|
1056
1051
|
onRangeChanged: () => {
|
|
1057
1052
|
}
|
|
1058
1053
|
},
|
|
1059
|
-
dateRange:
|
|
1054
|
+
dateRange: C,
|
|
1060
1055
|
dateRangeVariant: "readonly",
|
|
1061
|
-
onAccountsFilterClick: () =>
|
|
1056
|
+
onAccountsFilterClick: () => h(Ee.CASH_FLOW_CLICK_FILTER),
|
|
1062
1057
|
onBackClick: a,
|
|
1063
1058
|
sx: n,
|
|
1064
|
-
title:
|
|
1059
|
+
title: w.title,
|
|
1065
1060
|
children: [
|
|
1066
|
-
/* @__PURE__ */ e(
|
|
1061
|
+
/* @__PURE__ */ e(Nt, {}),
|
|
1067
1062
|
/* @__PURE__ */ e(Lt, {}),
|
|
1068
1063
|
/* @__PURE__ */ e(
|
|
1069
|
-
|
|
1064
|
+
Ge,
|
|
1070
1065
|
{
|
|
1071
|
-
ariaLabelClose:
|
|
1072
|
-
isOpen:
|
|
1073
|
-
onClose: () =>
|
|
1066
|
+
ariaLabelClose: w.close_settings_aria,
|
|
1067
|
+
isOpen: ae,
|
|
1068
|
+
onClose: () => T(!1),
|
|
1074
1069
|
shouldShowHeaderBorders: !1,
|
|
1075
|
-
title:
|
|
1076
|
-
children: /* @__PURE__ */ e(et, { defaultSelectedTab:
|
|
1070
|
+
title: I.action_title,
|
|
1071
|
+
children: /* @__PURE__ */ e(et, { defaultSelectedTab: q ? 1 : 0 })
|
|
1077
1072
|
}
|
|
1078
1073
|
)
|
|
1079
1074
|
]
|
|
1080
1075
|
}
|
|
1081
1076
|
);
|
|
1082
|
-
},
|
|
1083
|
-
class
|
|
1077
|
+
}, $n = L(jt);
|
|
1078
|
+
class Mn {
|
|
1084
1079
|
fetchInstance;
|
|
1085
1080
|
constructor(n, t, i) {
|
|
1086
1081
|
this.fetchInstance = new xt(n, t, void 0, i);
|
|
1087
1082
|
}
|
|
1088
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1089
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1090
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1083
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(z.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1084
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(z.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1085
|
+
getCashflowSequences = async () => this.fetchInstance.get(z.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1091
1086
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1092
|
-
`${
|
|
1087
|
+
`${z.CASHFLOW_EVENTS}/from/${B(n)}/to/${B(t)}`
|
|
1093
1088
|
).then((i) => i.cashflow_events);
|
|
1094
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1089
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${z.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1095
1090
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1096
|
-
`${
|
|
1091
|
+
`${z.CASHFLOW_SEQUENCES}/projected_events/from/${B(
|
|
1097
1092
|
n
|
|
1098
|
-
)}/to/${
|
|
1093
|
+
)}/to/${B(t)}`
|
|
1099
1094
|
).then((i) => i.cashflow_events);
|
|
1100
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1095
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1101
1096
|
}
|
|
1102
1097
|
export {
|
|
1103
|
-
|
|
1104
|
-
|
|
1098
|
+
Mn as CashflowApi,
|
|
1099
|
+
Wn as CashflowMiniWidget,
|
|
1105
1100
|
Gt as CashflowOnboarding,
|
|
1106
|
-
|
|
1107
|
-
|
|
1101
|
+
zn as CashflowStore,
|
|
1102
|
+
$n as CashflowWidget
|
|
1108
1103
|
};
|