@feedmepos/mf-payment 0.0.0-beta.22 → 0.0.0-beta.24
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-DWoahPJL.js +28 -0
- package/dist/{PayoutAccount-C3OOz1oi.js → PayoutAccount-BjGdteR8.js} +5 -5
- package/dist/{PayoutAccount-BGSq2B6o.js → PayoutAccount-CdKAjUed.js} +3 -3
- package/dist/{PayoutAccountSetting-WxLdT6mv.js → PayoutAccountSetting-DsqjVlIu.js} +5 -5
- package/dist/{Settlement-CKxNAHAH.js → Settlement-CY0-gXn5.js} +25 -23
- package/dist/{Settlement-DQcrZNvo.js → Settlement-DTE8p3LA.js} +27 -25
- package/dist/{SettlementTransactions-CUG4ePP_.js → SettlementTransactions-BJlBWR1G.js} +4 -4
- package/dist/{SettlementTransactions-V5fjLv7H.js → SettlementTransactions-C4tIk6nO.js} +4 -4
- package/dist/Terminal-C4gOl3zs.js +339 -0
- package/dist/{TerminalSetting-BuAaL5qK.js → TerminalSetting-DC9NBozT.js} +3 -3
- package/dist/{TerminalTransaction-D4c0ivQg.js → TerminalTransaction-BUT01dUv.js} +33 -31
- package/dist/{TerminalTransaction-DbjVvH2P.js → TerminalTransaction-CCdbfxx0.js} +33 -31
- package/dist/{Transaction-h2YrauW3.js → Transaction-60yViCMI.js} +53 -53
- package/dist/{Transaction-MrC2wj9k.js → Transaction-CoCZaBfu.js} +4 -4
- package/dist/api/index.d.ts +1 -0
- package/dist/app.js +13 -13
- package/dist/{assets-Cj6QBVPU.js → assets-BmFExmpA.js} +1 -1
- package/dist/clipboard-4jh1WteU.js +10 -0
- package/dist/components/AutoCopyCell.vue.d.ts +6 -0
- package/dist/{index-DA_XRfnd.js → index-Bvb4T6xz.js} +1 -1
- package/dist/{index-DN6pSWL_.js → index-CDgQhs3k.js} +1 -1
- package/dist/index-DeF94ACV.js +34 -0
- package/dist/{index-C58XD8h3.js → index-Df0izARr.js} +1 -1
- package/dist/{index-DYnNx4du.js → index-Jtghafz6.js} +1 -1
- package/dist/{index-De4-LJjg.js → index-_qikPh5K.js} +766 -766
- package/dist/{index.vue_vue_type_script_setup_true_lang-J6BwjC-p.js → index.vue_vue_type_script_setup_true_lang-CfU6stly.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-BBG-e-NS.js → payout-account-CRgYpkAs.js} +147 -147
- package/dist/{transaction-BmxtNt6_.js → transaction-B5QUg556.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Terminal-C_G_AuJZ.js +0 -318
- package/dist/index-CvMai9eW.js +0 -26
@@ -0,0 +1,339 @@
|
|
1
|
+
import { defineComponent as x, openBlock as d, createElementBlock as I, createTextVNode as N, createElementVNode as h, toDisplayString as $, resolveComponent as m, createVNode as _, normalizeClass as R, withCtx as V, createBlock as g, createCommentVNode as B, ref as k, computed as z, unref as c, watch as Y, isRef as M, h as S } from "vue";
|
2
|
+
import "./index-_qikPh5K.js";
|
3
|
+
import { h as j } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as L } from "./index-Bvb4T6xz.js";
|
5
|
+
import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-CfU6stly.js";
|
6
|
+
import { _ as O } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
|
+
import { useSnackbar as U, useDialogChild as Q, useDialog as G } from "@feedmepos/ui-library";
|
8
|
+
import { t as F } from "./index-Jtghafz6.js";
|
9
|
+
import { c as H } from "./clipboard-4jh1WteU.js";
|
10
|
+
import { u as D } from "./error-K1CakhA9.js";
|
11
|
+
import { z as K, a as P } from "./validator-D5jtpt9A.js";
|
12
|
+
import { useCoreStore as J } from "@feedmepos/mf-common";
|
13
|
+
import { w as W } from "./Modal-DB8M9o1T.js";
|
14
|
+
import { useRouter as X } from "vue-router";
|
15
|
+
const Z = { class: "t-caption" }, ee = { class: "t-h1 my-6 text-center" }, te = /* @__PURE__ */ x({
|
16
|
+
__name: "TerminalBindCodeDialog",
|
17
|
+
props: {
|
18
|
+
code: {
|
19
|
+
type: String,
|
20
|
+
required: !0
|
21
|
+
}
|
22
|
+
},
|
23
|
+
setup(u) {
|
24
|
+
return (n, o) => (d(), I("div", Z, [
|
25
|
+
o[0] || (o[0] = N(" Enter the binding code below on your device to link it with this terminal and apply the configuration. ")),
|
26
|
+
h("div", ee, $(u.code), 1)
|
27
|
+
]));
|
28
|
+
}
|
29
|
+
}), ne = /* @__PURE__ */ x({
|
30
|
+
__name: "ID",
|
31
|
+
props: {
|
32
|
+
row: {},
|
33
|
+
data: {}
|
34
|
+
},
|
35
|
+
setup(u) {
|
36
|
+
const n = u, o = U();
|
37
|
+
function i() {
|
38
|
+
return n.row.original.status === "Active" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
|
39
|
+
}
|
40
|
+
function s() {
|
41
|
+
try {
|
42
|
+
H(n.data), o.open({ title: "Text copied to clipboard." }, 1e3);
|
43
|
+
} catch {
|
44
|
+
o.open({ title: "Clipboard API incompatible." }, 1e3);
|
45
|
+
}
|
46
|
+
n.data;
|
47
|
+
}
|
48
|
+
return (r, a) => {
|
49
|
+
const p = m("FmBadge");
|
50
|
+
return d(), I("div", {
|
51
|
+
onClick: a[0] || (a[0] = (v) => {
|
52
|
+
v.stopPropagation(), s();
|
53
|
+
})
|
54
|
+
}, [
|
55
|
+
_(p, {
|
56
|
+
inline: "",
|
57
|
+
class: R(i())
|
58
|
+
}, {
|
59
|
+
default: V(() => [
|
60
|
+
h("div", null, $(r.data), 1)
|
61
|
+
]),
|
62
|
+
_: 1
|
63
|
+
}, 8, ["class"])
|
64
|
+
]);
|
65
|
+
};
|
66
|
+
}
|
67
|
+
}), oe = { class: "flex" }, ae = /* @__PURE__ */ x({
|
68
|
+
__name: "Actions",
|
69
|
+
props: {
|
70
|
+
data: {}
|
71
|
+
},
|
72
|
+
emits: ["link", "unlink", "edit"],
|
73
|
+
setup(u, { emit: n }) {
|
74
|
+
const o = n;
|
75
|
+
return (i, s) => {
|
76
|
+
const r = m("FmButton");
|
77
|
+
return d(), I("div", oe, [
|
78
|
+
i.data.deviceId ? B("", !0) : (d(), g(r, {
|
79
|
+
key: 0,
|
80
|
+
variant: "plain",
|
81
|
+
"prepend-icon": "link",
|
82
|
+
onClick: s[0] || (s[0] = (a) => {
|
83
|
+
a.stopPropagation(), o("link");
|
84
|
+
})
|
85
|
+
})),
|
86
|
+
i.data.deviceId ? (d(), g(r, {
|
87
|
+
key: 1,
|
88
|
+
variant: "plain",
|
89
|
+
"prepend-icon": "link_off",
|
90
|
+
onClick: s[1] || (s[1] = (a) => {
|
91
|
+
a.stopPropagation(), o("unlink");
|
92
|
+
})
|
93
|
+
})) : B("", !0),
|
94
|
+
_(r, {
|
95
|
+
variant: "plain",
|
96
|
+
"prepend-icon": "edit",
|
97
|
+
onClick: s[2] || (s[2] = (a) => {
|
98
|
+
a.stopPropagation(), o("edit");
|
99
|
+
})
|
100
|
+
})
|
101
|
+
]);
|
102
|
+
};
|
103
|
+
}
|
104
|
+
}), re = /* @__PURE__ */ x({
|
105
|
+
__name: "TerminalDialog",
|
106
|
+
props: {
|
107
|
+
terminal: {
|
108
|
+
type: Object
|
109
|
+
}
|
110
|
+
},
|
111
|
+
setup(u) {
|
112
|
+
var y, T, w;
|
113
|
+
const n = u, o = J(), i = Q(), s = k(), r = k((y = n.terminal) == null ? void 0 : y.name), a = k((T = n.terminal) == null ? void 0 : T.referenceId), p = k(((w = n.terminal) == null ? void 0 : w.status) === "Active"), v = z(() => o.restaurants.value.map((t) => ({
|
114
|
+
label: t.profile.name,
|
115
|
+
value: t._id
|
116
|
+
})));
|
117
|
+
return (t, e) => {
|
118
|
+
const l = m("FmSelect"), b = m("FmTextField"), f = m("FmSwitch"), A = m("FmButton"), E = m("FmForm");
|
119
|
+
return d(), g(E, {
|
120
|
+
ref: s.value,
|
121
|
+
class: "flex flex-col gap-16 mb-6",
|
122
|
+
onValidationSuccess: e[3] || (e[3] = () => {
|
123
|
+
c(i).emitData({ name: r.value, referenceId: a.value, status: p.value ? "Active" : "Inactive" }), c(i).emitAction("primary");
|
124
|
+
})
|
125
|
+
}, {
|
126
|
+
default: V(() => [
|
127
|
+
n.terminal ? B("", !0) : (d(), g(l, {
|
128
|
+
key: 0,
|
129
|
+
modelValue: a.value,
|
130
|
+
"onUpdate:modelValue": e[0] || (e[0] = (C) => a.value = C),
|
131
|
+
label: "Restaurant",
|
132
|
+
items: v.value,
|
133
|
+
rules: c(K)(c(P).string())
|
134
|
+
}, null, 8, ["modelValue", "items", "rules"])),
|
135
|
+
_(b, {
|
136
|
+
modelValue: r.value,
|
137
|
+
"onUpdate:modelValue": e[1] || (e[1] = (C) => r.value = C),
|
138
|
+
label: "Terminal Name",
|
139
|
+
rules: c(K)(c(P).string())
|
140
|
+
}, null, 8, ["modelValue", "rules"]),
|
141
|
+
n.terminal ? (d(), g(f, {
|
142
|
+
key: 1,
|
143
|
+
modelValue: p.value,
|
144
|
+
"onUpdate:modelValue": e[2] || (e[2] = (C) => p.value = C),
|
145
|
+
label: "Status"
|
146
|
+
}, null, 8, ["modelValue"])) : B("", !0),
|
147
|
+
_(A, {
|
148
|
+
type: "submit",
|
149
|
+
label: "Create"
|
150
|
+
})
|
151
|
+
]),
|
152
|
+
_: 1
|
153
|
+
}, 512);
|
154
|
+
};
|
155
|
+
}
|
156
|
+
}), se = { class: "flex justify-between mb-6 items-center" }, ie = { class: "flex space-x-4" }, le = { class: "flex space-x-4" }, xe = /* @__PURE__ */ x({
|
157
|
+
__name: "Terminal",
|
158
|
+
setup(u) {
|
159
|
+
const n = k(), { searchKey: o } = L({
|
160
|
+
searchKey: ""
|
161
|
+
});
|
162
|
+
let i;
|
163
|
+
Y(o, async () => {
|
164
|
+
i && clearTimeout(i), i = setTimeout(
|
165
|
+
() => {
|
166
|
+
var t;
|
167
|
+
return (t = n.value) == null ? void 0 : t.reset();
|
168
|
+
},
|
169
|
+
700
|
170
|
+
);
|
171
|
+
});
|
172
|
+
const s = X(), r = G(), a = U();
|
173
|
+
async function p(t) {
|
174
|
+
W(
|
175
|
+
r,
|
176
|
+
"Terminal Unbind",
|
177
|
+
"Are you sure to unbind terminal from device? This action cannot be revert and device will be logged out!",
|
178
|
+
async () => {
|
179
|
+
var e;
|
180
|
+
try {
|
181
|
+
await F.unbind(t), (e = n.value) == null || e.reset(), a.open({
|
182
|
+
type: "success",
|
183
|
+
message: "Terminal unbind successfully"
|
184
|
+
});
|
185
|
+
} catch (l) {
|
186
|
+
a.open({
|
187
|
+
type: "error",
|
188
|
+
title: "Error occurs when unbind terminal",
|
189
|
+
message: D(l)
|
190
|
+
});
|
191
|
+
}
|
192
|
+
}
|
193
|
+
);
|
194
|
+
}
|
195
|
+
async function v(t) {
|
196
|
+
const e = await F.getBindCode(t);
|
197
|
+
r.open({
|
198
|
+
title: "Terminal Bind Code",
|
199
|
+
closeButton: !0,
|
200
|
+
overlay: !0,
|
201
|
+
contentComponent: te,
|
202
|
+
contentComponentProps: { code: e }
|
203
|
+
});
|
204
|
+
}
|
205
|
+
async function y(t) {
|
206
|
+
r.open({
|
207
|
+
title: t ? "Update Terminal" : "Create New Terminal",
|
208
|
+
closeButton: !0,
|
209
|
+
overlay: !0,
|
210
|
+
contentComponent: re,
|
211
|
+
contentComponentProps: { terminal: t }
|
212
|
+
}).onPrimary(async (e) => {
|
213
|
+
var l;
|
214
|
+
r.close();
|
215
|
+
try {
|
216
|
+
await F.create(e), (l = n.value) == null || l.reset(), a.open({
|
217
|
+
type: "success",
|
218
|
+
message: t ? "Terminal udpated successfully" : "Terminal created successfully."
|
219
|
+
});
|
220
|
+
} catch (b) {
|
221
|
+
a.open({
|
222
|
+
type: "error",
|
223
|
+
title: "Error occurs when create terminal",
|
224
|
+
message: D(b)
|
225
|
+
});
|
226
|
+
}
|
227
|
+
});
|
228
|
+
}
|
229
|
+
const T = function(t) {
|
230
|
+
return {
|
231
|
+
id: t._id,
|
232
|
+
status: t.status,
|
233
|
+
referenceId: t.referenceId,
|
234
|
+
name: t.name,
|
235
|
+
deviceId: t.deviceId,
|
236
|
+
updatedAt: j(t.updatedAt).format("YYYY-MM-DD hh:mm:ss")
|
237
|
+
};
|
238
|
+
}, w = [
|
239
|
+
{
|
240
|
+
accessorKey: "id",
|
241
|
+
header: () => "Terminal ID",
|
242
|
+
meta: {
|
243
|
+
textAlign: "right"
|
244
|
+
},
|
245
|
+
cell: ({ cell: t, row: e }) => S(ne, { row: e, data: t.getValue() })
|
246
|
+
},
|
247
|
+
{
|
248
|
+
accessorKey: "name",
|
249
|
+
header: () => "Name",
|
250
|
+
meta: {
|
251
|
+
textAlign: "left"
|
252
|
+
}
|
253
|
+
},
|
254
|
+
{
|
255
|
+
accessorKey: "referenceId",
|
256
|
+
header: () => "Reference",
|
257
|
+
meta: {
|
258
|
+
textAlign: "left"
|
259
|
+
}
|
260
|
+
},
|
261
|
+
{
|
262
|
+
accessorKey: "deviceId",
|
263
|
+
header: () => "Bound Device Id",
|
264
|
+
meta: {
|
265
|
+
textAlign: "left"
|
266
|
+
}
|
267
|
+
},
|
268
|
+
{
|
269
|
+
accessorKey: "updatedAt",
|
270
|
+
header: () => "Last Updated",
|
271
|
+
meta: {
|
272
|
+
textAlign: "left"
|
273
|
+
}
|
274
|
+
},
|
275
|
+
{
|
276
|
+
accessorKey: "id",
|
277
|
+
header: () => "Actions",
|
278
|
+
meta: {
|
279
|
+
textAlign: "center"
|
280
|
+
},
|
281
|
+
cell: ({ row: t }) => {
|
282
|
+
var l;
|
283
|
+
const e = (l = n.value) == null ? void 0 : l.pageData().at(t.index);
|
284
|
+
return S(ae, {
|
285
|
+
data: e,
|
286
|
+
onLink: () => v(e._id),
|
287
|
+
onUnlink: () => p(e._id),
|
288
|
+
onEdit: () => y(e)
|
289
|
+
});
|
290
|
+
}
|
291
|
+
}
|
292
|
+
];
|
293
|
+
return (t, e) => {
|
294
|
+
const l = m("FmSearch"), b = m("FmButton");
|
295
|
+
return d(), g(O, {
|
296
|
+
title: "Terminals",
|
297
|
+
loading: !1
|
298
|
+
}, {
|
299
|
+
default: V(() => [
|
300
|
+
h("div", se, [
|
301
|
+
h("div", ie, [
|
302
|
+
_(l, {
|
303
|
+
"model-value": c(o),
|
304
|
+
"onUpdate:modelValue": e[0] || (e[0] = (f) => M(o) ? o.value = f : null),
|
305
|
+
class: "mr-8",
|
306
|
+
label: "Search",
|
307
|
+
placeholder: "Search Terminals ..."
|
308
|
+
}, null, 8, ["model-value"])
|
309
|
+
]),
|
310
|
+
h("div", le, [
|
311
|
+
_(b, {
|
312
|
+
label: "Create",
|
313
|
+
icon: "add",
|
314
|
+
onClick: e[1] || (e[1] = () => y())
|
315
|
+
})
|
316
|
+
])
|
317
|
+
]),
|
318
|
+
_(q, {
|
319
|
+
ref_key: "controller",
|
320
|
+
ref: n,
|
321
|
+
"column-defs": w,
|
322
|
+
"rows-defs": T,
|
323
|
+
paginate: (f, A) => c(F).read({ searchKey: c(o), limit: f, cursor: A }),
|
324
|
+
onRowClick: e[2] || (e[2] = (f) => c(s).push({
|
325
|
+
name: "mf-payment-admin.terminal-setting",
|
326
|
+
params: {
|
327
|
+
terminalId: f._id
|
328
|
+
}
|
329
|
+
}))
|
330
|
+
}, null, 8, ["paginate"])
|
331
|
+
]),
|
332
|
+
_: 1
|
333
|
+
});
|
334
|
+
};
|
335
|
+
}
|
336
|
+
});
|
337
|
+
export {
|
338
|
+
xe as default
|
339
|
+
};
|
@@ -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-_qikPh5K.js";
|
3
3
|
import { useRouter as j } from "vue-router";
|
4
|
-
import { t as I } from "./index-
|
4
|
+
import { t as I } from "./index-Jtghafz6.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-Bvb4T6xz.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,29 +1,30 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { c as s } from "./index-
|
3
|
-
import { h as
|
4
|
-
import { u as
|
5
|
-
import { _ as
|
1
|
+
import { defineComponent as h, openBlock as N, createElementBlock as F, unref as r, resolveComponent as d, createBlock as y, normalizeClass as b, withCtx as R, createElementVNode as _, toDisplayString as D, ref as V, watch as A, createVNode as i, isRef as T, h as g } from "vue";
|
2
|
+
import { c as s } from "./index-_qikPh5K.js";
|
3
|
+
import { h as I } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as k } from "./index-Bvb4T6xz.js";
|
5
|
+
import { _ as K } from "./index.vue_vue_type_script_setup_true_lang-CfU6stly.js";
|
6
6
|
import { _ as M } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
|
-
import { g as
|
9
|
-
import { t as w } from "./index-
|
10
|
-
import { d as
|
8
|
+
import { g as $ } from "./assets-BmFExmpA.js";
|
9
|
+
import { t as w } from "./index-DeF94ACV.js";
|
10
|
+
import { d as L } from "./dinero-CIVmXLL-.js";
|
11
11
|
import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
12
12
|
import { useCoreStore as P } from "@feedmepos/mf-common";
|
13
13
|
import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
14
|
-
|
14
|
+
import { _ as Y } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DWoahPJL.js";
|
15
|
+
const G = ["src"], W = /* @__PURE__ */ h({
|
15
16
|
__name: "Gateway",
|
16
17
|
props: {
|
17
18
|
row: {},
|
18
19
|
data: {}
|
19
20
|
},
|
20
21
|
setup(p) {
|
21
|
-
return (l, n) => (
|
22
|
+
return (l, n) => (N(), F("img", {
|
22
23
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
23
|
-
src: r(
|
24
|
-
}, null, 8,
|
24
|
+
src: r($)(l.row.original.gateway)
|
25
|
+
}, null, 8, G));
|
25
26
|
}
|
26
|
-
}),
|
27
|
+
}), j = /* @__PURE__ */ h({
|
27
28
|
__name: "Status",
|
28
29
|
props: {
|
29
30
|
row: {},
|
@@ -36,7 +37,7 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
36
37
|
}
|
37
38
|
return (o, c) => {
|
38
39
|
const m = d("FmBadge");
|
39
|
-
return
|
40
|
+
return N(), y(m, {
|
40
41
|
inline: "",
|
41
42
|
class: b(n())
|
42
43
|
}, {
|
@@ -47,15 +48,15 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
47
48
|
}, 8, ["class"]);
|
48
49
|
};
|
49
50
|
}
|
50
|
-
}),
|
51
|
+
}), q = { class: "flex justify-between mb-6 items-start" }, z = { class: "flex space-x-8 items-start" }, Q = { class: "flex space-x-4" }, ie = /* @__PURE__ */ h({
|
51
52
|
__name: "TerminalTransaction",
|
52
53
|
setup(p) {
|
53
|
-
const { currentRestaurant: l } = P(), n =
|
54
|
+
const { currentRestaurant: l } = P(), n = V(), { dateRange: o, status: c, searchKey: m } = k({
|
54
55
|
searchKey: "",
|
55
56
|
status: [s.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
|
56
57
|
dateRange: {
|
57
|
-
startDate:
|
58
|
-
endDate:
|
58
|
+
startDate: I().startOf("day").toISOString(),
|
59
|
+
endDate: I().endOf("day").toISOString()
|
59
60
|
}
|
60
61
|
});
|
61
62
|
A([o, c], () => {
|
@@ -95,12 +96,12 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
95
96
|
], C = function(e) {
|
96
97
|
const t = e;
|
97
98
|
let u = "-";
|
98
|
-
return t.details.amount && (u =
|
99
|
+
return t.details.amount && (u = L(t.details.amount).toFormat("$0.00")), {
|
99
100
|
id: e._id,
|
100
101
|
refId: e.refId,
|
101
102
|
owner: e.owner,
|
102
103
|
terminalId: e.terminalId,
|
103
|
-
transactionAt:
|
104
|
+
transactionAt: I(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
|
104
105
|
action: e.action,
|
105
106
|
gateway: e.gateway,
|
106
107
|
amount: u
|
@@ -111,7 +112,8 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
111
112
|
header: () => "Transaction ID",
|
112
113
|
meta: {
|
113
114
|
textAlign: "left"
|
114
|
-
}
|
115
|
+
},
|
116
|
+
cell: ({ cell: e }) => g(Y, { data: e.getValue() })
|
115
117
|
},
|
116
118
|
{
|
117
119
|
accessorKey: "refId",
|
@@ -127,7 +129,7 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
127
129
|
textAlign: "center",
|
128
130
|
maxWidth: "128px"
|
129
131
|
},
|
130
|
-
cell: ({ cell: e, row: t }) =>
|
132
|
+
cell: ({ cell: e, row: t }) => g(W, { row: t, data: e.getValue() })
|
131
133
|
},
|
132
134
|
{
|
133
135
|
accessorKey: "action",
|
@@ -136,7 +138,7 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
136
138
|
textAlign: "left",
|
137
139
|
maxWidth: "128px"
|
138
140
|
},
|
139
|
-
cell: ({ cell: e, row: t }) =>
|
141
|
+
cell: ({ cell: e, row: t }) => g(j, { row: t, data: e.getValue() })
|
140
142
|
},
|
141
143
|
{
|
142
144
|
accessorKey: "amount",
|
@@ -168,14 +170,14 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
168
170
|
}
|
169
171
|
];
|
170
172
|
return (e, t) => {
|
171
|
-
const u = d("FmSearch"),
|
172
|
-
return
|
173
|
+
const u = d("FmSearch"), x = d("FmSelect"), v = d("FmDateRangePicker");
|
174
|
+
return N(), y(M, {
|
173
175
|
title: "Terminal Transactions",
|
174
176
|
loading: !1
|
175
177
|
}, {
|
176
178
|
default: R(() => [
|
177
|
-
_("div",
|
178
|
-
_("div",
|
179
|
+
_("div", q, [
|
180
|
+
_("div", z, [
|
179
181
|
i(B),
|
180
182
|
i(u, {
|
181
183
|
"model-value": r(m),
|
@@ -184,7 +186,7 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
184
186
|
label: "Search",
|
185
187
|
placeholder: "Search Transactions ..."
|
186
188
|
}, null, 8, ["model-value"]),
|
187
|
-
i(
|
189
|
+
i(x, {
|
188
190
|
modelValue: r(c),
|
189
191
|
"onUpdate:modelValue": t[1] || (t[1] = (a) => T(c) ? c.value = a : null),
|
190
192
|
class: "mr-6 w-[300px]",
|
@@ -200,7 +202,7 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
200
202
|
"show-predefined-range": ""
|
201
203
|
}, null, 8, ["modelValue"])
|
202
204
|
]),
|
203
|
-
_("div",
|
205
|
+
_("div", Q, [
|
204
206
|
i(U, {
|
205
207
|
button: {
|
206
208
|
appendIcon: "file_download",
|
@@ -214,7 +216,7 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
214
216
|
}, null, 8, ["handler"])
|
215
217
|
])
|
216
218
|
]),
|
217
|
-
i(
|
219
|
+
i(K, {
|
218
220
|
ref_key: "controller",
|
219
221
|
ref: n,
|
220
222
|
"column-defs": O,
|
@@ -237,5 +239,5 @@ const Y = ["src"], G = /* @__PURE__ */ I({
|
|
237
239
|
}
|
238
240
|
});
|
239
241
|
export {
|
240
|
-
|
242
|
+
ie as default
|
241
243
|
};
|
@@ -1,27 +1,28 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { c as s } from "./index-
|
3
|
-
import { h as
|
4
|
-
import { u as
|
5
|
-
import { _ as
|
6
|
-
import { _ as
|
1
|
+
import { defineComponent as g, openBlock as I, createElementBlock as v, unref as r, resolveComponent as u, createBlock as w, normalizeClass as F, withCtx as y, createElementVNode as _, toDisplayString as b, ref as D, watch as N, createVNode as i, isRef as f, h as A } from "vue";
|
2
|
+
import { c as s } from "./index-_qikPh5K.js";
|
3
|
+
import { h as T } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as V } from "./index-Bvb4T6xz.js";
|
5
|
+
import { _ as k } from "./index.vue_vue_type_script_setup_true_lang-CfU6stly.js";
|
6
|
+
import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
|
-
import { g as M } from "./assets-
|
9
|
-
import { t as x } from "./index-
|
8
|
+
import { g as M } from "./assets-BmFExmpA.js";
|
9
|
+
import { t as x } from "./index-DeF94ACV.js";
|
10
10
|
import { d as L } from "./dinero-CIVmXLL-.js";
|
11
11
|
import { _ as $ } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
|
-
|
12
|
+
import { _ as B } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DWoahPJL.js";
|
13
|
+
const P = ["src"], U = /* @__PURE__ */ g({
|
13
14
|
__name: "Gateway",
|
14
15
|
props: {
|
15
16
|
row: {},
|
16
17
|
data: {}
|
17
18
|
},
|
18
19
|
setup(p) {
|
19
|
-
return (a, o) => (
|
20
|
+
return (a, o) => (I(), v("img", {
|
20
21
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
21
22
|
src: r(M)(a.row.original.gateway)
|
22
|
-
}, null, 8,
|
23
|
+
}, null, 8, P));
|
23
24
|
}
|
24
|
-
}),
|
25
|
+
}), Y = /* @__PURE__ */ g({
|
25
26
|
__name: "Status",
|
26
27
|
props: {
|
27
28
|
row: {},
|
@@ -34,7 +35,7 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
34
35
|
}
|
35
36
|
return (l, c) => {
|
36
37
|
const m = u("FmBadge");
|
37
|
-
return
|
38
|
+
return I(), w(m, {
|
38
39
|
inline: "",
|
39
40
|
class: F(o())
|
40
41
|
}, {
|
@@ -45,23 +46,23 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
45
46
|
}, 8, ["class"]);
|
46
47
|
};
|
47
48
|
}
|
48
|
-
}),
|
49
|
+
}), G = { class: "flex justify-between mb-6 items-start" }, W = { class: "flex space-x-4 items-start" }, j = { class: "flex space-x-4" }, oe = /* @__PURE__ */ g({
|
49
50
|
__name: "TerminalTransaction",
|
50
51
|
setup(p) {
|
51
|
-
const a = D(), { dateRange: o, status: l, searchKey: c } =
|
52
|
+
const a = D(), { dateRange: o, status: l, searchKey: c } = V({
|
52
53
|
searchKey: "",
|
53
54
|
status: [s.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
|
54
55
|
dateRange: {
|
55
|
-
startDate:
|
56
|
-
endDate:
|
56
|
+
startDate: T().startOf("day").toISOString(),
|
57
|
+
endDate: T().endOf("day").toISOString()
|
57
58
|
}
|
58
59
|
});
|
59
|
-
|
60
|
+
N([o, l], () => {
|
60
61
|
var e;
|
61
62
|
return (e = a.value) == null ? void 0 : e.reset();
|
62
63
|
});
|
63
64
|
let m;
|
64
|
-
|
65
|
+
N(c, async () => {
|
65
66
|
m && clearTimeout(m), m = setTimeout(
|
66
67
|
() => {
|
67
68
|
var e;
|
@@ -95,7 +96,7 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
95
96
|
refId: e.refId,
|
96
97
|
owner: e.owner,
|
97
98
|
terminalId: e.terminalId,
|
98
|
-
transactionAt:
|
99
|
+
transactionAt: T(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
|
99
100
|
action: e.action,
|
100
101
|
gateway: e.gateway,
|
101
102
|
amount: d
|
@@ -106,7 +107,8 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
106
107
|
header: () => "Transaction ID",
|
107
108
|
meta: {
|
108
109
|
textAlign: "left"
|
109
|
-
}
|
110
|
+
},
|
111
|
+
cell: ({ cell: e }) => A(B, { data: e.getValue() })
|
110
112
|
},
|
111
113
|
{
|
112
114
|
accessorKey: "refId",
|
@@ -122,7 +124,7 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
122
124
|
textAlign: "center",
|
123
125
|
maxWidth: "128px"
|
124
126
|
},
|
125
|
-
cell: ({ cell: e, row: t }) =>
|
127
|
+
cell: ({ cell: e, row: t }) => A(U, { row: t, data: e.getValue() })
|
126
128
|
},
|
127
129
|
{
|
128
130
|
accessorKey: "action",
|
@@ -131,7 +133,7 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
131
133
|
textAlign: "left",
|
132
134
|
maxWidth: "128px"
|
133
135
|
},
|
134
|
-
cell: ({ cell: e, row: t }) =>
|
136
|
+
cell: ({ cell: e, row: t }) => A(Y, { row: t, data: e.getValue() })
|
135
137
|
},
|
136
138
|
{
|
137
139
|
accessorKey: "amount",
|
@@ -163,14 +165,14 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
163
165
|
}
|
164
166
|
];
|
165
167
|
return (e, t) => {
|
166
|
-
const d = u("FmSearch"),
|
167
|
-
return
|
168
|
+
const d = u("FmSearch"), h = u("FmSelect"), O = u("FmDateRangePicker");
|
169
|
+
return I(), w(K, {
|
168
170
|
title: "Terminal Transactions",
|
169
171
|
loading: !1
|
170
172
|
}, {
|
171
173
|
default: y(() => [
|
172
|
-
_("div",
|
173
|
-
_("div",
|
174
|
+
_("div", G, [
|
175
|
+
_("div", W, [
|
174
176
|
i(d, {
|
175
177
|
"model-value": r(c),
|
176
178
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => f(c) ? c.value = n : null),
|
@@ -178,7 +180,7 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
178
180
|
label: "Search",
|
179
181
|
placeholder: "Search Transactions ..."
|
180
182
|
}, null, 8, ["model-value"]),
|
181
|
-
i(
|
183
|
+
i(h, {
|
182
184
|
modelValue: r(l),
|
183
185
|
"onUpdate:modelValue": t[1] || (t[1] = (n) => f(l) ? l.value = n : null),
|
184
186
|
class: "mr-6 w-[300px]",
|
@@ -194,7 +196,7 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
194
196
|
"show-predefined-range": ""
|
195
197
|
}, null, 8, ["modelValue"])
|
196
198
|
]),
|
197
|
-
_("div",
|
199
|
+
_("div", j, [
|
198
200
|
i($, {
|
199
201
|
button: {
|
200
202
|
appendIcon: "file_download",
|
@@ -208,7 +210,7 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
208
210
|
}, null, 8, ["handler"])
|
209
211
|
])
|
210
212
|
]),
|
211
|
-
i(
|
213
|
+
i(k, {
|
212
214
|
ref_key: "controller",
|
213
215
|
ref: a,
|
214
216
|
"column-defs": C,
|
@@ -231,5 +233,5 @@ const B = ["src"], P = /* @__PURE__ */ T({
|
|
231
233
|
}
|
232
234
|
});
|
233
235
|
export {
|
234
|
-
|
236
|
+
oe as default
|
235
237
|
};
|