@mx-cartographer/experiences 7.0.3 → 7.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/{ManageIncome-BtKRPjvO.mjs → ManageIncome-DG7a42eZ.mjs} +1 -1
- package/dist/{RecurringSettings-Dqn4pjZ0.mjs → RecurringSettings-BkzYDzmO.mjs} +2 -2
- package/dist/{RecurringTransactionsStore-BKLD3OWo.mjs → RecurringTransactionsStore-D62XJtdL.mjs} +1 -1
- package/dist/RepeatingTransaction-BW4J-jeJ.mjs +291 -0
- package/dist/budgets/index.es.js +1 -1
- package/dist/cashflow/index.es.js +187 -186
- package/dist/common/index.es.js +3 -3
- package/dist/finstrong/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +7 -7
- package/package.json +1 -1
- package/dist/RepeatingTransaction-BPWfaB3f.mjs +0 -282
|
@@ -1,55 +1,56 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as U, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import f, { useState as K } from "react";
|
|
3
3
|
import { observer as R } from "mobx-react-lite";
|
|
4
|
+
import { addMonths as qe } from "date-fns/addMonths";
|
|
5
|
+
import { startOfToday as $ } from "date-fns/startOfToday";
|
|
4
6
|
import D from "@mui/material/Box";
|
|
5
7
|
import H from "@mui/material/Button";
|
|
6
8
|
import v from "@mui/material/Divider";
|
|
7
9
|
import r from "@mui/material/Stack";
|
|
8
10
|
import ie from "@mui/material/styles/useTheme";
|
|
9
|
-
import { Text as p, P as N, Icon as F, InstitutionLogo as xe, H1 as ce, H2 as
|
|
10
|
-
import { G as
|
|
11
|
+
import { Text as p, P as N, Icon as F, InstitutionLogo as xe, H1 as ce, H2 as Xe } from "@mxenabled/mxui";
|
|
12
|
+
import { G as Ye, t as le, u as O, p as ae, c as Oe, a as X, o as de, h as P, e as Ne, f as ke } from "../hooks-02T565vf.mjs";
|
|
11
13
|
import { C as L } from "../CurrencyText-YUhH2caW.mjs";
|
|
12
14
|
import { u as me } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
13
15
|
import { L as re } from "../Loader-Dp1P2gNw.mjs";
|
|
14
16
|
import { I as ue } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
15
|
-
import { C as
|
|
17
|
+
import { C as Wn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
16
18
|
import { b as q } from "../Localization-2MODESHW.mjs";
|
|
17
|
-
import { M as
|
|
18
|
-
import { R as
|
|
19
|
-
import
|
|
19
|
+
import { M as Qe } from "../MiniWidgetContainer-DqKQNubH.mjs";
|
|
20
|
+
import { R as Ve } from "../RecurringSettings-BkzYDzmO.mjs";
|
|
21
|
+
import Ke from "@mui/material/Tabs";
|
|
20
22
|
import Ce from "@mui/material/Tab";
|
|
21
|
-
import { getUnixTime as
|
|
23
|
+
import { getUnixTime as B } from "date-fns/getUnixTime";
|
|
22
24
|
import Z from "@mui/material/List";
|
|
23
25
|
import ee from "@mui/material/ListItem";
|
|
24
|
-
import { A as
|
|
26
|
+
import { A as Je } from "../AccountListItem-C7JzYpqf.mjs";
|
|
25
27
|
import { f as Y, D as Q } from "../Dialog-CWW597AF.mjs";
|
|
26
|
-
import
|
|
28
|
+
import Ze from "@mui/material/ListSubheader";
|
|
27
29
|
import { f as J } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
28
30
|
import { isAfter as He } from "date-fns/isAfter";
|
|
29
31
|
import { isBefore as Fe } from "date-fns/isBefore";
|
|
30
32
|
import { isToday as We } from "date-fns/isToday";
|
|
31
|
-
import { startOfToday as B } from "date-fns/startOfToday";
|
|
32
33
|
import { addDays as _e } from "date-fns/addDays";
|
|
33
|
-
import { alpha as
|
|
34
|
-
import { DataGridPro as
|
|
34
|
+
import { alpha as et, keyframes as tt } from "@mui/material/styles";
|
|
35
|
+
import { DataGridPro as nt } from "@mui/x-data-grid-pro";
|
|
35
36
|
import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
|
|
36
|
-
import { M as
|
|
37
|
+
import { M as ot, S as it, i as at, d as Se, c as rt } from "../ManageIncome-DG7a42eZ.mjs";
|
|
37
38
|
import { D as $e } from "../Drawer-kEE73B87.mjs";
|
|
38
|
-
import { formatISO as
|
|
39
|
+
import { formatISO as st } from "date-fns/formatISO";
|
|
39
40
|
import { fromUnixTime as ye } from "date-fns/fromUnixTime";
|
|
40
|
-
import { startOfMonth as
|
|
41
|
-
import { subDays as
|
|
42
|
-
import { S as
|
|
43
|
-
import { F as
|
|
44
|
-
import { h as
|
|
45
|
-
import { endOfToday as
|
|
41
|
+
import { startOfMonth as ct } from "date-fns/startOfMonth";
|
|
42
|
+
import { subDays as Me } from "date-fns/subDays";
|
|
43
|
+
import { S as lt, b as dt } from "../TransactionDetails-D4B9DSWo.mjs";
|
|
44
|
+
import { F as mt, R as Ie, e as De } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
45
|
+
import { h as ut } from "../DateUtil-BcuH7ErC.mjs";
|
|
46
|
+
import { endOfToday as ht } from "date-fns/endOfToday";
|
|
46
47
|
import { W as ve, A as Ae } from "../WidgetContainer-BG-fdDOf.mjs";
|
|
47
|
-
import { F as
|
|
48
|
+
import { F as pt, A as z } from "../Fetch-CkFKy79O.mjs";
|
|
48
49
|
const V = () => {
|
|
49
|
-
if (!f.useContext(
|
|
50
|
+
if (!f.useContext(Ye))
|
|
50
51
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
51
52
|
return le().uiStore;
|
|
52
|
-
},
|
|
53
|
+
}, ft = ({ remaining: i }) => {
|
|
53
54
|
const { cashflow: n } = O();
|
|
54
55
|
return /* @__PURE__ */ o(U, { children: [
|
|
55
56
|
/* @__PURE__ */ e(
|
|
@@ -66,32 +67,32 @@ const V = () => {
|
|
|
66
67
|
/* @__PURE__ */ e(p, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
67
68
|
/* @__PURE__ */ e(L, { amount: i, bold: !0, sx: { fontSize: 12 } })
|
|
68
69
|
] });
|
|
69
|
-
}, he = R(
|
|
70
|
-
const n = ie(), { availableWidth: t } = ae(), { isMobile: s } = me(), { visibleCashAccounts:
|
|
70
|
+
}, he = R(ft), gt = ({ onAddIncomeClick: i }) => {
|
|
71
|
+
const n = ie(), { availableWidth: t } = ae(), { isMobile: s } = me(), { visibleCashAccounts: m, visibleCashBalance: g } = Oe(), { selectedAccountGuids: c } = X(), { cashflow: l } = O(), { userProfile: C } = de(), {
|
|
71
72
|
daysUntilNextIncome: a,
|
|
72
73
|
expensesTilNextIncome: h,
|
|
73
|
-
selectedCashAccounts:
|
|
74
|
+
selectedCashAccounts: d,
|
|
74
75
|
setNextIncome: b,
|
|
75
76
|
setSelectedCashAccounts: _,
|
|
76
77
|
setUpcomingExpenses: w
|
|
77
78
|
} = V(), { isDataLoaded: A, nextIncomeRecurrence: u, upcomingExpenses: E } = P();
|
|
78
79
|
f.useEffect(() => {
|
|
79
80
|
_(
|
|
80
|
-
|
|
81
|
+
m.filter((y) => c.includes(y.guid))
|
|
81
82
|
);
|
|
82
|
-
}, [
|
|
83
|
+
}, [m, c]), f.useEffect(() => {
|
|
83
84
|
u && b(u), w(E);
|
|
84
85
|
}, [u, E]);
|
|
85
86
|
const S = f.useMemo(
|
|
86
|
-
() =>
|
|
87
|
-
[
|
|
88
|
-
),
|
|
89
|
-
() => h.filter((y) =>
|
|
90
|
-
[
|
|
87
|
+
() => m.filter((y) => c.includes(y.guid)).reduce((y, I) => y + (I?.balance || 0), 0),
|
|
88
|
+
[c, E]
|
|
89
|
+
), M = f.useMemo(
|
|
90
|
+
() => h.filter((y) => c.includes(y.accountGuid || "")).reduce((y, I) => y + I.amount, 0),
|
|
91
|
+
[c, h]
|
|
91
92
|
), G = f.useMemo(
|
|
92
|
-
() => S -
|
|
93
|
-
[S,
|
|
94
|
-
),
|
|
93
|
+
() => S - M,
|
|
94
|
+
[S, M]
|
|
95
|
+
), j = C?.has_completed_cash_flow_onboarding && !!i;
|
|
95
96
|
return A ? /* @__PURE__ */ e(D, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 610 ? /* @__PURE__ */ o(
|
|
96
97
|
r,
|
|
97
98
|
{
|
|
@@ -104,33 +105,33 @@ const V = () => {
|
|
|
104
105
|
/* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
|
|
105
106
|
/* @__PURE__ */ e(L, { amount: S, variant: "H2" }),
|
|
106
107
|
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
l.total_cash_accounts,
|
|
109
|
+
d.length
|
|
109
110
|
) })
|
|
110
111
|
] }),
|
|
111
112
|
/* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "remove" }) }),
|
|
112
113
|
/* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
|
|
113
|
-
/* @__PURE__ */ e(L, { amount:
|
|
114
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(
|
|
114
|
+
/* @__PURE__ */ e(L, { amount: M, variant: "H2" }),
|
|
115
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: q(l.expenses_due, h.length) })
|
|
115
116
|
] }),
|
|
116
117
|
/* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "equal" }) }),
|
|
117
118
|
/* @__PURE__ */ o(r, { pb: 14, pr: 24, pt: 12, children: [
|
|
118
119
|
/* @__PURE__ */ e(L, { amount: G, variant: "H2" }),
|
|
119
120
|
/* @__PURE__ */ o(r, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
120
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
121
|
-
/* @__PURE__ */ e(ue, { body:
|
|
121
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: l.available_to_spend }),
|
|
122
|
+
/* @__PURE__ */ e(ue, { body: l.tooltip_body, title: l.tooltip_title })
|
|
122
123
|
] })
|
|
123
124
|
] }),
|
|
124
|
-
/* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children:
|
|
125
|
-
/* @__PURE__ */ e(p, { variant: "H2", children: q(
|
|
126
|
-
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children:
|
|
125
|
+
/* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: j ? /* @__PURE__ */ o(U, { children: [
|
|
126
|
+
/* @__PURE__ */ e(p, { variant: "H2", children: q(l.days, a) }),
|
|
127
|
+
/* @__PURE__ */ e(N, { variant: "XSmall", whiteSpace: "nowrap", children: l.next_paycheck })
|
|
127
128
|
] }) : /* @__PURE__ */ e(
|
|
128
129
|
H,
|
|
129
130
|
{
|
|
130
131
|
onClick: i,
|
|
131
132
|
startIcon: /* @__PURE__ */ e(F, { name: "add" }),
|
|
132
133
|
sx: { fontSize: 13, lineHeight: "initial" },
|
|
133
|
-
children:
|
|
134
|
+
children: l.add_income
|
|
134
135
|
}
|
|
135
136
|
) })
|
|
136
137
|
]
|
|
@@ -138,15 +139,15 @@ const V = () => {
|
|
|
138
139
|
) : /* @__PURE__ */ o(r, { border: `1px solid ${n.palette.border.light}`, borderRadius: 1, children: [
|
|
139
140
|
/* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
140
141
|
/* @__PURE__ */ e(p, { variant: "Small", children: q(
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
l.total_cash_accounts,
|
|
143
|
+
d.length
|
|
143
144
|
) }),
|
|
144
145
|
/* @__PURE__ */ e(L, { amount: g, bold: !0, variant: "XSmall" })
|
|
145
146
|
] }),
|
|
146
147
|
/* @__PURE__ */ e(v, {}),
|
|
147
148
|
/* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
148
|
-
/* @__PURE__ */ e(p, { variant: "Small", children: q(
|
|
149
|
-
/* @__PURE__ */ e(L, { amount:
|
|
149
|
+
/* @__PURE__ */ e(p, { variant: "Small", children: q(l.expenses_due, h.length) }),
|
|
150
|
+
/* @__PURE__ */ e(L, { amount: M, bold: !0, symbol: "-", variant: "XSmall" })
|
|
150
151
|
] }),
|
|
151
152
|
/* @__PURE__ */ e(v, {}),
|
|
152
153
|
/* @__PURE__ */ e(
|
|
@@ -164,9 +165,9 @@ const V = () => {
|
|
|
164
165
|
}
|
|
165
166
|
),
|
|
166
167
|
/* @__PURE__ */ e(v, {}),
|
|
167
|
-
|
|
168
|
-
/* @__PURE__ */ e(p, { variant: "Small", children:
|
|
169
|
-
/* @__PURE__ */ e(p, { bold: !0, variant: "XSmall", children: q(
|
|
168
|
+
j ? /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
169
|
+
/* @__PURE__ */ e(p, { variant: "Small", children: l.next_paycheck }),
|
|
170
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "XSmall", children: q(l.days, a) })
|
|
170
171
|
] }) : /* @__PURE__ */ o(
|
|
171
172
|
r,
|
|
172
173
|
{
|
|
@@ -177,26 +178,26 @@ const V = () => {
|
|
|
177
178
|
pr: 2,
|
|
178
179
|
py: 2,
|
|
179
180
|
children: [
|
|
180
|
-
/* @__PURE__ */ e(p, { variant: "Small", children:
|
|
181
|
+
/* @__PURE__ */ e(p, { variant: "Small", children: l.next_paycheck }),
|
|
181
182
|
/* @__PURE__ */ e(
|
|
182
183
|
H,
|
|
183
184
|
{
|
|
184
185
|
onClick: i,
|
|
185
186
|
startIcon: /* @__PURE__ */ e(F, { name: "add" }),
|
|
186
187
|
sx: { fontSize: 13 },
|
|
187
|
-
children:
|
|
188
|
+
children: l.add_income
|
|
188
189
|
}
|
|
189
190
|
)
|
|
190
191
|
]
|
|
191
192
|
}
|
|
192
193
|
)
|
|
193
194
|
] }) }) : /* @__PURE__ */ e(re, { height: s ? 210 : 120 });
|
|
194
|
-
},
|
|
195
|
-
const { cashflow: t } = O(), { isCopyLoaded: s, isInitialized:
|
|
195
|
+
}, bt = R(gt), xt = ({ onPrimaryCtaClick: i, sx: n = {} }) => {
|
|
196
|
+
const { cashflow: t } = O(), { isCopyLoaded: s, isInitialized: m } = X(), { loadRepeatingTransactions: g, setDateRange: c } = P();
|
|
196
197
|
return f.useEffect(() => {
|
|
197
|
-
|
|
198
|
-
}, [
|
|
199
|
-
|
|
198
|
+
m && (c({ start: $(), end: qe($(), 1) }), g().finally());
|
|
199
|
+
}, [m]), s ? /* @__PURE__ */ e(
|
|
200
|
+
Qe,
|
|
200
201
|
{
|
|
201
202
|
className: "mx-exp-cashflow-miniwidget",
|
|
202
203
|
onPrimaryCtaClick: i,
|
|
@@ -204,10 +205,10 @@ const V = () => {
|
|
|
204
205
|
subTitle: t.sub_title,
|
|
205
206
|
sx: n,
|
|
206
207
|
title: t.title,
|
|
207
|
-
children: /* @__PURE__ */ e(
|
|
208
|
+
children: /* @__PURE__ */ e(bt, { onAddIncomeClick: i })
|
|
208
209
|
}
|
|
209
210
|
) : /* @__PURE__ */ e(re, {});
|
|
210
|
-
},
|
|
211
|
+
}, On = R(xt), Ct = ({ remaining: i }) => /* @__PURE__ */ e(
|
|
211
212
|
ee,
|
|
212
213
|
{
|
|
213
214
|
sx: {
|
|
@@ -224,7 +225,7 @@ const V = () => {
|
|
|
224
225
|
}
|
|
225
226
|
);
|
|
226
227
|
var te = /* @__PURE__ */ ((i) => (i.EXPENSE = "expense", i.INCOME = "income", i))(te || {});
|
|
227
|
-
const
|
|
228
|
+
const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
228
229
|
/* @__PURE__ */ o(ee, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
229
230
|
/* @__PURE__ */ o(r, { alignItems: "center", height: 32, width: 32, children: [
|
|
230
231
|
/* @__PURE__ */ e(p, { bold: !0, sx: { fontSize: 11 }, children: Y(i.expectedDate, Q.MONTH) }),
|
|
@@ -241,11 +242,11 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
241
242
|
)
|
|
242
243
|
] }),
|
|
243
244
|
/* @__PURE__ */ e(v, {})
|
|
244
|
-
] }), Ee = R(
|
|
245
|
+
] }), Ee = R(_t), wt = ({ total: i, type: n }) => {
|
|
245
246
|
const { cashflow: t } = O();
|
|
246
247
|
return /* @__PURE__ */ o(U, { children: [
|
|
247
248
|
/* @__PURE__ */ o(
|
|
248
|
-
|
|
249
|
+
Ze,
|
|
249
250
|
{
|
|
250
251
|
sx: {
|
|
251
252
|
alignItems: "center",
|
|
@@ -267,26 +268,26 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
267
268
|
),
|
|
268
269
|
/* @__PURE__ */ e(v, {})
|
|
269
270
|
] });
|
|
270
|
-
}, Te = R(
|
|
271
|
-
const { availableWidth: i } = ae(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = P(), { dateRange:
|
|
271
|
+
}, Te = R(wt), oe = (i, n) => (t) => t.accountGuid === i.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), St = () => {
|
|
272
|
+
const { availableWidth: i } = ae(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = P(), { dateRange: m, selectedCashAccounts: g } = V();
|
|
272
273
|
return /* @__PURE__ */ o(r, { children: [
|
|
273
274
|
/* @__PURE__ */ o(r, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
274
275
|
/* @__PURE__ */ e(p, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
275
276
|
/* @__PURE__ */ o(p, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
|
|
276
|
-
Y(
|
|
277
|
+
Y(m.start, Q.FULL_MONTH_DAY),
|
|
277
278
|
" -",
|
|
278
279
|
" ",
|
|
279
|
-
Y(
|
|
280
|
+
Y(m.end, Q.FULL_MONTH_DAY)
|
|
280
281
|
] })
|
|
281
282
|
] }),
|
|
282
|
-
/* @__PURE__ */ e(r, { children: g.map((
|
|
283
|
-
const
|
|
284
|
-
oe(
|
|
285
|
-
), a =
|
|
286
|
-
(
|
|
283
|
+
/* @__PURE__ */ e(r, { children: g.map((c) => {
|
|
284
|
+
const l = s.filter(oe(c, m)).sort((d, b) => B(d.expectedDate) - B(b.expectedDate)), C = t.filter(
|
|
285
|
+
oe(c, m)
|
|
286
|
+
), a = l.reduce(
|
|
287
|
+
(d, b) => d + b.amount,
|
|
287
288
|
0
|
|
288
289
|
), h = C.reduce(
|
|
289
|
-
(
|
|
290
|
+
(d, b) => d + b.amount,
|
|
290
291
|
0
|
|
291
292
|
);
|
|
292
293
|
return /* @__PURE__ */ o(
|
|
@@ -300,9 +301,9 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
300
301
|
},
|
|
301
302
|
children: [
|
|
302
303
|
/* @__PURE__ */ e(
|
|
303
|
-
|
|
304
|
+
Je,
|
|
304
305
|
{
|
|
305
|
-
account:
|
|
306
|
+
account: c,
|
|
306
307
|
listItemProps: {
|
|
307
308
|
disableGutters: !1,
|
|
308
309
|
disablePadding: !1,
|
|
@@ -311,12 +312,12 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
311
312
|
}
|
|
312
313
|
),
|
|
313
314
|
/* @__PURE__ */ e(v, {}),
|
|
314
|
-
|
|
315
|
+
l.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
|
|
315
316
|
Z,
|
|
316
317
|
{
|
|
317
318
|
subheader: /* @__PURE__ */ e(Te, { total: a, type: te.INCOME }),
|
|
318
319
|
sx: { width: "100%" },
|
|
319
|
-
children:
|
|
320
|
+
children: l.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
320
321
|
}
|
|
321
322
|
) }),
|
|
322
323
|
C.length > 0 && /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(
|
|
@@ -324,35 +325,35 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
324
325
|
{
|
|
325
326
|
subheader: /* @__PURE__ */ e(Te, { total: h, type: te.EXPENSE }),
|
|
326
327
|
sx: { width: "100%" },
|
|
327
|
-
children: C.map((
|
|
328
|
+
children: C.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
328
329
|
}
|
|
329
330
|
) }),
|
|
330
331
|
/* @__PURE__ */ e(
|
|
331
|
-
|
|
332
|
+
Ct,
|
|
332
333
|
{
|
|
333
|
-
remaining: (
|
|
334
|
+
remaining: (c.available_balance || c.balance || 0) + a - h
|
|
334
335
|
}
|
|
335
336
|
)
|
|
336
337
|
]
|
|
337
338
|
},
|
|
338
|
-
|
|
339
|
+
c.guid
|
|
339
340
|
);
|
|
340
341
|
}) })
|
|
341
342
|
] });
|
|
342
|
-
},
|
|
343
|
-
const { availableWidth: i } = ae(), n = ie(), { cashflow: t } = O(), { upcomingExpenses: s, upcomingIncome:
|
|
343
|
+
}, yt = R(St), It = () => {
|
|
344
|
+
const { availableWidth: i } = ae(), n = ie(), { cashflow: t } = O(), { upcomingExpenses: s, upcomingIncome: m } = P(), { dateRange: g, selectedCashAccounts: c } = V(), l = [
|
|
344
345
|
{
|
|
345
346
|
field: "account",
|
|
346
347
|
flex: 1.5,
|
|
347
348
|
headerName: t.accounts,
|
|
348
|
-
renderCell: ({ value: { name: a, nickname: h, institution_guid:
|
|
349
|
+
renderCell: ({ value: { name: a, nickname: h, institution_guid: d, account_number: b } }) => {
|
|
349
350
|
const _ = h || a;
|
|
350
351
|
return /* @__PURE__ */ o(r, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
351
352
|
/* @__PURE__ */ e(
|
|
352
353
|
xe,
|
|
353
354
|
{
|
|
354
355
|
alt: t.institution_logo,
|
|
355
|
-
institutionGuid:
|
|
356
|
+
institutionGuid: d || "",
|
|
356
357
|
size: 16
|
|
357
358
|
}
|
|
358
359
|
),
|
|
@@ -398,21 +399,21 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
398
399
|
);
|
|
399
400
|
}
|
|
400
401
|
}
|
|
401
|
-
], C = f.useMemo(() =>
|
|
402
|
+
], C = f.useMemo(() => c.map((a) => {
|
|
402
403
|
const h = s.filter(
|
|
403
|
-
oe(a, { start:
|
|
404
|
-
).reduce((_, w) => _ + w.amount, 0),
|
|
405
|
-
oe(a, { start:
|
|
406
|
-
).reduce((_, w) => _ + w.amount, 0), b = (a.balance || 0) +
|
|
404
|
+
oe(a, { start: $(), end: _e($(), 30) })
|
|
405
|
+
).reduce((_, w) => _ + w.amount, 0), d = m.filter(
|
|
406
|
+
oe(a, { start: $(), end: _e($(), 30) })
|
|
407
|
+
).reduce((_, w) => _ + w.amount, 0), b = (a.balance || 0) + d - h;
|
|
407
408
|
return {
|
|
408
409
|
account: a,
|
|
409
410
|
balance: a.balance || 0,
|
|
410
411
|
id: a.guid,
|
|
411
|
-
income:
|
|
412
|
+
income: d,
|
|
412
413
|
expenses: h,
|
|
413
414
|
remaining: b
|
|
414
415
|
};
|
|
415
|
-
}), [
|
|
416
|
+
}), [c, s, m]);
|
|
416
417
|
return /* @__PURE__ */ o(
|
|
417
418
|
D,
|
|
418
419
|
{
|
|
@@ -457,10 +458,10 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
457
458
|
}
|
|
458
459
|
),
|
|
459
460
|
i > 650 ? /* @__PURE__ */ e(
|
|
460
|
-
|
|
461
|
+
nt,
|
|
461
462
|
{
|
|
462
463
|
columnHeaderHeight: 48,
|
|
463
|
-
columns:
|
|
464
|
+
columns: l,
|
|
464
465
|
density: "standard",
|
|
465
466
|
disableColumnMenu: !0,
|
|
466
467
|
disableRowSelectionOnClick: !0,
|
|
@@ -474,7 +475,7 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
474
475
|
"& .MuiDataGrid-columnHeader .MuiIconButton-root": {
|
|
475
476
|
color: n.palette.primary.main,
|
|
476
477
|
"&:hover": {
|
|
477
|
-
backgroundColor:
|
|
478
|
+
backgroundColor: et(n.palette.primary.main, 0.1)
|
|
478
479
|
}
|
|
479
480
|
},
|
|
480
481
|
"& .MuiDataGrid-sortIcon": {
|
|
@@ -483,7 +484,7 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
486
|
) : C.map((a) => {
|
|
486
|
-
const { name: h, nickname:
|
|
487
|
+
const { name: h, nickname: d, institution_guid: b, account_number: _ } = a.account, w = d || h;
|
|
487
488
|
return /* @__PURE__ */ e(
|
|
488
489
|
Z,
|
|
489
490
|
{
|
|
@@ -571,15 +572,15 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
571
572
|
]
|
|
572
573
|
}
|
|
573
574
|
);
|
|
574
|
-
},
|
|
575
|
-
const { cashflow: i } = O(), { isDesktop: n } = me(), { onEvent: t } = Ne(), [s,
|
|
576
|
-
|
|
575
|
+
}, Dt = R(It), vt = () => {
|
|
576
|
+
const { cashflow: i } = O(), { isDesktop: n } = me(), { onEvent: t } = Ne(), [s, m] = f.useState(0), g = (c, l) => {
|
|
577
|
+
m(l);
|
|
577
578
|
};
|
|
578
579
|
return f.useEffect(() => {
|
|
579
580
|
t(s === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
580
581
|
}, [s]), /* @__PURE__ */ o(D, { children: [
|
|
581
582
|
/* @__PURE__ */ o(
|
|
582
|
-
|
|
583
|
+
Ke,
|
|
583
584
|
{
|
|
584
585
|
"aria-label": i.cashflow_summary_and_details,
|
|
585
586
|
centered: !0,
|
|
@@ -614,15 +615,15 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
614
615
|
}
|
|
615
616
|
),
|
|
616
617
|
/* @__PURE__ */ e(D, { sx: { mb: 32 } }),
|
|
617
|
-
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(
|
|
618
|
-
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(
|
|
618
|
+
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) }),
|
|
619
|
+
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(D, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(yt, {}) }) })
|
|
619
620
|
] });
|
|
620
|
-
},
|
|
621
|
+
}, At = R(vt), ne = ({
|
|
621
622
|
amount: i,
|
|
622
623
|
isMobile: n = !1,
|
|
623
624
|
isTotal: t = !1,
|
|
624
625
|
label: s,
|
|
625
|
-
symbol:
|
|
626
|
+
symbol: m,
|
|
626
627
|
tooltip: g
|
|
627
628
|
}) => /* @__PURE__ */ o(
|
|
628
629
|
r,
|
|
@@ -638,20 +639,20 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
638
639
|
/* @__PURE__ */ e(p, { bold: t, variant: "Small", children: s }),
|
|
639
640
|
g
|
|
640
641
|
] }),
|
|
641
|
-
n && /* @__PURE__ */ e(L, { amount: i, component: "h2", symbol:
|
|
642
|
+
n && /* @__PURE__ */ e(L, { amount: i, component: "h2", symbol: m, variant: "Small" })
|
|
642
643
|
]
|
|
643
644
|
}
|
|
644
|
-
), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end),
|
|
645
|
-
const { availableWidth: i } = ae(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = P(), { selectedAccountGuids:
|
|
646
|
-
() => t.filter(Re(
|
|
647
|
-
[g,
|
|
648
|
-
),
|
|
649
|
-
() => s.filter(Re(
|
|
650
|
-
[g,
|
|
645
|
+
), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), Et = () => {
|
|
646
|
+
const { availableWidth: i } = ae(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = P(), { selectedAccountGuids: m } = X(), { dateRange: g, selectedCashAccounts: c } = V(), { userProfile: l } = de(), [C, a] = f.useState(!1), h = f.useMemo(
|
|
647
|
+
() => t.filter(Re(m, g)),
|
|
648
|
+
[g, m, t]
|
|
649
|
+
), d = f.useMemo(
|
|
650
|
+
() => s.filter(Re(m, g)),
|
|
651
|
+
[g, m, s]
|
|
651
652
|
), b = f.useMemo(
|
|
652
|
-
() =>
|
|
653
|
-
[
|
|
654
|
-
), _ = h.reduce((E, S) => E + S.amount, 0), w =
|
|
653
|
+
() => c.reduce((E, S) => E + (S?.balance || 0), 0),
|
|
654
|
+
[c]
|
|
655
|
+
), _ = h.reduce((E, S) => E + S.amount, 0), w = d.reduce((E, S) => E + S.amount, 0), A = b - _ + w, u = i < 725;
|
|
655
656
|
return /* @__PURE__ */ o(r, { sx: { mx: u ? 16 : 0, my: u ? 24 : 42 }, children: [
|
|
656
657
|
/* @__PURE__ */ o(
|
|
657
658
|
r,
|
|
@@ -672,7 +673,7 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
672
673
|
}
|
|
673
674
|
),
|
|
674
675
|
u && /* @__PURE__ */ e(v, {}),
|
|
675
|
-
|
|
676
|
+
l?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(U, { children: [
|
|
676
677
|
!u && /* @__PURE__ */ e(p, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
677
678
|
/* @__PURE__ */ e(
|
|
678
679
|
ne,
|
|
@@ -730,16 +731,16 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
730
731
|
onClose: () => a(!1),
|
|
731
732
|
shouldShowHeaderBorders: !1,
|
|
732
733
|
title: n.manage_income,
|
|
733
|
-
children: /* @__PURE__ */ e(
|
|
734
|
+
children: /* @__PURE__ */ e(ot, {})
|
|
734
735
|
}
|
|
735
736
|
)
|
|
736
737
|
] });
|
|
737
|
-
},
|
|
738
|
+
}, Tt = R(Et), Rt = ({ handleNextStep: i }) => {
|
|
738
739
|
const { completeOnboarding: n } = le(), { cashflow: t } = O(), s = ie();
|
|
739
740
|
return /* @__PURE__ */ o(r, { children: [
|
|
740
741
|
/* @__PURE__ */ e(ce, { pb: 12, children: t.welcome_title }),
|
|
741
742
|
/* @__PURE__ */ e(
|
|
742
|
-
|
|
743
|
+
Xe,
|
|
743
744
|
{
|
|
744
745
|
color: s.palette.primary.light,
|
|
745
746
|
pb: 8,
|
|
@@ -804,34 +805,34 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
804
805
|
/* @__PURE__ */ e(H, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
805
806
|
] })
|
|
806
807
|
] });
|
|
807
|
-
},
|
|
808
|
+
}, Lt = R(Rt), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
|
|
808
809
|
CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
|
|
809
810
|
CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
|
|
810
|
-
},
|
|
811
|
+
}, Ot = () => {
|
|
811
812
|
const { cashflow: i } = O();
|
|
812
813
|
return /* @__PURE__ */ o(f.Fragment, { children: [
|
|
813
|
-
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src:
|
|
814
|
+
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Ge.CASHFLOW_LOADING_ANIMATION }) }),
|
|
814
815
|
/* @__PURE__ */ e(ce, { pb: 12, children: i.loading_title }),
|
|
815
816
|
/* @__PURE__ */ e(N, { children: i.loading_description })
|
|
816
817
|
] });
|
|
817
|
-
},
|
|
818
|
+
}, Nt = R(Ot), kt = tt`
|
|
818
819
|
from {
|
|
819
820
|
transform: rotate(0deg);
|
|
820
821
|
}
|
|
821
822
|
to {
|
|
822
823
|
transform: rotate(360deg);
|
|
823
824
|
}
|
|
824
|
-
`,
|
|
825
|
-
const { addRepeatingTransaction: i, repeatingTransactions: n } = P(), { cashflow: t, common: s } = O(), { completeOnboarding:
|
|
826
|
-
() =>
|
|
827
|
-
[fe,
|
|
825
|
+
`, Ht = () => {
|
|
826
|
+
const { addRepeatingTransaction: i, repeatingTransactions: n } = P(), { cashflow: t, common: s } = O(), { completeOnboarding: m } = le(), { isDirty: g } = V(), { isMobile: c } = me(), { isCopyLoaded: l, setDisplayedDate: C } = X(), { filter: a, setFilter: h, transactions: d } = ke(), b = ie(), [_, w] = K(!0), [A, u] = f.useState(mt.EveryMonth), [E, S] = f.useState(1), [M, G] = f.useState(15), [j, y] = K(!1), [I, pe] = K(1), [k, je] = K([]), [fe, se] = K(""), W = f.useMemo(
|
|
827
|
+
() => d.find((x) => x.guid === fe),
|
|
828
|
+
[fe, d]
|
|
828
829
|
), ze = !!n.filter(
|
|
829
830
|
(x) => x.repeating_transaction_type === Ie.Income
|
|
830
831
|
).length, ge = async () => {
|
|
831
832
|
pe(2), C(
|
|
832
833
|
// Beginning of the month, 90 days before today
|
|
833
|
-
|
|
834
|
-
|
|
834
|
+
ct(Me($(), 90)),
|
|
835
|
+
$()
|
|
835
836
|
), h({ ...a, custom: Se }), pe(3);
|
|
836
837
|
}, Be = async () => {
|
|
837
838
|
if (!(k.length < 1)) {
|
|
@@ -842,7 +843,7 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
842
843
|
amount: T.amount,
|
|
843
844
|
merchant_guid: T.merchant_guid,
|
|
844
845
|
description: T.feed_description || T.description,
|
|
845
|
-
predicted_occurs_on:
|
|
846
|
+
predicted_occurs_on: st(be, { representation: "date" }),
|
|
846
847
|
recurrence_day: be.getDay(),
|
|
847
848
|
recurrence_type: A,
|
|
848
849
|
repeating_transaction_type: Ie.Income,
|
|
@@ -850,17 +851,17 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
850
851
|
};
|
|
851
852
|
await i(Pe, T);
|
|
852
853
|
}
|
|
853
|
-
await
|
|
854
|
+
await m();
|
|
854
855
|
}
|
|
855
856
|
}, Ue = !W && _ || !W && k.length < 1;
|
|
856
|
-
return
|
|
857
|
+
return l ? /* @__PURE__ */ o(
|
|
857
858
|
D,
|
|
858
859
|
{
|
|
859
860
|
sx: {
|
|
860
861
|
display: "flex",
|
|
861
|
-
alignItems:
|
|
862
|
+
alignItems: c ? "flex-start" : "center",
|
|
862
863
|
backgroundColor: b.palette.background.paper,
|
|
863
|
-
backgroundImage:
|
|
864
|
+
backgroundImage: c ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
|
|
864
865
|
backgroundRepeat: "no-repeat",
|
|
865
866
|
backgroundPosition: "left 100px",
|
|
866
867
|
backgroundSize: "35%",
|
|
@@ -871,35 +872,35 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
871
872
|
D,
|
|
872
873
|
{
|
|
873
874
|
sx: {
|
|
874
|
-
...
|
|
875
|
+
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
875
876
|
},
|
|
876
|
-
children: /* @__PURE__ */ e(
|
|
877
|
+
children: /* @__PURE__ */ e(Lt, { handleNextStep: ge })
|
|
877
878
|
}
|
|
878
879
|
),
|
|
879
880
|
I === 2 && /* @__PURE__ */ e(
|
|
880
881
|
D,
|
|
881
882
|
{
|
|
882
883
|
sx: {
|
|
883
|
-
...
|
|
884
|
+
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
884
885
|
},
|
|
885
|
-
children: /* @__PURE__ */ e(
|
|
886
|
+
children: /* @__PURE__ */ e(Nt, {})
|
|
886
887
|
}
|
|
887
888
|
),
|
|
888
889
|
I === 3 && /* @__PURE__ */ o(
|
|
889
890
|
D,
|
|
890
891
|
{
|
|
891
892
|
sx: {
|
|
892
|
-
...
|
|
893
|
+
...c ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
893
894
|
},
|
|
894
895
|
children: [
|
|
895
896
|
/* @__PURE__ */ e(ce, { pb: 12, children: t.add_income_title }),
|
|
896
897
|
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
897
898
|
k.length > 0 && !W && /* @__PURE__ */ o(U, { children: [
|
|
898
899
|
/* @__PURE__ */ e(Z, { children: k.map((x, T) => /* @__PURE__ */ o(f.Fragment, { children: [
|
|
899
|
-
/* @__PURE__ */ e(
|
|
900
|
-
|
|
900
|
+
/* @__PURE__ */ e(lt, { bgcolor: "background.paper", children: ut(
|
|
901
|
+
B(x.nextDate || x.date)
|
|
901
902
|
) }),
|
|
902
|
-
/* @__PURE__ */ e(
|
|
903
|
+
/* @__PURE__ */ e(dt, { transaction: x }),
|
|
903
904
|
T !== k.length - 1 && /* @__PURE__ */ e(v, {})
|
|
904
905
|
] }, x.guid)) }),
|
|
905
906
|
/* @__PURE__ */ o(r, { alignItems: "center", direction: "row", children: [
|
|
@@ -915,12 +916,12 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
915
916
|
] })
|
|
916
917
|
] }),
|
|
917
918
|
Ue && /* @__PURE__ */ e(
|
|
918
|
-
|
|
919
|
+
it,
|
|
919
920
|
{
|
|
920
921
|
bgcolor: "background.paper",
|
|
921
922
|
onSearch: (x) => h({
|
|
922
923
|
...a,
|
|
923
|
-
custom: (T) => x ?
|
|
924
|
+
custom: (T) => x ? at(T, x) : Se(T)
|
|
924
925
|
}),
|
|
925
926
|
onSelected: (x) => {
|
|
926
927
|
se(x), w(!1);
|
|
@@ -930,7 +931,7 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
930
931
|
!ze && g && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
931
932
|
W && /* @__PURE__ */ o(U, { children: [
|
|
932
933
|
/* @__PURE__ */ e(
|
|
933
|
-
|
|
934
|
+
rt,
|
|
934
935
|
{
|
|
935
936
|
bgcolor: "background.paper",
|
|
936
937
|
firstDay: E,
|
|
@@ -938,7 +939,7 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
938
939
|
onFirstDayChange: S,
|
|
939
940
|
onFrequencyChange: u,
|
|
940
941
|
onSecondDayChange: G,
|
|
941
|
-
secondDay:
|
|
942
|
+
secondDay: M,
|
|
942
943
|
transaction: W
|
|
943
944
|
}
|
|
944
945
|
),
|
|
@@ -975,14 +976,14 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
975
976
|
/* @__PURE__ */ e(
|
|
976
977
|
H,
|
|
977
978
|
{
|
|
978
|
-
"aria-disabled": k.length < 1 ||
|
|
979
|
+
"aria-disabled": k.length < 1 || j,
|
|
979
980
|
onClick: Be,
|
|
980
|
-
startIcon:
|
|
981
|
+
startIcon: j ? /* @__PURE__ */ e(
|
|
981
982
|
F,
|
|
982
983
|
{
|
|
983
984
|
name: "progress_activity",
|
|
984
985
|
sx: {
|
|
985
|
-
animation: `${
|
|
986
|
+
animation: `${kt} 2s linear infinite`
|
|
986
987
|
}
|
|
987
988
|
}
|
|
988
989
|
) : null,
|
|
@@ -990,7 +991,7 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
990
991
|
children: t.confirm_income_button
|
|
991
992
|
}
|
|
992
993
|
),
|
|
993
|
-
/* @__PURE__ */ e(H, { onClick:
|
|
994
|
+
/* @__PURE__ */ e(H, { onClick: m, variant: "outlined", children: t.skip_button })
|
|
994
995
|
] })
|
|
995
996
|
]
|
|
996
997
|
}
|
|
@@ -998,24 +999,24 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
998
999
|
]
|
|
999
1000
|
}
|
|
1000
1001
|
) : /* @__PURE__ */ e(re, {});
|
|
1001
|
-
},
|
|
1002
|
+
}, Ft = R(Ht), Wt = ({ onBackClick: i, sx: n = {} }) => {
|
|
1002
1003
|
const {
|
|
1003
1004
|
selectedAccounts: t,
|
|
1004
1005
|
selectedAccountGuids: s,
|
|
1005
|
-
setSelectedAccounts:
|
|
1006
|
+
setSelectedAccounts: m,
|
|
1006
1007
|
shouldDisableNextDate: g,
|
|
1007
|
-
shouldDisablePrevDate:
|
|
1008
|
-
} = X(), { onEvent:
|
|
1008
|
+
shouldDisablePrevDate: c
|
|
1009
|
+
} = X(), { onEvent: l } = Ne(), { visibleCashAccounts: C } = Oe(), { setFilter: a } = ke(), { userProfile: h } = de(), { dateRange: d, setSelectedCashAccounts: b } = V(), { loadRepeatingTransactions: _, setDateRange: w } = P(), { cashflow: A, recurring: u } = O(), { isCopyLoaded: E, isInitialized: S } = X(), [M, G] = f.useState(!1);
|
|
1009
1010
|
return f.useEffect(() => {
|
|
1010
|
-
S && (w(
|
|
1011
|
+
S && (w(d), _().finally());
|
|
1011
1012
|
}, [S]), f.useEffect(() => {
|
|
1012
|
-
|
|
1013
|
+
m(C);
|
|
1013
1014
|
}, [C]), f.useEffect(() => {
|
|
1014
|
-
const
|
|
1015
|
-
(I) => s.includes(I.guid) &&
|
|
1015
|
+
const j = C.map((I) => I.guid), y = t.filter(
|
|
1016
|
+
(I) => s.includes(I.guid) && j.includes(I.guid)
|
|
1016
1017
|
);
|
|
1017
1018
|
b(y), a({
|
|
1018
|
-
dateRange: { start:
|
|
1019
|
+
dateRange: { start: Me($(), 90), end: ht() },
|
|
1019
1020
|
accounts: y.map((I) => I.guid)
|
|
1020
1021
|
});
|
|
1021
1022
|
}, [C, t]), !E || !S ? /* @__PURE__ */ e(re, {}) : h?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
|
|
@@ -1027,35 +1028,35 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1027
1028
|
label: u.action_title,
|
|
1028
1029
|
iconName: "credit_card",
|
|
1029
1030
|
onClick: () => {
|
|
1030
|
-
G(!0),
|
|
1031
|
+
G(!0), l(Ae.CASH_FLOW_CLICK_SETTINGS);
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1033
1034
|
],
|
|
1034
1035
|
calendarActions: {
|
|
1035
1036
|
shouldDisableNext: g,
|
|
1036
|
-
shouldDisablePrevious:
|
|
1037
|
+
shouldDisablePrevious: c,
|
|
1037
1038
|
shouldDisablePicker: !0,
|
|
1038
1039
|
onRangeChanged: () => {
|
|
1039
1040
|
}
|
|
1040
1041
|
},
|
|
1041
|
-
dateRange:
|
|
1042
|
+
dateRange: d,
|
|
1042
1043
|
dateRangeVariant: "readonly",
|
|
1043
|
-
onAccountsFilterClick: () =>
|
|
1044
|
+
onAccountsFilterClick: () => l(Ae.CASH_FLOW_CLICK_FILTER),
|
|
1044
1045
|
onBackClick: i,
|
|
1045
1046
|
sx: n,
|
|
1046
1047
|
title: A.title,
|
|
1047
1048
|
children: [
|
|
1048
|
-
/* @__PURE__ */ e(
|
|
1049
|
-
/* @__PURE__ */ e(
|
|
1049
|
+
/* @__PURE__ */ e(Tt, {}),
|
|
1050
|
+
/* @__PURE__ */ e(At, {}),
|
|
1050
1051
|
/* @__PURE__ */ e(
|
|
1051
1052
|
$e,
|
|
1052
1053
|
{
|
|
1053
1054
|
ariaLabelClose: A.close_settings_aria,
|
|
1054
|
-
isOpen:
|
|
1055
|
+
isOpen: M,
|
|
1055
1056
|
onClose: () => G(!1),
|
|
1056
1057
|
shouldShowHeaderBorders: !1,
|
|
1057
1058
|
title: u.action_title,
|
|
1058
|
-
children: /* @__PURE__ */ e(
|
|
1059
|
+
children: /* @__PURE__ */ e(Ve, {})
|
|
1059
1060
|
}
|
|
1060
1061
|
)
|
|
1061
1062
|
]
|
|
@@ -1066,33 +1067,33 @@ const Ct = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1066
1067
|
onBackClick: i,
|
|
1067
1068
|
sx: { height: "100%", overflow: "auto" },
|
|
1068
1069
|
title: A.title,
|
|
1069
|
-
children: /* @__PURE__ */ e(
|
|
1070
|
+
children: /* @__PURE__ */ e(Ft, {})
|
|
1070
1071
|
}
|
|
1071
1072
|
);
|
|
1072
|
-
},
|
|
1073
|
-
class
|
|
1073
|
+
}, Nn = R(Wt);
|
|
1074
|
+
class kn {
|
|
1074
1075
|
fetchInstance;
|
|
1075
1076
|
constructor(n, t) {
|
|
1076
|
-
this.fetchInstance = new
|
|
1077
|
+
this.fetchInstance = new pt(n, t);
|
|
1077
1078
|
}
|
|
1078
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1079
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1080
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1079
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(z.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1080
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(z.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1081
|
+
getCashflowSequences = async () => this.fetchInstance.get(z.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1081
1082
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1082
|
-
`${
|
|
1083
|
+
`${z.CASHFLOW_EVENTS}/from/${B(n)}/to/${B(t)}`
|
|
1083
1084
|
).then((s) => s.cashflow_events);
|
|
1084
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1085
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${z.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1085
1086
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1086
|
-
`${
|
|
1087
|
+
`${z.CASHFLOW_SEQUENCES}/projected_events/from/${B(
|
|
1087
1088
|
n
|
|
1088
|
-
)}/to/${
|
|
1089
|
+
)}/to/${B(t)}`
|
|
1089
1090
|
).then((s) => s.cashflow_events);
|
|
1090
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1091
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${z.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1091
1092
|
}
|
|
1092
1093
|
export {
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1094
|
+
kn as CashflowApi,
|
|
1095
|
+
On as CashflowMiniWidget,
|
|
1096
|
+
Ft as CashflowOnboarding,
|
|
1097
|
+
Wn as CashflowStore,
|
|
1098
|
+
Nn as CashflowWidget
|
|
1098
1099
|
};
|