@feedmepos/mf-payment 1.5.77 → 1.5.78-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 (119) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-D_PoXVbz.js → Actions.vue_vue_type_script_setup_true_lang-CkOYpI0o.js} +1 -1
  2. package/dist/{Chargeback-CzwL8PJv.js → Chargeback-C5vvqZPC.js} +7 -7
  3. package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js → DateRangePicker.vue_vue_type_script_setup_true_lang-BNVnvrVY.js} +1 -1
  4. package/dist/{no-data-BRmo6XOO.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DF7Bz7mG.js} +92 -2
  5. package/dist/{OnboardForm-DZeWRzRD.js → OnboardForm-D1UEL7nA.js} +554 -482
  6. package/dist/{OnboardForm-C6LuVVyr.js → OnboardForm-Jk61FTsk.js} +6 -6
  7. package/dist/OnboardSubmission-CJ8Wz4Z5.js +446 -0
  8. package/dist/{OnboardSubmission-C2BYK2p1.js → OnboardSubmission-VVsokhdH.js} +27 -27
  9. package/dist/{PayoutAccount-VbRd7cmv.js → PayoutAccount-BJupz1C5.js} +101 -102
  10. package/dist/{PayoutAccount-BMQZ5bOZ.js → PayoutAccount-CgmR-Kft.js} +5 -5
  11. package/dist/PayoutAccountSetting-D18R7415.js +1502 -0
  12. package/dist/{Restaurant-4cO60aVP.js → Restaurant-CYzqYWvJ.js} +4 -4
  13. package/dist/{RestaurantSetting-Bvk0dnCI.js → RestaurantSetting-BjmaAH2A.js} +325 -243
  14. package/dist/{Settlement-CklF8pz7.js → Settlement-BgksUxPW.js} +4 -4
  15. package/dist/{Settlement-Cme1wMB-.js → Settlement-TT5-yT7m.js} +5 -5
  16. package/dist/{SettlementTransactions-DD285bSJ.js → SettlementTransactions-COjlsFX-.js} +4 -4
  17. package/dist/{SettlementTransactions-3F4EOoyz.js → SettlementTransactions-Cd0zM7MD.js} +4 -4
  18. package/dist/{Status.vue_vue_type_script_setup_true_lang-CUnCf_fx.js → Status.vue_vue_type_script_setup_true_lang-C0vazu3N.js} +1 -1
  19. package/dist/{Terminal-CK6ULW6U.js → Terminal-Chq-Kp8B.js} +6 -6
  20. package/dist/{TerminalSetting-CEQG3OV6.js → TerminalSetting-CZv6obZH.js} +887 -712
  21. package/dist/{TextInputDialog.vue_vue_type_script_setup_true_lang-BvGYVca0.js → TextInputDialog.vue_vue_type_script_setup_true_lang-D8W8_SO2.js} +1 -1
  22. package/dist/Transaction-BLooVLyD.js +507 -0
  23. package/dist/{Transaction-DjzWqLtN.js → Transaction-BoFiQSqu.js} +99 -102
  24. package/dist/TransactionOld-BGf-ROT_.js +313 -0
  25. package/dist/api/onboard-submission/index.d.ts +3 -1
  26. package/dist/api/terminal/index.d.ts +1 -0
  27. package/dist/app-B4Scdw84.js +9185 -0
  28. package/dist/app.d.ts +96 -1
  29. package/dist/app.js +5 -4
  30. package/dist/{assets-DIbq1BVX.js → assets-Bqo86swf.js} +81 -79
  31. package/dist/composable/async-poller/index.d.ts +22 -0
  32. package/dist/{grafana-B0iQmK6j.js → grafana-DpTMPSvF.js} +1 -1
  33. package/dist/{index-B0L21J1j.js → index-A5VPgbH5.js} +1 -1
  34. package/dist/{index-BkQ7t3F6.js → index-Bga288jX.js} +1 -1
  35. package/dist/{index-BHCs_NnD.js → index-C0KJhQjz.js} +1 -1
  36. package/dist/{index-CnN_MV2-.js → index-C4nXco1m.js} +24 -9
  37. package/dist/{index-C80a7-Ks.js → index-CU0pfEVD.js} +1 -1
  38. package/dist/{index-CxnWUe_K.js → index-CuktSZEC.js} +3 -3
  39. package/dist/{index-D0j1LZAB.js → index-DNKuiv7L.js} +9430 -9267
  40. package/dist/{index-C_Y5Sfc9.js → index-GF2nlppI.js} +1 -1
  41. package/dist/index-JP_7k-Ja.js +63 -0
  42. package/dist/index-MdV54cWO.js +58 -0
  43. package/dist/{index.vue_vue_type_script_setup_true_lang-BksGFeSf.js → index.vue_vue_type_script_setup_true_lang-Cs_vaAfF.js} +1 -1
  44. package/dist/main.d.ts +1 -0
  45. package/dist/model/payout-account.d.ts +2 -2
  46. package/dist/package.json +4 -3
  47. package/dist/{payout-account-B7OikYn5.js → payout-account-Bklp9Lrq.js} +37 -37
  48. package/dist/stores/payoutAccount.d.ts +44 -34
  49. package/dist/tsconfig.app.tsbuildinfo +1 -1
  50. package/dist/tyro-BovmsorS.js +5 -0
  51. package/dist/utils/permission.d.ts +1 -0
  52. package/dist/{validator-CTlVogBQ.js → validator-DzjyJnvv.js} +0 -1
  53. package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +16 -16
  54. package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +16 -16
  55. package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +81 -0
  56. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +44 -34
  57. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +64 -54
  58. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +64 -54
  59. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +44 -34
  60. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +44 -43
  61. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +64 -54
  62. package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
  63. package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
  64. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
  65. package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +4 -4
  66. package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
  67. package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +39 -0
  68. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  69. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  70. package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
  71. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
  72. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
  73. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +4 -4
  74. package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
  75. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
  76. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
  77. package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
  78. package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +48 -0
  79. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
  80. package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -4
  81. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +24 -24
  82. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
  83. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +2 -2
  84. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
  85. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +2 -2
  86. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +2 -2
  87. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +4 -4
  88. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +2 -2
  89. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +2 -2
  90. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +2 -2
  91. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +2 -2
  92. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +2 -2
  93. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +2 -2
  94. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +2 -2
  95. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +2 -2
  96. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +2 -2
  97. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +2 -2
  98. package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +2 -2
  99. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +2 -2
  100. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +2 -2
  101. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +2 -2
  102. package/dist/views/admin/terminal/tabs/useTyroSoftposGateway.d.ts +12 -0
  103. package/dist/views/onboard-submission/tyro-submission-polling.d.ts +27 -0
  104. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +88 -68
  105. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +84 -84
  106. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +42 -42
  107. package/dist/views/settlement/SettlementTable.vue.d.ts +24 -24
  108. package/dist/views/transaction/TransactionTable.vue.d.ts +2 -2
  109. package/package.json +4 -3
  110. package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-KebV8Zws.js +0 -94
  111. package/dist/Forbidden-1aaq-Ilm.js +0 -38
  112. package/dist/OnboardSubmission-DvWwQFy6.js +0 -222
  113. package/dist/PayoutAccountSetting-DzzABgzs.js +0 -1765
  114. package/dist/Transaction-D-Z3zRd7.js +0 -517
  115. package/dist/TransactionOld-BXjA15Dd.js +0 -314
  116. package/dist/app-CEy5Ojtg.js +0 -7661
  117. package/dist/index-XTdSN6CV.js +0 -60
  118. package/dist/softspace-D9cEyOQT.js +0 -4
  119. package/dist/views/admin/payout-account/tabs/SettlementEditDialog.vue.d.ts +0 -56
