@feedmepos/mf-payment 1.5.34 → 1.5.36-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-CSmRCpz2.js} +14 -14
- package/dist/{Chargeback-BkVFinyh.js → Chargeback-F4uNGOcy.js} +1 -1
- package/dist/{OnboardForm-B04cZaFV.js → OnboardForm-CmJck1RQ.js} +1 -1
- package/dist/{OnboardForm--wUvq0Bz.js → OnboardForm-DWKPrjY-.js} +1 -1
- package/dist/{PayoutAccount-jlCtwsaD.js → PayoutAccount-Cn7cy7kV.js} +1 -1
- package/dist/{PayoutAccount-E5ujCJqw.js → PayoutAccount-yNSUSaHi.js} +1 -1
- package/dist/Settlement-BAeQCoUt.js +610 -0
- package/dist/{Settlement-DJ6ETp2U.js → Settlement-CRlYjp36.js} +1 -1
- package/dist/{SettlementTransactions-cYUYH2RJ.js → SettlementTransactions-DEoxfkFL.js} +22 -18
- package/dist/{SettlementTransactions-DF2ybUos.js → SettlementTransactions-DN9uCpiR.js} +3 -3
- package/dist/Transaction-CvUypCQq.js +490 -0
- package/dist/{Transaction-A-sOT2PE.js → Transaction-HTemq8TC.js} +149 -156
- package/dist/{TransactionOld-DttRuS3v.js → TransactionOld-BEfflWka.js} +3 -3
- package/dist/api/settlement/index.d.ts +10 -4
- package/dist/api/transaction/index.d.ts +1 -1
- package/dist/{app-qtpxMy1_.js → app-D3WWgJ8i.js} +141 -132
- package/dist/app.js +1 -1
- package/dist/{assets-gWQvONT9.js → assets-t2kJFjI9.js} +72 -71
- package/dist/components/SettlementSelector.vue.d.ts +12 -0
- package/dist/components/SourceSelector.vue.d.ts +2 -0
- package/dist/composable/transaction/index.d.ts +4 -0
- package/dist/index-CPf8YYLa.js +9 -0
- package/dist/{index-BcmesiC4.js → index-_EfmUlsc.js} +21 -19
- package/dist/{index-BRhAeH7J.js → index-jfRfVr4R.js} +14 -8
- package/dist/model/transaction.d.ts +1 -0
- package/dist/package.json +1 -1
- package/dist/{payout-account-Ca3Ayv7S.js → payout-account-BviNeOr7.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Settlement-SoOQIN8y.js +0 -490
- package/dist/Transaction-CbZRbUDH.js +0 -482
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as
|
|
3
|
-
import { h as
|
|
4
|
-
import { g as
|
|
5
|
-
import { u as
|
|
6
|
-
import { _ as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { useDialogChild as
|
|
1
|
+
import { defineComponent as D, resolveComponent as p, openBlock as g, createBlock as F, withCtx as I, createElementVNode as w, unref as f, computed as Y, createElementBlock as $, createVNode as y, Fragment as L, renderList as U, ref as C, createTextVNode as j, toDisplayString as z, watch as G, isRef as K, h as _ } from "vue";
|
|
2
|
+
import { t as b } from "./index-jfRfVr4R.js";
|
|
3
|
+
import { h as S } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { g as Q, a as W, t as H, _ as J, b as q } from "./assets-t2kJFjI9.js";
|
|
5
|
+
import { u as X } from "./index-Q0ELb0wB.js";
|
|
6
|
+
import { _ as Z } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
7
|
+
import { _ as ee } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
8
|
+
import { useDialogChild as te, useSnackbar as ae, useDialog as ne } from "@feedmepos/ui-library";
|
|
9
9
|
import { w as N } from "./Modal-DB8M9o1T.js";
|
|
10
10
|
import { u as T } from "./error-K1CakhA9.js";
|
|
11
|
-
import { _ as
|
|
12
|
-
import { g as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { _ as
|
|
15
|
-
import { s as
|
|
16
|
-
import { useCoreStore as
|
|
17
|
-
|
|
11
|
+
import { _ as oe } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
|
|
12
|
+
import { g as re } from "./grafana-VY3mqepx.js";
|
|
13
|
+
import { _ as se } from "./index.vue_vue_type_script_setup_true_lang-CkzD8rQP.js";
|
|
14
|
+
import { _ as ie } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
|
|
15
|
+
import { s as P, z as ce } from "./validator-DzjyJnvv.js";
|
|
16
|
+
import { useCoreStore as le } from "@feedmepos/mf-common";
|
|
17
|
+
import { u as ue } from "./index-CPf8YYLa.js";
|
|
18
|
+
const de = ["src"], me = /* @__PURE__ */ D({
|
|
18
19
|
__name: "Gateway",
|
|
19
20
|
props: {
|
|
20
21
|
row: {},
|
|
21
22
|
data: {}
|
|
22
23
|
},
|
|
23
24
|
setup(s) {
|
|
24
|
-
return (
|
|
25
|
+
return (r, u) => {
|
|
25
26
|
const i = p("FmTooltip");
|
|
26
27
|
return g(), F(i, {
|
|
27
28
|
variant: "plain",
|
|
@@ -29,24 +30,24 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
29
30
|
content: s.row.original.gateway,
|
|
30
31
|
"hide-arrow": !0
|
|
31
32
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
33
|
+
default: I(() => [
|
|
34
|
+
w("img", {
|
|
34
35
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
35
|
-
src:
|
|
36
|
-
}, null, 8,
|
|
36
|
+
src: f(Q)(s.row.original.gateway)
|
|
37
|
+
}, null, 8, de)
|
|
37
38
|
]),
|
|
38
39
|
_: 1
|
|
39
40
|
}, 8, ["content"]);
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
}),
|
|
43
|
+
}), pe = ["src"], fe = /* @__PURE__ */ D({
|
|
43
44
|
__name: "Method",
|
|
44
45
|
props: {
|
|
45
46
|
row: {},
|
|
46
47
|
data: {}
|
|
47
48
|
},
|
|
48
49
|
setup(s) {
|
|
49
|
-
return (
|
|
50
|
+
return (r, u) => {
|
|
50
51
|
const i = p("FmTooltip");
|
|
51
52
|
return g(), F(i, {
|
|
52
53
|
variant: "plain",
|
|
@@ -54,24 +55,24 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
54
55
|
content: s.row.original.method.issuer,
|
|
55
56
|
"hide-arrow": !0
|
|
56
57
|
}, {
|
|
57
|
-
default:
|
|
58
|
-
|
|
58
|
+
default: I(() => [
|
|
59
|
+
w("img", {
|
|
59
60
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
60
|
-
src:
|
|
61
|
-
}, null, 8,
|
|
61
|
+
src: f(W)(s.row.original.method.issuer, s.row.original.method.variant)
|
|
62
|
+
}, null, 8, pe)
|
|
62
63
|
]),
|
|
63
64
|
_: 1
|
|
64
65
|
}, 8, ["content"]);
|
|
65
66
|
};
|
|
66
67
|
}
|
|
67
|
-
}),
|
|
68
|
+
}), ye = /* @__PURE__ */ D({
|
|
68
69
|
__name: "Actions",
|
|
69
70
|
props: {
|
|
70
71
|
onAction: { type: Function },
|
|
71
72
|
transaction: {}
|
|
72
73
|
},
|
|
73
74
|
setup(s) {
|
|
74
|
-
const
|
|
75
|
+
const r = Y(() => [
|
|
75
76
|
s.transaction.flags.query && {
|
|
76
77
|
label: "Query",
|
|
77
78
|
sublabel: "Perform transaction status inquriy",
|
|
@@ -108,20 +109,20 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
108
109
|
icon: "link",
|
|
109
110
|
action: "setGatewayId"
|
|
110
111
|
}
|
|
111
|
-
];
|
|
112
|
+
]);
|
|
112
113
|
return (u, i) => {
|
|
113
|
-
const d = p("FmIcon"),
|
|
114
|
+
const d = p("FmIcon"), o = p("FmMenuItem"), m = p("FmMenu");
|
|
114
115
|
return g(), $("div", {
|
|
115
116
|
onClick: i[0] || (i[0] = (c) => {
|
|
116
117
|
c.stopPropagation();
|
|
117
118
|
})
|
|
118
119
|
}, [
|
|
119
|
-
|
|
120
|
-
"menu-button":
|
|
121
|
-
|
|
120
|
+
y(m, null, {
|
|
121
|
+
"menu-button": I(() => [
|
|
122
|
+
y(d, { name: "settings" })
|
|
122
123
|
]),
|
|
123
|
-
default:
|
|
124
|
-
(g(!0), $(
|
|
124
|
+
default: I(() => [
|
|
125
|
+
(g(!0), $(L, null, U(r.value.filter((c) => !!c), (c) => (g(), F(o, {
|
|
125
126
|
selectable: !0,
|
|
126
127
|
key: c.label,
|
|
127
128
|
sublabel: c.sublabel,
|
|
@@ -135,7 +136,7 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
135
136
|
]);
|
|
136
137
|
};
|
|
137
138
|
}
|
|
138
|
-
}),
|
|
139
|
+
}), ge = { class: "flex justify-end mb-2" }, B = /* @__PURE__ */ D({
|
|
139
140
|
__name: "TextInputDialog",
|
|
140
141
|
props: {
|
|
141
142
|
label: {
|
|
@@ -148,31 +149,31 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
148
149
|
},
|
|
149
150
|
schema: {
|
|
150
151
|
type: Object,
|
|
151
|
-
default: () =>
|
|
152
|
+
default: () => P().min(1, "Value is required")
|
|
152
153
|
}
|
|
153
154
|
},
|
|
154
155
|
setup(s) {
|
|
155
|
-
const
|
|
156
|
-
const c =
|
|
156
|
+
const r = s, { emitData: u, emitAction: i } = te(), d = C(""), o = P().trim().pipe(r.schema), m = () => {
|
|
157
|
+
const c = o.safeParse(d.value);
|
|
157
158
|
c.success && (u(c.data), i("primary"));
|
|
158
159
|
};
|
|
159
|
-
return (c,
|
|
160
|
-
const
|
|
160
|
+
return (c, x) => {
|
|
161
|
+
const v = p("FmTextField"), k = p("FmButton"), V = p("FmForm");
|
|
161
162
|
return g(), F(V, {
|
|
162
163
|
class: "flex flex-col gap-16",
|
|
163
164
|
onValidationSuccess: m
|
|
164
165
|
}, {
|
|
165
|
-
default:
|
|
166
|
-
|
|
166
|
+
default: I(() => [
|
|
167
|
+
y(v, {
|
|
167
168
|
modelValue: d.value,
|
|
168
|
-
"onUpdate:modelValue":
|
|
169
|
+
"onUpdate:modelValue": x[0] || (x[0] = (A) => d.value = A),
|
|
169
170
|
label: s.label,
|
|
170
171
|
placeholder: s.placeholder,
|
|
171
|
-
rules:
|
|
172
|
+
rules: f(ce)(f(o)),
|
|
172
173
|
autofocus: ""
|
|
173
174
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"]),
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
w("div", ge, [
|
|
176
|
+
y(k, {
|
|
176
177
|
type: "submit",
|
|
177
178
|
variant: "primary",
|
|
178
179
|
label: "Confirm"
|
|
@@ -183,18 +184,18 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
183
184
|
});
|
|
184
185
|
};
|
|
185
186
|
}
|
|
186
|
-
}),
|
|
187
|
+
}), he = { class: "flex items-center gap-1" }, _e = /* @__PURE__ */ D({
|
|
187
188
|
__name: "BillSeqNumber",
|
|
188
189
|
props: {
|
|
189
190
|
row: {},
|
|
190
191
|
data: {}
|
|
191
192
|
},
|
|
192
193
|
setup(s) {
|
|
193
|
-
return (
|
|
194
|
+
return (r, u) => {
|
|
194
195
|
const i = p("FmIcon");
|
|
195
|
-
return g(), $("span",
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
return g(), $("span", he, [
|
|
197
|
+
j(z(s.row.original.seqNumber) + " ", 1),
|
|
198
|
+
y(i, {
|
|
198
199
|
size: "md",
|
|
199
200
|
name: "check",
|
|
200
201
|
color: "#16a34a"
|
|
@@ -202,27 +203,27 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
202
203
|
]);
|
|
203
204
|
};
|
|
204
205
|
}
|
|
205
|
-
}),
|
|
206
|
+
}), be = { class: "flex justify-between mb-6 items-center" }, we = { class: "flex space-x-4" }, Ie = { class: "flex space-x-4 self-center" }, De = { class: "mb-6" }, Re = /* @__PURE__ */ D({
|
|
206
207
|
__name: "Transaction",
|
|
207
208
|
setup(s) {
|
|
208
|
-
const
|
|
209
|
+
const r = C(), { dateRange: u, searchKey: i } = X({
|
|
209
210
|
searchKey: "",
|
|
210
211
|
dateRange: {
|
|
211
|
-
startDate:
|
|
212
|
-
endDate:
|
|
212
|
+
startDate: S().startOf("day").format("YYYY-MM-DD"),
|
|
213
|
+
endDate: S().endOf("day").format("YYYY-MM-DD")
|
|
213
214
|
}
|
|
214
|
-
}), { sessionUser: d } =
|
|
215
|
+
}), { sessionUser: d } = le(), o = ae(), m = ne(), { getBillLink: c } = ue(), x = async (t, e) => {
|
|
215
216
|
let a = parseInt(e);
|
|
216
217
|
Number.isNaN(a) && (a = 1);
|
|
217
|
-
const n = await
|
|
218
|
-
start:
|
|
219
|
-
end:
|
|
218
|
+
const n = await b.readTransactions({
|
|
219
|
+
start: S(u.value.startDate).startOf("day").toISOString(),
|
|
220
|
+
end: S(u.value.endDate).endOf("day").toISOString(),
|
|
220
221
|
limit: t,
|
|
221
222
|
skip: (a - 1) * t,
|
|
222
223
|
search: i.value
|
|
223
224
|
}), l = n.length == t;
|
|
224
225
|
return {
|
|
225
|
-
data:
|
|
226
|
+
data: H(n),
|
|
226
227
|
meta: {
|
|
227
228
|
cursor: l ? (a + 1).toString() : ""
|
|
228
229
|
}
|
|
@@ -230,20 +231,20 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
230
231
|
};
|
|
231
232
|
G(u, async () => {
|
|
232
233
|
var t;
|
|
233
|
-
(t =
|
|
234
|
+
(t = r.value) == null || t.reset();
|
|
234
235
|
});
|
|
235
|
-
let
|
|
236
|
+
let v;
|
|
236
237
|
G(i, async () => {
|
|
237
|
-
|
|
238
|
+
v && clearTimeout(v), v = setTimeout(() => {
|
|
238
239
|
var t;
|
|
239
|
-
(t =
|
|
240
|
+
(t = r.value) == null || t.reset();
|
|
240
241
|
}, 700);
|
|
241
242
|
});
|
|
242
|
-
async function
|
|
243
|
+
async function k(t) {
|
|
243
244
|
var a, n;
|
|
244
|
-
const e = (a =
|
|
245
|
+
const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
|
|
245
246
|
if (!e) {
|
|
246
|
-
|
|
247
|
+
o.open({
|
|
247
248
|
type: "error",
|
|
248
249
|
title: "Something went wrong",
|
|
249
250
|
message: "Fail to find transactions from the displayed transactions."
|
|
@@ -251,26 +252,24 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
251
252
|
return;
|
|
252
253
|
}
|
|
253
254
|
try {
|
|
254
|
-
const l = await
|
|
255
|
-
|
|
256
|
-
});
|
|
257
|
-
(n = o.value) == null || n.replaceData(t, S(l)), r.open({
|
|
255
|
+
const l = await b.refetchTransaction({ transactionId: e.id });
|
|
256
|
+
(n = r.value) == null || n.replaceData(t, q(l)), o.open({
|
|
258
257
|
type: "success",
|
|
259
258
|
title: "Transaction queried and updated successfully."
|
|
260
259
|
});
|
|
261
260
|
} catch (l) {
|
|
262
|
-
|
|
261
|
+
o.open({
|
|
263
262
|
type: "error",
|
|
264
263
|
title: "Fail to query transaction.",
|
|
265
264
|
message: T(l)
|
|
266
265
|
});
|
|
267
266
|
}
|
|
268
267
|
}
|
|
269
|
-
async function
|
|
268
|
+
async function V(t) {
|
|
270
269
|
var a;
|
|
271
|
-
const e = (a =
|
|
270
|
+
const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
|
|
272
271
|
if (!e) {
|
|
273
|
-
|
|
272
|
+
o.open({
|
|
274
273
|
type: "error",
|
|
275
274
|
title: "Something went wrong",
|
|
276
275
|
message: "Fail to find transactions from the displayed transactions."
|
|
@@ -284,17 +283,17 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
284
283
|
async () => {
|
|
285
284
|
var n;
|
|
286
285
|
try {
|
|
287
|
-
const l = await
|
|
286
|
+
const l = await b.refundTransaction({
|
|
288
287
|
transactionId: e.id,
|
|
289
288
|
reason: "portal transaction refund",
|
|
290
289
|
amount: e.fdoAmount
|
|
291
290
|
});
|
|
292
|
-
(n =
|
|
291
|
+
(n = r.value) == null || n.replaceData(t, q(l)), o.open({
|
|
293
292
|
type: "success",
|
|
294
293
|
title: "Transaction refund request initiated."
|
|
295
294
|
});
|
|
296
295
|
} catch (l) {
|
|
297
|
-
|
|
296
|
+
o.open({
|
|
298
297
|
type: "error",
|
|
299
298
|
title: "Fail to request refund transaction.",
|
|
300
299
|
message: T(l)
|
|
@@ -303,11 +302,11 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
303
302
|
}
|
|
304
303
|
);
|
|
305
304
|
}
|
|
306
|
-
async function
|
|
305
|
+
async function A(t) {
|
|
307
306
|
var a;
|
|
308
|
-
const e = (a =
|
|
307
|
+
const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
|
|
309
308
|
if (!e) {
|
|
310
|
-
|
|
309
|
+
o.open({
|
|
311
310
|
type: "error",
|
|
312
311
|
title: "Something went wrong",
|
|
313
312
|
message: "Fail to find transactions from the displayed transactions."
|
|
@@ -320,12 +319,12 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
320
319
|
"Are you sure to perform notify transaction?",
|
|
321
320
|
async () => {
|
|
322
321
|
try {
|
|
323
|
-
await
|
|
322
|
+
await b.renotifyTransaction(e.id), o.open({
|
|
324
323
|
type: "success",
|
|
325
324
|
title: "Transaction notify successfully."
|
|
326
325
|
});
|
|
327
326
|
} catch (n) {
|
|
328
|
-
|
|
327
|
+
o.open({
|
|
329
328
|
type: "error",
|
|
330
329
|
title: "Fail to notify transaction.",
|
|
331
330
|
message: T(n)
|
|
@@ -334,34 +333,31 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
334
333
|
}
|
|
335
334
|
);
|
|
336
335
|
}
|
|
337
|
-
async function
|
|
336
|
+
async function M(t) {
|
|
338
337
|
var n;
|
|
339
|
-
const e = (n =
|
|
338
|
+
const e = (n = r.value) == null ? void 0 : n.pageData().at(t);
|
|
340
339
|
if (!e) {
|
|
341
|
-
|
|
340
|
+
o.open({
|
|
342
341
|
type: "error",
|
|
343
342
|
title: "Something went wrong",
|
|
344
343
|
message: "Fail to find transactions from the displayed transactions."
|
|
345
344
|
});
|
|
346
345
|
return;
|
|
347
346
|
}
|
|
348
|
-
const a =
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
],
|
|
356
|
-
e.transactionAt
|
|
357
|
-
);
|
|
347
|
+
const a = re([
|
|
348
|
+
{
|
|
349
|
+
type: "span",
|
|
350
|
+
queryKey: "transaction.id",
|
|
351
|
+
queryValue: e.id
|
|
352
|
+
}
|
|
353
|
+
], e.transactionAt);
|
|
358
354
|
window.open(a, "_blank");
|
|
359
355
|
}
|
|
360
356
|
async function R(t) {
|
|
361
357
|
var a;
|
|
362
|
-
const e = (a =
|
|
358
|
+
const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
|
|
363
359
|
if (!e) {
|
|
364
|
-
|
|
360
|
+
o.open({
|
|
365
361
|
type: "error",
|
|
366
362
|
title: "Something went wrong",
|
|
367
363
|
message: "Fail to find transactions from the displayed transactions."
|
|
@@ -372,25 +368,22 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
372
368
|
title: "Set Pay ID",
|
|
373
369
|
closeButton: !0,
|
|
374
370
|
overlay: !0,
|
|
375
|
-
contentComponent:
|
|
371
|
+
contentComponent: B,
|
|
376
372
|
contentComponentProps: {
|
|
377
373
|
label: "Pay ID",
|
|
378
374
|
placeholder: "Enter Pay ID",
|
|
379
|
-
schema:
|
|
375
|
+
schema: P().trim().min(1, "Pay ID is required")
|
|
380
376
|
}
|
|
381
377
|
}).onPrimary(async (n) => {
|
|
382
378
|
var l;
|
|
383
379
|
try {
|
|
384
|
-
const h = await
|
|
385
|
-
|
|
386
|
-
payId: n
|
|
387
|
-
});
|
|
388
|
-
(l = o.value) == null || l.replaceData(t, S(h)), r.open({
|
|
380
|
+
const h = await b.bindPayId({ transactionId: e.id, payId: n });
|
|
381
|
+
(l = r.value) == null || l.replaceData(t, q(h)), o.open({
|
|
389
382
|
type: "success",
|
|
390
383
|
title: "Pay ID set successfully."
|
|
391
384
|
}), m.close();
|
|
392
385
|
} catch (h) {
|
|
393
|
-
|
|
386
|
+
o.open({
|
|
394
387
|
type: "error",
|
|
395
388
|
title: "Failed to set Pay ID.",
|
|
396
389
|
message: T(h)
|
|
@@ -398,11 +391,11 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
398
391
|
}
|
|
399
392
|
});
|
|
400
393
|
}
|
|
401
|
-
async function
|
|
394
|
+
async function E(t) {
|
|
402
395
|
var a;
|
|
403
|
-
const e = (a =
|
|
396
|
+
const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
|
|
404
397
|
if (!e) {
|
|
405
|
-
|
|
398
|
+
o.open({
|
|
406
399
|
type: "error",
|
|
407
400
|
title: "Something went wrong",
|
|
408
401
|
message: "Fail to find transactions from the displayed transactions."
|
|
@@ -413,25 +406,22 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
413
406
|
title: "Set Gateway ID",
|
|
414
407
|
closeButton: !0,
|
|
415
408
|
overlay: !0,
|
|
416
|
-
contentComponent:
|
|
409
|
+
contentComponent: B,
|
|
417
410
|
contentComponentProps: {
|
|
418
411
|
label: "Gateway Transaction ID",
|
|
419
412
|
placeholder: "Enter Gateway Transaction ID",
|
|
420
|
-
schema:
|
|
413
|
+
schema: P().trim().min(1, "Gateway Transaction ID is required")
|
|
421
414
|
}
|
|
422
415
|
}).onPrimary(async (n) => {
|
|
423
416
|
var l;
|
|
424
417
|
try {
|
|
425
|
-
const h = await
|
|
426
|
-
|
|
427
|
-
gatewayTransactionId: n
|
|
428
|
-
});
|
|
429
|
-
(l = o.value) == null || l.replaceData(t, S(h)), r.open({
|
|
418
|
+
const h = await b.setGatewayId({ transactionId: e.id, gatewayTransactionId: n });
|
|
419
|
+
(l = r.value) == null || l.replaceData(t, q(h)), o.open({
|
|
430
420
|
type: "success",
|
|
431
421
|
title: "Gateway ID set successfully."
|
|
432
422
|
}), m.close();
|
|
433
423
|
} catch (h) {
|
|
434
|
-
|
|
424
|
+
o.open({
|
|
435
425
|
type: "error",
|
|
436
426
|
title: "Failed to set Gateway ID.",
|
|
437
427
|
message: T(h)
|
|
@@ -439,7 +429,7 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
439
429
|
}
|
|
440
430
|
});
|
|
441
431
|
}
|
|
442
|
-
const
|
|
432
|
+
const O = [
|
|
443
433
|
{
|
|
444
434
|
header: () => "Transaction ID",
|
|
445
435
|
accessorKey: "id",
|
|
@@ -447,17 +437,24 @@ const ce = ["src"], le = /* @__PURE__ */ v({
|
|
|
447
437
|
var a, n;
|
|
448
438
|
let e = "";
|
|
449
439
|
return ((a = d.value) != null && a.role.isStaff || (n = d.value) != null && n.role.isAdmin) && t.row.original.transactionId && (e = `
|
|
450
|
-
ID: ${t.row.original.transactionId}`),
|
|
440
|
+
ID: ${t.row.original.transactionId}`), _(ie, { data: t.getValue(), extra: e });
|
|
451
441
|
}
|
|
452
442
|
},
|
|
453
443
|
{
|
|
454
444
|
header: () => "Pay ID",
|
|
455
|
-
accessorKey: "payId"
|
|
445
|
+
accessorKey: "payId",
|
|
446
|
+
cell: ({ cell: t, row: e }) => {
|
|
447
|
+
const a = c(e.original);
|
|
448
|
+
return a ? _("a", {
|
|
449
|
+
href: a,
|
|
450
|
+
class: "text-blue-600 underline"
|
|
451
|
+
}, t.getValue()) : t.getValue();
|
|
452
|
+
}
|
|
456
453
|
},
|
|
457
454
|
{
|
|
458
455
|
header: () => "Bill",
|
|
459
456
|
accessorKey: "seqNumber",
|
|
460
|
-
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ?
|
|
457
|
+
cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? _(_e, { row: e, data: t.getValue() }) : e.original.seqNumber
|
|
461
458
|
},
|
|
462
459
|
{
|
|
463
460
|
header: () => "Gateway",
|
|
@@ -465,7 +462,7 @@ ID: ${t.row.original.transactionId}`), I(oe, { data: t.getValue(), extra: e });
|
|
|
465
462
|
meta: {
|
|
466
463
|
textAlign: "center"
|
|
467
464
|
},
|
|
468
|
-
cell: ({ cell: t, row: e }) => e.original.method ?
|
|
465
|
+
cell: ({ cell: t, row: e }) => e.original.method ? _(me, { row: e, data: t.getValue() }) : ""
|
|
469
466
|
},
|
|
470
467
|
{
|
|
471
468
|
header: () => "Method",
|
|
@@ -473,7 +470,7 @@ ID: ${t.row.original.transactionId}`), I(oe, { data: t.getValue(), extra: e });
|
|
|
473
470
|
meta: {
|
|
474
471
|
textAlign: "center"
|
|
475
472
|
},
|
|
476
|
-
cell: ({ cell: t, row: e }) => e.original.method ?
|
|
473
|
+
cell: ({ cell: t, row: e }) => e.original.method ? _(fe, { row: e, data: t.getValue() }) : ""
|
|
477
474
|
},
|
|
478
475
|
{
|
|
479
476
|
header: () => "Gateway ID",
|
|
@@ -490,11 +487,7 @@ ID: ${t.row.original.transactionId}`), I(oe, { data: t.getValue(), extra: e });
|
|
|
490
487
|
{
|
|
491
488
|
header: () => "Status",
|
|
492
489
|
accessorKey: "status",
|
|
493
|
-
cell: ({ cell: t }) =>
|
|
494
|
-
},
|
|
495
|
-
{
|
|
496
|
-
header: () => "Restaurant",
|
|
497
|
-
accessorKey: "restaurantId"
|
|
490
|
+
cell: ({ cell: t }) => _(J, { data: t.getValue() })
|
|
498
491
|
},
|
|
499
492
|
{
|
|
500
493
|
header: () => "Source",
|
|
@@ -521,31 +514,31 @@ ID: ${t.row.original.transactionId}`), I(oe, { data: t.getValue(), extra: e });
|
|
|
521
514
|
accessorKey: "actions",
|
|
522
515
|
cell: ({ row: t }) => {
|
|
523
516
|
var a;
|
|
524
|
-
const e = (a =
|
|
517
|
+
const e = (a = r.value) == null ? void 0 : a.pageData().at(t.index);
|
|
525
518
|
if (!e) {
|
|
526
|
-
|
|
519
|
+
o.open({
|
|
527
520
|
type: "error",
|
|
528
521
|
title: "Something went wrong",
|
|
529
522
|
message: "Fail to find transactions from the displayed transactions."
|
|
530
523
|
});
|
|
531
524
|
return;
|
|
532
525
|
}
|
|
533
|
-
return
|
|
526
|
+
return _(ye, {
|
|
534
527
|
transaction: e,
|
|
535
528
|
onAction: (n) => {
|
|
536
529
|
switch (n) {
|
|
537
530
|
case "notify":
|
|
538
|
-
return
|
|
531
|
+
return A(t.index);
|
|
539
532
|
case "query":
|
|
540
|
-
return
|
|
533
|
+
return k(t.index);
|
|
541
534
|
case "refund":
|
|
542
|
-
return
|
|
535
|
+
return V(t.index);
|
|
543
536
|
case "history":
|
|
544
|
-
return
|
|
537
|
+
return M(t.index);
|
|
545
538
|
case "setPayId":
|
|
546
539
|
return R(t.index);
|
|
547
540
|
case "setGatewayId":
|
|
548
|
-
return
|
|
541
|
+
return E(t.index);
|
|
549
542
|
}
|
|
550
543
|
}
|
|
551
544
|
});
|
|
@@ -554,49 +547,49 @@ ID: ${t.row.original.transactionId}`), I(oe, { data: t.getValue(), extra: e });
|
|
|
554
547
|
];
|
|
555
548
|
return (t, e) => {
|
|
556
549
|
const a = p("FmSearch");
|
|
557
|
-
return g(), F(
|
|
550
|
+
return g(), F(Z, {
|
|
558
551
|
title: "Transactions",
|
|
559
552
|
loading: !1
|
|
560
553
|
}, {
|
|
561
|
-
default:
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
"model-value":
|
|
554
|
+
default: I(() => [
|
|
555
|
+
w("div", be, [
|
|
556
|
+
w("div", we, [
|
|
557
|
+
y(a, {
|
|
558
|
+
"model-value": f(i),
|
|
566
559
|
"onUpdate:modelValue": e[0] || (e[0] = (n) => K(i) ? i.value = n : null),
|
|
567
560
|
class: "mr-8",
|
|
568
561
|
label: "Search",
|
|
569
562
|
placeholder: "Search Transactions ..."
|
|
570
563
|
}, null, 8, ["model-value"])
|
|
571
564
|
]),
|
|
572
|
-
|
|
573
|
-
|
|
565
|
+
w("div", Ie, [
|
|
566
|
+
y(ee, {
|
|
574
567
|
button: {
|
|
575
568
|
appendIcon: "file_download",
|
|
576
569
|
variant: "primary",
|
|
577
570
|
label: "Export"
|
|
578
571
|
},
|
|
579
572
|
handler: async () => {
|
|
580
|
-
await
|
|
581
|
-
start:
|
|
582
|
-
end:
|
|
573
|
+
await f(b).downloadTransactionReport({
|
|
574
|
+
start: f(u).startDate,
|
|
575
|
+
end: f(u).endDate
|
|
583
576
|
});
|
|
584
577
|
}
|
|
585
578
|
}, null, 8, ["handler"])
|
|
586
579
|
])
|
|
587
580
|
]),
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
modelValue:
|
|
581
|
+
w("div", De, [
|
|
582
|
+
y(oe, {
|
|
583
|
+
modelValue: f(u),
|
|
591
584
|
"onUpdate:modelValue": e[1] || (e[1] = (n) => K(u) ? u.value = n : null)
|
|
592
585
|
}, null, 8, ["modelValue"])
|
|
593
586
|
]),
|
|
594
|
-
|
|
587
|
+
y(se, {
|
|
595
588
|
ref_key: "controller",
|
|
596
|
-
ref:
|
|
597
|
-
"column-defs":
|
|
589
|
+
ref: r,
|
|
590
|
+
"column-defs": O,
|
|
598
591
|
"rows-defs": (n) => n,
|
|
599
|
-
paginate:
|
|
592
|
+
paginate: x
|
|
600
593
|
}, null, 8, ["rows-defs"])
|
|
601
594
|
]),
|
|
602
595
|
_: 1
|
|
@@ -605,5 +598,5 @@ ID: ${t.row.original.transactionId}`), I(oe, { data: t.getValue(), extra: e });
|
|
|
605
598
|
}
|
|
606
599
|
});
|
|
607
600
|
export {
|
|
608
|
-
|
|
601
|
+
Re as default
|
|
609
602
|
};
|