@mx-cartographer/experiences 7.0.8-alpha.al1 → 7.0.8-alpha.ram2
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/{AccountDetailsContent-OzI5Hs8T.mjs → AccountDetailsContent-Cn-xCi2i.mjs} +3 -3
- package/dist/{AccountDetailsHeader-DnEyQMpX.mjs → AccountDetailsHeader-CE9FGOX8.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-Dyzb3UDU.mjs → CategorySelectorDrawer-Dbjs-xSv.mjs} +1 -1
- package/dist/{Help-BazrEpv7.mjs → Help-Bzy-sWHB.mjs} +1 -1
- package/dist/Loader-Ciu_fNgH.mjs +24 -0
- package/dist/{ManageIncome-CzTV55Bh.mjs → ManageIncome-CyIc-pyz.mjs} +2 -2
- package/dist/{NotificationSettings-BznqGVQ2.mjs → NotificationSettings-BTGXF1YU.mjs} +1 -1
- package/dist/{RecurringSettings-BQDQvmSY.mjs → RecurringSettings-CLKmIlov.mjs} +2 -2
- package/dist/{TransactionDetails-BSfXqkpH.mjs → TransactionDetails-CaVLVSni.mjs} +3 -3
- package/dist/{ViewMoreMicroCard-BZI5VMNW.mjs → ViewMoreMicroCard-VorMH_9a.mjs} +1 -1
- package/dist/{WidgetContainer-BG-fdDOf.mjs → WidgetContainer-BJhlo6rF.mjs} +1 -1
- package/dist/accounts/index.es.js +5 -5
- package/dist/analytics/index.es.js +1 -1
- package/dist/budgets/index.es.js +5 -5
- package/dist/cashflow/index.es.js +226 -228
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +2 -2
- package/dist/debts/index.es.js +3 -3
- package/dist/finstrong/index.es.js +3 -3
- package/dist/goals/index.es.js +4 -4
- package/dist/help/index.es.js +3 -3
- package/dist/investments/index.es.js +2 -2
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +2 -2
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +6 -6
- package/dist/settings/index.es.js +6 -6
- package/dist/spending/index.es.js +3 -3
- package/dist/transactions/index.es.js +5 -5
- package/dist/trends/index.es.js +4 -4
- package/package.json +1 -1
- package/dist/Loader-Dp1P2gNw.mjs +0 -14
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import m, { useState as J } from "react";
|
|
3
|
-
import { observer as
|
|
3
|
+
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { addMonths as qe } from "date-fns/addMonths";
|
|
5
5
|
import { startOfToday as M } from "date-fns/startOfToday";
|
|
6
|
-
import
|
|
6
|
+
import I from "@mui/material/Box";
|
|
7
7
|
import H from "@mui/material/Button";
|
|
8
|
-
import
|
|
8
|
+
import D from "@mui/material/Divider";
|
|
9
9
|
import r from "@mui/material/Stack";
|
|
10
10
|
import ae from "@mui/material/styles/useTheme";
|
|
11
11
|
import { Text as h, P as k, Icon as F, InstitutionLogo as xe, H1 as le, H2 as Xe } from "@mxenabled/mxui";
|
|
12
|
-
import { G as Ye, t as de, u as
|
|
13
|
-
import { C as
|
|
12
|
+
import { G as Ye, t as de, u as O, p as re, c as Oe, a as Y, o as me, h as q, e as Ne, f as ke } from "../hooks-02T565vf.mjs";
|
|
13
|
+
import { C as L } from "../CurrencyText-YUhH2caW.mjs";
|
|
14
14
|
import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
15
|
-
import { L as se } from "../Loader-
|
|
15
|
+
import { L as se } from "../Loader-Ciu_fNgH.mjs";
|
|
16
16
|
import { I as he } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
17
17
|
import { C as Wn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
18
18
|
import { b as X } from "../Localization-2MODESHW.mjs";
|
|
19
19
|
import { M as Qe } from "../MiniWidgetContainer-DqKQNubH.mjs";
|
|
20
|
-
import { R as Ve } from "../RecurringSettings-
|
|
20
|
+
import { R as Ve } from "../RecurringSettings-CLKmIlov.mjs";
|
|
21
21
|
import Ke from "@mui/material/Tabs";
|
|
22
22
|
import Ce from "@mui/material/Tab";
|
|
23
23
|
import { getUnixTime as U } from "date-fns/getUnixTime";
|
|
@@ -34,27 +34,27 @@ import { addDays as _e } from "date-fns/addDays";
|
|
|
34
34
|
import { alpha as et, keyframes as tt } from "@mui/material/styles";
|
|
35
35
|
import { DataGridPro as nt } from "@mui/x-data-grid-pro";
|
|
36
36
|
import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
|
|
37
|
-
import { M as ot, S as it, i as at, d as Se, c as rt } from "../ManageIncome-
|
|
37
|
+
import { M as ot, S as it, i as at, d as Se, c as rt } from "../ManageIncome-CyIc-pyz.mjs";
|
|
38
38
|
import { D as $e } from "../Drawer-kEE73B87.mjs";
|
|
39
39
|
import { formatISO as st } from "date-fns/formatISO";
|
|
40
40
|
import { fromUnixTime as ye } from "date-fns/fromUnixTime";
|
|
41
41
|
import { startOfMonth as ct } from "date-fns/startOfMonth";
|
|
42
42
|
import { subDays as Me } from "date-fns/subDays";
|
|
43
|
-
import { S as lt, b as dt } from "../TransactionDetails-
|
|
43
|
+
import { S as lt, b as dt } from "../TransactionDetails-CaVLVSni.mjs";
|
|
44
44
|
import { F as mt, R as Ie, e as De } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
45
45
|
import { h as ut } from "../DateUtil-BcuH7ErC.mjs";
|
|
46
46
|
import { endOfToday as ht } from "date-fns/endOfToday";
|
|
47
|
-
import { W as ve, A as Ae } from "../WidgetContainer-
|
|
47
|
+
import { W as ve, A as Ae } from "../WidgetContainer-BJhlo6rF.mjs";
|
|
48
48
|
import { F as pt, A as B } from "../Fetch-CkFKy79O.mjs";
|
|
49
49
|
const K = () => {
|
|
50
50
|
if (!m.useContext(Ye))
|
|
51
51
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
52
52
|
return de().uiStore;
|
|
53
53
|
}, ft = ({ remaining: i }) => {
|
|
54
|
-
const { cashflow: n } =
|
|
54
|
+
const { cashflow: n } = O();
|
|
55
55
|
return /* @__PURE__ */ o(P, { children: [
|
|
56
56
|
/* @__PURE__ */ e(
|
|
57
|
-
|
|
57
|
+
I,
|
|
58
58
|
{
|
|
59
59
|
sx: {
|
|
60
60
|
borderRadius: "1px",
|
|
@@ -65,39 +65,37 @@ const K = () => {
|
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
67
|
/* @__PURE__ */ e(h, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(L, { amount: i, bold: !0, sx: { fontSize: 12 } })
|
|
69
69
|
] });
|
|
70
|
-
}, pe =
|
|
71
|
-
const n = ae(), { availableWidth: t } = re(), { isMobile: s } = ue(), { visibleCashAccounts: c, visibleCashBalance:
|
|
70
|
+
}, pe = T(ft), gt = ({ onAddIncomeClick: i }) => {
|
|
71
|
+
const n = ae(), { availableWidth: t } = re(), { isMobile: s } = ue(), { visibleCashAccounts: c, visibleCashBalance: f } = Oe(), { selectedAccounts: d, selectedAccountGuids: b, setSelectedAccounts: C } = Y(), { cashflow: a } = O(), { userProfile: g } = me(), {
|
|
72
72
|
daysUntilNextIncome: l,
|
|
73
|
-
expensesTilNextIncome:
|
|
74
|
-
selectedCashAccounts:
|
|
73
|
+
expensesTilNextIncome: u,
|
|
74
|
+
selectedCashAccounts: _,
|
|
75
75
|
setNextIncome: w,
|
|
76
|
-
setSelectedCashAccounts:
|
|
76
|
+
setSelectedCashAccounts: v,
|
|
77
77
|
setUpcomingExpenses: p
|
|
78
|
-
} = K(), { isDataLoaded:
|
|
78
|
+
} = K(), { isDataLoaded: N, nextIncomeRecurrence: S, upcomingExpenses: j } = q();
|
|
79
79
|
m.useEffect(() => {
|
|
80
|
-
|
|
80
|
+
C(c);
|
|
81
81
|
}, [c]), m.useEffect(() => {
|
|
82
|
-
|
|
83
|
-
c.filter((
|
|
82
|
+
v(
|
|
83
|
+
c.filter((R) => b.includes(R.guid))
|
|
84
84
|
);
|
|
85
|
-
}, [c,
|
|
86
|
-
|
|
87
|
-
}, [S,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
() => c.filter((y) => f.includes(y.guid)).reduce((y, I) => y + (I?.balance || 0), 0),
|
|
92
|
-
[f, G]
|
|
85
|
+
}, [c, d]), m.useEffect(() => {
|
|
86
|
+
S && w(S), p(j);
|
|
87
|
+
}, [S, j]);
|
|
88
|
+
const G = m.useMemo(
|
|
89
|
+
() => c.filter((R) => b.includes(R.guid)).reduce((R, y) => R + (y?.balance || 0), 0),
|
|
90
|
+
[b, j]
|
|
93
91
|
), W = m.useMemo(
|
|
94
|
-
() =>
|
|
95
|
-
[
|
|
92
|
+
() => u.filter((R) => b.includes(R.accountGuid || "")).reduce((R, y) => R + y.amount, 0),
|
|
93
|
+
[b, u]
|
|
96
94
|
), z = m.useMemo(
|
|
97
|
-
() =>
|
|
98
|
-
[
|
|
99
|
-
),
|
|
100
|
-
return
|
|
95
|
+
() => G - W,
|
|
96
|
+
[G, W]
|
|
97
|
+
), A = g?.has_completed_cash_flow_onboarding && !!i;
|
|
98
|
+
return N ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 610 ? /* @__PURE__ */ o(
|
|
101
99
|
r,
|
|
102
100
|
{
|
|
103
101
|
border: `1px solid ${n.palette.border.light}`,
|
|
@@ -107,26 +105,26 @@ const K = () => {
|
|
|
107
105
|
px: 24,
|
|
108
106
|
children: [
|
|
109
107
|
/* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
|
|
110
|
-
/* @__PURE__ */ e(
|
|
108
|
+
/* @__PURE__ */ e(L, { amount: G, variant: "H2" }),
|
|
111
109
|
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(
|
|
112
110
|
a.total_cash_accounts,
|
|
113
|
-
|
|
111
|
+
_.length
|
|
114
112
|
) })
|
|
115
113
|
] }),
|
|
116
114
|
/* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "remove" }) }),
|
|
117
115
|
/* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
-
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(a.expenses_due,
|
|
116
|
+
/* @__PURE__ */ e(L, { amount: W, variant: "H2" }),
|
|
117
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(a.expenses_due, u.length) })
|
|
120
118
|
] }),
|
|
121
119
|
/* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "equal" }) }),
|
|
122
120
|
/* @__PURE__ */ o(r, { pb: 14, pr: 24, pt: 12, children: [
|
|
123
|
-
/* @__PURE__ */ e(
|
|
121
|
+
/* @__PURE__ */ e(L, { amount: z, variant: "H2" }),
|
|
124
122
|
/* @__PURE__ */ o(r, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
125
123
|
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: a.available_to_spend }),
|
|
126
124
|
/* @__PURE__ */ e(he, { body: a.tooltip_body, title: a.tooltip_title })
|
|
127
125
|
] })
|
|
128
126
|
] }),
|
|
129
|
-
/* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children:
|
|
127
|
+
/* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: A ? /* @__PURE__ */ o(P, { children: [
|
|
130
128
|
/* @__PURE__ */ e(h, { variant: "H2", children: X(a.days, l) }),
|
|
131
129
|
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: a.next_paycheck })
|
|
132
130
|
] }) : /* @__PURE__ */ e(
|
|
@@ -144,16 +142,16 @@ const K = () => {
|
|
|
144
142
|
/* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
145
143
|
/* @__PURE__ */ e(h, { variant: "Small", children: X(
|
|
146
144
|
a.total_cash_accounts,
|
|
147
|
-
|
|
145
|
+
_.length
|
|
148
146
|
) }),
|
|
149
|
-
/* @__PURE__ */ e(
|
|
147
|
+
/* @__PURE__ */ e(L, { amount: f, bold: !0, variant: "XSmall" })
|
|
150
148
|
] }),
|
|
151
|
-
/* @__PURE__ */ e(
|
|
149
|
+
/* @__PURE__ */ e(D, {}),
|
|
152
150
|
/* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
153
|
-
/* @__PURE__ */ e(h, { variant: "Small", children: X(a.expenses_due,
|
|
154
|
-
/* @__PURE__ */ e(
|
|
151
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: X(a.expenses_due, u.length) }),
|
|
152
|
+
/* @__PURE__ */ e(L, { amount: W, bold: !0, symbol: "-", variant: "XSmall" })
|
|
155
153
|
] }),
|
|
156
|
-
/* @__PURE__ */ e(
|
|
154
|
+
/* @__PURE__ */ e(D, {}),
|
|
157
155
|
/* @__PURE__ */ e(
|
|
158
156
|
r,
|
|
159
157
|
{
|
|
@@ -168,8 +166,8 @@ const K = () => {
|
|
|
168
166
|
children: /* @__PURE__ */ e(pe, { remaining: z })
|
|
169
167
|
}
|
|
170
168
|
),
|
|
171
|
-
/* @__PURE__ */ e(
|
|
172
|
-
|
|
169
|
+
/* @__PURE__ */ e(D, {}),
|
|
170
|
+
A ? /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
173
171
|
/* @__PURE__ */ e(h, { variant: "Small", children: a.next_paycheck }),
|
|
174
172
|
/* @__PURE__ */ e(h, { bold: !0, variant: "XSmall", children: X(a.days, l) })
|
|
175
173
|
] }) : /* @__PURE__ */ o(
|
|
@@ -196,10 +194,10 @@ const K = () => {
|
|
|
196
194
|
}
|
|
197
195
|
)
|
|
198
196
|
] }) }) : /* @__PURE__ */ e(se, { height: s ? 210 : 120 });
|
|
199
|
-
}, bt =
|
|
200
|
-
const { cashflow: t } =
|
|
197
|
+
}, bt = T(gt), xt = ({ onPrimaryCtaClick: i, sx: n = {} }) => {
|
|
198
|
+
const { cashflow: t } = O(), { isCopyLoaded: s, isInitialized: c } = Y(), { loadRepeatingTransactions: f, setDateRange: d } = q();
|
|
201
199
|
return m.useEffect(() => {
|
|
202
|
-
c && (
|
|
200
|
+
c && (d({ start: M(), end: qe(M(), 1) }), f().finally());
|
|
203
201
|
}, [c]), s ? /* @__PURE__ */ e(
|
|
204
202
|
Qe,
|
|
205
203
|
{
|
|
@@ -212,7 +210,7 @@ const K = () => {
|
|
|
212
210
|
children: /* @__PURE__ */ e(bt, { onAddIncomeClick: i })
|
|
213
211
|
}
|
|
214
212
|
) : /* @__PURE__ */ e(se, {});
|
|
215
|
-
},
|
|
213
|
+
}, On = T(xt), Ct = ({ remaining: i }) => /* @__PURE__ */ e(
|
|
216
214
|
te,
|
|
217
215
|
{
|
|
218
216
|
sx: {
|
|
@@ -237,7 +235,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
237
235
|
] }),
|
|
238
236
|
/* @__PURE__ */ e(h, { sx: { flexGrow: 1, fontSize: 13 }, children: i.name }),
|
|
239
237
|
/* @__PURE__ */ e(
|
|
240
|
-
|
|
238
|
+
L,
|
|
241
239
|
{
|
|
242
240
|
amount: i.amount,
|
|
243
241
|
bold: !0,
|
|
@@ -245,9 +243,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
245
243
|
}
|
|
246
244
|
)
|
|
247
245
|
] }),
|
|
248
|
-
/* @__PURE__ */ e(
|
|
249
|
-
] }), Ee =
|
|
250
|
-
const { cashflow: t } =
|
|
246
|
+
/* @__PURE__ */ e(D, {})
|
|
247
|
+
] }), Ee = T(_t), wt = ({ total: i, type: n }) => {
|
|
248
|
+
const { cashflow: t } = O();
|
|
251
249
|
return /* @__PURE__ */ o(P, { children: [
|
|
252
250
|
/* @__PURE__ */ o(
|
|
253
251
|
Ze,
|
|
@@ -270,10 +268,10 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
270
268
|
]
|
|
271
269
|
}
|
|
272
270
|
),
|
|
273
|
-
/* @__PURE__ */ e(
|
|
271
|
+
/* @__PURE__ */ e(D, {})
|
|
274
272
|
] });
|
|
275
|
-
}, Te =
|
|
276
|
-
const { availableWidth: i } = re(), { cashflow: n } =
|
|
273
|
+
}, Te = T(wt), ie = (i, n) => (t) => t.accountGuid === i.guid && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), St = () => {
|
|
274
|
+
const { availableWidth: i } = re(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = q(), { dateRange: c, selectedCashAccounts: f } = K();
|
|
277
275
|
return /* @__PURE__ */ o(r, { children: [
|
|
278
276
|
/* @__PURE__ */ o(r, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
279
277
|
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
@@ -284,14 +282,14 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
284
282
|
Q(c.end, V.FULL_MONTH_DAY)
|
|
285
283
|
] })
|
|
286
284
|
] }),
|
|
287
|
-
/* @__PURE__ */ e(r, { children:
|
|
288
|
-
const
|
|
289
|
-
ie(
|
|
290
|
-
), a =
|
|
291
|
-
(l,
|
|
285
|
+
/* @__PURE__ */ e(r, { children: f.map((d) => {
|
|
286
|
+
const b = s.filter(ie(d, c)).sort((l, u) => U(l.expectedDate) - U(u.expectedDate)), C = t.filter(
|
|
287
|
+
ie(d, c)
|
|
288
|
+
), a = b.reduce(
|
|
289
|
+
(l, u) => l + u.amount,
|
|
292
290
|
0
|
|
293
|
-
),
|
|
294
|
-
(l,
|
|
291
|
+
), g = C.reduce(
|
|
292
|
+
(l, u) => l + u.amount,
|
|
295
293
|
0
|
|
296
294
|
);
|
|
297
295
|
return /* @__PURE__ */ o(
|
|
@@ -307,7 +305,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
307
305
|
/* @__PURE__ */ e(
|
|
308
306
|
Je,
|
|
309
307
|
{
|
|
310
|
-
account:
|
|
308
|
+
account: d,
|
|
311
309
|
listItemProps: {
|
|
312
310
|
disableGutters: !1,
|
|
313
311
|
disablePadding: !1,
|
|
@@ -315,43 +313,43 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
315
313
|
}
|
|
316
314
|
}
|
|
317
315
|
),
|
|
318
|
-
/* @__PURE__ */ e(
|
|
319
|
-
|
|
316
|
+
/* @__PURE__ */ e(D, {}),
|
|
317
|
+
b.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
320
318
|
ee,
|
|
321
319
|
{
|
|
322
320
|
subheader: /* @__PURE__ */ e(Te, { total: a, type: ne.INCOME }),
|
|
323
321
|
sx: { width: "100%" },
|
|
324
|
-
children:
|
|
322
|
+
children: b.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
|
|
325
323
|
}
|
|
326
324
|
) }),
|
|
327
|
-
|
|
325
|
+
C.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
328
326
|
ee,
|
|
329
327
|
{
|
|
330
|
-
subheader: /* @__PURE__ */ e(Te, { total:
|
|
328
|
+
subheader: /* @__PURE__ */ e(Te, { total: g, type: ne.EXPENSE }),
|
|
331
329
|
sx: { width: "100%" },
|
|
332
|
-
children:
|
|
330
|
+
children: C.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
|
|
333
331
|
}
|
|
334
332
|
) }),
|
|
335
333
|
/* @__PURE__ */ e(
|
|
336
334
|
Ct,
|
|
337
335
|
{
|
|
338
|
-
remaining: (
|
|
336
|
+
remaining: (d.available_balance || d.balance || 0) + a - g
|
|
339
337
|
}
|
|
340
338
|
)
|
|
341
339
|
]
|
|
342
340
|
},
|
|
343
|
-
|
|
341
|
+
d.guid
|
|
344
342
|
);
|
|
345
343
|
}) })
|
|
346
344
|
] });
|
|
347
|
-
}, yt =
|
|
348
|
-
const { availableWidth: i } = re(), n = ae(), { cashflow: t } =
|
|
345
|
+
}, yt = T(St), It = () => {
|
|
346
|
+
const { availableWidth: i } = re(), n = ae(), { cashflow: t } = O(), { upcomingExpenses: s, upcomingIncome: c } = q(), { dateRange: f, selectedCashAccounts: d } = K(), b = [
|
|
349
347
|
{
|
|
350
348
|
field: "account",
|
|
351
349
|
flex: 1.5,
|
|
352
350
|
headerName: t.accounts,
|
|
353
|
-
renderCell: ({ value: { name: a, nickname:
|
|
354
|
-
const
|
|
351
|
+
renderCell: ({ value: { name: a, nickname: g, institution_guid: l, account_number: u } }) => {
|
|
352
|
+
const _ = g || a;
|
|
355
353
|
return /* @__PURE__ */ o(r, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
356
354
|
/* @__PURE__ */ e(
|
|
357
355
|
xe,
|
|
@@ -361,7 +359,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
361
359
|
size: 16
|
|
362
360
|
}
|
|
363
361
|
),
|
|
364
|
-
`${
|
|
362
|
+
`${_} ${u ? `*${u}` : ""}`
|
|
365
363
|
] });
|
|
366
364
|
}
|
|
367
365
|
},
|
|
@@ -392,34 +390,34 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
392
390
|
headerName: t.remaining,
|
|
393
391
|
type: "number",
|
|
394
392
|
renderCell: (a) => {
|
|
395
|
-
const
|
|
393
|
+
const g = a.row.balance + a.row.income - a.row.expenses;
|
|
396
394
|
return /* @__PURE__ */ e(
|
|
397
395
|
h,
|
|
398
396
|
{
|
|
399
|
-
color: Math.sign(
|
|
397
|
+
color: Math.sign(g) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
400
398
|
variant: "Small",
|
|
401
|
-
children: Z(
|
|
399
|
+
children: Z(g, "0,0.00")
|
|
402
400
|
}
|
|
403
401
|
);
|
|
404
402
|
}
|
|
405
403
|
}
|
|
406
|
-
],
|
|
407
|
-
const
|
|
404
|
+
], C = m.useMemo(() => d.map((a) => {
|
|
405
|
+
const g = s.filter(
|
|
408
406
|
ie(a, { start: M(), end: _e(M(), 30) })
|
|
409
|
-
).reduce((
|
|
407
|
+
).reduce((_, w) => _ + w.amount, 0), l = c.filter(
|
|
410
408
|
ie(a, { start: M(), end: _e(M(), 30) })
|
|
411
|
-
).reduce((
|
|
409
|
+
).reduce((_, w) => _ + w.amount, 0), u = (a.balance || 0) + l - g;
|
|
412
410
|
return {
|
|
413
411
|
account: a,
|
|
414
412
|
balance: a.balance || 0,
|
|
415
413
|
id: a.guid,
|
|
416
414
|
income: l,
|
|
417
|
-
expenses:
|
|
418
|
-
remaining:
|
|
415
|
+
expenses: g,
|
|
416
|
+
remaining: u
|
|
419
417
|
};
|
|
420
|
-
}), [
|
|
418
|
+
}), [d, s, c]);
|
|
421
419
|
return /* @__PURE__ */ o(
|
|
422
|
-
|
|
420
|
+
I,
|
|
423
421
|
{
|
|
424
422
|
sx: {
|
|
425
423
|
width: "100%"
|
|
@@ -453,10 +451,10 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
453
451
|
)
|
|
454
452
|
] }),
|
|
455
453
|
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
456
|
-
Q(
|
|
454
|
+
Q(f.start, V.FULL_MONTH_DAY),
|
|
457
455
|
" -",
|
|
458
456
|
" ",
|
|
459
|
-
Q(
|
|
457
|
+
Q(f.end, V.FULL_MONTH_DAY)
|
|
460
458
|
] })
|
|
461
459
|
]
|
|
462
460
|
}
|
|
@@ -465,13 +463,13 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
465
463
|
nt,
|
|
466
464
|
{
|
|
467
465
|
columnHeaderHeight: 48,
|
|
468
|
-
columns:
|
|
466
|
+
columns: b,
|
|
469
467
|
density: "standard",
|
|
470
468
|
disableColumnMenu: !0,
|
|
471
469
|
disableRowSelectionOnClick: !0,
|
|
472
470
|
hideFooter: !0,
|
|
473
471
|
rowHeight: 48,
|
|
474
|
-
rows:
|
|
472
|
+
rows: C,
|
|
475
473
|
sx: {
|
|
476
474
|
border: "1px solid",
|
|
477
475
|
borderColor: "border.light",
|
|
@@ -487,8 +485,8 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
487
485
|
}
|
|
488
486
|
}
|
|
489
487
|
}
|
|
490
|
-
) :
|
|
491
|
-
const { name:
|
|
488
|
+
) : C.map((a) => {
|
|
489
|
+
const { name: g, nickname: l, institution_guid: u, account_number: _ } = a.account, w = l || g;
|
|
492
490
|
return /* @__PURE__ */ e(
|
|
493
491
|
ee,
|
|
494
492
|
{
|
|
@@ -513,17 +511,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
513
511
|
xe,
|
|
514
512
|
{
|
|
515
513
|
alt: t.institution_logo,
|
|
516
|
-
institutionGuid:
|
|
514
|
+
institutionGuid: u || "",
|
|
517
515
|
size: 16
|
|
518
516
|
}
|
|
519
517
|
),
|
|
520
|
-
/* @__PURE__ */ e(h, { variant: "Small", children: `${w} ${
|
|
518
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: `${w} ${_ ? `*${_}` : ""}` })
|
|
521
519
|
] }),
|
|
522
|
-
/* @__PURE__ */ e(
|
|
520
|
+
/* @__PURE__ */ e(L, { amount: a.balance, bold: !0, variant: "Small" })
|
|
523
521
|
]
|
|
524
522
|
}
|
|
525
523
|
),
|
|
526
|
-
/* @__PURE__ */ e(
|
|
524
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
527
525
|
/* @__PURE__ */ o(
|
|
528
526
|
r,
|
|
529
527
|
{
|
|
@@ -534,11 +532,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
534
532
|
py: 12,
|
|
535
533
|
children: [
|
|
536
534
|
/* @__PURE__ */ e(h, { variant: "Small", children: t.projected_income }),
|
|
537
|
-
/* @__PURE__ */ e(
|
|
535
|
+
/* @__PURE__ */ e(L, { amount: a.income, bold: !0, symbol: "+", variant: "Small" })
|
|
538
536
|
]
|
|
539
537
|
}
|
|
540
538
|
),
|
|
541
|
-
/* @__PURE__ */ e(
|
|
539
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
542
540
|
/* @__PURE__ */ o(
|
|
543
541
|
r,
|
|
544
542
|
{
|
|
@@ -549,11 +547,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
549
547
|
py: 12,
|
|
550
548
|
children: [
|
|
551
549
|
/* @__PURE__ */ e(h, { variant: "Small", children: t.projected_expenses }),
|
|
552
|
-
/* @__PURE__ */ e(
|
|
550
|
+
/* @__PURE__ */ e(L, { amount: a.expenses, bold: !0, symbol: "-", variant: "Small" })
|
|
553
551
|
]
|
|
554
552
|
}
|
|
555
553
|
),
|
|
556
|
-
/* @__PURE__ */ e(
|
|
554
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
557
555
|
/* @__PURE__ */ e(
|
|
558
556
|
r,
|
|
559
557
|
{
|
|
@@ -576,19 +574,19 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
576
574
|
]
|
|
577
575
|
}
|
|
578
576
|
);
|
|
579
|
-
}, Dt =
|
|
580
|
-
const { cashflow: i } =
|
|
581
|
-
c(
|
|
577
|
+
}, Dt = T(It), vt = () => {
|
|
578
|
+
const { cashflow: i } = O(), { isDesktop: n } = ue(), { onEvent: t } = Ne(), [s, c] = m.useState(0), f = (d, b) => {
|
|
579
|
+
c(b);
|
|
582
580
|
};
|
|
583
581
|
return m.useEffect(() => {
|
|
584
582
|
t(s === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
585
|
-
}, [s]), /* @__PURE__ */ o(
|
|
583
|
+
}, [s]), /* @__PURE__ */ o(I, { children: [
|
|
586
584
|
/* @__PURE__ */ o(
|
|
587
585
|
Ke,
|
|
588
586
|
{
|
|
589
587
|
"aria-label": i.cashflow_summary_and_details,
|
|
590
588
|
centered: !0,
|
|
591
|
-
onChange:
|
|
589
|
+
onChange: f,
|
|
592
590
|
textColor: "primary",
|
|
593
591
|
value: s,
|
|
594
592
|
variant: "fullWidth",
|
|
@@ -618,17 +616,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
618
616
|
]
|
|
619
617
|
}
|
|
620
618
|
),
|
|
621
|
-
/* @__PURE__ */ e(
|
|
622
|
-
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(
|
|
623
|
-
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(
|
|
619
|
+
/* @__PURE__ */ e(I, { sx: { mb: 32 } }),
|
|
620
|
+
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Dt, {}) }) }),
|
|
621
|
+
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: s, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(yt, {}) }) })
|
|
624
622
|
] });
|
|
625
|
-
}, At =
|
|
623
|
+
}, At = T(vt), oe = ({
|
|
626
624
|
amount: i,
|
|
627
625
|
isMobile: n = !1,
|
|
628
626
|
isTotal: t = !1,
|
|
629
627
|
label: s,
|
|
630
628
|
symbol: c,
|
|
631
|
-
tooltip:
|
|
629
|
+
tooltip: f
|
|
632
630
|
}) => /* @__PURE__ */ o(
|
|
633
631
|
r,
|
|
634
632
|
{
|
|
@@ -638,25 +636,25 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
638
636
|
padding: n ? "14px 16px" : 0,
|
|
639
637
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
640
638
|
children: [
|
|
641
|
-
!n && /* @__PURE__ */ e(
|
|
639
|
+
!n && /* @__PURE__ */ e(L, { amount: i, component: "h2", variant: "H2" }),
|
|
642
640
|
/* @__PURE__ */ o(r, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
643
641
|
/* @__PURE__ */ e(h, { bold: t, variant: "Small", children: s }),
|
|
644
|
-
|
|
642
|
+
f
|
|
645
643
|
] }),
|
|
646
|
-
n && /* @__PURE__ */ e(
|
|
644
|
+
n && /* @__PURE__ */ e(L, { amount: i, component: "h2", symbol: c, variant: "Small" })
|
|
647
645
|
]
|
|
648
646
|
}
|
|
649
647
|
), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end), Et = () => {
|
|
650
|
-
const { availableWidth: i } = re(), { cashflow: n } =
|
|
651
|
-
() => t.filter(Re(c,
|
|
652
|
-
[
|
|
648
|
+
const { availableWidth: i } = re(), { cashflow: n } = O(), { upcomingExpenses: t, upcomingIncome: s } = q(), { selectedAccountGuids: c } = Y(), { dateRange: f, selectedCashAccounts: d } = K(), { userProfile: b } = me(), [C, a] = m.useState(!1), g = m.useMemo(
|
|
649
|
+
() => t.filter(Re(c, f)),
|
|
650
|
+
[f, c, t]
|
|
653
651
|
), l = m.useMemo(
|
|
654
|
-
() => s.filter(Re(c,
|
|
655
|
-
[
|
|
656
|
-
),
|
|
657
|
-
() =>
|
|
658
|
-
[
|
|
659
|
-
),
|
|
652
|
+
() => s.filter(Re(c, f)),
|
|
653
|
+
[f, c, s]
|
|
654
|
+
), u = m.useMemo(
|
|
655
|
+
() => d.reduce((N, S) => N + (S?.balance || 0), 0),
|
|
656
|
+
[d]
|
|
657
|
+
), _ = g.reduce((N, S) => N + S.amount, 0), w = l.reduce((N, S) => N + S.amount, 0), v = u - _ + w, p = i < 725;
|
|
660
658
|
return /* @__PURE__ */ o(r, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
661
659
|
/* @__PURE__ */ o(
|
|
662
660
|
r,
|
|
@@ -671,13 +669,13 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
671
669
|
/* @__PURE__ */ e(
|
|
672
670
|
oe,
|
|
673
671
|
{
|
|
674
|
-
amount:
|
|
672
|
+
amount: u,
|
|
675
673
|
isMobile: p,
|
|
676
674
|
label: n.cash_and_bank
|
|
677
675
|
}
|
|
678
676
|
),
|
|
679
|
-
p && /* @__PURE__ */ e(
|
|
680
|
-
|
|
677
|
+
p && /* @__PURE__ */ e(D, {}),
|
|
678
|
+
b?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(P, { children: [
|
|
681
679
|
!p && /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
682
680
|
/* @__PURE__ */ e(
|
|
683
681
|
oe,
|
|
@@ -697,21 +695,21 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
697
695
|
children: n.add_income
|
|
698
696
|
}
|
|
699
697
|
),
|
|
700
|
-
p ? /* @__PURE__ */ e(
|
|
698
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
701
699
|
/* @__PURE__ */ e(
|
|
702
700
|
oe,
|
|
703
701
|
{
|
|
704
|
-
amount:
|
|
702
|
+
amount: _,
|
|
705
703
|
isMobile: p,
|
|
706
704
|
label: n.to_be_paid_out,
|
|
707
705
|
symbol: p ? "-" : void 0
|
|
708
706
|
}
|
|
709
707
|
),
|
|
710
|
-
p ? /* @__PURE__ */ e(
|
|
708
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
711
709
|
/* @__PURE__ */ e(
|
|
712
710
|
oe,
|
|
713
711
|
{
|
|
714
|
-
amount:
|
|
712
|
+
amount: v,
|
|
715
713
|
isMobile: p,
|
|
716
714
|
isTotal: p,
|
|
717
715
|
label: n.remaining_cash,
|
|
@@ -731,7 +729,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
731
729
|
$e,
|
|
732
730
|
{
|
|
733
731
|
ariaLabelClose: n.close_manage_income_aria,
|
|
734
|
-
isOpen:
|
|
732
|
+
isOpen: C,
|
|
735
733
|
onClose: () => a(!1),
|
|
736
734
|
shouldShowHeaderBorders: !1,
|
|
737
735
|
title: n.manage_income,
|
|
@@ -739,8 +737,8 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
739
737
|
}
|
|
740
738
|
)
|
|
741
739
|
] });
|
|
742
|
-
}, Tt =
|
|
743
|
-
const { completeOnboarding: n } = de(), { cashflow: t } =
|
|
740
|
+
}, Tt = T(Et), Rt = ({ handleNextStep: i }) => {
|
|
741
|
+
const { completeOnboarding: n } = de(), { cashflow: t } = O(), s = ae();
|
|
744
742
|
return /* @__PURE__ */ o(r, { children: [
|
|
745
743
|
/* @__PURE__ */ e(le, { pb: 12, children: t.welcome_title }),
|
|
746
744
|
/* @__PURE__ */ e(
|
|
@@ -757,7 +755,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
757
755
|
/* @__PURE__ */ o(r, { direction: "column", mb: 32, spacing: 32, children: [
|
|
758
756
|
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
759
757
|
/* @__PURE__ */ e(
|
|
760
|
-
|
|
758
|
+
I,
|
|
761
759
|
{
|
|
762
760
|
bgcolor: s.palette.primary.lighter,
|
|
763
761
|
borderRadius: 1,
|
|
@@ -773,7 +771,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
773
771
|
] }),
|
|
774
772
|
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
775
773
|
/* @__PURE__ */ e(
|
|
776
|
-
|
|
774
|
+
I,
|
|
777
775
|
{
|
|
778
776
|
bgcolor: s.palette.primary.lighter,
|
|
779
777
|
borderRadius: 1,
|
|
@@ -789,7 +787,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
789
787
|
] }),
|
|
790
788
|
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
791
789
|
/* @__PURE__ */ e(
|
|
792
|
-
|
|
790
|
+
I,
|
|
793
791
|
{
|
|
794
792
|
bgcolor: s.palette.primary.lighter,
|
|
795
793
|
borderRadius: 1,
|
|
@@ -809,17 +807,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
809
807
|
/* @__PURE__ */ e(H, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
810
808
|
] })
|
|
811
809
|
] });
|
|
812
|
-
},
|
|
813
|
-
CASHFLOW_ONBOARDING: `${
|
|
814
|
-
CASHFLOW_LOADING_ANIMATION: `${
|
|
815
|
-
},
|
|
816
|
-
const { cashflow: i } =
|
|
810
|
+
}, Lt = T(Rt), Le = "https://content.moneydesktop.com/storage/MD_Assets/md/cashflow", Ge = {
|
|
811
|
+
CASHFLOW_ONBOARDING: `${Le}/cashflow-onboarding.png`,
|
|
812
|
+
CASHFLOW_LOADING_ANIMATION: `${Le}/loading-animation.gif`
|
|
813
|
+
}, Ot = () => {
|
|
814
|
+
const { cashflow: i } = O();
|
|
817
815
|
return /* @__PURE__ */ o(m.Fragment, { children: [
|
|
818
816
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Ge.CASHFLOW_LOADING_ANIMATION }) }),
|
|
819
817
|
/* @__PURE__ */ e(le, { pb: 12, children: i.loading_title }),
|
|
820
818
|
/* @__PURE__ */ e(k, { children: i.loading_description })
|
|
821
819
|
] });
|
|
822
|
-
},
|
|
820
|
+
}, Nt = T(Ot), kt = tt`
|
|
823
821
|
from {
|
|
824
822
|
transform: rotate(0deg);
|
|
825
823
|
}
|
|
@@ -827,88 +825,88 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
827
825
|
transform: rotate(360deg);
|
|
828
826
|
}
|
|
829
827
|
`, Ht = () => {
|
|
830
|
-
const { addRepeatingTransaction: i, repeatingTransactions: n } = q(), { cashflow: t, common: s } =
|
|
831
|
-
() => l.find((
|
|
828
|
+
const { addRepeatingTransaction: i, repeatingTransactions: n } = q(), { cashflow: t, common: s } = O(), { completeOnboarding: c } = de(), { isDirty: f } = K(), { isMobile: d } = ue(), { isCopyLoaded: b, setDisplayedDate: C } = Y(), { filter: a, setFilter: g, transactions: l } = ke(), u = ae(), [_, w] = J(!0), [v, p] = m.useState(mt.EveryMonth), [N, S] = m.useState(1), [j, G] = m.useState(15), [W, z] = J(!1), [A, R] = J(1), [y, je] = J([]), [fe, ce] = J(""), $ = m.useMemo(
|
|
829
|
+
() => l.find((x) => x.guid === fe),
|
|
832
830
|
[fe, l]
|
|
833
831
|
), ze = !!n.filter(
|
|
834
|
-
(
|
|
832
|
+
(x) => x.repeating_transaction_type === Ie.Income
|
|
835
833
|
).length, ge = async () => {
|
|
836
|
-
|
|
834
|
+
R(2), C(
|
|
837
835
|
// Beginning of the month, 90 days before today
|
|
838
836
|
ct(Me(M(), 90)),
|
|
839
837
|
M()
|
|
840
|
-
),
|
|
838
|
+
), g({ ...a, custom: Se }), R(3);
|
|
841
839
|
}, Be = async () => {
|
|
842
|
-
if (!(
|
|
840
|
+
if (!(y.length < 1)) {
|
|
843
841
|
z(!0);
|
|
844
|
-
for (let
|
|
845
|
-
const
|
|
846
|
-
account_guid:
|
|
847
|
-
amount:
|
|
848
|
-
merchant_guid:
|
|
849
|
-
description:
|
|
842
|
+
for (let x = 0; x < y.length; x++) {
|
|
843
|
+
const E = y[x], be = De(v, ye(E.date)), Pe = {
|
|
844
|
+
account_guid: E.account_guid,
|
|
845
|
+
amount: E.amount,
|
|
846
|
+
merchant_guid: E.merchant_guid,
|
|
847
|
+
description: E.feed_description || E.description,
|
|
850
848
|
predicted_occurs_on: st(be, { representation: "date" }),
|
|
851
849
|
recurrence_day: be.getDay(),
|
|
852
|
-
recurrence_type:
|
|
850
|
+
recurrence_type: v,
|
|
853
851
|
repeating_transaction_type: Ie.Income,
|
|
854
|
-
transaction_type:
|
|
852
|
+
transaction_type: E.transaction_type
|
|
855
853
|
};
|
|
856
|
-
await i(Pe,
|
|
854
|
+
await i(Pe, E);
|
|
857
855
|
}
|
|
858
856
|
await c();
|
|
859
857
|
}
|
|
860
|
-
}, Ue = !$ &&
|
|
861
|
-
return
|
|
862
|
-
|
|
858
|
+
}, Ue = !$ && _ || !$ && y.length < 1;
|
|
859
|
+
return b ? /* @__PURE__ */ o(
|
|
860
|
+
I,
|
|
863
861
|
{
|
|
864
862
|
sx: {
|
|
865
863
|
display: "flex",
|
|
866
|
-
alignItems:
|
|
867
|
-
backgroundColor:
|
|
868
|
-
backgroundImage:
|
|
864
|
+
alignItems: d ? "flex-start" : "center",
|
|
865
|
+
backgroundColor: u.palette.background.paper,
|
|
866
|
+
backgroundImage: d ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
|
|
869
867
|
backgroundRepeat: "no-repeat",
|
|
870
868
|
backgroundPosition: "left 100px",
|
|
871
869
|
backgroundSize: "35%",
|
|
872
870
|
py: 24
|
|
873
871
|
},
|
|
874
872
|
children: [
|
|
875
|
-
|
|
876
|
-
|
|
873
|
+
A === 1 && /* @__PURE__ */ e(
|
|
874
|
+
I,
|
|
877
875
|
{
|
|
878
876
|
sx: {
|
|
879
|
-
...
|
|
877
|
+
...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
880
878
|
},
|
|
881
|
-
children: /* @__PURE__ */ e(
|
|
879
|
+
children: /* @__PURE__ */ e(Lt, { handleNextStep: ge })
|
|
882
880
|
}
|
|
883
881
|
),
|
|
884
|
-
|
|
885
|
-
|
|
882
|
+
A === 2 && /* @__PURE__ */ e(
|
|
883
|
+
I,
|
|
886
884
|
{
|
|
887
885
|
sx: {
|
|
888
|
-
...
|
|
886
|
+
...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
889
887
|
},
|
|
890
|
-
children: /* @__PURE__ */ e(
|
|
888
|
+
children: /* @__PURE__ */ e(Nt, {})
|
|
891
889
|
}
|
|
892
890
|
),
|
|
893
|
-
|
|
894
|
-
|
|
891
|
+
A === 3 && /* @__PURE__ */ o(
|
|
892
|
+
I,
|
|
895
893
|
{
|
|
896
894
|
sx: {
|
|
897
|
-
...
|
|
895
|
+
...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
898
896
|
},
|
|
899
897
|
children: [
|
|
900
898
|
/* @__PURE__ */ e(le, { pb: 12, children: t.add_income_title }),
|
|
901
899
|
/* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
|
|
902
|
-
|
|
903
|
-
/* @__PURE__ */ e(ee, { children:
|
|
900
|
+
y.length > 0 && !$ && /* @__PURE__ */ o(P, { children: [
|
|
901
|
+
/* @__PURE__ */ e(ee, { children: y.map((x, E) => /* @__PURE__ */ o(m.Fragment, { children: [
|
|
904
902
|
/* @__PURE__ */ e(lt, { bgcolor: "background.paper", children: ut(
|
|
905
|
-
U(
|
|
903
|
+
U(x.nextDate || x.date)
|
|
906
904
|
) }),
|
|
907
|
-
/* @__PURE__ */ e(dt, { transaction:
|
|
908
|
-
|
|
909
|
-
] },
|
|
905
|
+
/* @__PURE__ */ e(dt, { transaction: x }),
|
|
906
|
+
E !== y.length - 1 && /* @__PURE__ */ e(D, {})
|
|
907
|
+
] }, x.guid)) }),
|
|
910
908
|
/* @__PURE__ */ o(r, { alignItems: "center", direction: "row", children: [
|
|
911
|
-
/* @__PURE__ */ e(
|
|
909
|
+
/* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
|
|
912
910
|
/* @__PURE__ */ e(
|
|
913
911
|
H,
|
|
914
912
|
{
|
|
@@ -923,27 +921,27 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
923
921
|
it,
|
|
924
922
|
{
|
|
925
923
|
bgcolor: "background.paper",
|
|
926
|
-
onSearch: (
|
|
924
|
+
onSearch: (x) => g({
|
|
927
925
|
...a,
|
|
928
|
-
custom: (
|
|
926
|
+
custom: (E) => x ? at(E, x) : Se(E)
|
|
929
927
|
}),
|
|
930
|
-
onSelected: (
|
|
931
|
-
ce(
|
|
928
|
+
onSelected: (x) => {
|
|
929
|
+
ce(x), w(!1);
|
|
932
930
|
}
|
|
933
931
|
}
|
|
934
932
|
),
|
|
935
|
-
!ze &&
|
|
933
|
+
!ze && f && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
|
|
936
934
|
$ && /* @__PURE__ */ o(P, { children: [
|
|
937
935
|
/* @__PURE__ */ e(
|
|
938
936
|
rt,
|
|
939
937
|
{
|
|
940
938
|
bgcolor: "background.paper",
|
|
941
|
-
firstDay:
|
|
942
|
-
frequency:
|
|
939
|
+
firstDay: N,
|
|
940
|
+
frequency: v,
|
|
943
941
|
onFirstDayChange: S,
|
|
944
942
|
onFrequencyChange: p,
|
|
945
|
-
onSecondDayChange:
|
|
946
|
-
secondDay:
|
|
943
|
+
onSecondDayChange: G,
|
|
944
|
+
secondDay: j,
|
|
947
945
|
transaction: $
|
|
948
946
|
}
|
|
949
947
|
),
|
|
@@ -953,12 +951,12 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
953
951
|
{
|
|
954
952
|
"aria-disabled": !$,
|
|
955
953
|
onClick: () => {
|
|
956
|
-
const
|
|
957
|
-
|
|
954
|
+
const x = [...y];
|
|
955
|
+
x.push({
|
|
958
956
|
...$,
|
|
959
|
-
nextDate: De(
|
|
960
|
-
frequency:
|
|
961
|
-
}), je(
|
|
957
|
+
nextDate: De(v, ye($.date)),
|
|
958
|
+
frequency: v
|
|
959
|
+
}), je(x), ce("");
|
|
962
960
|
},
|
|
963
961
|
variant: "contained",
|
|
964
962
|
children: s.confirm_button
|
|
@@ -976,11 +974,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
976
974
|
)
|
|
977
975
|
] })
|
|
978
976
|
] }),
|
|
979
|
-
|
|
977
|
+
y.length > 0 && !$ && /* @__PURE__ */ o(r, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
980
978
|
/* @__PURE__ */ e(
|
|
981
979
|
H,
|
|
982
980
|
{
|
|
983
|
-
"aria-disabled":
|
|
981
|
+
"aria-disabled": y.length < 1 || W,
|
|
984
982
|
onClick: Be,
|
|
985
983
|
startIcon: W ? /* @__PURE__ */ e(
|
|
986
984
|
F,
|
|
@@ -1003,61 +1001,61 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
1003
1001
|
]
|
|
1004
1002
|
}
|
|
1005
1003
|
) : /* @__PURE__ */ e(se, {});
|
|
1006
|
-
}, Ft =
|
|
1004
|
+
}, Ft = T(Ht), Wt = ({ onBackClick: i, sx: n = {} }) => {
|
|
1007
1005
|
const {
|
|
1008
1006
|
selectedAccounts: t,
|
|
1009
1007
|
selectedAccountGuids: s,
|
|
1010
1008
|
setSelectedAccounts: c,
|
|
1011
|
-
shouldDisableNextDate:
|
|
1012
|
-
shouldDisablePrevDate:
|
|
1013
|
-
} = Y(), { onEvent:
|
|
1009
|
+
shouldDisableNextDate: f,
|
|
1010
|
+
shouldDisablePrevDate: d
|
|
1011
|
+
} = Y(), { onEvent: b } = Ne(), { visibleCashAccounts: C } = Oe(), { setFilter: a } = ke(), { userProfile: g } = me(), { dateRange: l, setSelectedCashAccounts: u } = K(), { loadRepeatingTransactions: _, setDateRange: w } = q(), { cashflow: v, recurring: p } = O(), { isCopyLoaded: N, isInitialized: S } = Y(), [j, G] = m.useState(!1);
|
|
1014
1012
|
return m.useEffect(() => {
|
|
1015
|
-
S && (w(l),
|
|
1013
|
+
S && (w(l), _().finally());
|
|
1016
1014
|
}, [S]), m.useEffect(() => {
|
|
1017
|
-
c(
|
|
1018
|
-
}, [
|
|
1019
|
-
const W =
|
|
1020
|
-
(
|
|
1015
|
+
c(C);
|
|
1016
|
+
}, [C]), m.useEffect(() => {
|
|
1017
|
+
const W = C.map((A) => A.guid), z = t.filter(
|
|
1018
|
+
(A) => s.includes(A.guid) && W.includes(A.guid)
|
|
1021
1019
|
);
|
|
1022
|
-
|
|
1020
|
+
u(z), a({
|
|
1023
1021
|
dateRange: { start: Me(M(), 90), end: ht() },
|
|
1024
|
-
accounts: z.map((
|
|
1022
|
+
accounts: z.map((A) => A.guid)
|
|
1025
1023
|
});
|
|
1026
|
-
}, [
|
|
1024
|
+
}, [C, t]), !N || !S ? /* @__PURE__ */ e(se, {}) : g?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
|
|
1027
1025
|
ve,
|
|
1028
1026
|
{
|
|
1029
|
-
accountOptions:
|
|
1027
|
+
accountOptions: C,
|
|
1030
1028
|
actions: [
|
|
1031
1029
|
{
|
|
1032
1030
|
label: p.action_title,
|
|
1033
1031
|
iconName: "credit_card",
|
|
1034
1032
|
onClick: () => {
|
|
1035
|
-
|
|
1033
|
+
G(!0), b(Ae.CASH_FLOW_CLICK_SETTINGS);
|
|
1036
1034
|
}
|
|
1037
1035
|
}
|
|
1038
1036
|
],
|
|
1039
1037
|
calendarActions: {
|
|
1040
|
-
shouldDisableNext:
|
|
1041
|
-
shouldDisablePrevious:
|
|
1038
|
+
shouldDisableNext: f,
|
|
1039
|
+
shouldDisablePrevious: d,
|
|
1042
1040
|
shouldDisablePicker: !0,
|
|
1043
1041
|
onRangeChanged: () => {
|
|
1044
1042
|
}
|
|
1045
1043
|
},
|
|
1046
1044
|
dateRange: l,
|
|
1047
1045
|
dateRangeVariant: "readonly",
|
|
1048
|
-
onAccountsFilterClick: () =>
|
|
1046
|
+
onAccountsFilterClick: () => b(Ae.CASH_FLOW_CLICK_FILTER),
|
|
1049
1047
|
onBackClick: i,
|
|
1050
1048
|
sx: n,
|
|
1051
|
-
title:
|
|
1049
|
+
title: v.title,
|
|
1052
1050
|
children: [
|
|
1053
1051
|
/* @__PURE__ */ e(Tt, {}),
|
|
1054
1052
|
/* @__PURE__ */ e(At, {}),
|
|
1055
1053
|
/* @__PURE__ */ e(
|
|
1056
1054
|
$e,
|
|
1057
1055
|
{
|
|
1058
|
-
ariaLabelClose:
|
|
1059
|
-
isOpen:
|
|
1060
|
-
onClose: () =>
|
|
1056
|
+
ariaLabelClose: v.close_settings_aria,
|
|
1057
|
+
isOpen: j,
|
|
1058
|
+
onClose: () => G(!1),
|
|
1061
1059
|
shouldShowHeaderBorders: !1,
|
|
1062
1060
|
title: p.action_title,
|
|
1063
1061
|
children: /* @__PURE__ */ e(Ve, {})
|
|
@@ -1070,11 +1068,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
|
1070
1068
|
{
|
|
1071
1069
|
onBackClick: i,
|
|
1072
1070
|
sx: { height: "100%", overflow: "auto" },
|
|
1073
|
-
title:
|
|
1071
|
+
title: v.title,
|
|
1074
1072
|
children: /* @__PURE__ */ e(Ft, {})
|
|
1075
1073
|
}
|
|
1076
1074
|
);
|
|
1077
|
-
},
|
|
1075
|
+
}, Nn = T(Wt);
|
|
1078
1076
|
class kn {
|
|
1079
1077
|
fetchInstance;
|
|
1080
1078
|
constructor(n, t) {
|
|
@@ -1096,8 +1094,8 @@ class kn {
|
|
|
1096
1094
|
}
|
|
1097
1095
|
export {
|
|
1098
1096
|
kn as CashflowApi,
|
|
1099
|
-
|
|
1097
|
+
On as CashflowMiniWidget,
|
|
1100
1098
|
Ft as CashflowOnboarding,
|
|
1101
1099
|
Wn as CashflowStore,
|
|
1102
|
-
|
|
1100
|
+
Nn as CashflowWidget
|
|
1103
1101
|
};
|