@feedmepos/mf-payment 0.0.0-beta.14 → 0.0.0-beta.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{PayoutAccount-DuqITwjB.js → PayoutAccount-NNigMHF9.js} +5 -5
- package/dist/{PayoutAccount-BHwKD9si.js → PayoutAccount-nJzdU1ip.js} +3 -3
- package/dist/PayoutAccountSetting-uiFglxyj.js +702 -0
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js +33 -0
- package/dist/{Settlement-Dr6Rmkid.js → Settlement-DLFEvFiY.js} +3 -3
- package/dist/{Settlement-JkH7-Wd_.js → Settlement-DuT2FxzJ.js} +28 -26
- package/dist/{SettlementTransactions-CSz0G9iE.js → SettlementTransactions--BvqHEHi.js} +110 -116
- package/dist/{SettlementTransactions-BGfDReId.js → SettlementTransactions-BQpqcrAK.js} +99 -105
- package/dist/{Terminal-DQqtUzV2.js → Terminal-C6ns-w6k.js} +4 -4
- package/dist/{TerminalSetting-T0Sxq_z0.js → TerminalSetting-Dditd6yX.js} +3 -3
- package/dist/{TerminalTransaction-C0g2mMBJ.js → TerminalTransaction-DOfM8pcb.js} +61 -69
- package/dist/TerminalTransaction-Ln59u2GT.js +230 -0
- package/dist/Transaction-CHHwlo39.js +242 -0
- package/dist/Transaction-CkRaGtkz.js +243 -0
- package/dist/api/pagination.d.ts +20 -0
- package/dist/api/payment-gateway/index.d.ts +9 -0
- package/dist/api/terminal-transaction/index.d.ts +8 -0
- package/dist/app.js +56 -48
- package/dist/{assets-nIQ0r4oP.js → assets-DB7pg43Y.js} +1 -1
- package/dist/components/RestaurantSelector.vue.d.ts +2 -0
- package/dist/{index-CxYMbN69.js → index-7_iwp3ZF.js} +1 -1
- package/dist/{index-DflgpHga.js → index-BBTjdV3w.js} +2 -2
- package/dist/{index-CIIojtd5.js → index-Bboaan5m.js} +1 -1
- package/dist/{index-DhPhiNvt.js → index-BuCL5h0R.js} +1 -1
- package/dist/index-CEGydext.js +20 -0
- package/dist/{index-DqQBDo_Y.js → index-DIT7Btp7.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CcY9Uu6G.js → index.vue_vue_type_script_setup_true_lang-CcT6hjAl.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-FNZygqj-.js → payout-account-CqrgAP5S.js} +191 -191
- package/dist/{transaction-B4rEbejx.js → transaction-CSqbF07L.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +81 -0
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +56 -0
- package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +52 -0
- package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +2 -0
- package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +9 -0
- package/dist/views/terminal-transaction/cell/Status.vue.d.ts +9 -0
- package/package.json +1 -1
- package/dist/PayoutAccountSetting-cOThY31e.js +0 -425
- package/dist/Transaction-BKBh8jOT.js +0 -249
- package/dist/Transaction-DVS8SkBi.js +0 -247
@@ -1,68 +1,62 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { e as E, u as
|
1
|
+
import { defineComponent as T, resolveComponent as g, openBlock as F, createBlock as P, normalizeClass as z, withCtx as l, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as c, ref as _, onMounted as G, watch as $, createVNode as a, createTextVNode as i, h as C } from "vue";
|
2
|
+
import { e as E, u as j } from "./index-BBTjdV3w.js";
|
3
3
|
import "@feedmepos/ui-library";
|
4
|
-
import { d as
|
5
|
-
import { g as
|
6
|
-
import { t as
|
7
|
-
import { _ as
|
8
|
-
import { useRouter as
|
9
|
-
import { s as
|
10
|
-
import { useCoreStore as
|
11
|
-
const
|
4
|
+
import { d as h } from "./dinero-CIVmXLL-.js";
|
5
|
+
import { g as Y, a as H } from "./assets-DB7pg43Y.js";
|
6
|
+
import { t as q, a as J } from "./transaction-CSqbF07L.js";
|
7
|
+
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
8
|
+
import { useRouter as W } from "vue-router";
|
9
|
+
import { s as X } from "./index-BuCL5h0R.js";
|
10
|
+
import { useCoreStore as Z } from "@feedmepos/mf-common";
|
11
|
+
const ee = /* @__PURE__ */ T({
|
12
12
|
__name: "Status",
|
13
13
|
props: {
|
14
14
|
row: {},
|
15
15
|
data: {}
|
16
16
|
},
|
17
|
-
setup(
|
18
|
-
const o =
|
19
|
-
function
|
17
|
+
setup(y) {
|
18
|
+
const o = y;
|
19
|
+
function p() {
|
20
20
|
return o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
21
21
|
}
|
22
|
-
return (
|
23
|
-
const
|
24
|
-
return
|
22
|
+
return (S, B) => {
|
23
|
+
const w = g("FmBadge");
|
24
|
+
return F(), P(w, {
|
25
25
|
inline: "",
|
26
|
-
class:
|
26
|
+
class: z(p())
|
27
27
|
}, {
|
28
|
-
default:
|
29
|
-
t("div", null, u(
|
28
|
+
default: l(() => [
|
29
|
+
t("div", null, u(S.data), 1)
|
30
30
|
]),
|
31
31
|
_: 1
|
32
32
|
}, 8, ["class"]);
|
33
33
|
};
|
34
34
|
}
|
35
|
-
}),
|
35
|
+
}), te = ["src"], ae = /* @__PURE__ */ T({
|
36
36
|
__name: "Gateway",
|
37
37
|
props: {
|
38
38
|
row: {},
|
39
39
|
data: {}
|
40
40
|
},
|
41
|
-
setup(
|
42
|
-
return (o,
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
class: "mr-2 border-transparent w-[32px] h-[32px]"
|
47
|
-
}, null, 8, ["src"]);
|
48
|
-
};
|
41
|
+
setup(y) {
|
42
|
+
return (o, p) => (F(), L("img", {
|
43
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
44
|
+
src: c(Y)(o.row.original.gateway)
|
45
|
+
}, null, 8, te));
|
49
46
|
}
|
50
|
-
}),
|
47
|
+
}), ne = ["src"], re = /* @__PURE__ */ T({
|
51
48
|
__name: "Method",
|
52
49
|
props: {
|
53
50
|
row: {},
|
54
51
|
data: {}
|
55
52
|
},
|
56
|
-
setup(
|
57
|
-
return (o,
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
class: "mr-2 border-transparent w-[32px] h-[32px]"
|
62
|
-
}, null, 8, ["src"]);
|
63
|
-
};
|
53
|
+
setup(y) {
|
54
|
+
return (o, p) => (F(), L("img", {
|
55
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
56
|
+
src: c(H)(o.row.original.method.issuer)
|
57
|
+
}, null, 8, ne));
|
64
58
|
}
|
65
|
-
}),
|
59
|
+
}), le = { class: "flex mb-6" }, oe = { class: "my-6 w-[240px]" }, ve = /* @__PURE__ */ T({
|
66
60
|
__name: "SettlementTransactions",
|
67
61
|
props: {
|
68
62
|
settlementId: {
|
@@ -70,20 +64,20 @@ const Z = /* @__PURE__ */ F({
|
|
70
64
|
required: !0
|
71
65
|
}
|
72
66
|
},
|
73
|
-
setup(
|
74
|
-
const o =
|
67
|
+
setup(y) {
|
68
|
+
const o = y, { isLoading: p, startAsyncCall: S } = j(!0), { currentRestaurant: B } = Z(), w = W(), s = _(), x = _([]), N = _([]);
|
75
69
|
async function O(n = !1) {
|
76
|
-
|
77
|
-
n || (s.value = await
|
78
|
-
const e = await
|
79
|
-
x.value =
|
70
|
+
S(async () => {
|
71
|
+
n || (s.value = await X.readRestaurantSettlementById(o.settlementId));
|
72
|
+
const e = await q.readRestaurantTransactionsBySettlementId(o.settlementId);
|
73
|
+
x.value = J(e), N.value = x.value;
|
80
74
|
});
|
81
75
|
}
|
82
76
|
function k() {
|
83
77
|
O();
|
84
78
|
}
|
85
|
-
|
86
|
-
const
|
79
|
+
G(k), $(B, k);
|
80
|
+
const V = _(""), D = [
|
87
81
|
{
|
88
82
|
header: () => "Transaction ID",
|
89
83
|
accessorKey: "id"
|
@@ -98,7 +92,7 @@ const Z = /* @__PURE__ */ F({
|
|
98
92
|
meta: {
|
99
93
|
textAlign: "center"
|
100
94
|
},
|
101
|
-
cell: ({ cell: n, row: e }) => e.original.method ? C(
|
95
|
+
cell: ({ cell: n, row: e }) => e.original.method ? C(ae, { row: e, data: n.getValue() }) : ""
|
102
96
|
},
|
103
97
|
{
|
104
98
|
header: () => "Method",
|
@@ -106,7 +100,7 @@ const Z = /* @__PURE__ */ F({
|
|
106
100
|
meta: {
|
107
101
|
textAlign: "center"
|
108
102
|
},
|
109
|
-
cell: ({ cell: n, row: e }) => e.original.method ? C(
|
103
|
+
cell: ({ cell: n, row: e }) => e.original.method ? C(re, { row: e, data: n.getValue() }) : ""
|
110
104
|
},
|
111
105
|
{
|
112
106
|
header: () => "Type",
|
@@ -124,7 +118,7 @@ const Z = /* @__PURE__ */ F({
|
|
124
118
|
{
|
125
119
|
header: () => "Status",
|
126
120
|
accessorKey: "status",
|
127
|
-
cell: ({ cell: n, row: e }) => C(
|
121
|
+
cell: ({ cell: n, row: e }) => C(ee, { row: e, data: n.getValue() })
|
128
122
|
},
|
129
123
|
{
|
130
124
|
header: () => "Transaction At",
|
@@ -146,47 +140,47 @@ const Z = /* @__PURE__ */ F({
|
|
146
140
|
accessorKey: "payout"
|
147
141
|
}
|
148
142
|
], v = _("");
|
149
|
-
let
|
150
|
-
return
|
151
|
-
|
143
|
+
let A;
|
144
|
+
return $(v, async () => {
|
145
|
+
A && clearTimeout(A), A = setTimeout(() => {
|
152
146
|
var n = new RegExp(v.value, "i");
|
153
|
-
|
154
|
-
const
|
155
|
-
return n.test(
|
147
|
+
N.value = x.value.filter((e) => {
|
148
|
+
const b = JSON.stringify(e);
|
149
|
+
return n.test(b);
|
156
150
|
});
|
157
151
|
}, 700);
|
158
152
|
}), (n, e) => {
|
159
|
-
var
|
160
|
-
const
|
161
|
-
return
|
162
|
-
title: `Settlement Transactions (${(
|
163
|
-
loading: c(
|
164
|
-
onBack: c(
|
153
|
+
var K;
|
154
|
+
const b = g("FmCardHeader"), f = g("FmCardSection"), I = g("FmCard"), M = g("FmSearch"), U = g("FmTable");
|
155
|
+
return F(), P(Q, {
|
156
|
+
title: `Settlement Transactions (${(K = s.value) == null ? void 0 : K._id})`,
|
157
|
+
loading: c(p),
|
158
|
+
onBack: c(w).back
|
165
159
|
}, {
|
166
|
-
default:
|
167
|
-
t("div",
|
168
|
-
a(
|
160
|
+
default: l(() => [
|
161
|
+
t("div", le, [
|
162
|
+
a(I, {
|
169
163
|
horizontal: "",
|
170
164
|
class: "flex-1 p-6",
|
171
165
|
variant: "elevated"
|
172
166
|
}, {
|
173
|
-
default:
|
174
|
-
a(
|
175
|
-
default:
|
176
|
-
a(
|
167
|
+
default: l(() => [
|
168
|
+
a(f, { class: "flex flex-col gap-16 justify-between" }, {
|
169
|
+
default: l(() => [
|
170
|
+
a(b, {
|
177
171
|
class: "p-0",
|
178
172
|
title: "Transaction Info",
|
179
173
|
subtitle: ""
|
180
174
|
}),
|
181
|
-
a(
|
182
|
-
default:
|
183
|
-
var
|
175
|
+
a(f, { class: "p-0" }, {
|
176
|
+
default: l(() => {
|
177
|
+
var r, d, m, R;
|
184
178
|
return [
|
185
179
|
e[2] || (e[2] = t("b", null, "For", -1)),
|
186
|
-
i(": " + u((
|
180
|
+
i(": " + u((d = (r = s.value) == null ? void 0 : r.store) == null ? void 0 : d.event) + " ", 1),
|
187
181
|
e[3] || (e[3] = t("br", null, null, -1)),
|
188
182
|
e[4] || (e[4] = t("b", null, "Reference", -1)),
|
189
|
-
i(": " + u((
|
183
|
+
i(": " + u((R = (m = s.value) == null ? void 0 : m.store) == null ? void 0 : R.id), 1),
|
190
184
|
e[5] || (e[5] = t("br", null, null, -1)),
|
191
185
|
e[6] || (e[6] = t("b", null, "Transaction", -1)),
|
192
186
|
i(": " + u(x.value.length), 1)
|
@@ -200,31 +194,31 @@ const Z = /* @__PURE__ */ F({
|
|
200
194
|
]),
|
201
195
|
_: 1
|
202
196
|
}),
|
203
|
-
a(
|
197
|
+
a(I, {
|
204
198
|
horizontal: "",
|
205
199
|
class: "flex-1 p-6 mx-6",
|
206
200
|
variant: "elevated"
|
207
201
|
}, {
|
208
|
-
default:
|
209
|
-
a(
|
210
|
-
default:
|
211
|
-
a(
|
202
|
+
default: l(() => [
|
203
|
+
a(f, { class: "flex flex-col gap-16 justify-between" }, {
|
204
|
+
default: l(() => [
|
205
|
+
a(b, {
|
212
206
|
class: "p-0",
|
213
207
|
title: "Bank Info",
|
214
208
|
subtitle: ""
|
215
209
|
}),
|
216
|
-
a(
|
217
|
-
default:
|
218
|
-
var
|
210
|
+
a(f, { class: "p-0" }, {
|
211
|
+
default: l(() => {
|
212
|
+
var r, d, m;
|
219
213
|
return [
|
220
214
|
e[7] || (e[7] = t("b", null, "Bank", -1)),
|
221
|
-
i(": " + u((
|
215
|
+
i(": " + u((r = s.value) == null ? void 0 : r.beneficiaryBank.name), 1),
|
222
216
|
e[8] || (e[8] = t("br", null, null, -1)),
|
223
217
|
e[9] || (e[9] = t("b", null, "Name", -1)),
|
224
|
-
i(": " + u((
|
218
|
+
i(": " + u((d = s.value) == null ? void 0 : d.beneficiaryBank.holderName), 1),
|
225
219
|
e[10] || (e[10] = t("br", null, null, -1)),
|
226
220
|
e[11] || (e[11] = t("b", null, "Number", -1)),
|
227
|
-
i(": " + u((
|
221
|
+
i(": " + u((m = s.value) == null ? void 0 : m.beneficiaryBank.accountNumber), 1)
|
228
222
|
];
|
229
223
|
}),
|
230
224
|
_: 1
|
@@ -235,31 +229,31 @@ const Z = /* @__PURE__ */ F({
|
|
235
229
|
]),
|
236
230
|
_: 1
|
237
231
|
}),
|
238
|
-
a(
|
232
|
+
a(I, {
|
239
233
|
horizontal: "",
|
240
234
|
class: "flex-1 p-6",
|
241
235
|
variant: "elevated"
|
242
236
|
}, {
|
243
|
-
default:
|
244
|
-
a(
|
245
|
-
default:
|
246
|
-
a(
|
237
|
+
default: l(() => [
|
238
|
+
a(f, { class: "flex flex-col gap-16 justify-between" }, {
|
239
|
+
default: l(() => [
|
240
|
+
a(b, {
|
247
241
|
class: "p-0",
|
248
242
|
title: "Payout Info",
|
249
243
|
subtitle: ""
|
250
244
|
}),
|
251
|
-
a(
|
252
|
-
default:
|
253
|
-
var
|
245
|
+
a(f, { class: "p-0" }, {
|
246
|
+
default: l(() => {
|
247
|
+
var r, d, m;
|
254
248
|
return [
|
255
249
|
e[12] || (e[12] = t("b", null, "Amount", -1)),
|
256
|
-
i(": " + u(c(
|
250
|
+
i(": " + u(c(h)((r = s.value) == null ? void 0 : r.totalAmount).toFormat("$0.00")), 1),
|
257
251
|
e[13] || (e[13] = t("br", null, null, -1)),
|
258
252
|
e[14] || (e[14] = t("b", null, "Fee", -1)),
|
259
|
-
i(": " + u(c(
|
253
|
+
i(": " + u(c(h)((d = s.value) == null ? void 0 : d.totalFee).toFormat("$0.00")), 1),
|
260
254
|
e[15] || (e[15] = t("br", null, null, -1)),
|
261
255
|
e[16] || (e[16] = t("b", null, "Payout", -1)),
|
262
|
-
i(": " + u(c(
|
256
|
+
i(": " + u(c(h)((m = s.value) == null ? void 0 : m.totalPayout).toFormat("$0.00")), 1)
|
263
257
|
];
|
264
258
|
}),
|
265
259
|
_: 1
|
@@ -271,20 +265,20 @@ const Z = /* @__PURE__ */ F({
|
|
271
265
|
_: 1
|
272
266
|
})
|
273
267
|
]),
|
274
|
-
t("div",
|
275
|
-
a(
|
268
|
+
t("div", oe, [
|
269
|
+
a(M, {
|
276
270
|
modelValue: v.value,
|
277
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
271
|
+
"onUpdate:modelValue": e[0] || (e[0] = (r) => v.value = r),
|
278
272
|
placeholder: "Search Transactions ..."
|
279
273
|
}, null, 8, ["modelValue"])
|
280
274
|
]),
|
281
|
-
a(
|
282
|
-
modelValue:
|
283
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
275
|
+
a(U, {
|
276
|
+
modelValue: V.value,
|
277
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => V.value = r),
|
284
278
|
"search-value": v.value,
|
285
|
-
"row-data":
|
286
|
-
"column-defs":
|
287
|
-
loading: c(
|
279
|
+
"row-data": N.value,
|
280
|
+
"column-defs": D,
|
281
|
+
loading: c(p)
|
288
282
|
}, null, 8, ["modelValue", "search-value", "row-data", "loading"])
|
289
283
|
]),
|
290
284
|
_: 1
|
@@ -293,5 +287,5 @@ const Z = /* @__PURE__ */ F({
|
|
293
287
|
}
|
294
288
|
});
|
295
289
|
export {
|
296
|
-
|
290
|
+
ve as default
|
297
291
|
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as x, openBlock as m, createElementBlock as $, createTextVNode as N, createElementVNode as k, toDisplayString as U, resolveComponent as c, createBlock as f, normalizeClass as R, withCtx as I, createCommentVNode as F, createVNode as _, ref as b, computed as z, unref as i, watch as P, isRef as Y, h as V } from "vue";
|
2
|
-
import "./index-
|
2
|
+
import "./index-BBTjdV3w.js";
|
3
3
|
import { h as M } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as j } from "./index-
|
5
|
-
import { _ as L } from "./index.vue_vue_type_script_setup_true_lang-
|
4
|
+
import { u as j } from "./index-Bboaan5m.js";
|
5
|
+
import { _ as L } from "./index.vue_vue_type_script_setup_true_lang-CcT6hjAl.js";
|
6
6
|
import { _ as q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
7
|
import { useDialogChild as O, useDialog as Q, useSnackbar as G } from "@feedmepos/ui-library";
|
8
|
-
import { t as w } from "./index-
|
8
|
+
import { t as w } from "./index-7_iwp3ZF.js";
|
9
9
|
import { u as S } from "./error-K1CakhA9.js";
|
10
10
|
import { z as D, a as K } from "./validator-D5jtpt9A.js";
|
11
11
|
import { useCoreStore as H } from "@feedmepos/mf-common";
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as k, openBlock as y, createElementBlock as K, Fragment as C, createElementVNode as s, createTextVNode as w, toDisplayString as F, ref as f, onMounted as T, resolveComponent as c, createBlock as V, withCtx as U, createVNode as d, computed as D, unref as p, isRef as N, resolveDynamicComponent as E, normalizeProps as $, mergeProps as L, createCommentVNode as M } from "vue";
|
2
|
-
import { u as P } from "./index-
|
2
|
+
import { u as P } from "./index-BBTjdV3w.js";
|
3
3
|
import { useRouter as j } from "vue-router";
|
4
|
-
import { t as I } from "./index-
|
4
|
+
import { t as I } from "./index-7_iwp3ZF.js";
|
5
5
|
import { _ as A } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
6
|
-
import { u as O } from "./index-
|
6
|
+
import { u as O } from "./index-Bboaan5m.js";
|
7
7
|
import { useSnackbar as R } from "@feedmepos/ui-library";
|
8
8
|
import { u as z } from "./error-K1CakhA9.js";
|
9
9
|
const G = /* @__PURE__ */ k({
|
@@ -1,77 +1,68 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { c as o
|
3
|
-
import { h as
|
4
|
-
import { u as
|
5
|
-
import { _ as
|
6
|
-
import { _ as
|
1
|
+
import { defineComponent as T, openBlock as g, createElementBlock as E, unref as r, resolveComponent as u, createBlock as x, normalizeClass as v, withCtx as w, createElementVNode as _, toDisplayString as b, ref as D, watch as h, createVNode as m, isRef as f, h as N } from "vue";
|
2
|
+
import { c as o } from "./index-BBTjdV3w.js";
|
3
|
+
import { h as A } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as k } from "./index-Bboaan5m.js";
|
5
|
+
import { _ as K } from "./index.vue_vue_type_script_setup_true_lang-CcT6hjAl.js";
|
6
|
+
import { _ as V } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
|
-
import { g as
|
9
|
-
import {
|
10
|
-
|
8
|
+
import { g as M } from "./assets-DB7pg43Y.js";
|
9
|
+
import { t as B } from "./index-CEGydext.js";
|
10
|
+
import { d as L } from "./dinero-CIVmXLL-.js";
|
11
|
+
import { _ as $ } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
12
|
+
const P = ["src"], U = /* @__PURE__ */ T({
|
11
13
|
__name: "Gateway",
|
12
14
|
props: {
|
13
15
|
row: {},
|
14
16
|
data: {}
|
15
17
|
},
|
16
|
-
setup(
|
17
|
-
return (a, n) => {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
class: "mr-2 border-transparent w-[32px] h-[32px]"
|
22
|
-
}, null, 8, ["src"]);
|
23
|
-
};
|
18
|
+
setup(p) {
|
19
|
+
return (a, n) => (g(), E("img", {
|
20
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
21
|
+
src: r(M)(a.row.original.gateway)
|
22
|
+
}, null, 8, P));
|
24
23
|
}
|
25
|
-
}),
|
24
|
+
}), Y = /* @__PURE__ */ T({
|
26
25
|
__name: "Status",
|
27
26
|
props: {
|
28
27
|
row: {},
|
29
28
|
data: {}
|
30
29
|
},
|
31
|
-
setup(
|
32
|
-
const a =
|
30
|
+
setup(p) {
|
31
|
+
const a = p;
|
33
32
|
function n() {
|
34
33
|
return a.data === o.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === o.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : a.data === o.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
35
34
|
}
|
36
|
-
return (
|
37
|
-
const
|
38
|
-
return g(),
|
35
|
+
return (s, c) => {
|
36
|
+
const i = u("FmBadge");
|
37
|
+
return g(), x(i, {
|
39
38
|
inline: "",
|
40
|
-
class:
|
39
|
+
class: v(n())
|
41
40
|
}, {
|
42
41
|
default: w(() => [
|
43
|
-
_("div", null,
|
42
|
+
_("div", null, b(s.data.toUpperCase()), 1)
|
44
43
|
]),
|
45
44
|
_: 1
|
46
45
|
}, 8, ["class"]);
|
47
46
|
};
|
48
47
|
}
|
49
|
-
}),
|
50
|
-
async readTransactions(i) {
|
51
|
-
return D(
|
52
|
-
await k().get("/payments/terminal-transactions", {
|
53
|
-
params: i
|
54
|
-
})
|
55
|
-
);
|
56
|
-
}
|
57
|
-
}, Y = { class: "flex justify-between mb-6 items-start" }, G = { class: "flex space-x-4 items-start" }, W = { class: "flex space-x-4" }, te = /* @__PURE__ */ A({
|
48
|
+
}), G = { class: "flex justify-between mb-6 items-start" }, W = { class: "flex space-x-8 items-start" }, j = { class: "flex space-x-4" }, re = /* @__PURE__ */ T({
|
58
49
|
__name: "TerminalTransaction",
|
59
|
-
setup(
|
60
|
-
const a =
|
50
|
+
setup(p) {
|
51
|
+
const a = D(), { dateRange: n, status: s, searchKey: c } = k({
|
61
52
|
searchKey: "",
|
62
53
|
status: [o.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
|
63
54
|
dateRange: {
|
64
|
-
startDate:
|
65
|
-
endDate:
|
55
|
+
startDate: A().startOf("day").toISOString(),
|
56
|
+
endDate: A().endOf("day").toISOString()
|
66
57
|
}
|
67
58
|
});
|
68
|
-
|
59
|
+
h([n, s], () => {
|
69
60
|
var e;
|
70
61
|
return (e = a.value) == null ? void 0 : e.reset();
|
71
62
|
});
|
72
|
-
let
|
73
|
-
|
74
|
-
|
63
|
+
let i;
|
64
|
+
h(c, async () => {
|
65
|
+
i && clearTimeout(i), i = setTimeout(
|
75
66
|
() => {
|
76
67
|
var e;
|
77
68
|
return (e = a.value) == null ? void 0 : e.reset();
|
@@ -98,16 +89,16 @@ const P = /* @__PURE__ */ A({
|
|
98
89
|
}
|
99
90
|
], R = function(e) {
|
100
91
|
const t = e;
|
101
|
-
let
|
102
|
-
return t.details.amount && (
|
92
|
+
let d = "-";
|
93
|
+
return t.details.amount && (d = L(t.details.amount).toFormat("$0.00")), {
|
103
94
|
id: e._id,
|
104
95
|
refId: e.refId,
|
105
96
|
owner: e.owner,
|
106
97
|
terminalId: e.terminalId,
|
107
|
-
transactionAt:
|
98
|
+
transactionAt: A(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
|
108
99
|
action: e.action,
|
109
100
|
gateway: e.gateway,
|
110
|
-
amount:
|
101
|
+
amount: d
|
111
102
|
};
|
112
103
|
}, C = [
|
113
104
|
{
|
@@ -131,7 +122,7 @@ const P = /* @__PURE__ */ A({
|
|
131
122
|
textAlign: "center",
|
132
123
|
maxWidth: "128px"
|
133
124
|
},
|
134
|
-
cell: ({ cell: e, row: t }) =>
|
125
|
+
cell: ({ cell: e, row: t }) => N(U, { row: t, data: e.getValue() })
|
135
126
|
},
|
136
127
|
{
|
137
128
|
accessorKey: "action",
|
@@ -140,7 +131,7 @@ const P = /* @__PURE__ */ A({
|
|
140
131
|
textAlign: "left",
|
141
132
|
maxWidth: "128px"
|
142
133
|
},
|
143
|
-
cell: ({ cell: e, row: t }) =>
|
134
|
+
cell: ({ cell: e, row: t }) => N(Y, { row: t, data: e.getValue() })
|
144
135
|
},
|
145
136
|
{
|
146
137
|
accessorKey: "amount",
|
@@ -172,39 +163,40 @@ const P = /* @__PURE__ */ A({
|
|
172
163
|
}
|
173
164
|
];
|
174
165
|
return (e, t) => {
|
175
|
-
const
|
176
|
-
return g(),
|
166
|
+
const d = u("FmSearch"), I = u("FmSelect"), S = u("FmDateRangePicker"), F = u("FmButton");
|
167
|
+
return g(), x(V, {
|
177
168
|
title: "Terminal Transactions",
|
178
169
|
loading: !1
|
179
170
|
}, {
|
180
171
|
default: w(() => [
|
181
|
-
_("div",
|
182
|
-
_("div",
|
183
|
-
|
184
|
-
|
172
|
+
_("div", G, [
|
173
|
+
_("div", W, [
|
174
|
+
m($),
|
175
|
+
m(d, {
|
176
|
+
"model-value": r(c),
|
185
177
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => f(c) ? c.value = l : null),
|
186
178
|
class: "mr-8",
|
187
179
|
label: "Search",
|
188
180
|
placeholder: "Search Transactions ..."
|
189
181
|
}, null, 8, ["model-value"]),
|
190
|
-
|
191
|
-
modelValue: s
|
192
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => f(
|
182
|
+
m(I, {
|
183
|
+
modelValue: r(s),
|
184
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => f(s) ? s.value = l : null),
|
193
185
|
class: "mr-6 w-[300px]",
|
194
186
|
label: "Status",
|
195
187
|
"label-mark": "required",
|
196
188
|
multiselect: "",
|
197
189
|
items: y
|
198
190
|
}, null, 8, ["modelValue"]),
|
199
|
-
|
200
|
-
modelValue:
|
191
|
+
m(S, {
|
192
|
+
modelValue: r(n),
|
201
193
|
"onUpdate:modelValue": t[2] || (t[2] = (l) => f(n) ? n.value = l : null),
|
202
194
|
compare: "",
|
203
195
|
"show-predefined-range": ""
|
204
196
|
}, null, 8, ["modelValue"])
|
205
197
|
]),
|
206
|
-
_("div",
|
207
|
-
|
198
|
+
_("div", j, [
|
199
|
+
m(F, {
|
208
200
|
"append-icon": "file_download",
|
209
201
|
variant: "primary",
|
210
202
|
label: "Export",
|
@@ -213,18 +205,18 @@ const P = /* @__PURE__ */ A({
|
|
213
205
|
})
|
214
206
|
])
|
215
207
|
]),
|
216
|
-
|
208
|
+
m(K, {
|
217
209
|
ref_key: "controller",
|
218
210
|
ref: a,
|
219
211
|
"column-defs": C,
|
220
212
|
"rows-defs": R,
|
221
|
-
paginate: (l,
|
222
|
-
status: s
|
223
|
-
searchKey:
|
213
|
+
paginate: (l, O) => r(B).readRestaurantTransactions({
|
214
|
+
status: r(s),
|
215
|
+
searchKey: r(c),
|
224
216
|
limit: l,
|
225
|
-
cursor:
|
226
|
-
start:
|
227
|
-
end:
|
217
|
+
cursor: O,
|
218
|
+
start: r(n).startDate,
|
219
|
+
end: r(n).endDate
|
228
220
|
}),
|
229
221
|
onRowClick: () => {
|
230
222
|
}
|
@@ -236,5 +228,5 @@ const P = /* @__PURE__ */ A({
|
|
236
228
|
}
|
237
229
|
});
|
238
230
|
export {
|
239
|
-
|
231
|
+
re as default
|
240
232
|
};
|