@mx-cartographer/experiences 7.2.22 → 7.2.23-alpha.sms10
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 +6 -0
- package/dist/{AccountDetailsContent-DIGzsjAD.mjs → AccountDetailsContent-B6ZFRZ8l.mjs} +1 -1
- package/dist/{AccountStore-BkoLK9Tq.mjs → AccountStore-CQq_wjS5.mjs} +1 -1
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-DPdX5vY1.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-Djk0ejxo.mjs} +1 -1
- package/dist/{CategoryStore-BCcpI3oJ.mjs → CategoryStore-kLwSKX0v.mjs} +1 -1
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-Dvrk8r_y.mjs} +25 -20
- package/dist/{FinstrongStore-F2c607dj.mjs → FinstrongStore-CA_w8Yx6.mjs} +1 -1
- package/dist/{GoalStore-DZ_Jvsa_.mjs → GoalStore-CUgc_8Us.mjs} +1 -1
- package/dist/{ManageIncome-B7RqkNz5.mjs → ManageIncome-CXeJPfjE.mjs} +1 -1
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-Ca0snF85.mjs} +1 -1
- package/dist/{NotificationStore-86g0bKKR.mjs → NotificationStore-DpA4IVq9.mjs} +1 -1
- package/dist/{RecurringSettings-CaQJvUPQ.mjs → RecurringSettings-D7476j-N.mjs} +1 -1
- package/dist/{RecurringTransactionsStore-DrzS1LmF.mjs → RecurringTransactionsStore-CXTYd5u7.mjs} +1 -1
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BmgZgoX1.mjs} +2 -2
- package/dist/TransactionApi-CFXvaV0r.mjs +86 -0
- package/dist/{TransactionDetails-gdzlKeDG.mjs → TransactionDetails-Cscyr17P.mjs} +286 -285
- package/dist/{TransactionStore-hfOsBbDt.mjs → TransactionStore-ZXqYJfC_.mjs} +2 -2
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-CFsRDIBi.mjs} +2 -2
- package/dist/accounts/index.es.js +3 -3
- package/dist/budgets/index.es.js +2 -2
- package/dist/cashflow/index.es.js +4 -4
- package/dist/categories/index.es.js +1 -1
- package/dist/common/index.es.js +267 -257
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/finstrong/index.es.js +2 -2
- package/dist/goals/index.es.js +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/merchants/index.es.js +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/notifications/index.es.js +3 -3
- package/dist/recurringtransactions/index.es.js +6 -6
- package/dist/settings/index.es.js +1 -1
- package/dist/spending/index.es.js +1 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/index.es.js +5 -5
- package/dist/trends/index.es.js +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-BNicKW7e.mjs} +1 -1
- package/package.json +1 -1
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import _ from "react";
|
|
3
3
|
import { observer as A } from "mobx-react-lite";
|
|
4
4
|
import { useVirtualizer as Re } 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 } = w(), { expandedSplits: a } = G(), { transactions: o } = x(), { showInsights: n } = G(), s = 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__ */ l(
|
|
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 && a.includes(t.parent_guid) ? /* @__PURE__ */ e(_.Fragment, {}) : /* @__PURE__ */ e(
|
|
84
84
|
ge,
|
|
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__ */ l(b, { direction: "row", justifyContent: "space-between", children: [
|
|
95
|
+
/* @__PURE__ */ l(b, { alignItems: "center", direction: "row", gap: 4, children: [
|
|
96
96
|
t.is_flagged && /* @__PURE__ */ e(C, { fill: !0, name: "flag", size: 16, sx: { color: "warning.dark" } }),
|
|
97
97
|
t.is_hidden && /* @__PURE__ */ e(C, { name: "visibility_off", size: 16 }),
|
|
98
98
|
t.has_been_split && /* @__PURE__ */ e(C, { 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
|
-
|
|
101
|
+
d && n && /* @__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
|
-
children:
|
|
110
|
+
children: d.short_title
|
|
111
111
|
}
|
|
112
112
|
)
|
|
113
113
|
] }),
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ l(b, { direction: "row", justifyContent: "space-between", sx: { gap: 8 }, children: [
|
|
115
|
+
/* @__PURE__ */ l(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__ */ l(
|
|
120
120
|
T,
|
|
121
121
|
{
|
|
122
122
|
bold: !0,
|
|
123
|
-
color:
|
|
123
|
+
color: s ? "success.main" : "text.primary",
|
|
124
124
|
sx: { flexShrink: 0 },
|
|
125
125
|
variant: "Body",
|
|
126
126
|
children: [
|
|
127
|
-
|
|
127
|
+
s ? "+" : "",
|
|
128
128
|
te(t.amount, "0,0.00")
|
|
129
129
|
]
|
|
130
130
|
}
|
|
@@ -140,34 +140,34 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
140
140
|
bgcolor: t = "background.default",
|
|
141
141
|
children: r
|
|
142
142
|
}) => /* @__PURE__ */ e(v, { 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: a } = x();
|
|
144
|
+
return /* @__PURE__ */ l(b, { 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: a.zero_state_no_transactions }),
|
|
147
|
+
r && /* @__PURE__ */ e(T, { color: "secondary", variant: "XSmall", children: a.zero_state_there_are_no_transactions })
|
|
148
148
|
] });
|
|
149
149
|
}, dt = A(ct), Se = (t, r) => {
|
|
150
|
-
const
|
|
151
|
-
return !Ne(
|
|
150
|
+
const i = W(r[t].date), a = W(r[t - 1]?.date);
|
|
151
|
+
return !Ne(i, a);
|
|
152
152
|
}, _t = (t, r) => {
|
|
153
|
-
const
|
|
154
|
-
return Ne(
|
|
153
|
+
const i = W(r[t].date), a = W(r[t + 1]?.date);
|
|
154
|
+
return Ne(i, a);
|
|
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: a = /* @__PURE__ */ e(Ie, { label: "Loading", size: 40 }),
|
|
160
160
|
onClick: o,
|
|
161
161
|
showInsights: n = !1,
|
|
162
|
-
showLoader:
|
|
163
|
-
showHiddenTransactions:
|
|
164
|
-
width:
|
|
162
|
+
showLoader: s = !1,
|
|
163
|
+
showHiddenTransactions: d = !1,
|
|
164
|
+
width: c = "100%",
|
|
165
165
|
zeroState: u = /* @__PURE__ */ e(dt, {})
|
|
166
166
|
}) => {
|
|
167
167
|
const { isLoading: m, sortedTransactions: p } = w(), g = _.useMemo(() => {
|
|
168
168
|
const I = r ? p.filter(r) : p;
|
|
169
|
-
return
|
|
170
|
-
}, [p,
|
|
169
|
+
return d ? I : I.filter((R) => !R.is_hidden);
|
|
170
|
+
}, [p, d]), { clearExpandedSplits: S, setShowInsights: y, toggleSplit: N } = G(), { onEvent: f } = L(), k = (I) => {
|
|
171
171
|
const R = g.find((Y) => Y.guid === I);
|
|
172
172
|
if (R?.has_been_split) {
|
|
173
173
|
N(R.guid);
|
|
@@ -183,7 +183,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
183
183
|
estimateSize: (I) => Ce + (Se(I, g) ? fe : 0),
|
|
184
184
|
overscan: 5
|
|
185
185
|
});
|
|
186
|
-
return _.useEffect(() => $.measure(), [g]), _.useEffect(() => y(n), [n]), _.useEffect(() => () => S(), []), /* @__PURE__ */ e(J, { sx: { width:
|
|
186
|
+
return _.useEffect(() => $.measure(), [g]), _.useEffect(() => y(n), [n]), _.useEffect(() => () => S(), []), /* @__PURE__ */ e(J, { sx: { width: c }, children: /* @__PURE__ */ e(v, { height: i, overflow: "auto", ref: K, width: c, children: /* @__PURE__ */ l(
|
|
187
187
|
v,
|
|
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 || s) && a,
|
|
197
|
+
!m && !s && $.getVirtualItems().length === 0 && u,
|
|
198
|
+
!m && !s && $.getVirtualItems().length > 0 && $.getVirtualItems().map((I) => {
|
|
199
199
|
const R = g[I.index], Y = Se(I.index, g), _e = _t(I.index, g), ue = Ce + (Y ? fe : 0);
|
|
200
|
-
return /* @__PURE__ */
|
|
200
|
+
return /* @__PURE__ */ l(
|
|
201
201
|
v,
|
|
202
202
|
{
|
|
203
203
|
sx: {
|
|
@@ -219,14 +219,14 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
219
219
|
}
|
|
220
220
|
) }) });
|
|
221
221
|
}, Ra = A(ut), mt = ({ transaction: t }) => {
|
|
222
|
-
const { addOrUpdateTransactionRule: r, updateTransaction:
|
|
223
|
-
await
|
|
222
|
+
const { addOrUpdateTransactionRule: r, updateTransaction: i } = w(), { categories: a } = xe(), { onEvent: o } = L(), { setShouldDisableDrawerScroll: n, updateManualTransaction: s } = G(), { transactions: d } = x(), [c, u] = _.useState(!1), [m, p] = _.useState(""), g = async (f) => {
|
|
223
|
+
await i({ ...t, category_guid: m }), f && await r(m, t), p(""), o(P.TRANSACTION_DETAILS_CLICK_CATEGORY, {
|
|
224
224
|
transaction_guid: t.guid
|
|
225
225
|
});
|
|
226
226
|
}, S = (f) => {
|
|
227
227
|
if (t.is_manual && !t.guid) {
|
|
228
|
-
const k =
|
|
229
|
-
|
|
228
|
+
const k = a.find((K) => K.guid === f);
|
|
229
|
+
s({
|
|
230
230
|
...t,
|
|
231
231
|
category: k?.name,
|
|
232
232
|
category_guid: f,
|
|
@@ -238,11 +238,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
238
238
|
}, y = () => {
|
|
239
239
|
u(!1), n(!1);
|
|
240
240
|
}, N = _.useMemo(
|
|
241
|
-
() =>
|
|
241
|
+
() => a.find((f) => f.guid === m),
|
|
242
242
|
[m]
|
|
243
243
|
);
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ l(_.Fragment, { children: [
|
|
245
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
246
246
|
U,
|
|
247
247
|
{
|
|
248
248
|
onClick: () => {
|
|
@@ -261,9 +261,9 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
261
261
|
/* @__PURE__ */ e(
|
|
262
262
|
M,
|
|
263
263
|
{
|
|
264
|
-
primary:
|
|
264
|
+
primary: d.category_title,
|
|
265
265
|
primaryTypographyProps: { variant: "XSmall" },
|
|
266
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ??
|
|
266
|
+
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.category ?? d.actions_select_a_category })
|
|
267
267
|
}
|
|
268
268
|
),
|
|
269
269
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
@@ -276,8 +276,8 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
276
276
|
initialSelected: t.category_guid,
|
|
277
277
|
onClose: y,
|
|
278
278
|
onSelect: S,
|
|
279
|
-
showDrawer:
|
|
280
|
-
title:
|
|
279
|
+
showDrawer: c,
|
|
280
|
+
title: d.actions_select_a_category
|
|
281
281
|
}
|
|
282
282
|
),
|
|
283
283
|
/* @__PURE__ */ e(
|
|
@@ -285,7 +285,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
285
285
|
{
|
|
286
286
|
copy: {
|
|
287
287
|
title: se(
|
|
288
|
-
|
|
288
|
+
d.actions_apply_to_all_transaction_types,
|
|
289
289
|
t.description
|
|
290
290
|
)
|
|
291
291
|
},
|
|
@@ -293,10 +293,10 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
293
293
|
onClose: () => p(""),
|
|
294
294
|
onPrimaryAction: () => g(!0),
|
|
295
295
|
onSecondaryAction: () => g(!1),
|
|
296
|
-
primaryText:
|
|
297
|
-
secondaryText:
|
|
296
|
+
primaryText: d.actions_apply_to_all,
|
|
297
|
+
secondaryText: d.actions_this_time_only,
|
|
298
298
|
children: /* @__PURE__ */ e(le, { variant: "Paragraph", children: se(
|
|
299
|
-
|
|
299
|
+
d.actions_all_past_and_future,
|
|
300
300
|
t.description,
|
|
301
301
|
N?.name
|
|
302
302
|
) })
|
|
@@ -304,28 +304,28 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
304
304
|
)
|
|
305
305
|
] });
|
|
306
306
|
}, pt = ({ transaction: t }) => {
|
|
307
|
-
const r = ee(), { onEvent:
|
|
307
|
+
const r = ee(), { onEvent: i } = L(), { updateTransaction: a } = w(), { updateManualTransaction: o } = G(), { common: n, transactions: s } = x(), [d, c] = _.useState(!1), [u, m] = _.useState(t.date), p = (S) => {
|
|
308
308
|
m(Ze(S));
|
|
309
309
|
}, g = 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 a({ ...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__ */ l(v, { className: "mx-txn-date-action", children: [
|
|
317
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
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(C, { name: "calendar_month", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
325
325
|
/* @__PURE__ */ e(
|
|
326
326
|
M,
|
|
327
327
|
{
|
|
328
|
-
primary:
|
|
328
|
+
primary: s.date_title,
|
|
329
329
|
primaryTypographyProps: { variant: "XSmall" },
|
|
330
330
|
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: we(W(t.date), Ee.YEAR_MONTH_DAY) })
|
|
331
331
|
}
|
|
@@ -338,19 +338,19 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
338
338
|
de,
|
|
339
339
|
{
|
|
340
340
|
ariaLabelClose: n.close_aria,
|
|
341
|
-
isOpen:
|
|
342
|
-
onClose: () =>
|
|
341
|
+
isOpen: d,
|
|
342
|
+
onClose: () => c(!1),
|
|
343
343
|
onPrimaryAction: g,
|
|
344
344
|
primaryText: n.save_button,
|
|
345
345
|
secondaryText: n.cancel_button,
|
|
346
|
-
title:
|
|
346
|
+
title: s.date_edit_title,
|
|
347
347
|
children: /* @__PURE__ */ e(b, { 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:
|
|
352
|
+
nextAria: s.date_next_aria,
|
|
353
|
+
prevAria: s.date_prev_aria,
|
|
354
354
|
today: n.date_range_picker.today
|
|
355
355
|
},
|
|
356
356
|
onDateSelected: p,
|
|
@@ -361,15 +361,15 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
361
361
|
)
|
|
362
362
|
] });
|
|
363
363
|
}, gt = ({ transaction: t }) => {
|
|
364
|
-
const { onEvent: r } = L(), { removeTransaction:
|
|
365
|
-
await
|
|
364
|
+
const { onEvent: r } = L(), { removeTransaction: i } = w(), { setShouldDisableDrawerScroll: a } = G(), { common: o, transactions: n } = x(), [s, 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__ */ l(v, { className: "mx-txn-delete", children: [
|
|
368
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
369
369
|
U,
|
|
370
370
|
{
|
|
371
371
|
onClick: () => {
|
|
372
|
-
r(h.ON_TRANSACTION_DELETE_CLICK),
|
|
372
|
+
r(h.ON_TRANSACTION_DELETE_CLICK), a(!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" }) }) }),
|
|
@@ -388,11 +388,11 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
388
388
|
V,
|
|
389
389
|
{
|
|
390
390
|
copy: { title: n.manual_transaction_delete_title },
|
|
391
|
-
isOpen:
|
|
391
|
+
isOpen: s,
|
|
392
392
|
onClose: () => {
|
|
393
|
-
|
|
393
|
+
a(!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,
|
|
@@ -401,17 +401,17 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
401
401
|
)
|
|
402
402
|
] });
|
|
403
403
|
}, ht = A(gt), Tt = ({ transaction: t }) => {
|
|
404
|
-
const { onEvent: r } = L(), { updateTransaction:
|
|
405
|
-
await
|
|
404
|
+
const { onEvent: r } = L(), { updateTransaction: i } = w(), { setShouldDisableDrawerScroll: a } = G(), { common: o, transactions: n } = x(), [s, 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__ */ l(v, { className: "mx-txn-delete-logo", children: [
|
|
410
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
411
411
|
U,
|
|
412
412
|
{
|
|
413
413
|
onClick: () => {
|
|
414
|
-
r(h.ON_TRANSACTION_DELETE_LOGO_CLICK),
|
|
414
|
+
r(h.ON_TRANSACTION_DELETE_LOGO_CLICK), d(!0);
|
|
415
415
|
},
|
|
416
416
|
children: [
|
|
417
417
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "delete", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
@@ -420,15 +420,15 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
420
420
|
]
|
|
421
421
|
}
|
|
422
422
|
) }),
|
|
423
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ l(
|
|
424
424
|
V,
|
|
425
425
|
{
|
|
426
426
|
copy: { title: n.merchant_logo_modal_title },
|
|
427
|
-
isOpen:
|
|
427
|
+
isOpen: s,
|
|
428
428
|
onClose: () => {
|
|
429
|
-
|
|
429
|
+
a(!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,
|
|
@@ -441,29 +441,29 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
441
441
|
)
|
|
442
442
|
] });
|
|
443
443
|
}, yt = A(Tt), St = ({ transaction: t }) => {
|
|
444
|
-
const { onEvent: r } = L(), { updateTransaction:
|
|
445
|
-
await
|
|
446
|
-
|
|
444
|
+
const { onEvent: r } = L(), { updateTransaction: i } = w(), { setShouldDisableDrawerScroll: a } = G(), { common: o, transactions: n } = x(), [s, 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__ */ l(v, { className: "mx-txn-hide-transaction", children: [
|
|
450
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
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
|
}
|
|
462
|
-
),
|
|
462
|
+
), d(!0);
|
|
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
|
C,
|
|
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 ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx,
|
|
478
|
+
secondary: c ? n.hide_trnx_desc_unhiding : n.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,59 +494,59 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
494
494
|
V,
|
|
495
495
|
{
|
|
496
496
|
copy: {
|
|
497
|
-
title:
|
|
497
|
+
title: c ? n.hide_trnx_subtitle_unhide_trnx : n.hide_trnx_subtitle_hide_trnx
|
|
498
498
|
},
|
|
499
|
-
isOpen:
|
|
499
|
+
isOpen: s,
|
|
500
500
|
onClose: () => {
|
|
501
|
-
|
|
501
|
+
a(!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 ? n.hide_trnx_desc_unhiding : n.hide_trnx_desc_hiding })
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
] });
|
|
513
513
|
}, Ct = A(St), Le = ({ transaction: t }) => {
|
|
514
|
-
const { amount: r, description:
|
|
515
|
-
return /* @__PURE__ */
|
|
514
|
+
const { amount: r, description: i, isIncome: a, merchant_guid: o, payee: n, top_level_category_guid: s } = t;
|
|
515
|
+
return /* @__PURE__ */ l(b, { className: "mx-txn-amount-header", direction: "row", gap: 12, px: 16, py: 24, children: [
|
|
516
516
|
/* @__PURE__ */ e(
|
|
517
517
|
ge,
|
|
518
518
|
{
|
|
519
|
-
categoryGuid:
|
|
519
|
+
categoryGuid: s || "",
|
|
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__ */ l(b, { overflow: "hidden'", children: [
|
|
525
|
+
/* @__PURE__ */ e(T, { bold: !0, mb: 4, truncate: !0, variant: "Body", children: i || n }),
|
|
526
|
+
/* @__PURE__ */ l(Ae, { color: a ? "success.main" : "text.primary", truncate: !0, children: [
|
|
527
|
+
a ? "+" : "",
|
|
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 } = w(), { updateManualTransaction: a } = G(), { common: o, transactions: n } = x(), [s, d] = _.useState(!1), [c, u] = _.useState("");
|
|
534
534
|
_.useEffect(() => {
|
|
535
|
-
|
|
536
|
-
}, [
|
|
535
|
+
s && u(t.memo ? t.memo : "");
|
|
536
|
+
}, [s]);
|
|
537
537
|
const m = async () => {
|
|
538
538
|
if (t.is_manual && !t.guid) {
|
|
539
|
-
|
|
539
|
+
a({ ...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__ */ l("div", { className: "mx-txn-memo-action", children: [
|
|
545
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
546
546
|
U,
|
|
547
547
|
{
|
|
548
548
|
onClick: () => {
|
|
549
|
-
r(h.ON_TRANSACTION_MEMO_CLICK),
|
|
549
|
+
r(h.ON_TRANSACTION_MEMO_CLICK), d(!0);
|
|
550
550
|
},
|
|
551
551
|
children: [
|
|
552
552
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "article", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
@@ -570,12 +570,12 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
570
570
|
]
|
|
571
571
|
}
|
|
572
572
|
) }),
|
|
573
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ l(
|
|
574
574
|
de,
|
|
575
575
|
{
|
|
576
576
|
ariaLabelClose: o.close_aria,
|
|
577
|
-
isOpen:
|
|
578
|
-
onClose: () =>
|
|
577
|
+
isOpen: s,
|
|
578
|
+
onClose: () => d(!1),
|
|
579
579
|
onPrimaryAction: m,
|
|
580
580
|
title: n.memo_title,
|
|
581
581
|
children: [
|
|
@@ -592,7 +592,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
592
592
|
placeholder: n.memo_desc,
|
|
593
593
|
rows: 4,
|
|
594
594
|
sx: { px: 16 },
|
|
595
|
-
value:
|
|
595
|
+
value: c
|
|
596
596
|
}
|
|
597
597
|
)
|
|
598
598
|
]
|
|
@@ -600,15 +600,15 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
600
600
|
)
|
|
601
601
|
] });
|
|
602
602
|
}, bt = A(ft), At = (t = "polite") => {
|
|
603
|
-
const [r,
|
|
604
|
-
|
|
605
|
-
}, []),
|
|
603
|
+
const [r, i] = _.useState(""), [a, o] = _.useState(t), n = _.useCallback((d, c) => {
|
|
604
|
+
c && o(c), i(d);
|
|
605
|
+
}, []), s = _.useMemo(
|
|
606
606
|
() => /* @__PURE__ */ e(
|
|
607
607
|
v,
|
|
608
608
|
{
|
|
609
609
|
"aria-atomic": "true",
|
|
610
|
-
"aria-live":
|
|
611
|
-
role:
|
|
610
|
+
"aria-live": a,
|
|
611
|
+
role: a === "assertive" ? "alert" : "status",
|
|
612
612
|
sx: {
|
|
613
613
|
position: "absolute",
|
|
614
614
|
width: "1px",
|
|
@@ -624,20 +624,20 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
624
624
|
children: r
|
|
625
625
|
}
|
|
626
626
|
),
|
|
627
|
-
[r,
|
|
627
|
+
[r, a]
|
|
628
628
|
);
|
|
629
|
-
return { announce: n, ariaLive:
|
|
629
|
+
return { announce: n, ariaLive: s };
|
|
630
630
|
}, xt = ({
|
|
631
631
|
index: t,
|
|
632
632
|
onDeleteRow: r,
|
|
633
|
-
onCategoryChanged:
|
|
634
|
-
onUpdateAmount:
|
|
633
|
+
onCategoryChanged: i,
|
|
634
|
+
onUpdateAmount: a,
|
|
635
635
|
split: o
|
|
636
636
|
}) => {
|
|
637
|
-
const n = ee(), { onEvent:
|
|
638
|
-
isNaN(Number(y)) || (u(y),
|
|
637
|
+
const n = ee(), { onEvent: s } = L(), { transactions: d } = x(), [c, u] = _.useState(`${o.amount}`), [m, p] = _.useState(!1), g = t === 0, S = (y) => {
|
|
638
|
+
isNaN(Number(y)) || (u(y), a(t, Number(y)));
|
|
639
639
|
};
|
|
640
|
-
return /* @__PURE__ */
|
|
640
|
+
return /* @__PURE__ */ l(
|
|
641
641
|
v,
|
|
642
642
|
{
|
|
643
643
|
bgcolor: "background.paper",
|
|
@@ -645,8 +645,8 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
645
645
|
pb: n.Spacing.Tiny,
|
|
646
646
|
px: n.Spacing.XSmall,
|
|
647
647
|
children: [
|
|
648
|
-
/* @__PURE__ */
|
|
649
|
-
/* @__PURE__ */ e(pe, { item: !0, xs: 7, children: /* @__PURE__ */
|
|
648
|
+
/* @__PURE__ */ l(pe, { alignItems: g ? "center" : "start", container: !0, children: [
|
|
649
|
+
/* @__PURE__ */ e(pe, { item: !0, xs: 7, children: /* @__PURE__ */ l(b, { alignItems: "start", children: [
|
|
650
650
|
/* @__PURE__ */ e(
|
|
651
651
|
ce,
|
|
652
652
|
{
|
|
@@ -657,7 +657,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
657
657
|
children: o.category
|
|
658
658
|
}
|
|
659
659
|
),
|
|
660
|
-
/* @__PURE__ */ e(v, { children: !o.category_guid && /* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ e(v, { children: !o.category_guid && /* @__PURE__ */ l(
|
|
661
661
|
b,
|
|
662
662
|
{
|
|
663
663
|
color: "error.main",
|
|
@@ -666,18 +666,18 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
666
666
|
p: n.Spacing.Small,
|
|
667
667
|
children: [
|
|
668
668
|
/* @__PURE__ */ e(ie, { sx: { fontSize: n.FontSize.Body } }),
|
|
669
|
-
/* @__PURE__ */ e(T, { variant: "Small", children:
|
|
669
|
+
/* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_select_category })
|
|
670
670
|
]
|
|
671
671
|
}
|
|
672
672
|
) })
|
|
673
673
|
] }) }),
|
|
674
|
-
/* @__PURE__ */ e(pe, { item: !0, xs: 5, children: g ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: te(o.amount, "0,0.00") }) }) : /* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ e(pe, { item: !0, xs: 5, children: g ? /* @__PURE__ */ e("div", { className: "mx-txn-split-manager-row-top-container", children: /* @__PURE__ */ e(T, { children: te(o.amount, "0,0.00") }) }) : /* @__PURE__ */ l(b, { alignItems: "start", children: [
|
|
675
|
+
/* @__PURE__ */ l(b, { alignItems: "start", direction: "row", gap: n.Spacing.XSmall, children: [
|
|
676
676
|
/* @__PURE__ */ e(
|
|
677
677
|
Qe,
|
|
678
678
|
{
|
|
679
|
-
amount:
|
|
680
|
-
ariaLabel:
|
|
679
|
+
amount: c,
|
|
680
|
+
ariaLabel: d.split_transaction_edit_split_amount,
|
|
681
681
|
name: "split-amount-input",
|
|
682
682
|
setAmount: S,
|
|
683
683
|
sx: {
|
|
@@ -689,17 +689,17 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
689
689
|
/* @__PURE__ */ e(
|
|
690
690
|
Q,
|
|
691
691
|
{
|
|
692
|
-
"aria-label":
|
|
692
|
+
"aria-label": d.split_transaction_delete_split_btn,
|
|
693
693
|
color: "secondary",
|
|
694
694
|
onClick: () => {
|
|
695
|
-
|
|
695
|
+
s(h.ON_TRANSACTION_SPLIT_DELETE_CLICK), r(t);
|
|
696
696
|
},
|
|
697
697
|
sx: { w: 44, h: 44 },
|
|
698
698
|
children: /* @__PURE__ */ e(oe, {})
|
|
699
699
|
}
|
|
700
700
|
)
|
|
701
701
|
] }),
|
|
702
|
-
!
|
|
702
|
+
!c && /* @__PURE__ */ l(
|
|
703
703
|
b,
|
|
704
704
|
{
|
|
705
705
|
color: "error.main",
|
|
@@ -708,7 +708,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
708
708
|
py: n.Spacing.Small,
|
|
709
709
|
children: [
|
|
710
710
|
/* @__PURE__ */ e(ie, { sx: { fontSize: n.FontSize.Body } }),
|
|
711
|
-
/* @__PURE__ */ e(T, { variant: "Small", children:
|
|
711
|
+
/* @__PURE__ */ e(T, { variant: "Small", children: d.split_transaction_errors_enter_an_amount })
|
|
712
712
|
]
|
|
713
713
|
}
|
|
714
714
|
)
|
|
@@ -720,10 +720,10 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
720
720
|
initialSelected: o.category_guid,
|
|
721
721
|
onClose: () => p(!1),
|
|
722
722
|
onSelect: (y) => {
|
|
723
|
-
|
|
723
|
+
i(t, y), p(!1);
|
|
724
724
|
},
|
|
725
725
|
showDrawer: m,
|
|
726
|
-
title:
|
|
726
|
+
title: d.actions_select_a_category
|
|
727
727
|
}
|
|
728
728
|
)
|
|
729
729
|
]
|
|
@@ -732,62 +732,62 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
732
732
|
}, Nt = A(xt), It = ({
|
|
733
733
|
onAddSplit: t,
|
|
734
734
|
onCategoryChanged: r,
|
|
735
|
-
onDeleteSplit:
|
|
736
|
-
onUpdateAmount:
|
|
735
|
+
onDeleteSplit: i,
|
|
736
|
+
onUpdateAmount: a,
|
|
737
737
|
splits: o,
|
|
738
738
|
transaction: n
|
|
739
739
|
}) => {
|
|
740
|
-
const
|
|
740
|
+
const s = ee(), { transactions: d } = x(), { onEvent: c } = L(), [u, m] = _.useState(""), { announce: p, ariaLive: g } = At();
|
|
741
741
|
return _.useEffect(() => {
|
|
742
742
|
if (o.length <= 1)
|
|
743
|
-
m(
|
|
743
|
+
m(d.split_transaction_errors_min_splits), p(d.split_transaction_errors_min_splits);
|
|
744
744
|
else if (o[0].amount < 0) {
|
|
745
745
|
const S = se(
|
|
746
|
-
|
|
746
|
+
d.split_transaction_errors_totals_must_equal_amount,
|
|
747
747
|
te(n.amount, "0,0.00")
|
|
748
748
|
);
|
|
749
749
|
m(S), p(S);
|
|
750
750
|
} else
|
|
751
751
|
m(""), p("");
|
|
752
|
-
}, [o]), /* @__PURE__ */
|
|
752
|
+
}, [o]), /* @__PURE__ */ l(v, { className: "mx-txn-split-manager", children: [
|
|
753
753
|
o.map((S, y) => /* @__PURE__ */ e(
|
|
754
754
|
Nt,
|
|
755
755
|
{
|
|
756
756
|
index: y,
|
|
757
757
|
onCategoryChanged: r,
|
|
758
|
-
onDeleteRow:
|
|
759
|
-
onUpdateAmount:
|
|
758
|
+
onDeleteRow: i,
|
|
759
|
+
onUpdateAmount: a,
|
|
760
760
|
split: S
|
|
761
761
|
},
|
|
762
762
|
y
|
|
763
763
|
)),
|
|
764
|
-
u && /* @__PURE__ */
|
|
764
|
+
u && /* @__PURE__ */ l(
|
|
765
765
|
b,
|
|
766
766
|
{
|
|
767
767
|
color: "error.main",
|
|
768
768
|
direction: "row",
|
|
769
|
-
gap:
|
|
770
|
-
p:
|
|
769
|
+
gap: s.Spacing.XSmall,
|
|
770
|
+
p: s.Spacing.Medium,
|
|
771
771
|
children: [
|
|
772
|
-
/* @__PURE__ */ e(ie, { sx: { fontSize:
|
|
772
|
+
/* @__PURE__ */ e(ie, { sx: { fontSize: s.FontSize.Body } }),
|
|
773
773
|
/* @__PURE__ */ e(T, { variant: "Small", children: u }),
|
|
774
774
|
g
|
|
775
775
|
]
|
|
776
776
|
}
|
|
777
777
|
),
|
|
778
|
-
/* @__PURE__ */ e(v, { p:
|
|
778
|
+
/* @__PURE__ */ e(v, { p: s.Spacing.Medium, children: /* @__PURE__ */ e(
|
|
779
779
|
ce,
|
|
780
780
|
{
|
|
781
|
-
"aria-label":
|
|
781
|
+
"aria-label": d.split_transaction_add_split_btn,
|
|
782
782
|
onClick: () => {
|
|
783
|
-
|
|
783
|
+
c(h.ON_TRANSACTION_SPLIT_ADD_CLICK), t();
|
|
784
784
|
},
|
|
785
|
-
children:
|
|
785
|
+
children: d.split_transaction_add_split_btn
|
|
786
786
|
}
|
|
787
787
|
) })
|
|
788
788
|
] });
|
|
789
789
|
}, vt = A(It), Dt = ({ transaction: t }) => {
|
|
790
|
-
const { onEvent: r } = L(), { splitTransaction:
|
|
790
|
+
const { onEvent: r } = L(), { splitTransaction: i, unSplitTransaction: a } = w(), { common: o, transactions: n } = x(), { setShouldDisableDrawerScroll: s } = G(), { categories: d } = xe(), c = {
|
|
791
791
|
...t,
|
|
792
792
|
amount: t.amount - 1,
|
|
793
793
|
guid: "",
|
|
@@ -817,7 +817,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
817
817
|
0
|
|
818
818
|
), N(O);
|
|
819
819
|
}, $ = (E, H) => {
|
|
820
|
-
const O = [...y], j =
|
|
820
|
+
const O = [...y], j = d.find((me) => me.guid === H);
|
|
821
821
|
j && (O[E] = {
|
|
822
822
|
...O[E],
|
|
823
823
|
category_guid: H,
|
|
@@ -829,25 +829,25 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
829
829
|
S(!0);
|
|
830
830
|
return;
|
|
831
831
|
}
|
|
832
|
-
N([{ ...
|
|
832
|
+
N([{ ...c }, { ...u }]), r(P.TRANSACTION_DETAILS_CLICK_SPLIT, {
|
|
833
833
|
transaction_guid: t.guid
|
|
834
834
|
}), p(!0);
|
|
835
835
|
}, R = async () => {
|
|
836
|
-
r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await
|
|
836
|
+
r(h.ON_TRANSACTION_SPLIT_SAVE_CLICK), await i({ ...t, has_been_split: !0 }, y), p(!1);
|
|
837
837
|
}, Y = async () => {
|
|
838
|
-
r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...
|
|
838
|
+
r(h.ON_TRANSACTION_SPLIT_CANCEL_CLICK), N([{ ...c }, { ...u }]), p(!1);
|
|
839
839
|
}, _e = async () => {
|
|
840
840
|
r(P.TRANSACTION_DETAILS_CLICK_UNSPLIT, {
|
|
841
841
|
transaction_guid: t.guid
|
|
842
842
|
});
|
|
843
843
|
const E = t.parent_guid ?? t.guid;
|
|
844
|
-
await
|
|
844
|
+
await a(E);
|
|
845
845
|
}, ue = _.useMemo(() => {
|
|
846
846
|
const E = y.some((O) => !O.category_guid), H = y.some((O) => O.amount <= 0);
|
|
847
847
|
return E || H;
|
|
848
848
|
}, [y]);
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
849
|
+
return /* @__PURE__ */ l(_.Fragment, { children: [
|
|
850
|
+
t && /* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(U, { onClick: I, children: [
|
|
851
851
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: /* @__PURE__ */ e(C, { name: "call_split", sx: { color: "text.primary" }, weight: D.Dark }) }) }),
|
|
852
852
|
/* @__PURE__ */ e(
|
|
853
853
|
M,
|
|
@@ -858,7 +858,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
858
858
|
),
|
|
859
859
|
/* @__PURE__ */ e(X, { children: t.has_been_split || t.parent_guid ? /* @__PURE__ */ e(C, { name: "delete", weight: D.Dark }) : /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
860
860
|
] }) }),
|
|
861
|
-
/* @__PURE__ */
|
|
861
|
+
/* @__PURE__ */ l(
|
|
862
862
|
de,
|
|
863
863
|
{
|
|
864
864
|
ariaLabelClose: o.close_aria,
|
|
@@ -891,7 +891,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
891
891
|
copy: { title: n.split_transaction_unsplit_title },
|
|
892
892
|
isOpen: g,
|
|
893
893
|
onClose: () => {
|
|
894
|
-
|
|
894
|
+
s(!1), S(!1);
|
|
895
895
|
},
|
|
896
896
|
onPrimaryAction: _e,
|
|
897
897
|
onSecondaryAction: () => {
|
|
@@ -907,21 +907,21 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
907
907
|
)
|
|
908
908
|
] });
|
|
909
909
|
}, wt = A(Dt), Et = () => {
|
|
910
|
-
const t = De(), { onEvent: r } = L(), { addTag:
|
|
910
|
+
const t = De(), { onEvent: r } = L(), { addTag: i } = w(), { transactions: a } = x(), [o, n] = _.useState(!1), [s, d] = _.useState(""), [c, u] = _.useState(""), m = _.useRef(null);
|
|
911
911
|
_.useEffect(() => {
|
|
912
912
|
o && m?.current?.focus();
|
|
913
913
|
}, [o]);
|
|
914
914
|
const p = () => {
|
|
915
915
|
r(
|
|
916
916
|
o ? h.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK : h.ON_TRANSACTION_TAGS_TAG_ADD_CLICK
|
|
917
|
-
), o ||
|
|
917
|
+
), o || d(""), n(!o);
|
|
918
918
|
}, g = async () => {
|
|
919
|
-
r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await
|
|
919
|
+
r(h.ON_TRANSACTION_TAGS_TAG_ADDED), await i(s), n(!1);
|
|
920
920
|
};
|
|
921
921
|
return _.useEffect(() => {
|
|
922
|
-
u(
|
|
923
|
-
}, [
|
|
924
|
-
/* @__PURE__ */
|
|
922
|
+
u(s.length > 40 ? a.tags_error_name_must_be_40_chars : "");
|
|
923
|
+
}, [s]), /* @__PURE__ */ l(v, { className: "mx-txn-tag-manager-header", children: [
|
|
924
|
+
/* @__PURE__ */ l(
|
|
925
925
|
b,
|
|
926
926
|
{
|
|
927
927
|
alignItems: "center",
|
|
@@ -931,23 +931,23 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
931
931
|
px: 24,
|
|
932
932
|
py: 16,
|
|
933
933
|
children: [
|
|
934
|
-
/* @__PURE__ */ e(T, { bold: !0, children:
|
|
934
|
+
/* @__PURE__ */ e(T, { bold: !0, children: a.tags_your_tags }),
|
|
935
935
|
/* @__PURE__ */ e(
|
|
936
936
|
ce,
|
|
937
937
|
{
|
|
938
938
|
"aria-expanded": o,
|
|
939
|
-
"aria-label":
|
|
939
|
+
"aria-label": a.tags_add_tag_btn_aria,
|
|
940
940
|
onClick: p,
|
|
941
|
-
children:
|
|
941
|
+
children: a.tags_add_tag_btn
|
|
942
942
|
}
|
|
943
943
|
)
|
|
944
944
|
]
|
|
945
945
|
}
|
|
946
946
|
),
|
|
947
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ l(
|
|
948
948
|
V,
|
|
949
949
|
{
|
|
950
|
-
copy: { title:
|
|
950
|
+
copy: { title: a.tags_add_tag_btn },
|
|
951
951
|
isOpen: o,
|
|
952
952
|
onClose: () => n(!1),
|
|
953
953
|
onPrimaryAction: g,
|
|
@@ -956,24 +956,24 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
956
956
|
/* @__PURE__ */ e(
|
|
957
957
|
Te,
|
|
958
958
|
{
|
|
959
|
-
"aria-label":
|
|
959
|
+
"aria-label": a.tags_placeholder,
|
|
960
960
|
name: "add-tag",
|
|
961
|
-
onChange: (S) =>
|
|
962
|
-
placeholder:
|
|
961
|
+
onChange: (S) => d(S.target.value),
|
|
962
|
+
placeholder: a.tags_placeholder,
|
|
963
963
|
sx: { width: "100%" },
|
|
964
|
-
value:
|
|
964
|
+
value: s
|
|
965
965
|
}
|
|
966
966
|
),
|
|
967
|
-
/* @__PURE__ */ e(le, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children:
|
|
967
|
+
/* @__PURE__ */ e(le, { id: "add-tag-error", sx: { color: "error.main" }, variant: "ParagraphSmall", children: c })
|
|
968
968
|
]
|
|
969
969
|
}
|
|
970
970
|
)
|
|
971
971
|
] });
|
|
972
972
|
}, Ot = A(Et), Lt = ({ onSearchValueChanged: t, searchValue: r }) => {
|
|
973
|
-
const { common:
|
|
973
|
+
const { common: i, transactions: a } = x(), o = ee(), n = /* @__PURE__ */ e(
|
|
974
974
|
Q,
|
|
975
975
|
{
|
|
976
|
-
"aria-label":
|
|
976
|
+
"aria-label": a.tags_cancel_search || "Search",
|
|
977
977
|
onClick: () => t(""),
|
|
978
978
|
children: /* @__PURE__ */ e(ie, {})
|
|
979
979
|
}
|
|
@@ -985,39 +985,39 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
985
985
|
startAdornment: /* @__PURE__ */ e(ye, { position: "start", children: /* @__PURE__ */ e(Xe, { color: "disabled" }) }),
|
|
986
986
|
endAdornment: /* @__PURE__ */ e(ye, { position: "end", sx: { padding: 0 }, children: r ? n : null })
|
|
987
987
|
},
|
|
988
|
-
"aria-label":
|
|
988
|
+
"aria-label": i.search_aria,
|
|
989
989
|
name: "search",
|
|
990
|
-
onChange: (
|
|
991
|
-
placeholder:
|
|
990
|
+
onChange: (s) => t(s.target.value),
|
|
991
|
+
placeholder: i.search_placeholder,
|
|
992
992
|
sx: { bgcolor: "background.paper", width: "100%" },
|
|
993
993
|
value: r
|
|
994
994
|
}
|
|
995
995
|
) });
|
|
996
|
-
}, kt = A(Lt), Rt = ({ onTagChecked: t, selectedTags: r, tag:
|
|
997
|
-
const { onEvent:
|
|
998
|
-
|
|
996
|
+
}, kt = A(Lt), Rt = ({ onTagChecked: t, selectedTags: r, tag: i }) => {
|
|
997
|
+
const { onEvent: a } = L(), { removeTag: o, updateTag: n } = w(), { common: s, transactions: d } = x(), [c, u] = _.useState(!1), [m, p] = _.useState(!1), [g, S] = _.useState(""), [y, N] = _.useState(""), f = async () => {
|
|
998
|
+
a(h.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), i && await n({ ...i, name: g }), u(!1);
|
|
999
999
|
}, k = async () => {
|
|
1000
|
-
|
|
1000
|
+
a(h.ON_TRANSACTION_TAGS_TAG_DELETED), await o(i.guid), p(!1);
|
|
1001
1001
|
};
|
|
1002
1002
|
_.useEffect(() => {
|
|
1003
|
-
N(g.length > 40 ?
|
|
1003
|
+
N(g.length > 40 ? d.tags_error_name_must_be_40_chars : "");
|
|
1004
1004
|
}, [g]);
|
|
1005
1005
|
const K = () => {
|
|
1006
|
-
|
|
1006
|
+
a(h.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK), S(i.name), u(!0);
|
|
1007
1007
|
}, $ = () => {
|
|
1008
|
-
|
|
1008
|
+
a(h.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK), p(!0);
|
|
1009
1009
|
};
|
|
1010
|
-
return /* @__PURE__ */
|
|
1010
|
+
return /* @__PURE__ */ l(
|
|
1011
1011
|
F,
|
|
1012
1012
|
{
|
|
1013
1013
|
className: "mx-txn-transaction-manager-row",
|
|
1014
1014
|
disableGutters: !0,
|
|
1015
1015
|
disablePadding: !0,
|
|
1016
|
-
secondaryAction: !
|
|
1016
|
+
secondaryAction: !i.is_default_tag && /* @__PURE__ */ l(b, { direction: "row", children: [
|
|
1017
1017
|
/* @__PURE__ */ e(
|
|
1018
1018
|
Q,
|
|
1019
1019
|
{
|
|
1020
|
-
"aria-label": `Edit ${
|
|
1020
|
+
"aria-label": `Edit ${i.name} tag`,
|
|
1021
1021
|
color: "secondary",
|
|
1022
1022
|
onClick: K,
|
|
1023
1023
|
children: /* @__PURE__ */ e(Ve, { color: "secondary" })
|
|
@@ -1026,7 +1026,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1026
1026
|
/* @__PURE__ */ e(
|
|
1027
1027
|
Q,
|
|
1028
1028
|
{
|
|
1029
|
-
"aria-label": `Delete ${
|
|
1029
|
+
"aria-label": `Delete ${i.name} tag`,
|
|
1030
1030
|
color: "secondary",
|
|
1031
1031
|
onClick: $,
|
|
1032
1032
|
children: /* @__PURE__ */ e(oe, { color: "secondary" })
|
|
@@ -1034,23 +1034,23 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1034
1034
|
)
|
|
1035
1035
|
] }),
|
|
1036
1036
|
children: [
|
|
1037
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ l(
|
|
1038
1038
|
U,
|
|
1039
1039
|
{
|
|
1040
|
-
"aria-checked": r.includes(
|
|
1041
|
-
onClick: () => t(
|
|
1040
|
+
"aria-checked": r.includes(i.guid),
|
|
1041
|
+
onClick: () => t(i.guid),
|
|
1042
1042
|
role: "checkbox",
|
|
1043
1043
|
children: [
|
|
1044
|
-
/* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Je, { checked: r.includes(
|
|
1045
|
-
/* @__PURE__ */ e(M, { children:
|
|
1044
|
+
/* @__PURE__ */ e(X, { sx: { ml: 0 }, children: /* @__PURE__ */ e(Je, { checked: r.includes(i.guid), edge: "start", tabIndex: -1 }) }),
|
|
1045
|
+
/* @__PURE__ */ e(M, { children: i.name })
|
|
1046
1046
|
]
|
|
1047
1047
|
}
|
|
1048
1048
|
),
|
|
1049
|
-
/* @__PURE__ */
|
|
1049
|
+
/* @__PURE__ */ l(
|
|
1050
1050
|
V,
|
|
1051
1051
|
{
|
|
1052
1052
|
copy: { title: "Update tag name" },
|
|
1053
|
-
isOpen:
|
|
1053
|
+
isOpen: c,
|
|
1054
1054
|
onClose: () => u(!1),
|
|
1055
1055
|
onPrimaryAction: f,
|
|
1056
1056
|
onSecondaryAction: () => u(!1),
|
|
@@ -1059,7 +1059,7 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1059
1059
|
Te,
|
|
1060
1060
|
{
|
|
1061
1061
|
"aria-describedby": y ? "update-tag-error" : void 0,
|
|
1062
|
-
"aria-label":
|
|
1062
|
+
"aria-label": d.tags_update_the_tag_name,
|
|
1063
1063
|
name: "update-tag",
|
|
1064
1064
|
onChange: (I) => S(I.target.value),
|
|
1065
1065
|
placeholder: "Tag name",
|
|
@@ -1074,59 +1074,59 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1074
1074
|
/* @__PURE__ */ e(
|
|
1075
1075
|
V,
|
|
1076
1076
|
{
|
|
1077
|
-
copy: { title:
|
|
1077
|
+
copy: { title: d.tags_delete_title },
|
|
1078
1078
|
isOpen: m,
|
|
1079
1079
|
onClose: () => p(!1),
|
|
1080
1080
|
onPrimaryAction: k,
|
|
1081
|
-
onSecondaryAction: () =>
|
|
1082
|
-
primaryText:
|
|
1083
|
-
secondaryText:
|
|
1084
|
-
children: /* @__PURE__ */ e(T, { truncate: !1, children:
|
|
1081
|
+
onSecondaryAction: () => a(h.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK),
|
|
1082
|
+
primaryText: s.delete_button,
|
|
1083
|
+
secondaryText: s.cancel_button,
|
|
1084
|
+
children: /* @__PURE__ */ e(T, { truncate: !1, children: d.tags_deleting_this_tag_will_remove_it })
|
|
1085
1085
|
}
|
|
1086
1086
|
)
|
|
1087
1087
|
]
|
|
1088
1088
|
}
|
|
1089
1089
|
);
|
|
1090
1090
|
}, Pt = A(Rt), Gt = ({ selectedTags: t, onTagChecked: r }) => {
|
|
1091
|
-
const { tags:
|
|
1092
|
-
(
|
|
1091
|
+
const { tags: i } = w(), [a, o] = _.useState(""), n = i.filter(
|
|
1092
|
+
(s) => s.name.toLowerCase().includes(a.toLowerCase())
|
|
1093
1093
|
);
|
|
1094
|
-
return /* @__PURE__ */
|
|
1094
|
+
return /* @__PURE__ */ l("div", { className: "mx-txn-tag-manager", children: [
|
|
1095
1095
|
/* @__PURE__ */ e(
|
|
1096
1096
|
kt,
|
|
1097
1097
|
{
|
|
1098
|
-
onSearchValueChanged: (
|
|
1099
|
-
searchValue:
|
|
1098
|
+
onSearchValueChanged: (s) => o(s),
|
|
1099
|
+
searchValue: a
|
|
1100
1100
|
}
|
|
1101
1101
|
),
|
|
1102
1102
|
/* @__PURE__ */ e(Ot, {}),
|
|
1103
|
-
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: n.map((
|
|
1104
|
-
/* @__PURE__ */ e(Pt, { onTagChecked: r, selectedTags: t, tag:
|
|
1103
|
+
/* @__PURE__ */ e(ne, { sx: { boxShadow: "none" }, children: /* @__PURE__ */ e(J, { children: n.map((s) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1104
|
+
/* @__PURE__ */ e(Pt, { onTagChecked: r, selectedTags: t, tag: s }),
|
|
1105
1105
|
/* @__PURE__ */ e(Z, { sx: { ml: 24 } })
|
|
1106
|
-
] },
|
|
1106
|
+
] }, s.guid)) }) })
|
|
1107
1107
|
] });
|
|
1108
1108
|
}, Mt = A(Gt), Kt = ({ transaction: t }) => {
|
|
1109
|
-
const { onEvent: r } = L(), { tags:
|
|
1109
|
+
const { onEvent: r } = L(), { tags: i, updateTaggings: a, updateTransaction: o } = w(), { common: n, transactions: s } = x(), { updateManualTransaction: d } = G(), [c, u] = _.useState(!1), [m, p] = _.useState(t.tags);
|
|
1110
1110
|
_.useEffect(() => {
|
|
1111
1111
|
p(t.tags);
|
|
1112
|
-
}, [
|
|
1112
|
+
}, [c, t]);
|
|
1113
1113
|
const g = (N) => {
|
|
1114
1114
|
const f = [...m], k = m.indexOf(N);
|
|
1115
1115
|
k >= 0 ? f.splice(k, 1) : f.push(N), p(f);
|
|
1116
1116
|
}, S = async () => {
|
|
1117
1117
|
if (t.is_manual && !t.guid) {
|
|
1118
|
-
|
|
1118
|
+
d({ ...t, tags: m }), u(!1);
|
|
1119
1119
|
return;
|
|
1120
1120
|
}
|
|
1121
|
-
await
|
|
1121
|
+
await a(m, t.guid), await o({ ...t, tags: m }), r(P.TRANSACTION_DETAILS_CLICK_TAGS, { transaction_guid: t.guid }), u(!1);
|
|
1122
1122
|
}, y = _.useMemo(
|
|
1123
1123
|
() => t.tags.map(
|
|
1124
|
-
(N, f, k) => `${
|
|
1124
|
+
(N, f, k) => `${i.find((K) => K.guid === N)?.name}${f < k.length - 1 ? " / " : ""}`
|
|
1125
1125
|
),
|
|
1126
|
-
[
|
|
1126
|
+
[i, t]
|
|
1127
1127
|
);
|
|
1128
|
-
return /* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1129
|
+
/* @__PURE__ */ e(F, { disableGutters: !0, disablePadding: !0, children: /* @__PURE__ */ l(
|
|
1130
1130
|
U,
|
|
1131
1131
|
{
|
|
1132
1132
|
onClick: () => {
|
|
@@ -1137,9 +1137,9 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1137
1137
|
/* @__PURE__ */ e(
|
|
1138
1138
|
M,
|
|
1139
1139
|
{
|
|
1140
|
-
primary:
|
|
1140
|
+
primary: s.tags_title,
|
|
1141
1141
|
primaryTypographyProps: { variant: "XSmall" },
|
|
1142
|
-
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y :
|
|
1142
|
+
secondary: /* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length > 0 ? y : s.tags_desc })
|
|
1143
1143
|
}
|
|
1144
1144
|
),
|
|
1145
1145
|
/* @__PURE__ */ e(X, { children: /* @__PURE__ */ e(C, { name: "chevron_right", weight: D.Dark }) })
|
|
@@ -1150,27 +1150,27 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1150
1150
|
de,
|
|
1151
1151
|
{
|
|
1152
1152
|
ariaLabelClose: n.close_aria,
|
|
1153
|
-
isOpen:
|
|
1153
|
+
isOpen: c,
|
|
1154
1154
|
onClose: () => u(!1),
|
|
1155
1155
|
onPrimaryAction: S,
|
|
1156
1156
|
primaryText: n.save_button,
|
|
1157
1157
|
secondaryText: n.cancel_button,
|
|
1158
|
-
title:
|
|
1158
|
+
title: s.tags_title,
|
|
1159
1159
|
children: /* @__PURE__ */ e(Mt, { onTagChecked: g, selectedTags: m })
|
|
1160
1160
|
}
|
|
1161
1161
|
)
|
|
1162
1162
|
] });
|
|
1163
1163
|
}, $t = A(Kt), Bt = ({ transaction: t, viewOnly: r = !1 }) => {
|
|
1164
|
-
const { updateTransaction:
|
|
1164
|
+
const { updateTransaction: i } = w(), { common: a, transactions: o } = x(), { onEvent: n } = L(), [s, d] = _.useState(!1), [c, u] = _.useState(""), m = _.useRef(null);
|
|
1165
1165
|
_.useEffect(() => {
|
|
1166
|
-
|
|
1167
|
-
}, [
|
|
1166
|
+
s && (u(t.description), m?.current?.focus());
|
|
1167
|
+
}, [s]);
|
|
1168
1168
|
const p = async () => {
|
|
1169
1169
|
n(P.TRANSACTION_DETAILS_CLICK_DESCRIPTION, {
|
|
1170
1170
|
transaction_guid: t.guid
|
|
1171
|
-
}), await
|
|
1171
|
+
}), await i({ ...t, description: c }), d(!1);
|
|
1172
1172
|
};
|
|
1173
|
-
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-description", children:
|
|
1173
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-description", children: s ? /* @__PURE__ */ l(je, { row: !0, children: [
|
|
1174
1174
|
/* @__PURE__ */ e(
|
|
1175
1175
|
ve,
|
|
1176
1176
|
{
|
|
@@ -1184,27 +1184,27 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1184
1184
|
".MuiOutlinedInput-input": { p: 11 },
|
|
1185
1185
|
width: 250
|
|
1186
1186
|
},
|
|
1187
|
-
value:
|
|
1187
|
+
value: c
|
|
1188
1188
|
}
|
|
1189
1189
|
),
|
|
1190
1190
|
/* @__PURE__ */ e(
|
|
1191
1191
|
ce,
|
|
1192
1192
|
{
|
|
1193
|
-
disabled: !
|
|
1193
|
+
disabled: !c,
|
|
1194
1194
|
onClick: p,
|
|
1195
1195
|
sx: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
1196
1196
|
variant: "outlined",
|
|
1197
|
-
children:
|
|
1197
|
+
children: a.save_button
|
|
1198
1198
|
}
|
|
1199
1199
|
)
|
|
1200
|
-
] }) : /* @__PURE__ */
|
|
1200
|
+
] }) : /* @__PURE__ */ l(b, { alignItems: "center", direction: "row", gap: 4, sx: { minHeight: 44 }, children: [
|
|
1201
1201
|
/* @__PURE__ */ e(T, { bold: !0, children: t.description }),
|
|
1202
1202
|
!r && /* @__PURE__ */ e(
|
|
1203
1203
|
Q,
|
|
1204
1204
|
{
|
|
1205
1205
|
"aria-label": o.description_edit_transaction_name,
|
|
1206
1206
|
onClick: () => {
|
|
1207
|
-
|
|
1207
|
+
d(!0), n(h.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK);
|
|
1208
1208
|
},
|
|
1209
1209
|
sx: { color: "action.active" },
|
|
1210
1210
|
children: /* @__PURE__ */ e(C, { name: "create", size: 22 })
|
|
@@ -1212,13 +1212,13 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1212
1212
|
)
|
|
1213
1213
|
] }) });
|
|
1214
1214
|
}, Ft = A(Bt), Ht = ({ transaction: t }) => {
|
|
1215
|
-
const { updateTransaction: r } = w(), { transactions:
|
|
1216
|
-
|
|
1215
|
+
const { updateTransaction: r } = w(), { transactions: i } = x(), { onEvent: a } = L(), o = De(), n = async () => {
|
|
1216
|
+
a(P.TRANSACTION_DETAILS_CLICK_FLAG, { transaction_guid: t.guid }), await r({ ...t, is_flagged: !t.is_flagged });
|
|
1217
1217
|
};
|
|
1218
1218
|
return /* @__PURE__ */ e("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ e(
|
|
1219
1219
|
qe,
|
|
1220
1220
|
{
|
|
1221
|
-
"aria-label":
|
|
1221
|
+
"aria-label": i.flag_btn_aria,
|
|
1222
1222
|
"aria-pressed": t.is_flagged,
|
|
1223
1223
|
color: "warning",
|
|
1224
1224
|
onClick: n,
|
|
@@ -1243,25 +1243,25 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1243
1243
|
children: /* @__PURE__ */ e(We, { color: "inherit" })
|
|
1244
1244
|
}
|
|
1245
1245
|
) });
|
|
1246
|
-
}, zt = A(Ht), ae = (t, r,
|
|
1247
|
-
/* @__PURE__ */
|
|
1246
|
+
}, zt = A(Ht), ae = (t, r, i, a = !0, o = "inset") => a ? /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1247
|
+
/* @__PURE__ */ l(F, { disableGutters: !0, disablePadding: !0, children: [
|
|
1248
1248
|
/* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { sx: { bgcolor: "border.light" }, variant: "rounded", children: t }) }),
|
|
1249
1249
|
/* @__PURE__ */ e(
|
|
1250
1250
|
M,
|
|
1251
1251
|
{
|
|
1252
1252
|
primary: r,
|
|
1253
1253
|
primaryTypographyProps: { variant: "XSmall" },
|
|
1254
|
-
secondary:
|
|
1254
|
+
secondary: i
|
|
1255
1255
|
}
|
|
1256
1256
|
)
|
|
1257
1257
|
] }),
|
|
1258
1258
|
/* @__PURE__ */ e(Z, { variant: o })
|
|
1259
1259
|
] }) : null, Ut = ({ transaction: t }) => {
|
|
1260
|
-
const { transactions: r } = x(), { tags:
|
|
1261
|
-
const o = new Map(
|
|
1260
|
+
const { transactions: r } = x(), { tags: i } = w(), a = _.useMemo(() => {
|
|
1261
|
+
const o = new Map(i.map((n) => [n.guid, n.name]));
|
|
1262
1262
|
return t.tags.map((n) => o.get(n)).filter(Boolean).join(" / ");
|
|
1263
|
-
}, [
|
|
1264
|
-
return /* @__PURE__ */
|
|
1263
|
+
}, [i, t.tags]);
|
|
1264
|
+
return /* @__PURE__ */ l(J, { sx: { "& .MuiListItem-root": { px: 24, py: 12 } }, children: [
|
|
1265
1265
|
ae(
|
|
1266
1266
|
/* @__PURE__ */ e(
|
|
1267
1267
|
he,
|
|
@@ -1290,25 +1290,26 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1290
1290
|
ae(
|
|
1291
1291
|
/* @__PURE__ */ e(C, { name: "local_offer", sx: { color: "text.primary" }, weight: D.Dark }),
|
|
1292
1292
|
r.tags_title,
|
|
1293
|
-
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ?
|
|
1293
|
+
/* @__PURE__ */ e(T, { bold: !0, variant: "Body", children: t.tags?.length ? a : r.tags_desc }),
|
|
1294
1294
|
!!t.tags?.length,
|
|
1295
1295
|
"fullWidth"
|
|
1296
1296
|
)
|
|
1297
1297
|
] });
|
|
1298
1298
|
}, Xt = A(Ut), Vt = ({
|
|
1299
1299
|
bottomActions: t = at,
|
|
1300
|
-
|
|
1300
|
+
canFlagTransaction: r = !0,
|
|
1301
|
+
topActions: i = tt,
|
|
1301
1302
|
transaction: a
|
|
1302
1303
|
}) => {
|
|
1303
|
-
const { onEvent:
|
|
1304
|
+
const { onEvent: o } = L(), { isCopyLoaded: n } = Fe(), { userFeatures: s } = He(), d = a?.number && a.number.length > 4;
|
|
1304
1305
|
if (_.useEffect(
|
|
1305
|
-
() =>
|
|
1306
|
+
() => o(P.TRANSACTION_DETAILS_VIEW, { transaction_guid: a.guid }),
|
|
1306
1307
|
[]
|
|
1307
|
-
), !
|
|
1308
|
+
), !n)
|
|
1308
1309
|
return /* @__PURE__ */ e(Ie, {});
|
|
1309
|
-
const
|
|
1310
|
-
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-details", width: "100%", children: a && /* @__PURE__ */
|
|
1311
|
-
/* @__PURE__ */
|
|
1310
|
+
const c = $e(s, "MX_TXN_DETAILS_VIEW_ONLY");
|
|
1311
|
+
return /* @__PURE__ */ e(v, { className: "mx-txn-transaction-details", width: "100%", children: a && /* @__PURE__ */ l(b, { children: [
|
|
1312
|
+
/* @__PURE__ */ l(b, { gap: 12, p: 24, children: [
|
|
1312
1313
|
/* @__PURE__ */ e(ne, { elevation: 2, sx: { width: 64 }, children: /* @__PURE__ */ e(
|
|
1313
1314
|
ge,
|
|
1314
1315
|
{
|
|
@@ -1317,36 +1318,36 @@ const it = ({ transaction: t, onClick: r }) => {
|
|
|
1317
1318
|
size: 64
|
|
1318
1319
|
}
|
|
1319
1320
|
) }),
|
|
1320
|
-
/* @__PURE__ */ e(Ft, { transaction: a, viewOnly:
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ e(Ft, { transaction: a, viewOnly: c }),
|
|
1322
|
+
/* @__PURE__ */ l(b, { direction: "row", justifyContent: "space-between", sx: { minHeight: 44 }, children: [
|
|
1323
|
+
/* @__PURE__ */ l(Ae, { color: a.isIncome ? "success.main" : "text.primary", children: [
|
|
1323
1324
|
a.isIncome ? "+" : "",
|
|
1324
1325
|
te(a.amount, "0,0.00")
|
|
1325
1326
|
] }),
|
|
1326
|
-
!
|
|
1327
|
+
!c && r && /* @__PURE__ */ e(zt, { transaction: a })
|
|
1327
1328
|
] }),
|
|
1328
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ l(b, { bgcolor: "background.highlight", borderRadius: "12px", gap: 4, p: 8, children: [
|
|
1329
1330
|
/* @__PURE__ */ e(T, { bold: !0, children: `${a.account}
|
|
1330
|
-
${
|
|
1331
|
+
${d ? a.number : "•".repeat(4).concat(a.number ?? "")}` }),
|
|
1331
1332
|
/* @__PURE__ */ e(T, { bold: !0, color: "secondary", variant: "Tiny", children: a.feed_description })
|
|
1332
1333
|
] })
|
|
1333
1334
|
] }),
|
|
1334
|
-
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children:
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
/* @__PURE__ */ e(Z, { variant:
|
|
1340
|
-
] },
|
|
1341
|
-
!
|
|
1335
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: c ? /* @__PURE__ */ e(Xt, { transaction: a }) : /* @__PURE__ */ e(J, { children: i.map((u, m) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1336
|
+
u === q.Category && /* @__PURE__ */ e(mt, { transaction: a }),
|
|
1337
|
+
u === q.Date && /* @__PURE__ */ e(pt, { transaction: a }),
|
|
1338
|
+
u === q.Memo && /* @__PURE__ */ e(bt, { transaction: a }),
|
|
1339
|
+
u === q.Tags && /* @__PURE__ */ e($t, { transaction: a }),
|
|
1340
|
+
/* @__PURE__ */ e(Z, { variant: m < i.length - 1 ? "inset" : "fullWidth" })
|
|
1341
|
+
] }, u)) }) }),
|
|
1342
|
+
!c && t.length > 0 && /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1342
1343
|
/* @__PURE__ */ e(T, { bold: !0, mb: 8, ml: 26, mt: 16, variant: "Body", children: "Actions" }),
|
|
1343
|
-
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */
|
|
1344
|
-
t.map((
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
/* @__PURE__ */ e(Z, { variant:
|
|
1349
|
-
] },
|
|
1344
|
+
/* @__PURE__ */ e(ne, { square: !0, sx: { boxShadow: "none" }, children: /* @__PURE__ */ l(J, { children: [
|
|
1345
|
+
t.map((u, m) => /* @__PURE__ */ l(_.Fragment, { children: [
|
|
1346
|
+
u === re.SplitTransaction && /* @__PURE__ */ e(wt, { transaction: a }),
|
|
1347
|
+
u === re.HideTransaction && /* @__PURE__ */ e(Ct, { transaction: a }),
|
|
1348
|
+
u === re.MerchantLogo && /* @__PURE__ */ e(yt, { transaction: a }),
|
|
1349
|
+
/* @__PURE__ */ e(Z, { variant: m < t.length - 1 ? "inset" : "fullWidth" })
|
|
1350
|
+
] }, u)),
|
|
1350
1351
|
a.is_manual && !a.parent_guid && !a.has_been_split && /* @__PURE__ */ e(ht, { transaction: a })
|
|
1351
1352
|
] }) })
|
|
1352
1353
|
] })
|