@mx-cartographer/experiences 7.0.27-alpha-recurring-transactions-css-bug-ram8 → 7.0.27-alpha.sms1
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.
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsx as e, jsxs as o, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as K } from "react/jsx-runtime";
|
|
2
2
|
import h from "react";
|
|
3
3
|
import { observer as T } from "mobx-react-lite";
|
|
4
|
-
import { endOfMonth as
|
|
5
|
-
import { endOfToday as
|
|
6
|
-
import { startOfMonth as
|
|
7
|
-
import { startOfToday as
|
|
8
|
-
import { subDays as
|
|
9
|
-
import
|
|
4
|
+
import { endOfMonth as z } from "date-fns/endOfMonth";
|
|
5
|
+
import { endOfToday as ce } from "date-fns/endOfToday";
|
|
6
|
+
import { startOfMonth as k } from "date-fns/startOfMonth";
|
|
7
|
+
import { startOfToday as le } from "date-fns/startOfToday";
|
|
8
|
+
import { subDays as de } from "date-fns/subDays";
|
|
9
|
+
import re from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
|
-
import { R as
|
|
11
|
+
import { R as He } from "../RecurringSettings-Dj29piAQ.mjs";
|
|
12
12
|
import { M as An } from "../RecurringSettings-Dj29piAQ.mjs";
|
|
13
|
-
import { addMonths as
|
|
14
|
-
import { subMonths as
|
|
15
|
-
import { isBefore as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { Schedule as
|
|
21
|
-
import { Text as
|
|
22
|
-
import { getWeeksInMonth as
|
|
23
|
-
import
|
|
24
|
-
import { AdapterDateFns as
|
|
25
|
-
import { DateCalendar as
|
|
26
|
-
import { LocalizationProvider as
|
|
27
|
-
import { isSameDay as
|
|
28
|
-
import
|
|
29
|
-
import { PickersDay as
|
|
30
|
-
import { I as
|
|
31
|
-
import { u as D, a as
|
|
32
|
-
import { c as M, a as R, g as
|
|
33
|
-
import { T as
|
|
13
|
+
import { addMonths as ze } from "date-fns/addMonths";
|
|
14
|
+
import { subMonths as Be } from "date-fns/subMonths";
|
|
15
|
+
import { isBefore as Ue } from "date-fns/isBefore";
|
|
16
|
+
import oe from "@mui/material/Unstable_Grid2";
|
|
17
|
+
import be from "@mui/material/IconButton";
|
|
18
|
+
import Re from "@mui/material/Tab";
|
|
19
|
+
import Fe from "@mui/material/Tabs";
|
|
20
|
+
import { Schedule as je, MonetizationOn as Ke, Cancel as ve, CheckCircle as Me, ChevronLeft as Ye, ChevronRight as Ve, CurrencyExchange as Xe } from "@mxenabled/mx-icons";
|
|
21
|
+
import { Text as p, MerchantLogo as ue, InstitutionLogo as Ze, H3 as qe, P as ae } from "@mxenabled/mxui";
|
|
22
|
+
import { getWeeksInMonth as Te } from "date-fns/getWeeksInMonth";
|
|
23
|
+
import me from "@mui/material/styles/useTheme";
|
|
24
|
+
import { AdapterDateFns as Je } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
25
|
+
import { DateCalendar as Qe } from "@mui/x-date-pickers/DateCalendar";
|
|
26
|
+
import { LocalizationProvider as et } from "@mui/x-date-pickers/LocalizationProvider";
|
|
27
|
+
import { isSameDay as tt } from "date-fns/isSameDay";
|
|
28
|
+
import nt from "@mui/material/Badge";
|
|
29
|
+
import { PickersDay as it } from "@mui/x-date-pickers/PickersDay";
|
|
30
|
+
import { I as Y } from "../IconBacking-B9oC6uL2.mjs";
|
|
31
|
+
import { u as D, a as V, h as v, e as X, c as pe, f as ge, p as rt } from "../hooks-DkUqN6JE.mjs";
|
|
32
|
+
import { c as M, a as R, g as De, f as ot } from "../RepeatingTransaction-BW4J-jeJ.mjs";
|
|
33
|
+
import { T as P } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
34
34
|
import { R as Gn } from "../RecurringTransactionsStore-D62XJtdL.mjs";
|
|
35
35
|
import { A as w, W as at } from "../WidgetContainer-CdBs9WOZ.mjs";
|
|
36
36
|
import st from "@mui/material/Button";
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
37
|
+
import se from "@mui/material/Divider";
|
|
38
|
+
import Se from "@mui/material/List";
|
|
39
|
+
import Le 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-DbsiKUoO.mjs";
|
|
45
45
|
import { c as On, M as kn, S as Wn } from "../ManageIncome-DbsiKUoO.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
|
-
import { D as
|
|
48
|
-
import { b as
|
|
47
|
+
import { D as Ae } 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 Ee } from "../StatusBar-BK_uYHAB.mjs";
|
|
52
|
+
import { u as Ge } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
53
|
+
import { L as j } from "../Loader-DUaFpDGv.mjs";
|
|
54
54
|
import { M as pt } from "../MiniWidgetContainer-CTyjmE1h.mjs";
|
|
55
55
|
import { u as gt } from "../useDimensions-27p2evRx.mjs";
|
|
56
56
|
import { M as ht } from "../MicroWidgetContainer-Dxz8uBN9.mjs";
|
|
57
|
-
const
|
|
57
|
+
const Z = {
|
|
58
58
|
gridRow: 1,
|
|
59
59
|
gridColumn: 1,
|
|
60
60
|
zIndex: 2
|
|
61
|
-
},
|
|
62
|
-
|
|
61
|
+
}, q = (t) => t ? { margin: "0 0 -6px -4px" } : void 0, he = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(je, { color: "primary", filled: !0, sx: { fontSize: n, ...Z } }) }), fe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(
|
|
62
|
+
Ke,
|
|
63
63
|
{
|
|
64
64
|
filled: !0,
|
|
65
|
-
sx: { color: "categories.income", fontSize: n, ...
|
|
65
|
+
sx: { color: "categories.income", fontSize: n, ...Z }
|
|
66
66
|
}
|
|
67
|
-
) }),
|
|
67
|
+
) }), xe = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(ve, { color: "error", filled: !0, sx: { fontSize: n, ...Z } }) }), ye = ({ isOffset: t = !1, size: n = 16 }) => /* @__PURE__ */ e(Y, { size: n, sx: { ...q(t) }, children: /* @__PURE__ */ e(Me, { color: "success", filled: !0, sx: { fontSize: n, ...Z } }) }), ft = T(
|
|
68
68
|
({ day: t, outsideCurrentMonth: n, ...i }) => {
|
|
69
|
-
const { recurring: a } = D(), { selectedAccountGuids: r } =
|
|
69
|
+
const { recurring: a } = D(), { selectedAccountGuids: r } = V(), { recurrences: l, setSelectedDay: u } = v(), s = h.useMemo(
|
|
70
70
|
() => l.filter((d) => r.includes(d.accountGuid)),
|
|
71
71
|
[r, l]
|
|
72
72
|
).filter(
|
|
73
|
-
(d) =>
|
|
73
|
+
(d) => tt(d.occurredOnDate || d.expectedDate, t)
|
|
74
74
|
), m = s.some(
|
|
75
75
|
(d) => d.type !== M.Income && d.status === R.Upcoming
|
|
76
76
|
), f = s.some(
|
|
77
77
|
(d) => d.type !== M.Income && d.status === R.Missed
|
|
78
78
|
), x = s.some(
|
|
79
79
|
(d) => d.type !== M.Income && d.status === R.Paid
|
|
80
|
-
),
|
|
80
|
+
), b = s.some((d) => d.type === M.Income), y = (m ? 1 : 0) + (f ? 1 : 0) + (x ? 1 : 0) + (b ? 1 : 0);
|
|
81
81
|
return /* @__PURE__ */ e(
|
|
82
|
-
|
|
82
|
+
nt,
|
|
83
83
|
{
|
|
84
|
-
badgeContent: s.length > 0 && /* @__PURE__ */ o(
|
|
85
|
-
f && /* @__PURE__ */ e(
|
|
86
|
-
x && /* @__PURE__ */ e(
|
|
87
|
-
m && /* @__PURE__ */ e(
|
|
88
|
-
|
|
84
|
+
badgeContent: s.length > 0 && /* @__PURE__ */ o(K, { children: [
|
|
85
|
+
f && /* @__PURE__ */ e(xe, { isOffset: !0 }),
|
|
86
|
+
x && /* @__PURE__ */ e(ye, { isOffset: !0 }),
|
|
87
|
+
m && /* @__PURE__ */ e(he, { isOffset: !0 }),
|
|
88
|
+
b && /* @__PURE__ */ e(fe, { isOffset: !0 })
|
|
89
89
|
] }),
|
|
90
90
|
overlap: "circular",
|
|
91
91
|
sx: {
|
|
@@ -96,15 +96,15 @@ const q = {
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
children: /* @__PURE__ */ e(
|
|
99
|
-
|
|
99
|
+
it,
|
|
100
100
|
{
|
|
101
101
|
"aria-label": `
|
|
102
102
|
${x && a.paid},
|
|
103
103
|
${f && a.missed},
|
|
104
104
|
${m && a.upcoming},
|
|
105
|
-
${
|
|
105
|
+
${b && a.income}`,
|
|
106
106
|
day: t,
|
|
107
|
-
onClick: () =>
|
|
107
|
+
onClick: () => u(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
|
+
), F = ({ 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 = T(() => {
|
|
126
126
|
const { recurring: t } = D();
|
|
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(F, { icon: he, label: t.expense }),
|
|
138
|
+
/* @__PURE__ */ e(F, { icon: fe, label: t.income }),
|
|
139
|
+
/* @__PURE__ */ e(F, { icon: xe, label: t.missed }),
|
|
140
|
+
/* @__PURE__ */ e(F, { icon: ye, label: t.paid })
|
|
141
141
|
]
|
|
142
142
|
}
|
|
143
143
|
);
|
|
144
|
-
}),
|
|
145
|
-
const t =
|
|
146
|
-
|
|
147
|
-
),
|
|
148
|
-
l(
|
|
149
|
-
start:
|
|
150
|
-
end:
|
|
144
|
+
}), Ie = 58, Ne = T(() => {
|
|
145
|
+
const t = me(), { onEvent: n } = X(), { selectedDay: i, setDateRange: a } = v(), [r, l] = h.useState(
|
|
146
|
+
Te(/* @__PURE__ */ new Date()) * P + Ie
|
|
147
|
+
), u = (s) => {
|
|
148
|
+
l(Te(s) * P + Ie), a({
|
|
149
|
+
start: k(s),
|
|
150
|
+
end: z(s)
|
|
151
151
|
}), n(w.RECURRING_TRANSACTIONS_CLICK_CALENDAR_RIGHT);
|
|
152
|
-
},
|
|
153
|
-
|
|
152
|
+
}, g = /* @__PURE__ */ e(
|
|
153
|
+
Qe,
|
|
154
154
|
{
|
|
155
|
-
minDate:
|
|
156
|
-
onMonthChange:
|
|
155
|
+
minDate: k(/* @__PURE__ */ new Date()),
|
|
156
|
+
onMonthChange: u,
|
|
157
157
|
showDaysOutsideCurrentMonth: !0,
|
|
158
158
|
slots: {
|
|
159
159
|
day: ft
|
|
@@ -184,11 +184,11 @@ const q = {
|
|
|
184
184
|
minHeight: r
|
|
185
185
|
},
|
|
186
186
|
"&.MuiDateCalendar-root": {
|
|
187
|
-
minHeight: r +
|
|
187
|
+
minHeight: r + P
|
|
188
188
|
},
|
|
189
189
|
"& .MuiButtonBase-root, .MuiDayCalendar-weekDayLabel": {
|
|
190
|
-
height:
|
|
191
|
-
width:
|
|
190
|
+
height: P,
|
|
191
|
+
width: P,
|
|
192
192
|
margin: 0
|
|
193
193
|
},
|
|
194
194
|
"& .MuiDayCalendar-weekDayLabel": {
|
|
@@ -200,26 +200,26 @@ const q = {
|
|
|
200
200
|
views: ["day"]
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
|
-
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(
|
|
204
|
-
i &&
|
|
205
|
-
!i &&
|
|
203
|
+
return /* @__PURE__ */ e(c, { justifyContent: "center", children: /* @__PURE__ */ o(et, { dateAdapter: Je, children: [
|
|
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(fe, {});
|
|
211
211
|
switch (t.status) {
|
|
212
212
|
case R.Missed:
|
|
213
|
-
return /* @__PURE__ */ e(
|
|
213
|
+
return /* @__PURE__ */ e(xe, {});
|
|
214
214
|
case R.Paid:
|
|
215
|
-
return /* @__PURE__ */ e(
|
|
215
|
+
return /* @__PURE__ */ e(ye, {});
|
|
216
216
|
default:
|
|
217
|
-
return /* @__PURE__ */ e(
|
|
217
|
+
return /* @__PURE__ */ e(he, {});
|
|
218
218
|
}
|
|
219
219
|
}, Ct = (t, n) => {
|
|
220
220
|
switch (t.status) {
|
|
221
221
|
case R.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 R.Missed:
|
|
230
|
-
return
|
|
230
|
+
return N(
|
|
231
231
|
n.missed_on,
|
|
232
232
|
A(t.expectedDate, E.MONTH_DAY)
|
|
233
233
|
);
|
|
234
234
|
case R.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
|
+
}, _e = ({
|
|
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 } = D(), { repeatingTransactions: l } = v(), [
|
|
249
|
+
const { recurring: r } = D(), { repeatingTransactions: l } = v(), [u, g] = h.useState(!1), s = h.useMemo(
|
|
250
250
|
() => l.find((S) => S.guid === t.repeatingTransactionGuid),
|
|
251
251
|
[t, l]
|
|
252
|
-
), m = t.type === M.Income, f = t.status === R.Paid, x = t.status === R.Missed,
|
|
252
|
+
), m = t.type === M.Income, f = t.status === R.Paid, x = t.status === R.Missed, b = t.status === R.Upcoming;
|
|
253
253
|
let y = r.paid?.toLowerCase();
|
|
254
|
-
return x ? y = r.missed?.toLowerCase() :
|
|
255
|
-
/* @__PURE__ */ o(
|
|
254
|
+
return x ? y = r.missed?.toLowerCase() : b && (y = a ? De(r, s || {}, !0) : De(r, s || {}, !1)), //TODO: implement common/components/ListItemRow.tsx
|
|
255
|
+
/* @__PURE__ */ o(Le, { 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
|
+
ue,
|
|
261
261
|
{
|
|
262
262
|
categoryGuid: t.categoryGuid,
|
|
263
263
|
merchantGuid: t.merchantGuid
|
|
@@ -271,24 +271,24 @@ 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(K, { children: [
|
|
279
279
|
t.institutionGuid && /* @__PURE__ */ e(
|
|
280
|
-
|
|
280
|
+
Ze,
|
|
281
281
|
{
|
|
282
282
|
alt: t.institutionName,
|
|
283
283
|
institutionGuid: t.institutionGuid,
|
|
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(
|
|
291
|
+
/* @__PURE__ */ o(p, { bold: !0, color: m ? "success.main" : "text.primary", variant: "body1", children: [
|
|
292
292
|
m ? "+" : "",
|
|
293
293
|
L(t.amount, "0,0.00")
|
|
294
294
|
] }),
|
|
@@ -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(Me, { color: "success", filled: !0, size: 12 }),
|
|
308
|
+
x && /* @__PURE__ */ e(ve, { 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,23 +316,23 @@ const q = {
|
|
|
316
316
|
) })
|
|
317
317
|
] }),
|
|
318
318
|
/* @__PURE__ */ e(
|
|
319
|
-
|
|
319
|
+
Ae,
|
|
320
320
|
{
|
|
321
321
|
ariaLabelClose: r.close_drawer_aria,
|
|
322
|
-
isOpen:
|
|
323
|
-
onClose: () =>
|
|
322
|
+
isOpen: u,
|
|
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
|
)
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
] });
|
|
335
|
-
},
|
|
335
|
+
}, H = T(
|
|
336
336
|
({
|
|
337
337
|
recurrences: t,
|
|
338
338
|
isMini: n = !1,
|
|
@@ -341,36 +341,36 @@ const q = {
|
|
|
341
341
|
sx: r = {},
|
|
342
342
|
title: l
|
|
343
343
|
}) => {
|
|
344
|
-
const { recurring:
|
|
344
|
+
const { recurring: u } = D(), 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: u.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: u.no_activities }) : /* @__PURE__ */ e(Se, { children: n ? t.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
357
357
|
/* @__PURE__ */ e(
|
|
358
|
-
|
|
358
|
+
_e,
|
|
359
359
|
{
|
|
360
360
|
isMini: n,
|
|
361
361
|
onRecurrenceClick: a,
|
|
362
362
|
recurrence: s
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
|
-
/* @__PURE__ */ e(
|
|
366
|
-
] }, `recurrence-${m}`)) :
|
|
367
|
-
/* @__PURE__ */ e(
|
|
368
|
-
|
|
365
|
+
/* @__PURE__ */ e(se, { sx: { mx: 24 } })
|
|
366
|
+
] }, `recurrence-${m}`)) : g.map((s, m) => /* @__PURE__ */ o(h.Fragment, { children: [
|
|
367
|
+
/* @__PURE__ */ e(Le, { children: /* @__PURE__ */ e(
|
|
368
|
+
Se,
|
|
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
|
+
_e,
|
|
374
374
|
{
|
|
375
375
|
isMini: n,
|
|
376
376
|
onRecurrenceClick: a,
|
|
@@ -379,192 +379,182 @@ const q = {
|
|
|
379
379
|
) }, `day-recurrence-${x}`))
|
|
380
380
|
}
|
|
381
381
|
) }, s.id),
|
|
382
|
-
/* @__PURE__ */ e(
|
|
382
|
+
/* @__PURE__ */ e(se, { sx: { mx: 24 } })
|
|
383
383
|
] }, `recurrence-${m}`)) })
|
|
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
|
+
), we = T(
|
|
387
|
+
({ expected: t, isExpense: n = !0, missed: i, paid: a, title: r, total: l, upcoming: u }) => {
|
|
388
|
+
const g = me(), { isSmallMobile: s } = Ge(), { recurring: m } = D(), 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
|
-
return /* @__PURE__ */ o(c, { children: [
|
|
392
|
+
return /* @__PURE__ */ o(c, { sx: { px: 24 }, 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(Ee, { 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: m.paid?.toLowerCase() }),
|
|
402
|
+
i !== void 0 && /* @__PURE__ */ o(K, { 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: m.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(u, "0,0.00") }),
|
|
409
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: m.upcoming })
|
|
410
410
|
] })
|
|
411
411
|
] });
|
|
412
412
|
}
|
|
413
413
|
), bt = T(() => {
|
|
414
|
-
const { recurring: t } = D(), {
|
|
415
|
-
currentMonthExpenses:
|
|
416
|
-
currentMonthIncome:
|
|
414
|
+
const { recurring: t } = D(), { isDesktop: n, isSmallMobile: i } = Ge(), { onEvent: a } = X(), {
|
|
415
|
+
currentMonthExpenses: r,
|
|
416
|
+
currentMonthIncome: l,
|
|
417
417
|
dateRange: u,
|
|
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
|
-
} = v(), [$,
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
|
|
434
|
-
transaction_guid:
|
|
418
|
+
expenseTotal: g,
|
|
419
|
+
incomeTotal: s,
|
|
420
|
+
missedExpenseTotal: m,
|
|
421
|
+
pastRecurrences: f,
|
|
422
|
+
paidExpenseTotal: x,
|
|
423
|
+
paidIncomeTotal: b,
|
|
424
|
+
selectedDay: y,
|
|
425
|
+
selectedDayRecurrences: d,
|
|
426
|
+
setDateRange: S,
|
|
427
|
+
upcomingExpenseTotal: W,
|
|
428
|
+
upcomingIncomeTotal: J,
|
|
429
|
+
upcomingRecurrences: B
|
|
430
|
+
} = v(), [$, Q] = h.useState(0), ee = Ue(u.start, /* @__PURE__ */ new Date()), I = (C, ie) => {
|
|
431
|
+
Q(ie);
|
|
432
|
+
}, U = (C) => {
|
|
433
|
+
a(w.RECURRING_TRANSACTIONS_CLICK_UPCOMING, {
|
|
434
|
+
transaction_guid: C.transaction?.guid
|
|
435
435
|
});
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
transaction_guid:
|
|
436
|
+
}, _ = (C) => {
|
|
437
|
+
a(w.RECURRING_TRANSACTIONS_CLICK_PAID, {
|
|
438
|
+
transaction_guid: C.transaction?.guid
|
|
439
439
|
});
|
|
440
|
-
},
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
start:
|
|
444
|
-
end:
|
|
440
|
+
}, te = () => {
|
|
441
|
+
const C = ze(u.start, 1);
|
|
442
|
+
S({
|
|
443
|
+
start: k(C),
|
|
444
|
+
end: z(C)
|
|
445
445
|
});
|
|
446
|
-
},
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
start:
|
|
450
|
-
end:
|
|
446
|
+
}, ne = () => {
|
|
447
|
+
const C = Be(u.start, 1);
|
|
448
|
+
S({
|
|
449
|
+
start: k(C),
|
|
450
|
+
end: z(C)
|
|
451
451
|
});
|
|
452
452
|
};
|
|
453
|
-
return /* @__PURE__ */ o(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
children: [
|
|
462
|
-
/* @__PURE__ */ e(ae, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ o(c, { sx: { gap: 16 }, children: [
|
|
463
|
-
/* @__PURE__ */ o(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
464
|
-
/* @__PURE__ */ e(Je, { children: O(
|
|
465
|
-
t.header_title,
|
|
466
|
-
A(u.start, E.MONTH_LONG)
|
|
467
|
-
) }),
|
|
468
|
-
!i && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
469
|
-
/* @__PURE__ */ e(
|
|
470
|
-
Re,
|
|
471
|
-
{
|
|
472
|
-
color: "primary",
|
|
473
|
-
disabled: I,
|
|
474
|
-
onClick: P,
|
|
475
|
-
children: /* @__PURE__ */ e(Ve, {})
|
|
476
|
-
}
|
|
477
|
-
),
|
|
478
|
-
/* @__PURE__ */ e(Re, { color: "primary", onClick: ie, children: /* @__PURE__ */ e(Xe, {}) })
|
|
479
|
-
] })
|
|
480
|
-
] }),
|
|
453
|
+
return /* @__PURE__ */ o(oe, { container: !0, sx: { pt: 16, px: 24, spacing: 24 }, children: [
|
|
454
|
+
/* @__PURE__ */ e(oe, { md: !0, sm: 12, width: "100%", children: /* @__PURE__ */ o(c, { sx: { gap: 16 }, children: [
|
|
455
|
+
/* @__PURE__ */ o(c, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
456
|
+
/* @__PURE__ */ e(qe, { sx: { px: 24 }, children: N(
|
|
457
|
+
t.header_title,
|
|
458
|
+
A(u.start, E.MONTH_LONG)
|
|
459
|
+
) }),
|
|
460
|
+
!n && /* @__PURE__ */ o(c, { direction: "row", gap: 4, children: [
|
|
481
461
|
/* @__PURE__ */ e(
|
|
482
|
-
|
|
462
|
+
be,
|
|
483
463
|
{
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
total: l.length,
|
|
489
|
-
upcoming: Q
|
|
464
|
+
color: "primary",
|
|
465
|
+
disabled: ee,
|
|
466
|
+
onClick: ne,
|
|
467
|
+
children: /* @__PURE__ */ e(Ye, {})
|
|
490
468
|
}
|
|
491
469
|
),
|
|
470
|
+
/* @__PURE__ */ e(be, { color: "primary", onClick: te, children: /* @__PURE__ */ e(Ve, {}) })
|
|
471
|
+
] })
|
|
472
|
+
] }),
|
|
473
|
+
/* @__PURE__ */ e(
|
|
474
|
+
we,
|
|
475
|
+
{
|
|
476
|
+
expected: g,
|
|
477
|
+
missed: m,
|
|
478
|
+
paid: x,
|
|
479
|
+
title: t.expenses,
|
|
480
|
+
total: r.length,
|
|
481
|
+
upcoming: W
|
|
482
|
+
}
|
|
483
|
+
),
|
|
484
|
+
/* @__PURE__ */ e(
|
|
485
|
+
we,
|
|
486
|
+
{
|
|
487
|
+
expected: s,
|
|
488
|
+
isExpense: !1,
|
|
489
|
+
paid: b,
|
|
490
|
+
title: t.deposits,
|
|
491
|
+
total: l.length,
|
|
492
|
+
upcoming: J
|
|
493
|
+
}
|
|
494
|
+
),
|
|
495
|
+
n && /* @__PURE__ */ e(
|
|
496
|
+
H,
|
|
497
|
+
{
|
|
498
|
+
onRecurrenceClick: U,
|
|
499
|
+
recurrences: B,
|
|
500
|
+
title: t.upcoming_activity
|
|
501
|
+
}
|
|
502
|
+
),
|
|
503
|
+
!n && /* @__PURE__ */ o(c, { children: [
|
|
504
|
+
/* @__PURE__ */ o(Fe, { onChange: I, value: $, variant: "fullWidth", children: [
|
|
492
505
|
/* @__PURE__ */ e(
|
|
493
|
-
|
|
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,
|
|
506
|
+
Re,
|
|
505
507
|
{
|
|
506
|
-
|
|
507
|
-
recurrences: U,
|
|
508
|
-
title: t.upcoming_activity
|
|
508
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.upcoming : t.upcoming_activity })
|
|
509
509
|
}
|
|
510
510
|
),
|
|
511
|
-
!i && /* @__PURE__ */ o(c, { children: [
|
|
512
|
-
/* @__PURE__ */ o(je, { onChange: ne, value: $, variant: "fullWidth", children: [
|
|
513
|
-
/* @__PURE__ */ e(
|
|
514
|
-
Te,
|
|
515
|
-
{
|
|
516
|
-
label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.upcoming : t.upcoming_activity })
|
|
517
|
-
}
|
|
518
|
-
),
|
|
519
|
-
/* @__PURE__ */ e(
|
|
520
|
-
Te,
|
|
521
|
-
{
|
|
522
|
-
label: /* @__PURE__ */ e(g, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: a ? t.past : t.past_transactions })
|
|
523
|
-
}
|
|
524
|
-
)
|
|
525
|
-
] }),
|
|
526
|
-
$ === 0 && /* @__PURE__ */ e(
|
|
527
|
-
z,
|
|
528
|
-
{
|
|
529
|
-
onRecurrenceClick: _,
|
|
530
|
-
recurrences: U
|
|
531
|
-
}
|
|
532
|
-
),
|
|
533
|
-
$ === 1 && /* @__PURE__ */ e(
|
|
534
|
-
z,
|
|
535
|
-
{
|
|
536
|
-
onRecurrenceClick: F,
|
|
537
|
-
recurrences: x
|
|
538
|
-
}
|
|
539
|
-
)
|
|
540
|
-
] })
|
|
541
|
-
] }) }),
|
|
542
|
-
i && /* @__PURE__ */ e(ae, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
|
|
543
|
-
/* @__PURE__ */ e(ke, {}),
|
|
544
511
|
/* @__PURE__ */ e(
|
|
545
|
-
|
|
512
|
+
Re,
|
|
546
513
|
{
|
|
547
|
-
|
|
548
|
-
recurrences: S || x,
|
|
549
|
-
title: d ? O(
|
|
550
|
-
t.day_transactions,
|
|
551
|
-
A(d, E.MONTH_DAY)
|
|
552
|
-
) : t.past_transactions
|
|
514
|
+
label: /* @__PURE__ */ e(p, { bold: !0, sx: { textTransform: "none" }, variant: "body1", children: i ? t.past : t.past_transactions })
|
|
553
515
|
}
|
|
554
516
|
)
|
|
555
|
-
] })
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
517
|
+
] }),
|
|
518
|
+
$ === 0 && /* @__PURE__ */ e(
|
|
519
|
+
H,
|
|
520
|
+
{
|
|
521
|
+
onRecurrenceClick: U,
|
|
522
|
+
recurrences: B
|
|
523
|
+
}
|
|
524
|
+
),
|
|
525
|
+
$ === 1 && /* @__PURE__ */ e(
|
|
526
|
+
H,
|
|
527
|
+
{
|
|
528
|
+
onRecurrenceClick: _,
|
|
529
|
+
recurrences: f
|
|
530
|
+
}
|
|
531
|
+
)
|
|
532
|
+
] })
|
|
533
|
+
] }) }),
|
|
534
|
+
n && /* @__PURE__ */ e(oe, { sx: { minWidth: 450 }, xs: "auto", children: /* @__PURE__ */ o(c, { gap: 24, children: [
|
|
535
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
536
|
+
/* @__PURE__ */ e(
|
|
537
|
+
H,
|
|
538
|
+
{
|
|
539
|
+
onRecurrenceClick: _,
|
|
540
|
+
recurrences: d || f,
|
|
541
|
+
title: y ? N(
|
|
542
|
+
t.day_transactions,
|
|
543
|
+
A(y, E.MONTH_DAY)
|
|
544
|
+
) : t.past_transactions
|
|
545
|
+
}
|
|
546
|
+
)
|
|
547
|
+
] }) })
|
|
548
|
+
] });
|
|
559
549
|
}), _n = T(({ onBackClick: t, sx: n = {} }) => {
|
|
560
|
-
const { accounts: i } =
|
|
550
|
+
const { accounts: i } = pe(), { recurring: a } = D(), { isCopyLoaded: r, isInitialized: l, selectedAccountGuids: u, setSelectedAccounts: g } = V(), { isDataLoaded: s, loadRepeatingTransactions: m, setDateRange: f } = v(), { setFilter: x } = ge(), { onEvent: b } = X(), [y, d] = h.useState(!1);
|
|
561
551
|
return h.useEffect(() => {
|
|
562
|
-
|
|
552
|
+
g(i);
|
|
563
553
|
}, [i]), h.useEffect(() => {
|
|
564
554
|
l && (x({
|
|
565
|
-
dateRange: { start:
|
|
566
|
-
accounts:
|
|
567
|
-
}), f({ start:
|
|
555
|
+
dateRange: { start: de(le(), 90), end: ce() },
|
|
556
|
+
accounts: u
|
|
557
|
+
}), f({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), m().finally());
|
|
568
558
|
}, [l]), r ? /* @__PURE__ */ o(
|
|
569
559
|
at,
|
|
570
560
|
{
|
|
@@ -574,47 +564,47 @@ const q = {
|
|
|
574
564
|
label: a.action_title,
|
|
575
565
|
iconName: "credit_card_gear",
|
|
576
566
|
onClick: () => {
|
|
577
|
-
d(!0),
|
|
567
|
+
d(!0), b(w.RECURRING_TRANSACTIONS_CLICK_SETTINGS);
|
|
578
568
|
}
|
|
579
569
|
}
|
|
580
570
|
],
|
|
581
|
-
onAccountsFilterClick: () =>
|
|
571
|
+
onAccountsFilterClick: () => b(w.RECURRING_TRANSACTIONS_CLICK_FILTER),
|
|
582
572
|
onBackClick: t,
|
|
583
573
|
sx: n,
|
|
584
574
|
title: a.title,
|
|
585
575
|
children: [
|
|
586
576
|
l && s ? /* @__PURE__ */ e(bt, {}) : /* @__PURE__ */ o(c, { direction: "column", p: 48, spacing: 24, children: [
|
|
587
|
-
/* @__PURE__ */ e(
|
|
588
|
-
/* @__PURE__ */ e(
|
|
589
|
-
/* @__PURE__ */ e(
|
|
577
|
+
/* @__PURE__ */ e(re, { height: 100, variant: "rounded", width: "100%" }),
|
|
578
|
+
/* @__PURE__ */ e(re, { height: 100, variant: "rounded", width: "100%" }),
|
|
579
|
+
/* @__PURE__ */ e(re, { height: 600, variant: "rounded", width: "100%" })
|
|
590
580
|
] }),
|
|
591
581
|
/* @__PURE__ */ e(
|
|
592
|
-
|
|
582
|
+
Ae,
|
|
593
583
|
{
|
|
594
584
|
ariaLabelClose: a.close_drawer_aria,
|
|
595
585
|
isOpen: y,
|
|
596
586
|
onClose: () => d(!1),
|
|
597
587
|
shouldShowHeaderBorders: !1,
|
|
598
588
|
title: a.action_title,
|
|
599
|
-
children: /* @__PURE__ */ e(
|
|
589
|
+
children: /* @__PURE__ */ e(He, {})
|
|
600
590
|
}
|
|
601
591
|
)
|
|
602
592
|
]
|
|
603
593
|
}
|
|
604
|
-
) : /* @__PURE__ */ e(
|
|
594
|
+
) : /* @__PURE__ */ e(j, {});
|
|
605
595
|
}), Rt = T(() => {
|
|
606
|
-
const { recurring: t } = D(), { availableWidth: n } =
|
|
607
|
-
return /* @__PURE__ */ o(c, { flexDirection:
|
|
608
|
-
/* @__PURE__ */ e(
|
|
609
|
-
!
|
|
596
|
+
const { recurring: t } = D(), { availableWidth: n } = rt(), { selectedDay: i, selectedDayRecurrences: a, setSelectedDay: r, upcomingRecurrences: l } = v(), u = n < 750;
|
|
597
|
+
return /* @__PURE__ */ o(c, { flexDirection: u ? "column" : "row", width: "100%", children: [
|
|
598
|
+
/* @__PURE__ */ e(Ne, {}),
|
|
599
|
+
!u && /* @__PURE__ */ e(se, { flexItem: !0, orientation: "vertical", sx: { my: 16, ml: 16 } }),
|
|
610
600
|
/* @__PURE__ */ e(
|
|
611
|
-
|
|
601
|
+
H,
|
|
612
602
|
{
|
|
613
603
|
isMini: !0,
|
|
614
604
|
onResetClick: i ? () => r(i) : void 0,
|
|
615
605
|
recurrences: a || l.slice(0, 5),
|
|
616
|
-
sx: { width:
|
|
617
|
-
title: i ?
|
|
606
|
+
sx: { width: u ? "100%" : "calc(100% - 336px)", mt: 12 },
|
|
607
|
+
title: i ? N(
|
|
618
608
|
t.day_transactions,
|
|
619
609
|
A(i, E.MONTH_DAY)
|
|
620
610
|
) : t.upcoming_activity
|
|
@@ -623,15 +613,15 @@ const q = {
|
|
|
623
613
|
] });
|
|
624
614
|
}), wn = T(
|
|
625
615
|
({ onPrimaryCtaClick: t, sx: n }) => {
|
|
626
|
-
const { accounts: i } =
|
|
616
|
+
const { accounts: i } = pe(), { recurring: a } = D(), { setFilter: r } = ge(), { isDataLoaded: l, loadRepeatingTransactions: u } = v(), { isCopyLoaded: g, isInitialized: s, setSelectedAccounts: m, selectedAccountGuids: f } = V();
|
|
627
617
|
return h.useEffect(() => {
|
|
628
618
|
s && m(i);
|
|
629
619
|
}, [s]), h.useEffect(() => {
|
|
630
620
|
f.length > 0 && (r({
|
|
631
|
-
dateRange: { start:
|
|
621
|
+
dateRange: { start: de(le(), 90), end: ce() },
|
|
632
622
|
accounts: f
|
|
633
|
-
}),
|
|
634
|
-
}, [f]), !
|
|
623
|
+
}), u().finally());
|
|
624
|
+
}, [f]), !g || !s ? /* @__PURE__ */ e(j, {}) : /* @__PURE__ */ e(
|
|
635
625
|
pt,
|
|
636
626
|
{
|
|
637
627
|
className: "mx-exp-recurring-transactions-miniwidget",
|
|
@@ -640,7 +630,7 @@ const q = {
|
|
|
640
630
|
subTitle: a.sub_title,
|
|
641
631
|
sx: n,
|
|
642
632
|
title: a.mini_title,
|
|
643
|
-
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(
|
|
633
|
+
children: l ? /* @__PURE__ */ e(Rt, {}) : /* @__PURE__ */ e(j, {})
|
|
644
634
|
}
|
|
645
635
|
);
|
|
646
636
|
}
|
|
@@ -648,7 +638,7 @@ const q = {
|
|
|
648
638
|
upcomingRecurrences: t,
|
|
649
639
|
maxLogos: n = 3
|
|
650
640
|
}) => /* @__PURE__ */ e(c, { sx: { flexDirection: "row", gap: 4 }, children: t?.slice(0, n).map((i, a) => /* @__PURE__ */ e(
|
|
651
|
-
|
|
641
|
+
ue,
|
|
652
642
|
{
|
|
653
643
|
categoryGuid: i.categoryGuid || "",
|
|
654
644
|
merchantGuid: i.merchantGuid || ""
|
|
@@ -661,14 +651,14 @@ const q = {
|
|
|
661
651
|
}) => {
|
|
662
652
|
const a = (r) => r * (n / 2);
|
|
663
653
|
return /* @__PURE__ */ e(
|
|
664
|
-
|
|
654
|
+
O,
|
|
665
655
|
{
|
|
666
656
|
sx: {
|
|
667
657
|
position: "relative",
|
|
668
658
|
width: 64
|
|
669
659
|
},
|
|
670
660
|
children: t.map((r, l) => l < i ? /* @__PURE__ */ e(
|
|
671
|
-
|
|
661
|
+
O,
|
|
672
662
|
{
|
|
673
663
|
sx: {
|
|
674
664
|
borderRadius: "4px",
|
|
@@ -679,7 +669,7 @@ const q = {
|
|
|
679
669
|
position: "absolute"
|
|
680
670
|
},
|
|
681
671
|
children: /* @__PURE__ */ e(
|
|
682
|
-
|
|
672
|
+
ue,
|
|
683
673
|
{
|
|
684
674
|
categoryGuid: r.categoryGuid || "",
|
|
685
675
|
merchantGuid: r.merchantGuid || "",
|
|
@@ -699,7 +689,7 @@ const q = {
|
|
|
699
689
|
label: r
|
|
700
690
|
}) => /* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 8 }, children: [
|
|
701
691
|
/* @__PURE__ */ e(
|
|
702
|
-
|
|
692
|
+
O,
|
|
703
693
|
{
|
|
704
694
|
sx: {
|
|
705
695
|
borderRadius: "2px",
|
|
@@ -710,73 +700,73 @@ const q = {
|
|
|
710
700
|
}
|
|
711
701
|
),
|
|
712
702
|
/* @__PURE__ */ o(c, { sx: { alignItems: "center", flexDirection: "row", gap: 2 }, children: [
|
|
713
|
-
!a && /* @__PURE__ */ e(
|
|
714
|
-
/* @__PURE__ */ e(
|
|
703
|
+
!a && /* @__PURE__ */ e(p, { bold: !0, variant: "caption", children: L(t, t === 0 || !i ? "0,0" : "0,0.00") }),
|
|
704
|
+
/* @__PURE__ */ e(p, { variant: "caption", children: r })
|
|
715
705
|
] })
|
|
716
706
|
] }), It = T(() => {
|
|
717
707
|
const { recurring: t } = D();
|
|
718
708
|
return /* @__PURE__ */ o(c, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
719
|
-
/* @__PURE__ */ e(
|
|
709
|
+
/* @__PURE__ */ e(Xe, { size: 32 }),
|
|
720
710
|
/* @__PURE__ */ o(c, { children: [
|
|
721
|
-
/* @__PURE__ */ e(
|
|
722
|
-
/* @__PURE__ */ e(
|
|
711
|
+
/* @__PURE__ */ e(ae, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
712
|
+
/* @__PURE__ */ e(ae, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
723
713
|
] })
|
|
724
714
|
] });
|
|
725
715
|
}), vn = T(
|
|
726
716
|
({ onCTAClick: t }) => {
|
|
727
|
-
const [n, i] = h.useState(!1), { onEvent: a } =
|
|
728
|
-
loadRepeatingTransactions:
|
|
717
|
+
const [n, i] = h.useState(!1), { onEvent: a } = X(), r = me(), { accounts: l } = pe(), [u, { width: g }] = gt(), { isCopyLoaded: s, isInitialized: m, selectedAccountGuids: f, setSelectedAccounts: x } = V(), {
|
|
718
|
+
loadRepeatingTransactions: b,
|
|
729
719
|
upcomingRecurrences: y,
|
|
730
720
|
expenseTotal: d,
|
|
731
721
|
missedExpenseTotal: S,
|
|
732
|
-
paidExpenseTotal:
|
|
733
|
-
repeatingTransactions:
|
|
734
|
-
setDateRange:
|
|
735
|
-
upcomingExpenseTotal:
|
|
736
|
-
isDataLoaded:
|
|
737
|
-
} = v(), { setFilter:
|
|
722
|
+
paidExpenseTotal: W,
|
|
723
|
+
repeatingTransactions: J,
|
|
724
|
+
setDateRange: B,
|
|
725
|
+
upcomingExpenseTotal: $,
|
|
726
|
+
isDataLoaded: Q
|
|
727
|
+
} = v(), { setFilter: ee } = ge(), { recurring: I, budgets: U } = D();
|
|
738
728
|
h.useEffect(() => {
|
|
739
729
|
x(l);
|
|
740
730
|
}, [l]), h.useEffect(() => {
|
|
741
|
-
m && (
|
|
742
|
-
dateRange: { start:
|
|
731
|
+
m && (ee({
|
|
732
|
+
dateRange: { start: de(le(), 90), end: ce() },
|
|
743
733
|
accounts: f
|
|
744
|
-
}),
|
|
734
|
+
}), B({ start: k(/* @__PURE__ */ new Date()), end: z(/* @__PURE__ */ new Date()) }), b().finally(), i(!0));
|
|
745
735
|
}, [m]), h.useEffect(() => {
|
|
746
736
|
n && a(w.RECURRING_TRANSACTIONS_LOAD_WIDGET, {
|
|
747
737
|
state: y.length > 0 ? "default" : "zeroState"
|
|
748
738
|
});
|
|
749
739
|
}, [n]);
|
|
750
|
-
const _ =
|
|
751
|
-
const
|
|
752
|
-
{ color: r.palette.success.main, percentage: `${
|
|
740
|
+
const _ = g <= 288, te = g >= 450, ne = h.useMemo(() => {
|
|
741
|
+
const G = [
|
|
742
|
+
{ color: r.palette.success.main, percentage: `${W / d}` }
|
|
753
743
|
];
|
|
754
|
-
return S &&
|
|
744
|
+
return S && G.push({
|
|
755
745
|
color: r.palette.error.main,
|
|
756
746
|
percentage: `${S / d}`
|
|
757
|
-
}),
|
|
747
|
+
}), G;
|
|
758
748
|
}, [
|
|
759
|
-
|
|
749
|
+
W,
|
|
760
750
|
d,
|
|
761
751
|
S,
|
|
762
752
|
r.palette.success.main,
|
|
763
753
|
r.palette.error.main
|
|
764
|
-
]),
|
|
754
|
+
]), C = h.useMemo(() => L(d, d === 0 ? "0,0" : "0,0.00"), [d]), ie = () => {
|
|
765
755
|
a(
|
|
766
756
|
y.length > 0 ? w.RECURRING_TRANSACTIONS_CLICK_GET_STARTED : w.RECURRING_TRANSACTIONS_CLICK_VIEW_ALL
|
|
767
757
|
), t();
|
|
768
758
|
};
|
|
769
|
-
if (!s || !n ||
|
|
770
|
-
const
|
|
759
|
+
if (!s || !n || !Q) return /* @__PURE__ */ e(j, { height: 100 });
|
|
760
|
+
const Oe = 32, ke = y.length > 0, We = () => ke ? _ ? /* @__PURE__ */ e(
|
|
771
761
|
Dt,
|
|
772
762
|
{
|
|
773
|
-
logoSize:
|
|
763
|
+
logoSize: Oe,
|
|
774
764
|
maxLogos: 3,
|
|
775
765
|
upcomingRecurrences: y.slice(0, 3)
|
|
776
766
|
}
|
|
777
|
-
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: _ ? 64 : 104 } }),
|
|
767
|
+
) : /* @__PURE__ */ e(Tt, { maxLogos: 3, upcomingRecurrences: y.slice(0, 3) }) : /* @__PURE__ */ e(c, { sx: { width: _ ? 64 : 104 } }), $e = [
|
|
778
768
|
{
|
|
779
|
-
amount:
|
|
769
|
+
amount: W,
|
|
780
770
|
bgColor: "success.main",
|
|
781
771
|
label: I.paid
|
|
782
772
|
},
|
|
@@ -786,23 +776,23 @@ const q = {
|
|
|
786
776
|
label: I.missed
|
|
787
777
|
},
|
|
788
778
|
{
|
|
789
|
-
amount:
|
|
779
|
+
amount: $,
|
|
790
780
|
bgColor: "border.light",
|
|
791
781
|
label: I.upcoming
|
|
792
782
|
}
|
|
793
|
-
],
|
|
783
|
+
], Ce = !J?.length;
|
|
794
784
|
return /* @__PURE__ */ e(
|
|
795
785
|
ht,
|
|
796
786
|
{
|
|
797
787
|
className: "mx-recurring-transaction-microwidget",
|
|
798
|
-
ctaLabel:
|
|
799
|
-
onCTAClick:
|
|
788
|
+
ctaLabel: Ce ? U.get_started_cta : I.primary_cta,
|
|
789
|
+
onCTAClick: ie,
|
|
800
790
|
title: I.recurring_expenses,
|
|
801
|
-
children:
|
|
791
|
+
children: Ce ? /* @__PURE__ */ e(It, {}) : /* @__PURE__ */ o(K, { children: [
|
|
802
792
|
/* @__PURE__ */ o(
|
|
803
793
|
c,
|
|
804
794
|
{
|
|
805
|
-
ref:
|
|
795
|
+
ref: u,
|
|
806
796
|
sx: {
|
|
807
797
|
flexDirection: "row",
|
|
808
798
|
justifyContent: "space-between"
|
|
@@ -812,7 +802,7 @@ const q = {
|
|
|
812
802
|
c,
|
|
813
803
|
{
|
|
814
804
|
sx: [
|
|
815
|
-
|
|
805
|
+
C.length >= 10 && _ ? { flexDirection: "column" } : { flexDirection: "row", gap: 2 },
|
|
816
806
|
{
|
|
817
807
|
alignItems: "baseline",
|
|
818
808
|
overflow: "hidden",
|
|
@@ -822,15 +812,15 @@ const q = {
|
|
|
822
812
|
],
|
|
823
813
|
children: [
|
|
824
814
|
/* @__PURE__ */ e(
|
|
825
|
-
|
|
815
|
+
p,
|
|
826
816
|
{
|
|
827
817
|
sx: { width: "100%" },
|
|
828
|
-
variant:
|
|
829
|
-
children:
|
|
818
|
+
variant: C.length >= 10 && _ ? "H3" : "H2",
|
|
819
|
+
children: C
|
|
830
820
|
}
|
|
831
821
|
),
|
|
832
822
|
/* @__PURE__ */ e(
|
|
833
|
-
|
|
823
|
+
ae,
|
|
834
824
|
{
|
|
835
825
|
sx: {
|
|
836
826
|
pr: 12
|
|
@@ -842,12 +832,12 @@ const q = {
|
|
|
842
832
|
]
|
|
843
833
|
}
|
|
844
834
|
),
|
|
845
|
-
|
|
835
|
+
We()
|
|
846
836
|
]
|
|
847
837
|
}
|
|
848
838
|
),
|
|
849
839
|
/* @__PURE__ */ o(c, { sx: { pt: 12 }, children: [
|
|
850
|
-
/* @__PURE__ */ e(
|
|
840
|
+
/* @__PURE__ */ e(Ee, { data: ne }),
|
|
851
841
|
/* @__PURE__ */ e(
|
|
852
842
|
c,
|
|
853
843
|
{
|
|
@@ -857,16 +847,16 @@ const q = {
|
|
|
857
847
|
gap: 16,
|
|
858
848
|
mt: 4
|
|
859
849
|
},
|
|
860
|
-
children:
|
|
850
|
+
children: $e.map((G, Pe) => /* @__PURE__ */ e(
|
|
861
851
|
St,
|
|
862
852
|
{
|
|
863
|
-
amount:
|
|
864
|
-
bgcolor:
|
|
865
|
-
isLargeScreen:
|
|
853
|
+
amount: G.amount,
|
|
854
|
+
bgcolor: G.bgColor,
|
|
855
|
+
isLargeScreen: te,
|
|
866
856
|
isSmallScreen: _,
|
|
867
|
-
label:
|
|
857
|
+
label: G.label
|
|
868
858
|
},
|
|
869
|
-
`recurrence-legend-${
|
|
859
|
+
`recurrence-legend-${Pe}`
|
|
870
860
|
))
|
|
871
861
|
}
|
|
872
862
|
)
|
|
@@ -880,7 +870,7 @@ export {
|
|
|
880
870
|
On as AddRecurringTransactionDetails,
|
|
881
871
|
An as ManageExpenses,
|
|
882
872
|
kn as ManageIncome,
|
|
883
|
-
|
|
873
|
+
He as RecurringSettings,
|
|
884
874
|
vn as RecurringTransactionsMicroWidget,
|
|
885
875
|
wn as RecurringTransactionsMiniWidget,
|
|
886
876
|
Gn as RecurringTransactionsStore,
|