@mx-cartographer/experiences 7.13.21 → 7.13.22-alpha.al0
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/{AccountDetailsHeader-D9gbTbUt.mjs → AccountDetailsHeader-CG9VtEpj.mjs} +2 -2
- package/dist/{AccountListItem-D9WJDbZ1.mjs → AccountListItem-BDFCEhSI.mjs} +2 -2
- package/dist/{AccountStore-DpYvNnql.mjs → AccountStore-Bn1eH2EU.mjs} +1 -1
- package/dist/{BudgetUtil-CLhRnCoX.mjs → BudgetUtil-BCSxP3M3.mjs} +1 -1
- package/dist/{CategorySelectorDrawer-Dc9Widy9.mjs → CategorySelectorDrawer-tvJUjmwZ.mjs} +1 -1
- package/dist/{Connect-eYIWqCEr.mjs → Connect-CmjOgy5v.mjs} +1 -1
- package/dist/{ConnectDrawer-C0wjwcJt.mjs → ConnectDrawer-Be0RkL7I.mjs} +2 -2
- package/dist/{ConnectionsDrawer-IA7vnv1J.mjs → ConnectionsDrawer-yeD_PsY1.mjs} +2 -2
- package/dist/{CurrencyInput-DuMktPu3.mjs → CurrencyInput-xu9UcYZR.mjs} +1 -1
- package/dist/DateRangeSelector-DE4UR77m.mjs +275 -0
- package/dist/{ExportCsvAction-izkIdXj5.mjs → ExportCsvAction-CLUDN8jI.mjs} +3 -3
- package/dist/{GlobalAccountFilter-B73Pw1hJ.mjs → GlobalAccountFilter-BkUeAltd.mjs} +90 -96
- package/dist/{GoalStore-DB58sKTC.mjs → GoalStore-DMhiGiF4.mjs} +1 -1
- package/dist/{Help-D-laTbKu.mjs → Help-pcoNjCaF.mjs} +1 -1
- package/dist/{LineChart-EAr5ox5U.mjs → LineChart-DIjY-HBq.mjs} +1 -1
- package/dist/{ListItemAction-4KB7P75M.mjs → ListItemAction-BQIdxB-9.mjs} +1 -1
- package/dist/{ManageIncome-B1j-AzI1.mjs → ManageIncome-DWVaWpCT.mjs} +4 -4
- package/dist/{MicroWidgetContainer-B_EnfvCq.mjs → MicroWidgetContainer-CTMkXRJM.mjs} +1 -1
- package/dist/{MiniWidgetContainer-Bhkv-hpz.mjs → MiniWidgetContainer-BKPN3c-6.mjs} +1 -1
- package/dist/{NotificationSettings-C77J42Ue.mjs → NotificationSettings-O3iUw7-O.mjs} +32 -32
- package/dist/{OriginalBalanceAction-DjpvVVFz.mjs → OriginalBalanceAction-2lCGZTRv.mjs} +3 -3
- package/dist/{RecurringSettings-Dyj3i0ZJ.mjs → RecurringSettings-DNko1CD0.mjs} +2 -2
- package/dist/{SpendingLegend-BgjazduU.mjs → SpendingLegend-CGYqNtOp.mjs} +1 -1
- package/dist/{StatusIndicator-CIKUOoN_.mjs → StatusIndicator-CnDblSmc.mjs} +2 -2
- package/dist/{Transaction-CqjlF6SO.mjs → Transaction-Bd0myZzA.mjs} +1 -1
- package/dist/{TransactionDetails-CwqokbQo.mjs → TransactionDetails-DAB5arBD.mjs} +6 -6
- package/dist/{TransactionStore-rpqhGX8m.mjs → TransactionStore-hzVucfUK.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-D24H9kDm.mjs → ViewMoreMicroCard-BWCe3UeO.mjs} +1 -1
- package/dist/WidgetContainer-BPeSl0Dj.mjs +180 -0
- package/dist/WidgetContainerV2-BjOelON7.mjs +127 -0
- package/dist/accounts/index.es.js +218 -219
- package/dist/analytics/index.es.js +8 -8
- package/dist/budgets/index.es.js +408 -409
- package/dist/cashflow/index.es.js +227 -228
- package/dist/categories/index.es.js +1 -1
- package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
- package/dist/common/components/WidgetContainer.d.ts +3 -2
- package/dist/common/components/WidgetContainerV2.d.ts +4 -0
- package/dist/common/components/index.d.ts +1 -0
- package/dist/common/index.es.js +167 -164
- package/dist/dashboard/index.es.js +5 -5
- package/dist/debts/index.es.js +585 -586
- package/dist/{exportTransactionsToCSV-CdTF_RqL.mjs → exportTransactionsToCSV-CamFllci.mjs} +1 -1
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/index.es.js +641 -652
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/index.es.js +498 -499
- package/dist/help/index.es.js +8 -8
- package/dist/{hooks-BxkfR-Ff.mjs → hooks-DOWEalfb.mjs} +2 -2
- package/dist/insights/index.es.js +3 -3
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/index.es.js +448 -449
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/networth/index.es.js +182 -196
- package/dist/notifications/index.es.js +2 -2
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +240 -242
- package/dist/settings/index.es.js +7 -7
- package/dist/spending/index.es.js +8 -8
- package/dist/transactions/index.es.js +246 -248
- package/dist/trends/index.es.js +12 -12
- package/dist/{useAccountDisplayName-DKwT1mWv.mjs → useAccountDisplayName-DQc7zGqk.mjs} +1 -1
- package/dist/{useInsightsEnabled-DL_oNyI0.mjs → useInsightsEnabled-DojdZhOg.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DgN1bTyu.mjs → useWidgetLoadTimer-DmYEMfRw.mjs} +1 -1
- package/package.json +1 -1
- package/dist/WidgetContainer-B7xDq2bM.mjs +0 -441
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import { jsxs as o, Fragment as B, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import h, { useState as
|
|
2
|
+
import h, { useState as K } from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
4
|
import { addMonths as Ve } from "date-fns/addMonths";
|
|
5
|
-
import { startOfToday as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { startOfToday as H } from "date-fns/startOfToday";
|
|
6
|
+
import I from "@mui/material/Box";
|
|
7
|
+
import D from "@mui/material/Divider";
|
|
8
8
|
import s from "@mui/material/Stack";
|
|
9
|
-
import
|
|
9
|
+
import ae from "@mui/material/styles/useTheme";
|
|
10
10
|
import { Text as m, P as N, Icon as M, InstitutionLogo as ye, H2 as de, H3 as Ye } from "@mxenabled/mxui";
|
|
11
|
-
import { G as Qe, t as me, u as L, p as
|
|
11
|
+
import { G as Qe, t as me, u as L, p as re, d as Ne, b as P, i as U, f as ke, a as Ke, h as Oe, o as Xe } from "../hooks-DOWEalfb.mjs";
|
|
12
12
|
import { C as R } from "../CurrencyText-CA-E5N_y.mjs";
|
|
13
13
|
import { I as ue } from "../CashflowStore-CeAzChyD.mjs";
|
|
14
14
|
import { C as qn } from "../CashflowStore-CeAzChyD.mjs";
|
|
15
15
|
import { u as pe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
16
|
-
import { L as
|
|
16
|
+
import { L as ee } from "../Loader-D3rjKx72.mjs";
|
|
17
17
|
import { b as $ } from "../Localization-CPkpIwIx.mjs";
|
|
18
|
-
import { M as Je } from "../MiniWidgetContainer-
|
|
18
|
+
import { M as Je } from "../MiniWidgetContainer-BKPN3c-6.mjs";
|
|
19
19
|
import { E as Ze } from "../EmptyState-DHAkGsjk.mjs";
|
|
20
|
-
import { u as Fe } from "../useWidgetLoadTimer-
|
|
21
|
-
import { R as et } from "../RecurringSettings-
|
|
20
|
+
import { u as Fe } from "../useWidgetLoadTimer-DmYEMfRw.mjs";
|
|
21
|
+
import { R as et } from "../RecurringSettings-DNko1CD0.mjs";
|
|
22
22
|
import tt from "@mui/material/Tabs";
|
|
23
23
|
import Ce from "@mui/material/Tab";
|
|
24
24
|
import { getUnixTime as z } from "date-fns/getUnixTime";
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import { A as nt } from "../AccountListItem-
|
|
25
|
+
import Z from "@mui/material/List";
|
|
26
|
+
import te from "@mui/material/ListItem";
|
|
27
|
+
import { A as nt } from "../AccountListItem-BDFCEhSI.mjs";
|
|
28
28
|
import { f as q, D as V } from "../DateFormats-BMpMrZpW.mjs";
|
|
29
29
|
import ot from "@mui/material/ListSubheader";
|
|
30
|
-
import { f as
|
|
30
|
+
import { f as J } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
31
31
|
import { isAfter as He } from "date-fns/isAfter";
|
|
32
32
|
import { isBefore as We } from "date-fns/isBefore";
|
|
33
33
|
import { isToday as $e } from "date-fns/isToday";
|
|
@@ -36,17 +36,17 @@ import { alpha as it, keyframes as at } from "@mui/material/styles";
|
|
|
36
36
|
import { DataGridPro as rt } from "@mui/x-data-grid-pro";
|
|
37
37
|
import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
|
|
38
38
|
import G from "@mui/material/Button";
|
|
39
|
-
import { M as st, S as ct, i as lt, d as Se, c as dt } from "../ManageIncome-
|
|
39
|
+
import { M as st, S as ct, i as lt, d as Se, c as dt } from "../ManageIncome-DWVaWpCT.mjs";
|
|
40
40
|
import { D as Ge } from "../Drawer-Bbe4AMB1.mjs";
|
|
41
41
|
import { subDays as Me } from "date-fns/subDays";
|
|
42
42
|
import { endOfToday as mt } from "date-fns/endOfToday";
|
|
43
|
-
import { W as ut } from "../
|
|
43
|
+
import { W as ut } from "../WidgetContainerV2-BjOelON7.mjs";
|
|
44
44
|
import { A as Ie } from "../Analytics-BYItVAe-.mjs";
|
|
45
|
-
import { A as
|
|
45
|
+
import { A as X } from "../Account-BiB1F8lL.mjs";
|
|
46
46
|
import { formatISO as pt } from "date-fns/formatISO";
|
|
47
47
|
import { fromUnixTime as De } from "date-fns/fromUnixTime";
|
|
48
48
|
import { startOfMonth as ht } from "date-fns/startOfMonth";
|
|
49
|
-
import { S as ft, a as gt } from "../StatusIndicator-
|
|
49
|
+
import { S as ft, a as gt } from "../StatusIndicator-CnDblSmc.mjs";
|
|
50
50
|
import { F as bt, R as ve, e as Ae } from "../RecurringTransactions-tayG19Wn.mjs";
|
|
51
51
|
import { h as xt } from "../DateUtil-wcYTmDRD.mjs";
|
|
52
52
|
import { F as yt, A as j } from "../Fetch-B6tMJC1r.mjs";
|
|
@@ -58,7 +58,7 @@ const Y = () => {
|
|
|
58
58
|
const { cashflow: n } = L();
|
|
59
59
|
return /* @__PURE__ */ o(B, { children: [
|
|
60
60
|
/* @__PURE__ */ e(
|
|
61
|
-
|
|
61
|
+
I,
|
|
62
62
|
{
|
|
63
63
|
sx: {
|
|
64
64
|
borderRadius: "1px",
|
|
@@ -72,32 +72,32 @@ const Y = () => {
|
|
|
72
72
|
/* @__PURE__ */ e(R, { amount: i, bold: !0, sx: { fontSize: 12 } })
|
|
73
73
|
] });
|
|
74
74
|
}, he = T(Ct), _t = () => {
|
|
75
|
-
const i =
|
|
75
|
+
const i = ae(), { availableWidth: n } = re(), { isMobile: t } = pe(), { visibleCashAccounts: a, visibleCashBalance: f } = Ne(), { selectedAccountGuids: u } = P(), { cashflow: c } = L(), {
|
|
76
76
|
daysUntilNextIncome: l,
|
|
77
|
-
expensesTilNextIncome:
|
|
77
|
+
expensesTilNextIncome: x,
|
|
78
78
|
selectedCashAccounts: r,
|
|
79
|
-
setNextIncome:
|
|
79
|
+
setNextIncome: g,
|
|
80
80
|
setSelectedCashAccounts: d,
|
|
81
|
-
setUpcomingExpenses:
|
|
82
|
-
} = Y(), { isDataLoaded: _, nextIncomeRecurrence: w, upcomingExpenses:
|
|
81
|
+
setUpcomingExpenses: b
|
|
82
|
+
} = Y(), { isDataLoaded: _, nextIncomeRecurrence: w, upcomingExpenses: v } = U();
|
|
83
83
|
h.useEffect(() => {
|
|
84
84
|
d(
|
|
85
|
-
a.filter((
|
|
85
|
+
a.filter((C) => u.includes(C.guid))
|
|
86
86
|
);
|
|
87
87
|
}, [a, u]), h.useEffect(() => {
|
|
88
|
-
w &&
|
|
89
|
-
}, [w,
|
|
90
|
-
const
|
|
91
|
-
() => a.filter((
|
|
92
|
-
[u,
|
|
93
|
-
),
|
|
94
|
-
() =>
|
|
95
|
-
[u,
|
|
96
|
-
),
|
|
97
|
-
() =>
|
|
98
|
-
[
|
|
88
|
+
w && g(w), b(v);
|
|
89
|
+
}, [w, v]);
|
|
90
|
+
const A = h.useMemo(
|
|
91
|
+
() => a.filter((C) => u.includes(C.guid)).reduce((C, S) => C + (S?.balance || 0), 0),
|
|
92
|
+
[u, v]
|
|
93
|
+
), O = h.useMemo(
|
|
94
|
+
() => x.filter((C) => u.includes(C.accountGuid || "")).reduce((C, S) => C + S.amount, 0),
|
|
95
|
+
[u, x]
|
|
96
|
+
), p = h.useMemo(
|
|
97
|
+
() => A - O,
|
|
98
|
+
[A, O]
|
|
99
99
|
);
|
|
100
|
-
return _ ? /* @__PURE__ */ e(
|
|
100
|
+
return _ ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: n > 710 ? /* @__PURE__ */ o(
|
|
101
101
|
s,
|
|
102
102
|
{
|
|
103
103
|
border: `1px solid ${i.palette.divider}`,
|
|
@@ -107,7 +107,7 @@ const Y = () => {
|
|
|
107
107
|
px: 24,
|
|
108
108
|
children: [
|
|
109
109
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
110
|
-
/* @__PURE__ */ e(R, { amount:
|
|
110
|
+
/* @__PURE__ */ e(R, { amount: A, variant: "h2" }),
|
|
111
111
|
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: $(
|
|
112
112
|
c.total_cash_accounts,
|
|
113
113
|
r.length
|
|
@@ -115,12 +115,12 @@ const Y = () => {
|
|
|
115
115
|
] }),
|
|
116
116
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(M, { name: "remove" }) }),
|
|
117
117
|
/* @__PURE__ */ o(s, { pb: 14, pt: 12, children: [
|
|
118
|
-
/* @__PURE__ */ e(R, { amount:
|
|
119
|
-
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: $(c.expenses_due,
|
|
118
|
+
/* @__PURE__ */ e(R, { amount: O, variant: "h2" }),
|
|
119
|
+
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: $(c.expenses_due, x.length) })
|
|
120
120
|
] }),
|
|
121
121
|
/* @__PURE__ */ e(s, { pt: 18, children: /* @__PURE__ */ e(M, { name: "equal" }) }),
|
|
122
122
|
/* @__PURE__ */ o(s, { pb: 14, pr: 24, pt: 12, children: [
|
|
123
|
-
/* @__PURE__ */ e(R, { amount:
|
|
123
|
+
/* @__PURE__ */ e(R, { amount: p, variant: "h2" }),
|
|
124
124
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
125
125
|
/* @__PURE__ */ e(N, { variant: "caption", whiteSpace: "nowrap", children: c.available_to_spend }),
|
|
126
126
|
/* @__PURE__ */ e(ue, { body: c.tooltip_body, title: c.tooltip_title })
|
|
@@ -140,12 +140,12 @@ const Y = () => {
|
|
|
140
140
|
) }),
|
|
141
141
|
/* @__PURE__ */ e(R, { amount: f, bold: !0, variant: "caption" })
|
|
142
142
|
] }),
|
|
143
|
-
/* @__PURE__ */ e(
|
|
143
|
+
/* @__PURE__ */ e(D, {}),
|
|
144
144
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
145
|
-
/* @__PURE__ */ e(m, { variant: "body2", children: $(c.expenses_due,
|
|
146
|
-
/* @__PURE__ */ e(R, { amount:
|
|
145
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: $(c.expenses_due, x.length) }),
|
|
146
|
+
/* @__PURE__ */ e(R, { amount: O, bold: !0, symbol: "-", variant: "caption" })
|
|
147
147
|
] }),
|
|
148
|
-
/* @__PURE__ */ e(
|
|
148
|
+
/* @__PURE__ */ e(D, {}),
|
|
149
149
|
/* @__PURE__ */ e(
|
|
150
150
|
s,
|
|
151
151
|
{
|
|
@@ -157,23 +157,23 @@ const Y = () => {
|
|
|
157
157
|
justifyContent: "space-between",
|
|
158
158
|
px: 16,
|
|
159
159
|
sx: { borderBottomLeftRadius: 4, borderBottomRightRadius: 4 },
|
|
160
|
-
children: /* @__PURE__ */ e(he, { remaining:
|
|
160
|
+
children: /* @__PURE__ */ e(he, { remaining: p })
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
/* @__PURE__ */ e(
|
|
163
|
+
/* @__PURE__ */ e(D, {}),
|
|
164
164
|
/* @__PURE__ */ o(s, { direction: "row", justifyContent: "space-between", p: 16, children: [
|
|
165
165
|
/* @__PURE__ */ e(m, { variant: "body2", children: c.next_paycheck }),
|
|
166
166
|
/* @__PURE__ */ e(m, { bold: !0, variant: "caption", children: $(c.days, l) })
|
|
167
167
|
] })
|
|
168
|
-
] }) }) : /* @__PURE__ */ e(
|
|
168
|
+
] }) }) : /* @__PURE__ */ e(ee, { height: t ? 210 : 120 });
|
|
169
169
|
}, wt = T(_t), St = ({
|
|
170
170
|
onPrimaryCtaClick: i,
|
|
171
171
|
onSecondaryCtaClick: n,
|
|
172
172
|
sx: t = {}
|
|
173
173
|
}) => {
|
|
174
|
-
const { cashflow: a } = L(), { isInitialized: f } = P(), { loadRepeatingTransactionData: u, income: c, isDataLoaded: l, setDateRange:
|
|
174
|
+
const { cashflow: a } = L(), { isInitialized: f } = P(), { loadRepeatingTransactionData: u, income: c, isDataLoaded: l, setDateRange: x } = U();
|
|
175
175
|
h.useEffect(() => {
|
|
176
|
-
|
|
176
|
+
x({ start: H(), end: Ve(H(), 1) }), l || u().finally();
|
|
177
177
|
}, []), Fe({
|
|
178
178
|
widgetName: "CashflowMiniWidget",
|
|
179
179
|
isLoaded: l
|
|
@@ -190,7 +190,7 @@ const Y = () => {
|
|
|
190
190
|
sx: { height: "100%", ...t },
|
|
191
191
|
title: a.title,
|
|
192
192
|
children: [
|
|
193
|
-
!l && /* @__PURE__ */ e(
|
|
193
|
+
!l && /* @__PURE__ */ e(ee, {}),
|
|
194
194
|
l && (r ? /* @__PURE__ */ e(
|
|
195
195
|
Ze,
|
|
196
196
|
{
|
|
@@ -204,9 +204,9 @@ const Y = () => {
|
|
|
204
204
|
) : /* @__PURE__ */ e(wt, {}))
|
|
205
205
|
]
|
|
206
206
|
}
|
|
207
|
-
) : /* @__PURE__ */ e(
|
|
207
|
+
) : /* @__PURE__ */ e(ee, {});
|
|
208
208
|
}, Mn = T(St), It = ({ remaining: i }) => /* @__PURE__ */ e(
|
|
209
|
-
|
|
209
|
+
te,
|
|
210
210
|
{
|
|
211
211
|
sx: {
|
|
212
212
|
alignItems: "center",
|
|
@@ -221,9 +221,9 @@ const Y = () => {
|
|
|
221
221
|
children: /* @__PURE__ */ e(he, { remaining: i })
|
|
222
222
|
}
|
|
223
223
|
);
|
|
224
|
-
var
|
|
224
|
+
var ne = /* @__PURE__ */ ((i) => (i.EXPENSE = "expense", i.INCOME = "income", i))(ne || {});
|
|
225
225
|
const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
226
|
-
/* @__PURE__ */ o(
|
|
226
|
+
/* @__PURE__ */ o(te, { sx: { display: "flex", alignItems: "center", gap: 16, px: 24, py: 12 }, children: [
|
|
227
227
|
/* @__PURE__ */ o(s, { alignItems: "center", height: 32, width: 32, children: [
|
|
228
228
|
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: q(i.expectedDate, V.MONTH) }),
|
|
229
229
|
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 11 }, children: q(i.expectedDate, V.DAY) })
|
|
@@ -238,7 +238,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
238
238
|
}
|
|
239
239
|
)
|
|
240
240
|
] }),
|
|
241
|
-
/* @__PURE__ */ e(
|
|
241
|
+
/* @__PURE__ */ e(D, {})
|
|
242
242
|
] }), Ee = T(Dt), vt = ({ total: i, type: n }) => {
|
|
243
243
|
const { cashflow: t } = L();
|
|
244
244
|
return /* @__PURE__ */ o(B, { children: [
|
|
@@ -255,18 +255,18 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
255
255
|
px: 24
|
|
256
256
|
},
|
|
257
257
|
children: [
|
|
258
|
-
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: n ===
|
|
258
|
+
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 12 }, children: n === ne.EXPENSE ? t.expenses : t.income }),
|
|
259
259
|
/* @__PURE__ */ o(m, { bold: !0, sx: { fontSize: 13 }, children: [
|
|
260
|
-
n ===
|
|
261
|
-
|
|
260
|
+
n === ne.EXPENSE ? "-" : "+",
|
|
261
|
+
J(i, "0,0.00")
|
|
262
262
|
] })
|
|
263
263
|
]
|
|
264
264
|
}
|
|
265
265
|
),
|
|
266
|
-
/* @__PURE__ */ e(
|
|
266
|
+
/* @__PURE__ */ e(D, {})
|
|
267
267
|
] });
|
|
268
|
-
}, Te = T(vt),
|
|
269
|
-
const { availableWidth: i } =
|
|
268
|
+
}, Te = T(vt), ie = (i, n) => (t) => t.accountGuid === i.guid && ($e(t.expectedDate) || He(t.expectedDate, n.start)) && We(t.expectedDate, n.end), At = () => {
|
|
269
|
+
const { availableWidth: i } = re(), { cashflow: n } = L(), { upcomingExpenses: t, upcomingIncome: a } = U(), { dateRange: f, selectedCashAccounts: u } = Y();
|
|
270
270
|
return /* @__PURE__ */ o(s, { children: [
|
|
271
271
|
/* @__PURE__ */ o(s, { direction: i < 400 ? "column" : "row", justifyContent: "space-between", children: [
|
|
272
272
|
/* @__PURE__ */ e(m, { bold: !0, sx: { fontSize: 15, mb: 12, whiteSpace: "normal" }, children: n.accounts_breakdown }),
|
|
@@ -278,17 +278,17 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
278
278
|
] })
|
|
279
279
|
] }),
|
|
280
280
|
/* @__PURE__ */ e(s, { children: u.map((c) => {
|
|
281
|
-
const l = a.filter(
|
|
282
|
-
|
|
281
|
+
const l = a.filter(ie(c, f)).sort((d, b) => z(d.expectedDate) - z(b.expectedDate)), x = t.filter(
|
|
282
|
+
ie(c, f)
|
|
283
283
|
), r = l.reduce(
|
|
284
|
-
(d,
|
|
284
|
+
(d, b) => d + b.amount,
|
|
285
285
|
0
|
|
286
|
-
),
|
|
287
|
-
(d,
|
|
286
|
+
), g = x.reduce(
|
|
287
|
+
(d, b) => d + b.amount,
|
|
288
288
|
0
|
|
289
289
|
);
|
|
290
290
|
return /* @__PURE__ */ o(
|
|
291
|
-
|
|
291
|
+
Z,
|
|
292
292
|
{
|
|
293
293
|
sx: {
|
|
294
294
|
border: "1px solid",
|
|
@@ -308,27 +308,27 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
),
|
|
311
|
-
/* @__PURE__ */ e(
|
|
312
|
-
l.length > 0 && /* @__PURE__ */ e(
|
|
313
|
-
|
|
311
|
+
/* @__PURE__ */ e(D, {}),
|
|
312
|
+
l.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
313
|
+
Z,
|
|
314
314
|
{
|
|
315
|
-
subheader: /* @__PURE__ */ e(Te, { total: r, type:
|
|
315
|
+
subheader: /* @__PURE__ */ e(Te, { total: r, type: ne.INCOME }),
|
|
316
316
|
sx: { width: "100%" },
|
|
317
317
|
children: l.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
318
318
|
}
|
|
319
319
|
) }),
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
x.length > 0 && /* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(
|
|
321
|
+
Z,
|
|
322
322
|
{
|
|
323
|
-
subheader: /* @__PURE__ */ e(Te, { total:
|
|
323
|
+
subheader: /* @__PURE__ */ e(Te, { total: g, type: ne.EXPENSE }),
|
|
324
324
|
sx: { width: "100%" },
|
|
325
|
-
children:
|
|
325
|
+
children: x.map((d) => /* @__PURE__ */ e(Ee, { recurrence: d }, d.repeatingTransactionGuid))
|
|
326
326
|
}
|
|
327
327
|
) }),
|
|
328
328
|
/* @__PURE__ */ e(
|
|
329
329
|
It,
|
|
330
330
|
{
|
|
331
|
-
remaining: (c.available_balance || c.balance || 0) + r -
|
|
331
|
+
remaining: (c.available_balance || c.balance || 0) + r - g
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
]
|
|
@@ -338,13 +338,13 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
338
338
|
}) })
|
|
339
339
|
] });
|
|
340
340
|
}, Et = T(At), Tt = () => {
|
|
341
|
-
const { availableWidth: i } =
|
|
341
|
+
const { availableWidth: i } = re(), n = ae(), { cashflow: t } = L(), { upcomingExpenses: a, upcomingIncome: f } = U(), { dateRange: u, selectedCashAccounts: c } = Y(), l = [
|
|
342
342
|
{
|
|
343
343
|
field: "account",
|
|
344
344
|
flex: 1.5,
|
|
345
345
|
headerName: t.accounts,
|
|
346
|
-
renderCell: ({ value: { name: r, nickname:
|
|
347
|
-
const _ =
|
|
346
|
+
renderCell: ({ value: { name: r, nickname: g, institution_guid: d, account_number: b } }) => {
|
|
347
|
+
const _ = g || r;
|
|
348
348
|
return /* @__PURE__ */ o(s, { alignItems: "center", flexDirection: "row", gap: 12, children: [
|
|
349
349
|
/* @__PURE__ */ e(
|
|
350
350
|
ye,
|
|
@@ -354,7 +354,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
354
354
|
size: 16
|
|
355
355
|
}
|
|
356
356
|
),
|
|
357
|
-
/* @__PURE__ */ e(m, { variant: "body2", children: `${_} ${
|
|
357
|
+
/* @__PURE__ */ e(m, { variant: "body2", children: `${_} ${b ? `*${b}` : ""}` })
|
|
358
358
|
] });
|
|
359
359
|
}
|
|
360
360
|
},
|
|
@@ -363,21 +363,21 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
363
363
|
flex: 1,
|
|
364
364
|
headerName: t.balance,
|
|
365
365
|
type: "number",
|
|
366
|
-
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children:
|
|
366
|
+
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: J(r.value, "0,0.00") })
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
369
|
field: "income",
|
|
370
370
|
flex: 1,
|
|
371
371
|
headerName: t.projected_income,
|
|
372
372
|
type: "number",
|
|
373
|
-
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: `+${
|
|
373
|
+
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: `+${J(r.value, "0,0.00")}` })
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
376
|
field: "expenses",
|
|
377
377
|
flex: 1.1,
|
|
378
378
|
headerName: t.projected_expenses,
|
|
379
379
|
type: "number",
|
|
380
|
-
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: `-${
|
|
380
|
+
renderCell: (r) => /* @__PURE__ */ e(m, { color: n.palette.text.primary, variant: "body2", children: `-${J(r.value, "0,0.00")}` })
|
|
381
381
|
},
|
|
382
382
|
{
|
|
383
383
|
field: "remaining",
|
|
@@ -385,34 +385,34 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
385
385
|
headerName: t.remaining,
|
|
386
386
|
type: "number",
|
|
387
387
|
renderCell: (r) => {
|
|
388
|
-
const
|
|
388
|
+
const g = r.row.balance + r.row.income - r.row.expenses;
|
|
389
389
|
return /* @__PURE__ */ e(
|
|
390
390
|
m,
|
|
391
391
|
{
|
|
392
|
-
color: Math.sign(
|
|
392
|
+
color: Math.sign(g) === -1 ? n.palette.error.main : n.palette.text.primary,
|
|
393
393
|
variant: "body2",
|
|
394
|
-
children:
|
|
394
|
+
children: J(g, "0,0.00")
|
|
395
395
|
}
|
|
396
396
|
);
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
|
-
],
|
|
400
|
-
const
|
|
401
|
-
|
|
399
|
+
], x = h.useMemo(() => c.map((r) => {
|
|
400
|
+
const g = a.filter(
|
|
401
|
+
ie(r, { start: H(), end: _e(H(), 30) })
|
|
402
402
|
).reduce((_, w) => _ + w.amount, 0), d = f.filter(
|
|
403
|
-
|
|
404
|
-
).reduce((_, w) => _ + w.amount, 0),
|
|
403
|
+
ie(r, { start: H(), end: _e(H(), 30) })
|
|
404
|
+
).reduce((_, w) => _ + w.amount, 0), b = (r.balance || 0) + d - g;
|
|
405
405
|
return {
|
|
406
406
|
account: r,
|
|
407
407
|
balance: r.balance || 0,
|
|
408
408
|
id: r.guid,
|
|
409
409
|
income: d,
|
|
410
|
-
expenses:
|
|
411
|
-
remaining:
|
|
410
|
+
expenses: g,
|
|
411
|
+
remaining: b
|
|
412
412
|
};
|
|
413
413
|
}), [c, a, f]);
|
|
414
414
|
return /* @__PURE__ */ o(
|
|
415
|
-
|
|
415
|
+
I,
|
|
416
416
|
{
|
|
417
417
|
sx: {
|
|
418
418
|
width: "100%"
|
|
@@ -464,7 +464,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
464
464
|
disableRowSelectionOnClick: !0,
|
|
465
465
|
hideFooter: !0,
|
|
466
466
|
rowHeight: 48,
|
|
467
|
-
rows:
|
|
467
|
+
rows: x,
|
|
468
468
|
sx: {
|
|
469
469
|
border: "1px solid",
|
|
470
470
|
borderColor: "neutral.light",
|
|
@@ -484,10 +484,10 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
) :
|
|
488
|
-
const { name:
|
|
487
|
+
) : x.map((r) => {
|
|
488
|
+
const { name: g, nickname: d, institution_guid: b, account_number: _ } = r.account, w = d || g;
|
|
489
489
|
return /* @__PURE__ */ e(
|
|
490
|
-
|
|
490
|
+
Z,
|
|
491
491
|
{
|
|
492
492
|
sx: {
|
|
493
493
|
border: "1px solid",
|
|
@@ -495,7 +495,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
495
495
|
borderRadius: 1,
|
|
496
496
|
marginBottom: 24
|
|
497
497
|
},
|
|
498
|
-
children: /* @__PURE__ */ e(
|
|
498
|
+
children: /* @__PURE__ */ e(te, { sx: { minHeight: "auto" }, children: /* @__PURE__ */ o(s, { width: "100%", children: [
|
|
499
499
|
/* @__PURE__ */ o(
|
|
500
500
|
s,
|
|
501
501
|
{
|
|
@@ -510,7 +510,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
510
510
|
ye,
|
|
511
511
|
{
|
|
512
512
|
alt: t.institution_logo,
|
|
513
|
-
institutionGuid:
|
|
513
|
+
institutionGuid: b || "",
|
|
514
514
|
size: 16
|
|
515
515
|
}
|
|
516
516
|
),
|
|
@@ -520,7 +520,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
520
520
|
]
|
|
521
521
|
}
|
|
522
522
|
),
|
|
523
|
-
/* @__PURE__ */ e(
|
|
523
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
524
524
|
/* @__PURE__ */ o(
|
|
525
525
|
s,
|
|
526
526
|
{
|
|
@@ -535,7 +535,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
535
535
|
]
|
|
536
536
|
}
|
|
537
537
|
),
|
|
538
|
-
/* @__PURE__ */ e(
|
|
538
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
539
539
|
/* @__PURE__ */ o(
|
|
540
540
|
s,
|
|
541
541
|
{
|
|
@@ -550,7 +550,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
550
550
|
]
|
|
551
551
|
}
|
|
552
552
|
),
|
|
553
|
-
/* @__PURE__ */ e(
|
|
553
|
+
/* @__PURE__ */ e(D, { sx: { width: "100%" } }),
|
|
554
554
|
/* @__PURE__ */ e(
|
|
555
555
|
s,
|
|
556
556
|
{
|
|
@@ -579,7 +579,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
579
579
|
};
|
|
580
580
|
return h.useEffect(() => {
|
|
581
581
|
t(a === 0 ? "cash_flow_summary" : "cash_flow_details");
|
|
582
|
-
}, [a]), /* @__PURE__ */ o(
|
|
582
|
+
}, [a]), /* @__PURE__ */ o(I, { children: [
|
|
583
583
|
/* @__PURE__ */ o(
|
|
584
584
|
tt,
|
|
585
585
|
{
|
|
@@ -615,11 +615,11 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
615
615
|
]
|
|
616
616
|
}
|
|
617
617
|
),
|
|
618
|
-
/* @__PURE__ */ e(
|
|
619
|
-
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: a, children: /* @__PURE__ */ e(
|
|
620
|
-
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: a, children: /* @__PURE__ */ e(
|
|
618
|
+
/* @__PURE__ */ e(I, { sx: { mb: 32 } }),
|
|
619
|
+
/* @__PURE__ */ e(we, { index: 0, name: "cashflow", value: a, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Rt, {}) }) }),
|
|
620
|
+
/* @__PURE__ */ e(we, { index: 1, name: "cashflow", value: a, children: /* @__PURE__ */ e(I, { sx: { m: n ? 48 : 16 }, children: /* @__PURE__ */ e(Et, {}) }) })
|
|
621
621
|
] });
|
|
622
|
-
}, Nt = T(Lt),
|
|
622
|
+
}, Nt = T(Lt), oe = ({
|
|
623
623
|
amount: i,
|
|
624
624
|
isMobile: n = !1,
|
|
625
625
|
isTotal: t = !1,
|
|
@@ -644,73 +644,73 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
644
644
|
]
|
|
645
645
|
}
|
|
646
646
|
), Re = (i, n) => (t) => t.accountGuid && i.includes(t.accountGuid) && ($e(t.expectedDate) || He(t.expectedDate, n.start)) && We(t.expectedDate, n.end), kt = () => {
|
|
647
|
-
const { availableWidth: i } =
|
|
647
|
+
const { availableWidth: i } = re(), { cashflow: n } = L(), { income: t, isDataLoaded: a, upcomingExpenses: f, upcomingIncome: u } = U(), { selectedAccountGuids: c } = P(), { dateRange: l, selectedCashAccounts: x } = Y(), [r, g] = h.useState(!1), d = h.useMemo(
|
|
648
648
|
() => f.filter(Re(c, l)),
|
|
649
649
|
[l, c, f]
|
|
650
|
-
),
|
|
650
|
+
), b = h.useMemo(
|
|
651
651
|
() => u.filter(Re(c, l)),
|
|
652
652
|
[l, c, u]
|
|
653
653
|
), _ = h.useMemo(
|
|
654
|
-
() =>
|
|
655
|
-
[
|
|
656
|
-
), w = d.reduce((
|
|
657
|
-
return /* @__PURE__ */ o(s, { sx: { mx:
|
|
654
|
+
() => x.reduce((C, S) => C + (S?.balance || 0), 0),
|
|
655
|
+
[x]
|
|
656
|
+
), w = d.reduce((C, S) => C + S.amount, 0), v = b.reduce((C, S) => C + S.amount, 0), A = _ - w + v, O = a && t.length > 0, p = i < 725;
|
|
657
|
+
return /* @__PURE__ */ o(s, { sx: { mx: p ? 16 : 0, my: p ? 24 : 42 }, children: [
|
|
658
658
|
/* @__PURE__ */ o(
|
|
659
659
|
s,
|
|
660
660
|
{
|
|
661
|
-
border:
|
|
661
|
+
border: p ? "1px solid" : "none",
|
|
662
662
|
borderColor: "neutral.light",
|
|
663
663
|
borderRadius: 2,
|
|
664
|
-
flexDirection:
|
|
665
|
-
gap:
|
|
664
|
+
flexDirection: p ? "column" : "row",
|
|
665
|
+
gap: p ? 0 : 24,
|
|
666
666
|
justifyContent: "center",
|
|
667
667
|
children: [
|
|
668
668
|
/* @__PURE__ */ e(
|
|
669
|
-
|
|
669
|
+
oe,
|
|
670
670
|
{
|
|
671
671
|
amount: _,
|
|
672
|
-
isMobile:
|
|
673
|
-
label: $(n.cash_and_bank,
|
|
672
|
+
isMobile: p,
|
|
673
|
+
label: $(n.cash_and_bank, x.length)
|
|
674
674
|
}
|
|
675
675
|
),
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
!
|
|
676
|
+
p && /* @__PURE__ */ e(D, {}),
|
|
677
|
+
O ? /* @__PURE__ */ o(B, { children: [
|
|
678
|
+
!p && /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "+" }),
|
|
679
679
|
/* @__PURE__ */ e(
|
|
680
|
-
|
|
680
|
+
oe,
|
|
681
681
|
{
|
|
682
|
-
amount:
|
|
683
|
-
isMobile:
|
|
682
|
+
amount: v,
|
|
683
|
+
isMobile: p,
|
|
684
684
|
label: n.to_be_received,
|
|
685
|
-
symbol:
|
|
685
|
+
symbol: p ? "+" : void 0
|
|
686
686
|
}
|
|
687
687
|
)
|
|
688
688
|
] }) : /* @__PURE__ */ e(
|
|
689
689
|
G,
|
|
690
690
|
{
|
|
691
|
-
onClick: () =>
|
|
691
|
+
onClick: () => g(!0),
|
|
692
692
|
startIcon: /* @__PURE__ */ e(M, { name: "add" }),
|
|
693
693
|
sx: { fontSize: 13 },
|
|
694
694
|
children: n.add_income
|
|
695
695
|
}
|
|
696
696
|
),
|
|
697
|
-
|
|
697
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "-" }),
|
|
698
698
|
/* @__PURE__ */ e(
|
|
699
|
-
|
|
699
|
+
oe,
|
|
700
700
|
{
|
|
701
701
|
amount: w,
|
|
702
|
-
isMobile:
|
|
702
|
+
isMobile: p,
|
|
703
703
|
label: $(n.to_be_paid_out, d.length),
|
|
704
|
-
symbol:
|
|
704
|
+
symbol: p ? "-" : void 0
|
|
705
705
|
}
|
|
706
706
|
),
|
|
707
|
-
|
|
707
|
+
p ? /* @__PURE__ */ e(D, {}) : /* @__PURE__ */ e(m, { sx: { fontSize: 25, lineHeight: 1 }, children: "=" }),
|
|
708
708
|
/* @__PURE__ */ e(
|
|
709
|
-
|
|
709
|
+
oe,
|
|
710
710
|
{
|
|
711
|
-
amount:
|
|
712
|
-
isMobile:
|
|
713
|
-
isTotal:
|
|
711
|
+
amount: A,
|
|
712
|
+
isMobile: p,
|
|
713
|
+
isTotal: p,
|
|
714
714
|
label: n.remaining_cash,
|
|
715
715
|
tooltip: /* @__PURE__ */ e(
|
|
716
716
|
ue,
|
|
@@ -729,79 +729,78 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
729
729
|
{
|
|
730
730
|
ariaLabelClose: n.close_manage_income_aria,
|
|
731
731
|
isOpen: r,
|
|
732
|
-
onClose: () =>
|
|
732
|
+
onClose: () => g(!1),
|
|
733
733
|
shouldShowHeaderBorders: !1,
|
|
734
734
|
title: n.manage_income,
|
|
735
735
|
children: /* @__PURE__ */ e(st, {})
|
|
736
736
|
}
|
|
737
737
|
)
|
|
738
738
|
] });
|
|
739
|
-
}, Ot = T(kt), Ft = ({ onBackClick: i
|
|
740
|
-
const { selectedAccounts:
|
|
739
|
+
}, Ot = T(kt), Ft = ({ onBackClick: i }) => {
|
|
740
|
+
const { selectedAccounts: n, selectedAccountGuids: t, shouldDisableNextDate: a, shouldDisablePrevDate: f } = P(), { onEvent: u } = ke(), { clientConfig: c } = Ke(), { visibleCashAccounts: l } = Ne(), { setFilter: x } = Oe(), { dateRange: r, setSelectedCashAccounts: g } = Y(), { loadRepeatingTransactionData: d, isDataLoaded: b, setDateRange: _ } = U(), { cashflow: w, recurring: v } = L(), { isInitialized: A } = P(), p = c?.master?.deep_link_params?.view === "manage_income", [C, S] = h.useState(p);
|
|
741
741
|
return h.useEffect(() => {
|
|
742
|
-
|
|
742
|
+
_(r), b || d().finally();
|
|
743
743
|
}, []), h.useEffect(() => {
|
|
744
|
-
const
|
|
745
|
-
(
|
|
744
|
+
const se = l.map((W) => W.guid), Q = n.filter(
|
|
745
|
+
(W) => t.includes(W.guid) && se.includes(W.guid)
|
|
746
746
|
);
|
|
747
|
-
|
|
748
|
-
dateRange: { start: Me(
|
|
749
|
-
accounts:
|
|
747
|
+
g(Q), x({
|
|
748
|
+
dateRange: { start: Me(H(), 90), end: mt() },
|
|
749
|
+
accounts: Q.map((W) => W.guid)
|
|
750
750
|
});
|
|
751
|
-
}, [
|
|
751
|
+
}, [l, n]), Fe({
|
|
752
752
|
widgetName: "CashflowWidget",
|
|
753
|
-
isLoaded:
|
|
754
|
-
}),
|
|
753
|
+
isLoaded: b
|
|
754
|
+
}), A ? /* @__PURE__ */ o(
|
|
755
755
|
ut,
|
|
756
756
|
{
|
|
757
757
|
actions: [
|
|
758
758
|
{
|
|
759
|
-
label:
|
|
759
|
+
label: v.action_title,
|
|
760
760
|
iconName: "credit_card_gear",
|
|
761
761
|
onClick: () => {
|
|
762
|
-
|
|
762
|
+
S(!0), u(Ie.CASH_FLOW_CLICK_SETTINGS);
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
],
|
|
766
766
|
allowedAccountTypes: [
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
767
|
+
X.CASH,
|
|
768
|
+
X.CHECKING,
|
|
769
|
+
X.PREPAID,
|
|
770
|
+
X.SAVINGS,
|
|
771
|
+
X.CHECKING_LINE_OF_CREDIT
|
|
772
772
|
],
|
|
773
773
|
calendarActions: {
|
|
774
|
-
shouldDisableNext:
|
|
775
|
-
shouldDisablePrevious:
|
|
774
|
+
shouldDisableNext: a,
|
|
775
|
+
shouldDisablePrevious: f,
|
|
776
776
|
shouldDisablePicker: !0,
|
|
777
777
|
onRangeChanged: () => {
|
|
778
778
|
}
|
|
779
779
|
},
|
|
780
|
-
dateRange:
|
|
780
|
+
dateRange: r,
|
|
781
781
|
dateRangeVariant: "readonly",
|
|
782
|
-
onAccountsFilterClick: () =>
|
|
782
|
+
onAccountsFilterClick: () => u(Ie.CASH_FLOW_CLICK_FILTER),
|
|
783
783
|
onBackClick: i,
|
|
784
|
-
|
|
785
|
-
title: A.title,
|
|
784
|
+
title: w.title,
|
|
786
785
|
children: [
|
|
787
786
|
/* @__PURE__ */ e(Ot, {}),
|
|
788
787
|
/* @__PURE__ */ e(Nt, {}),
|
|
789
788
|
/* @__PURE__ */ e(
|
|
790
789
|
Ge,
|
|
791
790
|
{
|
|
792
|
-
ariaLabelClose:
|
|
793
|
-
isOpen:
|
|
794
|
-
onClose: () =>
|
|
791
|
+
ariaLabelClose: w.close_settings_aria,
|
|
792
|
+
isOpen: C,
|
|
793
|
+
onClose: () => S(!1),
|
|
795
794
|
shouldShowHeaderBorders: !1,
|
|
796
|
-
title:
|
|
797
|
-
children: /* @__PURE__ */ e(et, { defaultSelectedTab:
|
|
795
|
+
title: v.action_title,
|
|
796
|
+
children: /* @__PURE__ */ e(et, { defaultSelectedTab: p ? 1 : 0 })
|
|
798
797
|
}
|
|
799
798
|
)
|
|
800
799
|
]
|
|
801
800
|
}
|
|
802
|
-
) : /* @__PURE__ */ e(
|
|
801
|
+
) : /* @__PURE__ */ e(ee, {});
|
|
803
802
|
}, jn = T(Ft), Ht = ({ handleNextStep: i }) => {
|
|
804
|
-
const { completeOnboarding: n } = me(), { cashflow: t } = L(), a =
|
|
803
|
+
const { completeOnboarding: n } = me(), { cashflow: t } = L(), a = ae();
|
|
805
804
|
return /* @__PURE__ */ o(s, { children: [
|
|
806
805
|
/* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: t.welcome_title }),
|
|
807
806
|
/* @__PURE__ */ e(
|
|
@@ -817,7 +816,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
817
816
|
/* @__PURE__ */ o(s, { direction: "column", mb: 32, spacing: 32, children: [
|
|
818
817
|
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
819
818
|
/* @__PURE__ */ e(
|
|
820
|
-
|
|
819
|
+
I,
|
|
821
820
|
{
|
|
822
821
|
bgcolor: a.palette.primary.lighter,
|
|
823
822
|
borderRadius: 1,
|
|
@@ -833,7 +832,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
833
832
|
] }),
|
|
834
833
|
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
835
834
|
/* @__PURE__ */ e(
|
|
836
|
-
|
|
835
|
+
I,
|
|
837
836
|
{
|
|
838
837
|
bgcolor: a.palette.primary.lighter,
|
|
839
838
|
borderRadius: 1,
|
|
@@ -849,7 +848,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
849
848
|
] }),
|
|
850
849
|
/* @__PURE__ */ o(N, { sx: { display: "flex", alignItems: "center", fontSize: 18 }, children: [
|
|
851
850
|
/* @__PURE__ */ e(
|
|
852
|
-
|
|
851
|
+
I,
|
|
853
852
|
{
|
|
854
853
|
bgcolor: a.palette.primary.lighter,
|
|
855
854
|
borderRadius: 1,
|
|
@@ -887,22 +886,22 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
887
886
|
transform: rotate(360deg);
|
|
888
887
|
}
|
|
889
888
|
`, jt = () => {
|
|
890
|
-
const { addRepeatingTransaction: i, repeatingTransactions: n } = U(), { cashflow: t, common: a } = L(), { user: f } = Xe(), { completeOnboarding: u } = me(), { isDirty: c } = Y(), { isMobile: l } = pe(), { isCopyLoaded:
|
|
891
|
-
() =>
|
|
892
|
-
[ge,
|
|
889
|
+
const { addRepeatingTransaction: i, repeatingTransactions: n } = U(), { cashflow: t, common: a } = L(), { user: f } = Xe(), { completeOnboarding: u } = me(), { isDirty: c } = Y(), { isMobile: l } = pe(), { isCopyLoaded: x, setDisplayedDate: r } = P(), { filter: g, setFilter: d, transactions: b } = Oe(), _ = ae(), [w, v] = K(!0), [A, O] = h.useState(bt.EveryMonth), [p, C] = h.useState(1), [S, se] = h.useState(15), [Q, W] = K(!1), [ce, fe] = K(1), [k, ze] = K([]), [ge, le] = K(""), F = h.useMemo(
|
|
890
|
+
() => b.find((y) => y.guid === ge),
|
|
891
|
+
[ge, b]
|
|
893
892
|
), Be = !!n.filter(
|
|
894
|
-
(
|
|
893
|
+
(y) => y.repeating_transaction_type === ve.Income
|
|
895
894
|
).length, be = async () => {
|
|
896
895
|
fe(2), r(
|
|
897
896
|
// Beginning of the month, 90 days before today
|
|
898
|
-
ht(Me(
|
|
899
|
-
|
|
900
|
-
), d({ ...
|
|
897
|
+
ht(Me(H(), 90)),
|
|
898
|
+
H()
|
|
899
|
+
), d({ ...g, custom: Se }), fe(3);
|
|
901
900
|
}, Ue = async () => {
|
|
902
|
-
if (!(
|
|
903
|
-
|
|
904
|
-
for (let
|
|
905
|
-
const E =
|
|
901
|
+
if (!(k.length < 1)) {
|
|
902
|
+
W(!0);
|
|
903
|
+
for (let y = 0; y < k.length; y++) {
|
|
904
|
+
const E = k[y], xe = Ae(A, De(E.date)), qe = {
|
|
906
905
|
account_guid: E.account_guid,
|
|
907
906
|
amount: E.amount,
|
|
908
907
|
created_by: 0,
|
|
@@ -911,9 +910,9 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
911
910
|
description: E.feed_description || E.description,
|
|
912
911
|
predicted_occurs_on: pt(xe, { representation: "date" }),
|
|
913
912
|
recurrence_day: xe.getDay(),
|
|
914
|
-
recurrence_type:
|
|
913
|
+
recurrence_type: A,
|
|
915
914
|
repeating_transaction_type: ve.Income,
|
|
916
|
-
second_recurrence_day:
|
|
915
|
+
second_recurrence_day: S,
|
|
917
916
|
transaction_type: E.transaction_type,
|
|
918
917
|
user_guid: f.guid
|
|
919
918
|
};
|
|
@@ -921,9 +920,9 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
921
920
|
}
|
|
922
921
|
await u();
|
|
923
922
|
}
|
|
924
|
-
}, Pe = !
|
|
925
|
-
return
|
|
926
|
-
|
|
923
|
+
}, Pe = !F && w || !F && k.length < 1;
|
|
924
|
+
return x ? /* @__PURE__ */ o(
|
|
925
|
+
I,
|
|
927
926
|
{
|
|
928
927
|
sx: {
|
|
929
928
|
display: "flex",
|
|
@@ -936,8 +935,8 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
936
935
|
py: 24
|
|
937
936
|
},
|
|
938
937
|
children: [
|
|
939
|
-
|
|
940
|
-
|
|
938
|
+
ce === 1 && /* @__PURE__ */ e(
|
|
939
|
+
I,
|
|
941
940
|
{
|
|
942
941
|
sx: {
|
|
943
942
|
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
@@ -945,8 +944,8 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
945
944
|
children: /* @__PURE__ */ e(Wt, { handleNextStep: be })
|
|
946
945
|
}
|
|
947
946
|
),
|
|
948
|
-
|
|
949
|
-
|
|
947
|
+
ce === 2 && /* @__PURE__ */ e(
|
|
948
|
+
I,
|
|
950
949
|
{
|
|
951
950
|
sx: {
|
|
952
951
|
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
@@ -954,8 +953,8 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
954
953
|
children: /* @__PURE__ */ e(Gt, {})
|
|
955
954
|
}
|
|
956
955
|
),
|
|
957
|
-
|
|
958
|
-
|
|
956
|
+
ce === 3 && /* @__PURE__ */ o(
|
|
957
|
+
I,
|
|
959
958
|
{
|
|
960
959
|
sx: {
|
|
961
960
|
...l ? { display: "flex", flexDirection: "column", maxWidth: "100%", padding: "0 16px" } : { maxWidth: 590, ml: "40%", mr: 90 }
|
|
@@ -963,20 +962,20 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
963
962
|
children: [
|
|
964
963
|
/* @__PURE__ */ e(de, { pb: 12, variant: "h1", children: t.add_income_title }),
|
|
965
964
|
/* @__PURE__ */ e(N, { mb: 24, children: t.add_income_description }),
|
|
966
|
-
|
|
967
|
-
/* @__PURE__ */ e(
|
|
965
|
+
k.length > 0 && !F && /* @__PURE__ */ o(B, { children: [
|
|
966
|
+
/* @__PURE__ */ e(Z, { children: k.map((y, E) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
968
967
|
/* @__PURE__ */ e(ft, { bgcolor: "background.paper", children: xt(
|
|
969
|
-
z(
|
|
968
|
+
z(y.nextDate || y.date)
|
|
970
969
|
) }),
|
|
971
|
-
/* @__PURE__ */ e(gt, { transaction:
|
|
972
|
-
E !==
|
|
973
|
-
] },
|
|
970
|
+
/* @__PURE__ */ e(gt, { transaction: y }),
|
|
971
|
+
E !== k.length - 1 && /* @__PURE__ */ e(D, {})
|
|
972
|
+
] }, y.guid)) }),
|
|
974
973
|
/* @__PURE__ */ o(s, { alignItems: "center", direction: "row", children: [
|
|
975
|
-
/* @__PURE__ */ e(
|
|
974
|
+
/* @__PURE__ */ e(D, { sx: { flexGrow: 1 } }),
|
|
976
975
|
/* @__PURE__ */ e(
|
|
977
976
|
G,
|
|
978
977
|
{
|
|
979
|
-
onClick: () =>
|
|
978
|
+
onClick: () => v(!0),
|
|
980
979
|
startIcon: /* @__PURE__ */ e(M, { name: "add", size: 20 }),
|
|
981
980
|
children: t.add_income
|
|
982
981
|
}
|
|
@@ -987,42 +986,42 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
987
986
|
ct,
|
|
988
987
|
{
|
|
989
988
|
bgcolor: "background.paper",
|
|
990
|
-
onSearch: (
|
|
991
|
-
...
|
|
992
|
-
custom: (E) =>
|
|
989
|
+
onSearch: (y) => d({
|
|
990
|
+
...g,
|
|
991
|
+
custom: (E) => y ? lt(E, y) : Se(E)
|
|
993
992
|
}),
|
|
994
|
-
onSelected: (
|
|
995
|
-
le(
|
|
993
|
+
onSelected: (y) => {
|
|
994
|
+
le(y), v(!1);
|
|
996
995
|
}
|
|
997
996
|
}
|
|
998
997
|
),
|
|
999
998
|
!Be && c && /* @__PURE__ */ e(N, { color: "error", mt: 16, children: t.confirm_error }),
|
|
1000
|
-
|
|
999
|
+
F && /* @__PURE__ */ o(B, { children: [
|
|
1001
1000
|
/* @__PURE__ */ e(
|
|
1002
1001
|
dt,
|
|
1003
1002
|
{
|
|
1004
1003
|
bgcolor: "background.paper",
|
|
1005
|
-
firstDay:
|
|
1006
|
-
frequency:
|
|
1007
|
-
onFirstDayChange:
|
|
1008
|
-
onFrequencyChange:
|
|
1009
|
-
onSecondDayChange:
|
|
1010
|
-
secondDay:
|
|
1011
|
-
transaction:
|
|
1004
|
+
firstDay: p,
|
|
1005
|
+
frequency: A,
|
|
1006
|
+
onFirstDayChange: C,
|
|
1007
|
+
onFrequencyChange: O,
|
|
1008
|
+
onSecondDayChange: se,
|
|
1009
|
+
secondDay: S,
|
|
1010
|
+
transaction: F
|
|
1012
1011
|
}
|
|
1013
1012
|
),
|
|
1014
1013
|
/* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1015
1014
|
/* @__PURE__ */ e(
|
|
1016
1015
|
G,
|
|
1017
1016
|
{
|
|
1018
|
-
"aria-disabled": !
|
|
1017
|
+
"aria-disabled": !F,
|
|
1019
1018
|
onClick: () => {
|
|
1020
|
-
const
|
|
1021
|
-
|
|
1022
|
-
...
|
|
1023
|
-
nextDate: Ae(
|
|
1024
|
-
frequency:
|
|
1025
|
-
}), ze(
|
|
1019
|
+
const y = [...k];
|
|
1020
|
+
y.push({
|
|
1021
|
+
...F,
|
|
1022
|
+
nextDate: Ae(A, De(F.date)),
|
|
1023
|
+
frequency: A
|
|
1024
|
+
}), ze(y), le("");
|
|
1026
1025
|
},
|
|
1027
1026
|
variant: "contained",
|
|
1028
1027
|
children: a.confirm_button
|
|
@@ -1032,7 +1031,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
1032
1031
|
G,
|
|
1033
1032
|
{
|
|
1034
1033
|
onClick: () => {
|
|
1035
|
-
le(""),
|
|
1034
|
+
le(""), v(!0), be().finally();
|
|
1036
1035
|
},
|
|
1037
1036
|
variant: "outlined",
|
|
1038
1037
|
children: a.cancel_button
|
|
@@ -1040,13 +1039,13 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
1040
1039
|
)
|
|
1041
1040
|
] })
|
|
1042
1041
|
] }),
|
|
1043
|
-
|
|
1042
|
+
k.length > 0 && !F && /* @__PURE__ */ o(s, { direction: "row", gap: 16, ml: 24, mt: 32, children: [
|
|
1044
1043
|
/* @__PURE__ */ e(
|
|
1045
1044
|
G,
|
|
1046
1045
|
{
|
|
1047
|
-
"aria-disabled":
|
|
1046
|
+
"aria-disabled": k.length < 1 || Q,
|
|
1048
1047
|
onClick: Ue,
|
|
1049
|
-
startIcon:
|
|
1048
|
+
startIcon: Q ? /* @__PURE__ */ e(
|
|
1050
1049
|
M,
|
|
1051
1050
|
{
|
|
1052
1051
|
name: "progress_activity",
|
|
@@ -1066,7 +1065,7 @@ const Dt = ({ recurrence: i }) => /* @__PURE__ */ o(B, { children: [
|
|
|
1066
1065
|
)
|
|
1067
1066
|
]
|
|
1068
1067
|
}
|
|
1069
|
-
) : /* @__PURE__ */ e(
|
|
1068
|
+
) : /* @__PURE__ */ e(ee, {});
|
|
1070
1069
|
}, zn = T(jt);
|
|
1071
1070
|
class Bn {
|
|
1072
1071
|
fetchInstance;
|