@mx-cartographer/experiences 7.0.40 → 7.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cashflow/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +300 -299
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## [7.0.42] - 10-06-2025
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Dashboard | `cashFlowWidget` - Increased mobile view breakpoint from 610px to 710px to prevent layout breakage with long amount values.
|
|
4
|
+
|
|
5
|
+
## [7.0.41] - 10-06-2025
|
|
6
|
+
|
|
7
|
+
- **UPDATED** - Bug Fixed - Upcomig and Past tabs Divider has too much padding on both sides in the mobile view
|
|
8
|
+
|
|
1
9
|
## [7.0.40] - 10-04-2025
|
|
2
10
|
|
|
3
11
|
- **FIXED** - Allow deletion of existing goals without account link
|
|
@@ -95,7 +95,7 @@ const K = () => {
|
|
|
95
95
|
() => G - W,
|
|
96
96
|
[G, W]
|
|
97
97
|
), A = g?.has_completed_cash_flow_onboarding && !!i;
|
|
98
|
-
return N ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t >
|
|
98
|
+
return N ? /* @__PURE__ */ e(I, { className: "mx-cashflow", pl: 16, pr: 16, pt: 16, children: t > 710 ? /* @__PURE__ */ o(
|
|
99
99
|
r,
|
|
100
100
|
{
|
|
101
101
|
border: `1px solid ${n.palette.border.light}`,
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as X } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
3
|
import { observer as D } from "mobx-react-lite";
|
|
4
4
|
import { endOfMonth as B } from "date-fns/endOfMonth";
|
|
5
|
-
import { endOfToday as
|
|
6
|
-
import { startOfMonth as
|
|
7
|
-
import { startOfToday as
|
|
8
|
-
import { subDays as
|
|
9
|
-
import
|
|
5
|
+
import { endOfToday as de } from "date-fns/endOfToday";
|
|
6
|
+
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
7
|
+
import { startOfToday as ue } from "date-fns/startOfToday";
|
|
8
|
+
import { subDays as me } from "date-fns/subDays";
|
|
9
|
+
import ae from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
11
|
import { R as ze } from "../RecurringSettings-RduF8gt3.mjs";
|
|
12
12
|
import { M as An } from "../RecurringSettings-RduF8gt3.mjs";
|
|
13
13
|
import { addMonths as Be } from "date-fns/addMonths";
|
|
14
14
|
import { subMonths as Ue } from "date-fns/subMonths";
|
|
15
15
|
import { isBefore as Fe } from "date-fns/isBefore";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
16
|
+
import se from "@mui/material/Unstable_Grid2";
|
|
17
|
+
import De from "@mui/material/IconButton";
|
|
18
|
+
import Se from "@mui/material/Tab";
|
|
19
19
|
import je from "@mui/material/Tabs";
|
|
20
|
-
import { Schedule as Ke, MonetizationOn as Ye, Cancel as
|
|
21
|
-
import { Text as
|
|
22
|
-
import { getWeeksInMonth as
|
|
23
|
-
import
|
|
20
|
+
import { Schedule as Ke, MonetizationOn as Ye, Cancel as Ae, CheckCircle as Ee, ChevronLeft as Ve, ChevronRight as Xe, CurrencyExchange as Ze } from "@mxenabled/mx-icons";
|
|
21
|
+
import { Text as p, MerchantLogo as pe, InstitutionLogo as qe, H3 as Je, P as ce } from "@mxenabled/mxui";
|
|
22
|
+
import { getWeeksInMonth as Ie } from "date-fns/getWeeksInMonth";
|
|
23
|
+
import ge from "@mui/material/styles/useTheme";
|
|
24
24
|
import { AdapterDateFns as Qe } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
25
25
|
import { DateCalendar as et } from "@mui/x-date-pickers/DateCalendar";
|
|
26
26
|
import { LocalizationProvider as tt } from "@mui/x-date-pickers/LocalizationProvider";
|
|
27
27
|
import { isSameDay as nt } from "date-fns/isSameDay";
|
|
28
28
|
import it from "@mui/material/Badge";
|
|
29
29
|
import { PickersDay as rt } from "@mui/x-date-pickers/PickersDay";
|
|
30
|
-
import { I as
|
|
31
|
-
import { u as S, a as
|
|
32
|
-
import { c as M, a as T, g as
|
|
30
|
+
import { I as Z } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
+
import { u as S, a as q, i as w, f as J, p as Ge, c as he, g as fe } from "../hooks-BAAimqdq.mjs";
|
|
32
|
+
import { c as M, a as T, g as _e, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
33
|
import { T as H } from "../RecurringTransactionsStore-DeLXfuC4.mjs";
|
|
34
34
|
import { R as Gn } from "../RecurringTransactionsStore-DeLXfuC4.mjs";
|
|
35
|
-
import { A as
|
|
35
|
+
import { A as _, W as at } from "../WidgetContainer-ztkGgdIH.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
37
|
+
import le from "@mui/material/Divider";
|
|
38
|
+
import we from "@mui/material/List";
|
|
39
|
+
import Ne from "@mui/material/ListItem";
|
|
40
40
|
import ct from "@mui/material/ListSubheader";
|
|
41
41
|
import lt from "@mui/material/ListItemAvatar";
|
|
42
42
|
import dt from "@mui/material/ListItemButton";
|
|
@@ -44,48 +44,48 @@ import ut from "@mui/material/ListItemText";
|
|
|
44
44
|
import { b as mt } from "../ManageIncome-4_bSdxXr.mjs";
|
|
45
45
|
import { c as On, M as kn, S as Wn } from "../ManageIncome-4_bSdxXr.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
|
-
import { D as
|
|
48
|
-
import { b as
|
|
47
|
+
import { D as Oe } from "../Drawer-kEE73B87.mjs";
|
|
48
|
+
import { b as N } from "../Localization-2MODESHW.mjs";
|
|
49
49
|
import { f as A, D as E } from "../Dialog-CWW597AF.mjs";
|
|
50
|
-
import
|
|
51
|
-
import { S as
|
|
52
|
-
import { u as
|
|
53
|
-
import { L as
|
|
50
|
+
import O from "@mui/material/Box";
|
|
51
|
+
import { S as ke } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
|
+
import { u as xe } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
|
+
import { L as V } from "../Loader-DUaFpDGv.mjs";
|
|
54
54
|
import { M as pt } from "../MiniWidgetContainer-BhHaL8eb.mjs";
|
|
55
55
|
import { u as gt } from "../useDimensions-27p2evRx.mjs";
|
|
56
56
|
import { M as ht } from "../MicroWidgetContainer-Dpu8VDSP.mjs";
|
|
57
|
-
const
|
|
57
|
+
const Q = {
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
},
|
|
61
|
+
}, ee = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ke, { color: "primary", filled: !0, sx: { fontSize: n, ...Q } }) }), Ce = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(
|
|
62
62
|
Ye,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
|
-
sx: { color: "categories.income", fontSize: n, ...
|
|
65
|
+
sx: { color: "categories.income", fontSize: n, ...Q }
|
|
66
66
|
}
|
|
67
|
-
) }),
|
|
67
|
+
) }), be = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ae, { color: "error", filled: !0, sx: { fontSize: n, ...Q } }) }), Re = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Z, { size: n, sx: { ...ee(t) }, children: /* @__PURE__ */ e(Ee, { color: "success", filled: !0, sx: { fontSize: n, ...Q } }) }), ft = D(
|
|
68
68
|
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
69
|
-
const { recurring: a } = S(), { selectedAccountGuids: r } =
|
|
69
|
+
const { recurring: a } = S(), { selectedAccountGuids: r } = q(), { recurrences: l, setSelectedDay: m } = w(), s = h.useMemo(
|
|
70
70
|
() => l.filter((d) => r.includes(d.accountGuid)),
|
|
71
71
|
[r, l]
|
|
72
72
|
).filter(
|
|
73
73
|
(d) => nt(d.occurredOnDate || d.expectedDate, t)
|
|
74
|
-
),
|
|
74
|
+
), u = s.some(
|
|
75
75
|
(d) => d.type !== M.Income && d.status === T.Upcoming
|
|
76
76
|
), f = s.some(
|
|
77
77
|
(d) => d.type !== M.Income && d.status === T.Missed
|
|
78
78
|
), x = s.some(
|
|
79
79
|
(d) => d.type !== M.Income && d.status === T.Paid
|
|
80
|
-
), C = s.some((d) => d.type === M.Income), y = (
|
|
80
|
+
), C = s.some((d) => d.type === M.Income), y = (u ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (C ? 1 : 0);
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
82
|
it,
|
|
83
83
|
{
|
|
84
|
-
badgeContent: s.length > 0 && /* @__PURE__ */ o(
|
|
85
|
-
f && /* @__PURE__ */ e(
|
|
86
|
-
x && /* @__PURE__ */ e(
|
|
87
|
-
|
|
88
|
-
C && /* @__PURE__ */ e(
|
|
84
|
+
badgeContent: s.length > 0 && /* @__PURE__ */ o(X, { children: [
|
|
85
|
+
f && /* @__PURE__ */ e(be, { isOffset: !0 }),
|
|
86
|
+
x && /* @__PURE__ */ e(Re, { isOffset: !0 }),
|
|
87
|
+
u && /* @__PURE__ */ e(ye, { isOffset: !0 }),
|
|
88
|
+
C && /* @__PURE__ */ e(Ce, { isOffset: !0 })
|
|
89
89
|
] }),
|
|
90
90
|
overlap: "circular",
|
|
91
91
|
sx: {
|
|
@@ -101,10 +101,10 @@ const q = {
|
|
|
101
101
|
"aria-label": `
|
|
102
102
|
${x && a.paid},
|
|
103
103
|
${f && a.missed},
|
|
104
|
-
${
|
|
104
|
+
${u && a.upcoming},
|
|
105
105
|
${C && a.income}`,
|
|
106
106
|
day: t,
|
|
107
|
-
onClick: () =>
|
|
107
|
+
onClick: () => m(t),
|
|
108
108
|
outsideCurrentMonth: n,
|
|
109
109
|
sx: {
|
|
110
110
|
"&.MuiPickersDay-root": {
|
|
@@ -119,9 +119,9 @@ const q = {
|
|
|
119
119
|
}
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
|
-
),
|
|
122
|
+
), Y = ({ icon: t, label: n }) => /* @__PURE__ */ o(c, { alignItems: "center", flexDirection: "row", sx: { gap: 6 }, children: [
|
|
123
123
|
/* @__PURE__ */ e(t, {}),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
124
|
+
/* @__PURE__ */ e(p, { variant: "XSmall", children: n })
|
|
125
125
|
] }), xt = D(() => {
|
|
126
126
|
const { recurring: t } = S();
|
|
127
127
|
return /* @__PURE__ */ o(
|
|
@@ -134,26 +134,26 @@ const q = {
|
|
|
134
134
|
justifyContent: "center",
|
|
135
135
|
mt: 12,
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */ e(
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
-
/* @__PURE__ */ e(
|
|
137
|
+
/* @__PURE__ */ e(Y, { icon: ye, label: t.expense }),
|
|
138
|
+
/* @__PURE__ */ e(Y, { icon: Ce, label: t.income }),
|
|
139
|
+
/* @__PURE__ */ e(Y, { icon: be, label: t.missed }),
|
|
140
|
+
/* @__PURE__ */ e(Y, { icon: Re, label: t.paid })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
}),
|
|
145
|
-
const t =
|
|
146
|
-
|
|
147
|
-
),
|
|
148
|
-
l(
|
|
149
|
-
start:
|
|
144
|
+
}), ve = 58, We = D(() => {
|
|
145
|
+
const t = ge(), { onEvent: n } = J(), { selectedDay: i, setDateRange: a } = w(), [r, l] = h.useState(
|
|
146
|
+
Ie(/* @__PURE__ */ new Date()) * H + ve
|
|
147
|
+
), m = (s) => {
|
|
148
|
+
l(Ie(s) * H + ve), a({
|
|
149
|
+
start: k(s),
|
|
150
150
|
end: B(s)
|
|
151
|
-
}), n(
|
|
152
|
-
},
|
|
151
|
+
}), n(_.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
152
|
+
}, g = /* @__PURE__ */ e(
|
|
153
153
|
et,
|
|
154
154
|
{
|
|
155
|
-
minDate:
|
|
156
|
-
onMonthChange:
|
|
155
|
+
minDate: k(/* @__PURE__ */ new Date()),
|
|
156
|
+
onMonthChange: m,
|
|
157
157
|
showDaysOutsideCurrentMonth: !0,
|
|
158
158
|
slots: {
|
|
159
159
|
day: ft
|
|
@@ -201,25 +201,25 @@ const q = {
|
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
203
|
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(tt, { dateAdapter: Qe, children: [
|
|
204
|
-
i &&
|
|
205
|
-
!i &&
|
|
204
|
+
i && g,
|
|
205
|
+
!i && g,
|
|
206
206
|
/* @__PURE__ */ e(xt, {})
|
|
207
207
|
] }) });
|
|
208
208
|
}), yt = (t) => {
|
|
209
209
|
if (t.type === M.Income)
|
|
210
|
-
return /* @__PURE__ */ e(
|
|
210
|
+
return /* @__PURE__ */ e(Ce, {});
|
|
211
211
|
switch (t.status) {
|
|
212
212
|
case T.Missed:
|
|
213
|
-
return /* @__PURE__ */ e(Ce, {});
|
|
214
|
-
case T.Paid:
|
|
215
213
|
return /* @__PURE__ */ e(be, {});
|
|
214
|
+
case T.Paid:
|
|
215
|
+
return /* @__PURE__ */ e(Re, {});
|
|
216
216
|
default:
|
|
217
|
-
return /* @__PURE__ */ e(
|
|
217
|
+
return /* @__PURE__ */ e(ye, {});
|
|
218
218
|
}
|
|
219
219
|
}, Ct = (t, n) => {
|
|
220
220
|
switch (t.status) {
|
|
221
221
|
case T.Paid:
|
|
222
|
-
return t.expectedDate ?
|
|
222
|
+
return t.expectedDate ? N(
|
|
223
223
|
n.paid_on,
|
|
224
224
|
A(
|
|
225
225
|
t.occurredOnDate || t.expectedDate,
|
|
@@ -227,37 +227,37 @@ const q = {
|
|
|
227
227
|
)
|
|
228
228
|
) : n.paid;
|
|
229
229
|
case T.Missed:
|
|
230
|
-
return
|
|
230
|
+
return N(
|
|
231
231
|
n.missed_on,
|
|
232
232
|
A(t.expectedDate, E.MONTH_DAY)
|
|
233
233
|
);
|
|
234
234
|
case T.Upcoming:
|
|
235
|
-
return
|
|
235
|
+
return N(
|
|
236
236
|
n.upcoming_on,
|
|
237
237
|
A(t.expectedDate, E.MONTH_DAY)
|
|
238
238
|
);
|
|
239
239
|
default:
|
|
240
240
|
return n.unknown;
|
|
241
241
|
}
|
|
242
|
-
},
|
|
242
|
+
}, Me = ({
|
|
243
243
|
recurrence: t,
|
|
244
244
|
isMini: n = !1,
|
|
245
245
|
onRecurrenceClick: i = () => {
|
|
246
246
|
},
|
|
247
247
|
showOrdinal: a = !1
|
|
248
248
|
}) => {
|
|
249
|
-
const { recurring: r } = S(), { repeatingTransactions: l } =
|
|
250
|
-
() => l.find((
|
|
249
|
+
const { recurring: r } = S(), { repeatingTransactions: l } = w(), [m, g] = h.useState(!1), s = h.useMemo(
|
|
250
|
+
() => l.find((b) => b.guid === t.repeatingTransactionGuid),
|
|
251
251
|
[t, l]
|
|
252
|
-
),
|
|
252
|
+
), u = t.type === M.Income, f = t.status === T.Paid, x = t.status === T.Missed, C = t.status === T.Upcoming;
|
|
253
253
|
let y = r.paid?.toLowerCase();
|
|
254
|
-
return x ? y = r.missed?.toLowerCase() : C && (y = a ?
|
|
255
|
-
/* @__PURE__ */ o(
|
|
254
|
+
return x ? y = r.missed?.toLowerCase() : C && (y = a ? _e(r, s || {}, !0) : _e(r, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
255
|
+
/* @__PURE__ */ o(Ne, { disableGutters: !0, disablePadding: !0, children: [
|
|
256
256
|
/* @__PURE__ */ o(dt, { onClick: () => {
|
|
257
|
-
|
|
257
|
+
g(!0), i(t);
|
|
258
258
|
}, children: [
|
|
259
259
|
/* @__PURE__ */ e(lt, { children: /* @__PURE__ */ e(
|
|
260
|
-
|
|
260
|
+
pe,
|
|
261
261
|
{
|
|
262
262
|
categoryGuid: t.categoryGuid,
|
|
263
263
|
merchantGuid: t.merchantGuid
|
|
@@ -271,11 +271,11 @@ const q = {
|
|
|
271
271
|
sx: { justifyContent: "space-between", textOverflow: "ellipsis", textWrap: "nowrap" },
|
|
272
272
|
children: [
|
|
273
273
|
/* @__PURE__ */ o(c, { direction: "column", width: "50%", children: [
|
|
274
|
-
/* @__PURE__ */ e(
|
|
274
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: t.name }),
|
|
275
275
|
/* @__PURE__ */ e(c, { alignItems: "center", direction: "row", gap: 6, children: n ? /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
276
276
|
yt(t),
|
|
277
|
-
/* @__PURE__ */ e(
|
|
278
|
-
] }) : /* @__PURE__ */ o(
|
|
277
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: Ct(t, r) })
|
|
278
|
+
] }) : /* @__PURE__ */ o(X, { children: [
|
|
279
279
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
280
280
|
qe,
|
|
281
281
|
{
|
|
@@ -284,12 +284,12 @@ const q = {
|
|
|
284
284
|
size: 12
|
|
285
285
|
}
|
|
286
286
|
),
|
|
287
|
-
/* @__PURE__ */ e(
|
|
287
|
+
/* @__PURE__ */ e(p, { sx: { maxWidth: 250 }, variant: "caption", children: t.institutionName })
|
|
288
288
|
] }) })
|
|
289
289
|
] }),
|
|
290
290
|
/* @__PURE__ */ o(c, { alignItems: "flex-end", width: "100%", children: [
|
|
291
|
-
/* @__PURE__ */ o(
|
|
292
|
-
|
|
291
|
+
/* @__PURE__ */ o(p, { bold: !0, color: u ? "success.main" : "text.primary", variant: "body1", children: [
|
|
292
|
+
u ? "+" : "",
|
|
293
293
|
L(t.amount, "0,0.00")
|
|
294
294
|
] }),
|
|
295
295
|
!n && /* @__PURE__ */ o(
|
|
@@ -304,9 +304,9 @@ const q = {
|
|
|
304
304
|
width: "100%"
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
f && /* @__PURE__ */ e(
|
|
308
|
-
x && /* @__PURE__ */ e(
|
|
309
|
-
/* @__PURE__ */ e(
|
|
307
|
+
f && /* @__PURE__ */ e(Ee, { color: "success", filled: !0, size: 12 }),
|
|
308
|
+
x && /* @__PURE__ */ e(Ae, { color: "error", filled: !0, size: 12 }),
|
|
309
|
+
/* @__PURE__ */ e(p, { bold: !0, color: "text.secondary", variant: "caption", children: y })
|
|
310
310
|
]
|
|
311
311
|
}
|
|
312
312
|
)
|
|
@@ -316,16 +316,16 @@ const q = {
|
|
|
316
316
|
) })
|
|
317
317
|
] }),
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
319
|
+
Oe,
|
|
320
320
|
{
|
|
321
321
|
ariaLabelClose: r.close_drawer_aria,
|
|
322
|
-
isOpen:
|
|
323
|
-
onClose: () =>
|
|
322
|
+
isOpen: m,
|
|
323
|
+
onClose: () => g(!1),
|
|
324
324
|
title: t.type === M.Income ? r.income_details : r.expense_details,
|
|
325
325
|
children: s && /* @__PURE__ */ e(
|
|
326
326
|
mt,
|
|
327
327
|
{
|
|
328
|
-
onDeleted: () =>
|
|
328
|
+
onDeleted: () => g(!1),
|
|
329
329
|
recurringTransaction: s
|
|
330
330
|
}
|
|
331
331
|
)
|
|
@@ -341,36 +341,36 @@ const q = {
|
|
|
341
341
|
sx: r = {},
|
|
342
342
|
title: l
|
|
343
343
|
}) => {
|
|
344
|
-
const { recurring:
|
|
344
|
+
const { recurring: m } = S(), g = h.useMemo(() => ot(t), [t]);
|
|
345
345
|
return /* @__PURE__ */ o(c, { sx: { gap: 8, mt: 4, ...r }, children: [
|
|
346
346
|
l && /* @__PURE__ */ o(
|
|
347
347
|
c,
|
|
348
348
|
{
|
|
349
349
|
sx: { alignItems: "top", direction: "row", justifyContent: "space-between", px: 24 },
|
|
350
350
|
children: [
|
|
351
|
-
/* @__PURE__ */ e(
|
|
352
|
-
i && /* @__PURE__ */ e(st, { onClick: i, sx: { mt: -12 }, variant: "text", children:
|
|
351
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: l }),
|
|
352
|
+
i && /* @__PURE__ */ e(st, { onClick: i, sx: { mt: -12 }, variant: "text", children: m.reset })
|
|
353
353
|
]
|
|
354
354
|
}
|
|
355
355
|
),
|
|
356
|
-
t.length === 0 ? /* @__PURE__ */ e(
|
|
356
|
+
t.length === 0 ? /* @__PURE__ */ e(p, { fontStyle: "italic", sx: { py: 24, textAlign: "center" }, children: m.no_activities }) : /* @__PURE__ */ e(we, { children: n ? t.map((s, u) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
357
357
|
/* @__PURE__ */ e(
|
|
358
|
-
|
|
358
|
+
Me,
|
|
359
359
|
{
|
|
360
360
|
isMini: n,
|
|
361
361
|
onRecurrenceClick: a,
|
|
362
362
|
recurrence: s
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
|
-
/* @__PURE__ */ e(
|
|
366
|
-
] }, `recurrence-${
|
|
367
|
-
/* @__PURE__ */ e(
|
|
368
|
-
|
|
365
|
+
/* @__PURE__ */ e(le, { sx: { mx: 24 } })
|
|
366
|
+
] }, `recurrence-${u}`)) : g.map((s, u) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
367
|
+
/* @__PURE__ */ e(Ne, { children: /* @__PURE__ */ e(
|
|
368
|
+
we,
|
|
369
369
|
{
|
|
370
|
-
subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(
|
|
370
|
+
subheader: /* @__PURE__ */ e(ct, { sx: { bgcolor: "background.paper", ml: 8, pb: 4, pt: 12 }, children: /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: A(s.date, E.DAY_OF_WEEK_MONTH_DAY) }) }),
|
|
371
371
|
sx: { width: "100%" },
|
|
372
372
|
children: s.recurrences.map((f, x) => /* @__PURE__ */ e(h.Fragment, { children: /* @__PURE__ */ e(
|
|
373
|
-
|
|
373
|
+
Me,
|
|
374
374
|
{
|
|
375
375
|
isMini: n,
|
|
376
376
|
onRecurrenceClick: a,
|
|
@@ -379,176 +379,177 @@ const q = {
|
|
|
379
379
|
) }, `day-recurrence-${x}`))
|
|
380
380
|
}
|
|
381
381
|
) }, s.id),
|
|
382
|
-
/* @__PURE__ */ e(
|
|
383
|
-
] }, `recurrence-${
|
|
382
|
+
/* @__PURE__ */ e(le, { sx: { mx: 24 } })
|
|
383
|
+
] }, `recurrence-${u}`)) })
|
|
384
384
|
] });
|
|
385
385
|
}
|
|
386
|
-
),
|
|
387
|
-
({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming:
|
|
388
|
-
const
|
|
389
|
-
const x = [{ color:
|
|
390
|
-
return i && x.push({ color:
|
|
386
|
+
), Le = D(
|
|
387
|
+
({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming: m }) => {
|
|
388
|
+
const g = ge(), { isSmallMobile: s } = xe(), { recurring: u } = S(), f = h.useMemo(() => {
|
|
389
|
+
const x = [{ color: g.palette.success.main, percentage: `${a / t}` }];
|
|
390
|
+
return i && x.push({ color: g.palette.error.main, percentage: `${i / t}` }), x;
|
|
391
391
|
}, [a, t, i]);
|
|
392
392
|
return /* @__PURE__ */ o(c, { children: [
|
|
393
393
|
/* @__PURE__ */ o(c, { sx: { flexDirection: "row", justifyContent: "space-between", pb: 12 }, children: [
|
|
394
|
-
/* @__PURE__ */ e(
|
|
395
|
-
/* @__PURE__ */ e(
|
|
394
|
+
/* @__PURE__ */ e(p, { bold: !0, variant: "body1", children: `${r} (${l})` }),
|
|
395
|
+
/* @__PURE__ */ e(p, { bold: !0, color: n ? "text.primary" : "success.main", variant: "body1", children: `${n ? "-" : "+"}${L(t, "0,0.00")}` })
|
|
396
396
|
] }),
|
|
397
|
-
/* @__PURE__ */ e(
|
|
397
|
+
/* @__PURE__ */ e(ke, { data: f, height: 12 }),
|
|
398
398
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2, my: 8 }, children: [
|
|
399
|
-
/* @__PURE__ */ e(
|
|
400
|
-
!s && /* @__PURE__ */ e(
|
|
401
|
-
/* @__PURE__ */ e(
|
|
402
|
-
i !== void 0 && /* @__PURE__ */ o(
|
|
403
|
-
/* @__PURE__ */ e(
|
|
404
|
-
!s && /* @__PURE__ */ e(
|
|
405
|
-
/* @__PURE__ */ e(
|
|
399
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "success.main", height: 8, mr: 8, width: 8 } }),
|
|
400
|
+
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(a, "0,0.00") }),
|
|
401
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: u.paid?.toLowerCase() }),
|
|
402
|
+
i !== void 0 && /* @__PURE__ */ o(X, { children: [
|
|
403
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "error.main", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
404
|
+
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(i, "0,0.00") }),
|
|
405
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: u.missed?.toLowerCase() })
|
|
406
406
|
] }),
|
|
407
|
-
/* @__PURE__ */ e(
|
|
408
|
-
!s && /* @__PURE__ */ e(
|
|
409
|
-
/* @__PURE__ */ e(
|
|
407
|
+
/* @__PURE__ */ e(O, { sx: { bgcolor: "divider", height: 8, ml: 16, mr: 8, width: 8 } }),
|
|
408
|
+
!s && /* @__PURE__ */ e(p, { bold: !0, variant: "body2", children: L(m, "0,0.00") }),
|
|
409
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: u.upcoming })
|
|
410
410
|
] })
|
|
411
411
|
] });
|
|
412
412
|
}
|
|
413
413
|
), bt = D(() => {
|
|
414
|
-
const { recurring: t } = S(), { availableWidth: n } =
|
|
415
|
-
currentMonthExpenses:
|
|
416
|
-
currentMonthIncome:
|
|
417
|
-
dateRange:
|
|
418
|
-
expenseTotal:
|
|
419
|
-
incomeTotal:
|
|
420
|
-
missedExpenseTotal:
|
|
421
|
-
pastRecurrences:
|
|
422
|
-
paidExpenseTotal:
|
|
423
|
-
paidIncomeTotal:
|
|
424
|
-
selectedDay:
|
|
425
|
-
selectedDayRecurrences:
|
|
426
|
-
setDateRange:
|
|
427
|
-
upcomingExpenseTotal:
|
|
428
|
-
upcomingIncomeTotal:
|
|
429
|
-
upcomingRecurrences:
|
|
430
|
-
} =
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
|
|
434
|
-
transaction_guid:
|
|
435
|
-
});
|
|
436
|
-
}, F = (b) => {
|
|
437
|
-
r(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
438
|
-
transaction_guid: b.transaction?.guid
|
|
414
|
+
const { recurring: t } = S(), { availableWidth: n } = Ge(), { isDesktop: i, isSmallMobile: a, isMobile: r } = xe(n), { onEvent: l } = J(), {
|
|
415
|
+
currentMonthExpenses: m,
|
|
416
|
+
currentMonthIncome: g,
|
|
417
|
+
dateRange: s,
|
|
418
|
+
expenseTotal: u,
|
|
419
|
+
incomeTotal: f,
|
|
420
|
+
missedExpenseTotal: x,
|
|
421
|
+
pastRecurrences: C,
|
|
422
|
+
paidExpenseTotal: y,
|
|
423
|
+
paidIncomeTotal: d,
|
|
424
|
+
selectedDay: b,
|
|
425
|
+
selectedDayRecurrences: W,
|
|
426
|
+
setDateRange: U,
|
|
427
|
+
upcomingExpenseTotal: te,
|
|
428
|
+
upcomingIncomeTotal: ne,
|
|
429
|
+
upcomingRecurrences: F
|
|
430
|
+
} = w(), [$, I] = h.useState(0), ie = Fe(s.start, /* @__PURE__ */ new Date()), v = (R, oe) => {
|
|
431
|
+
I(oe);
|
|
432
|
+
}, j = (R) => {
|
|
433
|
+
l(_.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
434
|
+
transaction_guid: R.transaction?.guid
|
|
439
435
|
});
|
|
440
|
-
},
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
start: W(b),
|
|
444
|
-
end: B(b)
|
|
436
|
+
}, K = (R) => {
|
|
437
|
+
l(_.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
438
|
+
transaction_guid: R.transaction?.guid
|
|
445
439
|
});
|
|
446
440
|
}, P = () => {
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
start:
|
|
450
|
-
end: B(
|
|
441
|
+
const R = Be(s.start, 1);
|
|
442
|
+
U({
|
|
443
|
+
start: k(R),
|
|
444
|
+
end: B(R)
|
|
445
|
+
});
|
|
446
|
+
}, re = () => {
|
|
447
|
+
const R = Ue(s.start, 1);
|
|
448
|
+
U({
|
|
449
|
+
start: k(R),
|
|
450
|
+
end: B(R)
|
|
451
451
|
});
|
|
452
452
|
};
|
|
453
453
|
return /* @__PURE__ */ o(
|
|
454
|
-
|
|
454
|
+
se,
|
|
455
455
|
{
|
|
456
456
|
container: !0,
|
|
457
457
|
sx: {
|
|
458
|
-
pt: 16
|
|
459
|
-
px: i ? 48 : 24
|
|
458
|
+
pt: 16
|
|
460
459
|
},
|
|
461
460
|
children: [
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */ o(c, {
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
461
|
+
/* @__PURE__ */ o(se, { md: !0, sm: 12, width: "100%", children: [
|
|
462
|
+
/* @__PURE__ */ o(c, { sx: { gap: 16, px: i ? 48 : 24 }, children: [
|
|
463
|
+
/* @__PURE__ */ o(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
464
|
+
/* @__PURE__ */ e(Je, { children: N(
|
|
465
|
+
t.header_title,
|
|
466
|
+
A(s.start, E.MONTH_LONG)
|
|
467
|
+
) }),
|
|
468
|
+
!i && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
469
|
+
/* @__PURE__ */ e(
|
|
470
|
+
De,
|
|
471
|
+
{
|
|
472
|
+
color: "primary",
|
|
473
|
+
disabled: ie,
|
|
474
|
+
onClick: re,
|
|
475
|
+
children: /* @__PURE__ */ e(Ve, {})
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
/* @__PURE__ */ e(De, { color: "primary", onClick: P, children: /* @__PURE__ */ e(Xe, {}) })
|
|
479
|
+
] })
|
|
480
|
+
] }),
|
|
481
|
+
/* @__PURE__ */ e(
|
|
482
|
+
Le,
|
|
483
|
+
{
|
|
484
|
+
expected: u,
|
|
485
|
+
missed: x,
|
|
486
|
+
paid: y,
|
|
487
|
+
title: t.expenses,
|
|
488
|
+
total: m.length,
|
|
489
|
+
upcoming: te
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
/* @__PURE__ */ e(
|
|
493
|
+
Le,
|
|
494
|
+
{
|
|
495
|
+
expected: f,
|
|
496
|
+
isExpense: !1,
|
|
497
|
+
paid: d,
|
|
498
|
+
title: t.deposits,
|
|
499
|
+
total: g.length,
|
|
500
|
+
upcoming: ne
|
|
501
|
+
}
|
|
502
|
+
),
|
|
503
|
+
i && /* @__PURE__ */ e(
|
|
504
|
+
z,
|
|
505
|
+
{
|
|
506
|
+
onRecurrenceClick: j,
|
|
507
|
+
recurrences: F,
|
|
508
|
+
title: t.upcoming_activity
|
|
509
|
+
}
|
|
510
|
+
)
|
|
480
511
|
] }),
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
|
|
483
|
-
{
|
|
484
|
-
expected: s,
|
|
485
|
-
missed: f,
|
|
486
|
-
paid: C,
|
|
487
|
-
title: t.expenses,
|
|
488
|
-
total: l.length,
|
|
489
|
-
upcoming: Q
|
|
490
|
-
}
|
|
491
|
-
),
|
|
492
|
-
/* @__PURE__ */ e(
|
|
493
|
-
Me,
|
|
494
|
-
{
|
|
495
|
-
expected: m,
|
|
496
|
-
isExpense: !1,
|
|
497
|
-
paid: y,
|
|
498
|
-
title: t.deposits,
|
|
499
|
-
total: p.length,
|
|
500
|
-
upcoming: ee
|
|
501
|
-
}
|
|
502
|
-
),
|
|
503
|
-
i && /* @__PURE__ */ e(
|
|
504
|
-
z,
|
|
505
|
-
{
|
|
506
|
-
onRecurrenceClick: _,
|
|
507
|
-
recurrences: U,
|
|
508
|
-
title: t.upcoming_activity
|
|
509
|
-
}
|
|
510
|
-
),
|
|
511
|
-
!i && /* @__PURE__ */ o(c, { children: [
|
|
512
|
-
/* @__PURE__ */ o(je, { onChange: ne, value: $, variant: "fullWidth", children: [
|
|
512
|
+
!i && /* @__PURE__ */ o(c, { sx: { px: r ? 0 : 24 }, children: [
|
|
513
|
+
/* @__PURE__ */ o(je, { onChange: v, value: $, variant: "fullWidth", children: [
|
|
513
514
|
/* @__PURE__ */ e(
|
|
514
|
-
|
|
515
|
+
Se,
|
|
515
516
|
{
|
|
516
|
-
label: /* @__PURE__ */ e(
|
|
517
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.upcoming : t.upcoming_activity })
|
|
517
518
|
}
|
|
518
519
|
),
|
|
519
520
|
/* @__PURE__ */ e(
|
|
520
|
-
|
|
521
|
+
Se,
|
|
521
522
|
{
|
|
522
|
-
label: /* @__PURE__ */ e(
|
|
523
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.past : t.past_transactions })
|
|
523
524
|
}
|
|
524
525
|
)
|
|
525
526
|
] }),
|
|
526
527
|
$ === 0 && /* @__PURE__ */ e(
|
|
527
528
|
z,
|
|
528
529
|
{
|
|
529
|
-
onRecurrenceClick:
|
|
530
|
-
recurrences:
|
|
530
|
+
onRecurrenceClick: j,
|
|
531
|
+
recurrences: F
|
|
531
532
|
}
|
|
532
533
|
),
|
|
533
534
|
$ === 1 && /* @__PURE__ */ e(
|
|
534
535
|
z,
|
|
535
536
|
{
|
|
536
|
-
onRecurrenceClick:
|
|
537
|
-
recurrences:
|
|
537
|
+
onRecurrenceClick: K,
|
|
538
|
+
recurrences: C
|
|
538
539
|
}
|
|
539
540
|
)
|
|
540
541
|
] })
|
|
541
|
-
] })
|
|
542
|
-
i && /* @__PURE__ */ e(
|
|
543
|
-
/* @__PURE__ */ e(
|
|
542
|
+
] }),
|
|
543
|
+
i && /* @__PURE__ */ e(se, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
|
|
544
|
+
/* @__PURE__ */ e(We, {}),
|
|
544
545
|
/* @__PURE__ */ e(
|
|
545
546
|
z,
|
|
546
547
|
{
|
|
547
|
-
onRecurrenceClick:
|
|
548
|
-
recurrences:
|
|
549
|
-
title:
|
|
548
|
+
onRecurrenceClick: K,
|
|
549
|
+
recurrences: W || C,
|
|
550
|
+
title: b ? N(
|
|
550
551
|
t.day_transactions,
|
|
551
|
-
A(
|
|
552
|
+
A(b, E.MONTH_DAY)
|
|
552
553
|
) : t.past_transactions
|
|
553
554
|
}
|
|
554
555
|
)
|
|
@@ -557,14 +558,14 @@ const q = {
|
|
|
557
558
|
}
|
|
558
559
|
);
|
|
559
560
|
}), _n = D(({ onBackClick: t, sx: n = {} }) => {
|
|
560
|
-
const { accounts: i } =
|
|
561
|
+
const { accounts: i } = he(), { recurring: a } = S(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: m, setSelectedAccounts: g } = q(), { isDataLoaded: s, loadRepeatingTransactions: u, setDateRange: f } = w(), { setFilter: x } = fe(), { onEvent: C } = J(), { isMobile: y } = xe(), [d, b] = h.useState(!1);
|
|
561
562
|
return h.useEffect(() => {
|
|
562
|
-
|
|
563
|
+
g(i);
|
|
563
564
|
}, [i]), h.useEffect(() => {
|
|
564
565
|
l && (x({
|
|
565
|
-
dateRange: { start: ue(
|
|
566
|
-
accounts:
|
|
567
|
-
}), f({ start:
|
|
566
|
+
dateRange: { start: me(ue(), 90), end: de() },
|
|
567
|
+
accounts: m
|
|
568
|
+
}), f({ start: k(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), u().finally());
|
|
568
569
|
}, [l]), r ? /* @__PURE__ */ o(
|
|
569
570
|
at,
|
|
570
571
|
{
|
|
@@ -574,27 +575,27 @@ const q = {
|
|
|
574
575
|
label: a.action_title,
|
|
575
576
|
iconName: "credit_card_gear",
|
|
576
577
|
onClick: () => {
|
|
577
|
-
|
|
578
|
+
b(!0), C(_.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
578
579
|
}
|
|
579
580
|
}
|
|
580
581
|
],
|
|
581
582
|
hasDivider: y,
|
|
582
|
-
onAccountsFilterClick: () => C(
|
|
583
|
+
onAccountsFilterClick: () => C(_.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
583
584
|
onBackClick: t,
|
|
584
585
|
sx: n,
|
|
585
586
|
title: a.title,
|
|
586
587
|
children: [
|
|
587
588
|
l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ o(c, { direction: "column", p: 48, spacing: 24, children: [
|
|
588
|
-
/* @__PURE__ */ e(
|
|
589
|
-
/* @__PURE__ */ e(
|
|
590
|
-
/* @__PURE__ */ e(
|
|
589
|
+
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
590
|
+
/* @__PURE__ */ e(ae, { height: 100, variant: "rounded", width: "100%" }),
|
|
591
|
+
/* @__PURE__ */ e(ae, { height: 600, variant: "rounded", width: "100%" })
|
|
591
592
|
] }),
|
|
592
593
|
/* @__PURE__ */ e(
|
|
593
|
-
|
|
594
|
+
Oe,
|
|
594
595
|
{
|
|
595
596
|
ariaLabelClose: a.close_drawer_aria,
|
|
596
597
|
isOpen: d,
|
|
597
|
-
onClose: () =>
|
|
598
|
+
onClose: () => b(!1),
|
|
598
599
|
shouldShowHeaderBorders: !1,
|
|
599
600
|
title: a.action_title,
|
|
600
601
|
children: /* @__PURE__ */ e(ze, {})
|
|
@@ -602,20 +603,20 @@ const q = {
|
|
|
602
603
|
)
|
|
603
604
|
]
|
|
604
605
|
}
|
|
605
|
-
) : /* @__PURE__ */ e(
|
|
606
|
+
) : /* @__PURE__ */ e(V, {});
|
|
606
607
|
}), Rt = D(() => {
|
|
607
|
-
const { recurring: t } = S(), { availableWidth: n } =
|
|
608
|
-
return /* @__PURE__ */ o(c, { flexDirection:
|
|
609
|
-
/* @__PURE__ */ e(
|
|
610
|
-
!
|
|
608
|
+
const { recurring: t } = S(), { availableWidth: n } = Ge(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: r, upcomingRecurrences: l } = w(), m = n < 750;
|
|
609
|
+
return /* @__PURE__ */ o(c, { flexDirection: m ? "column" : "row", width: "100%", children: [
|
|
610
|
+
/* @__PURE__ */ e(We, {}),
|
|
611
|
+
!m && /* @__PURE__ */ e(le, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
611
612
|
/* @__PURE__ */ e(
|
|
612
613
|
z,
|
|
613
614
|
{
|
|
614
615
|
isMini: !0,
|
|
615
616
|
onResetClick: i ? () => r(i) : void 0,
|
|
616
617
|
recurrences: a || l.slice(0, 5),
|
|
617
|
-
sx: { width:
|
|
618
|
-
title: i ?
|
|
618
|
+
sx: { width: m ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
619
|
+
title: i ? N(
|
|
619
620
|
t.day_transactions,
|
|
620
621
|
A(i, E.MONTH_DAY)
|
|
621
622
|
) : t.upcoming_activity
|
|
@@ -624,15 +625,15 @@ const q = {
|
|
|
624
625
|
] });
|
|
625
626
|
}), wn = D(
|
|
626
627
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
627
|
-
const { accounts: i } =
|
|
628
|
+
const { accounts: i } = he(), { recurring: a } = S(), { setFilter: r } = fe(), { isDataLoaded: l, loadRepeatingTransactions: m } = w(), { isCopyLoaded: g, isInitialized: s, setSelectedAccounts: u, selectedAccountGuids: f } = q();
|
|
628
629
|
return h.useEffect(() => {
|
|
629
|
-
s &&
|
|
630
|
+
s && u(i);
|
|
630
631
|
}, [s]), h.useEffect(() => {
|
|
631
632
|
f.length > 0 && (r({
|
|
632
|
-
dateRange: { start: ue(
|
|
633
|
+
dateRange: { start: me(ue(), 90), end: de() },
|
|
633
634
|
accounts: f
|
|
634
|
-
}),
|
|
635
|
-
}, [f]), !
|
|
635
|
+
}), m().finally());
|
|
636
|
+
}, [f]), !g || !s ? /* @__PURE__ */ e(V, {}) : /* @__PURE__ */ e(
|
|
636
637
|
pt,
|
|
637
638
|
{
|
|
638
639
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
@@ -641,7 +642,7 @@ const q = {
|
|
|
641
642
|
subTitle: a.sub_title,
|
|
642
643
|
sx: n,
|
|
643
644
|
title: a.mini_title,
|
|
644
|
-
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(
|
|
645
|
+
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(V, {})
|
|
645
646
|
}
|
|
646
647
|
);
|
|
647
648
|
}
|
|
@@ -649,7 +650,7 @@ const q = {
|
|
|
649
650
|
upcomingRecurrences: t,
|
|
650
651
|
maxLogos: n = 3
|
|
651
652
|
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, a) => /* @__PURE__ */ e(
|
|
652
|
-
|
|
653
|
+
pe,
|
|
653
654
|
{
|
|
654
655
|
categoryGuid: i.categoryGuid || "",
|
|
655
656
|
merchantGuid: i.merchantGuid || ""
|
|
@@ -662,14 +663,14 @@ const q = {
|
|
|
662
663
|
}) => {
|
|
663
664
|
const a = (r) => r * (n / 2);
|
|
664
665
|
return /* @__PURE__ */ e(
|
|
665
|
-
|
|
666
|
+
O,
|
|
666
667
|
{
|
|
667
668
|
sx: {
|
|
668
669
|
position: "relative",
|
|
669
670
|
width: 64
|
|
670
671
|
},
|
|
671
672
|
children: t.map((r, l) => l < i ? /* @__PURE__ */ e(
|
|
672
|
-
|
|
673
|
+
O,
|
|
673
674
|
{
|
|
674
675
|
sx: {
|
|
675
676
|
borderRadius: "4px",
|
|
@@ -680,7 +681,7 @@ const q = {
|
|
|
680
681
|
position: "absolute"
|
|
681
682
|
},
|
|
682
683
|
children: /* @__PURE__ */ e(
|
|
683
|
-
|
|
684
|
+
pe,
|
|
684
685
|
{
|
|
685
686
|
categoryGuid: r.categoryGuid || "",
|
|
686
687
|
merchantGuid: r.merchantGuid || "",
|
|
@@ -700,7 +701,7 @@ const q = {
|
|
|
700
701
|
label: r
|
|
701
702
|
}) => /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
702
703
|
/* @__PURE__ */ e(
|
|
703
|
-
|
|
704
|
+
O,
|
|
704
705
|
{
|
|
705
706
|
sx: {
|
|
706
707
|
borderRadius: "2px",
|
|
@@ -711,99 +712,99 @@ const q = {
|
|
|
711
712
|
}
|
|
712
713
|
),
|
|
713
714
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
714
|
-
!a && /* @__PURE__ */ e(
|
|
715
|
-
/* @__PURE__ */ e(
|
|
715
|
+
!a && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
|
|
716
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: r })
|
|
716
717
|
] })
|
|
717
718
|
] }), It = D(() => {
|
|
718
719
|
const { recurring: t } = S();
|
|
719
720
|
return /* @__PURE__ */ o(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
720
721
|
/* @__PURE__ */ e(Ze, { size: 32 }),
|
|
721
722
|
/* @__PURE__ */ o(c, { children: [
|
|
722
|
-
/* @__PURE__ */ e(
|
|
723
|
-
/* @__PURE__ */ e(
|
|
723
|
+
/* @__PURE__ */ e(ce, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
724
|
+
/* @__PURE__ */ e(ce, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
724
725
|
] })
|
|
725
726
|
] });
|
|
726
727
|
}), vn = D(
|
|
727
728
|
({ onCTAClick: t }) => {
|
|
728
|
-
const [n, i] = h.useState(!1), { onEvent: a } =
|
|
729
|
+
const [n, i] = h.useState(!1), { onEvent: a } = J(), r = ge(), { accounts: l } = he(), [m, { width: g }] = gt(), { isCopyLoaded: s, isInitialized: u, selectedAccountGuids: f, setSelectedAccounts: x } = q(), {
|
|
729
730
|
loadRepeatingTransactions: C,
|
|
730
731
|
upcomingRecurrences: y,
|
|
731
732
|
expenseTotal: d,
|
|
732
|
-
missedExpenseTotal:
|
|
733
|
-
paidExpenseTotal:
|
|
734
|
-
repeatingTransactions:
|
|
735
|
-
setDateRange:
|
|
736
|
-
upcomingExpenseTotal:
|
|
737
|
-
isDataLoaded:
|
|
738
|
-
} =
|
|
733
|
+
missedExpenseTotal: b,
|
|
734
|
+
paidExpenseTotal: W,
|
|
735
|
+
repeatingTransactions: U,
|
|
736
|
+
setDateRange: te,
|
|
737
|
+
upcomingExpenseTotal: ne,
|
|
738
|
+
isDataLoaded: F
|
|
739
|
+
} = w(), { setFilter: $ } = fe(), { recurring: I, budgets: ie } = S();
|
|
739
740
|
h.useEffect(() => {
|
|
740
741
|
x(l);
|
|
741
742
|
}, [l]), h.useEffect(() => {
|
|
742
|
-
|
|
743
|
-
dateRange: { start: ue(
|
|
743
|
+
u && ($({
|
|
744
|
+
dateRange: { start: me(ue(), 90), end: de() },
|
|
744
745
|
accounts: f
|
|
745
|
-
}),
|
|
746
|
-
}, [
|
|
747
|
-
n && a(
|
|
746
|
+
}), te({ start: k(/* @__PURE__ */ new Date()), end: B(/* @__PURE__ */ new Date()) }), C().finally(), i(!0));
|
|
747
|
+
}, [u]), h.useEffect(() => {
|
|
748
|
+
n && a(_.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
748
749
|
state: y.length > 0 ? "default" : "zeroState"
|
|
749
750
|
});
|
|
750
751
|
}, [n]);
|
|
751
|
-
const
|
|
752
|
-
const
|
|
753
|
-
{ color: r.palette.success.main, percentage: `${
|
|
752
|
+
const v = g <= 288, j = g >= 450, K = h.useMemo(() => {
|
|
753
|
+
const G = [
|
|
754
|
+
{ color: r.palette.success.main, percentage: `${W / d}` }
|
|
754
755
|
];
|
|
755
|
-
return
|
|
756
|
+
return b && G.push({
|
|
756
757
|
color: r.palette.error.main,
|
|
757
|
-
percentage: `${
|
|
758
|
-
}),
|
|
758
|
+
percentage: `${b / d}`
|
|
759
|
+
}), G;
|
|
759
760
|
}, [
|
|
760
|
-
|
|
761
|
+
W,
|
|
761
762
|
d,
|
|
762
|
-
|
|
763
|
+
b,
|
|
763
764
|
r.palette.success.main,
|
|
764
765
|
r.palette.error.main
|
|
765
|
-
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]),
|
|
766
|
+
]), P = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), re = () => {
|
|
766
767
|
a(
|
|
767
|
-
y.length > 0 ?
|
|
768
|
+
y.length > 0 ? _.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : _.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
768
769
|
), t();
|
|
769
770
|
};
|
|
770
|
-
if (!s || !n ||
|
|
771
|
-
const
|
|
771
|
+
if (!s || !n || !F) return /* @__PURE__ */ e(V, { height: 100 });
|
|
772
|
+
const R = 32, oe = y.length > 0, $e = () => oe ? v ? /* @__PURE__ */ e(
|
|
772
773
|
Dt,
|
|
773
774
|
{
|
|
774
|
-
logoSize:
|
|
775
|
+
logoSize: R,
|
|
775
776
|
maxLogos: 3,
|
|
776
777
|
upcomingRecurrences: y.slice(0, 3)
|
|
777
778
|
}
|
|
778
|
-
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width:
|
|
779
|
+
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: v ? 64 : 104 } }), Pe = [
|
|
779
780
|
{
|
|
780
|
-
amount:
|
|
781
|
+
amount: W,
|
|
781
782
|
bgColor: "success.main",
|
|
782
783
|
label: I.paid
|
|
783
784
|
},
|
|
784
785
|
{
|
|
785
|
-
amount:
|
|
786
|
+
amount: b,
|
|
786
787
|
bgColor: "error.main",
|
|
787
788
|
label: I.missed
|
|
788
789
|
},
|
|
789
790
|
{
|
|
790
|
-
amount:
|
|
791
|
+
amount: ne,
|
|
791
792
|
bgColor: "border.light",
|
|
792
793
|
label: I.upcoming
|
|
793
794
|
}
|
|
794
|
-
],
|
|
795
|
+
], Te = !U?.length;
|
|
795
796
|
return /* @__PURE__ */ e(
|
|
796
797
|
ht,
|
|
797
798
|
{
|
|
798
799
|
className: "mx-recurring-transaction-microwidget",
|
|
799
|
-
ctaLabel:
|
|
800
|
-
onCTAClick:
|
|
800
|
+
ctaLabel: Te ? ie.get_started_cta : I.primary_cta,
|
|
801
|
+
onCTAClick: re,
|
|
801
802
|
title: I.recurring_expenses,
|
|
802
|
-
children:
|
|
803
|
+
children: Te ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ o(X, { children: [
|
|
803
804
|
/* @__PURE__ */ o(
|
|
804
805
|
c,
|
|
805
806
|
{
|
|
806
|
-
ref:
|
|
807
|
+
ref: m,
|
|
807
808
|
sx: {
|
|
808
809
|
flexDirection: "row",
|
|
809
810
|
justifyContent: "space-between"
|
|
@@ -813,7 +814,7 @@ const q = {
|
|
|
813
814
|
c,
|
|
814
815
|
{
|
|
815
816
|
sx: [
|
|
816
|
-
P.length >= 10 &&
|
|
817
|
+
P.length >= 10 && v ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
817
818
|
{
|
|
818
819
|
alignItems: "baseline",
|
|
819
820
|
overflow: "hidden",
|
|
@@ -823,15 +824,15 @@ const q = {
|
|
|
823
824
|
],
|
|
824
825
|
children: [
|
|
825
826
|
/* @__PURE__ */ e(
|
|
826
|
-
|
|
827
|
+
p,
|
|
827
828
|
{
|
|
828
829
|
sx: { width: "100%" },
|
|
829
|
-
variant: P.length >= 10 &&
|
|
830
|
+
variant: P.length >= 10 && v ? "H3" : "H2",
|
|
830
831
|
children: P
|
|
831
832
|
}
|
|
832
833
|
),
|
|
833
834
|
/* @__PURE__ */ e(
|
|
834
|
-
|
|
835
|
+
ce,
|
|
835
836
|
{
|
|
836
837
|
sx: {
|
|
837
838
|
pr: 12
|
|
@@ -848,7 +849,7 @@ const q = {
|
|
|
848
849
|
}
|
|
849
850
|
),
|
|
850
851
|
/* @__PURE__ */ o(c, { sx: { pt: 12 }, children: [
|
|
851
|
-
/* @__PURE__ */ e(
|
|
852
|
+
/* @__PURE__ */ e(ke, { data: K }),
|
|
852
853
|
/* @__PURE__ */ e(
|
|
853
854
|
c,
|
|
854
855
|
{
|
|
@@ -858,14 +859,14 @@ const q = {
|
|
|
858
859
|
gap: 16,
|
|
859
860
|
mt: 4
|
|
860
861
|
},
|
|
861
|
-
children: Pe.map((
|
|
862
|
+
children: Pe.map((G, He) => /* @__PURE__ */ e(
|
|
862
863
|
St,
|
|
863
864
|
{
|
|
864
|
-
amount:
|
|
865
|
-
bgcolor:
|
|
866
|
-
isLargeScreen:
|
|
867
|
-
isSmallScreen:
|
|
868
|
-
label:
|
|
865
|
+
amount: G.amount,
|
|
866
|
+
bgcolor: G.bgColor,
|
|
867
|
+
isLargeScreen: j,
|
|
868
|
+
isSmallScreen: v,
|
|
869
|
+
label: G.label
|
|
869
870
|
},
|
|
870
871
|
`recurrence-legend-${He}`
|
|
871
872
|
))
|