@feedmepos/mf-payment 1.0.4 → 1.0.5-beta.3

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-BnYhJ0R2.js → PayoutAccount-6etZAyPK.js} +5 -5
  2. package/dist/{PayoutAccount-Cjkghc6L.js → PayoutAccount-DGscBAsV.js} +3 -3
  3. package/dist/PayoutAccountSelector.vue_vue_type_script_setup_true_lang-B6isPQJE.js +110 -0
  4. package/dist/{PayoutAccountSetting-C1yeSNv8.js → PayoutAccountSetting-DqumwNM9.js} +4 -4
  5. package/dist/Restaurant-DaL6bM-z.js +305 -0
  6. package/dist/{RestaurantSetting-CWZAKz1A.js → RestaurantSetting-BzaedFJS.js} +4 -4
  7. package/dist/{Settlement-BKwie9R8.js → Settlement-BpYpn4Xh.js} +3 -3
  8. package/dist/{Settlement-ByPXBNx1.js → Settlement-iDVx6O6H.js} +3 -3
  9. package/dist/{SettlementTransactions-rXQceUoG.js → SettlementTransactions-B7mIgCvy.js} +4 -4
  10. package/dist/{SettlementTransactions-DVRoAUYv.js → SettlementTransactions-DyUVhxLt.js} +4 -4
  11. package/dist/Terminal-CAMFrRck.js +404 -0
  12. package/dist/{TerminalSetting-qklmRz3H.js → TerminalSetting-BtK3bmTs.js} +3 -3
  13. package/dist/{TerminalTransaction-YXcGJ2ne.js → TerminalTransaction-1uFcVlOV.js} +184 -154
  14. package/dist/TerminalTransaction-BL8zrvkb.js +272 -0
  15. package/dist/{Transaction-CqTKm8KP.js → Transaction-DhYYEGyA.js} +81 -48
  16. package/dist/Transaction-p_u3tw0B.js +145 -0
  17. package/dist/TransactionOld-CEqAIIXl.js +99 -0
  18. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-n8-Ejjku.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-JZYaBz1E.js → app-BdVFEBRO.js} +507 -494
  22. package/dist/app.js +1 -1
  23. package/dist/{assets-DjRoCcqv.js → assets-CtblXAzH.js} +1 -1
  24. package/dist/components/PayoutAccountSelector.vue.d.ts +23 -0
  25. package/dist/grafana-CqkYm_ru.js +46 -0
  26. package/dist/helpers/grafana.d.ts +7 -0
  27. package/dist/{index-BerQZMQW.js → index-B9uFzXYZ.js} +1 -1
  28. package/dist/{index-CWGSYCJG.js → index-BO1hyRHY.js} +1 -1
  29. package/dist/{index-BEFlDEyV.js → index-CUbwTavd.js} +1 -1
  30. package/dist/{index-Dj_LwPBy.js → index-CXCXrHB0.js} +8489 -8321
  31. package/dist/{index-CKyh0nlu.js → index-CzRHCb77.js} +10 -10
  32. package/dist/{index-Bp_58SiC.js → index-D4u8kqII.js} +1 -1
  33. package/dist/{index-BWFqxSU3.js → index-S1nUjtnb.js} +1 -1
  34. package/dist/{index-DFePh4ct.js → index-y0gFHlyK.js} +1 -1
  35. package/dist/{index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js → index.vue_vue_type_script_setup_true_lang-B0gi93RG.js} +1 -1
  36. package/dist/model/transaction.d.ts +2 -0
  37. package/dist/package.json +3 -3
  38. package/dist/{payout-account-DWXNiWdx.js → payout-account-BBk3t8ex.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-WIA_gVK_.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-BOc0NW9a.js +0 -238
  71. package/dist/transaction-Bxl86wzh.js +0 -100
@@ -0,0 +1,272 @@
1
+ import { defineComponent as y, openBlock as _, createElementBlock as b, Fragment as O, unref as r, createCommentVNode as V, createElementVNode as i, resolveComponent as N, createBlock as C, normalizeClass as D, withCtx as h, toDisplayString as F, ref as M, watch as T, createVNode as c, isRef as u, h as I } from "vue";
2
+ import { c as l } from "./index-CXCXrHB0.js";
3
+ import { h as g } from "./moment-h96o7c8I.js";
4
+ import { u as k } from "./index-B9uFzXYZ.js";
5
+ import { _ as K } from "./index.vue_vue_type_script_setup_true_lang-B0gi93RG.js";
6
+ import "@feedmepos/ui-library";
7
+ import { g as Y } from "./assets-CtblXAzH.js";
8
+ import { E as $, t as v } from "./index-CzRHCb77.js";
9
+ import { d as L } from "./dinero-CIVmXLL-.js";
10
+ import { _ as B } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
11
+ import { _ as G } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
12
+ import { _ as U } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
13
+ import { _ as q } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
14
+ import { _ as P } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
15
+ import { _ as j } from "./PayoutAccountSelector.vue_vue_type_script_setup_true_lang-B6isPQJE.js";
16
+ const W = ["src"], z = ["src"], Q = /* @__PURE__ */ y({
17
+ __name: "Gateway",
18
+ props: {
19
+ row: {},
20
+ data: {}
21
+ },
22
+ setup(f) {
23
+ return (o, n) => (_(), b(O, null, [
24
+ o.row.original.ecrGateway ? (_(), b("img", {
25
+ key: 0,
26
+ class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
27
+ src: r($)
28
+ }, null, 8, W)) : V("", !0),
29
+ i("img", {
30
+ class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
31
+ src: r(Y)(o.row.original.gateway)
32
+ }, null, 8, z)
33
+ ], 64));
34
+ }
35
+ }), H = /* @__PURE__ */ y({
36
+ __name: "Status",
37
+ props: {
38
+ row: {},
39
+ data: {}
40
+ },
41
+ setup(f) {
42
+ const o = f;
43
+ function n() {
44
+ return o.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : o.data === l.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
45
+ }
46
+ return (s, d) => {
47
+ const m = N("FmBadge");
48
+ return _(), C(m, {
49
+ inline: "",
50
+ class: D(n())
51
+ }, {
52
+ default: h(() => [
53
+ i("div", null, F(s.data.toUpperCase()), 1)
54
+ ]),
55
+ _: 1
56
+ }, 8, ["class"]);
57
+ };
58
+ }
59
+ }), J = { class: "flex justify-between mb-6 items-start" }, X = { class: "flex space-x-8 items-start" }, Z = { class: "flex space-x-4 self-center" }, ee = { class: "flex space-x-12 mb-6" }, Ae = /* @__PURE__ */ y({
60
+ __name: "TerminalTransaction",
61
+ setup(f) {
62
+ const o = M(), { dateRange: n, status: s, searchKey: d, accountId: m } = k({
63
+ accountId: "",
64
+ searchKey: "",
65
+ status: [l.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
66
+ dateRange: {
67
+ startDate: g().startOf("day").format("YYYY-MM-DD"),
68
+ endDate: g().endOf("day").format("YYYY-MM-DD")
69
+ }
70
+ });
71
+ T([n, s], () => {
72
+ var e;
73
+ return (e = o.value) == null ? void 0 : e.reset();
74
+ }), T(m, () => {
75
+ var e;
76
+ return (e = o.value) == null ? void 0 : e.reset();
77
+ });
78
+ let A;
79
+ T(d, async () => {
80
+ A && clearTimeout(A), A = setTimeout(
81
+ () => {
82
+ var e;
83
+ return (e = o.value) == null ? void 0 : e.reset();
84
+ },
85
+ 700
86
+ );
87
+ });
88
+ const x = [
89
+ {
90
+ label: "Success",
91
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.success
92
+ },
93
+ {
94
+ label: "Refunded",
95
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
96
+ },
97
+ {
98
+ label: "Process",
99
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.process
100
+ },
101
+ {
102
+ label: "Failed",
103
+ value: l.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
104
+ }
105
+ ], R = function(e) {
106
+ const a = e;
107
+ let p = "-";
108
+ return a.details && a.details.amount && (p = L(a.details.amount).toFormat("$0.00")), {
109
+ id: e._id,
110
+ transactionId: e.transactionId,
111
+ orderId: e.orderId,
112
+ refId: e.refId,
113
+ terminalId: e.terminalId,
114
+ transactionAt: g(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
115
+ action: e.action,
116
+ gateway: e.gateway,
117
+ ecrGateway: e.ecrGateway,
118
+ amount: p,
119
+ seqNumber: e.seqNumber
120
+ };
121
+ }, E = [
122
+ {
123
+ accessorKey: "transactionId",
124
+ header: () => "Transaction ID",
125
+ meta: {
126
+ textAlign: "left"
127
+ },
128
+ cell: ({ cell: e }) => I(G, { data: e.getValue() })
129
+ },
130
+ {
131
+ accessorKey: "orderId",
132
+ header: () => "Pay ID",
133
+ meta: {
134
+ textAlign: "left"
135
+ }
136
+ },
137
+ {
138
+ header: () => "Bill Seq No",
139
+ accessorKey: "seqNumber"
140
+ },
141
+ {
142
+ accessorKey: "refId",
143
+ header: () => "Reference ID",
144
+ meta: {
145
+ textAlign: "left"
146
+ }
147
+ },
148
+ {
149
+ accessorKey: "gateway",
150
+ header: () => "Gateway",
151
+ meta: {
152
+ textAlign: "center",
153
+ maxWidth: "128px"
154
+ },
155
+ cell: ({ cell: e, row: a }) => I(Q, { row: a, data: e.getValue() })
156
+ },
157
+ {
158
+ accessorKey: "action",
159
+ header: () => "Status",
160
+ meta: {
161
+ textAlign: "right",
162
+ maxWidth: "132px"
163
+ },
164
+ cell: ({ cell: e, row: a }) => I(H, { row: a, data: e.getValue() })
165
+ },
166
+ {
167
+ accessorKey: "amount",
168
+ header: () => "Sales Amount",
169
+ meta: {
170
+ textAlign: "center"
171
+ }
172
+ },
173
+ {
174
+ accessorKey: "terminalId",
175
+ header: () => "Terminal ID",
176
+ meta: {
177
+ textAlign: "left"
178
+ }
179
+ },
180
+ {
181
+ accessorKey: "transactionAt",
182
+ header: () => "Transaction At",
183
+ meta: {
184
+ textAlign: "left"
185
+ }
186
+ }
187
+ ];
188
+ return (e, a) => {
189
+ const p = N("FmSearch"), w = N("FmSelect");
190
+ return _(), C(U, {
191
+ title: "Terminal Transactions",
192
+ description: "Transactions are purchases or payments made in retail using electronic devices such as POS systems, kiosks, terminals, or ECRs.",
193
+ loading: !1
194
+ }, {
195
+ default: h(() => [
196
+ i("div", J, [
197
+ i("div", X, [
198
+ c(p, {
199
+ "model-value": r(d),
200
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => u(d) ? d.value = t : null),
201
+ class: "mr-8",
202
+ label: "Search",
203
+ placeholder: "Search Transactions ..."
204
+ }, null, 8, ["model-value"]),
205
+ c(w, {
206
+ modelValue: r(s),
207
+ "onUpdate:modelValue": a[2] || (a[2] = (t) => u(s) ? s.value = t : null),
208
+ class: "mr-6 w-[300px]",
209
+ label: "Status",
210
+ "label-mark": "required",
211
+ multiselect: "",
212
+ items: x
213
+ }, {
214
+ "prepend-menu": h(() => [
215
+ c(q, {
216
+ modelValue: r(s),
217
+ "onUpdate:modelValue": a[1] || (a[1] = (t) => u(s) ? s.value = t : null),
218
+ items: x
219
+ }, null, 8, ["modelValue"])
220
+ ]),
221
+ _: 1
222
+ }, 8, ["modelValue"])
223
+ ]),
224
+ i("div", Z, [
225
+ c(B, {
226
+ button: {
227
+ appendIcon: "file_download",
228
+ variant: "primary",
229
+ label: "Export"
230
+ },
231
+ handler: () => {
232
+ var t;
233
+ return r(v).downloadTransactions(((t = o.value) == null ? void 0 : t.data()) ?? []);
234
+ }
235
+ }, null, 8, ["handler"])
236
+ ])
237
+ ]),
238
+ i("div", ee, [
239
+ c(j, {
240
+ modelValue: r(m),
241
+ "onUpdate:modelValue": a[3] || (a[3] = (t) => u(m) ? m.value = t : null),
242
+ event: ["ORDERING"]
243
+ }, null, 8, ["modelValue"]),
244
+ c(P, {
245
+ modelValue: r(n),
246
+ "onUpdate:modelValue": a[4] || (a[4] = (t) => u(n) ? n.value = t : null)
247
+ }, null, 8, ["modelValue"])
248
+ ]),
249
+ c(K, {
250
+ ref_key: "controller",
251
+ ref: o,
252
+ "column-defs": E,
253
+ "rows-defs": R,
254
+ paginate: (t, S) => r(v).readAccountTransactions({
255
+ accountId: r(m),
256
+ status: r(s),
257
+ searchKey: r(d),
258
+ limit: t,
259
+ cursor: S,
260
+ start: r(n).startDate,
261
+ end: r(n).endDate
262
+ })
263
+ }, null, 8, ["paginate"])
264
+ ]),
265
+ _: 1
266
+ });
267
+ };
268
+ }
269
+ });
270
+ export {
271
+ Ae as default
272
+ };
@@ -1,18 +1,19 @@
1
- import { defineComponent as b, resolveComponent as g, openBlock as p, createBlock as E, normalizeClass as q, withCtx as w, createElementVNode as h, toDisplayString as Y, createElementBlock as A, unref as u, createVNode as d, Fragment as $, renderList as C, ref as P, watch as N, isRef as v, h as _ } from "vue";
2
- import { t as y, a as R, b as I } from "./transaction-Bxl86wzh.js";
1
+ import { defineComponent as b, resolveComponent as g, openBlock as p, createBlock as E, normalizeClass as R, withCtx as w, createElementVNode as h, toDisplayString as V, createElementBlock as A, unref as u, createVNode as d, Fragment as Y, renderList as $, ref as C, watch as N, isRef as v, h as y } from "vue";
2
+ import { t as _, a as P, b as I } from "./transaction-WIA_gVK_.js";
3
3
  import { h as T } from "./moment-h96o7c8I.js";
4
- import { u as V } from "./index-BerQZMQW.js";
4
+ import { u as L } from "./index-B9uFzXYZ.js";
5
5
  import { _ as B } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
6
- import { _ as L } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
7
- import { useSnackbar as U, useDialog as G } from "@feedmepos/ui-library";
6
+ import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
7
+ import { useSnackbar as G, useDialog as j } from "@feedmepos/ui-library";
8
8
  import { w as D } from "./Modal-DB8M9o1T.js";
9
9
  import { u as x } from "./error-K1CakhA9.js";
10
- import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
11
- import { _ as Q } from "./index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js";
12
- import { e as S } from "./index-Dj_LwPBy.js";
13
- import { g as z, a as H } from "./assets-DjRoCcqv.js";
14
- import { _ as J } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
15
- const W = /* @__PURE__ */ b({
10
+ import { _ as Q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
11
+ import { g as z } from "./grafana-CqkYm_ru.js";
12
+ import { _ as H } from "./index.vue_vue_type_script_setup_true_lang-B0gi93RG.js";
13
+ import { e as S } from "./index-CXCXrHB0.js";
14
+ import { g as J, a as W } from "./assets-CtblXAzH.js";
15
+ import { _ as X } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
16
+ const Z = /* @__PURE__ */ b({
16
17
  __name: "Status",
17
18
  props: {
18
19
  row: {},
@@ -27,16 +28,16 @@ const W = /* @__PURE__ */ b({
27
28
  const m = g("FmBadge");
28
29
  return p(), E(m, {
29
30
  inline: "",
30
- class: q(o())
31
+ class: R(o())
31
32
  }, {
32
33
  default: w(() => [
33
- h("div", null, Y(i.data), 1)
34
+ h("div", null, V(i.data), 1)
34
35
  ]),
35
36
  _: 1
36
37
  }, 8, ["class"]);
37
38
  };
38
39
  }
39
- }), X = ["src"], Z = /* @__PURE__ */ b({
40
+ }), ee = ["src"], te = /* @__PURE__ */ b({
40
41
  __name: "Gateway",
41
42
  props: {
42
43
  row: {},
@@ -45,10 +46,10 @@ const W = /* @__PURE__ */ b({
45
46
  setup(f) {
46
47
  return (a, o) => (p(), A("img", {
47
48
  class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
48
- src: u(z)(a.row.original.gateway)
49
- }, null, 8, X));
49
+ src: u(J)(a.row.original.gateway)
50
+ }, null, 8, ee));
50
51
  }
51
- }), ee = ["src"], te = /* @__PURE__ */ b({
52
+ }), ae = ["src"], ne = /* @__PURE__ */ b({
52
53
  __name: "Method",
53
54
  props: {
54
55
  row: {},
@@ -57,10 +58,10 @@ const W = /* @__PURE__ */ b({
57
58
  setup(f) {
58
59
  return (a, o) => (p(), A("img", {
59
60
  class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
60
- src: u(H)(a.row.original.method.issuer)
61
- }, null, 8, ee));
61
+ src: u(W)(a.row.original.method.issuer)
62
+ }, null, 8, ae));
62
63
  }
63
- }), ae = /* @__PURE__ */ b({
64
+ }), re = /* @__PURE__ */ b({
64
65
  __name: "Actions",
65
66
  props: {
66
67
  onAction: { type: Function }
@@ -84,6 +85,12 @@ const W = /* @__PURE__ */ b({
84
85
  sublabel: "Perform webhook notification for transaction",
85
86
  icon: "webhook",
86
87
  action: "notify"
88
+ },
89
+ {
90
+ label: "Log",
91
+ sublabel: "Inspect transaction historical actions, requests and responses.",
92
+ icon: "history",
93
+ action: "history"
87
94
  }
88
95
  ];
89
96
  return (o, i) => {
@@ -98,7 +105,7 @@ const W = /* @__PURE__ */ b({
98
105
  d(s, { name: "settings" })
99
106
  ]),
100
107
  default: w(() => [
101
- (p(), A($, null, C(a, (c) => d(m, {
108
+ (p(), A(Y, null, $(a, (c) => d(m, {
102
109
  selectable: !0,
103
110
  key: c.label,
104
111
  sublabel: c.sublabel,
@@ -112,19 +119,19 @@ const W = /* @__PURE__ */ b({
112
119
  ]);
113
120
  };
114
121
  }
115
- }), ne = { class: "flex justify-between mb-6 items-center" }, re = { class: "flex space-x-4" }, oe = { class: "flex space-x-4 self-center" }, se = { class: "mb-6" }, we = /* @__PURE__ */ b({
122
+ }), oe = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" }, ce = { class: "flex space-x-4 self-center" }, ie = { class: "mb-6" }, xe = /* @__PURE__ */ b({
116
123
  __name: "Transaction",
117
124
  setup(f) {
118
- const a = P(), { dateRange: o, searchKey: i } = V({
125
+ const a = C(), { dateRange: o, searchKey: i } = L({
119
126
  searchKey: "",
120
127
  dateRange: {
121
128
  startDate: T().startOf("day").format("YYYY-MM-DD"),
122
129
  endDate: T().endOf("day").format("YYYY-MM-DD")
123
130
  }
124
- }), s = U(), m = G(), F = async (e, t) => {
131
+ }), s = G(), m = j(), F = async (e, t) => {
125
132
  let r = parseInt(t);
126
133
  Number.isNaN(r) && (r = 1);
127
- const n = await y.readTransactions({
134
+ const n = await _.readTransactions({
128
135
  start: T(o.value.startDate).startOf("day").toISOString(),
129
136
  end: T(o.value.endDate).endOf("day").toISOString(),
130
137
  limit: e,
@@ -132,7 +139,7 @@ const W = /* @__PURE__ */ b({
132
139
  search: i.value
133
140
  }), l = n.length == e;
134
141
  return {
135
- data: R(n),
142
+ data: P(n),
136
143
  meta: {
137
144
  cursor: l ? (r + 1).toString() : ""
138
145
  }
@@ -161,7 +168,7 @@ const W = /* @__PURE__ */ b({
161
168
  return;
162
169
  }
163
170
  try {
164
- const l = await y.refetchTransaction({ transactionId: t.id });
171
+ const l = await _.refetchTransaction({ transactionId: t.id });
165
172
  (n = a.value) == null || n.replaceData(e, I(l)), s.open({
166
173
  type: "success",
167
174
  title: "Transaction queried and updated successfully."
@@ -174,7 +181,7 @@ const W = /* @__PURE__ */ b({
174
181
  });
175
182
  }
176
183
  }
177
- async function M(e) {
184
+ async function q(e) {
178
185
  var r;
179
186
  const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
180
187
  if (!t) {
@@ -192,7 +199,7 @@ const W = /* @__PURE__ */ b({
192
199
  async () => {
193
200
  var n;
194
201
  try {
195
- const l = await y.refundTransaction({
202
+ const l = await _.refundTransaction({
196
203
  transactionId: t.id,
197
204
  reason: "portal transaction refund",
198
205
  amount: t.fdoAmount
@@ -211,7 +218,7 @@ const W = /* @__PURE__ */ b({
211
218
  }
212
219
  );
213
220
  }
214
- async function O(e) {
221
+ async function K(e) {
215
222
  var r;
216
223
  const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
217
224
  if (!t) {
@@ -228,7 +235,7 @@ const W = /* @__PURE__ */ b({
228
235
  "Are you sure to perform notify transaction?",
229
236
  async () => {
230
237
  try {
231
- await y.renotifyTransaction(t.id), s.open({
238
+ await _.renotifyTransaction(t.id), s.open({
232
239
  type: "success",
233
240
  title: "Transaction notify successfully."
234
241
  });
@@ -242,23 +249,47 @@ const W = /* @__PURE__ */ b({
242
249
  }
243
250
  );
244
251
  }
245
- const K = [
252
+ async function M(e) {
253
+ var n;
254
+ const t = (n = a.value) == null ? void 0 : n.pageData().at(e);
255
+ if (!t) {
256
+ s.open({
257
+ type: "error",
258
+ title: "Something went wrong",
259
+ message: "Fail to find transactions from the displayed transactions."
260
+ });
261
+ return;
262
+ }
263
+ const r = z([
264
+ {
265
+ type: "span",
266
+ queryKey: "transaction.id",
267
+ queryValue: t.id
268
+ }
269
+ ], t.createdAt);
270
+ window.open(r, "_blank");
271
+ }
272
+ const O = [
246
273
  {
247
274
  header: () => "Transaction ID",
248
275
  accessorKey: "id",
249
- cell: ({ cell: e }) => _(J, { data: e.getValue() })
276
+ cell: ({ cell: e }) => y(X, { data: e.getValue() })
250
277
  },
251
278
  {
252
279
  header: () => "Pay ID",
253
280
  accessorKey: "payId"
254
281
  },
282
+ {
283
+ header: () => "Bill",
284
+ accessorKey: "seqNumber"
285
+ },
255
286
  {
256
287
  header: () => "Gateway",
257
288
  accessorKey: "gateway",
258
289
  meta: {
259
290
  textAlign: "center"
260
291
  },
261
- cell: ({ cell: e, row: t }) => t.original.method ? _(Z, { row: t, data: e.getValue() }) : ""
292
+ cell: ({ cell: e, row: t }) => t.original.method ? y(te, { row: t, data: e.getValue() }) : ""
262
293
  },
263
294
  {
264
295
  header: () => "Method",
@@ -266,7 +297,7 @@ const W = /* @__PURE__ */ b({
266
297
  meta: {
267
298
  textAlign: "center"
268
299
  },
269
- cell: ({ cell: e, row: t }) => t.original.method ? _(te, { row: t, data: e.getValue() }) : ""
300
+ cell: ({ cell: e, row: t }) => t.original.method ? y(ne, { row: t, data: e.getValue() }) : ""
270
301
  },
271
302
  {
272
303
  header: () => "Type",
@@ -284,7 +315,7 @@ const W = /* @__PURE__ */ b({
284
315
  {
285
316
  header: () => "Status",
286
317
  accessorKey: "status",
287
- cell: ({ cell: e, row: t }) => _(W, { row: t, data: e.getValue() })
318
+ cell: ({ cell: e, row: t }) => y(Z, { row: t, data: e.getValue() })
288
319
  },
289
320
  {
290
321
  header: () => "Transaction At",
@@ -308,14 +339,16 @@ const W = /* @__PURE__ */ b({
308
339
  {
309
340
  header: () => "Actions",
310
341
  accessorKey: "actions",
311
- cell: ({ row: e }) => _(ae, {
342
+ cell: ({ row: e }) => y(re, {
312
343
  onAction: (t) => {
313
344
  switch (t) {
314
345
  case "notify":
315
- return O(e.index);
346
+ return K(e.index);
316
347
  case "query":
317
348
  return k(e.index);
318
349
  case "refund":
350
+ return q(e.index);
351
+ case "history":
319
352
  return M(e.index);
320
353
  }
321
354
  }
@@ -329,8 +362,8 @@ const W = /* @__PURE__ */ b({
329
362
  loading: !1
330
363
  }, {
331
364
  default: w(() => [
332
- h("div", ne, [
333
- h("div", re, [
365
+ h("div", oe, [
366
+ h("div", se, [
334
367
  d(r, {
335
368
  "model-value": u(i),
336
369
  "onUpdate:modelValue": t[0] || (t[0] = (n) => v(i) ? i.value = n : null),
@@ -339,15 +372,15 @@ const W = /* @__PURE__ */ b({
339
372
  placeholder: "Search Transactions ..."
340
373
  }, null, 8, ["model-value"])
341
374
  ]),
342
- h("div", oe, [
343
- d(L, {
375
+ h("div", ce, [
376
+ d(U, {
344
377
  button: {
345
378
  appendIcon: "file_download",
346
379
  variant: "primary",
347
380
  label: "Export"
348
381
  },
349
382
  handler: async () => {
350
- await u(y).downloadTransactionReport({
383
+ await u(_).downloadTransactionReport({
351
384
  start: u(o).startDate,
352
385
  end: u(o).endDate
353
386
  });
@@ -355,16 +388,16 @@ const W = /* @__PURE__ */ b({
355
388
  }, null, 8, ["handler"])
356
389
  ])
357
390
  ]),
358
- h("div", se, [
359
- d(j, {
391
+ h("div", ie, [
392
+ d(Q, {
360
393
  modelValue: u(o),
361
394
  "onUpdate:modelValue": t[1] || (t[1] = (n) => v(o) ? o.value = n : null)
362
395
  }, null, 8, ["modelValue"])
363
396
  ]),
364
- d(Q, {
397
+ d(H, {
365
398
  ref_key: "controller",
366
399
  ref: a,
367
- "column-defs": K,
400
+ "column-defs": O,
368
401
  "rows-defs": (n) => n,
369
402
  paginate: F
370
403
  }, null, 8, ["rows-defs"])
@@ -375,5 +408,5 @@ const W = /* @__PURE__ */ b({
375
408
  }
376
409
  });
377
410
  export {
378
- we as default
411
+ xe as default
379
412
  };