@@ -1,517 +0,0 @@
1
- import { defineComponent as G, ref as C, watch as V, onMounted as H, resolveComponent as h, unref as n, openBlock as P, createBlock as w, createElementBlock as O, createVNode as y, withCtx as B, createElementVNode as F, Fragment as W, renderList as X, createTextVNode as Z, toDisplayString as ee, onBeforeUnmount as te, isRef as D, h as x } from "vue";
2
- import { t as U } from "./index-BHCs_NnD.js";
3
- import { h as z } from "./moment-h96o7c8I.js";
4
- import { useI18n as J, useCoreStore as Q } from "@feedmepos/mf-common";
5
- import { _ as ae } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
- import { t as ne, b as re, _ as oe } from "./assets-DIbq1BVX.js";
7
- import { u as se } from "./index-BkQ7t3F6.js";
8
- import { _ as le } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
9
- import { _ as ie } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
10
- import { _ as ce } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
11
- import { p as ue } from "./index-C80a7-Ks.js";
12
- import { t as me } from "./index-XTdSN6CV.js";
13
- import { u as de, p as R } from "./index-D0j1LZAB.js";
14
- import { useSnackbar as pe, useDialog as ye } from "@feedmepos/ui-library";
15
- import { _ as fe, a as _e, b as ge } from "./Actions.vue_vue_type_script_setup_true_lang-D_PoXVbz.js";
16
- import { g as ve } from "./grafana-B0iQmK6j.js";
17
- import { w as j } from "./Modal-DB8M9o1T.js";
18
- import { u as q } from "./error-K1CakhA9.js";
19
- import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-BksGFeSf.js";
20
- import { u as Te, a as he } from "./index-BwdnN4a2.js";
21
- const Ae = {
22
- key: 1,
23
- class: "inline-flex"
24
- }, Se = { class: "relative" }, Ne = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, Ee = /* @__PURE__ */ G({
25
- __name: "SourceSelector",
26
- props: {
27
- id: {},
28
- by: {},
29
- excludePayoutAccount: { type: Boolean },
30
- excludeOrderingPayoutAccount: { type: Boolean },
31
- excludeMarketingPayoutAccount: { type: Boolean },
32
- excludeRestaurant: { type: Boolean },
33
- excludeDevice: { type: Boolean }
34
- },
35
- emits: ["update:id", "update:by"],
36
- setup(M, { emit: f }) {
37
- const g = M, m = f, { t: r } = J(), { currentBusiness: K, readRestaurants: b } = Q(), { isLoading: d, startAsyncCall: v } = de(!0), p = C([]), u = C(), _ = C(""), T = C([]);
38
- let A;
39
- V(_, async () => {
40
- A && clearTimeout(A), A = setTimeout(() => {
41
- var l = new RegExp(_.value, "i");
42
- T.value = p.value.filter((o) => {
43
- const a = JSON.stringify(o);
44
- return l.test(a);
45
- });
46
- }, 700);
47
- }), V(u, () => {
48
- var l, o;
49
- m("update:id", (l = u.value) == null ? void 0 : l.value), m("update:by", (o = u.value) == null ? void 0 : o.by);
50
- });
51
- async function L() {
52
- return v(async () => {
53
- try {
54
- let l = await ue.readBusinessPayoutAccounts();
55
- return l.length === 0 ? [] : l;
56
- } catch {
57
- return [];
58
- }
59
- });
60
- }
61
- async function Y() {
62
- return v(async () => {
63
- try {
64
- let l = await me.getBusinessTerminals();
65
- return l.length === 0 ? [] : l;
66
- } catch {
67
- return [];
68
- }
69
- });
70
- }
71
- async function k() {
72
- d.value = !0;
73
- const l = [];
74
- if (!g.excludePayoutAccount) {
75
- let o = await L();
76
- g.excludeMarketingPayoutAccount && (o = o == null ? void 0 : o.filter((a) => a.store.event !== "MARKETING")), g.excludeOrderingPayoutAccount && (o = o == null ? void 0 : o.filter((a) => a.store.event !== "ORDERING")), l.push(
77
- ...(o || []).map((a) => {
78
- var I, S, N, E;
79
- return {
80
- by: "PAYOUT_ACCOUNT",
81
- value: a._id,
82
- prefix: r("payment.components.payout_account"),
83
- type: "Payout Account - " + a.store.event,
84
- label: ((S = (I = a.ref) == null ? void 0 : I.profile) == null ? void 0 : S.name) ?? a.ref.name,
85
- chipLabel: "Payout Account: " + (((E = (N = a.ref) == null ? void 0 : N.profile) == null ? void 0 : E.name) ?? a.ref.name)
86
- };
87
- })
88
- );
89
- }
90
- if (!g.excludeRestaurant) {
91
- const o = await b();
92
- l.push(
93
- ...(o || []).map((a) => ({
94
- by: "RESTAURANT",
95
- value: a._id,
96
- prefix: r("payment.components.restaurant"),
97
- type: "Restaurant",
98
- label: a.profile.name + " (" + (a.profile.code ?? "--") + ")",
99
- chipLabel: "Restaurant: " + a.profile.name + " (" + (a.profile.code ?? "--") + ")"
100
- }))
101
- );
102
- }
103
- if (!g.excludeDevice) {
104
- const o = await Y();
105
- l.push(
106
- ...(o || []).map((a) => ({
107
- by: "DEVICE",
108
- value: a._id,
109
- prefix: r("payment.components.device"),
110
- type: "Device - " + a.deviceType,
111
- label: a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name,
112
- chipLabel: a.deviceType + ": " + (a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name)
113
- }))
114
- );
115
- }
116
- p.value = l, T.value = p.value, d.value = !1;
117
- }
118
- return H(k), V(K, k), (l, o) => {
119
- const a = h("FmCircularProgress"), I = h("FmChip"), S = h("FmSearch"), N = h("FmMenuItem"), E = h("FmMenu");
120
- return n(d) ? (P(), w(a, {
121
- key: 0,
122
- size: "md"
123
- })) : (P(), O("div", Ae, [
124
- y(E, { "close-on-click": !0 }, {
125
- "menu-button": B(() => {
126
- var e;
127
- return [
128
- y(I, {
129
- icon: "account_box",
130
- label: ((e = u.value) == null ? void 0 : e.chipLabel) ?? n(r)("payment.components.select"),
131
- removable: !!u.value,
132
- onChipClosed: o[0] || (o[0] = (t) => u.value = void 0)
133
- }, null, 8, ["label", "removable"])
134
- ];
135
- }),
136
- default: B(() => [
137
- F("div", Se, [
138
- F("div", Ne, [
139
- y(S, {
140
- "model-value": _.value,
141
- "onUpdate:modelValue": o[1] || (o[1] = (e) => _.value = e),
142
- placeholder: n(r)("payment.components.select")
143
- }, null, 8, ["model-value", "placeholder"])
144
- ]),
145
- F("div", null, [
146
- (P(!0), O(W, null, X(T.value, (e) => (P(), w(N, {
147
- key: e.value,
148
- label: e.label,
149
- sublabel: e.type,
150
- onClick: () => u.value = e
151
- }, null, 8, ["label", "sublabel", "onClick"]))), 128))
152
- ])
153
- ])
154
- ]),
155
- _: 1
156
- })
157
- ]));
158
- };
159
- }
160
- }), Fe = { class: "flex items-center gap-1" }, Ie = /* @__PURE__ */ G({
161
- __name: "BillSeqNumber",
162
- props: {
163
- row: {},
164
- data: {}
165
- },
166
- setup(M) {
167
- return (f, g) => {
168
- const m = h("FmIcon");
169
- return P(), O("span", Fe, [
170
- Z(ee(M.row.original.seqNumber) + " ", 1),
171
- y(m, {
172
- size: "md",
173
- name: "check",
174
- color: "#16a34a"
175
- })
176
- ]);
177
- };
178
- }
179
- }), De = { class: "flex justify-between mb-6 items-center" }, xe = { class: "flex space-x-8 items-start" }, Re = { class: "flex space-x-4 self-center" }, Ce = { class: "flex space-x-12 mb-6" }, Xe = /* @__PURE__ */ G({
180
- __name: "Transaction",
181
- setup(M) {
182
- var N, E;
183
- const f = pe(), g = ye(), { sessionUser: m } = Q(), { t: r } = J(), { getBillLink: K } = he(), b = C(), { dateRange: d, searchKey: v, status: p, id: u, by: _ } = se({
184
- by: "",
185
- id: "",
186
- searchKey: "",
187
- status: [R.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
188
- dateRange: {
189
- startDate: z().startOf("day").format("YYYY-MM-DD"),
190
- endDate: z().endOf("day").format("YYYY-MM-DD")
191
- }
192
- });
193
- let T;
194
- const A = () => {
195
- T && (clearTimeout(T), T = void 0);
196
- }, {
197
- promptSuggestion: L,
198
- closeSuggestion: Y
199
- } = Te({
200
- searchKey: v,
201
- dateRange: d,
202
- onBeforeApply: A
203
- });
204
- V(v, () => {
205
- A(), L(), T = setTimeout(() => {
206
- var e;
207
- return (e = b.value) == null ? void 0 : e.reset();
208
- }, 700);
209
- }), V([d, p, u, _], () => {
210
- var e;
211
- (e = b.value) == null || e.reset();
212
- }), te(() => {
213
- A(), Y();
214
- });
215
- const k = [
216
- {
217
- label: "Success",
218
- value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
219
- },
220
- {
221
- label: "Refunded",
222
- value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
223
- },
224
- {
225
- label: "Process",
226
- value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
227
- },
228
- {
229
- label: "Pending Settlement",
230
- value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
231
- },
232
- {
233
- label: "Failed",
234
- value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
235
- }
236
- ];
237
- async function l(e, t) {
238
- var s;
239
- try {
240
- const c = await U.refetchTransaction({
241
- transactionId: e.id
242
- });
243
- (s = b.value) == null || s.replaceData(t, c), f.open({
244
- type: "success",
245
- title: "Transaction queried and updated successfully."
246
- });
247
- } catch (c) {
248
- f.open({
249
- type: "error",
250
- title: "Fail to query transaction.",
251
- message: q(c)
252
- });
253
- }
254
- }
255
- async function o(e, t) {
256
- j(
257
- g,
258
- "Refund Transaction",
259
- "Are you sure to refund transaction? This action cannot be revert!",
260
- async () => {
261
- var s;
262
- try {
263
- const c = await U.refundTransaction({
264
- transactionId: e.id,
265
- reason: "portal transaction refund",
266
- amount: e.fdoAmount
267
- });
268
- (s = b.value) == null || s.replaceData(t, c), f.open({
269
- type: "success",
270
- title: "Transaction refund request initiated."
271
- });
272
- } catch (c) {
273
- f.open({
274
- type: "error",
275
- title: "Fail to request refund transaction.",
276
- message: q(c)
277
- });
278
- }
279
- }
280
- );
281
- }
282
- async function a(e, t) {
283
- j(
284
- g,
285
- "Notify Transaction",
286
- "Are you sure to perform notify transaction?",
287
- async () => {
288
- try {
289
- await U.renotifyTransaction(e.id), f.open({
290
- type: "success",
291
- title: "Transaction notify successfully."
292
- });
293
- } catch (s) {
294
- f.open({
295
- type: "error",
296
- title: "Fail to notify transaction.",
297
- message: q(s)
298
- });
299
- }
300
- }
301
- );
302
- }
303
- async function I(e, t) {
304
- const s = ve(
305
- [
306
- {
307
- type: "span",
308
- queryKey: "transaction.id",
309
- queryValue: e.id
310
- }
311
- ],
312
- e.transactionAt
313
- );
314
- window.open(s, "_blank");
315
- }
316
- C("");
317
- const S = [
318
- {
319
- header: () => r("payment.transactions.table.id"),
320
- accessorKey: "id",
321
- cell: ({ cell: e, row: t }) => {
322
- var s, c;
323
- return ((s = m.value) != null && s.role.isStaff || (c = m.value) != null && c.role.isAdmin) && t.original.transactionId ? t.original.id + `
324
- ID: ` + t.original.transactionId : t.original.id;
325
- }
326
- },
327
- {
328
- header: () => r("payment.transactions.table.pay_id"),
329
- accessorKey: "payId",
330
- cell: ({ cell: e, row: t }) => {
331
- const s = K(t.original);
332
- return s ? x(
333
- "a",
334
- {
335
- href: s,
336
- class: "text-blue-600 underline"
337
- },
338
- e.getValue()
339
- ) : e.getValue();
340
- }
341
- },
342
- {
343
- header: () => r("payment.transactions.table.gateway_id"),
344
- accessorKey: "gatewayTransactionId"
345
- },
346
- {
347
- header: () => r("payment.transactions.table.bill_seq"),
348
- accessorKey: "seqNumber",
349
- cell: ({ cell: e, row: t }) => t.original.seqNumberBinded ? x(Ie, { row: t, data: e.getValue() }) : t.original.seqNumber
350
- },
351
- {
352
- header: () => r("payment.transactions.table.gateway"),
353
- accessorKey: "gateway",
354
- meta: {
355
- textAlign: "center"
356
- },
357
- cell: ({ cell: e, row: t }) => t.original.gateway ? x(fe, { row: t, data: e.getValue() }) : ""
358
- },
359
- {
360
- header: () => r("payment.transactions.table.method"),
361
- accessorKey: "method",
362
- meta: {
363
- textAlign: "center"
364
- },
365
- cell: ({ cell: e, row: t }) => t.original.method ? x(_e, { row: t, data: e.getValue() }) : ""
366
- },
367
- {
368
- header: () => r("payment.transactions.table.type"),
369
- accessorKey: "payFor",
370
- meta: {
371
- textAlign: "center"
372
- }
373
- },
374
- {
375
- header: () => r("payment.transactions.table.status"),
376
- accessorKey: "status",
377
- cell: ({ cell: e }) => x(oe, { data: e.getValue() })
378
- },
379
- {
380
- header: () => r("payment.transactions.table.restaurant"),
381
- accessorKey: "restaurantId"
382
- },
383
- {
384
- header: () => r("payment.transactions.table.source"),
385
- accessorKey: "source",
386
- cell: ({ cell: e, row: t }) => `(${t.original.sourceType}) ${t.original.source}`
387
- },
388
- {
389
- header: () => r("payment.transactions.table.transaction_at"),
390
- accessorKey: "transactionAt",
391
- meta: {
392
- width: "180px"
393
- },
394
- cell: ({ cell: e, row: t }) => t.original.status === "REFUNDED" ? t.original.refundedAt : t.original.transactionAt
395
- },
396
- {
397
- header: () => r("payment.transactions.table.sales_amount"),
398
- accessorKey: "amount",
399
- cell: ({ cell: e, row: t }) => {
400
- var s, c;
401
- return ((s = m.value) != null && s.role.isStaff || (c = m.value) != null && c.role.isAdmin) && t.original.flags.isDelivery ? t.original.amount + "( " + t.original.gatewayAmount + ")" : t.original.amount;
402
- }
403
- }
404
- ];
405
- return ((N = m.value) != null && N.role.isStaff || (E = m.value) != null && E.role.isAdmin) && S.push({
406
- header: () => r("payment.transactions.table.actions"),
407
- accessorKey: "actions",
408
- cell: ({ row: e }) => x(ge, {
409
- transaction: e.original,
410
- onAction: (t) => {
411
- var s;
412
- switch (t) {
413
- case "notify":
414
- return a(e.original, e.index);
415
- case "query":
416
- return l(e.original, e.index);
417
- case "refund":
418
- return (s = m.value) != null && s.role.isStaff ? f.open({
419
- type: "error",
420
- title: "You are not allowed to refund transaction."
421
- }) : o(e.original, e.index);
422
- case "history":
423
- return I(e.original, e.index);
424
- }
425
- }
426
- })
427
- }), (e, t) => {
428
- const s = h("FmSearch"), c = h("FmSelect");
429
- return P(), w(ae, {
430
- title: n(r)("payment.transactions.title"),
431
- description: n(r)("payment.transactions.description"),
432
- loading: !1
433
- }, {
434
- default: B(() => [
435
- F("div", De, [
436
- F("div", xe, [
437
- y(s, {
438
- "model-value": n(v),
439
- "onUpdate:modelValue": t[0] || (t[0] = (i) => D(v) ? v.value = i : null),
440
- class: "mr-8",
441
- label: n(r)("payment.transactions.search.title"),
442
- placeholder: n(r)("payment.transactions.search.placeholder")
443
- }, null, 8, ["model-value", "label", "placeholder"]),
444
- y(c, {
445
- modelValue: n(p),
446
- "onUpdate:modelValue": t[2] || (t[2] = (i) => D(p) ? p.value = i : null),
447
- class: "mr-6 w-[300px]",
448
- label: n(r)("payment.transactions.status"),
449
- "label-mark": "required",
450
- multiselect: "",
451
- items: k
452
- }, {
453
- "prepend-menu": B(() => [
454
- y(ie, {
455
- modelValue: n(p),
456
- "onUpdate:modelValue": t[1] || (t[1] = (i) => D(p) ? p.value = i : null),
457
- items: k
458
- }, null, 8, ["modelValue"])
459
- ]),
460
- _: 1
461
- }, 8, ["modelValue", "label"])
462
- ]),
463
- F("div", Re, [
464
- y(le, {
465
- button: {
466
- appendIcon: "file_download",
467
- variant: "primary",
468
- label: n(r)("payment.transactions.button.export")
469
- },
470
- handler: async () => {
471
- var $;
472
- const i = await (($ = b.value) == null ? void 0 : $.allData());
473
- i != null && await n(U).downloadPortalTransactionReport(
474
- n(d),
475
- n(ne)(i)
476
- );
477
- }
478
- }, null, 8, ["button", "handler"])
479
- ])
480
- ]),
481
- F("div", Ce, [
482
- y(Ee, {
483
- id: n(u),
484
- "onUpdate:id": t[3] || (t[3] = (i) => D(u) ? u.value = i : null),
485
- by: n(_),
486
- "onUpdate:by": t[4] || (t[4] = (i) => D(_) ? _.value = i : null)
487
- }, null, 8, ["id", "by"]),
488
- y(ce, {
489
- modelValue: n(d),
490
- "onUpdate:modelValue": t[5] || (t[5] = (i) => D(d) ? d.value = i : null)
491
- }, null, 8, ["modelValue"])
492
- ]),
493
- y(be, {
494
- ref_key: "controller",
495
- ref: b,
496
- "column-defs": S,
497
- "rows-defs": n(re),
498
- paginate: (i, $) => n(U).readTransactionsV2({
499
- limit: i,
500
- cursor: $,
501
- status: n(p),
502
- by: n(_),
503
- id: n(u),
504
- search: n(v),
505
- start: n(d).startDate,
506
- end: n(d).endDate
507
- })
508
- }, null, 8, ["rows-defs", "paginate"])
509
- ]),
510
- _: 1
511
- }, 8, ["title", "description"]);
512
- };
513
- }
514
- });
515
- export {
516
- Xe as default
517
- };