@feedmepos/mf-payment 1.0.0 → 1.0.1
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/README.md +11 -1
- package/dist/{AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js → AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js} +8 -9
- package/dist/DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js +31 -0
- package/dist/PDFViewer-xrBtzrlR.js +22426 -0
- package/dist/{PayoutAccount-Dc1CYQ0W.js → PayoutAccount-Bxz83we4.js} +93 -83
- package/dist/{PayoutAccount-DZaKHWcy.js → PayoutAccount-DLxO15Kf.js} +259 -258
- package/dist/{PayoutAccountSetting-BzmNuLFj.js → PayoutAccountSetting-C1yeSNv8.js} +161 -183
- package/dist/Restaurant-B02jty0J.js +262 -0
- package/dist/RestaurantSetting-CWZAKz1A.js +389 -0
- package/dist/SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js +42 -0
- package/dist/Settlement-CAHgJIuH.js +145 -0
- package/dist/{Settlement-Bx3zAkIw.js → Settlement-D8nayzFt.js} +41 -43
- package/dist/{SettlementTransactions-D_SVuKyR.js → SettlementTransactions-DfXEf1fm.js} +10 -10
- package/dist/{SettlementTransactions-AaYyTH96.js → SettlementTransactions-JJyQEOMw.js} +41 -41
- package/dist/{Terminal-68OQnhM3.js → Terminal-DX8v8WpM.js} +117 -103
- package/dist/TerminalSetting-qklmRz3H.js +387 -0
- package/dist/TerminalTransaction-BjwvTbGu.js +261 -0
- package/dist/TerminalTransaction-D-mJRP0T.js +485 -0
- package/dist/Transaction-CZkNzH-m.js +238 -0
- package/dist/{Transaction-a1VfiCP_.js → Transaction-CvrsRuuz.js} +125 -127
- package/dist/api/restaurant/index.d.ts +6 -0
- package/dist/{app-C9FRsUfb.js → app-FuKCNfJl.js} +174 -144
- package/dist/app.js +1 -1
- package/dist/{assets-Bji7O2YD.js → assets-DjRoCcqv.js} +22 -21
- package/dist/components/AdminLayout.vue.d.ts +8 -13
- package/dist/components/AutoCopyCell.vue.d.ts +3 -4
- package/dist/components/DateRangePicker.vue.d.ts +13 -0
- package/dist/components/Layout.vue.d.ts +8 -13
- package/dist/components/PDFViewer.vue.d.ts +1 -1
- package/dist/components/PagingTable/FmTableSelection.vue.d.ts +13 -0
- package/dist/components/PagingTable/index.vue.d.ts +48 -0
- package/dist/components/RouteCell.vue.d.ts +5 -6
- package/dist/components/SelectAll.vue.d.ts +57 -0
- package/dist/helpers/idToDate.d.ts +1 -1
- package/dist/index-BEFlDEyV.js +28 -0
- package/dist/index-BWFqxSU3.js +19 -0
- package/dist/{index-DjDGwRX8.js → index-BerQZMQW.js} +1 -1
- package/dist/{index-DSuZG0l6.js → index-CFjLufVa.js} +1 -1
- package/dist/{index-_0TroOJr.js → index-CTSM9lSC.js} +1 -1
- package/dist/{index-DBfZnaV1.js → index-CWGSYCJG.js} +1 -1
- package/dist/{index-CLYePgWW.js → index-DFePh4ct.js} +1 -1
- package/dist/{index-Bt_OgDYn.js → index-Dj_LwPBy.js} +32176 -32166
- package/dist/{index.vue_vue_type_script_setup_true_lang-Jlcg1hAB.js → index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js} +64 -61
- package/dist/package.json +2 -2
- package/dist/{payout-account-BWcq7OJy.js → payout-account-YJZlBDSF.js} +2 -2
- package/dist/router/index.d.ts +1 -0
- package/dist/stores/iframe.d.ts +1 -1
- package/dist/stores/payoutAccount.d.ts +1 -1
- package/dist/{transaction-DqrhM5jB.js → transaction-CIYqsLqc.js} +26 -16
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/cell/Bank.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/IsActive.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/RateInput.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/Status.vue.d.ts +3 -5
- package/dist/views/admin/payout-account/cell/TPlusInput.vue.d.ts +3 -5
- package/dist/views/admin/restaurant/Restaurant.vue.d.ts +2 -0
- package/dist/views/admin/restaurant/RestaurantSetting.vue.d.ts +12 -0
- package/dist/views/admin/restaurant/cell/IsActive.vue.d.ts +7 -0
- package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +803 -0
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +50 -0
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
- package/dist/views/admin/settlement/cell/Actions.vue.d.ts +4 -6
- package/dist/views/admin/settlement/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/admin/settlement/cell/Method.vue.d.ts +3 -5
- package/dist/views/admin/settlement/cell/Status.vue.d.ts +3 -5
- package/dist/views/admin/terminal/TerminalBindCodeDialog.vue.d.ts +1 -1
- package/dist/views/admin/terminal/cell/Actions.vue.d.ts +7 -79
- package/dist/views/admin/terminal/cell/ID.vue.d.ts +3 -5
- package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -4
- package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +3 -5
- package/dist/views/admin/terminal-transaction/cell/Timestamp.vue.d.ts +7 -0
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +3 -4
- package/dist/views/admin/transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/admin/transaction/cell/Method.vue.d.ts +3 -5
- package/dist/views/admin/transaction/cell/Status.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/Bank.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/IsActive.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/PersonInCharge.vue.d.ts +3 -5
- package/dist/views/payout-account/cell/Status.vue.d.ts +3 -5
- package/dist/views/settlement/cell/Actions.vue.d.ts +4 -6
- package/dist/views/settlement/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/settlement/cell/Method.vue.d.ts +3 -5
- package/dist/views/settlement/cell/Status.vue.d.ts +3 -5
- package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/terminal-transaction/cell/Status.vue.d.ts +3 -5
- package/dist/views/transaction/cell/Gateway.vue.d.ts +3 -5
- package/dist/views/transaction/cell/Method.vue.d.ts +3 -5
- package/dist/views/transaction/cell/Status.vue.d.ts +3 -5
- package/package.json +2 -2
- package/dist/PDFViewer-CjH_C1uT.js +0 -21792
- package/dist/Settlement-mwnO-iYH.js +0 -150
- package/dist/TerminalSetting-DEFim0xg.js +0 -379
- package/dist/TerminalTransaction-CQjNdffr.js +0 -426
- package/dist/TerminalTransaction-ClihmWOJ.js +0 -250
- package/dist/Transaction-68L7JzIk.js +0 -242
@@ -0,0 +1,485 @@
|
|
1
|
+
import { defineComponent as w, openBlock as y, createElementBlock as N, unref as i, createCommentVNode as O, createElementVNode as b, resolveComponent as g, createBlock as v, normalizeClass as V, withCtx as h, toDisplayString as S, createVNode as c, Fragment as $, renderList as q, ref as K, watch as R, isRef as x, h as T } from "vue";
|
2
|
+
import { c as A } from "./index-Dj_LwPBy.js";
|
3
|
+
import { h as I } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as L } from "./index-BerQZMQW.js";
|
5
|
+
import { _ as P } from "./index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js";
|
6
|
+
import { _ as B } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
7
|
+
import { useSnackbar as G, useDialog as U } from "@feedmepos/ui-library";
|
8
|
+
import { g as j } from "./assets-DjRoCcqv.js";
|
9
|
+
import { E as Q, t as F } from "./index-CFjLufVa.js";
|
10
|
+
import { d as W } from "./dinero-CIVmXLL-.js";
|
11
|
+
import { _ as z } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
|
+
import { _ as H } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
13
|
+
import { useRouter as J } from "vue-router";
|
14
|
+
import { w as X } from "./Modal-DB8M9o1T.js";
|
15
|
+
import { u as D } from "./error-K1CakhA9.js";
|
16
|
+
import { _ as Z } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
17
|
+
import { _ as ee } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
18
|
+
const te = { class: "flex" }, ae = ["src"], ne = ["src"], re = /* @__PURE__ */ w({
|
19
|
+
__name: "Gateway",
|
20
|
+
props: {
|
21
|
+
row: {},
|
22
|
+
data: {}
|
23
|
+
},
|
24
|
+
setup(p) {
|
25
|
+
return (a, m) => (y(), N("div", te, [
|
26
|
+
a.row.original.ecrGateway ? (y(), N("img", {
|
27
|
+
key: 0,
|
28
|
+
class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
29
|
+
src: i(Q)
|
30
|
+
}, null, 8, ae)) : O("", !0),
|
31
|
+
b("img", {
|
32
|
+
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
33
|
+
src: i(j)(a.row.original.gateway)
|
34
|
+
}, null, 8, ne)
|
35
|
+
]));
|
36
|
+
}
|
37
|
+
}), oe = /* @__PURE__ */ w({
|
38
|
+
__name: "Status",
|
39
|
+
props: {
|
40
|
+
row: {},
|
41
|
+
data: {}
|
42
|
+
},
|
43
|
+
setup(p) {
|
44
|
+
const a = p;
|
45
|
+
function m() {
|
46
|
+
return a.data === A.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === A.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : a.data === A.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
47
|
+
}
|
48
|
+
return (n, l) => {
|
49
|
+
const s = g("FmBadge");
|
50
|
+
return y(), v(s, {
|
51
|
+
inline: "",
|
52
|
+
class: V(m())
|
53
|
+
}, {
|
54
|
+
default: h(() => [
|
55
|
+
b("div", null, S(n.data.toUpperCase()), 1)
|
56
|
+
]),
|
57
|
+
_: 1
|
58
|
+
}, 8, ["class"]);
|
59
|
+
};
|
60
|
+
}
|
61
|
+
}), se = /* @__PURE__ */ w({
|
62
|
+
__name: "RouteCell",
|
63
|
+
props: {
|
64
|
+
data: {},
|
65
|
+
route: {}
|
66
|
+
},
|
67
|
+
setup(p) {
|
68
|
+
const a = p, m = J();
|
69
|
+
function n() {
|
70
|
+
m.push(a.route);
|
71
|
+
}
|
72
|
+
return (l, s) => (y(), N("div", {
|
73
|
+
class: "fm-typo-en-link-md-600",
|
74
|
+
onClick: s[0] || (s[0] = (f) => {
|
75
|
+
f.stopPropagation(), n();
|
76
|
+
})
|
77
|
+
}, S(l.data), 1));
|
78
|
+
}
|
79
|
+
}), le = /* @__PURE__ */ w({
|
80
|
+
__name: "Actions",
|
81
|
+
props: {
|
82
|
+
onAction: { type: Function }
|
83
|
+
},
|
84
|
+
setup(p) {
|
85
|
+
const a = [
|
86
|
+
{
|
87
|
+
label: "Query",
|
88
|
+
sublabel: "Perform transaction status inquriy",
|
89
|
+
icon: "question_answer",
|
90
|
+
action: "query"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
label: "Refund",
|
94
|
+
sublabel: "Perform transaction refund request",
|
95
|
+
icon: "request_page",
|
96
|
+
action: "refund"
|
97
|
+
}
|
98
|
+
];
|
99
|
+
return (m, n) => {
|
100
|
+
const l = g("FmIcon"), s = g("FmMenuItem"), f = g("FmMenu");
|
101
|
+
return y(), N("div", {
|
102
|
+
onClick: n[0] || (n[0] = (u) => {
|
103
|
+
u.stopPropagation();
|
104
|
+
})
|
105
|
+
}, [
|
106
|
+
c(f, null, {
|
107
|
+
"menu-button": h(() => [
|
108
|
+
c(l, { name: "settings" })
|
109
|
+
]),
|
110
|
+
default: h(() => [
|
111
|
+
(y(), N($, null, q(a, (u) => c(s, {
|
112
|
+
selectable: !0,
|
113
|
+
key: u.label,
|
114
|
+
sublabel: u.sublabel,
|
115
|
+
label: u.label,
|
116
|
+
icon: u.icon,
|
117
|
+
onclick: () => m.onAction(u.action)
|
118
|
+
}, null, 8, ["sublabel", "label", "icon", "onclick"])), 64))
|
119
|
+
]),
|
120
|
+
_: 1
|
121
|
+
})
|
122
|
+
]);
|
123
|
+
};
|
124
|
+
}
|
125
|
+
});
|
126
|
+
function ie(p) {
|
127
|
+
let a;
|
128
|
+
try {
|
129
|
+
a = parseInt(p.substr(0, 8), 16) * 1e3;
|
130
|
+
} catch {
|
131
|
+
return null;
|
132
|
+
}
|
133
|
+
return new Date(a);
|
134
|
+
}
|
135
|
+
const ce = /* @__PURE__ */ w({
|
136
|
+
__name: "Timestamp",
|
137
|
+
props: {
|
138
|
+
createdAt: {},
|
139
|
+
transactionAt: {},
|
140
|
+
refundedAt: {}
|
141
|
+
},
|
142
|
+
setup(p) {
|
143
|
+
return (a, m) => {
|
144
|
+
const n = g("FmListItem"), l = g("FmList");
|
145
|
+
return y(), v(l, { class: "w-[180px]" }, {
|
146
|
+
default: h(() => [
|
147
|
+
c(n, {
|
148
|
+
label: "Created At",
|
149
|
+
sublabel: a.createdAt
|
150
|
+
}, null, 8, ["sublabel"]),
|
151
|
+
c(n, {
|
152
|
+
label: "Transaction At",
|
153
|
+
sublabel: a.transactionAt
|
154
|
+
}, null, 8, ["sublabel"]),
|
155
|
+
c(n, {
|
156
|
+
label: "Refunded At",
|
157
|
+
sublabel: a.refundedAt
|
158
|
+
}, null, 8, ["sublabel"])
|
159
|
+
]),
|
160
|
+
_: 1
|
161
|
+
});
|
162
|
+
};
|
163
|
+
}
|
164
|
+
}), ue = { class: "flex justify-between mb-6 items-start" }, me = { class: "flex space-x-4 items-start" }, de = { class: "flex space-x-4 self-center" }, pe = { class: "mb-6" }, Se = /* @__PURE__ */ w({
|
165
|
+
__name: "TerminalTransaction",
|
166
|
+
setup(p) {
|
167
|
+
const a = G(), m = U(), n = K(), { dateRange: l, status: s, searchKey: f } = L({
|
168
|
+
searchKey: "",
|
169
|
+
status: [A.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
|
170
|
+
dateRange: {
|
171
|
+
startDate: I().startOf("day").format("YYYY-MM-DD"),
|
172
|
+
endDate: I().endOf("day").format("YYYY-MM-DD")
|
173
|
+
}
|
174
|
+
});
|
175
|
+
R([l, s], () => {
|
176
|
+
var e;
|
177
|
+
return (e = n.value) == null ? void 0 : e.reset();
|
178
|
+
});
|
179
|
+
let u;
|
180
|
+
R(f, async () => {
|
181
|
+
u && clearTimeout(u), u = setTimeout(
|
182
|
+
() => {
|
183
|
+
var e;
|
184
|
+
return (e = n.value) == null ? void 0 : e.reset();
|
185
|
+
},
|
186
|
+
700
|
187
|
+
);
|
188
|
+
});
|
189
|
+
async function M(e) {
|
190
|
+
var o, d, r;
|
191
|
+
const t = (d = (o = n.value) == null ? void 0 : o.pageData()) == null ? void 0 : d.at(e);
|
192
|
+
if (!t) {
|
193
|
+
a.open({
|
194
|
+
type: "error",
|
195
|
+
title: "Something went wrong",
|
196
|
+
message: "Fail to find transactions from the displayed transactions."
|
197
|
+
});
|
198
|
+
return;
|
199
|
+
}
|
200
|
+
if (!t.refId) {
|
201
|
+
a.open({
|
202
|
+
type: "error",
|
203
|
+
title: "Something went wrong",
|
204
|
+
message: "Transaction isn't a valid transaction to perform query"
|
205
|
+
});
|
206
|
+
return;
|
207
|
+
}
|
208
|
+
try {
|
209
|
+
const _ = await F.queryTransaction(t._id);
|
210
|
+
(r = n.value) == null || r.replaceData(e, _), a.open({
|
211
|
+
type: "success",
|
212
|
+
title: "Transaction queried and updated successfully."
|
213
|
+
});
|
214
|
+
} catch (_) {
|
215
|
+
a.open({
|
216
|
+
type: "error",
|
217
|
+
title: "Fail to query transaction.",
|
218
|
+
message: D(_)
|
219
|
+
});
|
220
|
+
}
|
221
|
+
}
|
222
|
+
async function E(e) {
|
223
|
+
var o, d;
|
224
|
+
const t = (d = (o = n.value) == null ? void 0 : o.pageData()) == null ? void 0 : d.at(e);
|
225
|
+
if (!t) {
|
226
|
+
a.open({
|
227
|
+
type: "error",
|
228
|
+
title: "Something went wrong",
|
229
|
+
message: "Fail to find transactions from the displayed transactions."
|
230
|
+
});
|
231
|
+
return;
|
232
|
+
}
|
233
|
+
if (!t.refId) {
|
234
|
+
a.open({
|
235
|
+
type: "error",
|
236
|
+
title: "Something went wrong",
|
237
|
+
message: "Transaction isn't a valid transaction to perform refund"
|
238
|
+
});
|
239
|
+
return;
|
240
|
+
}
|
241
|
+
X(
|
242
|
+
m,
|
243
|
+
"Refund Transaction",
|
244
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
245
|
+
async () => {
|
246
|
+
var r;
|
247
|
+
try {
|
248
|
+
const _ = await F.refundTransaction({
|
249
|
+
transactionId: t._id,
|
250
|
+
reason: "portal transaction refund",
|
251
|
+
amount: t.details.amount
|
252
|
+
});
|
253
|
+
(r = n.value) == null || r.replaceData(e, _), a.open({
|
254
|
+
type: "success",
|
255
|
+
title: "Transaction queried and updated successfully."
|
256
|
+
});
|
257
|
+
} catch (_) {
|
258
|
+
a.open({
|
259
|
+
type: "error",
|
260
|
+
title: "Fail to query transaction.",
|
261
|
+
message: D(_)
|
262
|
+
});
|
263
|
+
}
|
264
|
+
}
|
265
|
+
);
|
266
|
+
}
|
267
|
+
const C = [
|
268
|
+
{
|
269
|
+
label: "Success",
|
270
|
+
value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.success
|
271
|
+
},
|
272
|
+
{
|
273
|
+
label: "Refunded",
|
274
|
+
value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
|
275
|
+
},
|
276
|
+
{
|
277
|
+
label: "Process",
|
278
|
+
value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.process
|
279
|
+
},
|
280
|
+
{
|
281
|
+
label: "Failed",
|
282
|
+
value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
|
283
|
+
}
|
284
|
+
], k = function(e) {
|
285
|
+
const t = e;
|
286
|
+
let o = "-";
|
287
|
+
t.details && t.details.amount && (o = W(t.details.amount).toFormat("$0.00"));
|
288
|
+
const d = ie(e._id);
|
289
|
+
return {
|
290
|
+
id: e._id,
|
291
|
+
orderId: e.orderId,
|
292
|
+
refId: e.refId,
|
293
|
+
owner: e.owner,
|
294
|
+
terminalId: e.terminalId,
|
295
|
+
action: e.action,
|
296
|
+
gateway: e.gateway,
|
297
|
+
ecrGateway: e.ecrGateway,
|
298
|
+
amount: o,
|
299
|
+
createdAt: d ? I(d).format("YYYY-MM-DD hh:mm:ss") : "N/A",
|
300
|
+
transactionAt: e.transactionAt ? I(e.transactionAt).format("YYYY-MM-DD hh:mm:ss") : "N/A",
|
301
|
+
refundedAt: e.refundedAt ? I(e.refundedAt).format("YYYY-MM-DD hh:mm:ss") : "N/A"
|
302
|
+
};
|
303
|
+
}, Y = [
|
304
|
+
{
|
305
|
+
accessorKey: "id",
|
306
|
+
header: () => "Transaction ID",
|
307
|
+
meta: {
|
308
|
+
textAlign: "left"
|
309
|
+
},
|
310
|
+
cell: ({ cell: e }) => T(H, { data: e.getValue() })
|
311
|
+
},
|
312
|
+
{
|
313
|
+
accessorKey: "orderId",
|
314
|
+
header: () => "Pay ID",
|
315
|
+
meta: {
|
316
|
+
textAlign: "left"
|
317
|
+
}
|
318
|
+
},
|
319
|
+
{
|
320
|
+
accessorKey: "refId",
|
321
|
+
header: () => "Reference ID",
|
322
|
+
meta: {
|
323
|
+
textAlign: "left"
|
324
|
+
}
|
325
|
+
},
|
326
|
+
{
|
327
|
+
accessorKey: "gateway",
|
328
|
+
header: () => "Gateway",
|
329
|
+
meta: {
|
330
|
+
textAlign: "center",
|
331
|
+
maxWidth: "128px"
|
332
|
+
},
|
333
|
+
cell: ({ cell: e, row: t }) => T(re, { row: t, data: e.getValue() })
|
334
|
+
},
|
335
|
+
{
|
336
|
+
accessorKey: "action",
|
337
|
+
header: () => "Status",
|
338
|
+
meta: {
|
339
|
+
textAlign: "right",
|
340
|
+
maxWidth: "132px"
|
341
|
+
},
|
342
|
+
cell: ({ cell: e, row: t }) => T(oe, { row: t, data: e.getValue() })
|
343
|
+
},
|
344
|
+
{
|
345
|
+
accessorKey: "amount",
|
346
|
+
header: () => "Sales Amount",
|
347
|
+
meta: {
|
348
|
+
textAlign: "center"
|
349
|
+
}
|
350
|
+
},
|
351
|
+
{
|
352
|
+
accessorKey: "terminalId",
|
353
|
+
header: () => "Terminal ID",
|
354
|
+
meta: {
|
355
|
+
textAlign: "left"
|
356
|
+
},
|
357
|
+
cell: ({ cell: e, row: t }) => {
|
358
|
+
const o = e.getValue();
|
359
|
+
return T(se, {
|
360
|
+
data: o,
|
361
|
+
route: {
|
362
|
+
name: "mf-payment-admin.terminal-setting",
|
363
|
+
params: { terminalId: o }
|
364
|
+
}
|
365
|
+
});
|
366
|
+
}
|
367
|
+
},
|
368
|
+
{
|
369
|
+
accessorKey: "owner",
|
370
|
+
header: () => "Reference",
|
371
|
+
meta: {
|
372
|
+
textAlign: "left"
|
373
|
+
}
|
374
|
+
},
|
375
|
+
{
|
376
|
+
accessorKey: "timestamp",
|
377
|
+
header: () => "Timestamp",
|
378
|
+
meta: {
|
379
|
+
textAlign: "left"
|
380
|
+
},
|
381
|
+
cell: ({ row: e }) => T(ce, {
|
382
|
+
createdAt: e.original.createdAt,
|
383
|
+
transactionAt: e.original.transactionAt,
|
384
|
+
refundedAt: e.original.refundedAt
|
385
|
+
})
|
386
|
+
},
|
387
|
+
{
|
388
|
+
header: () => "Actions",
|
389
|
+
accessorKey: "actions",
|
390
|
+
cell: ({ row: e }) => {
|
391
|
+
if (e.original.gateway === "ScanPay")
|
392
|
+
return T(le, {
|
393
|
+
onAction: (t) => {
|
394
|
+
const o = e.index;
|
395
|
+
switch (t) {
|
396
|
+
case "query":
|
397
|
+
return M(o);
|
398
|
+
case "refund":
|
399
|
+
return E(o);
|
400
|
+
}
|
401
|
+
}
|
402
|
+
});
|
403
|
+
}
|
404
|
+
}
|
405
|
+
];
|
406
|
+
return (e, t) => {
|
407
|
+
const o = g("FmSearch"), d = g("FmSelect");
|
408
|
+
return y(), v(B, {
|
409
|
+
title: "Terminal Transactions",
|
410
|
+
loading: !1
|
411
|
+
}, {
|
412
|
+
default: h(() => [
|
413
|
+
b("div", ue, [
|
414
|
+
b("div", me, [
|
415
|
+
c(o, {
|
416
|
+
"model-value": i(f),
|
417
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => x(f) ? f.value = r : null),
|
418
|
+
class: "mr-8",
|
419
|
+
label: "Search",
|
420
|
+
placeholder: "Search Transactions ..."
|
421
|
+
}, null, 8, ["model-value"]),
|
422
|
+
c(d, {
|
423
|
+
modelValue: i(s),
|
424
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => x(s) ? s.value = r : null),
|
425
|
+
class: "mr-6 w-[300px]",
|
426
|
+
label: "Status",
|
427
|
+
"label-mark": "required",
|
428
|
+
multiselect: "",
|
429
|
+
items: C
|
430
|
+
}, {
|
431
|
+
"prepend-menu": h(() => [
|
432
|
+
c(Z, {
|
433
|
+
modelValue: i(s),
|
434
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => x(s) ? s.value = r : null),
|
435
|
+
items: C
|
436
|
+
}, null, 8, ["modelValue"])
|
437
|
+
]),
|
438
|
+
_: 1
|
439
|
+
}, 8, ["modelValue"])
|
440
|
+
]),
|
441
|
+
b("div", de, [
|
442
|
+
c(z, {
|
443
|
+
button: {
|
444
|
+
appendIcon: "file_download",
|
445
|
+
variant: "primary",
|
446
|
+
label: "Export"
|
447
|
+
},
|
448
|
+
handler: async () => {
|
449
|
+
var r;
|
450
|
+
return i(F).downloadTransactions(await ((r = n.value) == null ? void 0 : r.allData()) ?? []);
|
451
|
+
}
|
452
|
+
}, null, 8, ["handler"])
|
453
|
+
])
|
454
|
+
]),
|
455
|
+
b("div", pe, [
|
456
|
+
c(ee, {
|
457
|
+
modelValue: i(l),
|
458
|
+
"onUpdate:modelValue": t[3] || (t[3] = (r) => x(l) ? l.value = r : null)
|
459
|
+
}, null, 8, ["modelValue"])
|
460
|
+
]),
|
461
|
+
c(P, {
|
462
|
+
ref_key: "controller",
|
463
|
+
ref: n,
|
464
|
+
"column-defs": Y,
|
465
|
+
"rows-defs": k,
|
466
|
+
onRowClick: t[4] || (t[4] = () => {
|
467
|
+
}),
|
468
|
+
paginate: (r, _) => i(F).readTransactions({
|
469
|
+
status: i(s),
|
470
|
+
searchKey: i(f),
|
471
|
+
limit: r,
|
472
|
+
cursor: _,
|
473
|
+
start: i(l).startDate,
|
474
|
+
end: i(l).endDate
|
475
|
+
})
|
476
|
+
}, null, 8, ["paginate"])
|
477
|
+
]),
|
478
|
+
_: 1
|
479
|
+
});
|
480
|
+
};
|
481
|
+
}
|
482
|
+
});
|
483
|
+
export {
|
484
|
+
Se as default
|
485
|
+
};
|