@feedmepos/mf-payment 1.0.5 → 1.0.7-beta.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.
Files changed (71) hide show
  1. package/dist/{PayoutAccount-BwBgS41r.js → PayoutAccount-BWu1OEyp.js} +5 -5
  2. package/dist/{PayoutAccount-B6kGeSLY.js → PayoutAccount-BxdMH0pl.js} +3 -3
  3. package/dist/PayoutAccountSelector.vue_vue_type_script_setup_true_lang-BiUxmjU6.js +110 -0
  4. package/dist/{PayoutAccountSetting-C1yeSNv8.js → PayoutAccountSetting-Zah_ik81.js} +4 -4
  5. package/dist/Restaurant-DJ01O5GW.js +305 -0
  6. package/dist/{RestaurantSetting-CWZAKz1A.js → RestaurantSetting-BD_aUt1i.js} +4 -4
  7. package/dist/{Settlement-BKwie9R8.js → Settlement-CTLIBeZ3.js} +3 -3
  8. package/dist/{Settlement-ByPXBNx1.js → Settlement-GGdPYvXy.js} +3 -3
  9. package/dist/{SettlementTransactions-BGGqKJgP.js → SettlementTransactions-C5j-0Qbw.js} +4 -4
  10. package/dist/{SettlementTransactions-BPEh0mSi.js → SettlementTransactions-D35tIT61.js} +4 -4
  11. package/dist/Terminal-Cwj4vJ6A.js +404 -0
  12. package/dist/{TerminalSetting-qklmRz3H.js → TerminalSetting-CACWRHic.js} +3 -3
  13. package/dist/TerminalTransaction-B15ICpAD.js +819 -0
  14. package/dist/{TerminalTransaction-YXcGJ2ne.js → TerminalTransaction-BTHSxX6X.js} +184 -154
  15. package/dist/Transaction-BZqqi5qu.js +145 -0
  16. package/dist/{Transaction-IDcY01Oi.js → Transaction-tcV33ufA.js} +81 -48
  17. package/dist/TransactionOld-CgJdUs7l.js +99 -0
  18. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-qZA8uWSK.js +151 -0
  19. package/dist/api/terminal-transaction/index.d.ts +2 -1
  20. package/dist/api/transaction/index.d.ts +8 -1
  21. package/dist/{app-CjbTCCDJ.js → app-DdZ90tIN.js} +504 -491
  22. package/dist/app.js +1 -1
  23. package/dist/{assets-DjRoCcqv.js → assets-D-ueIWdy.js} +1 -1
  24. package/dist/components/PayoutAccountSelector.vue.d.ts +23 -0
  25. package/dist/grafana-BRDqWauv.js +49 -0
  26. package/dist/helpers/grafana.d.ts +7 -0
  27. package/dist/{index-DFePh4ct.js → index-BhsQ9z_N.js} +1 -1
  28. package/dist/{index-BWFqxSU3.js → index-Bm9-P-jw.js} +1 -1
  29. package/dist/{index-BEFlDEyV.js → index-CJe9qD5G.js} +1 -1
  30. package/dist/{index-CWGSYCJG.js → index-CUCDe-b5.js} +1 -1
  31. package/dist/{index-Bp_58SiC.js → index-DNxicJBc.js} +1 -1
  32. package/dist/{index-Dj_LwPBy.js → index-DQsvadHF.js} +8489 -8321
  33. package/dist/{index-BerQZMQW.js → index-NnxZlW-g.js} +1 -1
  34. package/dist/{index-CKyh0nlu.js → index-ocpyheIn.js} +13 -9
  35. package/dist/{index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js → index.vue_vue_type_script_setup_true_lang-CoiUD4O5.js} +1 -1
  36. package/dist/model/transaction.d.ts +2 -0
  37. package/dist/package.json +3 -3
  38. package/dist/{payout-account-ByuqS-Ea.js → payout-account-DwUA_Nmx.js} +2 -2
  39. package/dist/router/index.d.ts +1 -0
  40. package/dist/stores/payoutAccount.d.ts +4 -4
  41. package/dist/transaction-D4S3PvuQ.js +118 -0
  42. package/dist/tsconfig.app.tsbuildinfo +1 -1
  43. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  44. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
  45. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  46. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  47. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
  48. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +8 -8
  49. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
  50. package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +5 -0
  51. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
  52. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
  53. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
  54. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
  55. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  56. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  57. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +8 -8
  58. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
  59. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  60. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
  61. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -1
  62. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
  63. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  64. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  65. package/dist/views/transaction/TransactionOld.vue.d.ts +2 -0
  66. package/package.json +3 -3
  67. package/dist/Restaurant-B02jty0J.js +0 -262
  68. package/dist/Terminal-DX8v8WpM.js +0 -386
  69. package/dist/TerminalTransaction-64Bn6vh0.js +0 -261
  70. package/dist/Transaction-DMw2p-Wq.js +0 -238
  71. package/dist/transaction-Cyw84Cks.js +0 -101
