@feedmepos/mf-payment 1.0.2 → 1.0.3-beta.2

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 (59) hide show
  1. package/dist/{PayoutAccount-suhh8XGz.js → PayoutAccount-C3OJFxGE.js} +5 -5
  2. package/dist/{PayoutAccount-B1dg1KvL.js → PayoutAccount-kB_wn4cP.js} +3 -3
  3. package/dist/{PayoutAccountSetting-C1yeSNv8.js → PayoutAccountSetting-CLBYDEPi.js} +4 -4
  4. package/dist/Restaurant-DOnRexzg.js +305 -0
  5. package/dist/{RestaurantSetting-CWZAKz1A.js → RestaurantSetting-gtFlM2pd.js} +4 -4
  6. package/dist/{Settlement-BKwie9R8.js → Settlement-B5j1UFxP.js} +3 -3
  7. package/dist/{Settlement-ByPXBNx1.js → Settlement-CEUQnTCZ.js} +3 -3
  8. package/dist/{SettlementTransactions-BxMV868W.js → SettlementTransactions-C5Tx5b4s.js} +4 -4
  9. package/dist/{SettlementTransactions-DcZmwZKJ.js → SettlementTransactions-DxbsTgdU.js} +4 -4
  10. package/dist/Terminal-PaTjy0Pe.js +404 -0
  11. package/dist/{TerminalSetting-qklmRz3H.js → TerminalSetting-CflniirY.js} +3 -3
  12. package/dist/{TerminalTransaction-YXcGJ2ne.js → TerminalTransaction-BSzztH-b.js} +184 -154
  13. package/dist/{TerminalTransaction-64Bn6vh0.js → TerminalTransaction-CLRn9sy5.js} +19 -18
  14. package/dist/Transaction-BlvwjRPM.js +412 -0
  15. package/dist/{Transaction-CZkNzH-m.js → Transaction-DZz0TdGO.js} +31 -27
  16. package/dist/api/transaction/index.d.ts +3 -0
  17. package/dist/{app-8rjSGM7c.js → app-Dlxc8Z6C.js} +246 -246
  18. package/dist/app.js +1 -1
  19. package/dist/{assets-DjRoCcqv.js → assets-C1lv-AvI.js} +1 -1
  20. package/dist/grafana-CqkYm_ru.js +46 -0
  21. package/dist/helpers/grafana.d.ts +7 -0
  22. package/dist/{index-BWFqxSU3.js → index-41sp-SQk.js} +1 -1
  23. package/dist/{index-CWGSYCJG.js → index-B1OxP811.js} +1 -1
  24. package/dist/{index-Dj_LwPBy.js → index-BrKBilMa.js} +8295 -8151
  25. package/dist/{index-DFePh4ct.js → index-CLBjviI0.js} +1 -1
  26. package/dist/{index-BerQZMQW.js → index-Cg9lo1F7.js} +1 -1
  27. package/dist/{index-CKyh0nlu.js → index-Ct_2lLEp.js} +1 -1
  28. package/dist/{index-Bp_58SiC.js → index-DCvp77iI.js} +1 -1
  29. package/dist/{index-BEFlDEyV.js → index-DS40kAjx.js} +1 -1
  30. package/dist/{index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js → index.vue_vue_type_script_setup_true_lang-DTDPPej5.js} +1 -1
  31. package/dist/model/payout-account.d.ts +1 -1
  32. package/dist/model/transaction.d.ts +2 -0
  33. package/dist/package.json +2 -2
  34. package/dist/{payout-account-D5aZKGxy.js → payout-account-DWi-NqRL.js} +2 -2
  35. package/dist/stores/payoutAccount.d.ts +6 -6
  36. package/dist/transaction-Caa2nhli.js +105 -0
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +6 -6
  39. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +6 -6
  40. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +6 -6
  41. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +6 -6
  42. package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +5 -0
  43. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
  44. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  45. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  46. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +8 -8
  47. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
  48. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  49. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
  50. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -1
  51. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
  52. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +12 -12
  53. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  54. package/package.json +2 -2
  55. package/dist/Restaurant-B02jty0J.js +0 -262
  56. package/dist/Terminal-DX8v8WpM.js +0 -386
  57. package/dist/Transaction-CvrsRuuz.js +0 -403
  58. package/dist/transaction-CIYqsLqc.js +0 -97
  59. package/dist/views/admin/transaction/TransactionTable.vue.d.ts +0 -30
