@feedmepos/mf-payment 1.5.31 → 1.5.33-dev
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/{Actions.vue_vue_type_script_setup_true_lang-BMLg-uol.js → Actions.vue_vue_type_script_setup_true_lang-CWl5TjGX.js} +1 -1
- package/dist/{Chargeback-BkVFinyh.js → Chargeback-BGXLNd-w.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-3pmwclcO.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DVL3Tlwu.js} +1 -1
- package/dist/{OnboardForm-DgOR11Zd.js → OnboardForm-2C1LeXFJ.js} +722 -680
- package/dist/{OnboardForm-D9C1CXxm.js → OnboardForm-BYfjLNbu.js} +5 -5
- package/dist/{OnboardSubmission-B24Jb79p.js → OnboardSubmission-ChwyUxSB.js} +2 -2
- package/dist/{OnboardSubmission-O5wr2kLB.js → OnboardSubmission-CuK2dw8O.js} +5 -5
- package/dist/{PayoutAccount-kyncDyfJ.js → PayoutAccount-BFLTTf65.js} +4 -4
- package/dist/{PayoutAccount-DIWlprc3.js → PayoutAccount-C4DGIORU.js} +5 -5
- package/dist/{PayoutAccountSetting-BJljfdwp.js → PayoutAccountSetting-B2xwRNVI.js} +4 -4
- package/dist/{Restaurant-DN2_DdKR.js → Restaurant-uaKyfVHa.js} +4 -4
- package/dist/{RestaurantSetting-f0T5REdJ.js → RestaurantSetting-u3gPnAi3.js} +3 -3
- package/dist/{Settlement-DJ6ETp2U.js → Settlement-8aKO0XlN.js} +3 -3
- package/dist/Settlement-DYMTw2xR.js +610 -0
- package/dist/{SettlementTransactions-DF2ybUos.js → SettlementTransactions-CgLmSBeK.js} +4 -4
- package/dist/{SettlementTransactions-cYUYH2RJ.js → SettlementTransactions-Dy_c3e55.js} +23 -19
- package/dist/{Status.vue_vue_type_script_setup_true_lang-B41rO8q8.js → Status.vue_vue_type_script_setup_true_lang-91BuHsLC.js} +1 -1
- package/dist/{Terminal-DuGHgfMp.js → Terminal-C9XlK0gi.js} +5 -5
- package/dist/{TerminalSetting-iXqUzSSo.js → TerminalSetting-CPMJTKR8.js} +3 -3
- package/dist/Transaction-J4EbMhb-.js +482 -0
- package/dist/{Transaction-CWFcreph.js → Transaction-YZryhRiu.js} +5 -5
- package/dist/{TransactionOld-DttRuS3v.js → TransactionOld-DRA-jAKQ.js} +6 -6
- package/dist/api/settlement/index.d.ts +10 -4
- package/dist/api/transaction/index.d.ts +1 -1
- package/dist/{app-CV6XmEVa.js → app-wX6XYVw4.js} +24 -24
- package/dist/app.js +1 -1
- package/dist/{assets-gWQvONT9.js → assets-im1V-t7Q.js} +1 -1
- package/dist/components/SettlementSelector.vue.d.ts +12 -0
- package/dist/components/SourceSelector.vue.d.ts +2 -0
- package/dist/{grafana-VY3mqepx.js → grafana-DxtD1PVA.js} +1 -1
- package/dist/{index-BcmesiC4.js → index-1hOLckXe.js} +21 -19
- package/dist/{index-Q0ELb0wB.js → index-BAR0oK1p.js} +1 -1
- package/dist/{index-DhYZ6Ghe.js → index-C7qDYSTa.js} +2 -2
- package/dist/{index-DGqWjywh.js → index-CCD_GxfC.js} +1 -1
- package/dist/{index-T2CVm7-_.js → index-CV3NoDGL.js} +5445 -5437
- package/dist/{index-CscYwjzM.js → index-Dqz_cMKc.js} +1 -1
- package/dist/{index-BRhAeH7J.js → index-DyHgJMgm.js} +13 -7
- package/dist/{index-BGIv1us6.js → index-cnWXAOZL.js} +1 -1
- package/dist/{index-Dq4IAN2N.js → index-sVmXR_uy.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CkzD8rQP.js → index.vue_vue_type_script_setup_true_lang-BLlCp9H7.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-Dvgf2yEt.js → payout-account-B5umMzLY.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Settlement-SoOQIN8y.js +0 -490
- package/dist/Transaction-i64HFmDS.js +0 -477
|
@@ -1,477 +0,0 @@
|
|
|
1
|
-
import { defineComponent as w, ref as x, watch as U, onMounted as z, resolveComponent as g, unref as n, openBlock as F, createBlock as Y, createElementBlock as q, createVNode as p, withCtx as k, createElementVNode as A, Fragment as j, renderList as J, createTextVNode as Q, toDisplayString as H, isRef as N, h as I } from "vue";
|
|
2
|
-
import { t as R } from "./index-BRhAeH7J.js";
|
|
3
|
-
import { h as O } from "./moment-h96o7c8I.js";
|
|
4
|
-
import { useI18n as L, useCoreStore as G } from "@feedmepos/mf-common";
|
|
5
|
-
import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
-
import { t as X, b as Z, _ as ee } from "./assets-gWQvONT9.js";
|
|
7
|
-
import { u as te } from "./index-Q0ELb0wB.js";
|
|
8
|
-
import { _ as ae } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
|
-
import { _ as ne } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
|
|
10
|
-
import { _ as se } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
|
|
11
|
-
import { p as re } from "./index-Dq4IAN2N.js";
|
|
12
|
-
import { t as oe } from "./index-DGqWjywh.js";
|
|
13
|
-
import { u as le, p as E } from "./index-T2CVm7-_.js";
|
|
14
|
-
import { useSnackbar as ie, useDialog as ce } from "@feedmepos/ui-library";
|
|
15
|
-
import { _ as ue, a as me, b as de } from "./Actions.vue_vue_type_script_setup_true_lang-BMLg-uol.js";
|
|
16
|
-
import { g as pe } from "./grafana-VY3mqepx.js";
|
|
17
|
-
import { w as B } from "./Modal-DB8M9o1T.js";
|
|
18
|
-
import { u as K } from "./error-K1CakhA9.js";
|
|
19
|
-
import { _ as ye } from "./index.vue_vue_type_script_setup_true_lang-CkzD8rQP.js";
|
|
20
|
-
const fe = {
|
|
21
|
-
key: 1,
|
|
22
|
-
class: "inline-flex"
|
|
23
|
-
}, _e = { class: "relative" }, ve = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, be = /* @__PURE__ */ w({
|
|
24
|
-
__name: "SourceSelector",
|
|
25
|
-
props: {
|
|
26
|
-
id: {},
|
|
27
|
-
by: {},
|
|
28
|
-
excludePayoutAccount: { type: Boolean },
|
|
29
|
-
excludeRestaurant: { type: Boolean },
|
|
30
|
-
excludeDevice: { type: Boolean }
|
|
31
|
-
},
|
|
32
|
-
emits: ["update:id", "update:by"],
|
|
33
|
-
setup(V, { emit: y }) {
|
|
34
|
-
const h = V, m = y, { t: s } = L(), { currentBusiness: b, readRestaurants: f } = G(), { isLoading: _, startAsyncCall: d } = le(!0), v = x([]), u = x(), T = x(""), S = x([]);
|
|
35
|
-
let C;
|
|
36
|
-
U(T, async () => {
|
|
37
|
-
C && clearTimeout(C), C = setTimeout(() => {
|
|
38
|
-
var l = new RegExp(T.value, "i");
|
|
39
|
-
S.value = v.value.filter((i) => {
|
|
40
|
-
const o = JSON.stringify(i);
|
|
41
|
-
return l.test(o);
|
|
42
|
-
});
|
|
43
|
-
}, 700);
|
|
44
|
-
}), U(u, () => {
|
|
45
|
-
var l, i;
|
|
46
|
-
m("update:id", (l = u.value) == null ? void 0 : l.value), m("update:by", (i = u.value) == null ? void 0 : i.by);
|
|
47
|
-
});
|
|
48
|
-
async function M() {
|
|
49
|
-
return d(async () => {
|
|
50
|
-
let l = await re.readBusinessPayoutAccounts();
|
|
51
|
-
if (l.length !== 0)
|
|
52
|
-
return l;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
async function $() {
|
|
56
|
-
return d(async () => {
|
|
57
|
-
let l = await oe.getBusinessTerminals();
|
|
58
|
-
if (l.length !== 0)
|
|
59
|
-
return l;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
async function P() {
|
|
63
|
-
_.value = !0;
|
|
64
|
-
const l = [];
|
|
65
|
-
if (!h.excludePayoutAccount) {
|
|
66
|
-
const i = await M();
|
|
67
|
-
l.push(
|
|
68
|
-
...(i || []).map((o) => {
|
|
69
|
-
var t, e;
|
|
70
|
-
return {
|
|
71
|
-
by: "PAYOUT_ACCOUNT",
|
|
72
|
-
value: o._id,
|
|
73
|
-
prefix: s("payment.components.payout_account"),
|
|
74
|
-
type: "Payout Account - " + o.store.event,
|
|
75
|
-
label: ((e = (t = o.ref) == null ? void 0 : t.profile) == null ? void 0 : e.name) ?? o.ref.name
|
|
76
|
-
};
|
|
77
|
-
})
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
if (!h.excludeRestaurant) {
|
|
81
|
-
const i = await f();
|
|
82
|
-
l.push(
|
|
83
|
-
...(i || []).map((o) => ({
|
|
84
|
-
by: "RESTAURANT",
|
|
85
|
-
value: o._id,
|
|
86
|
-
prefix: s("payment.components.restaurant"),
|
|
87
|
-
type: "Restaurant",
|
|
88
|
-
label: o.profile.name + " (" + (o.profile.code ?? "--") + ")"
|
|
89
|
-
}))
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
if (!h.excludeDevice) {
|
|
93
|
-
const i = await $();
|
|
94
|
-
l.push(
|
|
95
|
-
...(i || []).map((o) => ({
|
|
96
|
-
by: "DEVICE",
|
|
97
|
-
value: o._id,
|
|
98
|
-
prefix: s("payment.components.device"),
|
|
99
|
-
type: "Device - " + o.deviceType,
|
|
100
|
-
label: o.deviceType === "TERMINAL" ? o.name : o.restaurant.profile.name
|
|
101
|
-
}))
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
v.value = l, S.value = v.value, _.value = !1;
|
|
105
|
-
}
|
|
106
|
-
return z(P), U(b, P), (l, i) => {
|
|
107
|
-
const o = g("FmCircularProgress"), t = g("FmChip"), e = g("FmSearch"), r = g("FmMenuItem"), c = g("FmMenu");
|
|
108
|
-
return n(_) ? (F(), Y(o, {
|
|
109
|
-
key: 0,
|
|
110
|
-
size: "md"
|
|
111
|
-
})) : (F(), q("div", fe, [
|
|
112
|
-
p(c, { "close-on-click": !0 }, {
|
|
113
|
-
"menu-button": k(() => {
|
|
114
|
-
var a;
|
|
115
|
-
return [
|
|
116
|
-
p(t, {
|
|
117
|
-
icon: "account_box",
|
|
118
|
-
label: ((a = u.value) == null ? void 0 : a.label) ?? n(s)("payment.components.select"),
|
|
119
|
-
removable: !!u.value,
|
|
120
|
-
onChipClosed: i[0] || (i[0] = (D) => u.value = void 0)
|
|
121
|
-
}, null, 8, ["label", "removable"])
|
|
122
|
-
];
|
|
123
|
-
}),
|
|
124
|
-
default: k(() => [
|
|
125
|
-
A("div", _e, [
|
|
126
|
-
A("div", ve, [
|
|
127
|
-
p(e, {
|
|
128
|
-
"model-value": T.value,
|
|
129
|
-
"onUpdate:modelValue": i[1] || (i[1] = (a) => T.value = a),
|
|
130
|
-
placeholder: n(s)("payment.components.select")
|
|
131
|
-
}, null, 8, ["model-value", "placeholder"])
|
|
132
|
-
]),
|
|
133
|
-
A("div", null, [
|
|
134
|
-
(F(!0), q(j, null, J(S.value, (a) => (F(), Y(r, {
|
|
135
|
-
key: a.value,
|
|
136
|
-
label: a.label,
|
|
137
|
-
sublabel: a.type,
|
|
138
|
-
onClick: () => u.value = a
|
|
139
|
-
}, null, 8, ["label", "sublabel", "onClick"]))), 128))
|
|
140
|
-
])
|
|
141
|
-
])
|
|
142
|
-
]),
|
|
143
|
-
_: 1
|
|
144
|
-
})
|
|
145
|
-
]));
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
}), Te = { class: "flex items-center gap-1" }, ge = /* @__PURE__ */ w({
|
|
149
|
-
__name: "BillSeqNumber",
|
|
150
|
-
props: {
|
|
151
|
-
row: {},
|
|
152
|
-
data: {}
|
|
153
|
-
},
|
|
154
|
-
setup(V) {
|
|
155
|
-
return (y, h) => {
|
|
156
|
-
const m = g("FmIcon");
|
|
157
|
-
return F(), q("span", Te, [
|
|
158
|
-
Q(H(V.row.original.seqNumber) + " ", 1),
|
|
159
|
-
p(m, {
|
|
160
|
-
size: "md",
|
|
161
|
-
name: "check",
|
|
162
|
-
color: "#16a34a"
|
|
163
|
-
})
|
|
164
|
-
]);
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}), he = { class: "flex justify-between mb-6 items-center" }, Ae = { class: "flex space-x-8 items-start" }, Se = { class: "flex space-x-4 self-center" }, Ne = { class: "flex space-x-12 mb-6" }, Le = /* @__PURE__ */ w({
|
|
168
|
-
__name: "Transaction",
|
|
169
|
-
setup(V) {
|
|
170
|
-
var i, o;
|
|
171
|
-
const y = ie(), h = ce(), { sessionUser: m } = G(), { t: s } = L(), b = x(), { dateRange: f, searchKey: _, status: d, id: v, by: u } = te({
|
|
172
|
-
by: "",
|
|
173
|
-
id: "",
|
|
174
|
-
searchKey: "",
|
|
175
|
-
status: [E.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
176
|
-
dateRange: {
|
|
177
|
-
startDate: O().startOf("day").format("YYYY-MM-DD"),
|
|
178
|
-
endDate: O().endOf("day").format("YYYY-MM-DD")
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
let T;
|
|
182
|
-
U(_, async () => {
|
|
183
|
-
T && clearTimeout(T), T = setTimeout(
|
|
184
|
-
() => {
|
|
185
|
-
var t;
|
|
186
|
-
return (t = b.value) == null ? void 0 : t.reset();
|
|
187
|
-
},
|
|
188
|
-
700
|
|
189
|
-
);
|
|
190
|
-
}), U([f, d, v, u], () => {
|
|
191
|
-
var t;
|
|
192
|
-
(t = b.value) == null || t.reset();
|
|
193
|
-
});
|
|
194
|
-
const S = [
|
|
195
|
-
{
|
|
196
|
-
label: "Success",
|
|
197
|
-
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
label: "Refunded",
|
|
201
|
-
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
label: "Process",
|
|
205
|
-
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
label: "Pending Settlement",
|
|
209
|
-
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
label: "Failed",
|
|
213
|
-
value: E.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
214
|
-
}
|
|
215
|
-
];
|
|
216
|
-
async function C(t, e) {
|
|
217
|
-
var r;
|
|
218
|
-
try {
|
|
219
|
-
const c = await R.refetchTransaction({ transactionId: t.id });
|
|
220
|
-
(r = b.value) == null || r.replaceData(e, c), y.open({
|
|
221
|
-
type: "success",
|
|
222
|
-
title: "Transaction queried and updated successfully."
|
|
223
|
-
});
|
|
224
|
-
} catch (c) {
|
|
225
|
-
y.open({
|
|
226
|
-
type: "error",
|
|
227
|
-
title: "Fail to query transaction.",
|
|
228
|
-
message: K(c)
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
async function M(t, e) {
|
|
233
|
-
B(
|
|
234
|
-
h,
|
|
235
|
-
"Refund Transaction",
|
|
236
|
-
"Are you sure to refund transaction? This action cannot be revert!",
|
|
237
|
-
async () => {
|
|
238
|
-
var r;
|
|
239
|
-
try {
|
|
240
|
-
const c = await R.refundTransaction({
|
|
241
|
-
transactionId: t.id,
|
|
242
|
-
reason: "portal transaction refund",
|
|
243
|
-
amount: t.fdoAmount
|
|
244
|
-
});
|
|
245
|
-
(r = b.value) == null || r.replaceData(e, c), y.open({
|
|
246
|
-
type: "success",
|
|
247
|
-
title: "Transaction refund request initiated."
|
|
248
|
-
});
|
|
249
|
-
} catch (c) {
|
|
250
|
-
y.open({
|
|
251
|
-
type: "error",
|
|
252
|
-
title: "Fail to request refund transaction.",
|
|
253
|
-
message: K(c)
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
);
|
|
258
|
-
}
|
|
259
|
-
async function $(t, e) {
|
|
260
|
-
B(
|
|
261
|
-
h,
|
|
262
|
-
"Notify Transaction",
|
|
263
|
-
"Are you sure to perform notify transaction?",
|
|
264
|
-
async () => {
|
|
265
|
-
try {
|
|
266
|
-
await R.renotifyTransaction(t.id), y.open({
|
|
267
|
-
type: "success",
|
|
268
|
-
title: "Transaction notify successfully."
|
|
269
|
-
});
|
|
270
|
-
} catch (r) {
|
|
271
|
-
y.open({
|
|
272
|
-
type: "error",
|
|
273
|
-
title: "Fail to notify transaction.",
|
|
274
|
-
message: K(r)
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
);
|
|
279
|
-
}
|
|
280
|
-
async function P(t, e) {
|
|
281
|
-
const r = pe([
|
|
282
|
-
{
|
|
283
|
-
type: "span",
|
|
284
|
-
queryKey: "transaction.id",
|
|
285
|
-
queryValue: t.id
|
|
286
|
-
}
|
|
287
|
-
], t.transactionAt);
|
|
288
|
-
window.open(r, "_blank");
|
|
289
|
-
}
|
|
290
|
-
x("");
|
|
291
|
-
const l = [
|
|
292
|
-
{
|
|
293
|
-
header: () => s("payment.transactions.table.id"),
|
|
294
|
-
accessorKey: "id",
|
|
295
|
-
cell: ({ cell: t, row: e }) => {
|
|
296
|
-
var r, c;
|
|
297
|
-
return ((r = m.value) != null && r.role.isStaff || (c = m.value) != null && c.role.isAdmin) && e.original.transactionId ? e.original.id + `
|
|
298
|
-
ID: ` + e.original.transactionId : e.original.id;
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
header: () => s("payment.transactions.table.pay_id"),
|
|
303
|
-
accessorKey: "payId"
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
header: () => s("payment.transactions.table.gateway_id"),
|
|
307
|
-
accessorKey: "gatewayTransactionId"
|
|
308
|
-
},
|
|
309
|
-
{
|
|
310
|
-
header: () => s("payment.transactions.table.bill_seq"),
|
|
311
|
-
accessorKey: "seqNumber",
|
|
312
|
-
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? I(ge, { row: e, data: t.getValue() }) : e.original.seqNumber
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
header: () => s("payment.transactions.table.gateway"),
|
|
316
|
-
accessorKey: "gateway",
|
|
317
|
-
meta: {
|
|
318
|
-
textAlign: "center"
|
|
319
|
-
},
|
|
320
|
-
cell: ({ cell: t, row: e }) => e.original.gateway ? I(ue, { row: e, data: t.getValue() }) : ""
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
header: () => s("payment.transactions.table.method"),
|
|
324
|
-
accessorKey: "method",
|
|
325
|
-
meta: {
|
|
326
|
-
textAlign: "center"
|
|
327
|
-
},
|
|
328
|
-
cell: ({ cell: t, row: e }) => e.original.method ? I(me, { row: e, data: t.getValue() }) : ""
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
header: () => s("payment.transactions.table.type"),
|
|
332
|
-
accessorKey: "payFor",
|
|
333
|
-
meta: {
|
|
334
|
-
textAlign: "center"
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
{
|
|
338
|
-
header: () => s("payment.transactions.table.status"),
|
|
339
|
-
accessorKey: "status",
|
|
340
|
-
cell: ({ cell: t }) => I(ee, { data: t.getValue() })
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
header: () => s("payment.transactions.table.restaurant"),
|
|
344
|
-
accessorKey: "restaurantId"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
header: () => s("payment.transactions.table.source"),
|
|
348
|
-
accessorKey: "source",
|
|
349
|
-
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
header: () => s("payment.transactions.table.transaction_at"),
|
|
353
|
-
accessorKey: "transactionAt",
|
|
354
|
-
meta: {
|
|
355
|
-
width: "180px"
|
|
356
|
-
},
|
|
357
|
-
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.refundedAt : e.original.transactionAt
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
header: () => s("payment.transactions.table.sales_amount"),
|
|
361
|
-
accessorKey: "amount",
|
|
362
|
-
cell: ({ cell: t, row: e }) => {
|
|
363
|
-
var r, c;
|
|
364
|
-
return ((r = m.value) != null && r.role.isStaff || (c = m.value) != null && c.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
];
|
|
368
|
-
return ((i = m.value) != null && i.role.isStaff || (o = m.value) != null && o.role.isAdmin) && l.push({
|
|
369
|
-
header: () => s("payment.transactions.table.actions"),
|
|
370
|
-
accessorKey: "actions",
|
|
371
|
-
cell: ({ row: t }) => I(de, {
|
|
372
|
-
transaction: t.original,
|
|
373
|
-
onAction: (e) => {
|
|
374
|
-
var r;
|
|
375
|
-
switch (e) {
|
|
376
|
-
case "notify":
|
|
377
|
-
return $(t.original, t.index);
|
|
378
|
-
case "query":
|
|
379
|
-
return C(t.original, t.index);
|
|
380
|
-
case "refund":
|
|
381
|
-
return (r = m.value) != null && r.role.isStaff ? y.open({
|
|
382
|
-
type: "error",
|
|
383
|
-
title: "You are not allowed to refund transaction."
|
|
384
|
-
}) : M(t.original, t.index);
|
|
385
|
-
case "history":
|
|
386
|
-
return P(t.original, t.index);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
})
|
|
390
|
-
}), (t, e) => {
|
|
391
|
-
const r = g("FmSearch"), c = g("FmSelect");
|
|
392
|
-
return F(), Y(W, {
|
|
393
|
-
title: n(s)("payment.transactions.title"),
|
|
394
|
-
description: n(s)("payment.transactions.description"),
|
|
395
|
-
loading: !1
|
|
396
|
-
}, {
|
|
397
|
-
default: k(() => [
|
|
398
|
-
A("div", he, [
|
|
399
|
-
A("div", Ae, [
|
|
400
|
-
p(r, {
|
|
401
|
-
"model-value": n(_),
|
|
402
|
-
"onUpdate:modelValue": e[0] || (e[0] = (a) => N(_) ? _.value = a : null),
|
|
403
|
-
class: "mr-8",
|
|
404
|
-
label: n(s)("payment.transactions.search.title"),
|
|
405
|
-
placeholder: n(s)("payment.transactions.search.placeholder")
|
|
406
|
-
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
407
|
-
p(c, {
|
|
408
|
-
modelValue: n(d),
|
|
409
|
-
"onUpdate:modelValue": e[2] || (e[2] = (a) => N(d) ? d.value = a : null),
|
|
410
|
-
class: "mr-6 w-[300px]",
|
|
411
|
-
label: n(s)("payment.transactions.status"),
|
|
412
|
-
"label-mark": "required",
|
|
413
|
-
multiselect: "",
|
|
414
|
-
items: S
|
|
415
|
-
}, {
|
|
416
|
-
"prepend-menu": k(() => [
|
|
417
|
-
p(ne, {
|
|
418
|
-
modelValue: n(d),
|
|
419
|
-
"onUpdate:modelValue": e[1] || (e[1] = (a) => N(d) ? d.value = a : null),
|
|
420
|
-
items: S
|
|
421
|
-
}, null, 8, ["modelValue"])
|
|
422
|
-
]),
|
|
423
|
-
_: 1
|
|
424
|
-
}, 8, ["modelValue", "label"])
|
|
425
|
-
]),
|
|
426
|
-
A("div", Se, [
|
|
427
|
-
p(ae, {
|
|
428
|
-
button: {
|
|
429
|
-
appendIcon: "file_download",
|
|
430
|
-
variant: "primary",
|
|
431
|
-
label: n(s)("payment.transactions.button.export")
|
|
432
|
-
},
|
|
433
|
-
handler: async () => {
|
|
434
|
-
var D;
|
|
435
|
-
const a = await ((D = b.value) == null ? void 0 : D.allData());
|
|
436
|
-
a != null && await n(R).downloadPortalTransactionReport(n(f), n(X)(a));
|
|
437
|
-
}
|
|
438
|
-
}, null, 8, ["button", "handler"])
|
|
439
|
-
])
|
|
440
|
-
]),
|
|
441
|
-
A("div", Ne, [
|
|
442
|
-
p(be, {
|
|
443
|
-
id: n(v),
|
|
444
|
-
"onUpdate:id": e[3] || (e[3] = (a) => N(v) ? v.value = a : null),
|
|
445
|
-
by: n(u),
|
|
446
|
-
"onUpdate:by": e[4] || (e[4] = (a) => N(u) ? u.value = a : null)
|
|
447
|
-
}, null, 8, ["id", "by"]),
|
|
448
|
-
p(se, {
|
|
449
|
-
modelValue: n(f),
|
|
450
|
-
"onUpdate:modelValue": e[5] || (e[5] = (a) => N(f) ? f.value = a : null)
|
|
451
|
-
}, null, 8, ["modelValue"])
|
|
452
|
-
]),
|
|
453
|
-
p(ye, {
|
|
454
|
-
ref_key: "controller",
|
|
455
|
-
ref: b,
|
|
456
|
-
"column-defs": l,
|
|
457
|
-
"rows-defs": n(Z),
|
|
458
|
-
paginate: (a, D) => n(R).readTransactionsV2({
|
|
459
|
-
limit: a,
|
|
460
|
-
cursor: D,
|
|
461
|
-
status: n(d),
|
|
462
|
-
by: n(u),
|
|
463
|
-
id: n(v),
|
|
464
|
-
search: n(_),
|
|
465
|
-
start: n(f).startDate,
|
|
466
|
-
end: n(f).endDate
|
|
467
|
-
})
|
|
468
|
-
}, null, 8, ["rows-defs", "paginate"])
|
|
469
|
-
]),
|
|
470
|
-
_: 1
|
|
471
|
-
}, 8, ["title", "description"]);
|
|
472
|
-
};
|
|
473
|
-
}
|
|
474
|
-
});
|
|
475
|
-
export {
|
|
476
|
-
Le as default
|
|
477
|
-
};
|