@feedmepos/mf-payment 1.5.17-dev → 1.5.20-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.
Files changed (79) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-BVJmo7yZ.js → Actions.vue_vue_type_script_setup_true_lang-DbsSsOek.js} +2 -2
  2. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js +52 -0
  3. package/dist/{Chargeback-CN_5ffe0.js → Chargeback-Bds2iEV5.js} +6 -6
  4. package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DVeP7_1A.js → DocumentViewer.vue_vue_type_script_setup_true_lang-BgL6Nuvr.js} +1 -1
  5. package/dist/{OnboardForm-5Ebr2vf9.js → OnboardForm-BbRipw6v.js} +5 -5
  6. package/dist/{OnboardForm-Ch_Ykfw_.js → OnboardForm-Bjdtix8t.js} +5 -5
  7. package/dist/{OnboardSubmission-BF3Wq8xe.js → OnboardSubmission-CBXLX9vB.js} +5 -5
  8. package/dist/{OnboardSubmission-JGk9_ODn.js → OnboardSubmission-CNjQNirx.js} +2 -2
  9. package/dist/{PayoutAccount-PPkKjWQM.js → PayoutAccount-CnHSjAFn.js} +181 -155
  10. package/dist/{PayoutAccount-D238lqNT.js → PayoutAccount-DtUTEyVW.js} +87 -79
  11. package/dist/{PayoutAccountSetting-BGqJyEP-.js → PayoutAccountSetting-CUJtxE8n.js} +502 -467
  12. package/dist/{Restaurant-BjF1a029.js → Restaurant-DVSk4KFB.js} +5 -5
  13. package/dist/{RestaurantSetting-DC0f4Ucf.js → RestaurantSetting-CPa7CFaW.js} +3 -3
  14. package/dist/{Settlement-BC3V4klw.js → Settlement-BOS0NVhn.js} +4 -4
  15. package/dist/{Settlement-ZBIhVddV.js → Settlement-CMEBmvhn.js} +4 -4
  16. package/dist/{SettlementTransactions-NtqKVZ4y.js → SettlementTransactions-BKCPfMDs.js} +4 -4
  17. package/dist/{SettlementTransactions---x0z4Fg.js → SettlementTransactions-BwVjsFCT.js} +4 -4
  18. package/dist/{Status.vue_vue_type_script_setup_true_lang-DiLHaz81.js → Status.vue_vue_type_script_setup_true_lang-BiTeDpBk.js} +1 -1
  19. package/dist/{Terminal-Dp4YfQLn.js → Terminal-DJSDtUUp.js} +5 -5
  20. package/dist/{TerminalSetting-22VMhd8q.js → TerminalSetting-CGGpemW8.js} +3 -3
  21. package/dist/Transaction-BASuO5u4.js +619 -0
  22. package/dist/{Transaction-JFDOKyml.js → Transaction-DA3HSvt8.js} +9 -9
  23. package/dist/{TransactionOld-CmRVIeU2.js → TransactionOld-CmjVUkD9.js} +6 -6
  24. package/dist/api/transaction/index.d.ts +8 -0
  25. package/dist/{app-DKtypFfA.js → app-Csm7YQgx.js} +32 -26
  26. package/dist/app.js +1 -1
  27. package/dist/{assets-lFgK3KQx.js → assets-BqyjGcBE.js} +1 -1
  28. package/dist/{grafana-BRpcfaCo.js → grafana-DecAHDp-.js} +1 -1
  29. package/dist/{index-CHX0p0Dm.js → index-B5j5U-Da.js} +1 -1
  30. package/dist/{index-s7pe9sTx.js → index-BKXccERQ.js} +41 -31
  31. package/dist/{index-DTD9SWXp.js → index-CylkiU8i.js} +1 -1
  32. package/dist/{index-QTsd1BO1.js → index-DQany4ND.js} +1413 -1447
  33. package/dist/{index-9ABD__aA.js → index-DklLFCf5.js} +1 -1
  34. package/dist/{index-hKHpA30o.js → index-DtIipWj2.js} +1 -1
  35. package/dist/{index-CFxxPCNY.js → index-HvRabCwb.js} +1 -1
  36. package/dist/{index-VWqgxrIV.js → index-lkMlxXDI.js} +1 -1
  37. package/dist/{index-Ur-VjIjX.js → index-pBoJWBgh.js} +2 -2
  38. package/dist/{index.vue_vue_type_script_setup_true_lang-QCvHWbIq.js → index.vue_vue_type_script_setup_true_lang-0YY23afw.js} +1 -1
  39. package/dist/package.json +2 -2
  40. package/dist/{payout-account-CGaqvbMg.js → payout-account-CrbSns2O.js} +3 -3
  41. package/dist/stores/payoutAccount.d.ts +20 -16
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +20 -20
  44. package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +20 -20
  45. package/dist/views/admin/payout-account/cell/DisplayName.vue.d.ts +6 -0
  46. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +20 -16
  47. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +40 -36
  48. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +40 -36
  49. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +20 -16
  50. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +20 -16
  51. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +40 -36
  52. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +12 -136
  53. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +12 -136
  54. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -136
  55. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +12 -136
  56. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -136
  57. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +12 -136
  58. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +12 -136
  59. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +12 -136
  60. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +12 -136
  61. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +12 -136
  62. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +12 -136
  63. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +12 -136
  64. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +12 -136
  65. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +12 -136
  66. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +12 -136
  67. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +12 -136
  68. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +12 -136
  69. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +12 -136
  70. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -136
  71. package/dist/views/admin/transaction/TextInputDialog.vue.d.ts +34 -0
  72. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
  73. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +41 -33
  74. package/dist/views/payout-account/cell/DisplayName.vue.d.ts +6 -0
  75. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +64 -64
  76. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +32 -32
  77. package/package.json +2 -2
  78. package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-I9eO197f.js +0 -47
  79. package/dist/Transaction-BiT6BRmx.js +0 -478