@@ -1,88 +1,98 @@
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";
1
+ import { defineComponent as w, openBlock as A, createElementBlock as x, unref as c, createCommentVNode as V, createElementVNode as b, resolveComponent as g, createBlock as v, normalizeClass as q, withCtx as h, toDisplayString as E, createVNode as u, Fragment as L, renderList as $, ref as K, watch as D, isRef as F, h as T } from "vue";
2
+ import { c as y } from "./index-DQsvadHF.js";
3
+ import { h as N } from "./moment-h96o7c8I.js";
4
+ import { u as P } from "./index-NnxZlW-g.js";
5
+ import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-CoiUD4O5.js";
6
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-CKyh0nlu.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({
7
+ import { useSnackbar as U, useDialog as W } from "@feedmepos/ui-library";
8
+ import { g as j } from "./assets-D-ueIWdy.js";
9
+ import { E as Q, t as R } from "./index-ocpyheIn.js";
10
+ import { d as z } from "./dinero-CIVmXLL-.js";
11
+ import { _ as H } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
+ import { _ as J } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
13
+ import { useRouter as X } from "vue-router";
14
+ import { w as Z } from "./Modal-DB8M9o1T.js";
15
+ import { u as S } from "./error-K1CakhA9.js";
16
+ import { _ as ee } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
17
+ import { _ as te } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
18
+ import { g as ae } from "./grafana-BRDqWauv.js";
19
+ const ne = { class: "flex" }, re = ["src"], oe = ["src"], se = /* @__PURE__ */ w({
19
20
  __name: "Gateway",
20
21
  props: {
21
22
  row: {},
22
23
  data: {}
23
24
  },
24
- setup(p) {
25
- return (a, m) => (y(), N("div", te, [
26
- a.row.original.ecrGateway ? (y(), N("img", {
25
+ setup(d) {
26
+ return (a, m) => (A(), x("div", ne, [
27
+ a.row.original.ecrGateway ? (A(), x("img", {
27
28
  key: 0,
28
29
  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),
30
+ src: c(Q)
31
+ }, null, 8, re)) : V("", !0),
31
32
  b("img", {
32
33
  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)
34
+ src: c(j)(a.row.original.gateway)
35
+ }, null, 8, oe)
35
36
  ]));
36
37
  }
37
- }), oe = /* @__PURE__ */ w({
38
+ }), le = /* @__PURE__ */ w({
38
39
  __name: "Status",
39
40
  props: {
40
41
  row: {},
41
42
  data: {}
42
43
  },
43
- setup(p) {
44
- const a = p;
44
+ setup(d) {
45
+ const a = d;
45
46
  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
+ return a.data === y.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === y.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : a.data === y.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
47
48
  }
48
- return (n, l) => {
49
+ return (r, l) => {
49
50
  const s = g("FmBadge");
50
- return y(), v(s, {
51
+ return A(), v(s, {
51
52
  inline: "",
52
- class: V(m())
53
+ class: q(m())
53
54
  }, {
54
55
  default: h(() => [
55
- b("div", null, S(n.data.toUpperCase()), 1)
56
+ b("div", null, E(r.data.toUpperCase()), 1)
56
57
  ]),
57
58
  _: 1
58
59
  }, 8, ["class"]);
59
60
  };
60
61
  }
61
- }), se = /* @__PURE__ */ w({
62
+ }), ie = /* @__PURE__ */ w({
62
63
  __name: "RouteCell",
63
64
  props: {
64
65
  data: {},
65
66
  route: {}
66
67
  },
67
- setup(p) {
68
- const a = p, m = J();
69
- function n() {
68
+ setup(d) {
69
+ const a = d, m = X();
70
+ function r() {
70
71
  m.push(a.route);
71
72
  }
72
- return (l, s) => (y(), N("div", {
73
+ return (l, s) => (A(), x("div", {
73
74
  class: "fm-typo-en-link-md-600",
74
- onClick: s[0] || (s[0] = (f) => {
75
- f.stopPropagation(), n();
75
+ onClick: s[0] || (s[0] = (p) => {
76
+ p.stopPropagation(), r();
76
77
  })
77
- }, S(l.data), 1));
78
+ }, E(l.data), 1));
78
79
  }
79
- }), le = /* @__PURE__ */ w({
80
+ }), ce = /* @__PURE__ */ w({
80
81
  __name: "Actions",
81
82
  props: {
82
- onAction: { type: Function }
83
+ onAction: { type: Function },
84
+ gateway: {}
83
85
  },
84
- setup(p) {
85
- const a = [
86
+ setup(d) {
87
+ const a = d, m = [
88
+ {
89
+ label: "Log",
90
+ sublabel: "Inspect transaction historical actions, requests and responses.",
91
+ icon: "history",
92
+ action: "history"
93
+ }
94
+ ];
95
+ return a.gateway === y.F_TERMINAL_PAYMENT_GATEWAY_PROVIDER.Enum.ScanPay && m.push(
86
96
  {
87
97
  label: "Query",
88
98
  sublabel: "Perform transaction status inquriy",
@@ -95,26 +105,25 @@ const te = { class: "flex" }, ae = ["src"], ne = ["src"], re = /* @__PURE__ */ w
95
105
  icon: "request_page",
96
106
  action: "refund"
97
107
  }
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();
108
+ ), (r, l) => {
109
+ const s = g("FmIcon"), p = g("FmMenuItem"), I = g("FmMenu");
110
+ return A(), x("div", {
111
+ onClick: l[0] || (l[0] = (f) => {
112
+ f.stopPropagation();
104
113
  })
105
114
  }, [
106
- c(f, null, {
115
+ u(I, null, {
107
116
  "menu-button": h(() => [
108
- c(l, { name: "settings" })
117
+ u(s, { name: "settings" })
109
118
  ]),
110
119
  default: h(() => [
111
- (y(), N($, null, q(a, (u) => c(s, {
120
+ (A(), x(L, null, $(m, (f) => u(p, {
112
121
  selectable: !0,
113
- key: u.label,
114
- sublabel: u.sublabel,
115
- label: u.label,
116
- icon: u.icon,
117
- onclick: () => m.onAction(u.action)
122
+ key: f.label,
123
+ sublabel: f.sublabel,
124
+ label: f.label,
125
+ icon: f.icon,
126
+ onclick: () => r.onAction(f.action)
118
127
  }, null, 8, ["sublabel", "label", "icon", "onclick"])), 64))
119
128
  ]),
120
129
  _: 1
@@ -123,36 +132,36 @@ const te = { class: "flex" }, ae = ["src"], ne = ["src"], re = /* @__PURE__ */ w
123
132
  };
124
133
  }
125
134
  });
126
- function ie(p) {
135
+ function ue(d) {
127
136
  let a;
128
137
  try {
129
- a = parseInt(p.substr(0, 8), 16) * 1e3;
138
+ a = parseInt(d.substr(0, 8), 16) * 1e3;
130
139
  } catch {
131
140
  return null;
132
141
  }
133
142
  return new Date(a);
134
143
  }
135
- const ce = /* @__PURE__ */ w({
144
+ const me = /* @__PURE__ */ w({
136
145
  __name: "Timestamp",
137
146
  props: {
138
147
  createdAt: {},
139
148
  transactionAt: {},
140
149
  refundedAt: {}
141
150
  },
142
- setup(p) {
151
+ setup(d) {
143
152
  return (a, m) => {
144
- const n = g("FmListItem"), l = g("FmList");
145
- return y(), v(l, { class: "w-[180px]" }, {
153
+ const r = g("FmListItem"), l = g("FmList");
154
+ return A(), v(l, { class: "w-[180px]" }, {
146
155
  default: h(() => [
147
- c(n, {
156
+ u(r, {
148
157
  label: "Created At",
149
158
  sublabel: a.createdAt
150
159
  }, null, 8, ["sublabel"]),
151
- c(n, {
160
+ u(r, {
152
161
  label: "Transaction At",
153
162
  sublabel: a.transactionAt
154
163
  }, null, 8, ["sublabel"]),
155
- c(n, {
164
+ u(r, {
156
165
  label: "Refunded At",
157
166
  sublabel: a.refundedAt
158
167
  }, null, 8, ["sublabel"])
@@ -161,34 +170,34 @@ const ce = /* @__PURE__ */ w({
161
170
  });
162
171
  };
163
172
  }
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({
173
+ }), de = { class: "flex justify-between mb-6 items-start" }, pe = { class: "flex space-x-4 items-start" }, fe = { class: "flex space-x-4 self-center" }, _e = { class: "mb-6" }, Ye = /* @__PURE__ */ w({
165
174
  __name: "TerminalTransaction",
166
- setup(p) {
167
- const a = G(), m = U(), n = K(), { dateRange: l, status: s, searchKey: f } = L({
175
+ setup(d) {
176
+ const a = U(), m = W(), r = K(), { dateRange: l, status: s, searchKey: p } = P({
168
177
  searchKey: "",
169
- status: [A.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
178
+ status: [y.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
170
179
  dateRange: {
171
- startDate: I().startOf("day").format("YYYY-MM-DD"),
172
- endDate: I().endOf("day").format("YYYY-MM-DD")
180
+ startDate: N().startOf("day").format("YYYY-MM-DD"),
181
+ endDate: N().endOf("day").format("YYYY-MM-DD")
173
182
  }
174
183
  });
175
- R([l, s], () => {
184
+ D([l, s], () => {
176
185
  var e;
177
- return (e = n.value) == null ? void 0 : e.reset();
186
+ return (e = r.value) == null ? void 0 : e.reset();
178
187
  });
179
- let u;
180
- R(f, async () => {
181
- u && clearTimeout(u), u = setTimeout(
188
+ let I;
189
+ D(p, async () => {
190
+ I && clearTimeout(I), I = setTimeout(
182
191
  () => {
183
192
  var e;
184
- return (e = n.value) == null ? void 0 : e.reset();
193
+ return (e = r.value) == null ? void 0 : e.reset();
185
194
  },
186
195
  700
187
196
  );
188
197
  });
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);
198
+ async function f(e) {
199
+ var o, i, n;
200
+ const t = (i = (o = r.value) == null ? void 0 : o.pageData()) == null ? void 0 : i.at(e);
192
201
  if (!t) {
193
202
  a.open({
194
203
  type: "error",
@@ -206,8 +215,8 @@ const ce = /* @__PURE__ */ w({
206
215
  return;
207
216
  }
208
217
  try {
209
- const _ = await F.queryTransaction(t._id);
210
- (r = n.value) == null || r.replaceData(e, _), a.open({
218
+ const _ = await R.queryTransaction(t._id);
219
+ (n = r.value) == null || n.replaceData(e, _), a.open({
211
220
  type: "success",
212
221
  title: "Transaction queried and updated successfully."
213
222
  });
@@ -215,13 +224,13 @@ const ce = /* @__PURE__ */ w({
215
224
  a.open({
216
225
  type: "error",
217
226
  title: "Fail to query transaction.",
218
- message: D(_)
227
+ message: S(_)
219
228
  });
220
229
  }
221
230
  }
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);
231
+ async function M(e) {
232
+ var o, i;
233
+ const t = (i = (o = r.value) == null ? void 0 : o.pageData()) == null ? void 0 : i.at(e);
225
234
  if (!t) {
226
235
  a.open({
227
236
  type: "error",
@@ -238,19 +247,19 @@ const ce = /* @__PURE__ */ w({
238
247
  });
239
248
  return;
240
249
  }
241
- X(
250
+ Z(
242
251
  m,
243
252
  "Refund Transaction",
244
253
  "Are you sure to refund transaction? This action cannot be revert!",
245
254
  async () => {
246
- var r;
255
+ var n;
247
256
  try {
248
- const _ = await F.refundTransaction({
257
+ const _ = await R.refundTransaction({
249
258
  transactionId: t._id,
250
259
  reason: "portal transaction refund",
251
260
  amount: t.details.amount
252
261
  });
253
- (r = n.value) == null || r.replaceData(e, _), a.open({
262
+ (n = r.value) == null || n.replaceData(e, _), a.open({
254
263
  type: "success",
255
264
  title: "Transaction queried and updated successfully."
256
265
  });
@@ -258,36 +267,57 @@ const ce = /* @__PURE__ */ w({
258
267
  a.open({
259
268
  type: "error",
260
269
  title: "Fail to query transaction.",
261
- message: D(_)
270
+ message: S(_)
262
271
  });
263
272
  }
264
273
  }
265
274
  );
266
275
  }
276
+ async function Y(e) {
277
+ var i, n;
278
+ const t = (n = (i = r.value) == null ? void 0 : i.pageData()) == null ? void 0 : n.at(e);
279
+ if (!t) {
280
+ a.open({
281
+ type: "error",
282
+ title: "Something went wrong",
283
+ message: "Fail to find transactions from the displayed transactions."
284
+ });
285
+ return;
286
+ }
287
+ const o = ae([
288
+ {
289
+ type: "span",
290
+ queryKey: "transaction.id",
291
+ queryValue: t._id
292
+ }
293
+ ]);
294
+ window.open(o, "_blank");
295
+ }
267
296
  const C = [
268
297
  {
269
298
  label: "Success",
270
- value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.success
299
+ value: y.F_TERMINAL_TRANSACTION_ACTION.Enum.success
271
300
  },
272
301
  {
273
302
  label: "Refunded",
274
- value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
303
+ value: y.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
275
304
  },
276
305
  {
277
306
  label: "Process",
278
- value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.process
307
+ value: y.F_TERMINAL_TRANSACTION_ACTION.Enum.process
279
308
  },
280
309
  {
281
310
  label: "Failed",
282
- value: A.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
311
+ value: y.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
283
312
  }
284
313
  ], k = function(e) {
285
314
  const t = e;
286
315
  let o = "-";
287
- t.details && t.details.amount && (o = W(t.details.amount).toFormat("$0.00"));
288
- const d = ie(e._id);
316
+ t.details && t.details.amount && (o = z(t.details.amount).toFormat("$0.00"));
317
+ const i = ue(e._id);
289
318
  return {
290
319
  id: e._id,
320
+ transactionId: e.transactionId,
291
321
  orderId: e.orderId,
292
322
  refId: e.refId,
293
323
  owner: e.owner,
@@ -296,18 +326,18 @@ const ce = /* @__PURE__ */ w({
296
326
  gateway: e.gateway,
297
327
  ecrGateway: e.ecrGateway,
298
328
  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"
329
+ createdAt: i ? N(i).format("YYYY-MM-DD hh:mm:ss") : "N/A",
330
+ transactionAt: e.transactionAt ? N(e.transactionAt).format("YYYY-MM-DD hh:mm:ss") : "N/A",
331
+ refundedAt: e.refundedAt ? N(e.refundedAt).format("YYYY-MM-DD hh:mm:ss") : "N/A"
302
332
  };
303
- }, Y = [
333
+ }, O = [
304
334
  {
305
- accessorKey: "id",
335
+ accessorKey: "transactionId",
306
336
  header: () => "Transaction ID",
307
337
  meta: {
308
338
  textAlign: "left"
309
339
  },
310
- cell: ({ cell: e }) => T(H, { data: e.getValue() })
340
+ cell: ({ cell: e }) => T(J, { data: e.getValue() })
311
341
  },
312
342
  {
313
343
  accessorKey: "orderId",
@@ -330,7 +360,7 @@ const ce = /* @__PURE__ */ w({
330
360
  textAlign: "center",
331
361
  maxWidth: "128px"
332
362
  },
333
- cell: ({ cell: e, row: t }) => T(re, { row: t, data: e.getValue() })
363
+ cell: ({ cell: e, row: t }) => T(se, { row: t, data: e.getValue() })
334
364
  },
335
365
  {
336
366
  accessorKey: "action",
@@ -339,7 +369,7 @@ const ce = /* @__PURE__ */ w({
339
369
  textAlign: "right",
340
370
  maxWidth: "132px"
341
371
  },
342
- cell: ({ cell: e, row: t }) => T(oe, { row: t, data: e.getValue() })
372
+ cell: ({ cell: e, row: t }) => T(le, { row: t, data: e.getValue() })
343
373
  },
344
374
  {
345
375
  accessorKey: "amount",
@@ -356,7 +386,7 @@ const ce = /* @__PURE__ */ w({
356
386
  },
357
387
  cell: ({ cell: e, row: t }) => {
358
388
  const o = e.getValue();
359
- return T(se, {
389
+ return T(ie, {
360
390
  data: o,
361
391
  route: {
362
392
  name: "mf-payment-admin.terminal-setting",
@@ -378,7 +408,7 @@ const ce = /* @__PURE__ */ w({
378
408
  meta: {
379
409
  textAlign: "left"
380
410
  },
381
- cell: ({ row: e }) => T(ce, {
411
+ cell: ({ row: e }) => T(me, {
382
412
  createdAt: e.original.createdAt,
383
413
  transactionAt: e.original.transactionAt,
384
414
  refundedAt: e.original.refundedAt
@@ -387,41 +417,41 @@ const ce = /* @__PURE__ */ w({
387
417
  {
388
418
  header: () => "Actions",
389
419
  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
- }
420
+ cell: ({ row: e }) => T(ce, {
421
+ gateway: e.original.gateway,
422
+ onAction: (t) => {
423
+ const o = e.index;
424
+ switch (t) {
425
+ case "history":
426
+ return Y(o);
427
+ case "query":
428
+ return f(o);
429
+ case "refund":
430
+ return M(o);
431
+ }
432
+ }
433
+ })
404
434
  }
405
435
  ];
406
436
  return (e, t) => {
407
- const o = g("FmSearch"), d = g("FmSelect");
408
- return y(), v(B, {
437
+ const o = g("FmSearch"), i = g("FmSelect");
438
+ return A(), v(B, {
409
439
  title: "Terminal Transactions",
410
440
  loading: !1
411
441
  }, {
412
442
  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),
443
+ b("div", de, [
444
+ b("div", pe, [
445
+ u(o, {
446
+ "model-value": c(p),
447
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => F(p) ? p.value = n : null),
418
448
  class: "mr-8",
419
449
  label: "Search",
420
450
  placeholder: "Search Transactions ..."
421
451
  }, 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),
452
+ u(i, {
453
+ modelValue: c(s),
454
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => F(s) ? s.value = n : null),
425
455
  class: "mr-6 w-[300px]",
426
456
  label: "Status",
427
457
  "label-mark": "required",
@@ -429,49 +459,49 @@ const ce = /* @__PURE__ */ w({
429
459
  items: C
430
460
  }, {
431
461
  "prepend-menu": h(() => [
432
- c(Z, {
433
- modelValue: i(s),
434
- "onUpdate:modelValue": t[1] || (t[1] = (r) => x(s) ? s.value = r : null),
462
+ u(ee, {
463
+ modelValue: c(s),
464
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => F(s) ? s.value = n : null),
435
465
  items: C
436
466
  }, null, 8, ["modelValue"])
437
467
  ]),
438
468
  _: 1
439
469
  }, 8, ["modelValue"])
440
470
  ]),
441
- b("div", de, [
442
- c(z, {
471
+ b("div", fe, [
472
+ u(H, {
443
473
  button: {
444
474
  appendIcon: "file_download",
445
475
  variant: "primary",
446
476
  label: "Export"
447
477
  },
448
478
  handler: async () => {
449
- var r;
450
- return i(F).downloadTransactions(await ((r = n.value) == null ? void 0 : r.allData()) ?? []);
479
+ var n;
480
+ return c(R).downloadTransactions(await ((n = r.value) == null ? void 0 : n.allData()) ?? []);
451
481
  }
452
482
  }, null, 8, ["handler"])
453
483
  ])
454
484
  ]),
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)
485
+ b("div", _e, [
486
+ u(te, {
487
+ modelValue: c(l),
488
+ "onUpdate:modelValue": t[3] || (t[3] = (n) => F(l) ? l.value = n : null)
459
489
  }, null, 8, ["modelValue"])
460
490
  ]),
461
- c(P, {
491
+ u(G, {
462
492
  ref_key: "controller",
463
- ref: n,
464
- "column-defs": Y,
493
+ ref: r,
494
+ "column-defs": O,
465
495
  "rows-defs": k,
466
496
  onRowClick: t[4] || (t[4] = () => {
467
497
  }),
468
- paginate: (r, _) => i(F).readTransactions({
469
- status: i(s),
470
- searchKey: i(f),
471
- limit: r,
498
+ paginate: (n, _) => c(R).readTransactions({
499
+ status: c(s),
500
+ searchKey: c(p),
501
+ limit: n,
472
502
  cursor: _,
473
- start: i(l).startDate,
474
- end: i(l).endDate
503
+ start: c(l).startDate,
504
+ end: c(l).endDate
475
505
  })
476
506
  }, null, 8, ["paginate"])
477
507
  ]),
@@ -481,5 +511,5 @@ const ce = /* @__PURE__ */ w({
481
511
  }
482
512
  });
483
513
  export {
484
- Se as default
514
+ Ye as default
485
515
  };