@feedmepos/mf-payment 1.6.13-dev → 1.6.16-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-CRy-UQpe.js → Actions.vue_vue_type_script_setup_true_lang-wXi4zlOF.js} +1 -1
- package/dist/AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CQSEq_3Z.js +139 -0
- package/dist/Chargeback-CJqlNeMt.js +397 -0
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-CiqJxutL.js → DocumentViewer.vue_vue_type_script_setup_true_lang-Ckul-6N5.js} +1 -1
- package/dist/{OnboardForm-DQBU7D0V.js → OnboardForm-B4uFIDfL.js} +5 -5
- package/dist/{OnboardForm-mETWu1dk.js → OnboardForm-BXMmCslr.js} +5 -5
- package/dist/{OnboardSubmission-DhR5UmjI.js → OnboardSubmission-DEdrkQIy.js} +2 -2
- package/dist/{OnboardSubmission-CdAKhGo2.js → OnboardSubmission-DTShUQzf.js} +5 -5
- package/dist/{PayoutAccount-DTUZj1yi.js → PayoutAccount-3nq_6mVJ.js} +5 -5
- package/dist/{PayoutAccount-z4BGvlhv.js → PayoutAccount-CPjDqMpd.js} +5 -5
- package/dist/{PayoutAccountSetting-DHaTKlRM.js → PayoutAccountSetting-BVgA9_0u.js} +6 -6
- package/dist/{Restaurant-Bzz0qnnj.js → Restaurant-DVj-b61o.js} +4 -4
- package/dist/{RestaurantSetting-BvAl6Vo-.js → RestaurantSetting-7y0qkqkE.js} +3 -3
- package/dist/{Settlement-DBhzPPJS.js → Settlement-Dg24FLXs.js} +3 -3
- package/dist/{Settlement-CPB3Cojm.js → Settlement-j77mmZXv.js} +4 -4
- package/dist/{SettlementTransactions-BwSrt1vA.js → SettlementTransactions-DqnFsNBQ.js} +4 -4
- package/dist/{SettlementTransactions-BsOGpbtn.js → SettlementTransactions-PBQgs92s.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-BSX8ZhuG.js → Status.vue_vue_type_script_setup_true_lang-DhbTRCYM.js} +1 -1
- package/dist/{Terminal-CzM77vSF.js → Terminal-BUDlYupd.js} +5 -5
- package/dist/{TerminalSetting-DtmOsDl0.js → TerminalSetting-CnfALKFc.js} +4 -4
- package/dist/Transaction-C5oj2fA7.js +690 -0
- package/dist/{Transaction-DBh0KtR-.js → Transaction-Cvl6QATl.js} +10 -10
- package/dist/{TransactionOld-CAORQJw2.js → TransactionOld-Cy2U8Hn4.js} +7 -7
- package/dist/api/transaction/index.d.ts +5 -2
- package/dist/{app-D4_0cKed.js → app-Bv1eKatH.js} +23 -23
- package/dist/app.js +1 -1
- package/dist/{assets-BEqu4LTS.js → assets-DAh5KIbj.js} +1 -1
- package/dist/components/AdminRestaurantSelector.vue.d.ts +17 -0
- package/dist/{grafana-BC92XSGj.js → grafana-CfbW-0Ri.js} +1 -1
- package/dist/{index-B4BQXToQ.js → index--DP2Qv9r.js} +40 -37
- package/dist/{index-DyFv4ofl.js → index-AdfhP3iZ.js} +1 -1
- package/dist/{index-2pJ6aK3N.js → index-BP3lxBw_.js} +1 -1
- package/dist/{index-lJgQkdhr.js → index-BU3AY5BY.js} +1 -1
- package/dist/{index-Vzwov74c.js → index-D_XLTy5p.js} +1 -1
- package/dist/{index-DqZVPkHG.js → index-Ds4tJNkA.js} +1 -1
- package/dist/{index-9bLqrnE-.js → index-DyRqovBt.js} +1 -1
- package/dist/{index-BBSrL5Hb.js → index-FMXYkp6e.js} +2 -2
- package/dist/{index-C-K9TPBG.js → index-HB-taFPL.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Dh_I8dOY.js → index.vue_vue_type_script_setup_true_lang-BqUNz7vW.js} +68 -61
- package/dist/package.json +1 -1
- package/dist/{payout-account-D5UsGVu2.js → payout-account-0jjiMCJQ.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Chargeback-Cg9Xe6iD.js +0 -413
- package/dist/Transaction-B1Hw-Qs-.js +0 -636
|
@@ -0,0 +1,690 @@
|
|
|
1
|
+
import { defineComponent as v, resolveComponent as g, openBlock as y, createBlock as M, withCtx as D, createElementVNode as S, unref as f, computed as X, createElementBlock as I, createVNode as p, Fragment as Z, renderList as ee, toDisplayString as G, createTextVNode as te, ref as ae, watch as V, onBeforeUnmount as ne, isRef as A, h as T } from "vue";
|
|
2
|
+
import { t as b } from "./index--DP2Qv9r.js";
|
|
3
|
+
import { h as P } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { p as w } from "./index-HB-taFPL.js";
|
|
5
|
+
import { g as oe, a as re, t as se, _ as ie, b as E } from "./assets-DAh5KIbj.js";
|
|
6
|
+
import { u as le } from "./index-DyRqovBt.js";
|
|
7
|
+
import { _ as ce } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
8
|
+
import { _ as ue } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
|
+
import { _ as de } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
|
|
10
|
+
import { _ as me } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CQSEq_3Z.js";
|
|
11
|
+
import { useSnackbar as pe, useDialog as ye } from "@feedmepos/ui-library";
|
|
12
|
+
import { w as q } from "./Modal-DB8M9o1T.js";
|
|
13
|
+
import { u as F } from "./error-K1CakhA9.js";
|
|
14
|
+
import { _ as fe } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
|
|
15
|
+
import { g as ge } from "./grafana-CfbW-0Ri.js";
|
|
16
|
+
import { _ as _e } from "./index.vue_vue_type_script_setup_true_lang-BqUNz7vW.js";
|
|
17
|
+
import { _ as he } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
|
|
18
|
+
import { _ as $ } from "./TextInputDialog.vue_vue_type_script_setup_true_lang-BvGYVca0.js";
|
|
19
|
+
import { useCoreStore as Te } from "@feedmepos/mf-common";
|
|
20
|
+
import { u as be, a as Se } from "./index-n58-Qewm.js";
|
|
21
|
+
import { h as C } from "./app-Bv1eKatH.js";
|
|
22
|
+
import { s as R } from "./validator-CTlVogBQ.js";
|
|
23
|
+
const we = ["src"], Ie = /* @__PURE__ */ v({
|
|
24
|
+
__name: "Gateway",
|
|
25
|
+
props: {
|
|
26
|
+
row: {},
|
|
27
|
+
data: {}
|
|
28
|
+
},
|
|
29
|
+
setup(i) {
|
|
30
|
+
return (o, c) => {
|
|
31
|
+
const l = g("FmTooltip");
|
|
32
|
+
return y(), M(l, {
|
|
33
|
+
variant: "plain",
|
|
34
|
+
placement: "top",
|
|
35
|
+
content: i.row.original.gateway,
|
|
36
|
+
"hide-arrow": !0
|
|
37
|
+
}, {
|
|
38
|
+
default: D(() => [
|
|
39
|
+
S("img", {
|
|
40
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
41
|
+
src: f(oe)(i.row.original.gateway)
|
|
42
|
+
}, null, 8, we)
|
|
43
|
+
]),
|
|
44
|
+
_: 1
|
|
45
|
+
}, 8, ["content"]);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}), De = ["src"], ve = /* @__PURE__ */ v({
|
|
49
|
+
__name: "Method",
|
|
50
|
+
props: {
|
|
51
|
+
row: {},
|
|
52
|
+
data: {}
|
|
53
|
+
},
|
|
54
|
+
setup(i) {
|
|
55
|
+
return (o, c) => {
|
|
56
|
+
const l = g("FmTooltip");
|
|
57
|
+
return y(), M(l, {
|
|
58
|
+
variant: "plain",
|
|
59
|
+
placement: "top",
|
|
60
|
+
content: i.row.original.method.issuer,
|
|
61
|
+
"hide-arrow": !0
|
|
62
|
+
}, {
|
|
63
|
+
default: D(() => [
|
|
64
|
+
S("img", {
|
|
65
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
66
|
+
src: f(re)(i.row.original.method.issuer, i.row.original.method.variant)
|
|
67
|
+
}, null, 8, De)
|
|
68
|
+
]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 8, ["content"]);
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}), Ae = /* @__PURE__ */ v({
|
|
74
|
+
__name: "Actions",
|
|
75
|
+
props: {
|
|
76
|
+
onAction: { type: Function },
|
|
77
|
+
transaction: {}
|
|
78
|
+
},
|
|
79
|
+
setup(i) {
|
|
80
|
+
const o = X(() => [
|
|
81
|
+
i.transaction.flags.query && {
|
|
82
|
+
label: "Query",
|
|
83
|
+
sublabel: "Perform transaction status inquriy",
|
|
84
|
+
icon: "question_answer",
|
|
85
|
+
action: "query"
|
|
86
|
+
},
|
|
87
|
+
i.transaction.flags.refund && {
|
|
88
|
+
label: "Refund",
|
|
89
|
+
sublabel: "Perform transaction refund request",
|
|
90
|
+
icon: "request_page",
|
|
91
|
+
action: "refund"
|
|
92
|
+
},
|
|
93
|
+
i.transaction.flags.notify && {
|
|
94
|
+
label: "Notify",
|
|
95
|
+
sublabel: "Perform webhook notification for transaction",
|
|
96
|
+
icon: "webhook",
|
|
97
|
+
action: "notify"
|
|
98
|
+
},
|
|
99
|
+
i.transaction.callbackResponse != null && {
|
|
100
|
+
label: "Show Transaction Metadata",
|
|
101
|
+
sublabel: "Display the transaction callback metadata in JSON.",
|
|
102
|
+
icon: "code",
|
|
103
|
+
action: "transactionMetadata"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
label: "Log",
|
|
107
|
+
sublabel: "Inspect transaction historical actions, requests and responses.",
|
|
108
|
+
icon: "history",
|
|
109
|
+
action: "history"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
label: "Set Pay ID",
|
|
113
|
+
sublabel: "Set a pay ID for this transaction",
|
|
114
|
+
icon: "receipt_long",
|
|
115
|
+
action: "setPayId"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
label: "Set Gateway ID",
|
|
119
|
+
sublabel: "Set a gateway transaction ID",
|
|
120
|
+
icon: "link",
|
|
121
|
+
action: "setGatewayId"
|
|
122
|
+
}
|
|
123
|
+
]);
|
|
124
|
+
return (c, l) => {
|
|
125
|
+
const d = g("FmIcon"), _ = g("FmMenuItem"), N = g("FmMenu");
|
|
126
|
+
return y(), I("div", {
|
|
127
|
+
onClick: l[0] || (l[0] = (u) => {
|
|
128
|
+
u.stopPropagation();
|
|
129
|
+
})
|
|
130
|
+
}, [
|
|
131
|
+
p(N, null, {
|
|
132
|
+
"menu-button": D(() => [
|
|
133
|
+
p(d, { name: "settings" })
|
|
134
|
+
]),
|
|
135
|
+
default: D(() => [
|
|
136
|
+
(y(!0), I(Z, null, ee(o.value.filter((u) => !!u), (u) => (y(), M(_, {
|
|
137
|
+
selectable: !0,
|
|
138
|
+
key: u.label,
|
|
139
|
+
sublabel: u.sublabel,
|
|
140
|
+
label: u.label,
|
|
141
|
+
icon: u.icon,
|
|
142
|
+
onclick: () => i.onAction(u.action)
|
|
143
|
+
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
|
144
|
+
]),
|
|
145
|
+
_: 1
|
|
146
|
+
})
|
|
147
|
+
]);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}), Fe = { class: "pb-24" }, Ne = {
|
|
151
|
+
key: 0,
|
|
152
|
+
class: "bg-gray-50 border border-gray-200 rounded-md p-16 text-xs font-mono overflow-auto max-h-[60vh]"
|
|
153
|
+
}, xe = {
|
|
154
|
+
key: 1,
|
|
155
|
+
class: "text-gray-500 text-sm"
|
|
156
|
+
}, Pe = /* @__PURE__ */ v({
|
|
157
|
+
__name: "TransactionMetadataDialog",
|
|
158
|
+
props: {
|
|
159
|
+
transactionMetadata: {}
|
|
160
|
+
},
|
|
161
|
+
setup(i) {
|
|
162
|
+
const o = i, c = () => {
|
|
163
|
+
if (o.transactionMetadata == null)
|
|
164
|
+
return "No transaction metadata available.";
|
|
165
|
+
try {
|
|
166
|
+
return JSON.stringify(o.transactionMetadata, null, 2);
|
|
167
|
+
} catch {
|
|
168
|
+
return String(o.transactionMetadata);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
return (l, d) => (y(), I("div", Fe, [
|
|
172
|
+
o.transactionMetadata != null ? (y(), I("pre", Ne, G(c()), 1)) : (y(), I("div", xe, " No transaction metadata available for this transaction. "))
|
|
173
|
+
]));
|
|
174
|
+
}
|
|
175
|
+
}), Ee = { class: "flex items-center gap-1" }, Me = /* @__PURE__ */ v({
|
|
176
|
+
__name: "BillSeqNumber",
|
|
177
|
+
props: {
|
|
178
|
+
row: {},
|
|
179
|
+
data: {}
|
|
180
|
+
},
|
|
181
|
+
setup(i) {
|
|
182
|
+
return (o, c) => {
|
|
183
|
+
const l = g("FmIcon");
|
|
184
|
+
return y(), I("span", Ee, [
|
|
185
|
+
te(G(i.row.original.seqNumber) + " ", 1),
|
|
186
|
+
p(l, {
|
|
187
|
+
size: "md",
|
|
188
|
+
name: "check",
|
|
189
|
+
color: "#16a34a"
|
|
190
|
+
})
|
|
191
|
+
]);
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
}), ke = { class: "flex flex-row justify-between items-end mb-6" }, Ve = { class: "flex flex-col" }, qe = { class: "flex items-start mb-2 gap-3" }, $e = { class: "flex gap-3" }, rt = /* @__PURE__ */ v({
|
|
195
|
+
__name: "Transaction",
|
|
196
|
+
setup(i) {
|
|
197
|
+
const o = ae(), { dateRange: c, searchKey: l, status: d, id: _ } = le({
|
|
198
|
+
id: "",
|
|
199
|
+
searchKey: "",
|
|
200
|
+
status: [w.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
201
|
+
dateRange: {
|
|
202
|
+
startDate: P().startOf("day").format("YYYY-MM-DD"),
|
|
203
|
+
endDate: P().endOf("day").format("YYYY-MM-DD")
|
|
204
|
+
}
|
|
205
|
+
}), N = [
|
|
206
|
+
{
|
|
207
|
+
label: "Success",
|
|
208
|
+
value: w.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
label: "Refunded",
|
|
212
|
+
value: w.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: "Process",
|
|
216
|
+
value: w.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
label: "Pending Settlement",
|
|
220
|
+
value: w.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
label: "Failed",
|
|
224
|
+
value: w.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
225
|
+
}
|
|
226
|
+
], { sessionUser: u } = Te(), r = pe(), h = ye(), { getBillLink: U } = be();
|
|
227
|
+
let x;
|
|
228
|
+
const k = () => {
|
|
229
|
+
x && (clearTimeout(x), x = void 0);
|
|
230
|
+
}, {
|
|
231
|
+
promptSuggestion: K,
|
|
232
|
+
closeSuggestion: O
|
|
233
|
+
} = Se({
|
|
234
|
+
searchKey: l,
|
|
235
|
+
dateRange: c,
|
|
236
|
+
onBeforeApply: k
|
|
237
|
+
}), Y = async (t, e) => {
|
|
238
|
+
const a = await b.readTransactions({
|
|
239
|
+
start: P(c.value.startDate).startOf("day").toISOString(),
|
|
240
|
+
end: P(c.value.endDate).endOf("day").toISOString(),
|
|
241
|
+
limit: t,
|
|
242
|
+
cursor: e,
|
|
243
|
+
status: d.value,
|
|
244
|
+
by: "RESTAURANT",
|
|
245
|
+
id: _.value,
|
|
246
|
+
search: l.value
|
|
247
|
+
});
|
|
248
|
+
return {
|
|
249
|
+
data: se(a.data),
|
|
250
|
+
meta: a.meta
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
V([c, d, _], () => {
|
|
254
|
+
var t;
|
|
255
|
+
(t = o.value) == null || t.reset();
|
|
256
|
+
}), V(l, () => {
|
|
257
|
+
k(), K(), x = setTimeout(() => {
|
|
258
|
+
var t;
|
|
259
|
+
(t = o.value) == null || t.reset();
|
|
260
|
+
}, 700);
|
|
261
|
+
}), ne(() => {
|
|
262
|
+
k(), O();
|
|
263
|
+
});
|
|
264
|
+
async function B(t) {
|
|
265
|
+
var a, s;
|
|
266
|
+
const e = (a = o.value) == null ? void 0 : a.pageData().at(t);
|
|
267
|
+
if (!e) {
|
|
268
|
+
r.open({
|
|
269
|
+
type: "error",
|
|
270
|
+
title: "Something went wrong",
|
|
271
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
272
|
+
});
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
try {
|
|
276
|
+
const n = await b.refetchTransaction({
|
|
277
|
+
transactionId: e.id
|
|
278
|
+
});
|
|
279
|
+
(s = o.value) == null || s.replaceData(t, E(n)), r.open({
|
|
280
|
+
type: "success",
|
|
281
|
+
title: "Transaction queried and updated successfully."
|
|
282
|
+
});
|
|
283
|
+
} catch (n) {
|
|
284
|
+
r.open({
|
|
285
|
+
type: "error",
|
|
286
|
+
title: "Fail to query transaction.",
|
|
287
|
+
message: F(n)
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
async function L(t) {
|
|
292
|
+
var a;
|
|
293
|
+
const e = (a = o.value) == null ? void 0 : a.pageData().at(t);
|
|
294
|
+
if (!e) {
|
|
295
|
+
r.open({
|
|
296
|
+
type: "error",
|
|
297
|
+
title: "Something went wrong",
|
|
298
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
299
|
+
});
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
q(
|
|
303
|
+
h,
|
|
304
|
+
"Refund Transaction",
|
|
305
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
|
306
|
+
async () => {
|
|
307
|
+
var s;
|
|
308
|
+
try {
|
|
309
|
+
const n = await b.refundTransaction({
|
|
310
|
+
transactionId: e.id,
|
|
311
|
+
reason: "portal transaction refund",
|
|
312
|
+
amount: e.fdoAmount
|
|
313
|
+
});
|
|
314
|
+
(s = o.value) == null || s.replaceData(t, E(n)), r.open({
|
|
315
|
+
type: "success",
|
|
316
|
+
title: "Transaction refund request initiated."
|
|
317
|
+
});
|
|
318
|
+
} catch (n) {
|
|
319
|
+
r.open({
|
|
320
|
+
type: "error",
|
|
321
|
+
title: "Fail to request refund transaction.",
|
|
322
|
+
message: F(n)
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
async function J(t) {
|
|
329
|
+
var a;
|
|
330
|
+
const e = (a = o.value) == null ? void 0 : a.pageData().at(t);
|
|
331
|
+
if (!e) {
|
|
332
|
+
r.open({
|
|
333
|
+
type: "error",
|
|
334
|
+
title: "Something went wrong",
|
|
335
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
336
|
+
});
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
q(
|
|
340
|
+
h,
|
|
341
|
+
"Notify Transaction",
|
|
342
|
+
"Are you sure to perform notify transaction?",
|
|
343
|
+
async () => {
|
|
344
|
+
try {
|
|
345
|
+
await b.renotifyTransaction(e.id), r.open({
|
|
346
|
+
type: "success",
|
|
347
|
+
title: "Transaction notify successfully."
|
|
348
|
+
});
|
|
349
|
+
} catch (s) {
|
|
350
|
+
r.open({
|
|
351
|
+
type: "error",
|
|
352
|
+
title: "Fail to notify transaction.",
|
|
353
|
+
message: F(s)
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
async function Q(t) {
|
|
360
|
+
var s;
|
|
361
|
+
const e = (s = o.value) == null ? void 0 : s.pageData().at(t);
|
|
362
|
+
if (!e) {
|
|
363
|
+
r.open({
|
|
364
|
+
type: "error",
|
|
365
|
+
title: "Something went wrong",
|
|
366
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
367
|
+
});
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
const a = ge(
|
|
371
|
+
[
|
|
372
|
+
{
|
|
373
|
+
type: "span",
|
|
374
|
+
queryKey: "transaction.id",
|
|
375
|
+
queryValue: e.id
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
e.transactionAt
|
|
379
|
+
);
|
|
380
|
+
window.open(a, "_blank");
|
|
381
|
+
}
|
|
382
|
+
async function j(t) {
|
|
383
|
+
var a;
|
|
384
|
+
const e = (a = o.value) == null ? void 0 : a.pageData().at(t);
|
|
385
|
+
if (!e) {
|
|
386
|
+
r.open({
|
|
387
|
+
type: "error",
|
|
388
|
+
title: "Something went wrong",
|
|
389
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
390
|
+
});
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
h.open({
|
|
394
|
+
title: "Set Pay ID",
|
|
395
|
+
closeButton: !0,
|
|
396
|
+
overlay: !0,
|
|
397
|
+
contentComponent: $,
|
|
398
|
+
contentComponentProps: {
|
|
399
|
+
label: "Pay ID",
|
|
400
|
+
placeholder: "Enter Pay ID",
|
|
401
|
+
schema: R().trim().min(1, "Pay ID is required")
|
|
402
|
+
}
|
|
403
|
+
}).onPrimary(async (s) => {
|
|
404
|
+
var n;
|
|
405
|
+
try {
|
|
406
|
+
const m = await b.bindPayId({
|
|
407
|
+
transactionId: e.id,
|
|
408
|
+
payId: s
|
|
409
|
+
});
|
|
410
|
+
(n = o.value) == null || n.replaceData(t, E(m)), r.open({
|
|
411
|
+
type: "success",
|
|
412
|
+
title: "Pay ID set successfully."
|
|
413
|
+
}), h.close();
|
|
414
|
+
} catch (m) {
|
|
415
|
+
r.open({
|
|
416
|
+
type: "error",
|
|
417
|
+
title: "Failed to set Pay ID.",
|
|
418
|
+
message: F(m)
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
async function z(t) {
|
|
424
|
+
var a;
|
|
425
|
+
const e = (a = o.value) == null ? void 0 : a.pageData().at(t);
|
|
426
|
+
if (!e) {
|
|
427
|
+
r.open({
|
|
428
|
+
type: "error",
|
|
429
|
+
title: "Something went wrong",
|
|
430
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
431
|
+
});
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
h.open({
|
|
435
|
+
title: "Set Gateway ID",
|
|
436
|
+
closeButton: !0,
|
|
437
|
+
overlay: !0,
|
|
438
|
+
contentComponent: $,
|
|
439
|
+
contentComponentProps: {
|
|
440
|
+
label: "Gateway Transaction ID",
|
|
441
|
+
placeholder: "Enter Gateway Transaction ID",
|
|
442
|
+
schema: R().trim().min(1, "Gateway Transaction ID is required")
|
|
443
|
+
}
|
|
444
|
+
}).onPrimary(async (s) => {
|
|
445
|
+
var n;
|
|
446
|
+
try {
|
|
447
|
+
const m = await b.setGatewayId({
|
|
448
|
+
transactionId: e.id,
|
|
449
|
+
gatewayTransactionId: s
|
|
450
|
+
});
|
|
451
|
+
(n = o.value) == null || n.replaceData(t, E(m)), r.open({
|
|
452
|
+
type: "success",
|
|
453
|
+
title: "Gateway ID set successfully."
|
|
454
|
+
}), h.close();
|
|
455
|
+
} catch (m) {
|
|
456
|
+
r.open({
|
|
457
|
+
type: "error",
|
|
458
|
+
title: "Failed to set Gateway ID.",
|
|
459
|
+
message: F(m)
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
async function H(t) {
|
|
465
|
+
var a;
|
|
466
|
+
const e = (a = o.value) == null ? void 0 : a.pageData().at(t);
|
|
467
|
+
if (!e) {
|
|
468
|
+
r.open({
|
|
469
|
+
type: "error",
|
|
470
|
+
title: "Something went wrong",
|
|
471
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
472
|
+
});
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
h.open({
|
|
476
|
+
title: "Transaction Metadata",
|
|
477
|
+
closeButton: !0,
|
|
478
|
+
overlay: !0,
|
|
479
|
+
contentComponent: Pe,
|
|
480
|
+
contentComponentProps: {
|
|
481
|
+
transactionMetadata: e.callbackResponse
|
|
482
|
+
}
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
const W = [
|
|
486
|
+
{
|
|
487
|
+
header: () => "Transaction ID",
|
|
488
|
+
accessorKey: "id",
|
|
489
|
+
cell: ({ cell: t }) => {
|
|
490
|
+
let e = "";
|
|
491
|
+
return C(u.value) && t.row.original.transactionId && (e = `
|
|
492
|
+
ID: ${t.row.original.transactionId}`), T(he, { data: t.getValue(), extra: e });
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
header: () => "Pay ID",
|
|
497
|
+
accessorKey: "payId",
|
|
498
|
+
cell: ({ cell: t, row: e }) => {
|
|
499
|
+
const a = U(e.original);
|
|
500
|
+
return a ? T(
|
|
501
|
+
"a",
|
|
502
|
+
{
|
|
503
|
+
href: a,
|
|
504
|
+
class: "text-blue-600 underline"
|
|
505
|
+
},
|
|
506
|
+
t.getValue()
|
|
507
|
+
) : t.getValue();
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
header: () => "Bill",
|
|
512
|
+
accessorKey: "seqNumber",
|
|
513
|
+
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? T(Me, { row: e, data: t.getValue() }) : e.original.seqNumber
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
header: () => "Gateway",
|
|
517
|
+
accessorKey: "gateway",
|
|
518
|
+
meta: {
|
|
519
|
+
textAlign: "center"
|
|
520
|
+
},
|
|
521
|
+
cell: ({ cell: t, row: e }) => e.original.method ? T(Ie, { row: e, data: t.getValue() }) : ""
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
header: () => "Method",
|
|
525
|
+
accessorKey: "method",
|
|
526
|
+
meta: {
|
|
527
|
+
textAlign: "center"
|
|
528
|
+
},
|
|
529
|
+
cell: ({ cell: t, row: e }) => e.original.method ? T(ve, { row: e, data: t.getValue() }) : ""
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
header: () => "Gateway ID",
|
|
533
|
+
accessorKey: "gatewayTransactionId",
|
|
534
|
+
cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.gatewayRefundId : e.original.gatewayTransactionId
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
header: () => "Type",
|
|
538
|
+
accessorKey: "payFor",
|
|
539
|
+
meta: {
|
|
540
|
+
textAlign: "center"
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
header: () => "Status",
|
|
545
|
+
accessorKey: "status",
|
|
546
|
+
cell: ({ cell: t }) => T(ie, { data: t.getValue() })
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
header: () => "Restaurant",
|
|
550
|
+
accessorKey: "restaurantId"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
header: () => "Source",
|
|
554
|
+
accessorKey: "source",
|
|
555
|
+
cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
header: () => "Transaction At",
|
|
559
|
+
accessorKey: "transactionAt",
|
|
560
|
+
meta: {
|
|
561
|
+
width: "180px"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
header: () => "Sales Amount",
|
|
566
|
+
accessorKey: "amount",
|
|
567
|
+
cell: ({ cell: t, row: e }) => C(u.value) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
header: () => "Actions",
|
|
571
|
+
accessorKey: "actions",
|
|
572
|
+
cell: ({ row: t }) => {
|
|
573
|
+
var a;
|
|
574
|
+
const e = (a = o.value) == null ? void 0 : a.pageData().at(t.index);
|
|
575
|
+
if (!e) {
|
|
576
|
+
r.open({
|
|
577
|
+
type: "error",
|
|
578
|
+
title: "Something went wrong",
|
|
579
|
+
message: "Fail to find transactions from the displayed transactions."
|
|
580
|
+
});
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
return T(Ae, {
|
|
584
|
+
transaction: e,
|
|
585
|
+
onAction: (s) => {
|
|
586
|
+
switch (s) {
|
|
587
|
+
case "notify":
|
|
588
|
+
return J(t.index);
|
|
589
|
+
case "query":
|
|
590
|
+
return B(t.index);
|
|
591
|
+
case "refund":
|
|
592
|
+
return L(t.index);
|
|
593
|
+
case "transactionMetadata":
|
|
594
|
+
return H(t.index);
|
|
595
|
+
case "history":
|
|
596
|
+
return Q(t.index);
|
|
597
|
+
case "setPayId":
|
|
598
|
+
return j(t.index);
|
|
599
|
+
case "setGatewayId":
|
|
600
|
+
return z(t.index);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
];
|
|
607
|
+
return (t, e) => {
|
|
608
|
+
const a = g("FmSearch"), s = g("FmSelect");
|
|
609
|
+
return y(), M(ce, {
|
|
610
|
+
title: "Transactions",
|
|
611
|
+
loading: !1
|
|
612
|
+
}, {
|
|
613
|
+
default: D(() => [
|
|
614
|
+
S("div", ke, [
|
|
615
|
+
S("div", Ve, [
|
|
616
|
+
S("div", qe, [
|
|
617
|
+
p(a, {
|
|
618
|
+
"model-value": f(l),
|
|
619
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => A(l) ? l.value = n : null),
|
|
620
|
+
class: "mr-8",
|
|
621
|
+
label: "Search",
|
|
622
|
+
"label-info": "Search by Transaction ID, Pay ID, Gateway Transaction ID, or Amount.",
|
|
623
|
+
placeholder: "Search Transactions ..."
|
|
624
|
+
}, null, 8, ["model-value"]),
|
|
625
|
+
p(s, {
|
|
626
|
+
modelValue: f(d),
|
|
627
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => A(d) ? d.value = n : null),
|
|
628
|
+
class: "w-[300px]",
|
|
629
|
+
label: "Status",
|
|
630
|
+
"label-mark": "required",
|
|
631
|
+
multiselect: "",
|
|
632
|
+
items: N
|
|
633
|
+
}, {
|
|
634
|
+
"prepend-menu": D(() => [
|
|
635
|
+
p(de, {
|
|
636
|
+
modelValue: f(d),
|
|
637
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => A(d) ? d.value = n : null),
|
|
638
|
+
items: N
|
|
639
|
+
}, null, 8, ["modelValue"])
|
|
640
|
+
]),
|
|
641
|
+
_: 1
|
|
642
|
+
}, 8, ["modelValue"])
|
|
643
|
+
]),
|
|
644
|
+
S("div", $e, [
|
|
645
|
+
p(me, {
|
|
646
|
+
modelValue: f(_),
|
|
647
|
+
"onUpdate:modelValue": e[3] || (e[3] = (n) => A(_) ? _.value = n : null),
|
|
648
|
+
placeholder: "Select restaurant",
|
|
649
|
+
"search-placeholder": "Search restaurants"
|
|
650
|
+
}, null, 8, ["modelValue"]),
|
|
651
|
+
p(fe, {
|
|
652
|
+
modelValue: f(c),
|
|
653
|
+
"onUpdate:modelValue": e[4] || (e[4] = (n) => A(c) ? c.value = n : null)
|
|
654
|
+
}, null, 8, ["modelValue"])
|
|
655
|
+
])
|
|
656
|
+
]),
|
|
657
|
+
S("div", null, [
|
|
658
|
+
p(ue, {
|
|
659
|
+
button: {
|
|
660
|
+
appendIcon: "file_download",
|
|
661
|
+
variant: "primary",
|
|
662
|
+
label: "Export"
|
|
663
|
+
},
|
|
664
|
+
handler: async () => {
|
|
665
|
+
var m;
|
|
666
|
+
const n = await ((m = o.value) == null ? void 0 : m.allData());
|
|
667
|
+
n != null && await f(b).downloadPortalTransactionReport(
|
|
668
|
+
f(c),
|
|
669
|
+
n
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
}, null, 8, ["handler"])
|
|
673
|
+
])
|
|
674
|
+
]),
|
|
675
|
+
p(_e, {
|
|
676
|
+
ref_key: "controller",
|
|
677
|
+
ref: o,
|
|
678
|
+
"column-defs": W,
|
|
679
|
+
"rows-defs": (n) => n,
|
|
680
|
+
paginate: Y
|
|
681
|
+
}, null, 8, ["rows-defs"])
|
|
682
|
+
]),
|
|
683
|
+
_: 1
|
|
684
|
+
});
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
});
|
|
688
|
+
export {
|
|
689
|
+
rt as default
|
|
690
|
+
};
|