@mx-cartographer/experiences 8.0.12 → 8.0.13
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 +4 -0
- package/dist/{ManageIncome-HM5-RrJO.mjs → ManageIncome-C_XOG9CZ.mjs} +1 -1
- package/dist/{RecurringSettings-CC1uVzua.mjs → RecurringSettings-Bt-zMwCB.mjs} +1 -1
- package/dist/{TransactionDetails-6QV_e5YL.mjs → TransactionDetails-DA6tdnu0.mjs} +437 -430
- package/dist/{TransactionStore-Bx9euVrY.mjs → TransactionStore-CbZfz7-2.mjs} +75 -70
- package/dist/accounts/index.es.js +1 -1
- package/dist/budgets/index.es.js +2 -2
- package/dist/cashflow/index.es.js +2 -2
- package/dist/common/index.es.js +2 -2
- package/dist/finstrong/index.es.js +2 -2
- package/dist/recurringtransactions/index.es.js +4 -4
- package/dist/spending/index.es.js +1 -1
- package/dist/transactions/index.es.js +4 -4
- package/dist/trends/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import l from "react";
|
|
3
3
|
import { observer as E } from "mobx-react-lite";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
4
|
+
import $ from "@mui/material/Box";
|
|
5
|
+
import _e from "@mui/material/Divider";
|
|
6
|
+
import me from "@mui/material/List";
|
|
7
|
+
import de from "@mui/material/Paper";
|
|
8
8
|
import v from "@mui/material/Stack";
|
|
9
|
-
import { useTheme as
|
|
10
|
-
import { P as
|
|
9
|
+
import { useTheme as F, alpha as fe } from "@mui/material/styles";
|
|
10
|
+
import { P as z, Text as b, H2 as Ge, MerchantLogo as Ne, Toast as Be, CategoryIcon as Ie, CategoryIconVariants as De, TextField as ve, Icon as ue } from "@mxenabled/mxui";
|
|
11
11
|
import { g as $e, C as Ke, a as Fe, b as He, i as Ue } from "./BudgetUtil-CLhRnCoX.mjs";
|
|
12
|
-
import
|
|
12
|
+
import ie from "@mui/material/Button";
|
|
13
13
|
import Ve from "@mui/material/FormGroup";
|
|
14
|
-
import
|
|
14
|
+
import oe from "@mui/material/IconButton";
|
|
15
15
|
import Oe from "@mui/material/TextField";
|
|
16
|
-
import { u as
|
|
17
|
-
import { O as
|
|
18
|
-
import { u as
|
|
19
|
-
import { A as
|
|
16
|
+
import { u as he } from "./useAriaLive-MkYebyUR.mjs";
|
|
17
|
+
import { O as T } from "./OnClickEvents-CseHDZ94.mjs";
|
|
18
|
+
import { u as N, h as L, m as Ye, d as ze, l as Le, g as R, b as We, o as je } from "./hooks-BxkfR-Ff.mjs";
|
|
19
|
+
import { A as K } from "./Analytics-0Xm_BjHU.mjs";
|
|
20
20
|
import qe from "@mui/material/ToggleButton";
|
|
21
|
-
import { ChevronRight as we, Icon as
|
|
22
|
-
import { fromUnixTime as
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
21
|
+
import { ChevronRight as we, Icon as O, Delete as pe, Cancel as ge, Search as Xe, Edit as Je, Flag as Qe } from "@mxenabled/mx-icons";
|
|
22
|
+
import { fromUnixTime as Se } from "date-fns/fromUnixTime";
|
|
23
|
+
import H from "@mui/material/Avatar";
|
|
24
|
+
import P from "@mui/material/ListItem";
|
|
25
|
+
import U from "@mui/material/ListItemAvatar";
|
|
26
|
+
import G from "@mui/material/ListItemText";
|
|
27
27
|
import { f as Re, D as Me } from "./DateFormats-BMpMrZpW.mjs";
|
|
28
|
-
import
|
|
29
|
-
import
|
|
28
|
+
import V from "@mui/material/ListItemButton";
|
|
29
|
+
import Y from "@mui/material/ListItemIcon";
|
|
30
30
|
import { a as ke } from "./CategorySelectorDrawer-Dc9Widy9.mjs";
|
|
31
|
-
import { b as Ze, T as et, u as
|
|
32
|
-
import { D as
|
|
31
|
+
import { b as Ze, T as et, u as X } from "./StatusIndicator-DAWRKwmE.mjs";
|
|
32
|
+
import { D as q } from "./Dialog-Ck34yr-d.mjs";
|
|
33
33
|
import { b as I } from "./Localization-CPkpIwIx.mjs";
|
|
34
34
|
import { getUnixTime as tt } from "date-fns/getUnixTime";
|
|
35
|
-
import { D as
|
|
36
|
-
import { f as
|
|
35
|
+
import { D as se } from "./Drawer-Bbe4AMB1.mjs";
|
|
36
|
+
import { f as W } from "./NumberFormatting-QCaNwbjv.mjs";
|
|
37
37
|
import rt from "@mui/material/styles/useTheme";
|
|
38
38
|
import Ee from "@mui/material/InputAdornment";
|
|
39
39
|
import nt from "@mui/material/Checkbox";
|
|
@@ -44,7 +44,7 @@ import xe from "@mui/material/Grid";
|
|
|
44
44
|
import { C as st } from "./CurrencyInput-DuMktPu3.mjs";
|
|
45
45
|
import ct from "@mui/material/Switch";
|
|
46
46
|
import { L as lt } from "./Loader-D3rjKx72.mjs";
|
|
47
|
-
var
|
|
47
|
+
var ae = /* @__PURE__ */ ((t) => (t[t.Category = 0] = "Category", t[t.Date = 1] = "Date", t[t.Memo = 2] = "Memo", t[t.Tags = 3] = "Tags", t))(ae || {}), ee = /* @__PURE__ */ ((t) => (t[t.MerchantBudget = 0] = "MerchantBudget", t[t.SplitTransaction = 1] = "SplitTransaction", t[t.HideTransaction = 2] = "HideTransaction", t[t.MerchantLogo = 3] = "MerchantLogo", t))(ee || {});
|
|
48
48
|
const dt = [
|
|
49
49
|
0,
|
|
50
50
|
1,
|
|
@@ -64,11 +64,11 @@ const dt = [
|
|
|
64
64
|
spentPercentage: o,
|
|
65
65
|
remainingAmount: n,
|
|
66
66
|
iconColor: s,
|
|
67
|
-
icon:
|
|
67
|
+
icon: d
|
|
68
68
|
}) => {
|
|
69
|
-
const { budgets: _ } =
|
|
70
|
-
return /* @__PURE__ */ e(
|
|
71
|
-
|
|
69
|
+
const { budgets: _ } = N();
|
|
70
|
+
return /* @__PURE__ */ e(l.Fragment, { children: /* @__PURE__ */ c(
|
|
71
|
+
$,
|
|
72
72
|
{
|
|
73
73
|
sx: {
|
|
74
74
|
bgcolor: "background.paper",
|
|
@@ -89,8 +89,8 @@ const dt = [
|
|
|
89
89
|
px: 24
|
|
90
90
|
},
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
-
a && /* @__PURE__ */ e(
|
|
92
|
+
/* @__PURE__ */ e(z, { bold: !0, variant: "subtitle1", children: it(t) }),
|
|
93
|
+
a && /* @__PURE__ */ e(ie, { endIcon: /* @__PURE__ */ e(we, {}), onClick: a, sx: { height: 28 }, children: /* @__PURE__ */ e(b, { bold: !0, variant: "body2", children: _.spending_history }) })
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
),
|
|
@@ -98,18 +98,18 @@ const dt = [
|
|
|
98
98
|
Ze,
|
|
99
99
|
{
|
|
100
100
|
amount: /* @__PURE__ */ c(v, { sx: { alignItems: "baseline", flexDirection: "row", gap: 4 }, children: [
|
|
101
|
-
/* @__PURE__ */ e(Ge, { children:
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ e(Ge, { children: W(i, "0,0.00") }),
|
|
102
|
+
/* @__PURE__ */ e(z, { color: "text.secondary", variant: "body2", children: "/" }),
|
|
103
|
+
/* @__PURE__ */ e(z, { color: "text.secondary", variant: "body2", children: W(r, "0,0.00") })
|
|
104
104
|
] }),
|
|
105
105
|
completeColor: `${s}.main`,
|
|
106
|
-
icon:
|
|
106
|
+
icon: d,
|
|
107
107
|
label: _.spent_label,
|
|
108
108
|
leftLabel: I(_.percent_spent, o.toFixed()),
|
|
109
109
|
percentComplete: o,
|
|
110
110
|
rightLabel: I(
|
|
111
111
|
_.balance_left,
|
|
112
|
-
|
|
112
|
+
W(n, "0,0.00")
|
|
113
113
|
),
|
|
114
114
|
sx: {
|
|
115
115
|
pb: 24,
|
|
@@ -129,14 +129,14 @@ const dt = [
|
|
|
129
129
|
setCurrencyDialogAction: o,
|
|
130
130
|
renderingToast: n
|
|
131
131
|
}) => {
|
|
132
|
-
const { budgets: s, common:
|
|
132
|
+
const { budgets: s, common: d } = N(), { sortedTransactions: _ } = L(), u = l.useMemo(() => _.reduce((m, f) => f.parent_guid ? m : m + f.amount, 0), [_]), { remainingAmount: g, spentPercentage: p, iconColor: h } = $e(
|
|
133
133
|
u,
|
|
134
134
|
t.amount ?? 0
|
|
135
135
|
);
|
|
136
136
|
return /* @__PURE__ */ c(
|
|
137
|
-
|
|
137
|
+
se,
|
|
138
138
|
{
|
|
139
|
-
ariaLabelClose:
|
|
139
|
+
ariaLabelClose: d.close_aria,
|
|
140
140
|
footerStyles: {
|
|
141
141
|
px: 24,
|
|
142
142
|
py: 16
|
|
@@ -162,7 +162,7 @@ const dt = [
|
|
|
162
162
|
{
|
|
163
163
|
amount: t.amount,
|
|
164
164
|
icon: /* @__PURE__ */ e(
|
|
165
|
-
|
|
165
|
+
Ne,
|
|
166
166
|
{
|
|
167
167
|
categoryGuid: a.top_level_category_guid || "",
|
|
168
168
|
merchantGuid: a.merchant_guid || ""
|
|
@@ -183,31 +183,31 @@ const dt = [
|
|
|
183
183
|
}, pt = E(mt);
|
|
184
184
|
var Ae = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.EDIT = "edit", t.DELETE = "delete", t))(Ae || {});
|
|
185
185
|
const gt = E(({ transaction: t }) => {
|
|
186
|
-
const [a, i] =
|
|
186
|
+
const [a, i] = l.useState(null), [r, o] = l.useState(""), [n, s] = l.useState(!1), d = l.useRef(!1), [_, u] = l.useState(null), g = F(), {
|
|
187
187
|
addMerchantBudget: p,
|
|
188
188
|
updateMerchantBudget: h,
|
|
189
189
|
deleteMerchantBudget: m,
|
|
190
190
|
getMerchantBudgetByMerchantGuid: f,
|
|
191
|
-
alert:
|
|
191
|
+
alert: w,
|
|
192
192
|
setAlert: k
|
|
193
|
-
} = Ye(), { setFilter:
|
|
193
|
+
} = Ye(), { setFilter: M } = L(), { accounts: x } = ze(), S = g.palette.mode === "dark" ? "grey.800" : "grey.100", { budgets: y, common: J } = N(), { announce: ye, ariaLive: Te } = he(), [te, re] = l.useState(!1), B = t?.merchant_guid ? f(t.merchant_guid) : void 0, ne = () => {
|
|
194
194
|
u(a), i(null), o("");
|
|
195
|
-
},
|
|
196
|
-
|
|
195
|
+
}, be = () => {
|
|
196
|
+
B ? re(!0) : i(
|
|
197
197
|
"create"
|
|
198
198
|
/* CREATE */
|
|
199
199
|
);
|
|
200
|
-
},
|
|
200
|
+
}, Q = {
|
|
201
201
|
create: {
|
|
202
202
|
content: I(
|
|
203
|
-
|
|
203
|
+
y.create_budget_content,
|
|
204
204
|
/* @__PURE__ */ e("strong", { children: t.description }),
|
|
205
|
-
`${
|
|
205
|
+
`${W(t.amount, "0,0.00")}`
|
|
206
206
|
),
|
|
207
|
-
title:
|
|
208
|
-
primaryButtonText:
|
|
207
|
+
title: y.dialog_create_budget_title,
|
|
208
|
+
primaryButtonText: y.dialog_primary_button_text,
|
|
209
209
|
errorAlertMessage: I(
|
|
210
|
-
|
|
210
|
+
y.alert_merchant_budget_not_created,
|
|
211
211
|
t.description
|
|
212
212
|
),
|
|
213
213
|
errorRetryAction: () => i(
|
|
@@ -215,20 +215,20 @@ const gt = E(({ transaction: t }) => {
|
|
|
215
215
|
/* CREATE */
|
|
216
216
|
),
|
|
217
217
|
successAlertMessage: I(
|
|
218
|
-
|
|
218
|
+
y.alert_budget_created,
|
|
219
219
|
t.description
|
|
220
220
|
),
|
|
221
221
|
apiTrigger: async () => await p(t.merchant_guid, Number(r))
|
|
222
222
|
},
|
|
223
223
|
edit: {
|
|
224
224
|
content: I(
|
|
225
|
-
|
|
225
|
+
y.edit_budget_content,
|
|
226
226
|
/* @__PURE__ */ e("strong", { children: t.description })
|
|
227
227
|
),
|
|
228
|
-
title:
|
|
229
|
-
primaryButtonText:
|
|
228
|
+
title: y.details_edit_title,
|
|
229
|
+
primaryButtonText: y.add_save_button,
|
|
230
230
|
errorAlertMessage: I(
|
|
231
|
-
|
|
231
|
+
y.error_alert_edit_merchant_budget,
|
|
232
232
|
t.description
|
|
233
233
|
),
|
|
234
234
|
errorRetryAction: () => i(
|
|
@@ -236,23 +236,23 @@ const gt = E(({ transaction: t }) => {
|
|
|
236
236
|
/* EDIT */
|
|
237
237
|
),
|
|
238
238
|
successAlertMessage: I(
|
|
239
|
-
|
|
239
|
+
y.success_alert_edit_merchant_budget,
|
|
240
240
|
t.description
|
|
241
241
|
),
|
|
242
242
|
apiTrigger: async () => await h({
|
|
243
|
-
...
|
|
243
|
+
...B,
|
|
244
244
|
amount: Number(r)
|
|
245
245
|
})
|
|
246
246
|
},
|
|
247
247
|
delete: {
|
|
248
248
|
content: I(
|
|
249
|
-
|
|
249
|
+
y.delete_description,
|
|
250
250
|
/* @__PURE__ */ e("strong", { children: t.description })
|
|
251
251
|
),
|
|
252
|
-
title:
|
|
253
|
-
primaryButtonText:
|
|
252
|
+
title: y.delete_title,
|
|
253
|
+
primaryButtonText: y.details_delete_button,
|
|
254
254
|
errorAlertMessage: I(
|
|
255
|
-
|
|
255
|
+
y.error_alert_delete_merchant_budget,
|
|
256
256
|
t.description
|
|
257
257
|
),
|
|
258
258
|
errorRetryAction: () => i(
|
|
@@ -260,66 +260,66 @@ const gt = E(({ transaction: t }) => {
|
|
|
260
260
|
/* DELETE */
|
|
261
261
|
),
|
|
262
262
|
successAlertMessage: I(
|
|
263
|
-
|
|
263
|
+
y.success_alert_delete_merchant_budget,
|
|
264
264
|
t.description
|
|
265
265
|
),
|
|
266
|
-
apiTrigger: async () => await m(
|
|
266
|
+
apiTrigger: async () => await m(B.guid)
|
|
267
267
|
}
|
|
268
|
-
},
|
|
269
|
-
if (
|
|
270
|
-
|
|
271
|
-
const { apiTrigger:
|
|
272
|
-
|
|
268
|
+
}, Ce = async () => {
|
|
269
|
+
if (d.current) return;
|
|
270
|
+
d.current = !0;
|
|
271
|
+
const { apiTrigger: D, successAlertMessage: C, errorAlertMessage: j } = Q[a], { isSuccess: Z } = await D(), ce = Z ? C : j;
|
|
272
|
+
ne(), s(!Z), k(ce), ye(ce), Z && a === "delete" && re(!1), d.current = !1;
|
|
273
273
|
};
|
|
274
|
-
|
|
275
|
-
const
|
|
274
|
+
l.useEffect(() => {
|
|
275
|
+
const D = {
|
|
276
276
|
start: at(new Date(t.date * 1e3)),
|
|
277
277
|
end: ot(new Date(t.date * 1e3))
|
|
278
278
|
};
|
|
279
|
-
|
|
280
|
-
accounts:
|
|
281
|
-
custom:
|
|
282
|
-
dateRange:
|
|
279
|
+
te && M({
|
|
280
|
+
accounts: x.map((C) => C.guid),
|
|
281
|
+
custom: te ? (C) => C.merchant_guid === t.merchant_guid : (C) => C.guid === t.guid,
|
|
282
|
+
dateRange: D
|
|
283
283
|
});
|
|
284
|
-
}, [
|
|
285
|
-
const
|
|
284
|
+
}, [te, t, x]);
|
|
285
|
+
const A = () => /* @__PURE__ */ e(
|
|
286
286
|
Be,
|
|
287
287
|
{
|
|
288
|
-
actionText:
|
|
288
|
+
actionText: y.autogenerate_budgets_error_primary_button,
|
|
289
289
|
autoHideDuration: 3500,
|
|
290
|
-
closeAriaLabel:
|
|
290
|
+
closeAriaLabel: J.close_aria,
|
|
291
291
|
handleClose: () => k(""),
|
|
292
|
-
message:
|
|
293
|
-
onActionClick:
|
|
294
|
-
open: !!
|
|
292
|
+
message: w,
|
|
293
|
+
onActionClick: Q[_]?.errorRetryAction,
|
|
294
|
+
open: !!w,
|
|
295
295
|
severity: n ? "error" : "success",
|
|
296
296
|
showAction: n,
|
|
297
297
|
showClose: !0
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
|
-
return /* @__PURE__ */ c(
|
|
301
|
-
|
|
302
|
-
/* @__PURE__ */ e(
|
|
303
|
-
/* @__PURE__ */ e(
|
|
300
|
+
return /* @__PURE__ */ c(l.Fragment, { children: [
|
|
301
|
+
Te,
|
|
302
|
+
/* @__PURE__ */ e(P, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(V, { onClick: be, children: [
|
|
303
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: S }, variant: "rounded", children: /* @__PURE__ */ e(O, { name: "bubble_chart", sx: { color: "text.primary" } }) }) }),
|
|
304
304
|
/* @__PURE__ */ e(
|
|
305
|
-
|
|
305
|
+
G,
|
|
306
306
|
{
|
|
307
|
-
primary:
|
|
307
|
+
primary: y.add_merchant_budget_primary_text,
|
|
308
308
|
primaryTypographyProps: { variant: "caption" },
|
|
309
|
-
secondary: /* @__PURE__ */ e(
|
|
309
|
+
secondary: /* @__PURE__ */ e(b, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: B ? `${W(B.amount, "0,0.00")} / ${J.month_text}` : y.add_merchant_budget_secondary_text })
|
|
310
310
|
}
|
|
311
311
|
),
|
|
312
|
-
/* @__PURE__ */ e(
|
|
312
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(O, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
313
313
|
] }) }),
|
|
314
|
-
!!
|
|
314
|
+
!!B && /* @__PURE__ */ e(
|
|
315
315
|
pt,
|
|
316
316
|
{
|
|
317
|
-
isOpen:
|
|
318
|
-
merchantBudget:
|
|
319
|
-
onClose: () =>
|
|
320
|
-
renderingToast: () =>
|
|
321
|
-
setCurrencyDialogAction: (
|
|
322
|
-
|
|
317
|
+
isOpen: te,
|
|
318
|
+
merchantBudget: B,
|
|
319
|
+
onClose: () => re(!1),
|
|
320
|
+
renderingToast: () => w && A(),
|
|
321
|
+
setCurrencyDialogAction: (D) => {
|
|
322
|
+
D === "edit" && o(B?.amount.toString() || ""), i(D);
|
|
323
323
|
},
|
|
324
324
|
transaction: t
|
|
325
325
|
}
|
|
@@ -327,55 +327,55 @@ const gt = E(({ transaction: t }) => {
|
|
|
327
327
|
a && /* @__PURE__ */ e(
|
|
328
328
|
Ke,
|
|
329
329
|
{
|
|
330
|
-
closeAriaLabel:
|
|
331
|
-
content:
|
|
330
|
+
closeAriaLabel: J.close_aria,
|
|
331
|
+
content: Q[a].content,
|
|
332
332
|
handleInputChange: o,
|
|
333
|
-
handleModalClose:
|
|
334
|
-
handlePrimaryAction:
|
|
335
|
-
handleSecondaryAction:
|
|
336
|
-
inputLabel: a !== "delete" ?
|
|
333
|
+
handleModalClose: ne,
|
|
334
|
+
handlePrimaryAction: Ce,
|
|
335
|
+
handleSecondaryAction: ne,
|
|
336
|
+
inputLabel: a !== "delete" ? J.amount_text : "",
|
|
337
337
|
inputValue: r,
|
|
338
338
|
isOpen: !!a,
|
|
339
|
-
primaryText:
|
|
340
|
-
secondaryText:
|
|
341
|
-
title:
|
|
339
|
+
primaryText: Q[a].primaryButtonText,
|
|
340
|
+
secondaryText: J.cancel_button,
|
|
341
|
+
title: Q[a].title
|
|
342
342
|
}
|
|
343
343
|
),
|
|
344
|
-
!!
|
|
344
|
+
!!w && A()
|
|
345
345
|
] });
|
|
346
346
|
}), ht = ({ transaction: t }) => {
|
|
347
|
-
const { addOrUpdateTransactionRule: a, updateTransaction: i } =
|
|
348
|
-
await i({ ...t, category_guid: p }),
|
|
347
|
+
const { addOrUpdateTransactionRule: a, updateTransaction: i } = L(), { categories: r } = Le(), { onEvent: o } = R(), { setShouldDisableDrawerScroll: n, updateManualTransaction: s } = X(), { transactions: d } = N(), _ = F(), [u, g] = l.useState(!1), [p, h] = l.useState(""), m = async (x) => {
|
|
348
|
+
await i({ ...t, category_guid: p }), x && await a(p, t), h(""), o(K.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
349
349
|
transaction_guid: t.guid
|
|
350
350
|
});
|
|
351
|
-
}, f = (
|
|
351
|
+
}, f = (x) => {
|
|
352
352
|
if (t.is_manual && !t.guid) {
|
|
353
|
-
const
|
|
353
|
+
const S = r.find((y) => y.guid === x);
|
|
354
354
|
s({
|
|
355
355
|
...t,
|
|
356
|
-
category:
|
|
357
|
-
category_guid:
|
|
358
|
-
top_level_category_guid:
|
|
356
|
+
category: S?.name,
|
|
357
|
+
category_guid: x,
|
|
358
|
+
top_level_category_guid: S?.parent_guid || x
|
|
359
359
|
});
|
|
360
360
|
} else
|
|
361
|
-
h(
|
|
362
|
-
|
|
363
|
-
},
|
|
361
|
+
h(x);
|
|
362
|
+
w();
|
|
363
|
+
}, w = () => {
|
|
364
364
|
g(!1), n(!1);
|
|
365
|
-
}, k =
|
|
366
|
-
() => r.find((
|
|
365
|
+
}, k = l.useMemo(
|
|
366
|
+
() => r.find((x) => x.guid === p),
|
|
367
367
|
[p]
|
|
368
|
-
),
|
|
369
|
-
return /* @__PURE__ */ c(
|
|
368
|
+
), M = _.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
369
|
+
return /* @__PURE__ */ c(P, { disableGutters: !0, disablePadding: !0, children: [
|
|
370
370
|
/* @__PURE__ */ c(
|
|
371
|
-
|
|
371
|
+
V,
|
|
372
372
|
{
|
|
373
373
|
onClick: () => {
|
|
374
|
-
o(
|
|
374
|
+
o(T.ON_TRANSACTION_CATEGORY_CLICK), g(!0);
|
|
375
375
|
},
|
|
376
376
|
children: [
|
|
377
|
-
/* @__PURE__ */ e(
|
|
378
|
-
|
|
377
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: M }, variant: "rounded", children: /* @__PURE__ */ e(
|
|
378
|
+
Ie,
|
|
379
379
|
{
|
|
380
380
|
categoryGuid: t.top_level_category_guid,
|
|
381
381
|
size: 24,
|
|
@@ -384,14 +384,14 @@ const gt = E(({ transaction: t }) => {
|
|
|
384
384
|
}
|
|
385
385
|
) }) }),
|
|
386
386
|
/* @__PURE__ */ e(
|
|
387
|
-
|
|
387
|
+
G,
|
|
388
388
|
{
|
|
389
|
-
primary:
|
|
389
|
+
primary: d.category_title,
|
|
390
390
|
primaryTypographyProps: { variant: "caption" },
|
|
391
|
-
secondary: /* @__PURE__ */ e(
|
|
391
|
+
secondary: /* @__PURE__ */ e(b, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.category ?? d.actions_select_a_category })
|
|
392
392
|
}
|
|
393
393
|
),
|
|
394
|
-
/* @__PURE__ */ e(
|
|
394
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(O, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
395
395
|
]
|
|
396
396
|
}
|
|
397
397
|
),
|
|
@@ -399,18 +399,18 @@ const gt = E(({ transaction: t }) => {
|
|
|
399
399
|
ke,
|
|
400
400
|
{
|
|
401
401
|
initialSelected: t.category_guid,
|
|
402
|
-
onClose:
|
|
402
|
+
onClose: w,
|
|
403
403
|
onSelect: f,
|
|
404
404
|
showDrawer: u,
|
|
405
|
-
title:
|
|
405
|
+
title: d.actions_select_a_category
|
|
406
406
|
}
|
|
407
407
|
),
|
|
408
408
|
/* @__PURE__ */ e(
|
|
409
|
-
|
|
409
|
+
q,
|
|
410
410
|
{
|
|
411
411
|
copy: {
|
|
412
412
|
title: I(
|
|
413
|
-
|
|
413
|
+
d.actions_apply_to_all_transaction_types,
|
|
414
414
|
t.description
|
|
415
415
|
)
|
|
416
416
|
},
|
|
@@ -418,10 +418,10 @@ const gt = E(({ transaction: t }) => {
|
|
|
418
418
|
onClose: () => h(""),
|
|
419
419
|
onPrimaryAction: () => m(!0),
|
|
420
420
|
onSecondaryAction: () => m(!1),
|
|
421
|
-
primaryText:
|
|
422
|
-
secondaryText:
|
|
423
|
-
children: /* @__PURE__ */ e(
|
|
424
|
-
|
|
421
|
+
primaryText: d.actions_apply_to_all,
|
|
422
|
+
secondaryText: d.actions_this_time_only,
|
|
423
|
+
children: /* @__PURE__ */ e(z, { variant: "subtitle1", children: I(
|
|
424
|
+
d.actions_all_past_and_future,
|
|
425
425
|
t.description,
|
|
426
426
|
k?.name
|
|
427
427
|
) })
|
|
@@ -429,41 +429,41 @@ const gt = E(({ transaction: t }) => {
|
|
|
429
429
|
)
|
|
430
430
|
] });
|
|
431
431
|
}, yt = ({ transaction: t }) => {
|
|
432
|
-
const { onEvent: a } =
|
|
432
|
+
const { onEvent: a } = R(), { updateTransaction: i } = L(), { updateManualTransaction: r } = X(), { common: o, transactions: n } = N(), s = F(), [d, _] = l.useState(!1), [u, g] = l.useState(t.date), p = (f) => {
|
|
433
433
|
g(tt(f));
|
|
434
434
|
}, h = async () => {
|
|
435
435
|
if (t.is_manual && !t.guid) {
|
|
436
436
|
r({ ...t, date: u }), _(!1);
|
|
437
437
|
return;
|
|
438
438
|
}
|
|
439
|
-
await i({ ...t, date: u }), a(
|
|
439
|
+
await i({ ...t, date: u }), a(K.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), _(!1);
|
|
440
440
|
}, m = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
441
|
-
return /* @__PURE__ */ c(
|
|
441
|
+
return /* @__PURE__ */ c(P, { className: "mx-txn-date-action", disableGutters: !0, disablePadding: !0, children: [
|
|
442
442
|
/* @__PURE__ */ c(
|
|
443
|
-
|
|
443
|
+
V,
|
|
444
444
|
{
|
|
445
445
|
onClick: () => {
|
|
446
|
-
a(
|
|
446
|
+
a(T.ON_TRANSACTION_DATE_CLICK), _(!0);
|
|
447
447
|
},
|
|
448
448
|
children: [
|
|
449
|
-
/* @__PURE__ */ e(
|
|
449
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: m }, variant: "rounded", children: /* @__PURE__ */ e(O, { name: "calendar_month", sx: { color: "text.primary" } }) }) }),
|
|
450
450
|
/* @__PURE__ */ e(
|
|
451
|
-
|
|
451
|
+
G,
|
|
452
452
|
{
|
|
453
453
|
primary: n.date_title,
|
|
454
454
|
primaryTypographyProps: { variant: "caption" },
|
|
455
|
-
secondary: /* @__PURE__ */ e(
|
|
455
|
+
secondary: /* @__PURE__ */ e(b, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: Re(Se(t.date), Me.YEAR_MONTH_DAY) })
|
|
456
456
|
}
|
|
457
457
|
),
|
|
458
|
-
/* @__PURE__ */ e(
|
|
458
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(O, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
459
459
|
]
|
|
460
460
|
}
|
|
461
461
|
),
|
|
462
462
|
/* @__PURE__ */ e(
|
|
463
|
-
|
|
463
|
+
se,
|
|
464
464
|
{
|
|
465
465
|
ariaLabelClose: o.close_aria,
|
|
466
|
-
isOpen:
|
|
466
|
+
isOpen: d,
|
|
467
467
|
onClose: () => _(!1),
|
|
468
468
|
onPrimaryAction: h,
|
|
469
469
|
primaryText: o.save_button,
|
|
@@ -472,7 +472,7 @@ const gt = E(({ transaction: t }) => {
|
|
|
472
472
|
children: /* @__PURE__ */ e(v, { alignItems: "center", mt: 40, children: /* @__PURE__ */ e(
|
|
473
473
|
Fe,
|
|
474
474
|
{
|
|
475
|
-
beginDate:
|
|
475
|
+
beginDate: Se(u),
|
|
476
476
|
copy: {
|
|
477
477
|
nextAria: n.date_next_aria,
|
|
478
478
|
prevAria: n.date_prev_aria,
|
|
@@ -486,100 +486,100 @@ const gt = E(({ transaction: t }) => {
|
|
|
486
486
|
)
|
|
487
487
|
] });
|
|
488
488
|
}, Tt = ({ transaction: t }) => {
|
|
489
|
-
const { onEvent: a } =
|
|
490
|
-
await i(t.guid), a(
|
|
489
|
+
const { onEvent: a } = R(), { removeTransaction: i } = L(), { setShouldDisableDrawerScroll: r } = X(), { common: o, transactions: n } = N(), [s, d] = l.useState(!1), _ = async () => {
|
|
490
|
+
await i(t.guid), a(T.ON_TRANSACTION_DELETE_DELETED);
|
|
491
491
|
};
|
|
492
|
-
return /* @__PURE__ */ c(
|
|
493
|
-
t && /* @__PURE__ */ e(
|
|
494
|
-
|
|
492
|
+
return /* @__PURE__ */ c($, { className: "mx-txn-delete", children: [
|
|
493
|
+
t && /* @__PURE__ */ e(P, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ c(
|
|
494
|
+
V,
|
|
495
495
|
{
|
|
496
496
|
onClick: () => {
|
|
497
|
-
a(
|
|
497
|
+
a(T.ON_TRANSACTION_DELETE_CLICK), r(!0), d(!0);
|
|
498
498
|
},
|
|
499
499
|
children: [
|
|
500
|
-
/* @__PURE__ */ e(
|
|
500
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { variant: "rounded", children: /* @__PURE__ */ e(pe, { color: "secondary", fontSize: "small" }) }) }),
|
|
501
501
|
/* @__PURE__ */ e(
|
|
502
|
-
|
|
502
|
+
G,
|
|
503
503
|
{
|
|
504
504
|
primary: n.manual_transaction_delete_title,
|
|
505
505
|
secondary: n.manual_transaction_delete_subtitle
|
|
506
506
|
}
|
|
507
507
|
),
|
|
508
|
-
/* @__PURE__ */ e(
|
|
508
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(pe, {}) })
|
|
509
509
|
]
|
|
510
510
|
}
|
|
511
511
|
) }),
|
|
512
512
|
/* @__PURE__ */ e(
|
|
513
|
-
|
|
513
|
+
q,
|
|
514
514
|
{
|
|
515
515
|
copy: { title: n.manual_transaction_delete_title },
|
|
516
516
|
isOpen: s,
|
|
517
517
|
onClose: () => {
|
|
518
|
-
r(!1),
|
|
518
|
+
r(!1), d(!1);
|
|
519
519
|
},
|
|
520
520
|
onPrimaryAction: _,
|
|
521
|
-
onSecondaryAction: () => a(
|
|
521
|
+
onSecondaryAction: () => a(T.ON_TRANSACTION_DELETE_CANCEL),
|
|
522
522
|
primaryText: o.delete_button,
|
|
523
523
|
secondaryText: o.cancel_button,
|
|
524
|
-
children: /* @__PURE__ */ e(
|
|
524
|
+
children: /* @__PURE__ */ e(b, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: n.manual_transaction_delete_description })
|
|
525
525
|
}
|
|
526
526
|
)
|
|
527
527
|
] });
|
|
528
528
|
}, bt = E(Tt), Ct = ({ transaction: t }) => {
|
|
529
|
-
const { onEvent: a } =
|
|
530
|
-
await i({ ...t, merchant_guid: "" }), a(
|
|
529
|
+
const { onEvent: a } = R(), { updateTransaction: i } = L(), { setShouldDisableDrawerScroll: r } = X(), { common: o, transactions: n } = N(), s = F(), [d, _] = l.useState(!1), u = async () => {
|
|
530
|
+
await i({ ...t, merchant_guid: "" }), a(K.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
531
531
|
transaction_guid: t.guid
|
|
532
532
|
});
|
|
533
533
|
}, g = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
534
|
-
return /* @__PURE__ */ e(
|
|
534
|
+
return /* @__PURE__ */ e(l.Fragment, { children: t && /* @__PURE__ */ c(P, { className: "mx-txn-delete-logo", disableGutters: !0, disablePadding: !0, children: [
|
|
535
535
|
/* @__PURE__ */ c(
|
|
536
|
-
|
|
536
|
+
V,
|
|
537
537
|
{
|
|
538
538
|
onClick: () => {
|
|
539
|
-
a(
|
|
539
|
+
a(T.ON_TRANSACTION_DELETE_LOGO_CLICK), _(!0);
|
|
540
540
|
},
|
|
541
541
|
children: [
|
|
542
|
-
/* @__PURE__ */ e(
|
|
543
|
-
/* @__PURE__ */ e(
|
|
544
|
-
/* @__PURE__ */ e(
|
|
542
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: g }, variant: "rounded", children: /* @__PURE__ */ e(O, { name: "delete", sx: { color: "text.primary" } }) }) }),
|
|
543
|
+
/* @__PURE__ */ e(G, { primary: n.merchant_logo_title, secondary: n.merchant_logo_desc }),
|
|
544
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(O, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
545
545
|
]
|
|
546
546
|
}
|
|
547
547
|
),
|
|
548
548
|
/* @__PURE__ */ c(
|
|
549
|
-
|
|
549
|
+
q,
|
|
550
550
|
{
|
|
551
551
|
copy: { title: n.merchant_logo_modal_title },
|
|
552
|
-
isOpen:
|
|
552
|
+
isOpen: d,
|
|
553
553
|
onClose: () => {
|
|
554
554
|
r(!1), _(!1);
|
|
555
555
|
},
|
|
556
556
|
onPrimaryAction: u,
|
|
557
|
-
onSecondaryAction: () => a(
|
|
557
|
+
onSecondaryAction: () => a(T.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
558
558
|
primaryText: o.delete_button,
|
|
559
559
|
secondaryText: o.cancel_button,
|
|
560
560
|
title: n.merchant_logo_modal_title,
|
|
561
561
|
children: [
|
|
562
|
-
/* @__PURE__ */ e(
|
|
563
|
-
/* @__PURE__ */ e(
|
|
562
|
+
/* @__PURE__ */ e(b, { sx: { whiteSpace: "normal" }, variant: "subtitle1", children: n.merchant_logo_modal_desc }),
|
|
563
|
+
/* @__PURE__ */ e(b, { bold: !0, sx: { whiteSpace: "normal" }, variant: "subtitle1", children: ` ${n.merchant_logo_modal_desc_bold}` })
|
|
564
564
|
]
|
|
565
565
|
}
|
|
566
566
|
)
|
|
567
567
|
] }) });
|
|
568
|
-
},
|
|
569
|
-
const { onEvent: a } =
|
|
568
|
+
}, ft = E(Ct), xt = ({ transaction: t }) => {
|
|
569
|
+
const { onEvent: a } = R(), { updateTransaction: i } = L(), { setShouldDisableDrawerScroll: r } = X(), { common: o, transactions: n } = N(), s = F(), [d, _] = l.useState(!1), u = t.is_hidden, g = async () => {
|
|
570
570
|
await i({ ...t, is_hidden: !t.is_hidden }), a(
|
|
571
|
-
u ?
|
|
571
|
+
u ? T.ON_TRANSACTION_UNHIDDEN : T.ON_TRANSACTION_HIDDEN
|
|
572
572
|
);
|
|
573
573
|
}, p = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
574
|
-
return /* @__PURE__ */ e(
|
|
574
|
+
return /* @__PURE__ */ e(l.Fragment, { children: t && /* @__PURE__ */ c(P, { className: "mx-txn-hide-transaction", disableGutters: !0, disablePadding: !0, children: [
|
|
575
575
|
/* @__PURE__ */ c(
|
|
576
|
-
|
|
576
|
+
V,
|
|
577
577
|
{
|
|
578
578
|
"aria-checked": u,
|
|
579
579
|
"aria-labelledby": "hide-transaction-text",
|
|
580
580
|
onClick: () => {
|
|
581
581
|
a(
|
|
582
|
-
u ?
|
|
582
|
+
u ? T.ON_TRANSACTION_UNHIDE_CLICK : T.ON_TRANSACTION_HIDE_CLICK
|
|
583
583
|
), a(
|
|
584
584
|
u ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
|
|
585
585
|
{
|
|
@@ -589,16 +589,16 @@ const gt = E(({ transaction: t }) => {
|
|
|
589
589
|
},
|
|
590
590
|
role: "switch",
|
|
591
591
|
children: [
|
|
592
|
-
/* @__PURE__ */ e(
|
|
592
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: p }, variant: "rounded", children: u ? /* @__PURE__ */ e(O, { name: "visibility_off", sx: { color: "text.primary" } }) : /* @__PURE__ */ e(O, { name: "visibility", sx: { color: "text.primary" } }) }) }),
|
|
593
593
|
/* @__PURE__ */ e(
|
|
594
|
-
|
|
594
|
+
G,
|
|
595
595
|
{
|
|
596
596
|
id: "hide-transaction-text",
|
|
597
597
|
primary: u ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx,
|
|
598
598
|
secondary: u ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding
|
|
599
599
|
}
|
|
600
600
|
),
|
|
601
|
-
/* @__PURE__ */ e(
|
|
601
|
+
/* @__PURE__ */ e(Y, { "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
602
602
|
ct,
|
|
603
603
|
{
|
|
604
604
|
checked: u,
|
|
@@ -611,30 +611,30 @@ const gt = E(({ transaction: t }) => {
|
|
|
611
611
|
}
|
|
612
612
|
),
|
|
613
613
|
/* @__PURE__ */ e(
|
|
614
|
-
|
|
614
|
+
q,
|
|
615
615
|
{
|
|
616
616
|
copy: {
|
|
617
617
|
title: u ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx
|
|
618
618
|
},
|
|
619
|
-
isOpen:
|
|
619
|
+
isOpen: d,
|
|
620
620
|
onClose: () => {
|
|
621
621
|
r(!1), _(!1);
|
|
622
622
|
},
|
|
623
623
|
onPrimaryAction: g,
|
|
624
624
|
onSecondaryAction: () => a(
|
|
625
|
-
u ?
|
|
625
|
+
u ? T.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : T.ON_TRANSACTION_HIDE_CANCEL_CLICK
|
|
626
626
|
),
|
|
627
627
|
primaryText: u ? o.unhide_button : o.hide_button,
|
|
628
628
|
secondaryText: o.cancel_button,
|
|
629
|
-
children: /* @__PURE__ */ e(
|
|
629
|
+
children: /* @__PURE__ */ e(b, { truncate: !1, variant: "subtitle1", children: u ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding })
|
|
630
630
|
}
|
|
631
631
|
)
|
|
632
632
|
] }) });
|
|
633
|
-
},
|
|
633
|
+
}, St = E(xt), Pe = ({ transaction: t }) => {
|
|
634
634
|
const { amount: a, description: i, isIncome: r, merchant_guid: o, payee: n, top_level_category_guid: s } = t;
|
|
635
635
|
return /* @__PURE__ */ c(v, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
636
636
|
/* @__PURE__ */ e(
|
|
637
|
-
|
|
637
|
+
Ne,
|
|
638
638
|
{
|
|
639
639
|
categoryGuid: s || "",
|
|
640
640
|
merchantGuid: o || "",
|
|
@@ -642,41 +642,41 @@ const gt = E(({ transaction: t }) => {
|
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
644
|
/* @__PURE__ */ c(v, { overflow: "hidden'", children: [
|
|
645
|
-
/* @__PURE__ */ e(
|
|
646
|
-
/* @__PURE__ */ c(
|
|
645
|
+
/* @__PURE__ */ e(b, { bold: !0, mb: 4, truncate: !0, variant: "body1", children: i || n }),
|
|
646
|
+
/* @__PURE__ */ c(z, { color: r ? "success.main" : "text.primary", truncate: !0, variant: "h1", children: [
|
|
647
647
|
r ? "+" : "",
|
|
648
|
-
|
|
648
|
+
W(a, "0,0.00")
|
|
649
649
|
] })
|
|
650
650
|
] })
|
|
651
651
|
] });
|
|
652
|
-
},
|
|
653
|
-
const { onEvent: a } =
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}, [
|
|
652
|
+
}, At = ({ transaction: t }) => {
|
|
653
|
+
const { onEvent: a } = R(), { updateTransaction: i } = L(), { updateManualTransaction: r } = X(), { common: o, transactions: n } = N(), s = F(), [d, _] = l.useState(!1), [u, g] = l.useState("");
|
|
654
|
+
l.useEffect(() => {
|
|
655
|
+
d && g(t.memo ? t.memo : "");
|
|
656
|
+
}, [d]);
|
|
657
657
|
const p = async () => {
|
|
658
658
|
if (t.is_manual && !t.guid) {
|
|
659
659
|
r({ ...t, memo: u }), _(!1);
|
|
660
660
|
return;
|
|
661
661
|
}
|
|
662
|
-
await i({ ...t, memo: u }), a(
|
|
662
|
+
await i({ ...t, memo: u }), a(K.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), _(!1);
|
|
663
663
|
}, h = s.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
664
|
-
return /* @__PURE__ */ c(
|
|
664
|
+
return /* @__PURE__ */ c(P, { className: "mx-txn-memo-action", disableGutters: !0, disablePadding: !0, children: [
|
|
665
665
|
/* @__PURE__ */ c(
|
|
666
|
-
|
|
666
|
+
V,
|
|
667
667
|
{
|
|
668
668
|
onClick: () => {
|
|
669
|
-
a(
|
|
669
|
+
a(T.ON_TRANSACTION_MEMO_CLICK), _(!0);
|
|
670
670
|
},
|
|
671
671
|
children: [
|
|
672
|
-
/* @__PURE__ */ e(
|
|
672
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: h }, variant: "rounded", children: /* @__PURE__ */ e(O, { name: "article", sx: { color: "text.primary" } }) }) }),
|
|
673
673
|
/* @__PURE__ */ e(
|
|
674
|
-
|
|
674
|
+
G,
|
|
675
675
|
{
|
|
676
676
|
primary: n.memo_title,
|
|
677
677
|
primaryTypographyProps: { variant: "caption" },
|
|
678
678
|
secondary: /* @__PURE__ */ e(
|
|
679
|
-
|
|
679
|
+
b,
|
|
680
680
|
{
|
|
681
681
|
bold: !0,
|
|
682
682
|
sx: { overflowWrap: "break-word", whiteSpace: "wrap", color: "text.primary" },
|
|
@@ -686,15 +686,15 @@ const gt = E(({ transaction: t }) => {
|
|
|
686
686
|
)
|
|
687
687
|
}
|
|
688
688
|
),
|
|
689
|
-
/* @__PURE__ */ e(
|
|
689
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(O, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
690
690
|
]
|
|
691
691
|
}
|
|
692
692
|
),
|
|
693
693
|
/* @__PURE__ */ c(
|
|
694
|
-
|
|
694
|
+
se,
|
|
695
695
|
{
|
|
696
696
|
ariaLabelClose: o.close_aria,
|
|
697
|
-
isOpen:
|
|
697
|
+
isOpen: d,
|
|
698
698
|
onClose: () => _(!1),
|
|
699
699
|
onPrimaryAction: p,
|
|
700
700
|
title: n.memo_title,
|
|
@@ -718,40 +718,40 @@ const gt = E(({ transaction: t }) => {
|
|
|
718
718
|
}
|
|
719
719
|
)
|
|
720
720
|
] });
|
|
721
|
-
}, Nt = E(
|
|
721
|
+
}, Nt = E(At), It = ({
|
|
722
722
|
index: t,
|
|
723
723
|
onDeleteRow: a,
|
|
724
724
|
onCategoryChanged: i,
|
|
725
725
|
onUpdateAmount: r,
|
|
726
726
|
split: o
|
|
727
727
|
}) => {
|
|
728
|
-
const { onEvent: n } =
|
|
728
|
+
const { onEvent: n } = R(), { transactions: s } = N(), [d, _] = l.useState(`${o.amount}`), [u, g] = l.useState(!1), p = t === 0, h = (m) => {
|
|
729
729
|
isNaN(Number(m)) || (_(m), r(t, Number(m)));
|
|
730
730
|
};
|
|
731
|
-
return /* @__PURE__ */ c(
|
|
731
|
+
return /* @__PURE__ */ c($, { bgcolor: "background.paper", className: "mx-txn-split-manager-row", pb: 4, px: 8, children: [
|
|
732
732
|
/* @__PURE__ */ c(xe, { alignItems: p ? "center" : "start", container: !0, children: [
|
|
733
733
|
/* @__PURE__ */ e(xe, { item: !0, xs: 7, children: /* @__PURE__ */ c(v, { alignItems: "start", children: [
|
|
734
734
|
/* @__PURE__ */ e(
|
|
735
|
-
|
|
735
|
+
ie,
|
|
736
736
|
{
|
|
737
737
|
endIcon: /* @__PURE__ */ e(we, {}),
|
|
738
738
|
onClick: () => g(!0),
|
|
739
|
-
startIcon: /* @__PURE__ */ e(
|
|
739
|
+
startIcon: /* @__PURE__ */ e(Ie, { categoryGuid: o.top_level_category_guid }),
|
|
740
740
|
sx: { px: 12, py: 8 },
|
|
741
741
|
children: o.category
|
|
742
742
|
}
|
|
743
743
|
),
|
|
744
|
-
/* @__PURE__ */ e(
|
|
745
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(
|
|
746
|
-
/* @__PURE__ */ e(
|
|
744
|
+
/* @__PURE__ */ e($, { children: !o.category_guid && /* @__PURE__ */ c(v, { color: "error.main", direction: "row", gap: 8, p: 12, children: [
|
|
745
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(ge, { sx: { fontSize: 15 } }) }),
|
|
746
|
+
/* @__PURE__ */ e(b, { variant: "body2", children: s.split_transaction_errors_select_category })
|
|
747
747
|
] }) })
|
|
748
748
|
] }) }),
|
|
749
|
-
/* @__PURE__ */ e(xe, { item: !0, xs: 5, children: p ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(
|
|
749
|
+
/* @__PURE__ */ e(xe, { item: !0, xs: 5, children: p ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(b, { children: W(o.amount, "0,0.00") }) }) : /* @__PURE__ */ c(v, { alignItems: "start", children: [
|
|
750
750
|
/* @__PURE__ */ c(v, { alignItems: "start", direction: "row", gap: 8, children: [
|
|
751
751
|
/* @__PURE__ */ e(
|
|
752
752
|
st,
|
|
753
753
|
{
|
|
754
|
-
amount:
|
|
754
|
+
amount: d,
|
|
755
755
|
ariaLabel: s.split_transaction_edit_split_amount,
|
|
756
756
|
label: s.split_transaction_edit_split_amount,
|
|
757
757
|
minAmount: 0.01,
|
|
@@ -764,21 +764,21 @@ const gt = E(({ transaction: t }) => {
|
|
|
764
764
|
}
|
|
765
765
|
),
|
|
766
766
|
/* @__PURE__ */ e(
|
|
767
|
-
|
|
767
|
+
oe,
|
|
768
768
|
{
|
|
769
769
|
"aria-label": s.split_transaction_delete_split_btn,
|
|
770
770
|
color: "secondary",
|
|
771
771
|
onClick: () => {
|
|
772
|
-
n(
|
|
772
|
+
n(T.ON_TRANSACTION_SPLIT_DELETE_CLICK), a(t);
|
|
773
773
|
},
|
|
774
774
|
sx: { w: 44, h: 44 },
|
|
775
|
-
children: /* @__PURE__ */ e(
|
|
775
|
+
children: /* @__PURE__ */ e(pe, {})
|
|
776
776
|
}
|
|
777
777
|
)
|
|
778
778
|
] }),
|
|
779
|
-
!
|
|
780
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(
|
|
781
|
-
/* @__PURE__ */ e(
|
|
779
|
+
!d && /* @__PURE__ */ c(v, { color: "error.main", direction: "row", gap: 8, py: 12, children: [
|
|
780
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(ge, { sx: { fontSize: 15 } }) }),
|
|
781
|
+
/* @__PURE__ */ e(b, { variant: "body2", children: s.split_transaction_errors_enter_an_amount })
|
|
782
782
|
] })
|
|
783
783
|
] }) })
|
|
784
784
|
] }),
|
|
@@ -803,19 +803,19 @@ const gt = E(({ transaction: t }) => {
|
|
|
803
803
|
splits: o,
|
|
804
804
|
transaction: n
|
|
805
805
|
}) => {
|
|
806
|
-
const { transactions: s } =
|
|
807
|
-
return
|
|
806
|
+
const { transactions: s } = N(), { onEvent: d } = R(), [_, u] = l.useState(""), { announce: g, ariaLive: p } = he();
|
|
807
|
+
return l.useEffect(() => {
|
|
808
808
|
if (o.length <= 1)
|
|
809
809
|
u(s.split_transaction_errors_min_splits), g(s.split_transaction_errors_min_splits);
|
|
810
810
|
else if (o[0].amount < 0) {
|
|
811
811
|
const h = I(
|
|
812
812
|
s.split_transaction_errors_totals_must_equal_amount,
|
|
813
|
-
|
|
813
|
+
W(n.amount, "0,0.00")
|
|
814
814
|
);
|
|
815
815
|
u(h), g(h);
|
|
816
816
|
} else
|
|
817
817
|
u(""), g("");
|
|
818
|
-
}, [o]), /* @__PURE__ */ c(
|
|
818
|
+
}, [o]), /* @__PURE__ */ c($, { className: "mx-txn-split-manager", children: [
|
|
819
819
|
p,
|
|
820
820
|
o.map((h, m) => /* @__PURE__ */ e(
|
|
821
821
|
vt,
|
|
@@ -829,22 +829,22 @@ const gt = E(({ transaction: t }) => {
|
|
|
829
829
|
m
|
|
830
830
|
)),
|
|
831
831
|
_ && /* @__PURE__ */ c(v, { bgcolor: "background.paper", color: "error.main", direction: "row", gap: 8, p: 16, children: [
|
|
832
|
-
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(
|
|
833
|
-
/* @__PURE__ */ e(
|
|
832
|
+
/* @__PURE__ */ e("span", { "aria-label": "error", role: "img", children: /* @__PURE__ */ e(ge, { sx: { fontSize: 15 } }) }),
|
|
833
|
+
/* @__PURE__ */ e(b, { variant: "body2", children: _ })
|
|
834
834
|
] }),
|
|
835
|
-
/* @__PURE__ */ e(
|
|
836
|
-
|
|
835
|
+
/* @__PURE__ */ e($, { p: 16, children: /* @__PURE__ */ e(
|
|
836
|
+
ie,
|
|
837
837
|
{
|
|
838
838
|
"aria-label": s.split_transaction_add_split_btn,
|
|
839
839
|
onClick: () => {
|
|
840
|
-
|
|
840
|
+
d(T.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
|
|
841
841
|
},
|
|
842
842
|
children: s.split_transaction_add_split_btn
|
|
843
843
|
}
|
|
844
844
|
) })
|
|
845
845
|
] });
|
|
846
846
|
}, Dt = E(Et), Ot = ({ transaction: t }) => {
|
|
847
|
-
const { onEvent: a } =
|
|
847
|
+
const { onEvent: a } = R(), { announce: i, ariaLive: r } = he(), { splitTransaction: o, unSplitTransaction: n } = L(), { common: s, transactions: d } = N(), { setShouldDisableDrawerScroll: _ } = X(), { categories: u } = Le(), g = F(), p = {
|
|
848
848
|
...t,
|
|
849
849
|
amount: t.amount - 1,
|
|
850
850
|
guid: "",
|
|
@@ -854,102 +854,109 @@ const gt = E(({ transaction: t }) => {
|
|
|
854
854
|
...t,
|
|
855
855
|
amount: 1,
|
|
856
856
|
category_guid: void 0,
|
|
857
|
-
category:
|
|
857
|
+
category: d.split_transaction_select_category_btn,
|
|
858
858
|
guid: "",
|
|
859
859
|
has_been_split: !1,
|
|
860
860
|
parent_guid: t.guid,
|
|
861
861
|
top_level_category_guid: void 0
|
|
862
|
-
}, [m, f] =
|
|
863
|
-
const
|
|
864
|
-
|
|
862
|
+
}, [m, f] = l.useState(!1), [w, k] = l.useState(!1), [M, x] = l.useState(!1), [S, y] = l.useState([]), J = () => {
|
|
863
|
+
const A = [...S];
|
|
864
|
+
A.push({ ...h }), A[0].amount -= 1, y(A), i(
|
|
865
865
|
I(
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
d.split_transaction_add_split_announcement,
|
|
867
|
+
A.length
|
|
868
868
|
)
|
|
869
869
|
);
|
|
870
|
-
},
|
|
871
|
-
if (
|
|
872
|
-
const
|
|
873
|
-
|
|
874
|
-
I(
|
|
870
|
+
}, ye = (A) => {
|
|
871
|
+
if (A > 0) {
|
|
872
|
+
const D = S[A], C = [...S];
|
|
873
|
+
C.splice(A, 1), C[0].amount += D.amount, y(C), i(
|
|
874
|
+
I(d.split_transaction_delete_split_announcement, A + 1)
|
|
875
875
|
);
|
|
876
876
|
}
|
|
877
|
-
},
|
|
878
|
-
const
|
|
879
|
-
|
|
880
|
-
(
|
|
877
|
+
}, Te = (A, D) => {
|
|
878
|
+
const C = [...S];
|
|
879
|
+
C[A].amount = D, C[0].amount = t.amount - C.reduce(
|
|
880
|
+
(j, Z, ce) => j + (ce !== 0 ? Z.amount : 0),
|
|
881
881
|
0
|
|
882
|
-
),
|
|
883
|
-
},
|
|
884
|
-
const
|
|
885
|
-
|
|
886
|
-
...
|
|
887
|
-
category_guid:
|
|
888
|
-
category:
|
|
889
|
-
top_level_category_guid:
|
|
890
|
-
},
|
|
882
|
+
), y(C);
|
|
883
|
+
}, te = (A, D) => {
|
|
884
|
+
const C = [...S], j = u.find((Z) => Z.guid === D);
|
|
885
|
+
j && (C[A] = {
|
|
886
|
+
...C[A],
|
|
887
|
+
category_guid: D,
|
|
888
|
+
category: j.name,
|
|
889
|
+
top_level_category_guid: j.parent_guid || D
|
|
890
|
+
}, y(C), i(
|
|
891
891
|
I(
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
892
|
+
d.split_transaction_select_category_announcement,
|
|
893
|
+
j.name,
|
|
894
|
+
A + 1
|
|
895
895
|
)
|
|
896
896
|
));
|
|
897
|
-
},
|
|
897
|
+
}, re = () => {
|
|
898
898
|
if (t.parent_guid || t.has_been_split) {
|
|
899
899
|
k(!0);
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
902
|
-
|
|
902
|
+
y([{ ...p }, { ...h }]), a(K.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
903
903
|
transaction_guid: t.guid
|
|
904
904
|
}), f(!0);
|
|
905
|
-
},
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
905
|
+
}, B = async () => {
|
|
906
|
+
if (!M) {
|
|
907
|
+
x(!0);
|
|
908
|
+
try {
|
|
909
|
+
a(T.ON_TRANSACTION_SPLIT_SAVE_CLICK), await o({ ...t, has_been_split: !0 }, S), f(!1);
|
|
910
|
+
} finally {
|
|
911
|
+
x(!1);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}, ne = async () => {
|
|
915
|
+
M || (a(T.ON_TRANSACTION_SPLIT_CANCEL_CLICK), y([{ ...p }, { ...h }]), x(!1), f(!1));
|
|
916
|
+
}, be = async () => {
|
|
917
|
+
a(K.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
911
918
|
transaction_guid: t.guid
|
|
912
919
|
});
|
|
913
|
-
const
|
|
914
|
-
await n(
|
|
915
|
-
},
|
|
916
|
-
const
|
|
917
|
-
return
|
|
918
|
-
}, [
|
|
919
|
-
return /* @__PURE__ */ e(
|
|
920
|
-
/* @__PURE__ */ c(
|
|
921
|
-
/* @__PURE__ */ e(
|
|
920
|
+
const A = t.parent_guid ?? t.guid;
|
|
921
|
+
await n(A);
|
|
922
|
+
}, Q = l.useMemo(() => {
|
|
923
|
+
const A = S.some((C) => !C.category_guid), D = S.some((C) => C.amount <= 0);
|
|
924
|
+
return A || D;
|
|
925
|
+
}, [S]), Ce = g.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
926
|
+
return /* @__PURE__ */ e(l.Fragment, { children: t && /* @__PURE__ */ c(P, { disableGutters: !0, disablePadding: !0, children: [
|
|
927
|
+
/* @__PURE__ */ c(V, { onClick: re, children: [
|
|
928
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: Ce }, variant: "rounded", children: /* @__PURE__ */ e(O, { name: "call_split", sx: { color: "text.primary" } }) }) }),
|
|
922
929
|
/* @__PURE__ */ e(
|
|
923
|
-
|
|
930
|
+
G,
|
|
924
931
|
{
|
|
925
|
-
primary: t.has_been_split || t.parent_guid ?
|
|
926
|
-
secondary: t.has_been_split || t.parent_guid ?
|
|
932
|
+
primary: t.has_been_split || t.parent_guid ? d.split_transaction_unsplit_title : d.split_transaction_title,
|
|
933
|
+
secondary: t.has_been_split || t.parent_guid ? d.split_transaction_unsplit_subtitle : d.split_transaction_desc
|
|
927
934
|
}
|
|
928
935
|
),
|
|
929
|
-
/* @__PURE__ */ e(
|
|
936
|
+
/* @__PURE__ */ e(Y, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(O, { name: "delete" }) : /* @__PURE__ */ e(O, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
930
937
|
] }),
|
|
931
938
|
/* @__PURE__ */ c(
|
|
932
|
-
|
|
939
|
+
se,
|
|
933
940
|
{
|
|
934
941
|
ariaLabelClose: s.close_aria,
|
|
935
942
|
isOpen: m,
|
|
936
|
-
isPrimaryDisabled:
|
|
937
|
-
onClose:
|
|
938
|
-
onPrimaryAction:
|
|
943
|
+
isPrimaryDisabled: Q || M,
|
|
944
|
+
onClose: ne,
|
|
945
|
+
onPrimaryAction: B,
|
|
939
946
|
primaryText: s.save_button,
|
|
940
947
|
secondaryText: s.cancel_button,
|
|
941
|
-
title:
|
|
948
|
+
title: d.split_transaction_title,
|
|
942
949
|
children: [
|
|
943
950
|
r,
|
|
944
951
|
/* @__PURE__ */ e(Pe, { transaction: t }),
|
|
945
952
|
/* @__PURE__ */ e(
|
|
946
953
|
Dt,
|
|
947
954
|
{
|
|
948
|
-
onAddSplit:
|
|
949
|
-
onCategoryChanged:
|
|
950
|
-
onDeleteSplit:
|
|
951
|
-
onUpdateAmount:
|
|
952
|
-
splits:
|
|
955
|
+
onAddSplit: J,
|
|
956
|
+
onCategoryChanged: te,
|
|
957
|
+
onDeleteSplit: ye,
|
|
958
|
+
onUpdateAmount: Te,
|
|
959
|
+
splits: S,
|
|
953
960
|
transaction: t
|
|
954
961
|
}
|
|
955
962
|
)
|
|
@@ -957,41 +964,41 @@ const gt = E(({ transaction: t }) => {
|
|
|
957
964
|
}
|
|
958
965
|
),
|
|
959
966
|
/* @__PURE__ */ e(
|
|
960
|
-
|
|
967
|
+
q,
|
|
961
968
|
{
|
|
962
|
-
copy: { title:
|
|
963
|
-
isOpen:
|
|
969
|
+
copy: { title: d.split_transaction_unsplit_title },
|
|
970
|
+
isOpen: w,
|
|
964
971
|
onClose: () => {
|
|
965
972
|
_(!1), k(!1);
|
|
966
973
|
},
|
|
967
|
-
onPrimaryAction:
|
|
974
|
+
onPrimaryAction: be,
|
|
968
975
|
onSecondaryAction: () => {
|
|
969
|
-
a(
|
|
976
|
+
a(T.ON_TRANSACTION_UNSPLIT_CANCEL);
|
|
970
977
|
},
|
|
971
978
|
primaryText: s.delete_button,
|
|
972
979
|
secondaryText: s.cancel_button,
|
|
973
|
-
children: /* @__PURE__ */ e(
|
|
974
|
-
|
|
980
|
+
children: /* @__PURE__ */ e(z, { variant: "subtitle1", children: I(
|
|
981
|
+
d.split_transaction_unsplit_description,
|
|
975
982
|
t.description
|
|
976
983
|
) })
|
|
977
984
|
}
|
|
978
985
|
)
|
|
979
986
|
] }) });
|
|
980
987
|
}, Lt = E(Ot), wt = () => {
|
|
981
|
-
const t = rt(), { onEvent: a } =
|
|
982
|
-
|
|
988
|
+
const t = rt(), { onEvent: a } = R(), { addTag: i } = L(), { transactions: r } = N(), [o, n] = l.useState(!1), [s, d] = l.useState(""), [_, u] = l.useState(""), g = l.useRef(null);
|
|
989
|
+
l.useEffect(() => {
|
|
983
990
|
o && g?.current?.focus();
|
|
984
991
|
}, [o]);
|
|
985
992
|
const p = () => {
|
|
986
993
|
a(
|
|
987
|
-
o ?
|
|
988
|
-
), o ||
|
|
994
|
+
o ? T.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : T.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
995
|
+
), o || d(""), n(!o);
|
|
989
996
|
}, h = async () => {
|
|
990
|
-
a(
|
|
997
|
+
a(T.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), n(!1);
|
|
991
998
|
};
|
|
992
|
-
return
|
|
999
|
+
return l.useEffect(() => {
|
|
993
1000
|
u(s.length > 40 ? r.tags_error_name_must_be_40_chars : "");
|
|
994
|
-
}, [s]), /* @__PURE__ */ c(
|
|
1001
|
+
}, [s]), /* @__PURE__ */ c($, { className: "mx-txn-tag-manager-header", children: [
|
|
995
1002
|
/* @__PURE__ */ c(
|
|
996
1003
|
v,
|
|
997
1004
|
{
|
|
@@ -1002,9 +1009,9 @@ const gt = E(({ transaction: t }) => {
|
|
|
1002
1009
|
px: 24,
|
|
1003
1010
|
py: 16,
|
|
1004
1011
|
children: [
|
|
1005
|
-
/* @__PURE__ */ e(
|
|
1012
|
+
/* @__PURE__ */ e(b, { bold: !0, children: r.tags_your_tags }),
|
|
1006
1013
|
/* @__PURE__ */ e(
|
|
1007
|
-
|
|
1014
|
+
ie,
|
|
1008
1015
|
{
|
|
1009
1016
|
"aria-expanded": o,
|
|
1010
1017
|
"aria-label": r.tags_add_tag_btn_aria,
|
|
@@ -1016,7 +1023,7 @@ const gt = E(({ transaction: t }) => {
|
|
|
1016
1023
|
}
|
|
1017
1024
|
),
|
|
1018
1025
|
/* @__PURE__ */ c(
|
|
1019
|
-
|
|
1026
|
+
q,
|
|
1020
1027
|
{
|
|
1021
1028
|
copy: { title: r.tags_add_tag_btn },
|
|
1022
1029
|
isOpen: o,
|
|
@@ -1025,32 +1032,32 @@ const gt = E(({ transaction: t }) => {
|
|
|
1025
1032
|
onSecondaryAction: () => n(!1),
|
|
1026
1033
|
children: [
|
|
1027
1034
|
/* @__PURE__ */ e(
|
|
1028
|
-
|
|
1035
|
+
ve,
|
|
1029
1036
|
{
|
|
1030
1037
|
"aria-label": r.tags_placeholder,
|
|
1031
1038
|
name: "add-tag",
|
|
1032
|
-
onChange: (m) =>
|
|
1039
|
+
onChange: (m) => d(m.target.value),
|
|
1033
1040
|
placeholder: r.tags_placeholder,
|
|
1034
1041
|
sx: { width: "100%" },
|
|
1035
1042
|
value: s
|
|
1036
1043
|
}
|
|
1037
1044
|
),
|
|
1038
|
-
/* @__PURE__ */ e(
|
|
1045
|
+
/* @__PURE__ */ e(z, { id: "add-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: _ })
|
|
1039
1046
|
]
|
|
1040
1047
|
}
|
|
1041
1048
|
)
|
|
1042
1049
|
] });
|
|
1043
1050
|
}, Rt = E(wt), Mt = ({ onSearchValueChanged: t, searchValue: a }) => {
|
|
1044
|
-
const { common: i, transactions: r } =
|
|
1045
|
-
|
|
1051
|
+
const { common: i, transactions: r } = N(), o = /* @__PURE__ */ e(
|
|
1052
|
+
oe,
|
|
1046
1053
|
{
|
|
1047
1054
|
"aria-label": r.tags_cancel_search || "Search",
|
|
1048
1055
|
onClick: () => t(""),
|
|
1049
|
-
children: /* @__PURE__ */ e(
|
|
1056
|
+
children: /* @__PURE__ */ e(ge, {})
|
|
1050
1057
|
}
|
|
1051
1058
|
);
|
|
1052
|
-
return /* @__PURE__ */ e(
|
|
1053
|
-
|
|
1059
|
+
return /* @__PURE__ */ e($, { className: "mx-txn-tag-manager-search", px: 24, py: 16, children: /* @__PURE__ */ e(
|
|
1060
|
+
ve,
|
|
1054
1061
|
{
|
|
1055
1062
|
InputProps: {
|
|
1056
1063
|
startAdornment: /* @__PURE__ */ e(Ee, { position: "start", children: /* @__PURE__ */ e(Xe, { color: "disabled" }) }),
|
|
@@ -1065,54 +1072,54 @@ const gt = E(({ transaction: t }) => {
|
|
|
1065
1072
|
}
|
|
1066
1073
|
) });
|
|
1067
1074
|
}, kt = E(Mt), Pt = ({ onTagChecked: t, selectedTags: a, tag: i }) => {
|
|
1068
|
-
const { onEvent: r } =
|
|
1069
|
-
r(
|
|
1070
|
-
},
|
|
1071
|
-
r(
|
|
1075
|
+
const { onEvent: r } = R(), { removeTag: o, updateTag: n } = L(), { common: s, transactions: d } = N(), [_, u] = l.useState(!1), [g, p] = l.useState(!1), [h, m] = l.useState(""), [f, w] = l.useState(""), k = async () => {
|
|
1076
|
+
r(T.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await n({ ...i, name: h }), u(!1);
|
|
1077
|
+
}, M = async () => {
|
|
1078
|
+
r(T.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), p(!1);
|
|
1072
1079
|
};
|
|
1073
|
-
|
|
1074
|
-
|
|
1080
|
+
l.useEffect(() => {
|
|
1081
|
+
w(h.length > 40 ? d.tags_error_name_must_be_40_chars : "");
|
|
1075
1082
|
}, [h]);
|
|
1076
|
-
const
|
|
1077
|
-
r(
|
|
1078
|
-
},
|
|
1079
|
-
r(
|
|
1083
|
+
const x = () => {
|
|
1084
|
+
r(T.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), m(i.name), u(!0);
|
|
1085
|
+
}, S = () => {
|
|
1086
|
+
r(T.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
|
|
1080
1087
|
};
|
|
1081
1088
|
return /* @__PURE__ */ c(
|
|
1082
|
-
|
|
1089
|
+
P,
|
|
1083
1090
|
{
|
|
1084
1091
|
className: "mx-txn-transaction-manager-row",
|
|
1085
1092
|
disableGutters: !0,
|
|
1086
1093
|
disablePadding: !0,
|
|
1087
1094
|
secondaryAction: !i.is_default_tag && /* @__PURE__ */ c(v, { direction: "row", children: [
|
|
1088
1095
|
/* @__PURE__ */ e(
|
|
1089
|
-
|
|
1096
|
+
oe,
|
|
1090
1097
|
{
|
|
1091
1098
|
"aria-label": `Edit ${i.name} tag`,
|
|
1092
1099
|
color: "secondary",
|
|
1093
|
-
onClick:
|
|
1100
|
+
onClick: x,
|
|
1094
1101
|
children: /* @__PURE__ */ e(Je, { color: "secondary" })
|
|
1095
1102
|
}
|
|
1096
1103
|
),
|
|
1097
1104
|
/* @__PURE__ */ e(
|
|
1098
|
-
|
|
1105
|
+
oe,
|
|
1099
1106
|
{
|
|
1100
1107
|
"aria-label": `Delete ${i.name} tag`,
|
|
1101
1108
|
color: "secondary",
|
|
1102
|
-
onClick:
|
|
1103
|
-
children: /* @__PURE__ */ e(
|
|
1109
|
+
onClick: S,
|
|
1110
|
+
children: /* @__PURE__ */ e(pe, { color: "secondary" })
|
|
1104
1111
|
}
|
|
1105
1112
|
)
|
|
1106
1113
|
] }),
|
|
1107
1114
|
children: [
|
|
1108
1115
|
/* @__PURE__ */ c(
|
|
1109
|
-
|
|
1116
|
+
V,
|
|
1110
1117
|
{
|
|
1111
1118
|
"aria-checked": a.includes(i.guid),
|
|
1112
1119
|
onClick: () => t(i.guid),
|
|
1113
1120
|
role: "checkbox",
|
|
1114
1121
|
children: [
|
|
1115
|
-
/* @__PURE__ */ e(
|
|
1122
|
+
/* @__PURE__ */ e(Y, { sx: { ml: 0 }, children: /* @__PURE__ */ e(
|
|
1116
1123
|
nt,
|
|
1117
1124
|
{
|
|
1118
1125
|
"aria-hidden": !0,
|
|
@@ -1121,12 +1128,12 @@ const gt = E(({ transaction: t }) => {
|
|
|
1121
1128
|
tabIndex: -1
|
|
1122
1129
|
}
|
|
1123
1130
|
) }),
|
|
1124
|
-
/* @__PURE__ */ e(
|
|
1131
|
+
/* @__PURE__ */ e(G, { children: i.name })
|
|
1125
1132
|
]
|
|
1126
1133
|
}
|
|
1127
1134
|
),
|
|
1128
1135
|
/* @__PURE__ */ c(
|
|
1129
|
-
|
|
1136
|
+
q,
|
|
1130
1137
|
{
|
|
1131
1138
|
copy: { title: "Update tag name" },
|
|
1132
1139
|
isOpen: _,
|
|
@@ -1135,39 +1142,39 @@ const gt = E(({ transaction: t }) => {
|
|
|
1135
1142
|
onSecondaryAction: () => u(!1),
|
|
1136
1143
|
children: [
|
|
1137
1144
|
/* @__PURE__ */ e(
|
|
1138
|
-
|
|
1145
|
+
ve,
|
|
1139
1146
|
{
|
|
1140
1147
|
"aria-describedby": f ? "update-tag-error" : void 0,
|
|
1141
|
-
"aria-label":
|
|
1148
|
+
"aria-label": d.tags_update_the_tag_name,
|
|
1142
1149
|
name: "update-tag",
|
|
1143
|
-
onChange: (
|
|
1150
|
+
onChange: (y) => m(y.target.value),
|
|
1144
1151
|
placeholder: "Tag name",
|
|
1145
1152
|
sx: { width: "100%" },
|
|
1146
1153
|
value: h
|
|
1147
1154
|
}
|
|
1148
1155
|
),
|
|
1149
|
-
/* @__PURE__ */ e(
|
|
1156
|
+
/* @__PURE__ */ e(z, { id: "update-tag-error", sx: { color: "error.main" }, variant: "subtitle2", children: f })
|
|
1150
1157
|
]
|
|
1151
1158
|
}
|
|
1152
1159
|
),
|
|
1153
1160
|
/* @__PURE__ */ e(
|
|
1154
|
-
|
|
1161
|
+
q,
|
|
1155
1162
|
{
|
|
1156
|
-
copy: { title:
|
|
1163
|
+
copy: { title: d.tags_delete_title },
|
|
1157
1164
|
isOpen: g,
|
|
1158
1165
|
onClose: () => p(!1),
|
|
1159
|
-
onPrimaryAction:
|
|
1160
|
-
onSecondaryAction: () => r(
|
|
1166
|
+
onPrimaryAction: M,
|
|
1167
|
+
onSecondaryAction: () => r(T.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1161
1168
|
primaryText: s.delete_button,
|
|
1162
1169
|
secondaryText: s.cancel_button,
|
|
1163
|
-
children: /* @__PURE__ */ e(
|
|
1170
|
+
children: /* @__PURE__ */ e(b, { truncate: !1, children: d.tags_deleting_this_tag_will_remove_it })
|
|
1164
1171
|
}
|
|
1165
1172
|
)
|
|
1166
1173
|
]
|
|
1167
1174
|
}
|
|
1168
1175
|
);
|
|
1169
1176
|
}, Gt = E(Pt), Bt = ({ selectedTags: t, onTagChecked: a }) => {
|
|
1170
|
-
const { tags: i } =
|
|
1177
|
+
const { tags: i } = L(), [r, o] = l.useState(""), n = i.filter(
|
|
1171
1178
|
(s) => s.name.toLowerCase().includes(r.toLowerCase())
|
|
1172
1179
|
);
|
|
1173
1180
|
return /* @__PURE__ */ c("div", { className: "mx-txn-tag-manager", children: [
|
|
@@ -1179,54 +1186,54 @@ const gt = E(({ transaction: t }) => {
|
|
|
1179
1186
|
}
|
|
1180
1187
|
),
|
|
1181
1188
|
/* @__PURE__ */ e(Rt, {}),
|
|
1182
|
-
/* @__PURE__ */ e(
|
|
1189
|
+
/* @__PURE__ */ e(de, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(me, { children: n.map((s) => /* @__PURE__ */ c(l.Fragment, { children: [
|
|
1183
1190
|
/* @__PURE__ */ e(Gt, { onTagChecked: a, selectedTags: t, tag: s }),
|
|
1184
|
-
/* @__PURE__ */ e(
|
|
1191
|
+
/* @__PURE__ */ e(_e, { sx: { ml: 24 } })
|
|
1185
1192
|
] }, s.guid)) }) })
|
|
1186
1193
|
] });
|
|
1187
1194
|
}, $t = E(Bt), Kt = ({ transaction: t }) => {
|
|
1188
|
-
const { onEvent: a } =
|
|
1189
|
-
|
|
1195
|
+
const { onEvent: a } = R(), { tags: i, updateTaggings: r, updateTransaction: o } = L(), { common: n, transactions: s } = N(), { updateManualTransaction: d } = X(), _ = F(), [u, g] = l.useState(!1), [p, h] = l.useState(t.tags);
|
|
1196
|
+
l.useEffect(() => {
|
|
1190
1197
|
h(t.tags);
|
|
1191
1198
|
}, [u, t]);
|
|
1192
|
-
const m = (
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1199
|
+
const m = (M) => {
|
|
1200
|
+
const x = [...p], S = p.indexOf(M);
|
|
1201
|
+
S >= 0 ? x.splice(S, 1) : x.push(M), h(x);
|
|
1195
1202
|
}, f = async () => {
|
|
1196
1203
|
if (t.is_manual && !t.guid) {
|
|
1197
|
-
|
|
1204
|
+
d({ ...t, tags: p }), g(!1);
|
|
1198
1205
|
return;
|
|
1199
1206
|
}
|
|
1200
|
-
await r(p, t.guid), await o({ ...t, tags: p }), a(
|
|
1201
|
-
},
|
|
1207
|
+
await r(p, t.guid), await o({ ...t, tags: p }), a(K.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), g(!1);
|
|
1208
|
+
}, w = l.useMemo(
|
|
1202
1209
|
() => t.tags.map(
|
|
1203
|
-
(
|
|
1210
|
+
(M, x, S) => `${i.find((y) => y.guid === M)?.name}${x < S.length - 1 ? " / " : ""}`
|
|
1204
1211
|
),
|
|
1205
1212
|
[i, t]
|
|
1206
1213
|
), k = _.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1207
|
-
return /* @__PURE__ */ c(
|
|
1214
|
+
return /* @__PURE__ */ c(P, { disableGutters: !0, disablePadding: !0, children: [
|
|
1208
1215
|
/* @__PURE__ */ c(
|
|
1209
|
-
|
|
1216
|
+
V,
|
|
1210
1217
|
{
|
|
1211
1218
|
onClick: () => {
|
|
1212
|
-
a(
|
|
1219
|
+
a(T.ON_TRANSACTION_TAGS_CLICK), g(!0);
|
|
1213
1220
|
},
|
|
1214
1221
|
children: [
|
|
1215
|
-
/* @__PURE__ */ e(
|
|
1222
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: k }, variant: "rounded", children: /* @__PURE__ */ e(O, { name: "local_offer", sx: { color: "text.primary" } }) }) }),
|
|
1216
1223
|
/* @__PURE__ */ e(
|
|
1217
|
-
|
|
1224
|
+
G,
|
|
1218
1225
|
{
|
|
1219
1226
|
primary: s.tags_title,
|
|
1220
1227
|
primaryTypographyProps: { variant: "caption" },
|
|
1221
|
-
secondary: /* @__PURE__ */ e(
|
|
1228
|
+
secondary: /* @__PURE__ */ e(b, { bold: !0, sx: { color: "text.primary" }, variant: "body1", children: t.tags?.length > 0 ? w : s.tags_desc })
|
|
1222
1229
|
}
|
|
1223
1230
|
),
|
|
1224
|
-
/* @__PURE__ */ e(
|
|
1231
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(O, { name: "chevron_right", sx: { color: "text.primary" } }) })
|
|
1225
1232
|
]
|
|
1226
1233
|
}
|
|
1227
1234
|
),
|
|
1228
1235
|
/* @__PURE__ */ e(
|
|
1229
|
-
|
|
1236
|
+
se,
|
|
1230
1237
|
{
|
|
1231
1238
|
ariaLabelClose: n.close_aria,
|
|
1232
1239
|
isOpen: u,
|
|
@@ -1240,19 +1247,19 @@ const gt = E(({ transaction: t }) => {
|
|
|
1240
1247
|
)
|
|
1241
1248
|
] });
|
|
1242
1249
|
}, Ft = E(Kt), Ht = ({ transaction: t, viewOnly: a = !1 }) => {
|
|
1243
|
-
const { updateTransaction: i } =
|
|
1244
|
-
|
|
1250
|
+
const { updateTransaction: i } = L(), { common: r, transactions: o } = N(), { onEvent: n } = R(), { announce: s, ariaLive: d } = he(), [_, u] = l.useState(!1), [g, p] = l.useState(""), h = l.useRef(null);
|
|
1251
|
+
l.useEffect(() => {
|
|
1245
1252
|
_ && (p(t.description), h?.current?.focus());
|
|
1246
1253
|
}, [_]);
|
|
1247
1254
|
const m = () => {
|
|
1248
|
-
u(!0), n(
|
|
1255
|
+
u(!0), n(T.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK), setTimeout(() => document.getElementById("transaction-description-input")?.focus(), 0);
|
|
1249
1256
|
}, f = async () => {
|
|
1250
|
-
n(
|
|
1257
|
+
n(K.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1251
1258
|
transaction_guid: t.guid
|
|
1252
1259
|
}), await i({ ...t, description: g }), u(!1), s(`${o.payee_title}: ${g}`), setTimeout(() => document.getElementById("transaction-description-edit-button")?.focus(), 0);
|
|
1253
1260
|
};
|
|
1254
|
-
return /* @__PURE__ */ c(
|
|
1255
|
-
|
|
1261
|
+
return /* @__PURE__ */ c($, { className: "mx-txn-transaction-description", children: [
|
|
1262
|
+
d,
|
|
1256
1263
|
_ ? /* @__PURE__ */ c(Ve, { row: !0, children: [
|
|
1257
1264
|
/* @__PURE__ */ e(
|
|
1258
1265
|
Oe,
|
|
@@ -1262,7 +1269,7 @@ const gt = E(({ transaction: t }) => {
|
|
|
1262
1269
|
inputProps: { maxLength: 140 },
|
|
1263
1270
|
label: o.payee_title,
|
|
1264
1271
|
name: o.payee_title,
|
|
1265
|
-
onChange: (
|
|
1272
|
+
onChange: (w) => p(w.target.value),
|
|
1266
1273
|
ref: h,
|
|
1267
1274
|
sx: {
|
|
1268
1275
|
backgroundColor: "background.paper",
|
|
@@ -1274,7 +1281,7 @@ const gt = E(({ transaction: t }) => {
|
|
|
1274
1281
|
}
|
|
1275
1282
|
),
|
|
1276
1283
|
/* @__PURE__ */ e(
|
|
1277
|
-
|
|
1284
|
+
ie,
|
|
1278
1285
|
{
|
|
1279
1286
|
disabled: !g,
|
|
1280
1287
|
onClick: f,
|
|
@@ -1287,22 +1294,22 @@ const gt = E(({ transaction: t }) => {
|
|
|
1287
1294
|
}
|
|
1288
1295
|
)
|
|
1289
1296
|
] }) : /* @__PURE__ */ c(v, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1290
|
-
/* @__PURE__ */ e(
|
|
1297
|
+
/* @__PURE__ */ e(b, { bold: !0, children: t.description }),
|
|
1291
1298
|
!a && /* @__PURE__ */ e(
|
|
1292
|
-
|
|
1299
|
+
oe,
|
|
1293
1300
|
{
|
|
1294
1301
|
"aria-label": o.payee_edit,
|
|
1295
1302
|
id: "transaction-description-edit-button",
|
|
1296
1303
|
onClick: m,
|
|
1297
1304
|
sx: { color: "action.active" },
|
|
1298
|
-
children: /* @__PURE__ */ e(
|
|
1305
|
+
children: /* @__PURE__ */ e(ue, { name: "create", size: 22 })
|
|
1299
1306
|
}
|
|
1300
1307
|
)
|
|
1301
1308
|
] })
|
|
1302
1309
|
] });
|
|
1303
1310
|
}, Ut = E(Ht), Vt = ({ transaction: t }) => {
|
|
1304
|
-
const { updateTransaction: a } =
|
|
1305
|
-
r(
|
|
1311
|
+
const { updateTransaction: a } = L(), { transactions: i } = N(), { onEvent: r } = R(), o = F(), n = o.palette.mode === "dark", s = async () => {
|
|
1312
|
+
r(K.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await a({ ...t, is_flagged: !t.is_flagged });
|
|
1306
1313
|
};
|
|
1307
1314
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1308
1315
|
qe,
|
|
@@ -1317,26 +1324,26 @@ const gt = E(({ transaction: t }) => {
|
|
|
1317
1324
|
color: n ? "common.white" : "secondary.main",
|
|
1318
1325
|
"&.Mui-selected": {
|
|
1319
1326
|
color: n ? "primary.main" : "common.white",
|
|
1320
|
-
backgroundColor: n ?
|
|
1327
|
+
backgroundColor: n ? fe(o.palette.primary.main, 0.25) : "warning.dark",
|
|
1321
1328
|
":hover": {
|
|
1322
1329
|
color: n ? "primary.main" : "common.white",
|
|
1323
|
-
backgroundColor: n ?
|
|
1330
|
+
backgroundColor: n ? fe(o.palette.primary.main, 0.2) : "warning.main"
|
|
1324
1331
|
}
|
|
1325
1332
|
},
|
|
1326
1333
|
":hover": {
|
|
1327
1334
|
color: n ? "common.white" : "warning.contrastText",
|
|
1328
|
-
backgroundColor: n ?
|
|
1335
|
+
backgroundColor: n ? fe(o.palette.primary.main, 0.2) : "warning.light"
|
|
1329
1336
|
}
|
|
1330
1337
|
},
|
|
1331
1338
|
value: "flagged",
|
|
1332
1339
|
children: /* @__PURE__ */ e(Qe, { color: "inherit" })
|
|
1333
1340
|
}
|
|
1334
1341
|
) });
|
|
1335
|
-
}, Yt = E(Vt),
|
|
1336
|
-
/* @__PURE__ */ c(
|
|
1337
|
-
/* @__PURE__ */ e(
|
|
1342
|
+
}, Yt = E(Vt), le = (t, a, i, r = !0, o = "inset") => r ? /* @__PURE__ */ c(l.Fragment, { children: [
|
|
1343
|
+
/* @__PURE__ */ c(P, { disableGutters: !0, disablePadding: !0, children: [
|
|
1344
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(H, { sx: { bgcolor: "neutral.light" }, variant: "rounded", children: t }) }),
|
|
1338
1345
|
/* @__PURE__ */ e(
|
|
1339
|
-
|
|
1346
|
+
G,
|
|
1340
1347
|
{
|
|
1341
1348
|
primary: a,
|
|
1342
1349
|
primaryTypographyProps: { variant: "caption" },
|
|
@@ -1344,16 +1351,16 @@ const gt = E(({ transaction: t }) => {
|
|
|
1344
1351
|
}
|
|
1345
1352
|
)
|
|
1346
1353
|
] }),
|
|
1347
|
-
/* @__PURE__ */ e(
|
|
1354
|
+
/* @__PURE__ */ e(_e, { variant: o })
|
|
1348
1355
|
] }) : null, zt = ({ transaction: t }) => {
|
|
1349
|
-
const { transactions: a } =
|
|
1356
|
+
const { transactions: a } = N(), { tags: i } = L(), r = l.useMemo(() => {
|
|
1350
1357
|
const o = new Map(i.map((n) => [n.guid, n.name]));
|
|
1351
1358
|
return t.tags.map((n) => o.get(n)).filter(Boolean).join(" / ");
|
|
1352
1359
|
}, [i, t.tags]);
|
|
1353
|
-
return /* @__PURE__ */ c(
|
|
1354
|
-
|
|
1360
|
+
return /* @__PURE__ */ c(me, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1361
|
+
le(
|
|
1355
1362
|
/* @__PURE__ */ e(
|
|
1356
|
-
|
|
1363
|
+
Ie,
|
|
1357
1364
|
{
|
|
1358
1365
|
categoryGuid: t.top_level_category_guid,
|
|
1359
1366
|
size: 24,
|
|
@@ -1362,24 +1369,24 @@ const gt = E(({ transaction: t }) => {
|
|
|
1362
1369
|
}
|
|
1363
1370
|
),
|
|
1364
1371
|
a.category_title,
|
|
1365
|
-
/* @__PURE__ */ e(
|
|
1372
|
+
/* @__PURE__ */ e(b, { bold: !0, variant: "body1", children: t.category ?? a.actions_select_a_category })
|
|
1366
1373
|
),
|
|
1367
|
-
|
|
1368
|
-
/* @__PURE__ */ e(
|
|
1374
|
+
le(
|
|
1375
|
+
/* @__PURE__ */ e(ue, { name: "calendar_month", sx: { color: "text.primary" } }),
|
|
1369
1376
|
a.date_title,
|
|
1370
|
-
/* @__PURE__ */ e(
|
|
1377
|
+
/* @__PURE__ */ e(b, { bold: !0, variant: "body1", children: Re(Se(t.date), Me.YEAR_MONTH_DAY) })
|
|
1371
1378
|
),
|
|
1372
|
-
|
|
1373
|
-
/* @__PURE__ */ e(
|
|
1379
|
+
le(
|
|
1380
|
+
/* @__PURE__ */ e(ue, { name: "article", sx: { color: "text.primary" } }),
|
|
1374
1381
|
a.memo_title,
|
|
1375
|
-
/* @__PURE__ */ e(
|
|
1382
|
+
/* @__PURE__ */ e(b, { bold: !0, sx: { overflowWrap: "break-word", whiteSpace: "wrap" }, variant: "body1", children: t.memo ?? a.memo_desc }),
|
|
1376
1383
|
!!t.memo,
|
|
1377
1384
|
t.tags?.length > 0 ? "inset" : "fullWidth"
|
|
1378
1385
|
),
|
|
1379
|
-
|
|
1380
|
-
/* @__PURE__ */ e(
|
|
1386
|
+
le(
|
|
1387
|
+
/* @__PURE__ */ e(ue, { name: "local_offer", sx: { color: "text.primary" } }),
|
|
1381
1388
|
a.tags_title,
|
|
1382
|
-
/* @__PURE__ */ e(
|
|
1389
|
+
/* @__PURE__ */ e(b, { bold: !0, variant: "body1", children: t.tags?.length ? r : a.tags_desc }),
|
|
1383
1390
|
!!t.tags?.length,
|
|
1384
1391
|
"fullWidth"
|
|
1385
1392
|
)
|
|
@@ -1390,19 +1397,19 @@ const gt = E(({ transaction: t }) => {
|
|
|
1390
1397
|
topActions: i = dt,
|
|
1391
1398
|
transaction: r
|
|
1392
1399
|
}) => {
|
|
1393
|
-
const { onEvent: o } =
|
|
1394
|
-
|
|
1395
|
-
() => o(
|
|
1400
|
+
const { onEvent: o } = R(), { isCopyLoaded: n } = We(), { userFeatures: s } = je(), { accounts: d } = N(), _ = F(), u = r?.number && r.number.length > 4;
|
|
1401
|
+
l.useEffect(
|
|
1402
|
+
() => o(K.TRANSACTION_DETAILS_VIEW, { transaction_guid: r.guid }),
|
|
1396
1403
|
[]
|
|
1397
1404
|
);
|
|
1398
|
-
const g = t.includes(
|
|
1405
|
+
const g = t.includes(ee.MerchantBudget) && !r?.merchant_guid ? t.filter((m) => m !== ee.MerchantBudget) : t;
|
|
1399
1406
|
if (!n)
|
|
1400
1407
|
return /* @__PURE__ */ e(lt, {});
|
|
1401
1408
|
const p = Ue(s, "MX_TXN_DETAILS_VIEW_ONLY"), h = _.palette.mode === "dark" ? "grey.800" : "grey.100";
|
|
1402
|
-
return /* @__PURE__ */ e(
|
|
1409
|
+
return /* @__PURE__ */ e($, { className: "mx-txn-transaction-details", width: "100%", children: r && /* @__PURE__ */ c(v, { children: [
|
|
1403
1410
|
/* @__PURE__ */ c(v, { gap: 12, p: 24, children: [
|
|
1404
|
-
/* @__PURE__ */ e(
|
|
1405
|
-
|
|
1411
|
+
/* @__PURE__ */ e(de, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1412
|
+
Ne,
|
|
1406
1413
|
{
|
|
1407
1414
|
categoryGuid: r.top_level_category_guid || "",
|
|
1408
1415
|
merchantGuid: r.merchant_guid || "",
|
|
@@ -1411,41 +1418,41 @@ const gt = E(({ transaction: t }) => {
|
|
|
1411
1418
|
) }),
|
|
1412
1419
|
/* @__PURE__ */ e(Ut, { transaction: r, viewOnly: p }),
|
|
1413
1420
|
/* @__PURE__ */ c(v, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1414
|
-
/* @__PURE__ */ c(
|
|
1421
|
+
/* @__PURE__ */ c(z, { color: r.isIncome ? "success.main" : "text.primary", variant: "h1", children: [
|
|
1415
1422
|
r.isIncome ? "+" : "",
|
|
1416
|
-
|
|
1423
|
+
W(r.amount, "0,0.00")
|
|
1417
1424
|
] }),
|
|
1418
1425
|
!p && a && /* @__PURE__ */ e(Yt, { transaction: r })
|
|
1419
1426
|
] }),
|
|
1420
1427
|
/* @__PURE__ */ c(v, { sx: { bgcolor: h, borderRadius: "4px", gap: 4, p: 8 }, children: [
|
|
1421
|
-
/* @__PURE__ */ e(
|
|
1428
|
+
/* @__PURE__ */ e(b, { bold: !0, children: `${r.account}
|
|
1422
1429
|
${u ? r.number : "•".repeat(4).concat(r.number ?? "")}` }),
|
|
1423
|
-
/* @__PURE__ */ e(
|
|
1430
|
+
/* @__PURE__ */ e(b, { bold: !0, variant: "tiny", children: r.feed_description })
|
|
1424
1431
|
] })
|
|
1425
1432
|
] }),
|
|
1426
|
-
/* @__PURE__ */ e(
|
|
1427
|
-
m ===
|
|
1428
|
-
m ===
|
|
1429
|
-
m ===
|
|
1430
|
-
m ===
|
|
1433
|
+
/* @__PURE__ */ e(de, { square: !0, sx: { boxShadow: "none" }, children: p ? /* @__PURE__ */ e(Wt, { transaction: r }) : /* @__PURE__ */ e(me, { children: i.map((m, f) => /* @__PURE__ */ c(l.Fragment, { children: [
|
|
1434
|
+
m === ae.Category && /* @__PURE__ */ e(ht, { transaction: r }),
|
|
1435
|
+
m === ae.Date && /* @__PURE__ */ e(yt, { transaction: r }),
|
|
1436
|
+
m === ae.Memo && /* @__PURE__ */ e(Nt, { transaction: r }),
|
|
1437
|
+
m === ae.Tags && /* @__PURE__ */ e(Ft, { transaction: r }),
|
|
1431
1438
|
/* @__PURE__ */ e(
|
|
1432
|
-
|
|
1439
|
+
_e,
|
|
1433
1440
|
{
|
|
1434
1441
|
component: "li",
|
|
1435
1442
|
variant: f < i.length - 1 ? "inset" : "fullWidth"
|
|
1436
1443
|
}
|
|
1437
1444
|
)
|
|
1438
1445
|
] }, m)) }) }),
|
|
1439
|
-
!p && g.length > 0 && /* @__PURE__ */ c(
|
|
1440
|
-
/* @__PURE__ */ e(
|
|
1441
|
-
/* @__PURE__ */ e(
|
|
1442
|
-
g.map((m, f) => /* @__PURE__ */ c(
|
|
1443
|
-
m ===
|
|
1444
|
-
m ===
|
|
1445
|
-
m ===
|
|
1446
|
-
m ===
|
|
1446
|
+
!p && g.length > 0 && /* @__PURE__ */ c(l.Fragment, { children: [
|
|
1447
|
+
/* @__PURE__ */ e(b, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "body1", children: d.actions }),
|
|
1448
|
+
/* @__PURE__ */ e(de, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ c(me, { children: [
|
|
1449
|
+
g.map((m, f) => /* @__PURE__ */ c(l.Fragment, { children: [
|
|
1450
|
+
m === ee.MerchantBudget && /* @__PURE__ */ e(gt, { transaction: r }),
|
|
1451
|
+
m === ee.SplitTransaction && /* @__PURE__ */ e(Lt, { transaction: r }),
|
|
1452
|
+
m === ee.HideTransaction && /* @__PURE__ */ e(St, { transaction: r }),
|
|
1453
|
+
m === ee.MerchantLogo && /* @__PURE__ */ e(ft, { transaction: r }),
|
|
1447
1454
|
/* @__PURE__ */ e(
|
|
1448
|
-
|
|
1455
|
+
_e,
|
|
1449
1456
|
{
|
|
1450
1457
|
component: "li",
|
|
1451
1458
|
variant: f < g.length - 1 ? "inset" : "fullWidth"
|
|
@@ -1458,12 +1465,12 @@ const gt = E(({ transaction: t }) => {
|
|
|
1458
1465
|
] }) });
|
|
1459
1466
|
}, Fr = E(jt);
|
|
1460
1467
|
export {
|
|
1461
|
-
|
|
1468
|
+
ee as B,
|
|
1462
1469
|
ht as C,
|
|
1463
1470
|
yt as D,
|
|
1464
1471
|
Nt as M,
|
|
1465
1472
|
Fr as T,
|
|
1466
1473
|
Ft as a,
|
|
1467
|
-
|
|
1474
|
+
ae as b,
|
|
1468
1475
|
_t as c
|
|
1469
1476
|
};
|