@mx-cartographer/experiences 7.2.22-alpha.sms1 → 7.2.22-alpha.sms2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AccountDetailsContent-DCaVZwAx.mjs → AccountDetailsContent-C-TlAp1T.mjs} +1 -1
- package/dist/{ManageIncome-IN7NjYgu.mjs → ManageIncome-CGYYCOFR.mjs} +1 -1
- package/dist/{RecurringSettings-CHb3oLBa.mjs → RecurringSettings-BMcgNklx.mjs} +1 -1
- package/dist/{TransactionDetails-KZTpxcV0.mjs → TransactionDetails-D9ycDgYU.mjs} +302 -301
- package/dist/accounts/index.es.js +2 -2
- package/dist/budgets/index.es.js +2 -2
- package/dist/cashflow/index.es.js +3 -3
- package/dist/finstrong/index.es.js +1 -1
- package/dist/goals/index.es.js +1 -1
- package/dist/recurringtransactions/index.es.js +4 -4
- package/dist/spending/index.es.js +1 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/index.es.js +2 -2
- package/dist/trends/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import _ from "react";
|
|
3
3
|
import { observer as b } from "mobx-react-lite";
|
|
4
4
|
import { useVirtualizer as ke } from "@tanstack/react-virtual";
|
|
@@ -60,8 +60,8 @@ function nt() {
|
|
|
60
60
|
return window.opener && window.opener.location ? window.opener.location.toString() : document.referrer;
|
|
61
61
|
}
|
|
62
62
|
function rt(t) {
|
|
63
|
-
const r = nt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"),
|
|
64
|
-
return
|
|
63
|
+
const r = nt().replace(/([^:]+:\/\/[^\/]+).*/, "$1"), i = window.parent || window.opener || !1;
|
|
64
|
+
return i && i.postMessage && r ? (i.postMessage(t, r), !0) : !1;
|
|
65
65
|
}
|
|
66
66
|
function ot(t) {
|
|
67
67
|
return rt({
|
|
@@ -71,16 +71,16 @@ function ot(t) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
const it = ({ transaction: t, onClick: r }) => {
|
|
74
|
-
const { associatedBeats:
|
|
74
|
+
const { associatedBeats: i } = v(), { expandedSplits: n } = G(), { transactions: o } = A(), { showInsights: a } = G(), l = t.transaction_type === Pe.CREDIT, d = _.useMemo(() => i.find((c) => c.associated_transaction_guid === t.guid), [i, t]);
|
|
75
75
|
return (
|
|
76
76
|
//TODO: implement common/components/ListItemRow.tsx
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ s(
|
|
78
78
|
Ge,
|
|
79
79
|
{
|
|
80
80
|
clickEventName: h.ON_TRANSACTION_LIST_ITEM_CLICK,
|
|
81
81
|
onClick: r ? () => r(t.guid) : void 0,
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */ e(B, { children: t.parent_guid &&
|
|
83
|
+
/* @__PURE__ */ e(B, { children: t.parent_guid && n.includes(t.parent_guid) ? /* @__PURE__ */ e(_.Fragment, {}) : /* @__PURE__ */ e(
|
|
84
84
|
pe,
|
|
85
85
|
{
|
|
86
86
|
categoryGuid: t.top_level_category_guid || "",
|
|
@@ -91,40 +91,40 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
91
91
|
M,
|
|
92
92
|
{
|
|
93
93
|
disableTypography: !0,
|
|
94
|
-
secondary: /* @__PURE__ */
|
|
95
|
-
/* @__PURE__ */
|
|
94
|
+
secondary: /* @__PURE__ */ s(f, { direction: "row", justifyContent: "space-between", children: [
|
|
95
|
+
/* @__PURE__ */ s(f, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
96
96
|
t.is_flagged && /* @__PURE__ */ e(S, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
|
|
97
97
|
t.is_hidden && /* @__PURE__ */ e(S, { name: "visibility_off", size: 16 }),
|
|
98
98
|
t.has_been_split && /* @__PURE__ */ e(S, { name: "call_split", size: 16 }),
|
|
99
99
|
/* @__PURE__ */ e(T, { variant: "XSmall", children: t.has_been_split ? o.split_transaction_category_label : t.category })
|
|
100
100
|
] }),
|
|
101
|
-
d &&
|
|
101
|
+
d && a && /* @__PURE__ */ e(
|
|
102
102
|
T,
|
|
103
103
|
{
|
|
104
104
|
bold: !0,
|
|
105
105
|
color: "action.active",
|
|
106
|
-
onClick: (
|
|
107
|
-
|
|
106
|
+
onClick: (c) => {
|
|
107
|
+
c.stopPropagation(), c.preventDefault(), ot(d.guid);
|
|
108
108
|
},
|
|
109
109
|
variant: "XSmall",
|
|
110
110
|
children: d.short_title
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
] }),
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ s(f, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
|
|
115
|
+
/* @__PURE__ */ s(T, { bold: !0, variant: "Body", children: [
|
|
116
116
|
t.is_hidden && o.hide_trnx_cancel_hidden_note,
|
|
117
117
|
t.payee || t.description || t.feed_description
|
|
118
118
|
] }),
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ s(
|
|
120
120
|
T,
|
|
121
121
|
{
|
|
122
122
|
bold: !0,
|
|
123
|
-
color:
|
|
123
|
+
color: l ? "success.main" : "text.primary",
|
|
124
124
|
sx: { flexShrink: 0 },
|
|
125
125
|
variant: "Body",
|
|
126
126
|
children: [
|
|
127
|
-
|
|
127
|
+
l ? "+" : "",
|
|
128
128
|
te(t.amount, "0,0.00")
|
|
129
129
|
]
|
|
130
130
|
}
|
|
@@ -140,28 +140,28 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
140
140
|
bgcolor: t = "background.default",
|
|
141
141
|
children: r
|
|
142
142
|
}) => /* @__PURE__ */ e(w, { display: "inline-block", sx: { bgcolor: t, py: 4, width: "100%" }, children: /* @__PURE__ */ e(T, { bold: !0, sx: { pl: 24 }, variant: "XSmall", children: r }) }), ct = ({ showIcon: t = !0, showSubtitle: r = !0 }) => {
|
|
143
|
-
const
|
|
144
|
-
return /* @__PURE__ */
|
|
143
|
+
const i = ee(), { transactions: n } = A();
|
|
144
|
+
return /* @__PURE__ */ s(f, { alignItems: "center", gap: i.Spacing.Small, height: "auto", mt: i.Spacing.Large, children: [
|
|
145
145
|
t && /* @__PURE__ */ e(ze, { color: "secondary", sx: { fontSize: 32 } }),
|
|
146
|
-
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Small", children:
|
|
147
|
-
r && /* @__PURE__ */ e(T, { color: "secondary", variant: "XSmall", children:
|
|
146
|
+
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Small", children: n.zero_state_no_transactions }),
|
|
147
|
+
r && /* @__PURE__ */ e(T, { color: "secondary", variant: "XSmall", children: n.zero_state_there_are_no_transactions })
|
|
148
148
|
] });
|
|
149
149
|
}, dt = b(ct), Se = (t, r) => {
|
|
150
|
-
const
|
|
151
|
-
return !Ne(
|
|
150
|
+
const i = W(r[t].date), n = W(r[t - 1]?.date);
|
|
151
|
+
return !Ne(i, n);
|
|
152
152
|
}, _t = (t, r) => {
|
|
153
|
-
const
|
|
154
|
-
return Ne(
|
|
153
|
+
const i = W(r[t].date), n = W(r[t + 1]?.date);
|
|
154
|
+
return Ne(i, n);
|
|
155
155
|
}, Ce = 65, fe = 34, ut = ({
|
|
156
156
|
bgcolor: t,
|
|
157
157
|
filter: r,
|
|
158
|
-
height:
|
|
159
|
-
loader:
|
|
158
|
+
height: i = "calc(100dvh - 36px)",
|
|
159
|
+
loader: n = /* @__PURE__ */ e(Ie, { label: "Loading", size: 40 }),
|
|
160
160
|
onClick: o,
|
|
161
|
-
showInsights:
|
|
162
|
-
showLoader:
|
|
161
|
+
showInsights: a = !1,
|
|
162
|
+
showLoader: l = !1,
|
|
163
163
|
showHiddenTransactions: d = !1,
|
|
164
|
-
width:
|
|
164
|
+
width: c = "100%",
|
|
165
165
|
zeroState: u = /* @__PURE__ */ e(dt, {})
|
|
166
166
|
}) => {
|
|
167
167
|
const { isLoading: m, sortedTransactions: g } = v(), p = _.useMemo(() => {
|
|
@@ -183,7 +183,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
183
183
|
estimateSize: (I) => Ce + (Se(I, p) ? fe : 0),
|
|
184
184
|
overscan: 5
|
|
185
185
|
});
|
|
186
|
-
return _.useEffect(() => $.measure(), [p]), _.useEffect(() => y(
|
|
186
|
+
return _.useEffect(() => $.measure(), [p]), _.useEffect(() => y(a), [a]), _.useEffect(() => () => x(), []), /* @__PURE__ */ e(J, { sx: { width: c }, children: /* @__PURE__ */ e(w, { height: i, overflow: "auto", ref: K, width: c, children: /* @__PURE__ */ s(
|
|
187
187
|
w,
|
|
188
188
|
{
|
|
189
189
|
height: (
|
|
@@ -193,11 +193,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
193
193
|
position: "relative",
|
|
194
194
|
width: "100%",
|
|
195
195
|
children: [
|
|
196
|
-
(m ||
|
|
197
|
-
!m && !
|
|
198
|
-
!m && !
|
|
196
|
+
(m || l) && n,
|
|
197
|
+
!m && !l && $.getVirtualItems().length === 0 && u,
|
|
198
|
+
!m && !l && $.getVirtualItems().length > 0 && $.getVirtualItems().map((I) => {
|
|
199
199
|
const k = p[I.index], Y = Se(I.index, p), _e = _t(I.index, p), ue = Ce + (Y ? fe : 0);
|
|
200
|
-
return /* @__PURE__ */
|
|
200
|
+
return /* @__PURE__ */ s(
|
|
201
201
|
w,
|
|
202
202
|
{
|
|
203
203
|
sx: {
|
|
@@ -219,14 +219,14 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
219
219
|
}
|
|
220
220
|
) }) });
|
|
221
221
|
}, Ra = b(ut), mt = ({ transaction: t }) => {
|
|
222
|
-
const { addOrUpdateTransactionRule: r, updateTransaction:
|
|
223
|
-
await
|
|
222
|
+
const { addOrUpdateTransactionRule: r, updateTransaction: i } = v(), { categories: n } = xe(), { onEvent: o } = L(), { setShouldDisableDrawerScroll: a, updateManualTransaction: l } = G(), { transactions: d } = A(), [c, u] = _.useState(!1), [m, g] = _.useState(""), p = async (C) => {
|
|
223
|
+
await i({ ...t, category_guid: m }), C && await r(m, t), g(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
224
224
|
transaction_guid: t.guid
|
|
225
225
|
});
|
|
226
226
|
}, x = (C) => {
|
|
227
227
|
if (t.is_manual && !t.guid) {
|
|
228
|
-
const R =
|
|
229
|
-
|
|
228
|
+
const R = n.find((K) => K.guid === C);
|
|
229
|
+
l({
|
|
230
230
|
...t,
|
|
231
231
|
category: R?.name,
|
|
232
232
|
category_guid: C,
|
|
@@ -236,13 +236,13 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
236
236
|
g(C);
|
|
237
237
|
y();
|
|
238
238
|
}, y = () => {
|
|
239
|
-
u(!1),
|
|
239
|
+
u(!1), a(!1);
|
|
240
240
|
}, N = _.useMemo(
|
|
241
|
-
() =>
|
|
241
|
+
() => n.find((C) => C.guid === m),
|
|
242
242
|
[m]
|
|
243
243
|
);
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ s(_.Fragment, { children: [
|
|
245
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
246
246
|
U,
|
|
247
247
|
{
|
|
248
248
|
onClick: () => {
|
|
@@ -276,7 +276,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
276
276
|
initialSelected: t.category_guid,
|
|
277
277
|
onClose: y,
|
|
278
278
|
onSelect: x,
|
|
279
|
-
showDrawer:
|
|
279
|
+
showDrawer: c,
|
|
280
280
|
title: d.actions_select_a_category
|
|
281
281
|
}
|
|
282
282
|
),
|
|
@@ -304,28 +304,28 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
304
304
|
)
|
|
305
305
|
] });
|
|
306
306
|
}, gt = ({ transaction: t }) => {
|
|
307
|
-
const r = ee(), { onEvent:
|
|
307
|
+
const r = ee(), { onEvent: i } = L(), { updateTransaction: n } = v(), { updateManualTransaction: o } = G(), { common: a, transactions: l } = A(), [d, c] = _.useState(!1), [u, m] = _.useState(t.date), g = (x) => {
|
|
308
308
|
m(Ze(x));
|
|
309
309
|
}, p = async () => {
|
|
310
310
|
if (t.is_manual && !t.guid) {
|
|
311
|
-
o({ ...t, date: u }),
|
|
311
|
+
o({ ...t, date: u }), c(!1);
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
|
-
await
|
|
314
|
+
await n({ ...t, date: u }), i(P.TRANSACTION_DETAILS_CLICK_DATE, { transaction_guid: t.guid }), c(!1);
|
|
315
315
|
};
|
|
316
|
-
return /* @__PURE__ */
|
|
317
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
316
|
+
return /* @__PURE__ */ s(w, { className: "mx-txn-date-action", children: [
|
|
317
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
318
318
|
U,
|
|
319
319
|
{
|
|
320
320
|
onClick: () => {
|
|
321
|
-
|
|
321
|
+
i(h.ON_TRANSACTION_DATE_CLICK), c(!0);
|
|
322
322
|
},
|
|
323
323
|
children: [
|
|
324
324
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
325
325
|
/* @__PURE__ */ e(
|
|
326
326
|
M,
|
|
327
327
|
{
|
|
328
|
-
primary:
|
|
328
|
+
primary: l.date_title,
|
|
329
329
|
primaryTypographyProps: { variant: "XSmall" },
|
|
330
330
|
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: Ee(W(t.date), Oe.YEAR_MONTH_DAY) })
|
|
331
331
|
}
|
|
@@ -337,21 +337,21 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
337
337
|
/* @__PURE__ */ e(
|
|
338
338
|
de,
|
|
339
339
|
{
|
|
340
|
-
ariaLabelClose:
|
|
340
|
+
ariaLabelClose: a.close_aria,
|
|
341
341
|
isOpen: d,
|
|
342
|
-
onClose: () =>
|
|
342
|
+
onClose: () => c(!1),
|
|
343
343
|
onPrimaryAction: p,
|
|
344
|
-
primaryText:
|
|
345
|
-
secondaryText:
|
|
346
|
-
title:
|
|
344
|
+
primaryText: a.save_button,
|
|
345
|
+
secondaryText: a.cancel_button,
|
|
346
|
+
title: l.date_edit_title,
|
|
347
347
|
children: /* @__PURE__ */ e(f, { alignItems: "center", mt: r.Spacing.XXLarge, children: /* @__PURE__ */ e(
|
|
348
348
|
Me,
|
|
349
349
|
{
|
|
350
350
|
beginDate: W(u),
|
|
351
351
|
copy: {
|
|
352
|
-
nextAria:
|
|
353
|
-
prevAria:
|
|
354
|
-
today:
|
|
352
|
+
nextAria: l.date_next_aria,
|
|
353
|
+
prevAria: l.date_prev_aria,
|
|
354
|
+
today: a.date_range_picker.today
|
|
355
355
|
},
|
|
356
356
|
onDateSelected: g,
|
|
357
357
|
selectionType: Ke.Single
|
|
@@ -361,23 +361,23 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
361
361
|
)
|
|
362
362
|
] });
|
|
363
363
|
}, pt = ({ transaction: t }) => {
|
|
364
|
-
const { onEvent: r } = L(), { removeTransaction:
|
|
365
|
-
await
|
|
364
|
+
const { onEvent: r } = L(), { removeTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), c = async () => {
|
|
365
|
+
await i(t.guid), r(h.ON_TRANSACTION_DELETE_DELETED);
|
|
366
366
|
};
|
|
367
|
-
return /* @__PURE__ */
|
|
368
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
367
|
+
return /* @__PURE__ */ s(w, { className: "mx-txn-delete", children: [
|
|
368
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
369
369
|
U,
|
|
370
370
|
{
|
|
371
371
|
onClick: () => {
|
|
372
|
-
r(h.ON_TRANSACTION_DELETE_CLICK),
|
|
372
|
+
r(h.ON_TRANSACTION_DELETE_CLICK), n(!0), d(!0);
|
|
373
373
|
},
|
|
374
374
|
children: [
|
|
375
375
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { variant: "rounded", children: /* @__PURE__ */ e(oe, { color: "secondary", fontSize: "small" }) }) }),
|
|
376
376
|
/* @__PURE__ */ e(
|
|
377
377
|
M,
|
|
378
378
|
{
|
|
379
|
-
primary:
|
|
380
|
-
secondary:
|
|
379
|
+
primary: a.manual_transaction_delete_title,
|
|
380
|
+
secondary: a.manual_transaction_delete_subtitle
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
383
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(oe, {}) })
|
|
@@ -387,27 +387,27 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
387
387
|
/* @__PURE__ */ e(
|
|
388
388
|
V,
|
|
389
389
|
{
|
|
390
|
-
copy: { title:
|
|
391
|
-
isOpen:
|
|
390
|
+
copy: { title: a.manual_transaction_delete_title },
|
|
391
|
+
isOpen: l,
|
|
392
392
|
onClose: () => {
|
|
393
|
-
|
|
393
|
+
n(!1), d(!1);
|
|
394
394
|
},
|
|
395
|
-
onPrimaryAction:
|
|
395
|
+
onPrimaryAction: c,
|
|
396
396
|
onSecondaryAction: () => r(h.ON_TRANSACTION_DELETE_CANCEL),
|
|
397
397
|
primaryText: o.delete_button,
|
|
398
398
|
secondaryText: o.cancel_button,
|
|
399
|
-
children: /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children:
|
|
399
|
+
children: /* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: a.manual_transaction_delete_description })
|
|
400
400
|
}
|
|
401
401
|
)
|
|
402
402
|
] });
|
|
403
403
|
}, ht = b(pt), Tt = ({ transaction: t }) => {
|
|
404
|
-
const { onEvent: r } = L(), { updateTransaction:
|
|
405
|
-
await
|
|
404
|
+
const { onEvent: r } = L(), { updateTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), c = async () => {
|
|
405
|
+
await i({ ...t, merchant_guid: "" }), r(P.TRANSACTION_DETAILS_CLICK_DELETE_LOGO, {
|
|
406
406
|
transaction_guid: t.guid
|
|
407
407
|
});
|
|
408
408
|
};
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
409
|
+
return /* @__PURE__ */ s(w, { className: "mx-txn-delete-logo", children: [
|
|
410
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
411
411
|
U,
|
|
412
412
|
{
|
|
413
413
|
onClick: () => {
|
|
@@ -415,47 +415,47 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
415
415
|
},
|
|
416
416
|
children: [
|
|
417
417
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "delete", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
418
|
-
/* @__PURE__ */ e(M, { primary:
|
|
418
|
+
/* @__PURE__ */ e(M, { primary: a.merchant_logo_title, secondary: a.merchant_logo_desc }),
|
|
419
419
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
) }),
|
|
423
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ s(
|
|
424
424
|
V,
|
|
425
425
|
{
|
|
426
|
-
copy: { title:
|
|
427
|
-
isOpen:
|
|
426
|
+
copy: { title: a.merchant_logo_modal_title },
|
|
427
|
+
isOpen: l,
|
|
428
428
|
onClose: () => {
|
|
429
|
-
|
|
429
|
+
n(!1), d(!1);
|
|
430
430
|
},
|
|
431
|
-
onPrimaryAction:
|
|
431
|
+
onPrimaryAction: c,
|
|
432
432
|
onSecondaryAction: () => r(h.ON_TRANSACTION_DELETE_LOGO_CANCEL),
|
|
433
433
|
primaryText: o.delete_button,
|
|
434
434
|
secondaryText: o.cancel_button,
|
|
435
|
-
title:
|
|
435
|
+
title: a.merchant_logo_modal_title,
|
|
436
436
|
children: [
|
|
437
|
-
/* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children:
|
|
438
|
-
/* @__PURE__ */ e(T, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${
|
|
437
|
+
/* @__PURE__ */ e(T, { sx: { whiteSpace: "normal" }, variant: "Paragraph", children: a.merchant_logo_modal_desc }),
|
|
438
|
+
/* @__PURE__ */ e(T, { bold: !0, sx: { whiteSpace: "normal" }, variant: "Paragraph", children: ` ${a.merchant_logo_modal_desc_bold}` })
|
|
439
439
|
]
|
|
440
440
|
}
|
|
441
441
|
)
|
|
442
442
|
] });
|
|
443
443
|
}, yt = b(Tt), St = ({ transaction: t }) => {
|
|
444
|
-
const { onEvent: r } = L(), { updateTransaction:
|
|
445
|
-
await
|
|
446
|
-
|
|
444
|
+
const { onEvent: r } = L(), { updateTransaction: i } = v(), { setShouldDisableDrawerScroll: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), c = t.is_hidden, u = async () => {
|
|
445
|
+
await i({ ...t, is_hidden: !t.is_hidden }), r(
|
|
446
|
+
c ? h.ON_TRANSACTION_UNHIDDEN : h.ON_TRANSACTION_HIDDEN
|
|
447
447
|
);
|
|
448
448
|
};
|
|
449
|
-
return /* @__PURE__ */
|
|
450
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ s(w, { className: "mx-txn-hide-transaction", children: [
|
|
450
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
451
451
|
U,
|
|
452
452
|
{
|
|
453
|
-
"aria-checked":
|
|
453
|
+
"aria-checked": c,
|
|
454
454
|
onClick: () => {
|
|
455
455
|
r(
|
|
456
|
-
|
|
456
|
+
c ? h.ON_TRANSACTION_UNHIDE_CLICK : h.ON_TRANSACTION_HIDE_CLICK
|
|
457
457
|
), r(
|
|
458
|
-
|
|
458
|
+
c ? "transaction_details_click_unhide_transaction" : "transaction_details_click_hide_transaction",
|
|
459
459
|
{
|
|
460
460
|
transaction_guid: t.guid
|
|
461
461
|
}
|
|
@@ -463,7 +463,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
463
463
|
},
|
|
464
464
|
role: "switch",
|
|
465
465
|
children: [
|
|
466
|
-
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children:
|
|
466
|
+
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: c ? /* @__PURE__ */ e(
|
|
467
467
|
S,
|
|
468
468
|
{
|
|
469
469
|
name: "visibilityOff",
|
|
@@ -474,14 +474,14 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
474
474
|
/* @__PURE__ */ e(
|
|
475
475
|
M,
|
|
476
476
|
{
|
|
477
|
-
primary:
|
|
478
|
-
secondary:
|
|
477
|
+
primary: c ? a.hide_trnx_subtitle_unhide_trnx : a.hide_trnx_subtitle_hide_trnx,
|
|
478
|
+
secondary: c ? a.hide_trnx_desc_unhiding : a.hide_trnx_desc_hiding
|
|
479
479
|
}
|
|
480
480
|
),
|
|
481
481
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(
|
|
482
482
|
et,
|
|
483
483
|
{
|
|
484
|
-
checked:
|
|
484
|
+
checked: c,
|
|
485
485
|
id: "hide-transaction",
|
|
486
486
|
name: "hide-transaction",
|
|
487
487
|
tabIndex: -1
|
|
@@ -494,55 +494,55 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
494
494
|
V,
|
|
495
495
|
{
|
|
496
496
|
copy: {
|
|
497
|
-
title:
|
|
497
|
+
title: c ? a.hide_trnx_subtitle_unhide_trnx : a.hide_trnx_subtitle_hide_trnx
|
|
498
498
|
},
|
|
499
|
-
isOpen:
|
|
499
|
+
isOpen: l,
|
|
500
500
|
onClose: () => {
|
|
501
|
-
|
|
501
|
+
n(!1), d(!1);
|
|
502
502
|
},
|
|
503
503
|
onPrimaryAction: u,
|
|
504
504
|
onSecondaryAction: () => r(
|
|
505
|
-
|
|
505
|
+
c ? h.ON_TRANSACTION_UNHIDE_CANCEL_CLICK : h.ON_TRANSACTION_HIDE_CANCEL_CLICK
|
|
506
506
|
),
|
|
507
|
-
primaryText:
|
|
507
|
+
primaryText: c ? o.unhide_button : o.hide_button,
|
|
508
508
|
secondaryText: o.cancel_button,
|
|
509
|
-
children: /* @__PURE__ */ e(T, { truncate: !1, variant: "Paragraph", children:
|
|
509
|
+
children: /* @__PURE__ */ e(T, { truncate: !1, variant: "Paragraph", children: c ? a.hide_trnx_desc_unhiding : a.hide_trnx_desc_hiding })
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
] });
|
|
513
513
|
}, Ct = b(St), Le = ({ transaction: t }) => {
|
|
514
|
-
const { amount: r, description:
|
|
515
|
-
return /* @__PURE__ */
|
|
514
|
+
const { amount: r, description: i, isIncome: n, merchant_guid: o, payee: a, top_level_category_guid: l } = t;
|
|
515
|
+
return /* @__PURE__ */ s(f, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
516
516
|
/* @__PURE__ */ e(
|
|
517
517
|
pe,
|
|
518
518
|
{
|
|
519
|
-
categoryGuid:
|
|
519
|
+
categoryGuid: l || "",
|
|
520
520
|
merchantGuid: o || "",
|
|
521
521
|
size: 64
|
|
522
522
|
}
|
|
523
523
|
),
|
|
524
|
-
/* @__PURE__ */
|
|
525
|
-
/* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children:
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
|
|
524
|
+
/* @__PURE__ */ s(f, { overflow: "hidden'", children: [
|
|
525
|
+
/* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i || a }),
|
|
526
|
+
/* @__PURE__ */ s(Ae, { color: n ? "success.main" : "text.primary", truncate: !0, children: [
|
|
527
|
+
n ? "+" : "",
|
|
528
528
|
te(r, "0,0.00")
|
|
529
529
|
] })
|
|
530
530
|
] })
|
|
531
531
|
] });
|
|
532
532
|
}, ft = ({ transaction: t }) => {
|
|
533
|
-
const { onEvent: r } = L(), { updateTransaction:
|
|
533
|
+
const { onEvent: r } = L(), { updateTransaction: i } = v(), { updateManualTransaction: n } = G(), { common: o, transactions: a } = A(), [l, d] = _.useState(!1), [c, u] = _.useState("");
|
|
534
534
|
_.useEffect(() => {
|
|
535
|
-
|
|
536
|
-
}, [
|
|
535
|
+
l && u(t.memo ? t.memo : "");
|
|
536
|
+
}, [l]);
|
|
537
537
|
const m = async () => {
|
|
538
538
|
if (t.is_manual && !t.guid) {
|
|
539
|
-
|
|
539
|
+
n({ ...t, memo: c }), d(!1);
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
|
-
await
|
|
542
|
+
await i({ ...t, memo: c }), r(P.TRANSACTION_DETAILS_CLICK_MEMO, { transaction_guid: t.guid }), d(!1);
|
|
543
543
|
};
|
|
544
|
-
return /* @__PURE__ */
|
|
545
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
544
|
+
return /* @__PURE__ */ s("div", { className: "mx-txn-memo-action", children: [
|
|
545
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
546
546
|
U,
|
|
547
547
|
{
|
|
548
548
|
onClick: () => {
|
|
@@ -553,7 +553,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
553
553
|
/* @__PURE__ */ e(
|
|
554
554
|
M,
|
|
555
555
|
{
|
|
556
|
-
primary:
|
|
556
|
+
primary: a.memo_title,
|
|
557
557
|
primaryTypographyProps: { variant: "XSmall" },
|
|
558
558
|
secondary: /* @__PURE__ */ e(
|
|
559
559
|
T,
|
|
@@ -561,7 +561,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
561
561
|
bold: !0,
|
|
562
562
|
sx: { overflowWrap: "break-word", whiteSpace: "wrap" },
|
|
563
563
|
variant: "Body",
|
|
564
|
-
children: t.memo ? t.memo :
|
|
564
|
+
children: t.memo ? t.memo : a.memo_desc
|
|
565
565
|
}
|
|
566
566
|
)
|
|
567
567
|
}
|
|
@@ -570,29 +570,29 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
570
570
|
]
|
|
571
571
|
}
|
|
572
572
|
) }),
|
|
573
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ s(
|
|
574
574
|
de,
|
|
575
575
|
{
|
|
576
576
|
ariaLabelClose: o.close_aria,
|
|
577
|
-
isOpen:
|
|
577
|
+
isOpen: l,
|
|
578
578
|
onClose: () => d(!1),
|
|
579
579
|
onPrimaryAction: m,
|
|
580
|
-
title:
|
|
580
|
+
title: a.memo_title,
|
|
581
581
|
children: [
|
|
582
582
|
/* @__PURE__ */ e(Le, { transaction: t }),
|
|
583
583
|
/* @__PURE__ */ e(
|
|
584
584
|
De,
|
|
585
585
|
{
|
|
586
|
-
"aria-label":
|
|
586
|
+
"aria-label": a.memo_desc_aria,
|
|
587
587
|
focused: !0,
|
|
588
588
|
fullWidth: !0,
|
|
589
589
|
multiline: !0,
|
|
590
590
|
name: "memo",
|
|
591
591
|
onChange: (g) => u(g.target.value),
|
|
592
|
-
placeholder:
|
|
592
|
+
placeholder: a.memo_desc,
|
|
593
593
|
rows: 4,
|
|
594
594
|
sx: { px: 16 },
|
|
595
|
-
value:
|
|
595
|
+
value: c
|
|
596
596
|
}
|
|
597
597
|
)
|
|
598
598
|
]
|
|
@@ -602,58 +602,58 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
602
602
|
}, bt = b(ft), At = ({
|
|
603
603
|
index: t,
|
|
604
604
|
onDeleteRow: r,
|
|
605
|
-
onCategoryChanged:
|
|
606
|
-
onUpdateAmount:
|
|
605
|
+
onCategoryChanged: i,
|
|
606
|
+
onUpdateAmount: n,
|
|
607
607
|
split: o
|
|
608
608
|
}) => {
|
|
609
|
-
const
|
|
610
|
-
isNaN(Number(y)) || (u(y),
|
|
609
|
+
const a = ee(), { onEvent: l } = L(), { transactions: d } = A(), [c, u] = _.useState(`${o.amount}`), [m, g] = _.useState(!1), p = t === 0, x = (y) => {
|
|
610
|
+
isNaN(Number(y)) || (u(y), n(t, Number(y)));
|
|
611
611
|
};
|
|
612
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ s(
|
|
613
613
|
w,
|
|
614
614
|
{
|
|
615
615
|
bgcolor: "background.paper",
|
|
616
616
|
className: "mx-txn-split-manager-row",
|
|
617
|
-
pb:
|
|
618
|
-
px:
|
|
617
|
+
pb: a.Spacing.Tiny,
|
|
618
|
+
px: a.Spacing.XSmall,
|
|
619
619
|
children: [
|
|
620
|
-
/* @__PURE__ */
|
|
621
|
-
/* @__PURE__ */ e(ge, { item: !0, xs: 7, children: /* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ s(ge, { alignItems: p ? "center" : "start", container: !0, children: [
|
|
621
|
+
/* @__PURE__ */ e(ge, { item: !0, xs: 7, children: /* @__PURE__ */ s(f, { alignItems: "start", children: [
|
|
622
622
|
/* @__PURE__ */ e(
|
|
623
623
|
ce,
|
|
624
624
|
{
|
|
625
625
|
endIcon: /* @__PURE__ */ e(Ue, {}),
|
|
626
626
|
onClick: () => g(!0),
|
|
627
627
|
startIcon: /* @__PURE__ */ e(he, { categoryGuid: o.top_level_category_guid }),
|
|
628
|
-
sx: { px:
|
|
628
|
+
sx: { px: a.Spacing.Small, py: a.Spacing.XSmall },
|
|
629
629
|
children: o.category
|
|
630
630
|
}
|
|
631
631
|
),
|
|
632
|
-
/* @__PURE__ */ e(w, { children: !o.category_guid && /* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ e(w, { children: !o.category_guid && /* @__PURE__ */ s(
|
|
633
633
|
f,
|
|
634
634
|
{
|
|
635
635
|
color: "error.main",
|
|
636
636
|
direction: "row",
|
|
637
|
-
gap:
|
|
638
|
-
p:
|
|
637
|
+
gap: a.Spacing.XSmall,
|
|
638
|
+
p: a.Spacing.Small,
|
|
639
639
|
children: [
|
|
640
|
-
/* @__PURE__ */ e(ie, { sx: { fontSize:
|
|
640
|
+
/* @__PURE__ */ e(ie, { sx: { fontSize: a.FontSize.Body } }),
|
|
641
641
|
/* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_select_category })
|
|
642
642
|
]
|
|
643
643
|
}
|
|
644
644
|
) })
|
|
645
645
|
] }) }),
|
|
646
|
-
/* @__PURE__ */ e(ge, { item: !0, xs: 5, children: p ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: te(o.amount, "0,0.00") }) }) : /* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
646
|
+
/* @__PURE__ */ e(ge, { item: !0, xs: 5, children: p ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: te(o.amount, "0,0.00") }) }) : /* @__PURE__ */ s(f, { alignItems: "start", children: [
|
|
647
|
+
/* @__PURE__ */ s(f, { alignItems: "start", direction: "row", gap: a.Spacing.XSmall, children: [
|
|
648
648
|
/* @__PURE__ */ e(
|
|
649
649
|
Qe,
|
|
650
650
|
{
|
|
651
|
-
amount:
|
|
651
|
+
amount: c,
|
|
652
652
|
ariaLabel: d.split_transaction_edit_split_amount,
|
|
653
653
|
name: "split-amount-input",
|
|
654
654
|
setAmount: x,
|
|
655
655
|
sx: {
|
|
656
|
-
".MuiOutlinedInput-input": { p:
|
|
656
|
+
".MuiOutlinedInput-input": { p: a.Spacing.Small }
|
|
657
657
|
},
|
|
658
658
|
type: "number"
|
|
659
659
|
}
|
|
@@ -664,22 +664,22 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
664
664
|
"aria-label": d.split_transaction_delete_split_btn,
|
|
665
665
|
color: "secondary",
|
|
666
666
|
onClick: () => {
|
|
667
|
-
|
|
667
|
+
l(h.ON_TRANSACTION_SPLIT_DELETE_CLICK), r(t);
|
|
668
668
|
},
|
|
669
669
|
sx: { w: 44, h: 44 },
|
|
670
670
|
children: /* @__PURE__ */ e(oe, {})
|
|
671
671
|
}
|
|
672
672
|
)
|
|
673
673
|
] }),
|
|
674
|
-
!
|
|
674
|
+
!c && /* @__PURE__ */ s(
|
|
675
675
|
f,
|
|
676
676
|
{
|
|
677
677
|
color: "error.main",
|
|
678
678
|
direction: "row",
|
|
679
|
-
gap:
|
|
680
|
-
py:
|
|
679
|
+
gap: a.Spacing.XSmall,
|
|
680
|
+
py: a.Spacing.Small,
|
|
681
681
|
children: [
|
|
682
|
-
/* @__PURE__ */ e(ie, { sx: { fontSize:
|
|
682
|
+
/* @__PURE__ */ e(ie, { sx: { fontSize: a.FontSize.Body } }),
|
|
683
683
|
/* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_enter_an_amount })
|
|
684
684
|
]
|
|
685
685
|
}
|
|
@@ -692,7 +692,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
692
692
|
initialSelected: o.category_guid,
|
|
693
693
|
onClose: () => g(!1),
|
|
694
694
|
onSelect: (y) => {
|
|
695
|
-
|
|
695
|
+
i(t, y), g(!1);
|
|
696
696
|
},
|
|
697
697
|
showDrawer: m,
|
|
698
698
|
title: d.actions_select_a_category
|
|
@@ -704,57 +704,57 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
704
704
|
}, xt = b(At), Nt = ({
|
|
705
705
|
onAddSplit: t,
|
|
706
706
|
onCategoryChanged: r,
|
|
707
|
-
onDeleteSplit:
|
|
708
|
-
onUpdateAmount:
|
|
707
|
+
onDeleteSplit: i,
|
|
708
|
+
onUpdateAmount: n,
|
|
709
709
|
splits: o,
|
|
710
|
-
transaction:
|
|
710
|
+
transaction: a
|
|
711
711
|
}) => {
|
|
712
|
-
const
|
|
712
|
+
const l = ee(), { transactions: d } = A(), { onEvent: c } = L(), [u, m] = _.useState("");
|
|
713
713
|
return _.useEffect(() => {
|
|
714
714
|
m(o.length <= 1 ? d.split_transaction_errors_min_splits : ""), m(
|
|
715
715
|
o[0].amount < 0 ? se(
|
|
716
716
|
d.split_transaction_errors_totals_must_equal_amount,
|
|
717
|
-
te(
|
|
717
|
+
te(a.amount, "0,0.00")
|
|
718
718
|
) : ""
|
|
719
719
|
);
|
|
720
|
-
}, [o]), /* @__PURE__ */
|
|
720
|
+
}, [o]), /* @__PURE__ */ s(w, { className: "mx-txn-split-manager", children: [
|
|
721
721
|
o.map((g, p) => /* @__PURE__ */ e(
|
|
722
722
|
xt,
|
|
723
723
|
{
|
|
724
724
|
index: p,
|
|
725
725
|
onCategoryChanged: r,
|
|
726
|
-
onDeleteRow:
|
|
727
|
-
onUpdateAmount:
|
|
726
|
+
onDeleteRow: i,
|
|
727
|
+
onUpdateAmount: n,
|
|
728
728
|
split: g
|
|
729
729
|
},
|
|
730
730
|
p
|
|
731
731
|
)),
|
|
732
|
-
u && /* @__PURE__ */
|
|
732
|
+
u && /* @__PURE__ */ s(
|
|
733
733
|
f,
|
|
734
734
|
{
|
|
735
735
|
color: "error.main",
|
|
736
736
|
direction: "row",
|
|
737
|
-
gap:
|
|
738
|
-
p:
|
|
737
|
+
gap: l.Spacing.XSmall,
|
|
738
|
+
p: l.Spacing.Medium,
|
|
739
739
|
children: [
|
|
740
|
-
/* @__PURE__ */ e(ie, { sx: { fontSize:
|
|
740
|
+
/* @__PURE__ */ e(ie, { sx: { fontSize: l.FontSize.Body } }),
|
|
741
741
|
/* @__PURE__ */ e(T, { variant: "Small", children: u })
|
|
742
742
|
]
|
|
743
743
|
}
|
|
744
744
|
),
|
|
745
|
-
/* @__PURE__ */ e(w, { p:
|
|
745
|
+
/* @__PURE__ */ e(w, { p: l.Spacing.Medium, children: /* @__PURE__ */ e(
|
|
746
746
|
ce,
|
|
747
747
|
{
|
|
748
748
|
"aria-label": d.split_transaction_add_split_btn,
|
|
749
749
|
onClick: () => {
|
|
750
|
-
|
|
750
|
+
c(h.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
|
|
751
751
|
},
|
|
752
752
|
children: d.split_transaction_add_split_btn
|
|
753
753
|
}
|
|
754
754
|
) })
|
|
755
755
|
] });
|
|
756
756
|
}, It = b(Nt), Dt = ({ transaction: t }) => {
|
|
757
|
-
const { onEvent: r } = L(), { splitTransaction:
|
|
757
|
+
const { onEvent: r } = L(), { splitTransaction: i, unSplitTransaction: n } = v(), { common: o, transactions: a } = A(), { setShouldDisableDrawerScroll: l } = G(), { categories: d } = xe(), c = {
|
|
758
758
|
...t,
|
|
759
759
|
amount: t.amount - 1,
|
|
760
760
|
guid: "",
|
|
@@ -764,7 +764,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
764
764
|
...t,
|
|
765
765
|
amount: 1,
|
|
766
766
|
category_guid: void 0,
|
|
767
|
-
category:
|
|
767
|
+
category: a.split_transaction_select_category_btn,
|
|
768
768
|
guid: "",
|
|
769
769
|
has_been_split: !1,
|
|
770
770
|
parent_guid: t.guid,
|
|
@@ -796,36 +796,36 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
796
796
|
x(!0);
|
|
797
797
|
return;
|
|
798
798
|
}
|
|
799
|
-
N([{ ...
|
|
799
|
+
N([{ ...c }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
800
800
|
transaction_guid: t.guid
|
|
801
801
|
}), g(!0);
|
|
802
802
|
}, k = async () => {
|
|
803
|
-
r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await
|
|
803
|
+
r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...t, has_been_split: !0 }, y), g(!1);
|
|
804
804
|
}, Y = async () => {
|
|
805
|
-
r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...
|
|
805
|
+
r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...c }, { ...u }]), g(!1);
|
|
806
806
|
}, _e = async () => {
|
|
807
807
|
r(P.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
808
808
|
transaction_guid: t.guid
|
|
809
809
|
});
|
|
810
810
|
const E = t.parent_guid ?? t.guid;
|
|
811
|
-
await
|
|
811
|
+
await n(E);
|
|
812
812
|
}, ue = _.useMemo(() => {
|
|
813
813
|
const E = y.some((O) => !O.category_guid), H = y.some((O) => O.amount <= 0);
|
|
814
814
|
return E || H;
|
|
815
815
|
}, [y]);
|
|
816
|
-
return /* @__PURE__ */
|
|
817
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ s(_.Fragment, { children: [
|
|
817
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(U, { onClick: I, children: [
|
|
818
818
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(S, { name: "call_split", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
819
819
|
/* @__PURE__ */ e(
|
|
820
820
|
M,
|
|
821
821
|
{
|
|
822
|
-
primary: t.has_been_split || t.parent_guid ?
|
|
823
|
-
secondary: t.has_been_split || t.parent_guid ?
|
|
822
|
+
primary: t.has_been_split || t.parent_guid ? a.split_transaction_unsplit_title : a.split_transaction_title,
|
|
823
|
+
secondary: t.has_been_split || t.parent_guid ? a.split_transaction_unsplit_subtitle : a.split_transaction_desc
|
|
824
824
|
}
|
|
825
825
|
),
|
|
826
826
|
/* @__PURE__ */ e(X, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(S, { name: "delete", weight: D.Dark }) : /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
|
|
827
827
|
] }) }),
|
|
828
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ s(
|
|
829
829
|
de,
|
|
830
830
|
{
|
|
831
831
|
ariaLabelClose: o.close_aria,
|
|
@@ -835,7 +835,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
835
835
|
onPrimaryAction: k,
|
|
836
836
|
primaryText: o.save_button,
|
|
837
837
|
secondaryText: o.cancel_button,
|
|
838
|
-
title:
|
|
838
|
+
title: a.split_transaction_title,
|
|
839
839
|
children: [
|
|
840
840
|
/* @__PURE__ */ e(Le, { transaction: t }),
|
|
841
841
|
/* @__PURE__ */ e(
|
|
@@ -855,10 +855,10 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
855
855
|
/* @__PURE__ */ e(
|
|
856
856
|
V,
|
|
857
857
|
{
|
|
858
|
-
copy: { title:
|
|
858
|
+
copy: { title: a.split_transaction_unsplit_title },
|
|
859
859
|
isOpen: p,
|
|
860
860
|
onClose: () => {
|
|
861
|
-
|
|
861
|
+
l(!1), x(!1);
|
|
862
862
|
},
|
|
863
863
|
onPrimaryAction: _e,
|
|
864
864
|
onSecondaryAction: () => {
|
|
@@ -867,28 +867,28 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
867
867
|
primaryText: o.delete_button,
|
|
868
868
|
secondaryText: o.cancel_button,
|
|
869
869
|
children: /* @__PURE__ */ e(le, { variant: "Paragraph", children: se(
|
|
870
|
-
|
|
870
|
+
a.split_transaction_unsplit_description,
|
|
871
871
|
t.description
|
|
872
872
|
) })
|
|
873
873
|
}
|
|
874
874
|
)
|
|
875
875
|
] });
|
|
876
876
|
}, vt = b(Dt), Et = () => {
|
|
877
|
-
const t = ve(), { onEvent: r } = L(), { addTag:
|
|
877
|
+
const t = ve(), { onEvent: r } = L(), { addTag: i } = v(), { transactions: n } = A(), [o, a] = _.useState(!1), [l, d] = _.useState(""), [c, u] = _.useState(""), m = _.useRef(null);
|
|
878
878
|
_.useEffect(() => {
|
|
879
879
|
o && m?.current?.focus();
|
|
880
880
|
}, [o]);
|
|
881
881
|
const g = () => {
|
|
882
882
|
r(
|
|
883
883
|
o ? h.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : h.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
884
|
-
), o || d(""),
|
|
884
|
+
), o || d(""), a(!o);
|
|
885
885
|
}, p = async () => {
|
|
886
|
-
r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await
|
|
886
|
+
r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await i(l), a(!1);
|
|
887
887
|
};
|
|
888
888
|
return _.useEffect(() => {
|
|
889
|
-
u(
|
|
890
|
-
}, [
|
|
891
|
-
/* @__PURE__ */
|
|
889
|
+
u(l.length > 40 ? n.tags_error_name_must_be_40_chars : "");
|
|
890
|
+
}, [l]), /* @__PURE__ */ s(w, { className: "mx-txn-tag-manager-header", children: [
|
|
891
|
+
/* @__PURE__ */ s(
|
|
892
892
|
f,
|
|
893
893
|
{
|
|
894
894
|
alignItems: "center",
|
|
@@ -898,49 +898,49 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
898
898
|
px: 24,
|
|
899
899
|
py: 16,
|
|
900
900
|
children: [
|
|
901
|
-
/* @__PURE__ */ e(T, { bold: !0, children:
|
|
901
|
+
/* @__PURE__ */ e(T, { bold: !0, children: n.tags_your_tags }),
|
|
902
902
|
/* @__PURE__ */ e(
|
|
903
903
|
ce,
|
|
904
904
|
{
|
|
905
905
|
"aria-expanded": o,
|
|
906
|
-
"aria-label":
|
|
906
|
+
"aria-label": n.tags_add_tag_btn_aria,
|
|
907
907
|
onClick: g,
|
|
908
|
-
children:
|
|
908
|
+
children: n.tags_add_tag_btn
|
|
909
909
|
}
|
|
910
910
|
)
|
|
911
911
|
]
|
|
912
912
|
}
|
|
913
913
|
),
|
|
914
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ s(
|
|
915
915
|
V,
|
|
916
916
|
{
|
|
917
|
-
copy: { title:
|
|
917
|
+
copy: { title: n.tags_add_tag_btn },
|
|
918
918
|
isOpen: o,
|
|
919
|
-
onClose: () =>
|
|
919
|
+
onClose: () => a(!1),
|
|
920
920
|
onPrimaryAction: p,
|
|
921
|
-
onSecondaryAction: () =>
|
|
921
|
+
onSecondaryAction: () => a(!1),
|
|
922
922
|
children: [
|
|
923
923
|
/* @__PURE__ */ e(
|
|
924
924
|
Te,
|
|
925
925
|
{
|
|
926
|
-
"aria-label":
|
|
926
|
+
"aria-label": n.tags_placeholder,
|
|
927
927
|
name: "add-tag",
|
|
928
928
|
onChange: (x) => d(x.target.value),
|
|
929
|
-
placeholder:
|
|
929
|
+
placeholder: n.tags_placeholder,
|
|
930
930
|
sx: { width: "100%" },
|
|
931
|
-
value:
|
|
931
|
+
value: l
|
|
932
932
|
}
|
|
933
933
|
),
|
|
934
|
-
/* @__PURE__ */ e(le, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children:
|
|
934
|
+
/* @__PURE__ */ e(le, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: c })
|
|
935
935
|
]
|
|
936
936
|
}
|
|
937
937
|
)
|
|
938
938
|
] });
|
|
939
939
|
}, Ot = b(Et), wt = ({ onSearchValueChanged: t, searchValue: r }) => {
|
|
940
|
-
const { common:
|
|
940
|
+
const { common: i, transactions: n } = A(), o = ee(), a = /* @__PURE__ */ e(
|
|
941
941
|
Q,
|
|
942
942
|
{
|
|
943
|
-
"aria-label":
|
|
943
|
+
"aria-label": n.tags_cancel_search || "Search",
|
|
944
944
|
onClick: () => t(""),
|
|
945
945
|
children: /* @__PURE__ */ e(ie, {})
|
|
946
946
|
}
|
|
@@ -950,41 +950,41 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
950
950
|
{
|
|
951
951
|
InputProps: {
|
|
952
952
|
startAdornment: /* @__PURE__ */ e(ye, { position: "start", children: /* @__PURE__ */ e(Xe, { color: "disabled" }) }),
|
|
953
|
-
endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ?
|
|
953
|
+
endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ? a : null })
|
|
954
954
|
},
|
|
955
|
-
"aria-label":
|
|
955
|
+
"aria-label": i.search_aria,
|
|
956
956
|
name: "search",
|
|
957
|
-
onChange: (
|
|
958
|
-
placeholder:
|
|
957
|
+
onChange: (l) => t(l.target.value),
|
|
958
|
+
placeholder: i.search_placeholder,
|
|
959
959
|
sx: { bgcolor: "background.paper", width: "100%" },
|
|
960
960
|
value: r
|
|
961
961
|
}
|
|
962
962
|
) });
|
|
963
|
-
}, Lt = b(wt), Rt = ({ onTagChecked: t, selectedTags: r, tag:
|
|
964
|
-
const { onEvent:
|
|
965
|
-
|
|
963
|
+
}, Lt = b(wt), Rt = ({ onTagChecked: t, selectedTags: r, tag: i }) => {
|
|
964
|
+
const { onEvent: n } = L(), { removeTag: o, updateTag: a } = v(), { common: l, transactions: d } = A(), [c, u] = _.useState(!1), [m, g] = _.useState(!1), [p, x] = _.useState(""), [y, N] = _.useState(""), C = async () => {
|
|
965
|
+
n(h.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await a({ ...i, name: p }), u(!1);
|
|
966
966
|
}, R = async () => {
|
|
967
|
-
|
|
967
|
+
n(h.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), g(!1);
|
|
968
968
|
};
|
|
969
969
|
_.useEffect(() => {
|
|
970
970
|
N(p.length > 40 ? d.tags_error_name_must_be_40_chars : "");
|
|
971
971
|
}, [p]);
|
|
972
972
|
const K = () => {
|
|
973
|
-
|
|
973
|
+
n(h.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), x(i.name), u(!0);
|
|
974
974
|
}, $ = () => {
|
|
975
|
-
|
|
975
|
+
n(h.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), g(!0);
|
|
976
976
|
};
|
|
977
|
-
return /* @__PURE__ */
|
|
977
|
+
return /* @__PURE__ */ s(
|
|
978
978
|
F,
|
|
979
979
|
{
|
|
980
980
|
className: "mx-txn-transaction-manager-row",
|
|
981
981
|
disableGutters: !0,
|
|
982
982
|
disablePadding: !0,
|
|
983
|
-
secondaryAction: !
|
|
983
|
+
secondaryAction: !i.is_default_tag && /* @__PURE__ */ s(f, { direction: "row", children: [
|
|
984
984
|
/* @__PURE__ */ e(
|
|
985
985
|
Q,
|
|
986
986
|
{
|
|
987
|
-
"aria-label": `Edit ${
|
|
987
|
+
"aria-label": `Edit ${i.name} tag`,
|
|
988
988
|
color: "secondary",
|
|
989
989
|
onClick: K,
|
|
990
990
|
children: /* @__PURE__ */ e(Ve, { color: "secondary" })
|
|
@@ -993,7 +993,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
993
993
|
/* @__PURE__ */ e(
|
|
994
994
|
Q,
|
|
995
995
|
{
|
|
996
|
-
"aria-label": `Delete ${
|
|
996
|
+
"aria-label": `Delete ${i.name} tag`,
|
|
997
997
|
color: "secondary",
|
|
998
998
|
onClick: $,
|
|
999
999
|
children: /* @__PURE__ */ e(oe, { color: "secondary" })
|
|
@@ -1001,23 +1001,23 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1001
1001
|
)
|
|
1002
1002
|
] }),
|
|
1003
1003
|
children: [
|
|
1004
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ s(
|
|
1005
1005
|
U,
|
|
1006
1006
|
{
|
|
1007
|
-
"aria-checked": r.includes(
|
|
1008
|
-
onClick: () => t(
|
|
1007
|
+
"aria-checked": r.includes(i.guid),
|
|
1008
|
+
onClick: () => t(i.guid),
|
|
1009
1009
|
role: "checkbox",
|
|
1010
1010
|
children: [
|
|
1011
|
-
/* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Je, { checked: r.includes(
|
|
1012
|
-
/* @__PURE__ */ e(M, { children:
|
|
1011
|
+
/* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Je, { checked: r.includes(i.guid), edge: "start", tabIndex: -1 }) }),
|
|
1012
|
+
/* @__PURE__ */ e(M, { children: i.name })
|
|
1013
1013
|
]
|
|
1014
1014
|
}
|
|
1015
1015
|
),
|
|
1016
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ s(
|
|
1017
1017
|
V,
|
|
1018
1018
|
{
|
|
1019
1019
|
copy: { title: "Update tag name" },
|
|
1020
|
-
isOpen:
|
|
1020
|
+
isOpen: c,
|
|
1021
1021
|
onClose: () => u(!1),
|
|
1022
1022
|
onPrimaryAction: C,
|
|
1023
1023
|
onSecondaryAction: () => u(!1),
|
|
@@ -1045,9 +1045,9 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1045
1045
|
isOpen: m,
|
|
1046
1046
|
onClose: () => g(!1),
|
|
1047
1047
|
onPrimaryAction: R,
|
|
1048
|
-
onSecondaryAction: () =>
|
|
1049
|
-
primaryText:
|
|
1050
|
-
secondaryText:
|
|
1048
|
+
onSecondaryAction: () => n(h.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1049
|
+
primaryText: l.delete_button,
|
|
1050
|
+
secondaryText: l.cancel_button,
|
|
1051
1051
|
children: /* @__PURE__ */ e(T, { truncate: !1, children: d.tags_deleting_this_tag_will_remove_it })
|
|
1052
1052
|
}
|
|
1053
1053
|
)
|
|
@@ -1055,28 +1055,28 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1055
1055
|
}
|
|
1056
1056
|
);
|
|
1057
1057
|
}, kt = b(Rt), Pt = ({ selectedTags: t, onTagChecked: r }) => {
|
|
1058
|
-
const { tags:
|
|
1059
|
-
(
|
|
1058
|
+
const { tags: i } = v(), [n, o] = _.useState(""), a = i.filter(
|
|
1059
|
+
(l) => l.name.toLowerCase().includes(n.toLowerCase())
|
|
1060
1060
|
);
|
|
1061
|
-
return /* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ s("div", { className: "mx-txn-tag-manager", children: [
|
|
1062
1062
|
/* @__PURE__ */ e(
|
|
1063
1063
|
Lt,
|
|
1064
1064
|
{
|
|
1065
|
-
onSearchValueChanged: (
|
|
1066
|
-
searchValue:
|
|
1065
|
+
onSearchValueChanged: (l) => o(l),
|
|
1066
|
+
searchValue: n
|
|
1067
1067
|
}
|
|
1068
1068
|
),
|
|
1069
1069
|
/* @__PURE__ */ e(Ot, {}),
|
|
1070
|
-
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children:
|
|
1071
|
-
/* @__PURE__ */ e(kt, { onTagChecked: r, selectedTags: t, tag:
|
|
1070
|
+
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: a.map((l) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1071
|
+
/* @__PURE__ */ e(kt, { onTagChecked: r, selectedTags: t, tag: l }),
|
|
1072
1072
|
/* @__PURE__ */ e(Z, { sx: { ml: 24 } })
|
|
1073
|
-
] },
|
|
1073
|
+
] }, l.guid)) }) })
|
|
1074
1074
|
] });
|
|
1075
1075
|
}, Gt = b(Pt), Mt = ({ transaction: t }) => {
|
|
1076
|
-
const { onEvent: r } = L(), { tags:
|
|
1076
|
+
const { onEvent: r } = L(), { tags: i, updateTaggings: n, updateTransaction: o } = v(), { common: a, transactions: l } = A(), { updateManualTransaction: d } = G(), [c, u] = _.useState(!1), [m, g] = _.useState(t.tags);
|
|
1077
1077
|
_.useEffect(() => {
|
|
1078
1078
|
g(t.tags);
|
|
1079
|
-
}, [
|
|
1079
|
+
}, [c, t]);
|
|
1080
1080
|
const p = (N) => {
|
|
1081
1081
|
const C = [...m], R = m.indexOf(N);
|
|
1082
1082
|
R >= 0 ? C.splice(R, 1) : C.push(N), g(C);
|
|
@@ -1085,15 +1085,15 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1085
1085
|
d({ ...t, tags: m }), u(!1);
|
|
1086
1086
|
return;
|
|
1087
1087
|
}
|
|
1088
|
-
await
|
|
1088
|
+
await n(m, t.guid), await o({ ...t, tags: m }), r(P.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
|
|
1089
1089
|
}, y = _.useMemo(
|
|
1090
1090
|
() => t.tags.map(
|
|
1091
|
-
(N, C, R) => `${
|
|
1091
|
+
(N, C, R) => `${i.find((K) => K.guid === N)?.name}${C < R.length - 1 ? " / " : ""}`
|
|
1092
1092
|
),
|
|
1093
|
-
[
|
|
1093
|
+
[i, t]
|
|
1094
1094
|
);
|
|
1095
|
-
return /* @__PURE__ */
|
|
1096
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
1095
|
+
return /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1096
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ s(
|
|
1097
1097
|
U,
|
|
1098
1098
|
{
|
|
1099
1099
|
onClick: () => {
|
|
@@ -1104,9 +1104,9 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1104
1104
|
/* @__PURE__ */ e(
|
|
1105
1105
|
M,
|
|
1106
1106
|
{
|
|
1107
|
-
primary:
|
|
1107
|
+
primary: l.tags_title,
|
|
1108
1108
|
primaryTypographyProps: { variant: "XSmall" },
|
|
1109
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y :
|
|
1109
|
+
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y : l.tags_desc })
|
|
1110
1110
|
}
|
|
1111
1111
|
),
|
|
1112
1112
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(S, { name: "chevron_right", weight: D.Dark }) })
|
|
@@ -1116,28 +1116,28 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1116
1116
|
/* @__PURE__ */ e(
|
|
1117
1117
|
de,
|
|
1118
1118
|
{
|
|
1119
|
-
ariaLabelClose:
|
|
1120
|
-
isOpen:
|
|
1119
|
+
ariaLabelClose: a.close_aria,
|
|
1120
|
+
isOpen: c,
|
|
1121
1121
|
onClose: () => u(!1),
|
|
1122
1122
|
onPrimaryAction: x,
|
|
1123
|
-
primaryText:
|
|
1124
|
-
secondaryText:
|
|
1125
|
-
title:
|
|
1123
|
+
primaryText: a.save_button,
|
|
1124
|
+
secondaryText: a.cancel_button,
|
|
1125
|
+
title: l.tags_title,
|
|
1126
1126
|
children: /* @__PURE__ */ e(Gt, { onTagChecked: p, selectedTags: m })
|
|
1127
1127
|
}
|
|
1128
1128
|
)
|
|
1129
1129
|
] });
|
|
1130
1130
|
}, Kt = b(Mt), $t = ({ transaction: t, viewOnly: r = !1 }) => {
|
|
1131
|
-
const { updateTransaction:
|
|
1131
|
+
const { updateTransaction: i } = v(), { common: n, transactions: o } = A(), { onEvent: a } = L(), [l, d] = _.useState(!1), [c, u] = _.useState(""), m = _.useRef(null);
|
|
1132
1132
|
_.useEffect(() => {
|
|
1133
|
-
|
|
1134
|
-
}, [
|
|
1133
|
+
l && (u(t.description), m?.current?.focus());
|
|
1134
|
+
}, [l]);
|
|
1135
1135
|
const g = async () => {
|
|
1136
|
-
|
|
1136
|
+
a(P.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1137
1137
|
transaction_guid: t.guid
|
|
1138
|
-
}), await
|
|
1138
|
+
}), await i({ ...t, description: c }), d(!1);
|
|
1139
1139
|
};
|
|
1140
|
-
return /* @__PURE__ */ e(w, { className: "mx-txn-transaction-description", children:
|
|
1140
|
+
return /* @__PURE__ */ e(w, { className: "mx-txn-transaction-description", children: l ? /* @__PURE__ */ s(je, { row: !0, children: [
|
|
1141
1141
|
/* @__PURE__ */ e(
|
|
1142
1142
|
De,
|
|
1143
1143
|
{
|
|
@@ -1151,27 +1151,27 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1151
1151
|
".MuiOutlinedInput-input": { p: 11 },
|
|
1152
1152
|
width: 250
|
|
1153
1153
|
},
|
|
1154
|
-
value:
|
|
1154
|
+
value: c
|
|
1155
1155
|
}
|
|
1156
1156
|
),
|
|
1157
1157
|
/* @__PURE__ */ e(
|
|
1158
1158
|
ce,
|
|
1159
1159
|
{
|
|
1160
|
-
disabled: !
|
|
1160
|
+
disabled: !c,
|
|
1161
1161
|
onClick: g,
|
|
1162
1162
|
sx: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
1163
1163
|
variant: "outlined",
|
|
1164
|
-
children:
|
|
1164
|
+
children: n.save_button
|
|
1165
1165
|
}
|
|
1166
1166
|
)
|
|
1167
|
-
] }) : /* @__PURE__ */
|
|
1167
|
+
] }) : /* @__PURE__ */ s(f, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1168
1168
|
/* @__PURE__ */ e(T, { bold: !0, children: t.description }),
|
|
1169
1169
|
!r && /* @__PURE__ */ e(
|
|
1170
1170
|
Q,
|
|
1171
1171
|
{
|
|
1172
1172
|
"aria-label": o.description_edit_transaction_name,
|
|
1173
1173
|
onClick: () => {
|
|
1174
|
-
d(!0),
|
|
1174
|
+
d(!0), a(h.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
|
|
1175
1175
|
},
|
|
1176
1176
|
sx: { color: "action.active" },
|
|
1177
1177
|
children: /* @__PURE__ */ e(S, { name: "create", size: 22 })
|
|
@@ -1179,16 +1179,16 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1179
1179
|
)
|
|
1180
1180
|
] }) });
|
|
1181
1181
|
}, Bt = b($t), Ft = ({ transaction: t }) => {
|
|
1182
|
-
const { updateTransaction: r } = v(), { transactions:
|
|
1183
|
-
|
|
1182
|
+
const { updateTransaction: r } = v(), { transactions: i } = A(), { onEvent: n } = L(), o = ve(), a = async () => {
|
|
1183
|
+
n(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
|
|
1184
1184
|
};
|
|
1185
1185
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1186
1186
|
qe,
|
|
1187
1187
|
{
|
|
1188
|
-
"aria-label":
|
|
1188
|
+
"aria-label": i.flag_btn_aria,
|
|
1189
1189
|
"aria-pressed": t.is_flagged,
|
|
1190
1190
|
color: "warning",
|
|
1191
|
-
onClick:
|
|
1191
|
+
onClick: a,
|
|
1192
1192
|
selected: t.is_flagged,
|
|
1193
1193
|
sx: {
|
|
1194
1194
|
borderRadius: 6,
|
|
@@ -1210,25 +1210,25 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1210
1210
|
children: /* @__PURE__ */ e(We, { color: "inherit" })
|
|
1211
1211
|
}
|
|
1212
1212
|
) });
|
|
1213
|
-
}, Ht = b(Ft), ae = (t, r,
|
|
1214
|
-
/* @__PURE__ */
|
|
1213
|
+
}, Ht = b(Ft), ae = (t, r, i, n = !0, o = "inset") => n ? /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1214
|
+
/* @__PURE__ */ s(F, { disableGutters: !0, disablePadding: !0, children: [
|
|
1215
1215
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
|
|
1216
1216
|
/* @__PURE__ */ e(
|
|
1217
1217
|
M,
|
|
1218
1218
|
{
|
|
1219
1219
|
primary: r,
|
|
1220
1220
|
primaryTypographyProps: { variant: "XSmall" },
|
|
1221
|
-
secondary:
|
|
1221
|
+
secondary: i
|
|
1222
1222
|
}
|
|
1223
1223
|
)
|
|
1224
1224
|
] }),
|
|
1225
1225
|
/* @__PURE__ */ e(Z, { variant: o })
|
|
1226
1226
|
] }) : null, zt = ({ transaction: t }) => {
|
|
1227
|
-
const { transactions: r } = A(), { tags:
|
|
1228
|
-
const o = new Map(
|
|
1229
|
-
return t.tags.map((
|
|
1230
|
-
}, [
|
|
1231
|
-
return /* @__PURE__ */
|
|
1227
|
+
const { transactions: r } = A(), { tags: i } = v(), n = _.useMemo(() => {
|
|
1228
|
+
const o = new Map(i.map((a) => [a.guid, a.name]));
|
|
1229
|
+
return t.tags.map((a) => o.get(a)).filter(Boolean).join(" / ");
|
|
1230
|
+
}, [i, t.tags]);
|
|
1231
|
+
return /* @__PURE__ */ s(J, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1232
1232
|
ae(
|
|
1233
1233
|
/* @__PURE__ */ e(
|
|
1234
1234
|
he,
|
|
@@ -1257,64 +1257,65 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1257
1257
|
ae(
|
|
1258
1258
|
/* @__PURE__ */ e(S, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1259
1259
|
r.tags_title,
|
|
1260
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ?
|
|
1260
|
+
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ? n : r.tags_desc }),
|
|
1261
1261
|
!!t.tags?.length,
|
|
1262
1262
|
"fullWidth"
|
|
1263
1263
|
)
|
|
1264
1264
|
] });
|
|
1265
1265
|
}, Ut = b(zt), Xt = ({
|
|
1266
1266
|
bottomActions: t = at,
|
|
1267
|
-
|
|
1268
|
-
|
|
1267
|
+
canFlagTransaction: r = !0,
|
|
1268
|
+
topActions: i = tt,
|
|
1269
|
+
transaction: n
|
|
1269
1270
|
}) => {
|
|
1270
|
-
const { onEvent:
|
|
1271
|
+
const { onEvent: o } = L(), { isCopyLoaded: a } = Fe(), { userFeatures: l } = He(), d = n?.number && n.number.length > 4;
|
|
1271
1272
|
if (_.useEffect(
|
|
1272
|
-
() =>
|
|
1273
|
+
() => o(P.TRANSACTION_DETAILS_VIEW, { transaction_guid: n.guid }),
|
|
1273
1274
|
[]
|
|
1274
|
-
), !
|
|
1275
|
+
), !a)
|
|
1275
1276
|
return /* @__PURE__ */ e(Ie, {});
|
|
1276
|
-
const
|
|
1277
|
-
return /* @__PURE__ */ e(w, { className: "mx-txn-transaction-details", width: "100%", children:
|
|
1278
|
-
/* @__PURE__ */
|
|
1277
|
+
const c = $e(l, "MX_TXN_DETAILS_VIEW_ONLY");
|
|
1278
|
+
return /* @__PURE__ */ e(w, { className: "mx-txn-transaction-details", width: "100%", children: n && /* @__PURE__ */ s(f, { children: [
|
|
1279
|
+
/* @__PURE__ */ s(f, { gap: 12, p: 24, children: [
|
|
1279
1280
|
/* @__PURE__ */ e(ne, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1280
1281
|
pe,
|
|
1281
1282
|
{
|
|
1282
|
-
categoryGuid:
|
|
1283
|
-
merchantGuid:
|
|
1283
|
+
categoryGuid: n.top_level_category_guid || "",
|
|
1284
|
+
merchantGuid: n.merchant_guid || "",
|
|
1284
1285
|
size: 64
|
|
1285
1286
|
}
|
|
1286
1287
|
) }),
|
|
1287
|
-
/* @__PURE__ */ e(Bt, { transaction:
|
|
1288
|
-
/* @__PURE__ */
|
|
1289
|
-
/* @__PURE__ */
|
|
1290
|
-
|
|
1291
|
-
te(
|
|
1288
|
+
/* @__PURE__ */ e(Bt, { transaction: n, viewOnly: c }),
|
|
1289
|
+
/* @__PURE__ */ s(f, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1290
|
+
/* @__PURE__ */ s(Ae, { color: n.isIncome ? "success.main" : "text.primary", children: [
|
|
1291
|
+
n.isIncome ? "+" : "",
|
|
1292
|
+
te(n.amount, "0,0.00")
|
|
1292
1293
|
] }),
|
|
1293
|
-
!
|
|
1294
|
+
!c && r && /* @__PURE__ */ e(Ht, { transaction: n })
|
|
1294
1295
|
] }),
|
|
1295
|
-
/* @__PURE__ */
|
|
1296
|
-
/* @__PURE__ */ e(T, { bold: !0, children: `${
|
|
1297
|
-
${
|
|
1298
|
-
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children:
|
|
1296
|
+
/* @__PURE__ */ s(f, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
|
|
1297
|
+
/* @__PURE__ */ e(T, { bold: !0, children: `${n.account}
|
|
1298
|
+
${d ? n.number : "•".repeat(4).concat(n.number ?? "")}` }),
|
|
1299
|
+
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children: n.feed_description })
|
|
1299
1300
|
] })
|
|
1300
1301
|
] }),
|
|
1301
|
-
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children:
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
/* @__PURE__ */ e(Z, { variant:
|
|
1307
|
-
] },
|
|
1308
|
-
!
|
|
1302
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: c ? /* @__PURE__ */ e(Ut, { transaction: n }) : /* @__PURE__ */ e(J, { children: i.map((u, m) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1303
|
+
u === q.Category && /* @__PURE__ */ e(mt, { transaction: n }),
|
|
1304
|
+
u === q.Date && /* @__PURE__ */ e(gt, { transaction: n }),
|
|
1305
|
+
u === q.Memo && /* @__PURE__ */ e(bt, { transaction: n }),
|
|
1306
|
+
u === q.Tags && /* @__PURE__ */ e(Kt, { transaction: n }),
|
|
1307
|
+
/* @__PURE__ */ e(Z, { variant: m < i.length - 1 ? "inset" : "fullWidth" })
|
|
1308
|
+
] }, u)) }) }),
|
|
1309
|
+
!c && t.length > 0 && /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1309
1310
|
/* @__PURE__ */ e(T, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
|
|
1310
|
-
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */
|
|
1311
|
-
t.map((
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
/* @__PURE__ */ e(Z, { variant:
|
|
1316
|
-
] },
|
|
1317
|
-
|
|
1311
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ s(J, { children: [
|
|
1312
|
+
t.map((u, m) => /* @__PURE__ */ s(_.Fragment, { children: [
|
|
1313
|
+
u === re.SplitTransaction && /* @__PURE__ */ e(vt, { transaction: n }),
|
|
1314
|
+
u === re.HideTransaction && /* @__PURE__ */ e(Ct, { transaction: n }),
|
|
1315
|
+
u === re.MerchantLogo && /* @__PURE__ */ e(yt, { transaction: n }),
|
|
1316
|
+
/* @__PURE__ */ e(Z, { variant: m < t.length - 1 ? "inset" : "fullWidth" })
|
|
1317
|
+
] }, u)),
|
|
1318
|
+
n.is_manual && !n.parent_guid && !n.has_been_split && /* @__PURE__ */ e(ht, { transaction: n })
|
|
1318
1319
|
] }) })
|
|
1319
1320
|
] })
|
|
1320
1321
|
] }) });
|