@@ -1,11 +1,11 @@
1
- import { defineComponent as N, openBlock as p, createElementBlock as C, Fragment as O, unref as r, createCommentVNode as F, createElementVNode as d, resolveComponent as I, createBlock as v, normalizeClass as D, withCtx as y, toDisplayString as V, ref as M, watch as T, createVNode as i, isRef as _, h as g } from "vue";
2
- import { c as m } from "./index-Dj_LwPBy.js";
3
- import { h } from "./moment-h96o7c8I.js";
4
- import { u as k } from "./index-BerQZMQW.js";
5
- import { _ as Y } from "./index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js";
1
+ import { defineComponent as N, openBlock as p, createElementBlock as C, Fragment as O, unref as r, createCommentVNode as F, createElementVNode as d, resolveComponent as h, createBlock as v, normalizeClass as D, withCtx as y, toDisplayString as V, ref as M, watch as T, createVNode as i, isRef as _, h as I } from "vue";
2
+ import { c as m } from "./index-BrKBilMa.js";
3
+ import { h as g } from "./moment-h96o7c8I.js";
4
+ import { u as k } from "./index-Cg9lo1F7.js";
5
+ import { _ as Y } from "./index.vue_vue_type_script_setup_true_lang-DTDPPej5.js";
6
6
  import "@feedmepos/ui-library";
7
- import { g as $ } from "./assets-DjRoCcqv.js";
8
- import { E as K, t as R } from "./index-CKyh0nlu.js";
7
+ import { g as $ } from "./assets-C1lv-AvI.js";
8
+ import { E as K, t as R } from "./index-Ct_2lLEp.js";
9
9
  import { d as L } from "./dinero-CIVmXLL-.js";
10
10
  import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
11
11
  import { useCoreStore as G } from "@feedmepos/mf-common";
@@ -45,7 +45,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
45
45
  return o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : o.data === m.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
46
46
  }
47
47
  return (l, s) => {
48
- const c = I("FmBadge");
48
+ const c = h("FmBadge");
49
49
  return p(), v(c, {
50
50
  inline: "",
51
51
  class: D(n())
@@ -57,15 +57,15 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
57
57
  }, 8, ["class"]);
58
58
  };
59
59
  }
