@mx-cartographer/experiences 7.0.8-alpha.al0 → 7.0.8-alpha.ram1
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-CgBfJL2o.mjs} +3 -3
- package/dist/{AccountDetailsHeader-DnEyQMpX.mjs → AccountDetailsHeader-BCuCcRKN.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-Dyzb3UDU.mjs → CategorySelectorDrawer-B2Ama3PC.mjs} +1 -1
- package/dist/{Help-BazrEpv7.mjs → Help-BC-NhEUH.mjs} +1 -1
- package/dist/Loader-DvzdIyKh.mjs +24 -0
- package/dist/{ManageIncome-CzTV55Bh.mjs → ManageIncome-JwQuuj2s.mjs} +2 -2
- package/dist/{NotificationSettings-BznqGVQ2.mjs → NotificationSettings-DeWu4OZX.mjs} +1 -1
- package/dist/{RecurringSettings-BQDQvmSY.mjs → RecurringSettings-BCc_FKvR.mjs} +2 -2
- package/dist/{TransactionDetails-BSfXqkpH.mjs → TransactionDetails-OvVzcuFq.mjs} +3 -3
- package/dist/{ViewMoreMicroCard-BZI5VMNW.mjs → ViewMoreMicroCard-z_S5b60J.mjs} +1 -1
- package/dist/{WidgetContainer-BG-fdDOf.mjs → WidgetContainer-DddBEZY1.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 +355 -355
- 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,32 +1,32 @@
|
|
|
1
|
-
import { jsxs as o, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { observer as
|
|
1
|
+
import { jsxs as o, Fragment as P, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import m, { useState as J } from "react";
|
|
3
|
+
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { addMonths as qe } from "date-fns/addMonths";
|
|
5
|
-
import { startOfToday as
|
|
6
|
-
import
|
|
5
|
+
import { startOfToday as M } from "date-fns/startOfToday";
|
|
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
|
-
import
|
|
11
|
-
import { Text as
|
|
12
|
-
import { G as Ye, t as
|
|
13
|
-
import { C as
|
|
14
|
-
import { u as
|
|
15
|
-
import { L as
|
|
16
|
-
import { I as
|
|
10
|
+
import ae from "@mui/material/styles/useTheme";
|
|
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 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
|
+
import { u as ue } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
15
|
+
import { L as se } from "../Loader-DvzdIyKh.mjs";
|
|
16
|
+
import { I as he } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
17
17
|
import { C as Wn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
18
|
-
import { b as
|
|
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-BCc_FKvR.mjs";
|
|
21
21
|
import Ke from "@mui/material/Tabs";
|
|
22
22
|
import Ce from "@mui/material/Tab";
|
|
23
|
-
import { getUnixTime as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
23
|
+
import { getUnixTime as U } from "date-fns/getUnixTime";
|
|
24
|
+
import ee from "@mui/material/List";
|
|
25
|
+
import te from "@mui/material/ListItem";
|
|
26
26
|
import { A as Je } from "../AccountListItem-CR6I3Hl8.mjs";
|
|
27
|
-
import { f as
|
|
27
|
+
import { f as Q, D as V } from "../Dialog-CWW597AF.mjs";
|
|
28
28
|
import Ze from "@mui/material/ListSubheader";
|
|
29
|
-
import { f as
|
|
29
|
+
import { f as Z } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
30
30
|
import { isAfter as He } from "date-fns/isAfter";
|
|
31
31
|
import { isBefore as Fe } from "date-fns/isBefore";
|
|
32
32
|
import { isToday as We } from "date-fns/isToday";
|
|
@@ -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-JwQuuj2s.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-OvVzcuFq.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
|
|
48
|
-
import { F as pt, A as
|
|
49
|
-
const
|
|
50
|
-
if (!
|
|
47
|
+
import { W as ve, A as Ae } from "../WidgetContainer-DddBEZY1.mjs";
|
|
48
|
+
import { F as pt, A as B } from "../Fetch-CkFKy79O.mjs";
|
|
49
|
+
const K = () => {
|
|
50
|
+
if (!m.useContext(Ye))
|
|
51
51
|
throw new Error("useCashflowUiStore() must be used within the GlobalDataContext");
|
|
52
|
-
return
|
|
52
|
+
return de().uiStore;
|
|
53
53
|
}, ft = ({ remaining: i }) => {
|
|
54
|
-
const { cashflow: n } =
|
|
55
|
-
return /* @__PURE__ */ o(
|
|
54
|
+
const { cashflow: n } = O();
|
|
55
|
+
return /* @__PURE__ */ o(P, { children: [
|
|
56
56
|
/* @__PURE__ */ e(
|
|
57
|
-
|
|
57
|
+
I,
|
|
58
58
|
{
|
|
59
59
|
sx: {
|
|
60
60
|
borderRadius: "1px",
|
|
@@ -64,38 +64,38 @@ const V = () => {
|
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
68
|
-
/* @__PURE__ */ e(
|
|
67
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { flexGrow: 1, fontSize: 12 }, children: n.remaining_cash }),
|
|
68
|
+
/* @__PURE__ */ e(L, { amount: i, bold: !0, sx: { fontSize: 12 } })
|
|
69
69
|
] });
|
|
70
|
-
},
|
|
71
|
-
const n =
|
|
72
|
-
daysUntilNextIncome:
|
|
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
|
+
daysUntilNextIncome: l,
|
|
73
73
|
expensesTilNextIncome: u,
|
|
74
|
-
selectedCashAccounts:
|
|
75
|
-
setNextIncome:
|
|
76
|
-
setSelectedCashAccounts:
|
|
77
|
-
setUpcomingExpenses:
|
|
78
|
-
} =
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
selectedCashAccounts: _,
|
|
75
|
+
setNextIncome: w,
|
|
76
|
+
setSelectedCashAccounts: v,
|
|
77
|
+
setUpcomingExpenses: p
|
|
78
|
+
} = K(), { isDataLoaded: N, nextIncomeRecurrence: S, upcomingExpenses: j } = q();
|
|
79
|
+
m.useEffect(() => {
|
|
80
|
+
C(c);
|
|
81
|
+
}, [c]), m.useEffect(() => {
|
|
82
|
+
v(
|
|
83
|
+
c.filter((R) => b.includes(R.guid))
|
|
82
84
|
);
|
|
83
|
-
}, [
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
), j = C?.has_completed_cash_flow_onboarding && !!i;
|
|
98
|
-
return A ? /* @__PURE__ */ e(v, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 610 ? /* @__PURE__ */ o(
|
|
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]
|
|
91
|
+
), W = m.useMemo(
|
|
92
|
+
() => u.filter((R) => b.includes(R.accountGuid || "")).reduce((R, y) => R + y.amount, 0),
|
|
93
|
+
[b, u]
|
|
94
|
+
), z = m.useMemo(
|
|
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(
|
|
99
99
|
r,
|
|
100
100
|
{
|
|
101
101
|
border: `1px solid ${n.palette.border.light}`,
|
|
@@ -105,53 +105,53 @@ const V = () => {
|
|
|
105
105
|
px: 24,
|
|
106
106
|
children: [
|
|
107
107
|
/* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
/* @__PURE__ */ e(
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
/* @__PURE__ */ e(L, { amount: G, variant: "H2" }),
|
|
109
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(
|
|
110
|
+
a.total_cash_accounts,
|
|
111
|
+
_.length
|
|
112
112
|
) })
|
|
113
113
|
] }),
|
|
114
114
|
/* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "remove" }) }),
|
|
115
115
|
/* @__PURE__ */ o(r, { pb: 14, pt: 12, children: [
|
|
116
|
-
/* @__PURE__ */ e(
|
|
117
|
-
/* @__PURE__ */ e(
|
|
116
|
+
/* @__PURE__ */ e(L, { amount: W, variant: "H2" }),
|
|
117
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: X(a.expenses_due, u.length) })
|
|
118
118
|
] }),
|
|
119
119
|
/* @__PURE__ */ e(r, { pt: 18, children: /* @__PURE__ */ e(F, { name: "equal" }) }),
|
|
120
120
|
/* @__PURE__ */ o(r, { pb: 14, pr: 24, pt: 12, children: [
|
|
121
|
-
/* @__PURE__ */ e(
|
|
121
|
+
/* @__PURE__ */ e(L, { amount: z, variant: "H2" }),
|
|
122
122
|
/* @__PURE__ */ o(r, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
123
|
-
/* @__PURE__ */ e(
|
|
124
|
-
/* @__PURE__ */ e(
|
|
123
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: a.available_to_spend }),
|
|
124
|
+
/* @__PURE__ */ e(he, { body: a.tooltip_body, title: a.tooltip_title })
|
|
125
125
|
] })
|
|
126
126
|
] }),
|
|
127
|
-
/* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children:
|
|
128
|
-
/* @__PURE__ */ e(
|
|
129
|
-
/* @__PURE__ */ e(
|
|
127
|
+
/* @__PURE__ */ e(r, { borderLeft: `1px solid ${n.palette.border.light}`, pb: 12, pl: 24, pt: 12, children: A ? /* @__PURE__ */ o(P, { children: [
|
|
128
|
+
/* @__PURE__ */ e(h, { variant: "H2", children: X(a.days, l) }),
|
|
129
|
+
/* @__PURE__ */ e(k, { variant: "XSmall", whiteSpace: "nowrap", children: a.next_paycheck })
|
|
130
130
|
] }) : /* @__PURE__ */ e(
|
|
131
131
|
H,
|
|
132
132
|
{
|
|
133
133
|
onClick: i,
|
|
134
134
|
startIcon: /* @__PURE__ */ e(F, { name: "add" }),
|
|
135
135
|
sx: { fontSize: 13, lineHeight: "initial" },
|
|
136
|
-
children:
|
|
136
|
+
children: a.add_income
|
|
137
137
|
}
|
|
138
138
|
) })
|
|
139
139
|
]
|
|
140
140
|
}
|
|
141
141
|
) : /* @__PURE__ */ o(r, { border: `1px solid ${n.palette.border.light}`, borderRadius: 1, children: [
|
|
142
142
|
/* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
143
|
-
/* @__PURE__ */ e(
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: X(
|
|
144
|
+
a.total_cash_accounts,
|
|
145
|
+
_.length
|
|
146
146
|
) }),
|
|
147
|
-
/* @__PURE__ */ e(
|
|
147
|
+
/* @__PURE__ */ e(L, { amount: f, bold: !0, variant: "XSmall" })
|
|
148
148
|
] }),
|
|
149
|
-
/* @__PURE__ */ e(
|
|
149
|
+
/* @__PURE__ */ e(D, {}),
|
|
150
150
|
/* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
151
|
-
/* @__PURE__ */ e(
|
|
152
|
-
/* @__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" })
|
|
153
153
|
] }),
|
|
154
|
-
/* @__PURE__ */ e(
|
|
154
|
+
/* @__PURE__ */ e(D, {}),
|
|
155
155
|
/* @__PURE__ */ e(
|
|
156
156
|
r,
|
|
157
157
|
{
|
|
@@ -163,13 +163,13 @@ const V = () => {
|
|
|
163
163
|
justifyContent: "space-between",
|
|
164
164
|
px: 16,
|
|
165
165
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
166
|
-
children: /* @__PURE__ */ e(
|
|
166
|
+
children: /* @__PURE__ */ e(pe, { remaining: z })
|
|
167
167
|
}
|
|
168
168
|
),
|
|
169
|
-
/* @__PURE__ */ e(
|
|
170
|
-
|
|
171
|
-
/* @__PURE__ */ e(
|
|
172
|
-
/* @__PURE__ */ e(
|
|
169
|
+
/* @__PURE__ */ e(D, {}),
|
|
170
|
+
A ? /* @__PURE__ */ o(r, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
171
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: a.next_paycheck }),
|
|
172
|
+
/* @__PURE__ */ e(h, { bold: !0, variant: "XSmall", children: X(a.days, l) })
|
|
173
173
|
] }) : /* @__PURE__ */ o(
|
|
174
174
|
r,
|
|
175
175
|
{
|
|
@@ -180,25 +180,25 @@ const V = () => {
|
|
|
180
180
|
pr: 2,
|
|
181
181
|
py: 2,
|
|
182
182
|
children: [
|
|
183
|
-
/* @__PURE__ */ e(
|
|
183
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: a.next_paycheck }),
|
|
184
184
|
/* @__PURE__ */ e(
|
|
185
185
|
H,
|
|
186
186
|
{
|
|
187
187
|
onClick: i,
|
|
188
188
|
startIcon: /* @__PURE__ */ e(F, { name: "add" }),
|
|
189
189
|
sx: { fontSize: 13 },
|
|
190
|
-
children:
|
|
190
|
+
children: a.add_income
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
]
|
|
194
194
|
}
|
|
195
195
|
)
|
|
196
|
-
] }) }) : /* @__PURE__ */ e(
|
|
197
|
-
}, bt =
|
|
198
|
-
const { cashflow: t } =
|
|
199
|
-
return
|
|
200
|
-
|
|
201
|
-
}, [
|
|
196
|
+
] }) }) : /* @__PURE__ */ e(se, { height: s ? 210 : 120 });
|
|
197
|
+
}, bt = T(gt), xt = ({ onPrimaryCtaClick: i, sx: n = {} }) => {
|
|
198
|
+
const { cashflow: t } = O(), { isCopyLoaded: s, isInitialized: c } = Y(), { loadRepeatingTransactions: f, setDateRange: d } = q();
|
|
199
|
+
return m.useEffect(() => {
|
|
200
|
+
c && (d({ start: M(), end: qe(M(), 1) }), f().finally());
|
|
201
|
+
}, [c]), s ? /* @__PURE__ */ e(
|
|
202
202
|
Qe,
|
|
203
203
|
{
|
|
204
204
|
className: "mx-exp-cashflow-miniwidget",
|
|
@@ -209,9 +209,9 @@ const V = () => {
|
|
|
209
209
|
title: t.title,
|
|
210
210
|
children: /* @__PURE__ */ e(bt, { onAddIncomeClick: i })
|
|
211
211
|
}
|
|
212
|
-
) : /* @__PURE__ */ e(
|
|
213
|
-
},
|
|
214
|
-
|
|
212
|
+
) : /* @__PURE__ */ e(se, {});
|
|
213
|
+
}, On = T(xt), Ct = ({ remaining: i }) => /* @__PURE__ */ e(
|
|
214
|
+
te,
|
|
215
215
|
{
|
|
216
216
|
sx: {
|
|
217
217
|
alignItems: "center",
|
|
@@ -223,19 +223,19 @@ const V = () => {
|
|
|
223
223
|
borderBottomRightRadius: "3px",
|
|
224
224
|
minHeight: "auto"
|
|
225
225
|
},
|
|
226
|
-
children: /* @__PURE__ */ e(
|
|
226
|
+
children: /* @__PURE__ */ e(pe, { remaining: i })
|
|
227
227
|
}
|
|
228
228
|
);
|
|
229
|
-
var
|
|
230
|
-
const _t = ({ recurrence: i }) => /* @__PURE__ */ o(
|
|
231
|
-
/* @__PURE__ */ o(
|
|
229
|
+
var ne = /* @__PURE__ */ ((i) => (i.EXPENSE = "expense", i.INCOME = "income", i))(ne || {});
|
|
230
|
+
const _t = ({ recurrence: i }) => /* @__PURE__ */ o(P, { children: [
|
|
231
|
+
/* @__PURE__ */ o(te, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
232
232
|
/* @__PURE__ */ o(r, { alignItems: "center", height: 32, width: 32, children: [
|
|
233
|
-
/* @__PURE__ */ e(
|
|
234
|
-
/* @__PURE__ */ e(
|
|
233
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: Q(i.expectedDate, V.MONTH) }),
|
|
234
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 11 }, children: Q(i.expectedDate, V.DAY) })
|
|
235
235
|
] }),
|
|
236
|
-
/* @__PURE__ */ e(
|
|
236
|
+
/* @__PURE__ */ e(h, { sx: { flexGrow: 1, fontSize: 13 }, children: i.name }),
|
|
237
237
|
/* @__PURE__ */ e(
|
|
238
|
-
|
|
238
|
+
L,
|
|
239
239
|
{
|
|
240
240
|
amount: i.amount,
|
|
241
241
|
bold: !0,
|
|
@@ -243,10 +243,10 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
243
243
|
}
|
|
244
244
|
)
|
|
245
245
|
] }),
|
|
246
|
-
/* @__PURE__ */ e(
|
|
247
|
-
] }),
|
|
248
|
-
const { cashflow: t } =
|
|
249
|
-
return /* @__PURE__ */ o(
|
|
246
|
+
/* @__PURE__ */ e(D, {})
|
|
247
|
+
] }), Ee = T(_t), wt = ({ total: i, type: n }) => {
|
|
248
|
+
const { cashflow: t } = O();
|
|
249
|
+
return /* @__PURE__ */ o(P, { children: [
|
|
250
250
|
/* @__PURE__ */ o(
|
|
251
251
|
Ze,
|
|
252
252
|
{
|
|
@@ -260,40 +260,40 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
260
260
|
px: 24
|
|
261
261
|
},
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */ e(
|
|
264
|
-
/* @__PURE__ */ o(
|
|
265
|
-
n ===
|
|
266
|
-
|
|
263
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 12 }, children: n === ne.EXPENSE ? t.expenses : t.income }),
|
|
264
|
+
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
265
|
+
n === ne.EXPENSE ? "-" : "+",
|
|
266
|
+
Z(i, "0,0.00")
|
|
267
267
|
] })
|
|
268
268
|
]
|
|
269
269
|
}
|
|
270
270
|
),
|
|
271
|
-
/* @__PURE__ */ e(
|
|
271
|
+
/* @__PURE__ */ e(D, {})
|
|
272
272
|
] });
|
|
273
|
-
}, Te =
|
|
274
|
-
const { availableWidth: i } =
|
|
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();
|
|
275
275
|
return /* @__PURE__ */ o(r, { children: [
|
|
276
276
|
/* @__PURE__ */ o(r, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
277
|
-
/* @__PURE__ */ e(
|
|
278
|
-
/* @__PURE__ */ o(
|
|
279
|
-
|
|
277
|
+
/* @__PURE__ */ e(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
278
|
+
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: [
|
|
279
|
+
Q(c.start, V.FULL_MONTH_DAY),
|
|
280
280
|
" -",
|
|
281
281
|
" ",
|
|
282
|
-
|
|
282
|
+
Q(c.end, V.FULL_MONTH_DAY)
|
|
283
283
|
] })
|
|
284
284
|
] }),
|
|
285
|
-
/* @__PURE__ */ e(r, { children:
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
), a =
|
|
289
|
-
(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,
|
|
290
290
|
0
|
|
291
|
-
),
|
|
292
|
-
(l,
|
|
291
|
+
), g = C.reduce(
|
|
292
|
+
(l, u) => l + u.amount,
|
|
293
293
|
0
|
|
294
294
|
);
|
|
295
295
|
return /* @__PURE__ */ o(
|
|
296
|
-
|
|
296
|
+
ee,
|
|
297
297
|
{
|
|
298
298
|
sx: {
|
|
299
299
|
border: "1px solid",
|
|
@@ -305,7 +305,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
305
305
|
/* @__PURE__ */ e(
|
|
306
306
|
Je,
|
|
307
307
|
{
|
|
308
|
-
account:
|
|
308
|
+
account: d,
|
|
309
309
|
listItemProps: {
|
|
310
310
|
disableGutters: !1,
|
|
311
311
|
disablePadding: !1,
|
|
@@ -313,43 +313,43 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
),
|
|
316
|
-
/* @__PURE__ */ e(
|
|
317
|
-
|
|
318
|
-
|
|
316
|
+
/* @__PURE__ */ e(D, {}),
|
|
317
|
+
b.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
318
|
+
ee,
|
|
319
319
|
{
|
|
320
|
-
subheader: /* @__PURE__ */ e(Te, { total: a, type:
|
|
320
|
+
subheader: /* @__PURE__ */ e(Te, { total: a, type: ne.INCOME }),
|
|
321
321
|
sx: { width: "100%" },
|
|
322
|
-
children:
|
|
322
|
+
children: b.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
|
|
323
323
|
}
|
|
324
324
|
) }),
|
|
325
|
-
C.length > 0 && /* @__PURE__ */ e(
|
|
326
|
-
|
|
325
|
+
C.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
326
|
+
ee,
|
|
327
327
|
{
|
|
328
|
-
subheader: /* @__PURE__ */ e(Te, { total:
|
|
328
|
+
subheader: /* @__PURE__ */ e(Te, { total: g, type: ne.EXPENSE }),
|
|
329
329
|
sx: { width: "100%" },
|
|
330
|
-
children: C.map((l) => /* @__PURE__ */ e(
|
|
330
|
+
children: C.map((l) => /* @__PURE__ */ e(Ee, { recurrence: l }, l.repeatingTransactionGuid))
|
|
331
331
|
}
|
|
332
332
|
) }),
|
|
333
333
|
/* @__PURE__ */ e(
|
|
334
334
|
Ct,
|
|
335
335
|
{
|
|
336
|
-
remaining: (
|
|
336
|
+
remaining: (d.available_balance || d.balance || 0) + a - g
|
|
337
337
|
}
|
|
338
338
|
)
|
|
339
339
|
]
|
|
340
340
|
},
|
|
341
|
-
|
|
341
|
+
d.guid
|
|
342
342
|
);
|
|
343
343
|
}) })
|
|
344
344
|
] });
|
|
345
|
-
}, yt =
|
|
346
|
-
const { availableWidth: i } =
|
|
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 = [
|
|
347
347
|
{
|
|
348
348
|
field: "account",
|
|
349
349
|
flex: 1.5,
|
|
350
350
|
headerName: t.accounts,
|
|
351
|
-
renderCell: ({ value: { name: a, nickname:
|
|
352
|
-
const
|
|
351
|
+
renderCell: ({ value: { name: a, nickname: g, institution_guid: l, account_number: u } }) => {
|
|
352
|
+
const _ = g || a;
|
|
353
353
|
return /* @__PURE__ */ o(r, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
354
354
|
/* @__PURE__ */ e(
|
|
355
355
|
xe,
|
|
@@ -359,7 +359,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
359
359
|
size: 16
|
|
360
360
|
}
|
|
361
361
|
),
|
|
362
|
-
`${
|
|
362
|
+
`${_} ${u ? `*${u}` : ""}`
|
|
363
363
|
] });
|
|
364
364
|
}
|
|
365
365
|
},
|
|
@@ -368,21 +368,21 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
368
368
|
flex: 1,
|
|
369
369
|
headerName: t.balance,
|
|
370
370
|
type: "number",
|
|
371
|
-
renderCell: (a) =>
|
|
371
|
+
renderCell: (a) => Z(a.value, "0,0.00")
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
field: "income",
|
|
375
375
|
flex: 1,
|
|
376
376
|
headerName: t.projected_income,
|
|
377
377
|
type: "number",
|
|
378
|
-
renderCell: (a) => `+${
|
|
378
|
+
renderCell: (a) => `+${Z(a.value, "0,0.00")}`
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
field: "expenses",
|
|
382
382
|
flex: 1.1,
|
|
383
383
|
headerName: t.projected_expenses,
|
|
384
384
|
type: "number",
|
|
385
|
-
renderCell: (a) => `-${
|
|
385
|
+
renderCell: (a) => `-${Z(a.value, "0,0.00")}`
|
|
386
386
|
},
|
|
387
387
|
{
|
|
388
388
|
field: "remaining",
|
|
@@ -390,34 +390,34 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
390
390
|
headerName: t.remaining,
|
|
391
391
|
type: "number",
|
|
392
392
|
renderCell: (a) => {
|
|
393
|
-
const
|
|
393
|
+
const g = a.row.balance + a.row.income - a.row.expenses;
|
|
394
394
|
return /* @__PURE__ */ e(
|
|
395
|
-
|
|
395
|
+
h,
|
|
396
396
|
{
|
|
397
|
-
color: Math.sign(
|
|
397
|
+
color: Math.sign(g) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
398
398
|
variant: "Small",
|
|
399
|
-
children:
|
|
399
|
+
children: Z(g, "0,0.00")
|
|
400
400
|
}
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
], C =
|
|
405
|
-
const
|
|
406
|
-
|
|
407
|
-
).reduce((
|
|
408
|
-
|
|
409
|
-
).reduce((
|
|
404
|
+
], C = m.useMemo(() => d.map((a) => {
|
|
405
|
+
const g = s.filter(
|
|
406
|
+
ie(a, { start: M(), end: _e(M(), 30) })
|
|
407
|
+
).reduce((_, w) => _ + w.amount, 0), l = c.filter(
|
|
408
|
+
ie(a, { start: M(), end: _e(M(), 30) })
|
|
409
|
+
).reduce((_, w) => _ + w.amount, 0), u = (a.balance || 0) + l - g;
|
|
410
410
|
return {
|
|
411
411
|
account: a,
|
|
412
412
|
balance: a.balance || 0,
|
|
413
413
|
id: a.guid,
|
|
414
414
|
income: l,
|
|
415
|
-
expenses:
|
|
416
|
-
remaining:
|
|
415
|
+
expenses: g,
|
|
416
|
+
remaining: u
|
|
417
417
|
};
|
|
418
|
-
}), [
|
|
418
|
+
}), [d, s, c]);
|
|
419
419
|
return /* @__PURE__ */ o(
|
|
420
|
-
|
|
420
|
+
I,
|
|
421
421
|
{
|
|
422
422
|
sx: {
|
|
423
423
|
width: "100%"
|
|
@@ -432,7 +432,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
432
432
|
children: [
|
|
433
433
|
/* @__PURE__ */ o(r, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
434
434
|
/* @__PURE__ */ e(
|
|
435
|
-
|
|
435
|
+
h,
|
|
436
436
|
{
|
|
437
437
|
bold: !0,
|
|
438
438
|
sx: {
|
|
@@ -443,18 +443,18 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
443
443
|
}
|
|
444
444
|
),
|
|
445
445
|
/* @__PURE__ */ e(
|
|
446
|
-
|
|
446
|
+
he,
|
|
447
447
|
{
|
|
448
448
|
body: t.table_tooltip_body,
|
|
449
449
|
title: t.table_tooltip_title
|
|
450
450
|
}
|
|
451
451
|
)
|
|
452
452
|
] }),
|
|
453
|
-
/* @__PURE__ */ o(
|
|
454
|
-
|
|
453
|
+
/* @__PURE__ */ o(h, { bold: !0, sx: { fontSize: 15, whiteSpace: "normal" }, children: [
|
|
454
|
+
Q(f.start, V.FULL_MONTH_DAY),
|
|
455
455
|
" -",
|
|
456
456
|
" ",
|
|
457
|
-
|
|
457
|
+
Q(f.end, V.FULL_MONTH_DAY)
|
|
458
458
|
] })
|
|
459
459
|
]
|
|
460
460
|
}
|
|
@@ -463,7 +463,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
463
463
|
nt,
|
|
464
464
|
{
|
|
465
465
|
columnHeaderHeight: 48,
|
|
466
|
-
columns:
|
|
466
|
+
columns: b,
|
|
467
467
|
density: "standard",
|
|
468
468
|
disableColumnMenu: !0,
|
|
469
469
|
disableRowSelectionOnClick: !0,
|
|
@@ -486,9 +486,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
) : C.map((a) => {
|
|
489
|
-
const { name:
|
|
489
|
+
const { name: g, nickname: l, institution_guid: u, account_number: _ } = a.account, w = l || g;
|
|
490
490
|
return /* @__PURE__ */ e(
|
|
491
|
-
|
|
491
|
+
ee,
|
|
492
492
|
{
|
|
493
493
|
sx: {
|
|
494
494
|
border: "1px solid",
|
|
@@ -496,7 +496,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
496
496
|
borderRadius: 1,
|
|
497
497
|
marginBottom: 24
|
|
498
498
|
},
|
|
499
|
-
children: /* @__PURE__ */ e(
|
|
499
|
+
children: /* @__PURE__ */ e(te, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(r, { width: "100%", children: [
|
|
500
500
|
/* @__PURE__ */ o(
|
|
501
501
|
r,
|
|
502
502
|
{
|
|
@@ -511,17 +511,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
511
511
|
xe,
|
|
512
512
|
{
|
|
513
513
|
alt: t.institution_logo,
|
|
514
|
-
institutionGuid:
|
|
514
|
+
institutionGuid: u || "",
|
|
515
515
|
size: 16
|
|
516
516
|
}
|
|
517
517
|
),
|
|
518
|
-
/* @__PURE__ */ e(
|
|
518
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: `${w} ${_ ? `*${_}` : ""}` })
|
|
519
519
|
] }),
|
|
520
|
-
/* @__PURE__ */ e(
|
|
520
|
+
/* @__PURE__ */ e(L, { amount: a.balance, bold: !0, variant: "Small" })
|
|
521
521
|
]
|
|
522
522
|
}
|
|
523
523
|
),
|
|
524
|
-
/* @__PURE__ */ e(
|
|
524
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
525
525
|
/* @__PURE__ */ o(
|
|
526
526
|
r,
|
|
527
527
|
{
|
|
@@ -531,12 +531,12 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
531
531
|
px: 16,
|
|
532
532
|
py: 12,
|
|
533
533
|
children: [
|
|
534
|
-
/* @__PURE__ */ e(
|
|
535
|
-
/* @__PURE__ */ e(
|
|
534
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: t.projected_income }),
|
|
535
|
+
/* @__PURE__ */ e(L, { amount: a.income, bold: !0, symbol: "+", variant: "Small" })
|
|
536
536
|
]
|
|
537
537
|
}
|
|
538
538
|
),
|
|
539
|
-
/* @__PURE__ */ e(
|
|
539
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
540
540
|
/* @__PURE__ */ o(
|
|
541
541
|
r,
|
|
542
542
|
{
|
|
@@ -546,12 +546,12 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
546
546
|
px: 16,
|
|
547
547
|
py: 12,
|
|
548
548
|
children: [
|
|
549
|
-
/* @__PURE__ */ e(
|
|
550
|
-
/* @__PURE__ */ e(
|
|
549
|
+
/* @__PURE__ */ e(h, { variant: "Small", children: t.projected_expenses }),
|
|
550
|
+
/* @__PURE__ */ e(L, { amount: a.expenses, bold: !0, symbol: "-", variant: "Small" })
|
|
551
551
|
]
|
|
552
552
|
}
|
|
553
553
|
),
|
|
554
|
-
/* @__PURE__ */ e(
|
|
554
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
555
555
|
/* @__PURE__ */ e(
|
|
556
556
|
r,
|
|
557
557
|
{
|
|
@@ -563,7 +563,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
563
563
|
px: 16,
|
|
564
564
|
py: 12,
|
|
565
565
|
sx: { borderBottomLeftRadius: "4px", borderBottomRightRadius: "4px" },
|
|
566
|
-
children: /* @__PURE__ */ e(
|
|
566
|
+
children: /* @__PURE__ */ e(pe, { remaining: a.remaining })
|
|
567
567
|
}
|
|
568
568
|
)
|
|
569
569
|
] }) })
|
|
@@ -574,19 +574,19 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
574
574
|
]
|
|
575
575
|
}
|
|
576
576
|
);
|
|
577
|
-
}, Dt =
|
|
578
|
-
const { cashflow: i } =
|
|
579
|
-
|
|
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);
|
|
580
580
|
};
|
|
581
|
-
return
|
|
581
|
+
return m.useEffect(() => {
|
|
582
582
|
t(s === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
583
|
-
}, [s]), /* @__PURE__ */ o(
|
|
583
|
+
}, [s]), /* @__PURE__ */ o(I, { children: [
|
|
584
584
|
/* @__PURE__ */ o(
|
|
585
585
|
Ke,
|
|
586
586
|
{
|
|
587
587
|
"aria-label": i.cashflow_summary_and_details,
|
|
588
588
|
centered: !0,
|
|
589
|
-
onChange:
|
|
589
|
+
onChange: f,
|
|
590
590
|
textColor: "primary",
|
|
591
591
|
value: s,
|
|
592
592
|
variant: "fullWidth",
|
|
@@ -616,17 +616,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
616
616
|
]
|
|
617
617
|
}
|
|
618
618
|
),
|
|
619
|
-
/* @__PURE__ */ e(
|
|
620
|
-
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: s, children: /* @__PURE__ */ e(
|
|
621
|
-
/* @__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, {}) }) })
|
|
622
622
|
] });
|
|
623
|
-
},
|
|
623
|
+
}, At = T(vt), oe = ({
|
|
624
624
|
amount: i,
|
|
625
625
|
isMobile: n = !1,
|
|
626
626
|
isTotal: t = !1,
|
|
627
627
|
label: s,
|
|
628
|
-
symbol:
|
|
629
|
-
tooltip:
|
|
628
|
+
symbol: c,
|
|
629
|
+
tooltip: f
|
|
630
630
|
}) => /* @__PURE__ */ o(
|
|
631
631
|
r,
|
|
632
632
|
{
|
|
@@ -636,54 +636,54 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
636
636
|
padding: n ? "14px 16px" : 0,
|
|
637
637
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
638
638
|
children: [
|
|
639
|
-
!n && /* @__PURE__ */ e(
|
|
639
|
+
!n && /* @__PURE__ */ e(L, { amount: i, component: "h2", variant: "H2" }),
|
|
640
640
|
/* @__PURE__ */ o(r, { alignItems: "center", component: "span", direction: "row", gap: 8, mt: 2, children: [
|
|
641
|
-
/* @__PURE__ */ e(
|
|
642
|
-
|
|
641
|
+
/* @__PURE__ */ e(h, { bold: t, variant: "Small", children: s }),
|
|
642
|
+
f
|
|
643
643
|
] }),
|
|
644
|
-
n && /* @__PURE__ */ e(
|
|
644
|
+
n && /* @__PURE__ */ e(L, { amount: i, component: "h2", symbol: c, variant: "Small" })
|
|
645
645
|
]
|
|
646
646
|
}
|
|
647
|
-
), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && (We(t.expectedDate) || He(t.expectedDate, n.start)) && Fe(t.expectedDate, n.end),
|
|
648
|
-
const { availableWidth: i } =
|
|
649
|
-
() => t.filter(Re(
|
|
650
|
-
[
|
|
651
|
-
), l =
|
|
652
|
-
() => s.filter(Re(
|
|
653
|
-
[
|
|
654
|
-
),
|
|
655
|
-
() =>
|
|
656
|
-
[
|
|
657
|
-
),
|
|
658
|
-
return /* @__PURE__ */ o(r, { sx: { mx:
|
|
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 = () => {
|
|
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]
|
|
651
|
+
), l = m.useMemo(
|
|
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;
|
|
658
|
+
return /* @__PURE__ */ o(r, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
659
659
|
/* @__PURE__ */ o(
|
|
660
660
|
r,
|
|
661
661
|
{
|
|
662
|
-
border:
|
|
662
|
+
border: p ? "1px solid" : "none",
|
|
663
663
|
borderColor: "border.light",
|
|
664
664
|
borderRadius: 2,
|
|
665
|
-
flexDirection:
|
|
666
|
-
gap:
|
|
665
|
+
flexDirection: p ? "column" : "row",
|
|
666
|
+
gap: p ? 0 : 24,
|
|
667
667
|
justifyContent: "center",
|
|
668
668
|
children: [
|
|
669
669
|
/* @__PURE__ */ e(
|
|
670
|
-
|
|
670
|
+
oe,
|
|
671
671
|
{
|
|
672
|
-
amount:
|
|
673
|
-
isMobile:
|
|
672
|
+
amount: u,
|
|
673
|
+
isMobile: p,
|
|
674
674
|
label: n.cash_and_bank
|
|
675
675
|
}
|
|
676
676
|
),
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
!
|
|
677
|
+
p && /* @__PURE__ */ e(D, {}),
|
|
678
|
+
b?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(P, { children: [
|
|
679
|
+
!p && /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
680
680
|
/* @__PURE__ */ e(
|
|
681
|
-
|
|
681
|
+
oe,
|
|
682
682
|
{
|
|
683
|
-
amount:
|
|
684
|
-
isMobile:
|
|
683
|
+
amount: w,
|
|
684
|
+
isMobile: p,
|
|
685
685
|
label: n.to_be_received,
|
|
686
|
-
symbol:
|
|
686
|
+
symbol: p ? "+" : void 0
|
|
687
687
|
}
|
|
688
688
|
)
|
|
689
689
|
] }) : /* @__PURE__ */ e(
|
|
@@ -695,26 +695,26 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
695
695
|
children: n.add_income
|
|
696
696
|
}
|
|
697
697
|
),
|
|
698
|
-
|
|
698
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
699
699
|
/* @__PURE__ */ e(
|
|
700
|
-
|
|
700
|
+
oe,
|
|
701
701
|
{
|
|
702
|
-
amount:
|
|
703
|
-
isMobile:
|
|
702
|
+
amount: _,
|
|
703
|
+
isMobile: p,
|
|
704
704
|
label: n.to_be_paid_out,
|
|
705
|
-
symbol:
|
|
705
|
+
symbol: p ? "-" : void 0
|
|
706
706
|
}
|
|
707
707
|
),
|
|
708
|
-
|
|
708
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(h, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
709
709
|
/* @__PURE__ */ e(
|
|
710
|
-
|
|
710
|
+
oe,
|
|
711
711
|
{
|
|
712
|
-
amount:
|
|
713
|
-
isMobile:
|
|
714
|
-
isTotal:
|
|
712
|
+
amount: v,
|
|
713
|
+
isMobile: p,
|
|
714
|
+
isTotal: p,
|
|
715
715
|
label: n.remaining_cash,
|
|
716
716
|
tooltip: /* @__PURE__ */ e(
|
|
717
|
-
|
|
717
|
+
he,
|
|
718
718
|
{
|
|
719
719
|
body: n.remaining_income_tooltip_body,
|
|
720
720
|
title: n.remaining_income_tooltip_title
|
|
@@ -737,10 +737,10 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
737
737
|
}
|
|
738
738
|
)
|
|
739
739
|
] });
|
|
740
|
-
}, Tt =
|
|
741
|
-
const { completeOnboarding: n } =
|
|
740
|
+
}, Tt = T(Et), Rt = ({ handleNextStep: i }) => {
|
|
741
|
+
const { completeOnboarding: n } = de(), { cashflow: t } = O(), s = ae();
|
|
742
742
|
return /* @__PURE__ */ o(r, { children: [
|
|
743
|
-
/* @__PURE__ */ e(
|
|
743
|
+
/* @__PURE__ */ e(le, { pb: 12, children: t.welcome_title }),
|
|
744
744
|
/* @__PURE__ */ e(
|
|
745
745
|
Xe,
|
|
746
746
|
{
|
|
@@ -751,11 +751,11 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
751
751
|
children: t.welcome_sub_title
|
|
752
752
|
}
|
|
753
753
|
),
|
|
754
|
-
/* @__PURE__ */ e(
|
|
754
|
+
/* @__PURE__ */ e(k, { pb: 32, children: t.welcome_description }),
|
|
755
755
|
/* @__PURE__ */ o(r, { direction: "column", mb: 32, spacing: 32, children: [
|
|
756
|
-
/* @__PURE__ */ o(
|
|
756
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
757
757
|
/* @__PURE__ */ e(
|
|
758
|
-
|
|
758
|
+
I,
|
|
759
759
|
{
|
|
760
760
|
bgcolor: s.palette.primary.lighter,
|
|
761
761
|
borderRadius: 1,
|
|
@@ -769,9 +769,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
769
769
|
),
|
|
770
770
|
t.bullet_one
|
|
771
771
|
] }),
|
|
772
|
-
/* @__PURE__ */ o(
|
|
772
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
773
773
|
/* @__PURE__ */ e(
|
|
774
|
-
|
|
774
|
+
I,
|
|
775
775
|
{
|
|
776
776
|
bgcolor: s.palette.primary.lighter,
|
|
777
777
|
borderRadius: 1,
|
|
@@ -785,9 +785,9 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
785
785
|
),
|
|
786
786
|
t.bullet_two
|
|
787
787
|
] }),
|
|
788
|
-
/* @__PURE__ */ o(
|
|
788
|
+
/* @__PURE__ */ o(k, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
789
789
|
/* @__PURE__ */ e(
|
|
790
|
-
|
|
790
|
+
I,
|
|
791
791
|
{
|
|
792
792
|
bgcolor: s.palette.primary.lighter,
|
|
793
793
|
borderRadius: 1,
|
|
@@ -807,17 +807,17 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
807
807
|
/* @__PURE__ */ e(H, { onClick: n, variant: "outlined", children: t.skip_button })
|
|
808
808
|
] })
|
|
809
809
|
] });
|
|
810
|
-
},
|
|
811
|
-
CASHFLOW_ONBOARDING: `${
|
|
812
|
-
CASHFLOW_LOADING_ANIMATION: `${
|
|
813
|
-
},
|
|
814
|
-
const { cashflow: i } =
|
|
815
|
-
return /* @__PURE__ */ o(
|
|
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();
|
|
815
|
+
return /* @__PURE__ */ o(m.Fragment, { children: [
|
|
816
816
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("img", { alt: "Loading", src: Ge.CASHFLOW_LOADING_ANIMATION }) }),
|
|
817
|
-
/* @__PURE__ */ e(
|
|
818
|
-
/* @__PURE__ */ e(
|
|
817
|
+
/* @__PURE__ */ e(le, { pb: 12, children: i.loading_title }),
|
|
818
|
+
/* @__PURE__ */ e(k, { children: i.loading_description })
|
|
819
819
|
] });
|
|
820
|
-
},
|
|
820
|
+
}, Nt = T(Ot), kt = tt`
|
|
821
821
|
from {
|
|
822
822
|
transform: rotate(0deg);
|
|
823
823
|
}
|
|
@@ -825,92 +825,92 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
825
825
|
transform: rotate(360deg);
|
|
826
826
|
}
|
|
827
827
|
`, Ht = () => {
|
|
828
|
-
const { addRepeatingTransaction: i, repeatingTransactions: n } =
|
|
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
829
|
() => l.find((x) => x.guid === fe),
|
|
830
830
|
[fe, l]
|
|
831
831
|
), ze = !!n.filter(
|
|
832
832
|
(x) => x.repeating_transaction_type === Ie.Income
|
|
833
833
|
).length, ge = async () => {
|
|
834
|
-
|
|
834
|
+
R(2), C(
|
|
835
835
|
// Beginning of the month, 90 days before today
|
|
836
|
-
ct(Me(
|
|
837
|
-
|
|
838
|
-
),
|
|
836
|
+
ct(Me(M(), 90)),
|
|
837
|
+
M()
|
|
838
|
+
), g({ ...a, custom: Se }), R(3);
|
|
839
839
|
}, Be = async () => {
|
|
840
|
-
if (!(
|
|
841
|
-
|
|
842
|
-
for (let x = 0; x <
|
|
843
|
-
const
|
|
844
|
-
account_guid:
|
|
845
|
-
amount:
|
|
846
|
-
merchant_guid:
|
|
847
|
-
description:
|
|
840
|
+
if (!(y.length < 1)) {
|
|
841
|
+
z(!0);
|
|
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,
|
|
848
848
|
predicted_occurs_on: st(be, { representation: "date" }),
|
|
849
849
|
recurrence_day: be.getDay(),
|
|
850
|
-
recurrence_type:
|
|
850
|
+
recurrence_type: v,
|
|
851
851
|
repeating_transaction_type: Ie.Income,
|
|
852
|
-
transaction_type:
|
|
852
|
+
transaction_type: E.transaction_type
|
|
853
853
|
};
|
|
854
|
-
await i(Pe,
|
|
854
|
+
await i(Pe, E);
|
|
855
855
|
}
|
|
856
|
-
await
|
|
856
|
+
await c();
|
|
857
857
|
}
|
|
858
|
-
}, Ue =
|
|
859
|
-
return
|
|
860
|
-
|
|
858
|
+
}, Ue = !$ && _ || !$ && y.length < 1;
|
|
859
|
+
return b ? /* @__PURE__ */ o(
|
|
860
|
+
I,
|
|
861
861
|
{
|
|
862
862
|
sx: {
|
|
863
863
|
display: "flex",
|
|
864
|
-
alignItems:
|
|
865
|
-
backgroundColor:
|
|
866
|
-
backgroundImage:
|
|
864
|
+
alignItems: d ? "flex-start" : "center",
|
|
865
|
+
backgroundColor: u.palette.background.paper,
|
|
866
|
+
backgroundImage: d ? null : `url(${Ge.CASHFLOW_ONBOARDING})`,
|
|
867
867
|
backgroundRepeat: "no-repeat",
|
|
868
868
|
backgroundPosition: "left 100px",
|
|
869
869
|
backgroundSize: "35%",
|
|
870
870
|
py: 24
|
|
871
871
|
},
|
|
872
872
|
children: [
|
|
873
|
-
|
|
874
|
-
|
|
873
|
+
A === 1 && /* @__PURE__ */ e(
|
|
874
|
+
I,
|
|
875
875
|
{
|
|
876
876
|
sx: {
|
|
877
|
-
...
|
|
877
|
+
...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
878
878
|
},
|
|
879
|
-
children: /* @__PURE__ */ e(
|
|
879
|
+
children: /* @__PURE__ */ e(Lt, { handleNextStep: ge })
|
|
880
880
|
}
|
|
881
881
|
),
|
|
882
|
-
|
|
883
|
-
|
|
882
|
+
A === 2 && /* @__PURE__ */ e(
|
|
883
|
+
I,
|
|
884
884
|
{
|
|
885
885
|
sx: {
|
|
886
|
-
...
|
|
886
|
+
...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
887
887
|
},
|
|
888
|
-
children: /* @__PURE__ */ e(
|
|
888
|
+
children: /* @__PURE__ */ e(Nt, {})
|
|
889
889
|
}
|
|
890
890
|
),
|
|
891
|
-
|
|
892
|
-
|
|
891
|
+
A === 3 && /* @__PURE__ */ o(
|
|
892
|
+
I,
|
|
893
893
|
{
|
|
894
894
|
sx: {
|
|
895
|
-
...
|
|
895
|
+
...d ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
896
896
|
},
|
|
897
897
|
children: [
|
|
898
|
-
/* @__PURE__ */ e(
|
|
899
|
-
/* @__PURE__ */ e(
|
|
900
|
-
|
|
901
|
-
/* @__PURE__ */ e(
|
|
898
|
+
/* @__PURE__ */ e(le, { pb: 12, children: t.add_income_title }),
|
|
899
|
+
/* @__PURE__ */ e(k, { mb: 24, children: t.add_income_description }),
|
|
900
|
+
y.length > 0 && !$ && /* @__PURE__ */ o(P, { children: [
|
|
901
|
+
/* @__PURE__ */ e(ee, { children: y.map((x, E) => /* @__PURE__ */ o(m.Fragment, { children: [
|
|
902
902
|
/* @__PURE__ */ e(lt, { bgcolor: "background.paper", children: ut(
|
|
903
|
-
|
|
903
|
+
U(x.nextDate || x.date)
|
|
904
904
|
) }),
|
|
905
905
|
/* @__PURE__ */ e(dt, { transaction: x }),
|
|
906
|
-
|
|
906
|
+
E !== y.length - 1 && /* @__PURE__ */ e(D, {})
|
|
907
907
|
] }, x.guid)) }),
|
|
908
908
|
/* @__PURE__ */ o(r, { alignItems: "center", direction: "row", children: [
|
|
909
|
-
/* @__PURE__ */ e(
|
|
909
|
+
/* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
|
|
910
910
|
/* @__PURE__ */ e(
|
|
911
911
|
H,
|
|
912
912
|
{
|
|
913
|
-
onClick: () =>
|
|
913
|
+
onClick: () => w(!0),
|
|
914
914
|
startIcon: /* @__PURE__ */ e(F, { name: "add", size: 20 }),
|
|
915
915
|
children: t.add_income
|
|
916
916
|
}
|
|
@@ -921,42 +921,42 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
921
921
|
it,
|
|
922
922
|
{
|
|
923
923
|
bgcolor: "background.paper",
|
|
924
|
-
onSearch: (x) =>
|
|
924
|
+
onSearch: (x) => g({
|
|
925
925
|
...a,
|
|
926
|
-
custom: (
|
|
926
|
+
custom: (E) => x ? at(E, x) : Se(E)
|
|
927
927
|
}),
|
|
928
928
|
onSelected: (x) => {
|
|
929
|
-
|
|
929
|
+
ce(x), w(!1);
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
),
|
|
933
|
-
!ze &&
|
|
934
|
-
|
|
933
|
+
!ze && f && /* @__PURE__ */ e(k, { color: "error", mt: 16, children: t.confirm_error }),
|
|
934
|
+
$ && /* @__PURE__ */ o(P, { children: [
|
|
935
935
|
/* @__PURE__ */ e(
|
|
936
936
|
rt,
|
|
937
937
|
{
|
|
938
938
|
bgcolor: "background.paper",
|
|
939
|
-
firstDay:
|
|
940
|
-
frequency:
|
|
941
|
-
onFirstDayChange:
|
|
942
|
-
onFrequencyChange:
|
|
939
|
+
firstDay: N,
|
|
940
|
+
frequency: v,
|
|
941
|
+
onFirstDayChange: S,
|
|
942
|
+
onFrequencyChange: p,
|
|
943
943
|
onSecondDayChange: G,
|
|
944
|
-
secondDay:
|
|
945
|
-
transaction:
|
|
944
|
+
secondDay: j,
|
|
945
|
+
transaction: $
|
|
946
946
|
}
|
|
947
947
|
),
|
|
948
948
|
/* @__PURE__ */ o(r, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
949
949
|
/* @__PURE__ */ e(
|
|
950
950
|
H,
|
|
951
951
|
{
|
|
952
|
-
"aria-disabled":
|
|
952
|
+
"aria-disabled": !$,
|
|
953
953
|
onClick: () => {
|
|
954
|
-
const x = [...
|
|
954
|
+
const x = [...y];
|
|
955
955
|
x.push({
|
|
956
|
-
|
|
957
|
-
nextDate: De(
|
|
958
|
-
frequency:
|
|
959
|
-
}), je(x),
|
|
956
|
+
...$,
|
|
957
|
+
nextDate: De(v, ye($.date)),
|
|
958
|
+
frequency: v
|
|
959
|
+
}), je(x), ce("");
|
|
960
960
|
},
|
|
961
961
|
variant: "contained",
|
|
962
962
|
children: s.confirm_button
|
|
@@ -966,7 +966,7 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
966
966
|
H,
|
|
967
967
|
{
|
|
968
968
|
onClick: () => {
|
|
969
|
-
|
|
969
|
+
ce(""), w(!0), ge().finally();
|
|
970
970
|
},
|
|
971
971
|
variant: "outlined",
|
|
972
972
|
children: s.cancel_button
|
|
@@ -974,13 +974,13 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
974
974
|
)
|
|
975
975
|
] })
|
|
976
976
|
] }),
|
|
977
|
-
|
|
977
|
+
y.length > 0 && !$ && /* @__PURE__ */ o(r, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
978
978
|
/* @__PURE__ */ e(
|
|
979
979
|
H,
|
|
980
980
|
{
|
|
981
|
-
"aria-disabled":
|
|
981
|
+
"aria-disabled": y.length < 1 || W,
|
|
982
982
|
onClick: Be,
|
|
983
|
-
startIcon:
|
|
983
|
+
startIcon: W ? /* @__PURE__ */ e(
|
|
984
984
|
F,
|
|
985
985
|
{
|
|
986
986
|
name: "progress_activity",
|
|
@@ -993,71 +993,71 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
993
993
|
children: t.confirm_income_button
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
|
-
/* @__PURE__ */ e(H, { onClick:
|
|
996
|
+
/* @__PURE__ */ e(H, { onClick: c, variant: "outlined", children: t.skip_button })
|
|
997
997
|
] })
|
|
998
998
|
]
|
|
999
999
|
}
|
|
1000
1000
|
)
|
|
1001
1001
|
]
|
|
1002
1002
|
}
|
|
1003
|
-
) : /* @__PURE__ */ e(
|
|
1004
|
-
}, Ft =
|
|
1003
|
+
) : /* @__PURE__ */ e(se, {});
|
|
1004
|
+
}, Ft = T(Ht), Wt = ({ onBackClick: i, sx: n = {} }) => {
|
|
1005
1005
|
const {
|
|
1006
1006
|
selectedAccounts: t,
|
|
1007
1007
|
selectedAccountGuids: s,
|
|
1008
|
-
setSelectedAccounts:
|
|
1009
|
-
shouldDisableNextDate:
|
|
1010
|
-
shouldDisablePrevDate:
|
|
1011
|
-
} =
|
|
1012
|
-
return
|
|
1013
|
-
|
|
1014
|
-
}, [
|
|
1015
|
-
|
|
1016
|
-
}, [C]),
|
|
1017
|
-
const
|
|
1018
|
-
(
|
|
1008
|
+
setSelectedAccounts: c,
|
|
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);
|
|
1012
|
+
return m.useEffect(() => {
|
|
1013
|
+
S && (w(l), _().finally());
|
|
1014
|
+
}, [S]), m.useEffect(() => {
|
|
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)
|
|
1019
1019
|
);
|
|
1020
|
-
|
|
1021
|
-
dateRange: { start: Me(
|
|
1022
|
-
accounts:
|
|
1020
|
+
u(z), a({
|
|
1021
|
+
dateRange: { start: Me(M(), 90), end: ht() },
|
|
1022
|
+
accounts: z.map((A) => A.guid)
|
|
1023
1023
|
});
|
|
1024
|
-
}, [C, t]), !
|
|
1024
|
+
}, [C, t]), !N || !S ? /* @__PURE__ */ e(se, {}) : g?.has_completed_cash_flow_onboarding ? /* @__PURE__ */ o(
|
|
1025
1025
|
ve,
|
|
1026
1026
|
{
|
|
1027
1027
|
accountOptions: C,
|
|
1028
1028
|
actions: [
|
|
1029
1029
|
{
|
|
1030
|
-
label:
|
|
1030
|
+
label: p.action_title,
|
|
1031
1031
|
iconName: "credit_card",
|
|
1032
1032
|
onClick: () => {
|
|
1033
|
-
G(!0),
|
|
1033
|
+
G(!0), b(Ae.CASH_FLOW_CLICK_SETTINGS);
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
1036
|
],
|
|
1037
1037
|
calendarActions: {
|
|
1038
|
-
shouldDisableNext:
|
|
1039
|
-
shouldDisablePrevious:
|
|
1038
|
+
shouldDisableNext: f,
|
|
1039
|
+
shouldDisablePrevious: d,
|
|
1040
1040
|
shouldDisablePicker: !0,
|
|
1041
1041
|
onRangeChanged: () => {
|
|
1042
1042
|
}
|
|
1043
1043
|
},
|
|
1044
1044
|
dateRange: l,
|
|
1045
1045
|
dateRangeVariant: "readonly",
|
|
1046
|
-
onAccountsFilterClick: () =>
|
|
1046
|
+
onAccountsFilterClick: () => b(Ae.CASH_FLOW_CLICK_FILTER),
|
|
1047
1047
|
onBackClick: i,
|
|
1048
1048
|
sx: n,
|
|
1049
|
-
title:
|
|
1049
|
+
title: v.title,
|
|
1050
1050
|
children: [
|
|
1051
1051
|
/* @__PURE__ */ e(Tt, {}),
|
|
1052
|
-
/* @__PURE__ */ e(
|
|
1052
|
+
/* @__PURE__ */ e(At, {}),
|
|
1053
1053
|
/* @__PURE__ */ e(
|
|
1054
1054
|
$e,
|
|
1055
1055
|
{
|
|
1056
|
-
ariaLabelClose:
|
|
1057
|
-
isOpen:
|
|
1056
|
+
ariaLabelClose: v.close_settings_aria,
|
|
1057
|
+
isOpen: j,
|
|
1058
1058
|
onClose: () => G(!1),
|
|
1059
1059
|
shouldShowHeaderBorders: !1,
|
|
1060
|
-
title:
|
|
1060
|
+
title: p.action_title,
|
|
1061
1061
|
children: /* @__PURE__ */ e(Ve, {})
|
|
1062
1062
|
}
|
|
1063
1063
|
)
|
|
@@ -1068,34 +1068,34 @@ const _t = ({ recurrence: i }) => /* @__PURE__ */ o(U, { children: [
|
|
|
1068
1068
|
{
|
|
1069
1069
|
onBackClick: i,
|
|
1070
1070
|
sx: { height: "100%", overflow: "auto" },
|
|
1071
|
-
title:
|
|
1071
|
+
title: v.title,
|
|
1072
1072
|
children: /* @__PURE__ */ e(Ft, {})
|
|
1073
1073
|
}
|
|
1074
1074
|
);
|
|
1075
|
-
},
|
|
1075
|
+
}, Nn = T(Wt);
|
|
1076
1076
|
class kn {
|
|
1077
1077
|
fetchInstance;
|
|
1078
1078
|
constructor(n, t) {
|
|
1079
1079
|
this.fetchInstance = new pt(n, t);
|
|
1080
1080
|
}
|
|
1081
|
-
addCashflowEvent = async (n) => this.fetchInstance.post(
|
|
1082
|
-
addCashflowSequence = async (n) => this.fetchInstance.post(
|
|
1083
|
-
getCashflowSequences = async () => this.fetchInstance.get(
|
|
1081
|
+
addCashflowEvent = async (n) => this.fetchInstance.post(B.CASHFLOW_EVENTS, { ...n }).then((t) => t);
|
|
1082
|
+
addCashflowSequence = async (n) => this.fetchInstance.post(B.CASHFLOW_SEQUENCES, { ...n }).then((t) => t.cashflow_sequence);
|
|
1083
|
+
getCashflowSequences = async () => this.fetchInstance.get(B.CASHFLOW_SEQUENCES).then((n) => n.cashflow_sequences);
|
|
1084
1084
|
getCashflowEventsByDateRange = async (n, t) => this.fetchInstance.get(
|
|
1085
|
-
`${
|
|
1085
|
+
`${B.CASHFLOW_EVENTS}/from/${U(n)}/to/${U(t)}`
|
|
1086
1086
|
).then((s) => s.cashflow_events);
|
|
1087
|
-
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${
|
|
1087
|
+
deleteCashflowSequence = async (n) => this.fetchInstance.delete(`${B.CASHFLOW_SEQUENCES}/${n}`).then((t) => t);
|
|
1088
1088
|
getProjectedCashflowEvents = async (n, t) => this.fetchInstance.get(
|
|
1089
|
-
`${
|
|
1089
|
+
`${B.CASHFLOW_SEQUENCES}/projected_events/from/${U(
|
|
1090
1090
|
n
|
|
1091
|
-
)}/to/${
|
|
1091
|
+
)}/to/${U(t)}`
|
|
1092
1092
|
).then((s) => s.cashflow_events);
|
|
1093
|
-
updateCashflowSequence = async (n) => this.fetchInstance.put(`${
|
|
1093
|
+
updateCashflowSequence = async (n) => this.fetchInstance.put(`${B.CASHFLOW_SEQUENCES}/${n.guid}`, n).then((t) => t.cashflow_sequence);
|
|
1094
1094
|
}
|
|
1095
1095
|
export {
|
|
1096
1096
|
kn as CashflowApi,
|
|
1097
|
-
|
|
1097
|
+
On as CashflowMiniWidget,
|
|
1098
1098
|
Ft as CashflowOnboarding,
|
|
1099
1099
|
Wn as CashflowStore,
|
|
1100
|
-
|
|
1100
|
+
Nn as CashflowWidget
|
|
1101
1101
|
};
|