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