@feedmepos/mf-payment 1.5.72-dev → 1.5.73-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-CUFmPuuD.js → Actions.vue_vue_type_script_setup_true_lang-BJupTyqX.js} +1 -1
- package/dist/{Chargeback-D3ycV0dO.js → Chargeback-WYytp2pg.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-B3PfVFMF.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BBnhnIeC.js} +1 -1
- package/dist/{OnboardForm-BVgHtaOF.js → OnboardForm-BCRC8dK2.js} +5 -5
- package/dist/{OnboardForm-Cl_9wg9A.js → OnboardForm-D3ShNAyH.js} +5 -5
- package/dist/{OnboardSubmission-syEkMsnl.js → OnboardSubmission-CEpJu58Y.js} +2 -2
- package/dist/{OnboardSubmission-4DKhhcgO.js → OnboardSubmission-wkUEgwE7.js} +5 -5
- package/dist/{PayoutAccount-Ba036aA3.js → PayoutAccount-C-WF0dpN.js} +5 -5
- package/dist/{PayoutAccount-_--Cy3p1.js → PayoutAccount-CYJ3oHcE.js} +130 -130
- package/dist/{PayoutAccountSetting-BXuwIdUh.js → PayoutAccountSetting-DbpY6GnD.js} +4 -4
- package/dist/{Restaurant-9qoIhpAm.js → Restaurant-BlnPSy25.js} +4 -4
- package/dist/{RestaurantSetting-DhxCwmlV.js → RestaurantSetting-CaX_Clgi.js} +3 -3
- package/dist/{Settlement-CbD6kM0Y.js → Settlement-BnHlR6gI.js} +4 -4
- package/dist/{Settlement-BarxYu6s.js → Settlement-DYW7ySXJ.js} +3 -3
- package/dist/{SettlementTransactions-MTe6S-Uy.js → SettlementTransactions-D5P8KZrh.js} +4 -4
- package/dist/{SettlementTransactions-DLflVs3c.js → SettlementTransactions-DvFL6Rkr.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-lIGLD62m.js → Status.vue_vue_type_script_setup_true_lang-DVnG6pdr.js} +1 -1
- package/dist/{Terminal-DR42JQp3.js → Terminal-wudV6UoA.js} +5 -5
- package/dist/{TerminalSetting-f7KCbdPX.js → TerminalSetting-Cz0W7cpS.js} +4 -4
- package/dist/{Transaction-DNYIVkap.js → Transaction-D1Z4lBz2.js} +98 -101
- package/dist/Transaction-Dwy9_GrM.js +507 -0
- package/dist/TransactionOld-DnxCKSaY.js +313 -0
- package/dist/{app-CZ7PgHN3.js → app-CP0wL5ns.js} +737 -732
- package/dist/app.js +1 -1
- package/dist/{assets-BtDGiTj3.js → assets-JQoSuSEA.js} +1 -1
- package/dist/{grafana-CUJ3wZ0Q.js → grafana-6o8_cFtS.js} +1 -1
- package/dist/{index-QYK2Hpl8.js → index--I0_vtNS.js} +1 -1
- package/dist/{index-C6NNeQJv.js → index-Ba3VR5ek.js} +1 -1
- package/dist/{index-BwUcOJGN.js → index-BnAPDCZv.js} +1 -1
- package/dist/{index-D8x_gCxD.js → index-CJUa_zHC.js} +2 -2
- package/dist/{index-Df9CuqAR.js → index-DIZGmv4_.js} +1 -1
- package/dist/{index-BX8Q4nIm.js → index-E3dm6KHn.js} +1 -1
- package/dist/{index-Cz1ptim0.js → index-OqVbzjLO.js} +1 -1
- package/dist/{index-Bj4_RvUb.js → index-dnQtvH7M.js} +1 -1
- package/dist/{index-BmkdfHiJ.js → index-lNQ4Q5-W.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang--xO2jUEf.js → index.vue_vue_type_script_setup_true_lang-Dof9cIZc.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-BPkE-Ua4.js → payout-account-C_s7fod6.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/utils/permission.d.ts +1 -0
- package/dist/views/transaction/TransactionTable.vue.d.ts +2 -2
- package/package.json +1 -1
- package/dist/Transaction-VNG3CUqX.js +0 -517
- package/dist/TransactionOld-gyEQgFOk.js +0 -314
|
@@ -0,0 +1,507 @@
|
|
|
1
|
+
import { defineComponent as w, ref as x, watch as k, onMounted as Q, resolveComponent as h, unref as n, openBlock as R, createBlock as O, createElementBlock as Y, createVNode as d, withCtx as M, createElementVNode as N, Fragment as H, renderList as W, createTextVNode as X, toDisplayString as Z, onBeforeUnmount as ee, isRef as F, h as I } from "vue";
|
|
2
|
+
import { t as P } from "./index-Ba3VR5ek.js";
|
|
3
|
+
import { h as G } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { useI18n as j, useCoreStore as J } from "@feedmepos/mf-common";
|
|
5
|
+
import { _ as te } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
+
import { t as ae, b as ne, _ as re } from "./assets-JQoSuSEA.js";
|
|
7
|
+
import { u as se } from "./index-lNQ4Q5-W.js";
|
|
8
|
+
import { _ as oe } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
|
+
import { _ as le } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
|
|
10
|
+
import { _ as ie } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-BNVnvrVY.js";
|
|
11
|
+
import { p as ce } from "./index-DIZGmv4_.js";
|
|
12
|
+
import { t as ue } from "./index-OqVbzjLO.js";
|
|
13
|
+
import { u as me, p as D } from "./index-BnAPDCZv.js";
|
|
14
|
+
import { useSnackbar as de, useDialog as pe } from "@feedmepos/ui-library";
|
|
15
|
+
import { _ as ye, a as fe, b as _e } from "./Actions.vue_vue_type_script_setup_true_lang-BJupTyqX.js";
|
|
16
|
+
import { g as ge } from "./grafana-6o8_cFtS.js";
|
|
17
|
+
import { w as z } from "./Modal-DB8M9o1T.js";
|
|
18
|
+
import { u as L } from "./error-K1CakhA9.js";
|
|
19
|
+
import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-Dof9cIZc.js";
|
|
20
|
+
import { u as Te, a as ve } from "./index-BwdnN4a2.js";
|
|
21
|
+
import { h as q } from "./app-CP0wL5ns.js";
|
|
22
|
+
const he = {
|
|
23
|
+
key: 1,
|
|
24
|
+
class: "inline-flex"
|
|
25
|
+
}, Ae = { class: "relative" }, Se = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, Ne = /* @__PURE__ */ w({
|
|
26
|
+
__name: "SourceSelector",
|
|
27
|
+
props: {
|
|
28
|
+
id: {},
|
|
29
|
+
by: {},
|
|
30
|
+
excludePayoutAccount: { type: Boolean },
|
|
31
|
+
excludeOrderingPayoutAccount: { type: Boolean },
|
|
32
|
+
excludeMarketingPayoutAccount: { type: Boolean },
|
|
33
|
+
excludeRestaurant: { type: Boolean },
|
|
34
|
+
excludeDevice: { type: Boolean }
|
|
35
|
+
},
|
|
36
|
+
emits: ["update:id", "update:by"],
|
|
37
|
+
setup(U, { emit: f }) {
|
|
38
|
+
const _ = U, b = f, { t: r } = j(), { currentBusiness: $, readRestaurants: T } = J(), { isLoading: u, startAsyncCall: g } = me(!0), m = x([]), c = x(), p = x(""), v = x([]);
|
|
39
|
+
let A;
|
|
40
|
+
k(p, async () => {
|
|
41
|
+
A && clearTimeout(A), A = setTimeout(() => {
|
|
42
|
+
var l = new RegExp(p.value, "i");
|
|
43
|
+
v.value = m.value.filter((s) => {
|
|
44
|
+
const a = JSON.stringify(s);
|
|
45
|
+
return l.test(a);
|
|
46
|
+
});
|
|
47
|
+
}, 700);
|
|
48
|
+
}), k(c, () => {
|
|
49
|
+
var l, s;
|
|
50
|
+
b("update:id", (l = c.value) == null ? void 0 : l.value), b("update:by", (s = c.value) == null ? void 0 : s.by);
|
|
51
|
+
});
|
|
52
|
+
async function B() {
|
|
53
|
+
return g(async () => {
|
|
54
|
+
try {
|
|
55
|
+
let l = await ce.readBusinessPayoutAccounts();
|
|
56
|
+
return l.length === 0 ? [] : l;
|
|
57
|
+
} catch {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async function K() {
|
|
63
|
+
return g(async () => {
|
|
64
|
+
try {
|
|
65
|
+
let l = await ue.getBusinessTerminals();
|
|
66
|
+
return l.length === 0 ? [] : l;
|
|
67
|
+
} catch {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
async function C() {
|
|
73
|
+
u.value = !0;
|
|
74
|
+
const l = [];
|
|
75
|
+
if (!_.excludePayoutAccount) {
|
|
76
|
+
let s = await B();
|
|
77
|
+
_.excludeMarketingPayoutAccount && (s = s == null ? void 0 : s.filter((a) => a.store.event !== "MARKETING")), _.excludeOrderingPayoutAccount && (s = s == null ? void 0 : s.filter((a) => a.store.event !== "ORDERING")), l.push(
|
|
78
|
+
...(s || []).map((a) => {
|
|
79
|
+
var E, S, t, e;
|
|
80
|
+
return {
|
|
81
|
+
by: "PAYOUT_ACCOUNT",
|
|
82
|
+
value: a._id,
|
|
83
|
+
prefix: r("payment.components.payout_account"),
|
|
84
|
+
type: "Payout Account - " + a.store.event,
|
|
85
|
+
label: ((S = (E = a.ref) == null ? void 0 : E.profile) == null ? void 0 : S.name) ?? a.ref.name,
|
|
86
|
+
chipLabel: "Payout Account: " + (((e = (t = a.ref) == null ? void 0 : t.profile) == null ? void 0 : e.name) ?? a.ref.name)
|
|
87
|
+
};
|
|
88
|
+
})
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
if (!_.excludeRestaurant) {
|
|
92
|
+
const s = await T();
|
|
93
|
+
l.push(
|
|
94
|
+
...(s || []).map((a) => ({
|
|
95
|
+
by: "RESTAURANT",
|
|
96
|
+
value: a._id,
|
|
97
|
+
prefix: r("payment.components.restaurant"),
|
|
98
|
+
type: "Restaurant",
|
|
99
|
+
label: a.profile.name + " (" + (a.profile.code ?? "--") + ")",
|
|
100
|
+
chipLabel: "Restaurant: " + a.profile.name + " (" + (a.profile.code ?? "--") + ")"
|
|
101
|
+
}))
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
if (!_.excludeDevice) {
|
|
105
|
+
const s = await K();
|
|
106
|
+
l.push(
|
|
107
|
+
...(s || []).map((a) => ({
|
|
108
|
+
by: "DEVICE",
|
|
109
|
+
value: a._id,
|
|
110
|
+
prefix: r("payment.components.device"),
|
|
111
|
+
type: "Device - " + a.deviceType,
|
|
112
|
+
label: a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name,
|
|
113
|
+
chipLabel: a.deviceType + ": " + (a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name)
|
|
114
|
+
}))
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
m.value = l, v.value = m.value, u.value = !1;
|
|
118
|
+
}
|
|
119
|
+
return Q(C), k($, C), (l, s) => {
|
|
120
|
+
const a = h("FmCircularProgress"), E = h("FmChip"), S = h("FmSearch"), t = h("FmMenuItem"), e = h("FmMenu");
|
|
121
|
+
return n(u) ? (R(), O(a, {
|
|
122
|
+
key: 0,
|
|
123
|
+
size: "md"
|
|
124
|
+
})) : (R(), Y("div", he, [
|
|
125
|
+
d(e, { "close-on-click": !0 }, {
|
|
126
|
+
"menu-button": M(() => {
|
|
127
|
+
var o;
|
|
128
|
+
return [
|
|
129
|
+
d(E, {
|
|
130
|
+
icon: "account_box",
|
|
131
|
+
label: ((o = c.value) == null ? void 0 : o.chipLabel) ?? n(r)("payment.components.select"),
|
|
132
|
+
removable: !!c.value,
|
|
133
|
+
onChipClosed: s[0] || (s[0] = (y) => c.value = void 0)
|
|
134
|
+
}, null, 8, ["label", "removable"])
|
|
135
|
+
];
|
|
136
|
+
}),
|
|
137
|
+
default: M(() => [
|
|
138
|
+
N("div", Ae, [
|
|
139
|
+
N("div", Se, [
|
|
140
|
+
d(S, {
|
|
141
|
+
"model-value": p.value,
|
|
142
|
+
"onUpdate:modelValue": s[1] || (s[1] = (o) => p.value = o),
|
|
143
|
+
placeholder: n(r)("payment.components.select")
|
|
144
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
145
|
+
]),
|
|
146
|
+
N("div", null, [
|
|
147
|
+
(R(!0), Y(H, null, W(v.value, (o) => (R(), O(t, {
|
|
148
|
+
key: o.value,
|
|
149
|
+
label: o.label,
|
|
150
|
+
sublabel: o.type,
|
|
151
|
+
onClick: () => c.value = o
|
|
152
|
+
}, null, 8, ["label", "sublabel", "onClick"]))), 128))
|
|
153
|
+
])
|
|
154
|
+
])
|
|
155
|
+
]),
|
|
156
|
+
_: 1
|
|
157
|
+
})
|
|
158
|
+
]));
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
}), Ee = { class: "flex items-center gap-1" }, Fe = /* @__PURE__ */ w({
|
|
162
|
+
__name: "BillSeqNumber",
|
|
163
|
+
props: {
|
|
164
|
+
row: {},
|
|
165
|
+
data: {}
|
|
166
|
+
},
|
|
167
|
+
setup(U) {
|
|
168
|
+
return (f, _) => {
|
|
169
|
+
const b = h("FmIcon");
|
|
170
|
+
return R(), Y("span", Ee, [
|
|
171
|
+
X(Z(U.row.original.seqNumber) + " ", 1),
|
|
172
|
+
d(b, {
|
|
173
|
+
size: "md",
|
|
174
|
+
name: "check",
|
|
175
|
+
color: "#16a34a"
|
|
176
|
+
})
|
|
177
|
+
]);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}), Ie = { class: "flex justify-between mb-6 items-center" }, De = { class: "flex space-x-8 items-start" }, xe = { class: "flex space-x-4 self-center" }, Re = { class: "flex space-x-12 mb-6" }, Xe = /* @__PURE__ */ w({
|
|
181
|
+
__name: "Transaction",
|
|
182
|
+
setup(U) {
|
|
183
|
+
const f = de(), _ = pe(), { sessionUser: b } = J(), { t: r } = j(), { getBillLink: $ } = ve(), T = x(), { dateRange: u, searchKey: g, status: m, id: c, by: p } = se({
|
|
184
|
+
by: "",
|
|
185
|
+
id: "",
|
|
186
|
+
searchKey: "",
|
|
187
|
+
status: [D.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
188
|
+
dateRange: {
|
|
189
|
+
startDate: G().startOf("day").format("YYYY-MM-DD"),
|
|
190
|
+
endDate: G().endOf("day").format("YYYY-MM-DD")
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
let v;
|
|
194
|
+
const A = () => {
|
|
195
|
+
v && (clearTimeout(v), v = void 0);
|
|
196
|
+
}, {
|
|
197
|
+
promptSuggestion: B,
|
|
198
|
+
closeSuggestion: K
|
|
199
|
+
} = Te({
|
|
200
|
+
searchKey: g,
|
|
201
|
+
dateRange: u,
|
|
202
|
+
onBeforeApply: A
|
|
203
|
+
});
|
|
204
|
+
k(g, () => {
|
|
205
|
+
A(), B(), v = setTimeout(() => {
|
|
206
|
+
var t;
|
|
207
|
+
return (t = T.value) == null ? void 0 : t.reset();
|
|
208
|
+
}, 700);
|
|
209
|
+
}), k([u, m, c, p], () => {
|
|
210
|
+
var t;
|
|
211
|
+
(t = T.value) == null || t.reset();
|
|
212
|
+
}), ee(() => {
|
|
213
|
+
A(), K();
|
|
214
|
+
});
|
|
215
|
+
const C = [
|
|
216
|
+
{
|
|
217
|
+
label: "Success",
|
|
218
|
+
value: D.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: "Refunded",
|
|
222
|
+
value: D.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
label: "Process",
|
|
226
|
+
value: D.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
label: "Pending Settlement",
|
|
230
|
+
value: D.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
label: "Failed",
|
|
234
|
+
value: D.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
async function l(t, e) {
|
|
238
|
+
var o;
|
|
239
|
+
try {
|
|
240
|
+
const y = await P.refetchTransaction({
|
|
241
|
+
transactionId: t.id
|
|
242
|
+
});
|
|
243
|
+
(o = T.value) == null || o.replaceData(e, y), f.open({
|
|
244
|
+
type: "success",
|
|
245
|
+
title: "Transaction queried and updated successfully."
|
|
246
|
+
});
|
|
247
|
+
} catch (y) {
|
|
248
|
+
f.open({
|
|
249
|
+
type: "error",
|
|
250
|
+
title: "Fail to query transaction.",
|
|
251
|
+
message: L(y)
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async function s(t, e) {
|
|
256
|
+
z(
|
|
257
|
+
_,
|
|
258
|
+
"Refund Transaction",
|
|
259
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
|
260
|
+
async () => {
|
|
261
|
+
var o;
|
|
262
|
+
try {
|
|
263
|
+
const y = await P.refundTransaction({
|
|
264
|
+
transactionId: t.id,
|
|
265
|
+
reason: "portal transaction refund",
|
|
266
|
+
amount: t.fdoAmount
|
|
267
|
+
});
|
|
268
|
+
(o = T.value) == null || o.replaceData(e, y), f.open({
|
|
269
|
+
type: "success",
|
|
270
|
+
title: "Transaction refund request initiated."
|
|
271
|
+
});
|
|
272
|
+
} catch (y) {
|
|
273
|
+
f.open({
|
|
274
|
+
type: "error",
|
|
275
|
+
title: "Fail to request refund transaction.",
|
|
276
|
+
message: L(y)
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
async function a(t, e) {
|
|
283
|
+
z(
|
|
284
|
+
_,
|
|
285
|
+
"Notify Transaction",
|
|
286
|
+
"Are you sure to perform notify transaction?",
|
|
287
|
+
async () => {
|
|
288
|
+
try {
|
|
289
|
+
await P.renotifyTransaction(t.id), f.open({
|
|
290
|
+
type: "success",
|
|
291
|
+
title: "Transaction notify successfully."
|
|
292
|
+
});
|
|
293
|
+
} catch (o) {
|
|
294
|
+
f.open({
|
|
295
|
+
type: "error",
|
|
296
|
+
title: "Fail to notify transaction.",
|
|
297
|
+
message: L(o)
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
async function E(t, e) {
|
|
304
|
+
const o = ge(
|
|
305
|
+
[
|
|
306
|
+
{
|
|
307
|
+
type: "span",
|
|
308
|
+
queryKey: "transaction.id",
|
|
309
|
+
queryValue: t.id
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
t.transactionAt
|
|
313
|
+
);
|
|
314
|
+
window.open(o, "_blank");
|
|
315
|
+
}
|
|
316
|
+
x("");
|
|
317
|
+
const S = [
|
|
318
|
+
{
|
|
319
|
+
header: () => r("payment.transactions.table.id"),
|
|
320
|
+
accessorKey: "id",
|
|
321
|
+
cell: ({ cell: t, row: e }) => q(b.value) && e.original.transactionId ? e.original.id + `
|
|
322
|
+
ID: ` + e.original.transactionId : e.original.id
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
header: () => r("payment.transactions.table.pay_id"),
|
|
326
|
+
accessorKey: "payId",
|
|
327
|
+
cell: ({ cell: t, row: e }) => {
|
|
328
|
+
const o = $(e.original);
|
|
329
|
+
return o ? I(
|
|
330
|
+
"a",
|
|
331
|
+
{
|
|
332
|
+
href: o,
|
|
333
|
+
class: "text-blue-600 underline"
|
|
334
|
+
},
|
|
335
|
+
t.getValue()
|
|
336
|
+
) : t.getValue();
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
header: () => r("payment.transactions.table.gateway_id"),
|
|
341
|
+
accessorKey: "gatewayTransactionId"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
header: () => r("payment.transactions.table.bill_seq"),
|
|
345
|
+
accessorKey: "seqNumber",
|
|
346
|
+
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? I(Fe, { row: e, data: t.getValue() }) : e.original.seqNumber
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
header: () => r("payment.transactions.table.gateway"),
|
|
350
|
+
accessorKey: "gateway",
|
|
351
|
+
meta: {
|
|
352
|
+
textAlign: "center"
|
|
353
|
+
},
|
|
354
|
+
cell: ({ cell: t, row: e }) => e.original.gateway ? I(ye, { row: e, data: t.getValue() }) : ""
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
header: () => r("payment.transactions.table.method"),
|
|
358
|
+
accessorKey: "method",
|
|
359
|
+
meta: {
|
|
360
|
+
textAlign: "center"
|
|
361
|
+
},
|
|
362
|
+
cell: ({ cell: t, row: e }) => e.original.method ? I(fe, { row: e, data: t.getValue() }) : ""
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
header: () => r("payment.transactions.table.type"),
|
|
366
|
+
accessorKey: "payFor",
|
|
367
|
+
meta: {
|
|
368
|
+
textAlign: "center"
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
header: () => r("payment.transactions.table.status"),
|
|
373
|
+
accessorKey: "status",
|
|
374
|
+
cell: ({ cell: t }) => I(re, { data: t.getValue() })
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
header: () => r("payment.transactions.table.restaurant"),
|
|
378
|
+
accessorKey: "restaurantId"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
header: () => r("payment.transactions.table.source"),
|
|
382
|
+
accessorKey: "source",
|
|
383
|
+
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
header: () => r("payment.transactions.table.transaction_at"),
|
|
387
|
+
accessorKey: "transactionAt",
|
|
388
|
+
meta: {
|
|
389
|
+
width: "180px"
|
|
390
|
+
},
|
|
391
|
+
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.refundedAt : e.original.transactionAt
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
header: () => r("payment.transactions.table.sales_amount"),
|
|
395
|
+
accessorKey: "amount",
|
|
396
|
+
cell: ({ cell: t, row: e }) => q(b.value) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount
|
|
397
|
+
}
|
|
398
|
+
];
|
|
399
|
+
return q(b.value) && S.push({
|
|
400
|
+
header: () => r("payment.transactions.table.actions"),
|
|
401
|
+
accessorKey: "actions",
|
|
402
|
+
cell: ({ row: t }) => I(_e, {
|
|
403
|
+
transaction: t.original,
|
|
404
|
+
onAction: (e) => {
|
|
405
|
+
switch (e) {
|
|
406
|
+
case "notify":
|
|
407
|
+
return a(t.original, t.index);
|
|
408
|
+
case "query":
|
|
409
|
+
return l(t.original, t.index);
|
|
410
|
+
case "refund":
|
|
411
|
+
return s(t.original, t.index);
|
|
412
|
+
case "history":
|
|
413
|
+
return E(t.original, t.index);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
})
|
|
417
|
+
}), (t, e) => {
|
|
418
|
+
const o = h("FmSearch"), y = h("FmSelect");
|
|
419
|
+
return R(), O(te, {
|
|
420
|
+
title: n(r)("payment.transactions.title"),
|
|
421
|
+
description: n(r)("payment.transactions.description"),
|
|
422
|
+
loading: !1
|
|
423
|
+
}, {
|
|
424
|
+
default: M(() => [
|
|
425
|
+
N("div", Ie, [
|
|
426
|
+
N("div", De, [
|
|
427
|
+
d(o, {
|
|
428
|
+
"model-value": n(g),
|
|
429
|
+
"onUpdate:modelValue": e[0] || (e[0] = (i) => F(g) ? g.value = i : null),
|
|
430
|
+
class: "mr-8",
|
|
431
|
+
label: n(r)("payment.transactions.search.title"),
|
|
432
|
+
placeholder: n(r)("payment.transactions.search.placeholder")
|
|
433
|
+
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
434
|
+
d(y, {
|
|
435
|
+
modelValue: n(m),
|
|
436
|
+
"onUpdate:modelValue": e[2] || (e[2] = (i) => F(m) ? m.value = i : null),
|
|
437
|
+
class: "mr-6 w-[300px]",
|
|
438
|
+
label: n(r)("payment.transactions.status"),
|
|
439
|
+
"label-mark": "required",
|
|
440
|
+
multiselect: "",
|
|
441
|
+
items: C
|
|
442
|
+
}, {
|
|
443
|
+
"prepend-menu": M(() => [
|
|
444
|
+
d(le, {
|
|
445
|
+
modelValue: n(m),
|
|
446
|
+
"onUpdate:modelValue": e[1] || (e[1] = (i) => F(m) ? m.value = i : null),
|
|
447
|
+
items: C
|
|
448
|
+
}, null, 8, ["modelValue"])
|
|
449
|
+
]),
|
|
450
|
+
_: 1
|
|
451
|
+
}, 8, ["modelValue", "label"])
|
|
452
|
+
]),
|
|
453
|
+
N("div", xe, [
|
|
454
|
+
d(oe, {
|
|
455
|
+
button: {
|
|
456
|
+
appendIcon: "file_download",
|
|
457
|
+
variant: "primary",
|
|
458
|
+
label: n(r)("payment.transactions.button.export")
|
|
459
|
+
},
|
|
460
|
+
handler: async () => {
|
|
461
|
+
var V;
|
|
462
|
+
const i = await ((V = T.value) == null ? void 0 : V.allData());
|
|
463
|
+
i != null && await n(P).downloadPortalTransactionReport(
|
|
464
|
+
n(u),
|
|
465
|
+
n(ae)(i)
|
|
466
|
+
);
|
|
467
|
+
}
|
|
468
|
+
}, null, 8, ["button", "handler"])
|
|
469
|
+
])
|
|
470
|
+
]),
|
|
471
|
+
N("div", Re, [
|
|
472
|
+
d(Ne, {
|
|
473
|
+
id: n(c),
|
|
474
|
+
"onUpdate:id": e[3] || (e[3] = (i) => F(c) ? c.value = i : null),
|
|
475
|
+
by: n(p),
|
|
476
|
+
"onUpdate:by": e[4] || (e[4] = (i) => F(p) ? p.value = i : null)
|
|
477
|
+
}, null, 8, ["id", "by"]),
|
|
478
|
+
d(ie, {
|
|
479
|
+
modelValue: n(u),
|
|
480
|
+
"onUpdate:modelValue": e[5] || (e[5] = (i) => F(u) ? u.value = i : null)
|
|
481
|
+
}, null, 8, ["modelValue"])
|
|
482
|
+
]),
|
|
483
|
+
d(be, {
|
|
484
|
+
ref_key: "controller",
|
|
485
|
+
ref: T,
|
|
486
|
+
"column-defs": S,
|
|
487
|
+
"rows-defs": n(ne),
|
|
488
|
+
paginate: (i, V) => n(P).readTransactionsV2({
|
|
489
|
+
limit: i,
|
|
490
|
+
cursor: V,
|
|
491
|
+
status: n(m),
|
|
492
|
+
by: n(p),
|
|
493
|
+
id: n(c),
|
|
494
|
+
search: n(g),
|
|
495
|
+
start: n(u).startDate,
|
|
496
|
+
end: n(u).endDate
|
|
497
|
+
})
|
|
498
|
+
}, null, 8, ["rows-defs", "paginate"])
|
|
499
|
+
]),
|
|
500
|
+
_: 1
|
|
501
|
+
}, 8, ["title", "description"]);
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
});
|
|
505
|
+
export {
|
|
506
|
+
Xe as default
|
|
507
|
+
};
|