@mx-cartographer/experiences 7.0.37-alpha-testing-mr-ram1 → 7.0.38-alpha.mm0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -4
- package/dist/{ManageIncome-4_bSdxXr.mjs → ManageIncome-BaZyK1CD.mjs} +73 -74
- package/dist/RecurringSettings-DHPyexin.mjs +79 -0
- package/dist/budgets/index.es.js +120 -117
- package/dist/cashflow/index.es.js +2 -2
- package/dist/common/types/localization/CommonCopy.d.ts +3 -0
- package/dist/finstrong/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +4 -4
- package/package.json +1 -1
- package/dist/RecurringSettings-RduF8gt3.mjs +0 -88
package/CHANGELOG.md
CHANGED
|
@@ -3,24 +3,24 @@ import u from "react";
|
|
|
3
3
|
import { observer as A } from "mobx-react-lite";
|
|
4
4
|
import P from "@mui/material/Box";
|
|
5
5
|
import T from "@mui/material/Divider";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import le from "@
|
|
13
|
-
import { F as d, S as N, D as Y, g as
|
|
6
|
+
import K from "@mui/material/List";
|
|
7
|
+
import p from "@mui/material/Stack";
|
|
8
|
+
import re from "@mui/material/ListItem";
|
|
9
|
+
import ae from "@mui/material/ListItemAvatar";
|
|
10
|
+
import ie from "@mui/material/ListItemButton";
|
|
11
|
+
import se from "@mui/material/ListItemText";
|
|
12
|
+
import { MerchantLogo as Q, Text as x, H1 as ce, InstitutionLogo as le, P as U } from "@mxenabled/mxui";
|
|
13
|
+
import { F as d, S as N, D as Y, g as $, R as E, e as de } from "./RepeatingTransaction-BW4J-jeJ.mjs";
|
|
14
14
|
import { subDays as ue } from "date-fns/subDays";
|
|
15
15
|
import { startOfToday as z } from "date-fns/startOfToday";
|
|
16
16
|
import { endOfMonth as _e } from "date-fns/endOfMonth";
|
|
17
|
-
import
|
|
18
|
-
import { Delete as me, Add as
|
|
17
|
+
import H from "@mui/material/Button";
|
|
18
|
+
import { Delete as me, Add as ye, ReceiptLong as pe } from "@mxenabled/mx-icons";
|
|
19
19
|
import { T as X, a as he, u as ge, S as fe, b as Ce } from "./TransactionDetails-C-2UEbmQ.mjs";
|
|
20
20
|
import { getDayOfYear as be } from "date-fns/getDayOfYear";
|
|
21
|
-
import { setDayOfYear as
|
|
22
|
-
import { AdapterDateFns as
|
|
23
|
-
import { DatePicker as
|
|
21
|
+
import { setDayOfYear as Se } from "date-fns/setDayOfYear";
|
|
22
|
+
import { AdapterDateFns as ve } from "@mui/x-date-pickers/AdapterDateFnsV3";
|
|
23
|
+
import { DatePicker as xe } from "@mui/x-date-pickers";
|
|
24
24
|
import { LocalizationProvider as we } from "@mui/x-date-pickers/LocalizationProvider";
|
|
25
25
|
import { u as w, i as M, f as F, a as Ae, g as Z, o as De } from "./hooks-BAAimqdq.mjs";
|
|
26
26
|
import { b as Ie, f as J } from "./NumberFormatting-CtWHhyBX.mjs";
|
|
@@ -61,15 +61,15 @@ const ee = ({
|
|
|
61
61
|
{ id: 4, label: o.weekday_thursday },
|
|
62
62
|
{ id: 5, label: o.weekday_friday },
|
|
63
63
|
{ id: 6, label: o.weekday_saturday }
|
|
64
|
-
], h = [...Array(31).keys()].map((
|
|
65
|
-
id:
|
|
66
|
-
label: Ie(
|
|
64
|
+
], h = [...Array(31).keys()].map((y) => ({
|
|
65
|
+
id: y + 1,
|
|
66
|
+
label: Ie(y + 1)
|
|
67
67
|
}));
|
|
68
68
|
h[30].label += ` (${o.last_day_of_month})`;
|
|
69
|
-
const C = h.slice(0, 15), v = h.slice(14), b = n === d.EveryWeek || n === d.EveryOtherWeek, g = n === d.TwiceAMonth || n === d.EveryMonth || n === d.EveryOtherMonth || n === d.EveryQuarter || n === d.EveryOtherQuarter, D =
|
|
70
|
-
|
|
69
|
+
const C = h.slice(0, 15), v = h.slice(14), b = n === d.EveryWeek || n === d.EveryOtherWeek, g = n === d.TwiceAMonth || n === d.EveryMonth || n === d.EveryOtherMonth || n === d.EveryQuarter || n === d.EveryOtherQuarter, D = Se(z(), t), f = (y) => {
|
|
70
|
+
y && s(be(y));
|
|
71
71
|
};
|
|
72
|
-
return /* @__PURE__ */ c(
|
|
72
|
+
return /* @__PURE__ */ c(p, { gap: 24, sx: { m: 24 }, children: [
|
|
73
73
|
/* @__PURE__ */ e(
|
|
74
74
|
N,
|
|
75
75
|
{
|
|
@@ -106,8 +106,8 @@ const ee = ({
|
|
|
106
106
|
value: r || 0
|
|
107
107
|
}
|
|
108
108
|
),
|
|
109
|
-
n === d.EveryYear && /* @__PURE__ */ e(we, { dateAdapter:
|
|
110
|
-
|
|
109
|
+
n === d.EveryYear && /* @__PURE__ */ e(we, { dateAdapter: ve, children: /* @__PURE__ */ e(
|
|
110
|
+
xe,
|
|
111
111
|
{
|
|
112
112
|
disablePast: !0,
|
|
113
113
|
label: o.next_payment_date,
|
|
@@ -134,7 +134,7 @@ const ee = ({
|
|
|
134
134
|
iconName: "sync",
|
|
135
135
|
label: t.activity_schedule,
|
|
136
136
|
onClick: g,
|
|
137
|
-
value: `${
|
|
137
|
+
value: `${$(t, n, !0)}`
|
|
138
138
|
}
|
|
139
139
|
),
|
|
140
140
|
/* @__PURE__ */ e(
|
|
@@ -172,15 +172,15 @@ const ee = ({
|
|
|
172
172
|
const f = u.useMemo(
|
|
173
173
|
() => i.find((_) => _.guid === g),
|
|
174
174
|
[g, i]
|
|
175
|
-
),
|
|
175
|
+
), y = t.repeating_transaction_type === E.Income, k = async () => {
|
|
176
176
|
await l(t.guid), n();
|
|
177
177
|
}, G = () => {
|
|
178
178
|
b(!0), s(R.RECURRING_TRANSACTIONS_DETAILS_CLICK_DELETE);
|
|
179
179
|
};
|
|
180
|
-
return /* @__PURE__ */ c(
|
|
181
|
-
/* @__PURE__ */ c(
|
|
180
|
+
return /* @__PURE__ */ c(p, { bgcolor: "background.default", direction: "column", height: "100%", children: [
|
|
181
|
+
/* @__PURE__ */ c(p, { direction: "column", m: 24, children: [
|
|
182
182
|
/* @__PURE__ */ e(
|
|
183
|
-
|
|
183
|
+
Q,
|
|
184
184
|
{
|
|
185
185
|
categoryGuid: f?.category_guid || "",
|
|
186
186
|
merchantGuid: C,
|
|
@@ -188,17 +188,17 @@ const ee = ({
|
|
|
188
188
|
sx: { mb: 12 }
|
|
189
189
|
}
|
|
190
190
|
),
|
|
191
|
-
/* @__PURE__ */ e(
|
|
192
|
-
/* @__PURE__ */ c(
|
|
193
|
-
|
|
191
|
+
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: h }),
|
|
192
|
+
/* @__PURE__ */ c(ce, { color: y ? "success.main" : "text.primary", sx: { my: 4 }, children: [
|
|
193
|
+
y ? "+" : "",
|
|
194
194
|
J(m, "0,0.00")
|
|
195
195
|
] }),
|
|
196
|
-
/* @__PURE__ */ e(
|
|
196
|
+
/* @__PURE__ */ e(x, { color: "text.secondary", variant: "body2", children: `${r.next_payment_date}: ${Ee(
|
|
197
197
|
t.predicted_occurs_on,
|
|
198
198
|
Re.MONTH_DAY_YEAR
|
|
199
199
|
)}` })
|
|
200
200
|
] }),
|
|
201
|
-
/* @__PURE__ */ c(
|
|
201
|
+
/* @__PURE__ */ c(K, { sx: { bgcolor: "background.paper" }, children: [
|
|
202
202
|
t.account && /* @__PURE__ */ c(L, { children: [
|
|
203
203
|
/* @__PURE__ */ e(
|
|
204
204
|
Y,
|
|
@@ -225,17 +225,17 @@ const ee = ({
|
|
|
225
225
|
/* @__PURE__ */ e(T, {})
|
|
226
226
|
] }),
|
|
227
227
|
/* @__PURE__ */ e(
|
|
228
|
-
|
|
228
|
+
H,
|
|
229
229
|
{
|
|
230
230
|
color: "error",
|
|
231
231
|
onClick: G,
|
|
232
232
|
startIcon: /* @__PURE__ */ e(me, {}),
|
|
233
233
|
sx: { mx: 24, my: 16 },
|
|
234
234
|
variant: "text",
|
|
235
|
-
children:
|
|
235
|
+
children: y ? r.delete_income_title : r.delete_expense_title
|
|
236
236
|
}
|
|
237
237
|
),
|
|
238
|
-
/* @__PURE__ */ e(
|
|
238
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { ml: 24, mt: 16 }, variant: "Body", children: r.paid_transactions }),
|
|
239
239
|
/* @__PURE__ */ e(X, { height: "30dvh", onClick: D }),
|
|
240
240
|
/* @__PURE__ */ e(
|
|
241
241
|
O,
|
|
@@ -251,13 +251,13 @@ const ee = ({
|
|
|
251
251
|
Te,
|
|
252
252
|
{
|
|
253
253
|
copy: {
|
|
254
|
-
title:
|
|
254
|
+
title: y ? r.delete_income_title : r.delete_expense_title,
|
|
255
255
|
close_aria: r.close_drawer_aria
|
|
256
256
|
},
|
|
257
257
|
isOpen: v,
|
|
258
258
|
onClose: () => b(!1),
|
|
259
259
|
onPrimaryAction: k,
|
|
260
|
-
children: /* @__PURE__ */ e(
|
|
260
|
+
children: /* @__PURE__ */ e(x, { children: y ? r.delete_income_description : r.delete_expense_description })
|
|
261
261
|
}
|
|
262
262
|
)
|
|
263
263
|
] });
|
|
@@ -268,36 +268,36 @@ const ee = ({
|
|
|
268
268
|
const { recurring: r } = w(), [a, s] = u.useState(!1), l = u.useMemo(
|
|
269
269
|
() => t.transactions.length === 0 ? "" : t.transactions[0].category_guid || "",
|
|
270
270
|
[t]
|
|
271
|
-
), o = t.account?.institutionName || "", i = t.repeating_transaction_type === E.Income, m =
|
|
272
|
-
return /* @__PURE__ */ c(
|
|
273
|
-
/* @__PURE__ */ c(
|
|
271
|
+
), o = t.account?.institutionName || "", i = t.repeating_transaction_type === E.Income, m = $(r, t, !0);
|
|
272
|
+
return /* @__PURE__ */ c(re, { disableGutters: !0, disablePadding: !0, children: [
|
|
273
|
+
/* @__PURE__ */ c(ie, { onClick: () => {
|
|
274
274
|
n(t), s(!0);
|
|
275
275
|
}, children: [
|
|
276
|
-
/* @__PURE__ */ e(
|
|
277
|
-
|
|
276
|
+
/* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
|
|
277
|
+
Q,
|
|
278
278
|
{
|
|
279
279
|
categoryGuid: l,
|
|
280
280
|
merchantGuid: t.merchant_guid
|
|
281
281
|
}
|
|
282
282
|
) }),
|
|
283
|
-
/* @__PURE__ */ e(
|
|
284
|
-
/* @__PURE__ */ c(
|
|
285
|
-
/* @__PURE__ */ e(
|
|
286
|
-
/* @__PURE__ */ c(
|
|
283
|
+
/* @__PURE__ */ e(se, { children: /* @__PURE__ */ c(p, { direction: "row", gap: 4, sx: { justifyContent: "space-between" }, children: [
|
|
284
|
+
/* @__PURE__ */ c(p, { direction: "column", sx: { width: "50%" }, children: [
|
|
285
|
+
/* @__PURE__ */ e(x, { bold: !0, variant: "body1", children: t.description }),
|
|
286
|
+
/* @__PURE__ */ c(p, { alignItems: "center", direction: "row", gap: 6, children: [
|
|
287
287
|
t.account?.institution_guid && /* @__PURE__ */ e(
|
|
288
|
-
|
|
288
|
+
le,
|
|
289
289
|
{
|
|
290
290
|
alt: o,
|
|
291
291
|
institutionGuid: t.account?.institution_guid,
|
|
292
292
|
size: 12
|
|
293
293
|
}
|
|
294
294
|
),
|
|
295
|
-
/* @__PURE__ */ e(
|
|
295
|
+
/* @__PURE__ */ e(x, { variant: "caption", children: o })
|
|
296
296
|
] })
|
|
297
297
|
] }),
|
|
298
|
-
/* @__PURE__ */ c(
|
|
298
|
+
/* @__PURE__ */ c(p, { alignItems: "flex-end", sx: { width: "50%" }, children: [
|
|
299
299
|
/* @__PURE__ */ c(
|
|
300
|
-
|
|
300
|
+
x,
|
|
301
301
|
{
|
|
302
302
|
bold: !0,
|
|
303
303
|
color: i ? "success.main" : "text.primary",
|
|
@@ -309,7 +309,7 @@ const ee = ({
|
|
|
309
309
|
}
|
|
310
310
|
),
|
|
311
311
|
/* @__PURE__ */ e(
|
|
312
|
-
|
|
312
|
+
p,
|
|
313
313
|
{
|
|
314
314
|
direction: "row",
|
|
315
315
|
sx: {
|
|
@@ -319,7 +319,7 @@ const ee = ({
|
|
|
319
319
|
textTransform: "uppercase",
|
|
320
320
|
width: "100%"
|
|
321
321
|
},
|
|
322
|
-
children: /* @__PURE__ */ e(
|
|
322
|
+
children: /* @__PURE__ */ e(x, { bold: !0, color: "text.secondary", variant: "caption", children: m })
|
|
323
323
|
}
|
|
324
324
|
)
|
|
325
325
|
] })
|
|
@@ -351,7 +351,7 @@ const ee = ({
|
|
|
351
351
|
onSelected: a
|
|
352
352
|
}) => {
|
|
353
353
|
const { recurring: s } = w(), { searchValue: l, setSearchValue: o } = ge();
|
|
354
|
-
return /* @__PURE__ */ c(
|
|
354
|
+
return /* @__PURE__ */ c(p, { sx: { bgcolor: n, gap: 16, pt: 8 }, children: [
|
|
355
355
|
t && /* @__PURE__ */ e(U, { sx: { mx: 24 }, children: t }),
|
|
356
356
|
/* @__PURE__ */ e(
|
|
357
357
|
ke,
|
|
@@ -380,12 +380,12 @@ const ee = ({
|
|
|
380
380
|
transaction: i
|
|
381
381
|
}) => {
|
|
382
382
|
const { recurring: m } = w();
|
|
383
|
-
return /* @__PURE__ */ c(
|
|
384
|
-
/* @__PURE__ */ c(
|
|
383
|
+
return /* @__PURE__ */ c(p, { bgcolor: n, gap: 24, height: "100%", children: [
|
|
384
|
+
/* @__PURE__ */ c(p, { children: [
|
|
385
385
|
/* @__PURE__ */ e(fe, { bgcolor: n, children: Ne(i.date) }),
|
|
386
386
|
/* @__PURE__ */ e(Ce, { transaction: i })
|
|
387
387
|
] }),
|
|
388
|
-
/* @__PURE__ */ e(
|
|
388
|
+
/* @__PURE__ */ e(x, { bold: !0, sx: { mx: 24 }, variant: "Body", children: m.payment_schedule }),
|
|
389
389
|
/* @__PURE__ */ e(
|
|
390
390
|
ee,
|
|
391
391
|
{
|
|
@@ -405,25 +405,25 @@ const ee = ({
|
|
|
405
405
|
label: t,
|
|
406
406
|
onAddRecurringTransaction: r = () => null
|
|
407
407
|
}) => {
|
|
408
|
-
const { recurring: a } = w(), { filter: s, setFilter: l, transactions: o } = Z(), { addRepeatingTransaction: i } = M(), { user: m } = De(), [h, C] = u.useState(!1), [v, b] = u.useState(""), [g, D] = u.useState(d.EveryMonth), [f,
|
|
409
|
-
() => o.find((
|
|
408
|
+
const { recurring: a } = w(), { filter: s, setFilter: l, transactions: o } = Z(), { addRepeatingTransaction: i } = M(), { user: m } = De(), [h, C] = u.useState(!1), [v, b] = u.useState(""), [g, D] = u.useState(d.EveryMonth), [f, y] = u.useState(1), [k, G] = u.useState(15), _ = u.useMemo(
|
|
409
|
+
() => o.find((S) => S.guid === v),
|
|
410
410
|
[v, o]
|
|
411
411
|
), ne = () => {
|
|
412
412
|
C(!0), l(n ? { ...s, custom: W } : { ...s, custom: q });
|
|
413
413
|
}, oe = async () => {
|
|
414
414
|
if (!_) {
|
|
415
|
-
|
|
415
|
+
j();
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
418
|
r();
|
|
419
|
-
const
|
|
419
|
+
const S = de(g, Oe(_.date)), I = {
|
|
420
420
|
account_guid: _.account_guid,
|
|
421
421
|
amount: _.amount,
|
|
422
422
|
created_by: 0,
|
|
423
423
|
// User
|
|
424
424
|
merchant_guid: _.merchant_guid,
|
|
425
425
|
description: _.payee || _.description || _.feed_description,
|
|
426
|
-
predicted_occurs_on: Le(
|
|
426
|
+
predicted_occurs_on: Le(S, { representation: "date" }),
|
|
427
427
|
recurrence_day: f,
|
|
428
428
|
recurrence_type: g,
|
|
429
429
|
repeating_transaction_type: n ? E.Income : E.Bill,
|
|
@@ -431,12 +431,12 @@ const ee = ({
|
|
|
431
431
|
transaction_type: _.transaction_type,
|
|
432
432
|
user_guid: m.guid
|
|
433
433
|
};
|
|
434
|
-
await i(I, _),
|
|
435
|
-
},
|
|
434
|
+
await i(I, _), j();
|
|
435
|
+
}, j = () => {
|
|
436
436
|
b(""), C(!1);
|
|
437
437
|
};
|
|
438
438
|
return /* @__PURE__ */ c(L, { children: [
|
|
439
|
-
/* @__PURE__ */ e(
|
|
439
|
+
/* @__PURE__ */ e(H, { onClick: ne, startIcon: /* @__PURE__ */ e(ye, { size: 24 }), variant: "contained", children: t }),
|
|
440
440
|
/* @__PURE__ */ e(
|
|
441
441
|
O,
|
|
442
442
|
{
|
|
@@ -448,13 +448,13 @@ const ee = ({
|
|
|
448
448
|
Pe,
|
|
449
449
|
{
|
|
450
450
|
description: n ? a.add_income_description : a.add_expense_description,
|
|
451
|
-
onSearch: (
|
|
451
|
+
onSearch: (S) => {
|
|
452
452
|
l({
|
|
453
453
|
...s,
|
|
454
|
-
custom: (I) => n ?
|
|
454
|
+
custom: (I) => n ? S ? ze(I, S) : W(I) : S ? Ye(I, S) : q(I)
|
|
455
455
|
});
|
|
456
456
|
},
|
|
457
|
-
onSelected: (
|
|
457
|
+
onSelected: (S) => b(S)
|
|
458
458
|
}
|
|
459
459
|
)
|
|
460
460
|
}
|
|
@@ -472,7 +472,7 @@ const ee = ({
|
|
|
472
472
|
{
|
|
473
473
|
firstDay: f,
|
|
474
474
|
frequency: g,
|
|
475
|
-
onFirstDayChange:
|
|
475
|
+
onFirstDayChange: y,
|
|
476
476
|
onFrequencyChange: D,
|
|
477
477
|
onSecondDayChange: G,
|
|
478
478
|
secondDay: k,
|
|
@@ -486,8 +486,8 @@ const ee = ({
|
|
|
486
486
|
), Be = A(
|
|
487
487
|
({ zeroStateFor: n }) => {
|
|
488
488
|
const { recurring: t } = w(), { onEvent: r } = F(), a = n === "income", s = a ? t.recurring_setting_zero_state_income_title : t.recurring_setting_zero_state_expenses_title, l = a ? t.recurring_setting_zero_state_income_description : t.recurring_setting_zero_state_expenses_description, o = a ? t.add_income : t.add_expense;
|
|
489
|
-
return /* @__PURE__ */ c(
|
|
490
|
-
/* @__PURE__ */ e(
|
|
489
|
+
return /* @__PURE__ */ c(p, { sx: { alignItems: "center", p: 24, pt: 48 }, children: [
|
|
490
|
+
/* @__PURE__ */ e(pe, { size: 48 }),
|
|
491
491
|
/* @__PURE__ */ e(U, { sx: { my: 8, fontWeight: 600 }, variant: "body1", children: s }),
|
|
492
492
|
/* @__PURE__ */ e(U, { color: "text.secondary", sx: { mb: 32 }, variant: "subtitle2", children: l }),
|
|
493
493
|
/* @__PURE__ */ e(
|
|
@@ -515,15 +515,14 @@ const ee = ({
|
|
|
515
515
|
(i) => i.repeating_transaction_type === E.Income && (i.transactions.length > 0 || i.recurrence_type === d.EveryYear)
|
|
516
516
|
);
|
|
517
517
|
return /* @__PURE__ */ e(L, { children: o.length !== 0 ? /* @__PURE__ */ c(
|
|
518
|
-
|
|
518
|
+
p,
|
|
519
519
|
{
|
|
520
520
|
sx: {
|
|
521
|
-
|
|
522
|
-
|
|
521
|
+
justifyContent: "space-between",
|
|
522
|
+
height: n ? "calc(100% - 32px)" : "calc(100% - 57px)"
|
|
523
523
|
},
|
|
524
524
|
children: [
|
|
525
|
-
|
|
526
|
-
/* @__PURE__ */ e(P, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(j, { sx: { bgcolor: "background.paper" }, children: o.map((i, m) => /* @__PURE__ */ c(u.Fragment, { children: [
|
|
525
|
+
/* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(K, { sx: { bgcolor: "background.paper" }, children: o.map((i, m) => /* @__PURE__ */ c(u.Fragment, { children: [
|
|
527
526
|
/* @__PURE__ */ e(Ge, { onClick: s, repeatingTransaction: i }),
|
|
528
527
|
/* @__PURE__ */ e(
|
|
529
528
|
T,
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as e, Fragment as b, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { observer as u } from "mobx-react-lite";
|
|
4
|
+
import c from "@mui/material/Box";
|
|
5
|
+
import p from "@mui/material/Tab";
|
|
6
|
+
import R from "@mui/material/Tabs";
|
|
7
|
+
import l from "@mui/material/Divider";
|
|
8
|
+
import T from "@mui/material/List";
|
|
9
|
+
import C from "@mui/material/Stack";
|
|
10
|
+
import { R as x, A as S, a as E, M as A } from "./ManageIncome-BaZyK1CD.mjs";
|
|
11
|
+
import { u as h, i as y, f as _ } from "./hooks-BAAimqdq.mjs";
|
|
12
|
+
import { R as v, F as N } from "./RepeatingTransaction-BW4J-jeJ.mjs";
|
|
13
|
+
import { A as d } from "./WidgetContainer-ztkGgdIH.mjs";
|
|
14
|
+
const I = u(() => {
|
|
15
|
+
const { recurring: r } = h(), { repeatingTransactions: s } = y(), { onEvent: o } = _(), a = (n) => {
|
|
16
|
+
o(d.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
|
17
|
+
repeating_transaction_guid: n.guid
|
|
18
|
+
});
|
|
19
|
+
}, g = () => {
|
|
20
|
+
o(d.RECURRING_TRANSACTIONS_CLICK_ADD_EXPENSE);
|
|
21
|
+
}, i = s.filter(
|
|
22
|
+
(n) => n.repeating_transaction_type !== v.Income && (n.transactions.length > 0 || n.recurrence_type === N.EveryYear)
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ e(b, { children: i.length !== 0 ? /* @__PURE__ */ t(C, { sx: { justifyContent: "space-between", height: "calc(100% - 57px)" }, children: [
|
|
25
|
+
/* @__PURE__ */ e(T, { sx: { bgcolor: "background.paper" }, children: i.map((n, f) => /* @__PURE__ */ t(m.Fragment, { children: [
|
|
26
|
+
/* @__PURE__ */ e(x, { onClick: a, repeatingTransaction: n }),
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
l,
|
|
29
|
+
{
|
|
30
|
+
variant: f < i.length - 1 ? "inset" : "fullWidth"
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] }, n.guid)) }),
|
|
34
|
+
/* @__PURE__ */ t(c, { children: [
|
|
35
|
+
/* @__PURE__ */ e(l, {}),
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
c,
|
|
38
|
+
{
|
|
39
|
+
sx: {
|
|
40
|
+
alignContent: "center",
|
|
41
|
+
bgcolor: "background.paper",
|
|
42
|
+
justifyContent: "flex-end",
|
|
43
|
+
px: 24,
|
|
44
|
+
py: 12,
|
|
45
|
+
textAlign: "right"
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ e(S, { label: r.add_expense, onAddRecurringTransaction: g })
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] })
|
|
51
|
+
] }) : /* @__PURE__ */ e(E, { zeroStateFor: "expenses" }) });
|
|
52
|
+
}), X = u(() => {
|
|
53
|
+
const [r, s] = m.useState(0), { onEvent: o } = _(), { recurring: a } = h();
|
|
54
|
+
return /* @__PURE__ */ t(c, { bgcolor: "background.default", height: "100%", children: [
|
|
55
|
+
/* @__PURE__ */ t(
|
|
56
|
+
R,
|
|
57
|
+
{
|
|
58
|
+
onChange: (i, n) => {
|
|
59
|
+
s(n), o(
|
|
60
|
+
n === 0 ? "recurring_transactions_widget_manage_expenses" : "recurring_transactions_widget_edit_income"
|
|
61
|
+
);
|
|
62
|
+
},
|
|
63
|
+
sx: { bgcolor: "background.paper" },
|
|
64
|
+
value: r,
|
|
65
|
+
variant: "fullWidth",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ e(p, { label: a.expenses }),
|
|
68
|
+
/* @__PURE__ */ e(p, { label: a.income })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
r === 0 && /* @__PURE__ */ e(I, {}),
|
|
73
|
+
r === 1 && /* @__PURE__ */ e(A, {})
|
|
74
|
+
] });
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
I as M,
|
|
78
|
+
X as R
|
|
79
|
+
};
|
package/dist/budgets/index.es.js
CHANGED
|
@@ -4,9 +4,9 @@ import { observer as I } from "mobx-react-lite";
|
|
|
4
4
|
import { endOfMonth as de } from "date-fns/endOfMonth";
|
|
5
5
|
import { startOfMonth as J } from "date-fns/startOfMonth";
|
|
6
6
|
import W from "@mui/material/Box";
|
|
7
|
-
import
|
|
7
|
+
import _ from "@mui/material/Stack";
|
|
8
8
|
import Q from "@mui/material/styles/useTheme";
|
|
9
|
-
import { Icon as $, Text as
|
|
9
|
+
import { Icon as $, Text as g, CategoryIcon as H, H1 as Ge, H3 as Be } from "@mxenabled/mxui";
|
|
10
10
|
import { u as Pe } from "../BudgetUtil-n3gEKIub.mjs";
|
|
11
11
|
import { C as Ne } from "../ConnectionsDrawer-B-dZx6gH.mjs";
|
|
12
12
|
import * as E from "d3";
|
|
@@ -46,7 +46,7 @@ import { u as Qe, b as et } from "../CategorySelectorDrawer-993LpETZ.mjs";
|
|
|
46
46
|
import Te from "@mui/material/CardHeader";
|
|
47
47
|
import { subDays as tt } from "date-fns/subDays";
|
|
48
48
|
import nt from "@mui/material/IconButton";
|
|
49
|
-
import { M as ot } from "../ManageIncome-
|
|
49
|
+
import { M as ot } from "../ManageIncome-BaZyK1CD.mjs";
|
|
50
50
|
const ye = 5, at = 100, rt = 25, st = (t) => {
|
|
51
51
|
const o = (a) => {
|
|
52
52
|
a.active || t.alphaTarget(0.3).restart(), a.subject.fx = a.subject.x, a.subject.fy = a.subject.y;
|
|
@@ -115,11 +115,11 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
115
115
|
const {
|
|
116
116
|
budgetColors: { background: n, text: r },
|
|
117
117
|
category: { icon: c, name: y },
|
|
118
|
-
guid:
|
|
118
|
+
guid: p,
|
|
119
119
|
description: h,
|
|
120
120
|
radius: m,
|
|
121
121
|
x: C,
|
|
122
|
-
y:
|
|
122
|
+
y: b
|
|
123
123
|
} = t;
|
|
124
124
|
let u = -12, B = -12;
|
|
125
125
|
m > G ? (u = -14, B = -45) : m > le && (B = -32);
|
|
@@ -135,14 +135,14 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
135
135
|
"g",
|
|
136
136
|
{
|
|
137
137
|
className: "bubble",
|
|
138
|
-
id: `bubble-${
|
|
138
|
+
id: `bubble-${p}`,
|
|
139
139
|
onClick: () => i(t),
|
|
140
140
|
onMouseEnter: () => a(!0),
|
|
141
141
|
onMouseLeave: () => a(!1),
|
|
142
142
|
style: { cursor: o ? "pointer" : "default" },
|
|
143
143
|
textAnchor: "middle",
|
|
144
144
|
x: C,
|
|
145
|
-
y:
|
|
145
|
+
y: b,
|
|
146
146
|
children: [
|
|
147
147
|
/* @__PURE__ */ e(
|
|
148
148
|
je,
|
|
@@ -151,16 +151,16 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
151
151
|
open: s,
|
|
152
152
|
slotProps: { popper: A },
|
|
153
153
|
title: f,
|
|
154
|
-
children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${
|
|
154
|
+
children: /* @__PURE__ */ e("circle", { fill: n, id: `circle-${p}`, r: m })
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
157
|
/* @__PURE__ */ e("svg", { x: u, y: B, children: /* @__PURE__ */ e($, { name: c, size: m <= G ? 24 : 32, sx: { fill: r } }) }),
|
|
158
158
|
m > G && /* @__PURE__ */ e(
|
|
159
|
-
|
|
159
|
+
g,
|
|
160
160
|
{
|
|
161
161
|
bold: !0,
|
|
162
162
|
component: "text",
|
|
163
|
-
id: `budget-category-${
|
|
163
|
+
id: `budget-category-${p}`,
|
|
164
164
|
sx: { fill: r },
|
|
165
165
|
variant: "Small",
|
|
166
166
|
y: 4,
|
|
@@ -168,11 +168,11 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
170
|
m > le && /* @__PURE__ */ e(
|
|
171
|
-
|
|
171
|
+
g,
|
|
172
172
|
{
|
|
173
173
|
bold: !0,
|
|
174
174
|
component: "text",
|
|
175
|
-
id: `budget-description-${
|
|
175
|
+
id: `budget-description-${p}-1`,
|
|
176
176
|
sx: { fill: r },
|
|
177
177
|
variant: "Body",
|
|
178
178
|
y: m <= G ? 12 : 24,
|
|
@@ -180,10 +180,10 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
182
|
m <= G && m > le && /* @__PURE__ */ e(
|
|
183
|
-
|
|
183
|
+
g,
|
|
184
184
|
{
|
|
185
185
|
component: "text",
|
|
186
|
-
id: `budget-description-${
|
|
186
|
+
id: `budget-description-${p}-2`,
|
|
187
187
|
sx: { fill: r },
|
|
188
188
|
variant: "XSmall",
|
|
189
189
|
y: 28,
|
|
@@ -193,7 +193,7 @@ function pt({ bubble: t, isDraggable: o, onClick: i = () => {
|
|
|
193
193
|
/* @__PURE__ */ e(gt, { bubble: t })
|
|
194
194
|
]
|
|
195
195
|
},
|
|
196
|
-
|
|
196
|
+
p
|
|
197
197
|
);
|
|
198
198
|
}
|
|
199
199
|
let F;
|
|
@@ -213,10 +213,10 @@ const ht = ({
|
|
|
213
213
|
onConnectAccountsClick: o,
|
|
214
214
|
createBudgetOnClick: i
|
|
215
215
|
}) => {
|
|
216
|
-
const { recalculateBudgets: s } = w(), { spendCategories: a } = j(), { budgets: n } = D(), [r, c] = l.useState(!1), [y,
|
|
216
|
+
const { recalculateBudgets: s } = w(), { spendCategories: a } = j(), { budgets: n } = D(), [r, c] = l.useState(!1), [y, p] = l.useState(!1), [h, m] = l.useState(!1), C = l.useMemo(() => [...a.filter((u) => u.totalAverageAmount > 0)], [a]), b = async () => {
|
|
217
217
|
m(!0);
|
|
218
218
|
const { data: u, isSuccess: B } = await s(C);
|
|
219
|
-
m(!1), B ? (u.length === 0 && c(!0),
|
|
219
|
+
m(!1), B ? (u.length === 0 && c(!0), p(!1)) : p(!0);
|
|
220
220
|
};
|
|
221
221
|
return h ? /* @__PURE__ */ e(P, {}) : y ? /* @__PURE__ */ e(
|
|
222
222
|
ce,
|
|
@@ -225,7 +225,7 @@ const ht = ({
|
|
|
225
225
|
icon: "error",
|
|
226
226
|
iconColor: "#4D4D4D",
|
|
227
227
|
onClick: (u) => {
|
|
228
|
-
u === "primary" ?
|
|
228
|
+
u === "primary" ? b() : i();
|
|
229
229
|
},
|
|
230
230
|
primaryButton: n.autogenerate_budgets_error_primary_button,
|
|
231
231
|
secondaryButton: n.zero_state_generate_budgets_secondary_button,
|
|
@@ -267,7 +267,7 @@ const ht = ({
|
|
|
267
267
|
icon: "bubble_chart",
|
|
268
268
|
iconColor: "#1A1A1A",
|
|
269
269
|
onClick: (u) => {
|
|
270
|
-
u === "primary" ?
|
|
270
|
+
u === "primary" ? b() : i();
|
|
271
271
|
},
|
|
272
272
|
primaryButton: n.empty_state_primary_button,
|
|
273
273
|
secondaryButton: t ? void 0 : n.empty_state_secondary_button,
|
|
@@ -294,7 +294,7 @@ const ht = ({
|
|
|
294
294
|
shouldShowZeroState: a,
|
|
295
295
|
unavailableWidth: n = 24
|
|
296
296
|
}) => {
|
|
297
|
-
const { onEvent: r } = X(), { setSelectedBudget: c } = w(), { isLoadingCategoryTotals: y } = j(), { isInitialized:
|
|
297
|
+
const { onEvent: r } = X(), { setSelectedBudget: c } = w(), { isLoadingCategoryTotals: y } = j(), { isInitialized: p } = ee(), { accounts: h } = D(), { availableWidth: m } = ze(), { isMobile: C } = me(), [b, u] = l.useState(!1), B = l.useMemo(() => m - n, [m]), f = (x) => {
|
|
298
298
|
c(x), r(k.BUDGETS_CLICK_BUDGET_CATEGORY, {
|
|
299
299
|
budget_category: x.category.name,
|
|
300
300
|
click_type: "bubble"
|
|
@@ -302,8 +302,8 @@ const ht = ({
|
|
|
302
302
|
}, A = () => {
|
|
303
303
|
u(!0), r(k.ACCOUNTS_CLICK_CONNECT);
|
|
304
304
|
};
|
|
305
|
-
return y ? /* @__PURE__ */ e(
|
|
306
|
-
a || !
|
|
305
|
+
return y ? /* @__PURE__ */ e(_, { alignItems: "center", height: o, justifyContent: "center", width: Math.abs(B), children: /* @__PURE__ */ e(P, {}) }) : /* @__PURE__ */ d(W, { ml: a || C ? 0 : 24, sx: { alignSelf: "center" }, children: [
|
|
306
|
+
a || !p ? /* @__PURE__ */ e(
|
|
307
307
|
bt,
|
|
308
308
|
{
|
|
309
309
|
createBudgetOnClick: t,
|
|
@@ -323,7 +323,7 @@ const ht = ({
|
|
|
323
323
|
Ne,
|
|
324
324
|
{
|
|
325
325
|
onClose: () => u(!1),
|
|
326
|
-
showConnectionsWidget:
|
|
326
|
+
showConnectionsWidget: b,
|
|
327
327
|
title: h.manage_connections
|
|
328
328
|
}
|
|
329
329
|
)
|
|
@@ -331,20 +331,20 @@ const ht = ({
|
|
|
331
331
|
}
|
|
332
332
|
), yt = I(() => {
|
|
333
333
|
const { budgets: t } = D(), { totalBudgeted: o } = w(), { incomeTotal: i } = te(), s = i - o;
|
|
334
|
-
return /* @__PURE__ */ d(
|
|
335
|
-
/* @__PURE__ */ d(
|
|
336
|
-
/* @__PURE__ */ e(
|
|
337
|
-
/* @__PURE__ */ e(
|
|
334
|
+
return /* @__PURE__ */ d(_, { direction: "row", justifyContent: "center", my: 16, spacing: 20, children: [
|
|
335
|
+
/* @__PURE__ */ d(_, { alignItems: "center", children: [
|
|
336
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(i, "0,0") }),
|
|
337
|
+
/* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.projected_income })
|
|
338
338
|
] }),
|
|
339
|
-
/* @__PURE__ */ e(
|
|
340
|
-
/* @__PURE__ */ d(
|
|
341
|
-
/* @__PURE__ */ e(
|
|
342
|
-
/* @__PURE__ */ e(
|
|
339
|
+
/* @__PURE__ */ e(g, { bold: !0, justifyContent: "center", variant: "Body", children: "-" }),
|
|
340
|
+
/* @__PURE__ */ d(_, { alignItems: "center", children: [
|
|
341
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(o, "0,0") }),
|
|
342
|
+
/* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.budgeted })
|
|
343
343
|
] }),
|
|
344
|
-
/* @__PURE__ */ e(
|
|
345
|
-
/* @__PURE__ */ d(
|
|
346
|
-
/* @__PURE__ */ e(
|
|
347
|
-
/* @__PURE__ */ e(
|
|
344
|
+
/* @__PURE__ */ e(g, { bold: !0, justifyContent: "center", variant: "Body", children: "=" }),
|
|
345
|
+
/* @__PURE__ */ d(_, { alignItems: "center", children: [
|
|
346
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: T(s, "0,0") }),
|
|
347
|
+
/* @__PURE__ */ e(g, { color: "secondary", variant: "Small", children: t.remaining })
|
|
348
348
|
] })
|
|
349
349
|
] });
|
|
350
350
|
}), ft = I(
|
|
@@ -362,24 +362,24 @@ const ht = ({
|
|
|
362
362
|
] }, t.guid);
|
|
363
363
|
}
|
|
364
364
|
), Ct = ({ onRecalculateBudgets: t }) => {
|
|
365
|
-
const { budgets: o, common: i } = D(), { spendCategories: s } = j(), { recalculateBudgets: a, setAlert: n } = w(), [r, c] = l.useState(!1), y = s.filter((h) => h.totalAverageAmount > 0),
|
|
365
|
+
const { budgets: o, common: i } = D(), { spendCategories: s } = j(), { recalculateBudgets: a, setAlert: n } = w(), [r, c] = l.useState(!1), y = s.filter((h) => h.totalAverageAmount > 0), p = async () => {
|
|
366
366
|
await a(y), c(!1), n(o.alert_recalculated_budgets), t?.();
|
|
367
367
|
};
|
|
368
368
|
return /* @__PURE__ */ d(l.Fragment, { children: [
|
|
369
369
|
/* @__PURE__ */ e(Ae, { onClick: () => c(!0), sx: { mt: 24, mx: 24 }, variant: "text", children: o.recalculate_button }),
|
|
370
|
-
/* @__PURE__ */ e(
|
|
370
|
+
/* @__PURE__ */ e(g, { sx: { mx: 24, my: 16, textAlign: "center", whiteSpace: "wrap" }, variant: "Paragraph", children: o.recalculate_help }),
|
|
371
371
|
/* @__PURE__ */ e(
|
|
372
372
|
M,
|
|
373
373
|
{
|
|
374
374
|
ariaLabelClose: i.close_aria,
|
|
375
375
|
isOpen: r,
|
|
376
376
|
onClose: () => c(!1),
|
|
377
|
-
onPrimaryAction:
|
|
377
|
+
onPrimaryAction: p,
|
|
378
378
|
title: o.recalculate_title,
|
|
379
|
-
children: /* @__PURE__ */ d(
|
|
380
|
-
/* @__PURE__ */ d(
|
|
381
|
-
/* @__PURE__ */ e(
|
|
382
|
-
/* @__PURE__ */ e(
|
|
379
|
+
children: /* @__PURE__ */ d(_, { children: [
|
|
380
|
+
/* @__PURE__ */ d(_, { mx: 24, my: 16, children: [
|
|
381
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: o.recalculate_description_top }),
|
|
382
|
+
/* @__PURE__ */ e(g, { variant: "ParagraphSmall", children: o.recalculate_description_bottom })
|
|
383
383
|
] }),
|
|
384
384
|
/* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: y.map((h) => /* @__PURE__ */ e(ft, { category: h }, h.guid)) }) })
|
|
385
385
|
] })
|
|
@@ -392,13 +392,13 @@ const ht = ({
|
|
|
392
392
|
onAmountChanged: i
|
|
393
393
|
}) => {
|
|
394
394
|
const { budgets: s } = D(), { totalBudgeted: a } = w(), { incomeTotal: n } = te(), r = n - a;
|
|
395
|
-
return /* @__PURE__ */ d(
|
|
396
|
-
/* @__PURE__ */ d(
|
|
397
|
-
/* @__PURE__ */ e(
|
|
395
|
+
return /* @__PURE__ */ d(_, { gap: 16, children: [
|
|
396
|
+
/* @__PURE__ */ d(_, { children: [
|
|
397
|
+
/* @__PURE__ */ e(g, { children: L(
|
|
398
398
|
s.add_description_top,
|
|
399
399
|
T(r, "0,0")
|
|
400
400
|
) }),
|
|
401
|
-
/* @__PURE__ */ e(
|
|
401
|
+
/* @__PURE__ */ e(g, { children: L(s.add_description_bottom, o) })
|
|
402
402
|
] }),
|
|
403
403
|
/* @__PURE__ */ e(
|
|
404
404
|
He,
|
|
@@ -445,7 +445,7 @@ const ht = ({
|
|
|
445
445
|
const { budgets: o } = D(), { addBudget: i, setAlert: s, unbudgetedCategories: a } = w(), n = async (r, c) => {
|
|
446
446
|
await i(r, c), s(L(o.alert_budget_created, r.name));
|
|
447
447
|
};
|
|
448
|
-
return /* @__PURE__ */ d(
|
|
448
|
+
return /* @__PURE__ */ d(_, { children: [
|
|
449
449
|
/* @__PURE__ */ e(yt, {}),
|
|
450
450
|
/* @__PURE__ */ e(W, { bgcolor: "background.paper", children: /* @__PURE__ */ e(K, { children: a.map((r) => /* @__PURE__ */ e(
|
|
451
451
|
Bt,
|
|
@@ -458,7 +458,7 @@ const ht = ({
|
|
|
458
458
|
/* @__PURE__ */ e(Ct, { onRecalculateBudgets: t })
|
|
459
459
|
] });
|
|
460
460
|
}), St = (t) => {
|
|
461
|
-
const o = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = w(), { budgets: c, common: y } = D(), { isCopyLoaded:
|
|
461
|
+
const o = Q(), { onEvent: i } = X(), { detailedBudgets: s, isDataLoaded: a, loadBudgetData: n, setTheme: r } = w(), { budgets: c, common: y } = D(), { isCopyLoaded: p, isInitialized: h, selectedAccounts: m } = ee(), { reloadCategoryTotals: C } = j(), b = Pe(), u = s.length === 0, [B, f] = l.useState(!1), A = () => {
|
|
462
462
|
f(!0), i(k.BUDGETS_CLICK_ADD);
|
|
463
463
|
}, x = () => {
|
|
464
464
|
f(!1);
|
|
@@ -471,14 +471,14 @@ const ht = ({
|
|
|
471
471
|
n().finally();
|
|
472
472
|
}
|
|
473
473
|
);
|
|
474
|
-
}, [h, m]),
|
|
474
|
+
}, [h, m]), p ? /* @__PURE__ */ d(
|
|
475
475
|
Xe,
|
|
476
476
|
{
|
|
477
477
|
primaryCtaLabel: u ? c.get_started_cta : c.details_cta,
|
|
478
478
|
title: c.budgets_title,
|
|
479
479
|
...t,
|
|
480
480
|
children: [
|
|
481
|
-
a ? /* @__PURE__ */ d(
|
|
481
|
+
a ? /* @__PURE__ */ d(_, { height: 450, mt: 32, children: [
|
|
482
482
|
/* @__PURE__ */ e(
|
|
483
483
|
we,
|
|
484
484
|
{
|
|
@@ -489,8 +489,8 @@ const ht = ({
|
|
|
489
489
|
}
|
|
490
490
|
),
|
|
491
491
|
!u && /* @__PURE__ */ d(W, { ml: 16, children: [
|
|
492
|
-
/* @__PURE__ */ e(
|
|
493
|
-
/* @__PURE__ */ e(
|
|
492
|
+
/* @__PURE__ */ e(g, { bold: !0, color: b < 0 ? "error.main" : "success.main", children: T(Math.abs(b), "0,0") }),
|
|
493
|
+
/* @__PURE__ */ e(g, { children: b < 0 ? c.overspent_in_budgets : c.left_in_budgets })
|
|
494
494
|
] })
|
|
495
495
|
] }) : /* @__PURE__ */ e(P, {}),
|
|
496
496
|
/* @__PURE__ */ e(
|
|
@@ -520,18 +520,18 @@ const ht = ({
|
|
|
520
520
|
percentage: `${n}%`
|
|
521
521
|
}
|
|
522
522
|
];
|
|
523
|
-
return /* @__PURE__ */ e(ge, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ d(
|
|
523
|
+
return /* @__PURE__ */ e(ge, { sx: { mt: 24, mx: 24 }, children: /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ d(_, { alignItems: "center", gap: 16, children: [
|
|
524
524
|
/* @__PURE__ */ e(H, { categoryGuid: a, size: 56 }),
|
|
525
525
|
/* @__PURE__ */ e(Ge, { children: `${T(r, "0,0")} / ${T(o, "0,0")}` }),
|
|
526
|
-
/* @__PURE__ */ e(
|
|
526
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "XSmall", children: s }),
|
|
527
527
|
/* @__PURE__ */ e(ue, { data: c, height: 10 })
|
|
528
528
|
] }) }) });
|
|
529
529
|
}, At = I(() => {
|
|
530
530
|
const { budgets: t } = D();
|
|
531
|
-
return /* @__PURE__ */ d(
|
|
531
|
+
return /* @__PURE__ */ d(_, { alignItems: "center", gap: 12, height: "auto", mb: 24, mt: 24, children: [
|
|
532
532
|
/* @__PURE__ */ e($, { color: "secondary", name: "bubble_chart", sx: { fontSize: 32 } }),
|
|
533
|
-
/* @__PURE__ */ e(
|
|
534
|
-
/* @__PURE__ */ e(
|
|
533
|
+
/* @__PURE__ */ e(g, { bold: !0, color: "secondary", variant: "Small", children: t.zero_state_no_sub_budgets }),
|
|
534
|
+
/* @__PURE__ */ e(g, { color: "text.secondary", variant: "XSmall", children: t.zero_state_no_sub_budgets_description })
|
|
535
535
|
] });
|
|
536
536
|
}), xt = I(({ budget: t }) => {
|
|
537
537
|
const {
|
|
@@ -546,8 +546,8 @@ const ht = ({
|
|
|
546
546
|
/* @__PURE__ */ e(
|
|
547
547
|
Z,
|
|
548
548
|
{
|
|
549
|
-
primary: /* @__PURE__ */ e(
|
|
550
|
-
secondary: /* @__PURE__ */ e(
|
|
549
|
+
primary: /* @__PURE__ */ e(_, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: t.category.name }) }),
|
|
550
|
+
secondary: /* @__PURE__ */ e(_, { component: "span", direction: "row", justifyContent: "space-between", children: /* @__PURE__ */ e(g, { fontWeight: 400, variant: "Body", children: `
|
|
551
551
|
${T(n, "0,0")} /
|
|
552
552
|
${T(o, "0,0")}
|
|
553
553
|
` }) })
|
|
@@ -555,7 +555,7 @@ const ht = ({
|
|
|
555
555
|
)
|
|
556
556
|
] }) });
|
|
557
557
|
}), vt = I(({ category: t, parentBudget: o }) => {
|
|
558
|
-
const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: n } = Qe(), { addBudget: r } = w(), [c, y] = l.useState(!1), [
|
|
558
|
+
const { budgets: i, common: s } = D(), { setExpandedGuid: a, setOnSelect: n } = Qe(), { addBudget: r } = w(), [c, y] = l.useState(!1), [p, h] = l.useState(!1), [m, C] = l.useState(""), [b, u] = l.useState(void 0);
|
|
559
559
|
l.useEffect(() => {
|
|
560
560
|
n((A) => {
|
|
561
561
|
const x = t.subCategories.find((v) => v.guid === A);
|
|
@@ -565,13 +565,13 @@ const ht = ({
|
|
|
565
565
|
const B = () => {
|
|
566
566
|
a(t.guid), y(!0);
|
|
567
567
|
}, f = async () => {
|
|
568
|
-
|
|
568
|
+
b && Number(m) > 0 && (await r(b, Number(m), o.guid), h(!1), y(!1), u(void 0));
|
|
569
569
|
};
|
|
570
570
|
return /* @__PURE__ */ d(W, { children: [
|
|
571
|
-
/* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: B, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ d(
|
|
572
|
-
/* @__PURE__ */ d(
|
|
571
|
+
/* @__PURE__ */ e(V, { disableGutters: !0, disablePadding: !0, sx: { bgcolor: "background.paper" }, children: /* @__PURE__ */ e(Y, { onClick: B, children: /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ d(_, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
|
|
572
|
+
/* @__PURE__ */ d(_, { alignItems: "center", direction: "row", gap: 8, children: [
|
|
573
573
|
/* @__PURE__ */ e($, { fill: !0, name: "add_box", size: 24, sx: { color: "primary.light" } }),
|
|
574
|
-
/* @__PURE__ */ e(
|
|
574
|
+
/* @__PURE__ */ e(g, { bold: !0, sx: { color: "primary.light" }, variant: "Body", children: i.add_sub_budget_button })
|
|
575
575
|
] }),
|
|
576
576
|
/* @__PURE__ */ e($, { name: "chevron_right", size: 24, sx: { color: "primary.light" } })
|
|
577
577
|
] }) }) }) }),
|
|
@@ -591,7 +591,7 @@ const ht = ({
|
|
|
591
591
|
{
|
|
592
592
|
copy: { close_aria: s.close_aria, title: i.add_title },
|
|
593
593
|
disablePrimaryButton: Number(m) <= 0,
|
|
594
|
-
isOpen:
|
|
594
|
+
isOpen: p,
|
|
595
595
|
onClose: () => h(!1),
|
|
596
596
|
onPrimaryAction: f,
|
|
597
597
|
primaryText: i.add_save_button,
|
|
@@ -599,7 +599,7 @@ const ht = ({
|
|
|
599
599
|
re,
|
|
600
600
|
{
|
|
601
601
|
amount: m,
|
|
602
|
-
categoryName:
|
|
602
|
+
categoryName: b?.name || "",
|
|
603
603
|
onAmountChanged: C
|
|
604
604
|
}
|
|
605
605
|
)
|
|
@@ -607,10 +607,10 @@ const ht = ({
|
|
|
607
607
|
)
|
|
608
608
|
] });
|
|
609
609
|
}), Tt = I(({ budget: t }) => {
|
|
610
|
-
const { category: o, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: y } = w(), { filter:
|
|
610
|
+
const { category: o, subBudgets: i } = t, { budgets: s, common: a } = D(), { deleteBudget: n, selectedSubBudget: r, setSelectedSubBudget: c, updateBudget: y } = w(), { filter: p, setFilter: h } = ne(), [m, C] = l.useState(!1), [b, u] = l.useState(!1), [B, f] = l.useState("");
|
|
611
611
|
l.useEffect(() => {
|
|
612
612
|
r && (f(`${r.amount}`), h({
|
|
613
|
-
...
|
|
613
|
+
...p,
|
|
614
614
|
custom: (S) => S.category_guid === r.category_guid
|
|
615
615
|
}));
|
|
616
616
|
}, [r]);
|
|
@@ -623,7 +623,7 @@ const ht = ({
|
|
|
623
623
|
r && await n(r.guid), u(!1), v();
|
|
624
624
|
}, v = () => {
|
|
625
625
|
h({
|
|
626
|
-
...
|
|
626
|
+
...p,
|
|
627
627
|
custom: (S) => S.category_guid === t.category_guid || S.top_level_category_guid === t.category_guid
|
|
628
628
|
}), c(void 0);
|
|
629
629
|
};
|
|
@@ -646,7 +646,7 @@ const ht = ({
|
|
|
646
646
|
primaryText: s.details_edit_button,
|
|
647
647
|
secondaryText: s.details_delete_button,
|
|
648
648
|
title: s.details_title,
|
|
649
|
-
children: r && /* @__PURE__ */ d(
|
|
649
|
+
children: r && /* @__PURE__ */ d(_, { gap: 24, children: [
|
|
650
650
|
/* @__PURE__ */ e(Ie, { budget: r }),
|
|
651
651
|
/* @__PURE__ */ e(xe, { height: "100%" })
|
|
652
652
|
] })
|
|
@@ -676,33 +676,33 @@ const ht = ({
|
|
|
676
676
|
N,
|
|
677
677
|
{
|
|
678
678
|
copy: { close_aria: a.close_aria, title: s.delete_title },
|
|
679
|
-
isOpen:
|
|
679
|
+
isOpen: b,
|
|
680
680
|
onClose: () => u(!1),
|
|
681
681
|
onPrimaryAction: x,
|
|
682
682
|
primaryColor: "error",
|
|
683
683
|
primaryText: "Delete",
|
|
684
684
|
secondaryColor: "secondary",
|
|
685
|
-
children: /* @__PURE__ */ e(
|
|
685
|
+
children: /* @__PURE__ */ e(g, { variant: "Paragraph", children: L(s.delete_description, r.category.name) })
|
|
686
686
|
}
|
|
687
687
|
)
|
|
688
688
|
] })
|
|
689
689
|
] });
|
|
690
690
|
}), wt = I(({ budget: t }) => {
|
|
691
691
|
const { is_mobile_webview: o } = Ue(), { setAlert: i } = w(), { budgets: s, common: a, transactions: n } = D(), { isDesktop: r, isSmallTablet: c, isTablet: y } = me(), {
|
|
692
|
-
sortedTransactions:
|
|
692
|
+
sortedTransactions: p,
|
|
693
693
|
sortedTransactionsWithSplits: h,
|
|
694
694
|
tags: m
|
|
695
|
-
} = ne(), [C,
|
|
696
|
-
() =>
|
|
697
|
-
[u,
|
|
695
|
+
} = ne(), [C, b] = l.useState(0), [u, B] = l.useState(""), f = l.useMemo(
|
|
696
|
+
() => p.find((S) => S.guid === u),
|
|
697
|
+
[u, p]
|
|
698
698
|
), A = (S, O) => {
|
|
699
|
-
|
|
699
|
+
b(O);
|
|
700
700
|
}, x = () => {
|
|
701
701
|
qe(h, m), i(s.alert_csv_downloaded);
|
|
702
|
-
}, v =
|
|
703
|
-
return /* @__PURE__ */ d(
|
|
702
|
+
}, v = p.length > 0 && !o && (r || y && !c);
|
|
703
|
+
return /* @__PURE__ */ d(_, { gap: 24, children: [
|
|
704
704
|
/* @__PURE__ */ e(Ie, { budget: t }),
|
|
705
|
-
/* @__PURE__ */ d(
|
|
705
|
+
/* @__PURE__ */ d(_, { children: [
|
|
706
706
|
/* @__PURE__ */ d(
|
|
707
707
|
Ze,
|
|
708
708
|
{
|
|
@@ -717,8 +717,8 @@ const ht = ({
|
|
|
717
717
|
]
|
|
718
718
|
}
|
|
719
719
|
),
|
|
720
|
-
C === 0 && /* @__PURE__ */ d(
|
|
721
|
-
v && /* @__PURE__ */ e(
|
|
720
|
+
C === 0 && /* @__PURE__ */ d(_, { children: [
|
|
721
|
+
v && /* @__PURE__ */ e(_, { direction: "row", justifyContent: "right", mb: -24, mr: 8, mt: 8, zIndex: 1, children: /* @__PURE__ */ e(
|
|
722
722
|
Ae,
|
|
723
723
|
{
|
|
724
724
|
onClick: x,
|
|
@@ -750,8 +750,8 @@ const ht = ({
|
|
|
750
750
|
selectedSubBudget: r,
|
|
751
751
|
setAlert: c,
|
|
752
752
|
setSelectedBudget: y,
|
|
753
|
-
updateBudget:
|
|
754
|
-
} = w(), { setFilter: h } = ne(), [m, C] = l.useState(!1), [
|
|
753
|
+
updateBudget: p
|
|
754
|
+
} = w(), { setFilter: h } = ne(), [m, C] = l.useState(!1), [b, u] = l.useState(!1), [B, f] = l.useState(!1), [A, x] = l.useState("");
|
|
755
755
|
l.useEffect(() => {
|
|
756
756
|
n && !r && (x(`${n.amount}`), C(!0), h({
|
|
757
757
|
accounts: t,
|
|
@@ -761,7 +761,7 @@ const ht = ({
|
|
|
761
761
|
}));
|
|
762
762
|
}, [n]);
|
|
763
763
|
const v = async () => {
|
|
764
|
-
n && (await
|
|
764
|
+
n && (await p({
|
|
765
765
|
...n,
|
|
766
766
|
amount: Number(A),
|
|
767
767
|
percentage: n.category.totalAmount / Number(A) * 100
|
|
@@ -795,7 +795,7 @@ const ht = ({
|
|
|
795
795
|
{
|
|
796
796
|
copy: { close_aria: i.close_aria, title: o.details_edit_title },
|
|
797
797
|
disablePrimaryButton: Number(A) <= 0,
|
|
798
|
-
isOpen:
|
|
798
|
+
isOpen: b,
|
|
799
799
|
onClose: () => u(!1),
|
|
800
800
|
onPrimaryAction: v,
|
|
801
801
|
primaryText: o.edit_save_button,
|
|
@@ -819,7 +819,7 @@ const ht = ({
|
|
|
819
819
|
primaryColor: "error",
|
|
820
820
|
primaryText: o.details_delete_button,
|
|
821
821
|
secondaryColor: "secondary",
|
|
822
|
-
children: /* @__PURE__ */ e(
|
|
822
|
+
children: /* @__PURE__ */ e(g, { variant: "Paragraph", children: L(o.delete_description, n.category.name) })
|
|
823
823
|
}
|
|
824
824
|
)
|
|
825
825
|
] });
|
|
@@ -831,23 +831,23 @@ const ht = ({
|
|
|
831
831
|
description: r,
|
|
832
832
|
percentage: c,
|
|
833
833
|
subBudgets: y,
|
|
834
|
-
transaction_total:
|
|
834
|
+
transaction_total: p
|
|
835
835
|
} = t;
|
|
836
836
|
return /* @__PURE__ */ e(V, { children: /* @__PURE__ */ d(Y, { onClick: () => o?.(t), children: [
|
|
837
837
|
/* @__PURE__ */ e(ae, { sx: { mb: -8, mr: 16 }, children: /* @__PURE__ */ e(ve, { color: s, percent: c, size: 40, children: /* @__PURE__ */ e(H, { categoryGuid: n, variant: "basic" }) }) }),
|
|
838
838
|
/* @__PURE__ */ e(
|
|
839
839
|
Z,
|
|
840
840
|
{
|
|
841
|
-
primary: /* @__PURE__ */ d(
|
|
842
|
-
/* @__PURE__ */ e(
|
|
843
|
-
/* @__PURE__ */ e(
|
|
844
|
-
${T(
|
|
841
|
+
primary: /* @__PURE__ */ d(_, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
842
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: t.category.name }),
|
|
843
|
+
/* @__PURE__ */ e(g, { fontWeight: 400, variant: "Body", children: `
|
|
844
|
+
${T(p, "0,0")} /
|
|
845
845
|
${T(i, "0,0")}
|
|
846
846
|
` })
|
|
847
847
|
] }),
|
|
848
|
-
secondary: /* @__PURE__ */ d(
|
|
849
|
-
/* @__PURE__ */ e(
|
|
850
|
-
/* @__PURE__ */ e(
|
|
848
|
+
secondary: /* @__PURE__ */ d(_, { component: "span", direction: "row", justifyContent: "space-between", children: [
|
|
849
|
+
/* @__PURE__ */ e(g, { variant: "XSmall", children: `${y.length} Sub-budgets` }),
|
|
850
|
+
/* @__PURE__ */ e(g, { bold: c > 100, color: a, variant: "XSmall", children: r })
|
|
851
851
|
] })
|
|
852
852
|
}
|
|
853
853
|
)
|
|
@@ -867,9 +867,9 @@ const ht = ({
|
|
|
867
867
|
] }, n.guid)) }) })
|
|
868
868
|
] });
|
|
869
869
|
}), Ot = I(() => {
|
|
870
|
-
const t = Q(), { onEvent: o } = X(), { visibleAccounts: i } = Se(), { budgets: s, common: a, recurring: n } = D(), { incomeCategories: r, spendCategories: c } = j(), { detailedBudgets: y, totalBudgeted:
|
|
870
|
+
const t = Q(), { onEvent: o } = X(), { visibleAccounts: i } = Se(), { budgets: s, common: a, recurring: n } = D(), { incomeCategories: r, spendCategories: c } = j(), { detailedBudgets: y, totalBudgeted: p } = w(), { incomeTotal: h } = te(), { setFilter: m } = ne(), [C, b] = l.useState(!1), [u, B] = l.useMemo(() => {
|
|
871
871
|
const v = c.reduce((z, se) => z + se.totalAmount, 0);
|
|
872
|
-
let S = v /
|
|
872
|
+
let S = v / p;
|
|
873
873
|
S > 1 && (S = 1);
|
|
874
874
|
let O = t.palette.success.main;
|
|
875
875
|
S > 0.8 && S < 1 ? O = t.palette.warning.main : S >= 1 && (O = t.palette.error.main);
|
|
@@ -900,23 +900,23 @@ const ht = ({
|
|
|
900
900
|
start: tt(/* @__PURE__ */ new Date(), 90),
|
|
901
901
|
end: /* @__PURE__ */ new Date()
|
|
902
902
|
}
|
|
903
|
-
}),
|
|
903
|
+
}), b(!0), o(k.BUDGETS_CLICK_EDIT_INCOME);
|
|
904
904
|
};
|
|
905
905
|
return /* @__PURE__ */ d(ge, { elevation: 2, sx: { overflow: "visible" }, children: [
|
|
906
906
|
/* @__PURE__ */ e(Te, { sx: { pb: 8, pl: 24 }, title: /* @__PURE__ */ e(Be, { children: s.overview_title }) }),
|
|
907
|
-
/* @__PURE__ */ e(pe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(
|
|
908
|
-
/* @__PURE__ */ d(
|
|
909
|
-
/* @__PURE__ */ e(
|
|
907
|
+
/* @__PURE__ */ e(pe, { sx: { pt: 12, px: 24 }, children: /* @__PURE__ */ d(_, { gap: 24, children: [
|
|
908
|
+
/* @__PURE__ */ d(_, { gap: 8, children: [
|
|
909
|
+
/* @__PURE__ */ e(g, { bold: !0, sx: { mb: 8 }, variant: "Body", children: s.spending_title }),
|
|
910
910
|
/* @__PURE__ */ e(ue, { data: B, height: 16 }),
|
|
911
|
-
/* @__PURE__ */ e(
|
|
911
|
+
/* @__PURE__ */ e(g, { variant: "Small", children: L(
|
|
912
912
|
s.spending_description,
|
|
913
913
|
T(u, "0,0"),
|
|
914
|
-
T(
|
|
914
|
+
T(p, "0,0")
|
|
915
915
|
) })
|
|
916
916
|
] }),
|
|
917
|
-
/* @__PURE__ */ d(
|
|
918
|
-
/* @__PURE__ */ d(
|
|
919
|
-
/* @__PURE__ */ e(
|
|
917
|
+
/* @__PURE__ */ d(_, { gap: 8, children: [
|
|
918
|
+
/* @__PURE__ */ d(_, { alignItems: "center", direction: "row", gap: 4, mb: -4, children: [
|
|
919
|
+
/* @__PURE__ */ e(g, { bold: !0, variant: "Body", children: s.income_title }),
|
|
920
920
|
/* @__PURE__ */ e(
|
|
921
921
|
nt,
|
|
922
922
|
{
|
|
@@ -928,7 +928,7 @@ const ht = ({
|
|
|
928
928
|
)
|
|
929
929
|
] }),
|
|
930
930
|
/* @__PURE__ */ e(ue, { data: A, height: 16 }),
|
|
931
|
-
/* @__PURE__ */ e(
|
|
931
|
+
/* @__PURE__ */ e(g, { variant: "Small", children: L(
|
|
932
932
|
s.income_description,
|
|
933
933
|
T(f, "0,0"),
|
|
934
934
|
T(h, "0,0")
|
|
@@ -940,16 +940,19 @@ const ht = ({
|
|
|
940
940
|
{
|
|
941
941
|
ariaLabelClose: a.close_aria,
|
|
942
942
|
isOpen: C,
|
|
943
|
-
onClose: () =>
|
|
943
|
+
onClose: () => b(!1),
|
|
944
944
|
title: n.manage_income,
|
|
945
|
-
children: /* @__PURE__ */
|
|
945
|
+
children: /* @__PURE__ */ d(_, { sx: { height: "100%" }, children: [
|
|
946
|
+
/* @__PURE__ */ e(g, { bold: !0, sx: { mb: 4, mt: 12, mx: 24 }, variant: "Small", children: s.income_title }),
|
|
947
|
+
/* @__PURE__ */ e(ot, { forOverview: !0 })
|
|
948
|
+
] })
|
|
946
949
|
}
|
|
947
950
|
)
|
|
948
951
|
] });
|
|
949
952
|
}), Ce = 480, Dn = I(({ onBackClick: t, sx: o }) => {
|
|
950
|
-
const i = Q(), { onEvent: s } = X(), { visibleAccounts: a } = Se(), { budgets: n, common: r } = D(), { isCopyLoaded: c, isInitialized: y, selectedAccounts:
|
|
953
|
+
const i = Q(), { onEvent: s } = X(), { visibleAccounts: a } = Se(), { budgets: n, common: r } = D(), { isCopyLoaded: c, isInitialized: y, selectedAccounts: p, setDisplayedDate: h, setSelectedAccounts: m } = ee(), {
|
|
951
954
|
alert: C,
|
|
952
|
-
dateRange:
|
|
955
|
+
dateRange: b,
|
|
953
956
|
isDataLoaded: u,
|
|
954
957
|
loadBudgetData: B,
|
|
955
958
|
setDateRange: f,
|
|
@@ -962,8 +965,8 @@ const ht = ({
|
|
|
962
965
|
}), []), l.useEffect(() => {
|
|
963
966
|
m(a);
|
|
964
967
|
}, [a]), l.useEffect(() => {
|
|
965
|
-
y && (h(
|
|
966
|
-
}, [y,
|
|
968
|
+
y && (h(b.start, b.end), R(p, b.start, b.end).finally(), O(b), u || (S().finally(), B().finally()));
|
|
969
|
+
}, [y, p, b]);
|
|
967
970
|
const Le = (_e) => {
|
|
968
971
|
f({ start: _e[0] || /* @__PURE__ */ new Date(), end: _e[1] || /* @__PURE__ */ new Date() });
|
|
969
972
|
}, Re = () => {
|
|
@@ -972,7 +975,7 @@ const ht = ({
|
|
|
972
975
|
ie(!0), s(k.BUDGETS_CLICK_ADD);
|
|
973
976
|
}, ke = () => {
|
|
974
977
|
ie(!1);
|
|
975
|
-
}, Me = Ke(
|
|
978
|
+
}, Me = Ke(b.end, J(/* @__PURE__ */ new Date()));
|
|
976
979
|
return !c || !y || !u ? /* @__PURE__ */ e(P, {}) : /* @__PURE__ */ d(
|
|
977
980
|
Fe,
|
|
978
981
|
{
|
|
@@ -996,14 +999,14 @@ const ht = ({
|
|
|
996
999
|
children: [
|
|
997
1000
|
(!y || !u) && /* @__PURE__ */ e(P, {}),
|
|
998
1001
|
y && u && /* @__PURE__ */ d(
|
|
999
|
-
|
|
1002
|
+
_,
|
|
1000
1003
|
{
|
|
1001
1004
|
direction: U ? "column" : "row",
|
|
1002
1005
|
height: "100%",
|
|
1003
1006
|
sx: { justifyContent: "center" },
|
|
1004
1007
|
width: "100%",
|
|
1005
1008
|
children: [
|
|
1006
|
-
/* @__PURE__ */ e(
|
|
1009
|
+
/* @__PURE__ */ e(_, { height: U ? 450 : "calc(100dvh - 150px)", children: /* @__PURE__ */ e(
|
|
1007
1010
|
we,
|
|
1008
1011
|
{
|
|
1009
1012
|
createBudgetOnClick: he,
|
|
@@ -1014,7 +1017,7 @@ const ht = ({
|
|
|
1014
1017
|
}
|
|
1015
1018
|
) }),
|
|
1016
1019
|
v.length !== 0 && /* @__PURE__ */ d(
|
|
1017
|
-
|
|
1020
|
+
_,
|
|
1018
1021
|
{
|
|
1019
1022
|
gap: 24,
|
|
1020
1023
|
height: "100%",
|
|
@@ -17,7 +17,7 @@ import { I as he } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
|
17
17
|
import { C as Wn } from "../CashflowStore-D9Dpuz7X.mjs";
|
|
18
18
|
import { b as X } from "../Localization-2MODESHW.mjs";
|
|
19
19
|
import { M as Qe } from "../MiniWidgetContainer-BhHaL8eb.mjs";
|
|
20
|
-
import { R as Ve } from "../RecurringSettings-
|
|
20
|
+
import { R as Ve } from "../RecurringSettings-DHPyexin.mjs";
|
|
21
21
|
import Ke from "@mui/material/Tabs";
|
|
22
22
|
import Ce from "@mui/material/Tab";
|
|
23
23
|
import { getUnixTime as U } from "date-fns/getUnixTime";
|
|
@@ -34,7 +34,7 @@ import { addDays as _e } from "date-fns/addDays";
|
|
|
34
34
|
import { alpha as et, keyframes as tt } from "@mui/material/styles";
|
|
35
35
|
import { DataGridPro as nt } from "@mui/x-data-grid-pro";
|
|
36
36
|
import { T as we } from "../TabContentContainer-j01JYR_7.mjs";
|
|
37
|
-
import { M as ot, S as it, i as at, d as Se, c as rt } from "../ManageIncome-
|
|
37
|
+
import { M as ot, S as it, i as at, d as Se, c as rt } from "../ManageIncome-BaZyK1CD.mjs";
|
|
38
38
|
import { D as $e } from "../Drawer-kEE73B87.mjs";
|
|
39
39
|
import { formatISO as st } from "date-fns/formatISO";
|
|
40
40
|
import { fromUnixTime as ye } from "date-fns/fromUnixTime";
|
|
@@ -14,6 +14,8 @@ export interface CommonCopy {
|
|
|
14
14
|
date_range_picker: DateRangePickerCopy;
|
|
15
15
|
delete_button: string;
|
|
16
16
|
done_button: string;
|
|
17
|
+
error_heading: string;
|
|
18
|
+
error_message: string;
|
|
17
19
|
filter_button: string;
|
|
18
20
|
good_afternoon: string;
|
|
19
21
|
good_evening: string;
|
|
@@ -44,6 +46,7 @@ export interface CommonCopy {
|
|
|
44
46
|
transactions: string;
|
|
45
47
|
trends: string;
|
|
46
48
|
};
|
|
49
|
+
refresh_button: string;
|
|
47
50
|
save_button: string;
|
|
48
51
|
search: string;
|
|
49
52
|
search_aria: string;
|
|
@@ -30,7 +30,7 @@ import Ue from "@mui/material/AccordionSummary";
|
|
|
30
30
|
import Ve from "@mui/material/CardHeader";
|
|
31
31
|
import { u as Ye } from "../useDimensions-27p2evRx.mjs";
|
|
32
32
|
import { C as qe } from "../ConnectionsDrawer-B-dZx6gH.mjs";
|
|
33
|
-
import { R as Je } from "../RecurringSettings-
|
|
33
|
+
import { R as Je } from "../RecurringSettings-DHPyexin.mjs";
|
|
34
34
|
import Qe from "@mui/material/TextField";
|
|
35
35
|
import { u as Ce } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
36
36
|
import { a as Ze } from "../Dialog-CWW597AF.mjs";
|
|
@@ -8,8 +8,8 @@ import { startOfToday as de } from "date-fns/startOfToday";
|
|
|
8
8
|
import { subDays as ue } from "date-fns/subDays";
|
|
9
9
|
import oe from "@mui/material/Skeleton";
|
|
10
10
|
import c from "@mui/material/Stack";
|
|
11
|
-
import { R as ze } from "../RecurringSettings-
|
|
12
|
-
import { M as An } from "../RecurringSettings-
|
|
11
|
+
import { R as ze } from "../RecurringSettings-DHPyexin.mjs";
|
|
12
|
+
import { M as An } from "../RecurringSettings-DHPyexin.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";
|
|
@@ -41,8 +41,8 @@ import ct from "@mui/material/ListSubheader";
|
|
|
41
41
|
import lt from "@mui/material/ListItemAvatar";
|
|
42
42
|
import dt from "@mui/material/ListItemButton";
|
|
43
43
|
import ut from "@mui/material/ListItemText";
|
|
44
|
-
import { b as mt } from "../ManageIncome-
|
|
45
|
-
import { c as On, M as kn, S as Wn } from "../ManageIncome-
|
|
44
|
+
import { b as mt } from "../ManageIncome-BaZyK1CD.mjs";
|
|
45
|
+
import { c as On, M as kn, S as Wn } from "../ManageIncome-BaZyK1CD.mjs";
|
|
46
46
|
import { f as L } from "../NumberFormatting-CtWHhyBX.mjs";
|
|
47
47
|
import { D as Ne } from "../Drawer-kEE73B87.mjs";
|
|
48
48
|
import { b as O } from "../Localization-2MODESHW.mjs";
|
package/package.json
CHANGED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { jsx as e, Fragment as x, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import m from "react";
|
|
3
|
-
import { observer as u } from "mobx-react-lite";
|
|
4
|
-
import s from "@mui/material/Box";
|
|
5
|
-
import l from "@mui/material/Tab";
|
|
6
|
-
import b from "@mui/material/Tabs";
|
|
7
|
-
import p from "@mui/material/Divider";
|
|
8
|
-
import R from "@mui/material/List";
|
|
9
|
-
import T from "@mui/material/Stack";
|
|
10
|
-
import { R as C, A as S, a as E, M as v } from "./ManageIncome-4_bSdxXr.mjs";
|
|
11
|
-
import { u as h, i as A, f } from "./hooks-BAAimqdq.mjs";
|
|
12
|
-
import { R as y, F as N } from "./RepeatingTransaction-BW4J-jeJ.mjs";
|
|
13
|
-
import { A as d } from "./WidgetContainer-ztkGgdIH.mjs";
|
|
14
|
-
const I = u(() => {
|
|
15
|
-
const { recurring: n } = h(), { repeatingTransactions: c } = A(), { onEvent: o } = f(), a = (r) => {
|
|
16
|
-
o(d.RECURRING_TRANSACTIONS_CLICK_EXPENSE, {
|
|
17
|
-
repeating_transaction_guid: r.guid
|
|
18
|
-
});
|
|
19
|
-
}, g = () => {
|
|
20
|
-
o(d.RECURRING_TRANSACTIONS_CLICK_ADD_EXPENSE);
|
|
21
|
-
}, i = c.filter(
|
|
22
|
-
(r) => r.repeating_transaction_type !== y.Income && (r.transactions.length > 0 || r.recurrence_type === N.EveryYear)
|
|
23
|
-
);
|
|
24
|
-
return /* @__PURE__ */ e(x, { children: i.length !== 0 ? /* @__PURE__ */ t(
|
|
25
|
-
T,
|
|
26
|
-
{
|
|
27
|
-
sx: {
|
|
28
|
-
height: "calc(100vh - 109px)",
|
|
29
|
-
maxHeight: "calc(100vh - 109px)"
|
|
30
|
-
},
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ e(s, { sx: { flex: 1, overflow: "auto" }, children: /* @__PURE__ */ e(R, { sx: { bgcolor: "background.paper" }, children: i.map((r, _) => /* @__PURE__ */ t(m.Fragment, { children: [
|
|
33
|
-
/* @__PURE__ */ e(C, { onClick: a, repeatingTransaction: r }),
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
-
p,
|
|
36
|
-
{
|
|
37
|
-
variant: _ < i.length - 1 ? "inset" : "fullWidth"
|
|
38
|
-
}
|
|
39
|
-
)
|
|
40
|
-
] }, r.guid)) }) }),
|
|
41
|
-
/* @__PURE__ */ t(s, { children: [
|
|
42
|
-
/* @__PURE__ */ e(p, {}),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
44
|
-
s,
|
|
45
|
-
{
|
|
46
|
-
sx: {
|
|
47
|
-
alignContent: "center",
|
|
48
|
-
bgcolor: "background.paper",
|
|
49
|
-
justifyContent: "flex-end",
|
|
50
|
-
px: 24,
|
|
51
|
-
py: 12,
|
|
52
|
-
textAlign: "right"
|
|
53
|
-
},
|
|
54
|
-
children: /* @__PURE__ */ e(S, { label: n.add_expense, onAddRecurringTransaction: g })
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
] })
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
) : /* @__PURE__ */ e(E, { zeroStateFor: "expenses" }) });
|
|
61
|
-
}), X = u(() => {
|
|
62
|
-
const [n, c] = m.useState(0), { onEvent: o } = f(), { recurring: a } = h();
|
|
63
|
-
return /* @__PURE__ */ t(s, { bgcolor: "background.default", height: "100%", children: [
|
|
64
|
-
/* @__PURE__ */ t(
|
|
65
|
-
b,
|
|
66
|
-
{
|
|
67
|
-
onChange: (i, r) => {
|
|
68
|
-
c(r), o(
|
|
69
|
-
r === 0 ? "recurring_transactions_widget_manage_expenses" : "recurring_transactions_widget_edit_income"
|
|
70
|
-
);
|
|
71
|
-
},
|
|
72
|
-
sx: { bgcolor: "background.paper", mb: 0 },
|
|
73
|
-
value: n,
|
|
74
|
-
variant: "fullWidth",
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ e(l, { label: a.expenses }),
|
|
77
|
-
/* @__PURE__ */ e(l, { label: a.income })
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
),
|
|
81
|
-
n === 0 && /* @__PURE__ */ e(I, {}),
|
|
82
|
-
n === 1 && /* @__PURE__ */ e(v, {})
|
|
83
|
-
] });
|
|
84
|
-
});
|
|
85
|
-
export {
|
|
86
|
-
I as M,
|
|
87
|
-
X as R
|
|
88
|
-
};
|