60
- }), X = { class: "flex justify-between mb-6 items-start" }, Z = { class: "flex space-x-8 items-start" }, ee = { class: "flex space-x-4 self-center" }, ae = { class: "mb-6" }, ge = /* @__PURE__ */ N({
60
+ }), X = { class: "flex justify-between mb-6 items-start" }, Z = { class: "flex space-x-8 items-start" }, ee = { class: "flex space-x-4 self-center" }, ae = { class: "mb-6" }, Ie = /* @__PURE__ */ N({
61
61
  __name: "TerminalTransaction",
62
62
  setup(f) {
63
63
  const { currentRestaurant: o } = G(), n = M(), { dateRange: l, status: s, searchKey: c } = k({
64
64
  searchKey: "",
65
65
  status: [m.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
66
66
  dateRange: {
67
- startDate: h().startOf("day").format("YYYY-MM-DD"),
68
- endDate: h().endOf("day").format("YYYY-MM-DD")
67
+ startDate: g().startOf("day").format("YYYY-MM-DD"),
68
+ endDate: g().endOf("day").format("YYYY-MM-DD")
69
69
  }
70
70
  });
71
71
  T([l, s], () => {
@@ -107,10 +107,11 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
107
107
  let u = "-";
108
108
  return a.details && a.details.amount && (u = L(a.details.amount).toFormat("$0.00")), {
109
109
  id: e._id,
110
+ transactionId: e.transactionId,
110
111
  orderId: e.orderId,
111
112
  refId: e.refId,
112
113
  terminalId: e.terminalId,
113
- transactionAt: h(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
114
+ transactionAt: g(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
114
115
  action: e.action,
115
116
  gateway: e.gateway,
116
117
  ecrGateway: e.ecrGateway,
@@ -118,12 +119,12 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
118
119
  };
119
120
  }, E = [
120
121
  {
121
- accessorKey: "id",
122
+ accessorKey: "transactionId",
122
123
  header: () => "Transaction ID",
123
124
  meta: {
124
125
  textAlign: "left"
125
126
  },
126
- cell: ({ cell: e }) => g(P, { data: e.getValue() })
127
+ cell: ({ cell: e }) => I(P, { data: e.getValue() })
127
128
  },
128
129
  {
129
130
  accessorKey: "orderId",
@@ -146,7 +147,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
146
147
  textAlign: "center",
147
148
  maxWidth: "128px"
148
149
  },
149
- cell: ({ cell: e, row: a }) => g(H, { row: a, data: e.getValue() })
150
+ cell: ({ cell: e, row: a }) => I(H, { row: a, data: e.getValue() })
150
151
  },
151
152
  {
152
153
  accessorKey: "action",
@@ -155,7 +156,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
155
156
  textAlign: "right",
156
157
  maxWidth: "132px"
157
158
  },
158
- cell: ({ cell: e, row: a }) => g(J, { row: a, data: e.getValue() })
159
+ cell: ({ cell: e, row: a }) => I(J, { row: a, data: e.getValue() })
159
160
  },
160
161
  {
161
162
  accessorKey: "amount",
@@ -180,7 +181,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
180
181
  }
181
182
  ];
182
183
  return (e, a) => {
183
- const u = I("FmSearch"), w = I("FmSelect");
184
+ const u = h("FmSearch"), w = h("FmSelect");
184
185
  return p(), v(j, {
185
186
  title: "Terminal Transactions",
186
187
  description: "Transactions are purchases or payments made in retail using electronic devices such as POS systems, kiosks, terminals, or ECRs.",
@@ -257,5 +258,5 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
257
258
  }
258
259
  });
259
260
  export {
260
- ge as default
261
+ Ie as default
261
262
  };
@@ -0,0 +1,412 @@
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-Caa2nhli.js";
3
+ import { h as T } from "./moment-h96o7c8I.js";
4
+ import { u as L } from "./index-Cg9lo1F7.js";
5
+ import { _ as B } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
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
+ import { w as D } from "./Modal-DB8M9o1T.js";
9
+ import { u as x } from "./error-K1CakhA9.js";
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-DTDPPej5.js";
13
+ import { e as S } from "./index-BrKBilMa.js";
14
+ import { g as J, a as W } from "./assets-C1lv-AvI.js";
15
+ import { _ as X } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
16
+ const Z = /* @__PURE__ */ b({
17
+ __name: "Status",
18
+ props: {
19
+ row: {},
20
+ data: {}
21
+ },
22
+ setup(f) {
23
+ const a = f;
24
+ function o() {
25
+ return a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === S.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
26
+ }
27
+ return (i, s) => {
28
+ const m = g("FmBadge");
29
+ return p(), E(m, {
30
+ inline: "",
31
+ class: R(o())
32
+ }, {
33
+ default: w(() => [
34
+ h("div", null, V(i.data), 1)
35
+ ]),
36
+ _: 1
37
+ }, 8, ["class"]);
38
+ };
39
+ }
40
+ }), ee = ["src"], te = /* @__PURE__ */ b({
41
+ __name: "Gateway",
42
+ props: {
43
+ row: {},
44
+ data: {}
45
+ },
46
+ setup(f) {
47
+ return (a, o) => (p(), A("img", {
48
+ class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
49
+ src: u(J)(a.row.original.gateway)
50
+ }, null, 8, ee));
51
+ }
52
+ }), ae = ["src"], ne = /* @__PURE__ */ b({
53
+ __name: "Method",
54
+ props: {
55
+ row: {},
56
+ data: {}
57
+ },
58
+ setup(f) {
59
+ return (a, o) => (p(), A("img", {
60
+ class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
61
+ src: u(W)(a.row.original.method.issuer)
62
+ }, null, 8, ae));
63
+ }
64
+ }), re = /* @__PURE__ */ b({
65
+ __name: "Actions",
66
+ props: {
67
+ onAction: { type: Function }
68
+ },
69
+ setup(f) {
70
+ const a = [
71
+ {
72
+ label: "Query",
73
+ sublabel: "Perform transaction status inquriy",
74
+ icon: "question_answer",
75
+ action: "query"
76
+ },
77
+ {
78
+ label: "Refund",
79
+ sublabel: "Perform transaction refund request",
80
+ icon: "request_page",
81
+ action: "refund"
82
+ },
83
+ {
84
+ label: "Notify",
85
+ sublabel: "Perform webhook notification for transaction",
86
+ icon: "webhook",
87
+ action: "notify"
88
+ },
89
+ {
90
+ label: "Log",
91
+ sublabel: "Inspect transaction historical actions, requests and responses.",
92
+ icon: "history",
93
+ action: "history"
94
+ }
95
+ ];
96
+ return (o, i) => {
97
+ const s = g("FmIcon"), m = g("FmMenuItem"), F = g("FmMenu");
98
+ return p(), A("div", {
99
+ onClick: i[0] || (i[0] = (c) => {
100
+ c.stopPropagation();
101
+ })
102
+ }, [
103
+ d(F, null, {
104
+ "menu-button": w(() => [
105
+ d(s, { name: "settings" })
106
+ ]),
107
+ default: w(() => [
108
+ (p(), A(Y, null, $(a, (c) => d(m, {
109
+ selectable: !0,
110
+ key: c.label,
111
+ sublabel: c.sublabel,
112
+ label: c.label,
113
+ icon: c.icon,
114
+ onclick: () => o.onAction(c.action)
115
+ }, null, 8, ["sublabel", "label", "icon", "onclick"])), 64))
116
+ ]),
117
+ _: 1
118
+ })
119
+ ]);
120
+ };
121
+ }
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({
123
+ __name: "Transaction",
124
+ setup(f) {
125
+ const a = C(), { dateRange: o, searchKey: i } = L({
126
+ searchKey: "",
127
+ dateRange: {
128
+ startDate: T().startOf("day").format("YYYY-MM-DD"),
129
+ endDate: T().endOf("day").format("YYYY-MM-DD")
130
+ }
131
+ }), s = G(), m = j(), F = async (e, t) => {
132
+ let r = parseInt(t);
133
+ Number.isNaN(r) && (r = 1);
134
+ const n = await _.readTransactions({
135
+ start: T(o.value.startDate).startOf("day").toISOString(),
136
+ end: T(o.value.endDate).endOf("day").toISOString(),
137
+ limit: e,
138
+ skip: (r - 1) * e,
139
+ search: i.value
140
+ }), l = n.length == e;
141
+ return {
142
+ data: P(n),
143
+ meta: {
144
+ cursor: l ? (r + 1).toString() : ""
145
+ }
146
+ };
147
+ };
148
+ N(o, async () => {
149
+ var e;
150
+ (e = a.value) == null || e.reset();
151
+ });
152
+ let c;
153
+ N(i, async () => {
154
+ c && clearTimeout(c), c = setTimeout(() => {
155
+ var e;
156
+ (e = a.value) == null || e.reset();
157
+ }, 700);
158
+ });
159
+ async function k(e) {
160
+ var r, n;
161
+ const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
162
+ if (!t) {
163
+ s.open({
164
+ type: "error",
165
+ title: "Something went wrong",
166
+ message: "Fail to find transactions from the displayed transactions."
167
+ });
168
+ return;
169
+ }
170
+ try {
171
+ const l = await _.refetchTransaction({ transactionId: t.id });
172
+ (n = a.value) == null || n.replaceData(e, I(l)), s.open({
173
+ type: "success",
174
+ title: "Transaction queried and updated successfully."
175
+ });
176
+ } catch (l) {
177
+ s.open({
178
+ type: "error",
179
+ title: "Fail to query transaction.",
180
+ message: x(l)
181
+ });
182
+ }
183
+ }
184
+ async function q(e) {
185
+ var r;
186
+ const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
187
+ if (!t) {
188
+ s.open({
189
+ type: "error",
190
+ title: "Something went wrong",
191
+ message: "Fail to find transactions from the displayed transactions."
192
+ });
193
+ return;
194
+ }
195
+ D(
196
+ m,
197
+ "Refund Transaction",
198
+ "Are you sure to refund transaction? This action cannot be revert!",
199
+ async () => {
200
+ var n;
201
+ try {
202
+ const l = await _.refundTransaction({
203
+ transactionId: t.id,
204
+ reason: "portal transaction refund",
205
+ amount: t.fdoAmount
206
+ });
207
+ (n = a.value) == null || n.replaceData(e, I(l)), s.open({
208
+ type: "success",
209
+ title: "Transaction refund request initiated."
210
+ });
211
+ } catch (l) {
212
+ s.open({
213
+ type: "error",
214
+ title: "Fail to request refund transaction.",
215
+ message: x(l)
216
+ });
217
+ }
218
+ }
219
+ );
220
+ }
221
+ async function K(e) {
222
+ var r;
223
+ const t = (r = a.value) == null ? void 0 : r.pageData().at(e);
224
+ if (!t) {
225
+ s.open({
226
+ type: "error",
227
+ title: "Something went wrong",
228
+ message: "Fail to find transactions from the displayed transactions."
229
+ });
230
+ return;
231
+ }
232
+ D(
233
+ m,
234
+ "Notify Transaction",
235
+ "Are you sure to perform notify transaction?",
236
+ async () => {
237
+ try {
238
+ await _.renotifyTransaction(t.id), s.open({
239
+ type: "success",
240
+ title: "Transaction notify successfully."
241
+ });
242
+ } catch (n) {
243
+ s.open({
244
+ type: "error",
245
+ title: "Fail to notify transaction.",
246
+ message: x(n)
247
+ });
248
+ }
249
+ }
250
+ );
251
+ }
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 = [
273
+ {
274
+ header: () => "Transaction ID",
275
+ accessorKey: "id",
276
+ cell: ({ cell: e }) => y(X, { data: e.getValue() })
277
+ },
278
+ {
279
+ header: () => "Pay ID",
280
+ accessorKey: "payId"
281
+ },
282
+ {
283
+ header: () => "Bill",
284
+ accessorKey: "seqNumber"
285
+ },
286
+ {
287
+ header: () => "Gateway",
288
+ accessorKey: "gateway",
289
+ meta: {
290
+ textAlign: "center"
291
+ },
292
+ cell: ({ cell: e, row: t }) => t.original.method ? y(te, { row: t, data: e.getValue() }) : ""
293
+ },
294
+ {
295
+ header: () => "Method",
296
+ accessorKey: "method",
297
+ meta: {
298
+ textAlign: "center"
299
+ },
300
+ cell: ({ cell: e, row: t }) => t.original.method ? y(ne, { row: t, data: e.getValue() }) : ""
301
+ },
302
+ {
303
+ header: () => "Type",
304
+ accessorKey: "type",
305
+ meta: {
306
+ textAlign: "center"
307
+ },
308
+ cell: ({ row: e }) => {
309
+ if (!e.original.method)
310
+ return "";
311
+ const t = e.original.method.variant;
312
+ return t.includes("_ONLINE") ? "ONLINE" : t.includes("_OFFLINE") ? "OFFLINE" : t;
313
+ }
314
+ },
315
+ {
316
+ header: () => "Status",
317
+ accessorKey: "status",
318
+ cell: ({ cell: e, row: t }) => y(Z, { row: t, data: e.getValue() })
319
+ },
320
+ {
321
+ header: () => "Transaction At",
322
+ accessorKey: "transactionAt",
323
+ meta: {
324
+ width: "180px"
325
+ }
326
+ },
327
+ {
328
+ header: () => "Sales Amount",
329
+ accessorKey: "amount"
330
+ },
331
+ {
332
+ header: () => "Fee",
333
+ accessorKey: "fee"
334
+ },
335
+ {
336
+ header: () => "Settlement Amount",
337
+ accessorKey: "payout"
338
+ },
339
+ {
340
+ header: () => "Actions",
341
+ accessorKey: "actions",
342
+ cell: ({ row: e }) => y(re, {
343
+ onAction: (t) => {
344
+ switch (t) {
345
+ case "notify":
346
+ return K(e.index);
347
+ case "query":
348
+ return k(e.index);
349
+ case "refund":
350
+ return q(e.index);
351
+ case "history":
352
+ return M(e.index);
353
+ }
354
+ }
355
+ })
356
+ }
357
+ ];
358
+ return (e, t) => {
359
+ const r = g("FmSearch");
360
+ return p(), E(B, {
361
+ title: "Online Transactions",
362
+ loading: !1
363
+ }, {
364
+ default: w(() => [
365
+ h("div", oe, [
366
+ h("div", se, [
367
+ d(r, {
368
+ "model-value": u(i),
369
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => v(i) ? i.value = n : null),
370
+ class: "mr-8",
371
+ label: "Search",
372
+ placeholder: "Search Transactions ..."
373
+ }, null, 8, ["model-value"])
374
+ ]),
375
+ h("div", ce, [
376
+ d(U, {
377
+ button: {
378
+ appendIcon: "file_download",
379
+ variant: "primary",
380
+ label: "Export"
381
+ },
382
+ handler: async () => {
383
+ await u(_).downloadTransactionReport({
384
+ start: u(o).startDate,
385
+ end: u(o).endDate
386
+ });
387
+ }
388
+ }, null, 8, ["handler"])
389
+ ])
390
+ ]),
391
+ h("div", ie, [
392
+ d(Q, {
393
+ modelValue: u(o),
394
+ "onUpdate:modelValue": t[1] || (t[1] = (n) => v(o) ? o.value = n : null)
395
+ }, null, 8, ["modelValue"])
396
+ ]),
397
+ d(H, {
398
+ ref_key: "controller",
399
+ ref: a,
400
+ "column-defs": O,
401
+ "rows-defs": (n) => n,
402
+ paginate: F
403
+ }, null, 8, ["rows-defs"])
404
+ ]),
405
+ _: 1
406
+ });
407
+ };
408
+ }
409
+ });
410
+ export {
411
+ xe as default
412
+ };
@@ -1,17 +1,17 @@
1
- import { defineComponent as f, resolveComponent as N, openBlock as g, createBlock as S, normalizeClass as O, withCtx as D, createElementVNode as _, toDisplayString as V, createElementBlock as I, unref as o, ref as A, h as v, onMounted as C, watch as w, createVNode as p, isRef as E } from "vue";
2
- import { t as b, a as M } from "./transaction-CIYqsLqc.js";
3
- import { e as x, u as Y } from "./index-Dj_LwPBy.js";
1
+ import { defineComponent as f, resolveComponent as A, openBlock as h, createBlock as S, normalizeClass as O, withCtx as D, createElementVNode as _, toDisplayString as V, createElementBlock as I, unref as o, ref as N, h as v, onMounted as C, watch as w, createVNode as p, isRef as E } from "vue";
2
+ import { t as b, a as M } from "./transaction-Caa2nhli.js";
3
+ import { e as x, u as Y } from "./index-BrKBilMa.js";
4
4
  import "@feedmepos/ui-library";
5
5
  import "./dinero-CIVmXLL-.js";
6
6
  import { h as F } from "./moment-h96o7c8I.js";
7
- import { g as $, a as k } from "./assets-DjRoCcqv.js";
8
- import { useCoreStore as L } from "@feedmepos/mf-common";
9
- import { _ as P } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
10
- import { u as B } from "./index-BerQZMQW.js";
7
+ import { g as $, a as k } from "./assets-C1lv-AvI.js";
8
+ import { useCoreStore as B } from "@feedmepos/mf-common";
9
+ import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
10
+ import { u as P } from "./index-Cg9lo1F7.js";
11
11
  import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
- import { _ as G } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
13
- import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
14
- const q = /* @__PURE__ */ f({
12
+ import { _ as q } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
13
+ import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
14
+ const j = /* @__PURE__ */ f({
15
15
  __name: "Status",
16
16
  props: {
17
17
  row: {},
@@ -23,8 +23,8 @@ const q = /* @__PURE__ */ f({
23
23
  return a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
24
24
  }
25
25
  return (l, c) => {
26
- const d = N("FmBadge");
27
- return g(), S(d, {
26
+ const d = A("FmBadge");
27
+ return h(), S(d, {
28
28
  inline: "",
29
29
  class: O(t())
30
30
  }, {
@@ -42,7 +42,7 @@ const q = /* @__PURE__ */ f({
42
42
  data: {}
43
43
  },
44
44
  setup(s) {
45
- return (a, t) => (g(), I("img", {
45
+ return (a, t) => (h(), I("img", {
46
46
  class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
47
47
  src: o($)(a.row.original.gateway)
48
48
  }, null, 8, J));
@@ -54,7 +54,7 @@ const q = /* @__PURE__ */ f({
54
54
  data: {}
55
55
  },
56
56
  setup(s) {
57
- return (a, t) => (g(), I("img", {
57
+ return (a, t) => (h(), I("img", {
58
58
  class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
59
59
  src: o(k)(a.row.original.method.issuer)
60
60
  }, null, 8, Q));
@@ -73,7 +73,7 @@ const q = /* @__PURE__ */ f({
73
73
  },
74
74
  emits: ["row-click"],
75
75
  setup(s, { emit: a }) {
76
- const t = s, l = a, c = A(""), d = [
76
+ const t = s, l = a, c = N(""), d = [
77
77
  {
78
78
  header: () => "Transaction ID",
79
79
  accessorKey: "id"
@@ -82,6 +82,10 @@ const q = /* @__PURE__ */ f({
82
82
  header: () => "Pay ID",
83
83
  accessorKey: "payId"
84
84
  },
85
+ {
86
+ header: () => "Bill Seq No",
87
+ accessorKey: "seqNumber"
88
+ },
85
89
  {
86
90
  header: () => "Gateway",
87
91
  accessorKey: "gateway",
@@ -114,7 +118,7 @@ const q = /* @__PURE__ */ f({
114
118
  {
115
119
  header: () => "Status",
116
120
  accessorKey: "status",
117
- cell: ({ cell: n, row: e }) => v(q, { row: e, data: n.getValue() })
121
+ cell: ({ cell: n, row: e }) => v(j, { row: e, data: n.getValue() })
118
122
  },
119
123
  {
120
124
  header: () => "Transaction At",
@@ -137,8 +141,8 @@ const q = /* @__PURE__ */ f({
137
141
  }
138
142
  ];
139
143
  return (n, e) => {
140
- const h = N("FmTable");
141
- return g(), S(h, {
144
+ const g = A("FmTable");
145
+ return h(), S(g, {
142
146
  modelValue: c.value,
143
147
  "onUpdate:modelValue": e[0] || (e[0] = (i) => c.value = i),
144
148
  "column-defs": d,
@@ -151,14 +155,14 @@ const q = /* @__PURE__ */ f({
151
155
  }), X = { class: "flex justify-between mb-6 items-center" }, Z = { class: "flex space-x-8" }, ee = { class: "flex space-x-4 self-center" }, ae = { class: "mb-6" }, fe = /* @__PURE__ */ f({
152
156
  __name: "Transaction",
153
157
  setup(s) {
154
- const { dateRange: a, searchKey: t } = B({
158
+ const { dateRange: a, searchKey: t } = P({
155
159
  searchKey: "",
156
160
  dateRange: {
157
161
  startDate: F().startOf("day").format("YYYY-MM-DD"),
158
162
  endDate: F().endOf("day").format("YYYY-MM-DD")
159
163
  }
160
- }), { isLoading: l, startAsyncCall: c } = Y(!0), { currentRestaurant: d } = L(), n = A([]), e = A([]);
161
- async function h() {
164
+ }), { isLoading: l, startAsyncCall: c } = Y(!0), { currentRestaurant: d } = B(), n = N([]), e = N([]);
165
+ async function g() {
162
166
  await c(async () => {
163
167
  const { startDate: y, endDate: r } = a.value, u = await b.readRestaurantTransactions({
164
168
  start: y,
@@ -174,9 +178,9 @@ const q = /* @__PURE__ */ f({
174
178
  });
175
179
  }
176
180
  function i() {
177
- h();
181
+ g();
178
182
  }
179
- C(i), w(d, i), w(a, h);
183
+ C(i), w(d, i), w(a, g);
180
184
  let T;
181
185
  return w(t, async () => {
182
186
  T && clearTimeout(T), T = setTimeout(() => {
@@ -187,8 +191,8 @@ const q = /* @__PURE__ */ f({
187
191
  });
188
192
  }, 700);
189
193
  }), (y, r) => {
190
- const u = N("FmSearch");
191
- return g(), S(P, {
194
+ const u = A("FmSearch");
195
+ return h(), S(L, {
192
196
  title: "Online Transactions",
193
197
  description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
194
198
  loading: o(l)
@@ -196,7 +200,7 @@ const q = /* @__PURE__ */ f({
196
200
  default: D(() => [
197
201
  _("div", X, [
198
202
  _("div", Z, [
199
- p(G),
203
+ p(q),
200
204
  p(u, {
201
205
  "model-value": o(t),
202
206
  "onUpdate:modelValue": r[0] || (r[0] = (m) => E(t) ? t.value = m : null),
@@ -218,7 +222,7 @@ const q = /* @__PURE__ */ f({
218
222
  ])
219
223
  ]),
220
224
  _("div", ae, [
221
- p(j, {
225
+ p(G, {
222
226
  modelValue: o(a),
223
227
  "onUpdate:modelValue": r[1] || (r[1] = (m) => E(a) ? a.value = m : null)
224
228
  }, null, 8, ["modelValue"])
@@ -5,6 +5,9 @@ export declare const transactionApi: {
5
5
  readTransactions(params: {
6
6
  start: string;
7
7
  end: string;
8
+ limit: number;
9
+ skip: number;
10
+ search: string;
8
11
  }): Promise<PaymentTransactionDtoOutput[]>;
9
12
  removeTransactionFromSettlement(transactionId: string): Promise<any>;
10
13
  refetchTransaction({ transactionId, }: {