@@ -0,0 +1,619 @@
1
+ import { defineComponent as I, resolveComponent as m, openBlock as g, createBlock as F, normalizeClass as U, withCtx as w, createElementVNode as h, toDisplayString as M, unref as f, createElementBlock as E, createVNode as y, Fragment as L, renderList as z, ref as R, createTextVNode as j, watch as $, isRef as C, h as D } from "vue";
2
+ import { t as b } from "./index-BKXccERQ.js";
3
+ import { h as S } from "./moment-h96o7c8I.js";
4
+ import { g as Q, a as W, t as H, b as x } from "./assets-BqyjGcBE.js";
5
+ import { u as J } from "./index-B5j5U-Da.js";
6
+ import { _ as X } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
7
+ import { _ as Z } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
8
+ import { useDialogChild as ee, useSnackbar as te, useDialog as ae } from "@feedmepos/ui-library";
9
+ import { w as G } from "./Modal-DB8M9o1T.js";
10
+ import { u as v } from "./error-K1CakhA9.js";
11
+ import { _ as ne } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
12
+ import { g as re } from "./grafana-DecAHDp-.js";
13
+ import { _ as oe } from "./index.vue_vue_type_script_setup_true_lang-0YY23afw.js";
14
+ import { e as V } from "./index-DQany4ND.js";
15
+ import { _ as se } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
16
+ import { s as A, z as ie } from "./validator-DzjyJnvv.js";
17
+ import { useCoreStore as ce } from "@feedmepos/mf-common";
18
+ const le = /* @__PURE__ */ I({
19
+ __name: "Status",
20
+ props: {
21
+ row: {},
22
+ data: {}
23
+ },
24
+ setup(s) {
25
+ const r = s;
26
+ function c() {
27
+ return r.data === V.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : r.data === V.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : r.data === V.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
28
+ }
29
+ return (i, d) => {
30
+ const o = m("FmBadge");
31
+ return g(), F(o, {
32
+ inline: "",
33
+ class: U(c())
34
+ }, {
35
+ default: w(() => [
36
+ h("div", null, M(s.data), 1)
37
+ ]),
38
+ _: 1
39
+ }, 8, ["class"]);
40
+ };
41
+ }
42
+ }), ue = ["src"], de = /* @__PURE__ */ I({
43
+ __name: "Gateway",
44
+ props: {
45
+ row: {},
46
+ data: {}
47
+ },
48
+ setup(s) {
49
+ return (r, c) => {
50
+ const i = m("FmTooltip");
51
+ return g(), F(i, {
52
+ variant: "plain",
53
+ placement: "top",
54
+ content: s.row.original.gateway,
55
+ "hide-arrow": !0
56
+ }, {
57
+ default: w(() => [
58
+ h("img", {
59
+ class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
60
+ src: f(Q)(s.row.original.gateway)
61
+ }, null, 8, ue)
62
+ ]),
63
+ _: 1
64
+ }, 8, ["content"]);
65
+ };
66
+ }
67
+ }), me = ["src"], pe = /* @__PURE__ */ I({
68
+ __name: "Method",
69
+ props: {
70
+ row: {},
71
+ data: {}
72
+ },
73
+ setup(s) {
74
+ return (r, c) => {
75
+ const i = m("FmTooltip");
76
+ return g(), F(i, {
77
+ variant: "plain",
78
+ placement: "top",
79
+ content: s.row.original.method.issuer,
80
+ "hide-arrow": !0
81
+ }, {
82
+ default: w(() => [
83
+ h("img", {
84
+ class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
85
+ src: f(W)(s.row.original.method.issuer, s.row.original.method.variant)
86
+ }, null, 8, me)
87
+ ]),
88
+ _: 1
89
+ }, 8, ["content"]);
90
+ };
91
+ }
92
+ }), fe = /* @__PURE__ */ I({
93
+ __name: "Actions",
94
+ props: {
95
+ onAction: { type: Function },
96
+ transaction: {}
97
+ },
98
+ setup(s) {
99
+ const r = [
100
+ s.transaction.flags.query && {
101
+ label: "Query",
102
+ sublabel: "Perform transaction status inquriy",
103
+ icon: "question_answer",
104
+ action: "query"
105
+ },
106
+ s.transaction.flags.refund && {
107
+ label: "Refund",
108
+ sublabel: "Perform transaction refund request",
109
+ icon: "request_page",
110
+ action: "refund"
111
+ },
112
+ s.transaction.flags.notify && {
113
+ label: "Notify",
114
+ sublabel: "Perform webhook notification for transaction",
115
+ icon: "webhook",
116
+ action: "notify"
117
+ },
118
+ {
119
+ label: "Log",
120
+ sublabel: "Inspect transaction historical actions, requests and responses.",
121
+ icon: "history",
122
+ action: "history"
123
+ },
124
+ {
125
+ label: "Set Pay ID",
126
+ sublabel: "Set a pay ID for this transaction",
127
+ icon: "receipt_long",
128
+ action: "setPayId"
129
+ },
130
+ {
131
+ label: "Set Gateway ID",
132
+ sublabel: "Set a gateway transaction ID",
133
+ icon: "link",
134
+ action: "setGatewayId"
135
+ }
136
+ ];
137
+ return (c, i) => {
138
+ const d = m("FmIcon"), o = m("FmMenuItem"), p = m("FmMenu");
139
+ return g(), E("div", {
140
+ onClick: i[0] || (i[0] = (l) => {
141
+ l.stopPropagation();
142
+ })
143
+ }, [
144
+ y(p, null, {
145
+ "menu-button": w(() => [
146
+ y(d, { name: "settings" })
147
+ ]),
148
+ default: w(() => [
149
+ (g(!0), E(L, null, z(r.filter((l) => !!l), (l) => (g(), F(o, {
150
+ selectable: !0,
151
+ key: l.label,
152
+ sublabel: l.sublabel,
153
+ label: l.label,
154
+ icon: l.icon,
155
+ onclick: () => s.onAction(l.action)
156
+ }, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
157
+ ]),
158
+ _: 1
159
+ })
160
+ ]);
161
+ };
162
+ }
163
+ }), ye = { class: "flex justify-end mb-2" }, K = /* @__PURE__ */ I({
164
+ __name: "TextInputDialog",
165
+ props: {
166
+ label: {
167
+ type: String,
168
+ default: "Value"
169
+ },
170
+ placeholder: {
171
+ type: String,
172
+ default: ""
173
+ },
174
+ schema: {
175
+ type: Object,
176
+ default: () => A().min(1, "Value is required")
177
+ }
178
+ },
179
+ setup(s) {
180
+ const r = s, { emitData: c, emitAction: i } = ee(), d = R(""), o = A().trim().pipe(r.schema), p = () => {
181
+ const l = o.safeParse(d.value);
182
+ l.success && (c(l.data), i("primary"));
183
+ };
184
+ return (l, T) => {
185
+ const N = m("FmTextField"), P = m("FmButton"), q = m("FmForm");
186
+ return g(), F(q, {
187
+ class: "flex flex-col gap-16",
188
+ onValidationSuccess: p
189
+ }, {
190
+ default: w(() => [
191
+ y(N, {
192
+ modelValue: d.value,
193
+ "onUpdate:modelValue": T[0] || (T[0] = (k) => d.value = k),
194
+ label: s.label,
195
+ placeholder: s.placeholder,
196
+ rules: f(ie)(f(o)),
197
+ autofocus: ""
198
+ }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
199
+ h("div", ye, [
200
+ y(P, {
201
+ type: "submit",
202
+ variant: "primary",
203
+ label: "Confirm"
204
+ })
205
+ ])
206
+ ]),
207
+ _: 1
208
+ });
209
+ };
210
+ }
211
+ }), ge = { class: "flex items-center gap-1" }, he = /* @__PURE__ */ I({
212
+ __name: "BillSeqNumber",
213
+ props: {
214
+ row: {},
215
+ data: {}
216
+ },
217
+ setup(s) {
218
+ return (r, c) => {
219
+ const i = m("FmIcon");
220
+ return g(), E("span", ge, [
221
+ j(M(s.row.original.seqNumber) + " ", 1),
222
+ y(i, {
223
+ size: "md",
224
+ name: "check",
225
+ color: "#16a34a"
226
+ })
227
+ ]);
228
+ };
229
+ }
230
+ }), _e = { class: "flex justify-between mb-6 items-center" }, be = { class: "flex space-x-4" }, we = { class: "flex space-x-4 self-center" }, Ie = { class: "mb-6" }, Me = /* @__PURE__ */ I({
231
+ __name: "Transaction",
232
+ setup(s) {
233
+ const r = R(), { dateRange: c, searchKey: i } = J({
234
+ searchKey: "",
235
+ dateRange: {
236
+ startDate: S().startOf("day").format("YYYY-MM-DD"),
237
+ endDate: S().endOf("day").format("YYYY-MM-DD")
238
+ }
239
+ }), { sessionUser: d } = ce(), o = te(), p = ae(), l = async (t, e) => {
240
+ let a = parseInt(e);
241
+ Number.isNaN(a) && (a = 1);
242
+ const n = await b.readTransactions({
243
+ start: S(c.value.startDate).startOf("day").toISOString(),
244
+ end: S(c.value.endDate).endOf("day").toISOString(),
245
+ limit: t,
246
+ skip: (a - 1) * t,
247
+ search: i.value
248
+ }), u = n.length == t;
249
+ return {
250
+ data: H(n),
251
+ meta: {
252
+ cursor: u ? (a + 1).toString() : ""
253
+ }
254
+ };
255
+ };
256
+ $(c, async () => {
257
+ var t;
258
+ (t = r.value) == null || t.reset();
259
+ });
260
+ let T;
261
+ $(i, async () => {
262
+ T && clearTimeout(T), T = setTimeout(() => {
263
+ var t;
264
+ (t = r.value) == null || t.reset();
265
+ }, 700);
266
+ });
267
+ async function N(t) {
268
+ var a, n;
269
+ const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
270
+ if (!e) {
271
+ o.open({
272
+ type: "error",
273
+ title: "Something went wrong",
274
+ message: "Fail to find transactions from the displayed transactions."
275
+ });
276
+ return;
277
+ }
278
+ try {
279
+ const u = await b.refetchTransaction({ transactionId: e.id });
280
+ (n = r.value) == null || n.replaceData(t, x(u)), o.open({
281
+ type: "success",
282
+ title: "Transaction queried and updated successfully."
283
+ });
284
+ } catch (u) {
285
+ o.open({
286
+ type: "error",
287
+ title: "Fail to query transaction.",
288
+ message: v(u)
289
+ });
290
+ }
291
+ }
292
+ async function P(t) {
293
+ var a;
294
+ const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
295
+ if (!e) {
296
+ o.open({
297
+ type: "error",
298
+ title: "Something went wrong",
299
+ message: "Fail to find transactions from the displayed transactions."
300
+ });
301
+ return;
302
+ }
303
+ G(
304
+ p,
305
+ "Refund Transaction",
306
+ "Are you sure to refund transaction? This action cannot be revert!",
307
+ async () => {
308
+ var n;
309
+ try {
310
+ const u = await b.refundTransaction({
311
+ transactionId: e.id,
312
+ reason: "portal transaction refund",
313
+ amount: e.fdoAmount
314
+ });
315
+ (n = r.value) == null || n.replaceData(t, x(u)), o.open({
316
+ type: "success",
317
+ title: "Transaction refund request initiated."
318
+ });
319
+ } catch (u) {
320
+ o.open({
321
+ type: "error",
322
+ title: "Fail to request refund transaction.",
323
+ message: v(u)
324
+ });
325
+ }
326
+ }
327
+ );
328
+ }
329
+ async function q(t) {
330
+ var a;
331
+ const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
332
+ if (!e) {
333
+ o.open({
334
+ type: "error",
335
+ title: "Something went wrong",
336
+ message: "Fail to find transactions from the displayed transactions."
337
+ });
338
+ return;
339
+ }
340
+ G(
341
+ p,
342
+ "Notify Transaction",
343
+ "Are you sure to perform notify transaction?",
344
+ async () => {
345
+ try {
346
+ await b.renotifyTransaction(e.id), o.open({
347
+ type: "success",
348
+ title: "Transaction notify successfully."
349
+ });
350
+ } catch (n) {
351
+ o.open({
352
+ type: "error",
353
+ title: "Fail to notify transaction.",
354
+ message: v(n)
355
+ });
356
+ }
357
+ }
358
+ );
359
+ }
360
+ async function k(t) {
361
+ var n;
362
+ const e = (n = r.value) == null ? void 0 : n.pageData().at(t);
363
+ if (!e) {
364
+ o.open({
365
+ type: "error",
366
+ title: "Something went wrong",
367
+ message: "Fail to find transactions from the displayed transactions."
368
+ });
369
+ return;
370
+ }
371
+ const a = re([
372
+ {
373
+ type: "span",
374
+ queryKey: "transaction.id",
375
+ queryValue: e.id
376
+ }
377
+ ], e.transactionAt);
378
+ window.open(a, "_blank");
379
+ }
380
+ async function B(t) {
381
+ var a;
382
+ const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
383
+ if (!e) {
384
+ o.open({
385
+ type: "error",
386
+ title: "Something went wrong",
387
+ message: "Fail to find transactions from the displayed transactions."
388
+ });
389
+ return;
390
+ }
391
+ p.open({
392
+ title: "Set Pay ID",
393
+ closeButton: !0,
394
+ overlay: !0,
395
+ contentComponent: K,
396
+ contentComponentProps: {
397
+ label: "Pay ID",
398
+ placeholder: "Enter Pay ID",
399
+ schema: A().trim().min(1, "Pay ID is required")
400
+ }
401
+ }).onPrimary(async (n) => {
402
+ var u;
403
+ try {
404
+ const _ = await b.bindPayId({ transactionId: e.id, payId: n });
405
+ (u = r.value) == null || u.replaceData(t, x(_)), o.open({
406
+ type: "success",
407
+ title: "Pay ID set successfully."
408
+ }), p.close();
409
+ } catch (_) {
410
+ o.open({
411
+ type: "error",
412
+ title: "Failed to set Pay ID.",
413
+ message: v(_)
414
+ });
415
+ }
416
+ });
417
+ }
418
+ async function O(t) {
419
+ var a;
420
+ const e = (a = r.value) == null ? void 0 : a.pageData().at(t);
421
+ if (!e) {
422
+ o.open({
423
+ type: "error",
424
+ title: "Something went wrong",
425
+ message: "Fail to find transactions from the displayed transactions."
426
+ });
427
+ return;
428
+ }
429
+ p.open({
430
+ title: "Set Gateway ID",
431
+ closeButton: !0,
432
+ overlay: !0,
433
+ contentComponent: K,
434
+ contentComponentProps: {
435
+ label: "Gateway Transaction ID",
436
+ placeholder: "Enter Gateway Transaction ID",
437
+ schema: A().trim().min(1, "Gateway Transaction ID is required")
438
+ }
439
+ }).onPrimary(async (n) => {
440
+ var u;
441
+ try {
442
+ const _ = await b.setGatewayId({ transactionId: e.id, gatewayTransactionId: n });
443
+ (u = r.value) == null || u.replaceData(t, x(_)), o.open({
444
+ type: "success",
445
+ title: "Gateway ID set successfully."
446
+ }), p.close();
447
+ } catch (_) {
448
+ o.open({
449
+ type: "error",
450
+ title: "Failed to set Gateway ID.",
451
+ message: v(_)
452
+ });
453
+ }
454
+ });
455
+ }
456
+ const Y = [
457
+ {
458
+ header: () => "Transaction ID",
459
+ accessorKey: "id",
460
+ cell: ({ cell: t }) => {
461
+ var a, n;
462
+ let e = "";
463
+ return ((a = d.value) != null && a.role.isStaff || (n = d.value) != null && n.role.isAdmin) && t.row.original.transactionId && (e = `
464
+ ID: ${t.row.original.transactionId}`), D(se, { data: t.getValue(), extra: e });
465
+ }
466
+ },
467
+ {
468
+ header: () => "Pay ID",
469
+ accessorKey: "payId"
470
+ },
471
+ {
472
+ header: () => "Bill",
473
+ accessorKey: "seqNumber",
474
+ cell: ({ cell: t, row: e }) => e.original.seqNumberBinded ? D(he, { row: e, data: t.getValue() }) : e.original.seqNumber
475
+ },
476
+ {
477
+ header: () => "Gateway",
478
+ accessorKey: "gateway",
479
+ meta: {
480
+ textAlign: "center"
481
+ },
482
+ cell: ({ cell: t, row: e }) => e.original.method ? D(de, { row: e, data: t.getValue() }) : ""
483
+ },
484
+ {
485
+ header: () => "Method",
486
+ accessorKey: "method",
487
+ meta: {
488
+ textAlign: "center"
489
+ },
490
+ cell: ({ cell: t, row: e }) => e.original.method ? D(pe, { row: e, data: t.getValue() }) : ""
491
+ },
492
+ {
493
+ header: () => "Gateway ID",
494
+ accessorKey: "gatewayTransactionId",
495
+ cell: ({ cell: t, row: e }) => e.original.status === "REFUNDED" ? e.original.gatewayRefundId : e.original.gatewayTransactionId
496
+ },
497
+ {
498
+ header: () => "Type",
499
+ accessorKey: "payFor",
500
+ meta: {
501
+ textAlign: "center"
502
+ }
503
+ },
504
+ {
505
+ header: () => "Status",
506
+ accessorKey: "status",
507
+ cell: ({ cell: t, row: e }) => D(le, { row: e, data: t.getValue() })
508
+ },
509
+ {
510
+ header: () => "Source",
511
+ accessorKey: "source",
512
+ cell: ({ cell: t, row: e }) => `(${e.original.sourceType}) ${e.original.source}`
513
+ },
514
+ {
515
+ header: () => "Transaction At",
516
+ accessorKey: "transactionAt",
517
+ meta: {
518
+ width: "180px"
519
+ }
520
+ },
521
+ {
522
+ header: () => "Sales Amount",
523
+ accessorKey: "amount",
524
+ cell: ({ cell: t, row: e }) => {
525
+ var a, n;
526
+ return ((a = d.value) != null && a.role.isStaff || (n = d.value) != null && n.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
527
+ }
528
+ },
529
+ {
530
+ header: () => "Actions",
531
+ accessorKey: "actions",
532
+ cell: ({ row: t }) => {
533
+ var a;
534
+ const e = (a = r.value) == null ? void 0 : a.pageData().at(t.index);
535
+ if (!e) {
536
+ o.open({
537
+ type: "error",
538
+ title: "Something went wrong",
539
+ message: "Fail to find transactions from the displayed transactions."
540
+ });
541
+ return;
542
+ }
543
+ return D(fe, {
544
+ transaction: e,
545
+ onAction: (n) => {
546
+ switch (n) {
547
+ case "notify":
548
+ return q(t.index);
549
+ case "query":
550
+ return N(t.index);
551
+ case "refund":
552
+ return P(t.index);
553
+ case "history":
554
+ return k(t.index);
555
+ case "setPayId":
556
+ return B(t.index);
557
+ case "setGatewayId":
558
+ return O(t.index);
559
+ }
560
+ }
561
+ });
562
+ }
563
+ }
564
+ ];
565
+ return (t, e) => {
566
+ const a = m("FmSearch");
567
+ return g(), F(X, {
568
+ title: "Transactions",
569
+ loading: !1
570
+ }, {
571
+ default: w(() => [
572
+ h("div", _e, [
573
+ h("div", be, [
574
+ y(a, {
575
+ "model-value": f(i),
576
+ "onUpdate:modelValue": e[0] || (e[0] = (n) => C(i) ? i.value = n : null),
577
+ class: "mr-8",
578
+ label: "Search",
579
+ placeholder: "Search Transactions ..."
580
+ }, null, 8, ["model-value"])
581
+ ]),
582
+ h("div", we, [
583
+ y(Z, {
584
+ button: {
585
+ appendIcon: "file_download",
586
+ variant: "primary",
587
+ label: "Export"
588
+ },
589
+ handler: async () => {
590
+ await f(b).downloadTransactionReport({
591
+ start: f(c).startDate,
592
+ end: f(c).endDate
593
+ });
594
+ }
595
+ }, null, 8, ["handler"])
596
+ ])
597
+ ]),
598
+ h("div", Ie, [
599
+ y(ne, {
600
+ modelValue: f(c),
601
+ "onUpdate:modelValue": e[1] || (e[1] = (n) => C(c) ? c.value = n : null)
602
+ }, null, 8, ["modelValue"])
603
+ ]),
604
+ y(oe, {
605
+ ref_key: "controller",
606
+ ref: r,
607
+ "column-defs": Y,
608
+ "rows-defs": (n) => n,
609
+ paginate: l
610
+ }, null, 8, ["rows-defs"])
611
+ ]),
612
+ _: 1
613
+ });
614
+ };
615
+ }
616
+ });
617
+ export {
618
+ Me as default
619
+ };
@@ -1,22 +1,22 @@
1
1
  import { defineComponent as P, ref as E, watch as U, onMounted as G, resolveComponent as T, unref as t, openBlock as C, createBlock as w, createElementBlock as Y, createVNode as y, withCtx as k, createElementVNode as A, Fragment as j, renderList as J, createTextVNode as Q, toDisplayString as H, isRef as F, h as x } from "vue";
2
- import { t as D } from "./index-s7pe9sTx.js";
2
+ import { t as D } from "./index-BKXccERQ.js";
3
3
  import { h as O } from "./moment-h96o7c8I.js";
4
4
  import { useI18n as L, useCoreStore as z } from "@feedmepos/mf-common";
5
5
  import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
- import { t as X, b as Z } from "./assets-lFgK3KQx.js";
7
- import { u as ee } from "./index-CHX0p0Dm.js";
6
+ import { t as X, b as Z } from "./assets-BqyjGcBE.js";
7
+ import { u as ee } from "./index-B5j5U-Da.js";
8
8
  import { _ as ae } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
9
9
  import { _ as te } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
10
10
  import { _ as ne } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
11
- import { p as se } from "./index-hKHpA30o.js";
12
- import { t as re } from "./index-VWqgxrIV.js";
13
- import { u as oe, p as I } from "./index-QTsd1BO1.js";
11
+ import { p as se } from "./index-DtIipWj2.js";
12
+ import { t as re } from "./index-lkMlxXDI.js";
13
+ import { u as oe, p as I } from "./index-DQany4ND.js";
14
14
  import { useSnackbar as le, useDialog as ie } from "@feedmepos/ui-library";
15
- import { _ as ce, a as ue, b as me, c as de } from "./Actions.vue_vue_type_script_setup_true_lang-BVJmo7yZ.js";
16
- import { g as pe } from "./grafana-BRpcfaCo.js";
15
+ import { _ as ce, a as ue, b as me, c as de } from "./Actions.vue_vue_type_script_setup_true_lang-DbsSsOek.js";
16
+ import { g as pe } from "./grafana-DecAHDp-.js";
17
17
  import { w as B } from "./Modal-DB8M9o1T.js";
18
18
  import { u as q } from "./error-K1CakhA9.js";
19
- import { _ as ye } from "./index.vue_vue_type_script_setup_true_lang-QCvHWbIq.js";
19
+ import { _ as ye } from "./index.vue_vue_type_script_setup_true_lang-0YY23afw.js";
20
20
  const fe = {
21
21
  key: 1,
22
22
  class: "inline-flex"
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as S, ref as K, watch as x, resolveComponent as F, openBlock as Y, createBlock as C, h as A, onMounted as M, unref as i, withCtx as O, createElementVNode as w, createVNode as _, isRef as R } from "vue";
2
- import { t as v } from "./index-s7pe9sTx.js";
3
- import { u as U } from "./index-QTsd1BO1.js";
2
+ import { t as v } from "./index-BKXccERQ.js";
3
+ import { u as U } from "./index-DQany4ND.js";
4
4
  import { useSnackbar as L, useDialog as P } from "@feedmepos/ui-library";
5
- import { b as $, t as B } from "./assets-lFgK3KQx.js";
6
- import { _ as J, a as j, b as G, c as Q } from "./Actions.vue_vue_type_script_setup_true_lang-BVJmo7yZ.js";
7
- import { g as z } from "./grafana-BRpcfaCo.js";
5
+ import { b as $, t as B } from "./assets-BqyjGcBE.js";
6
+ import { _ as J, a as j, b as G, c as Q } from "./Actions.vue_vue_type_script_setup_true_lang-DbsSsOek.js";
7
+ import { g as z } from "./grafana-DecAHDp-.js";
8
8
  import { w as k } from "./Modal-DB8M9o1T.js";
9
9
  import { u as V } from "./error-K1CakhA9.js";
10
10
  import { useCoreStore as N, useI18n as E } from "@feedmepos/mf-common";
11
11
  import { h as I } from "./moment-h96o7c8I.js";
12
12
  import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
13
- import { u as W } from "./index-CHX0p0Dm.js";
13
+ import { u as W } from "./index-B5j5U-Da.js";
14
14
  import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
15
15
  import { _ as Z } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js";
16
16
  import { _ as aa } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
@@ -16,6 +16,14 @@ export declare const transactionApi: {
16
16
  }): Promise<FdoPaymentTransactionV2Output>;
17
17
  refundTransaction(req: PaymentRefundByTransactionIdDto): Promise<FdoPaymentTransactionV2Output>;
18
18
  renotifyTransaction(transactionId: string): Promise<FdoPaymentTransactionV2Output>;
19
+ bindPayId(req: {
20
+ transactionId: string;
21
+ payId: string;
22
+ }): Promise<FdoPaymentTransactionV2Output>;
23
+ setGatewayId(req: {
24
+ transactionId: string;
25
+ gatewayTransactionId: string;
26
+ }): Promise<FdoPaymentTransactionV2Output>;
19
27
  readRestaurantTransactions(dateRange: {
20
28
  start: string;
21
29
  end: string;