@feedmepos/mf-payment 1.0.3 → 1.0.4-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.
- package/dist/{PayoutAccount-DxMey5W6.js → PayoutAccount-CUcmLnpF.js} +5 -5
- package/dist/{PayoutAccount-DYnycBoi.js → PayoutAccount-K-clfaW8.js} +85 -85
- package/dist/{PayoutAccountSetting-C1yeSNv8.js → PayoutAccountSetting-B1uLo7gi.js} +4 -4
- package/dist/Restaurant-D5L8pG25.js +305 -0
- package/dist/{RestaurantSetting-CWZAKz1A.js → RestaurantSetting-Dx0fPDEn.js} +4 -4
- package/dist/{Settlement-ByPXBNx1.js → Settlement-BGueDfpI.js} +3 -3
- package/dist/{Settlement-BKwie9R8.js → Settlement-D0nuXQMV.js} +3 -3
- package/dist/{SettlementTransactions-rXQceUoG.js → SettlementTransactions-DW8-tVPe.js} +4 -4
- package/dist/{SettlementTransactions-DVRoAUYv.js → SettlementTransactions-Dsnpidi1.js} +4 -4
- package/dist/Terminal-BkhqmKjN.js +404 -0
- package/dist/{TerminalSetting-qklmRz3H.js → TerminalSetting-CrpB7DIV.js} +3 -3
- package/dist/{TerminalTransaction-64Bn6vh0.js → TerminalTransaction-2E_8keFp.js} +50 -44
- package/dist/{TerminalTransaction-YXcGJ2ne.js → TerminalTransaction-BGy4ABmm.js} +184 -154
- package/dist/{Transaction-BOc0NW9a.js → Transaction-DFqANzFa.js} +31 -27
- package/dist/{Transaction-CqTKm8KP.js → Transaction-izWqPmdQ.js} +81 -48
- package/dist/{app-D017JOF7.js → app-DPCnmmmg.js} +329 -329
- package/dist/app.js +1 -1
- package/dist/{assets-DjRoCcqv.js → assets-NM2zCyV8.js} +1 -1
- package/dist/grafana-CqkYm_ru.js +46 -0
- package/dist/helpers/grafana.d.ts +7 -0
- package/dist/{index-DFePh4ct.js → index-B5pmhl4r.js} +1 -1
- package/dist/{index-BerQZMQW.js → index-BWpuTiNy.js} +1 -1
- package/dist/{index-CWGSYCJG.js → index-BbPdddp2.js} +1 -1
- package/dist/{index-Dj_LwPBy.js → index-Bl77l-UI.js} +8489 -8321
- package/dist/{index-CKyh0nlu.js → index-BpclEVci.js} +1 -1
- package/dist/{index-BWFqxSU3.js → index-CZv4Ucw7.js} +1 -1
- package/dist/{index-Bp_58SiC.js → index-DfC2cb6i.js} +1 -1
- package/dist/{index-BEFlDEyV.js → index-DffVv67M.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js → index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js} +1 -1
- package/dist/model/transaction.d.ts +2 -0
- package/dist/package.json +2 -2
- package/dist/{payout-account-BhSP2Imp.js → payout-account-DpAKpX1a.js} +2 -2
- package/dist/stores/payoutAccount.d.ts +4 -4
- package/dist/{transaction-Bxl86wzh.js → transaction-13xSmWg9.js} +25 -20
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +5 -0
- package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -1
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
- package/package.json +2 -2
- package/dist/Restaurant-B02jty0J.js +0 -262
- package/dist/Terminal-DX8v8WpM.js +0 -386
@@ -0,0 +1,404 @@
|
|
1
|
+
import { defineComponent as h, openBlock as g, createElementBlock as V, createTextVNode as M, createElementVNode as x, toDisplayString as L, resolveComponent as f, createVNode as v, normalizeClass as z, withCtx as B, createBlock as b, createCommentVNode as F, ref as C, computed as Y, unref as m, watch as K, isRef as P, h as E } from "vue";
|
2
|
+
import "./index-Bl77l-UI.js";
|
3
|
+
import { h as q } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as j } from "./index-BWpuTiNy.js";
|
5
|
+
import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js";
|
6
|
+
import { _ as Q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
7
|
+
import { useSnackbar as D, useDialogChild as H, useDialog as J } from "@feedmepos/ui-library";
|
8
|
+
import { t as A } from "./index-B5pmhl4r.js";
|
9
|
+
import { c as O } from "./clipboard-4jh1WteU.js";
|
10
|
+
import { g as W } from "./grafana-CqkYm_ru.js";
|
11
|
+
import { u as N } from "./error-K1CakhA9.js";
|
12
|
+
import { z as R, a as U } from "./validator-D5jtpt9A.js";
|
13
|
+
import { useCoreStore as X } from "@feedmepos/mf-common";
|
14
|
+
import { w as Z } from "./Modal-DB8M9o1T.js";
|
15
|
+
import { useRouter as ee } from "vue-router";
|
16
|
+
const te = { class: "t-caption" }, ne = /* @__PURE__ */ h({
|
17
|
+
__name: "TerminalBindCodeDialog",
|
18
|
+
props: {
|
19
|
+
code: {
|
20
|
+
type: String,
|
21
|
+
required: !0
|
22
|
+
}
|
23
|
+
},
|
24
|
+
setup(y) {
|
25
|
+
const o = y, i = D();
|
26
|
+
function r() {
|
27
|
+
try {
|
28
|
+
O(o.code), i.open({ title: "Text copied to clipboard." }, 1e3);
|
29
|
+
} catch {
|
30
|
+
i.open({ title: "Clipboard API incompatible." }, 1e3);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
return (d, a) => (g(), V("div", te, [
|
34
|
+
a[1] || (a[1] = M(" Enter the binding code below on your device to link it with this terminal and apply the configuration. ")),
|
35
|
+
x("div", {
|
36
|
+
class: "my-6 text-center fm-typo-en-title-md-800 tracking-[0.3rem] cursor-pointer hover:text-fm-color-neutral-gray-300",
|
37
|
+
onClick: a[0] || (a[0] = (n) => {
|
38
|
+
n.stopPropagation(), r();
|
39
|
+
})
|
40
|
+
}, L(y.code), 1)
|
41
|
+
]));
|
42
|
+
}
|
43
|
+
}), oe = /* @__PURE__ */ h({
|
44
|
+
__name: "ID",
|
45
|
+
props: {
|
46
|
+
row: {},
|
47
|
+
data: {}
|
48
|
+
},
|
49
|
+
setup(y) {
|
50
|
+
const o = y, i = D();
|
51
|
+
function r() {
|
52
|
+
return o.row.original.status === "Active" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
|
53
|
+
}
|
54
|
+
function d() {
|
55
|
+
try {
|
56
|
+
O(o.data), i.open({ title: "Text copied to clipboard." }, 1e3);
|
57
|
+
} catch {
|
58
|
+
i.open({ title: "Clipboard API incompatible." }, 1e3);
|
59
|
+
}
|
60
|
+
o.data;
|
61
|
+
}
|
62
|
+
return (a, n) => {
|
63
|
+
const l = f("FmBadge");
|
64
|
+
return g(), V("div", {
|
65
|
+
onClick: n[0] || (n[0] = (s) => {
|
66
|
+
s.stopPropagation(), d();
|
67
|
+
})
|
68
|
+
}, [
|
69
|
+
v(l, {
|
70
|
+
inline: "",
|
71
|
+
class: z(r())
|
72
|
+
}, {
|
73
|
+
default: B(() => [
|
74
|
+
x("div", null, L(a.data), 1)
|
75
|
+
]),
|
76
|
+
_: 1
|
77
|
+
}, 8, ["class"])
|
78
|
+
]);
|
79
|
+
};
|
80
|
+
}
|
81
|
+
}), ae = { class: "flex" }, re = /* @__PURE__ */ h({
|
82
|
+
__name: "Actions",
|
83
|
+
props: {
|
84
|
+
data: {}
|
85
|
+
},
|
86
|
+
emits: ["link", "unlink", "edit"],
|
87
|
+
setup(y, { emit: o }) {
|
88
|
+
const i = y, r = o;
|
89
|
+
function d() {
|
90
|
+
const a = W([
|
91
|
+
{
|
92
|
+
type: "span",
|
93
|
+
queryKey: "terminal.id",
|
94
|
+
queryValue: i.data._id
|
95
|
+
}
|
96
|
+
]);
|
97
|
+
window.open(a, "_blank");
|
98
|
+
}
|
99
|
+
return (a, n) => {
|
100
|
+
const l = f("FmButton");
|
101
|
+
return g(), V("div", ae, [
|
102
|
+
v(l, {
|
103
|
+
variant: "plain",
|
104
|
+
"prepend-icon": "history",
|
105
|
+
onClick: n[0] || (n[0] = (s) => {
|
106
|
+
s.stopPropagation(), d();
|
107
|
+
})
|
108
|
+
}),
|
109
|
+
a.data.deviceType === "TERMINAL" && !a.data.deviceId ? (g(), b(l, {
|
110
|
+
key: 0,
|
111
|
+
variant: "plain",
|
112
|
+
"prepend-icon": "link",
|
113
|
+
onClick: n[1] || (n[1] = (s) => {
|
114
|
+
s.stopPropagation(), r("link");
|
115
|
+
})
|
116
|
+
})) : F("", !0),
|
117
|
+
a.data.deviceType === "TERMINAL" && a.data.deviceId ? (g(), b(l, {
|
118
|
+
key: 1,
|
119
|
+
variant: "plain",
|
120
|
+
"prepend-icon": "link_off",
|
121
|
+
onClick: n[2] || (n[2] = (s) => {
|
122
|
+
s.stopPropagation(), r("unlink");
|
123
|
+
})
|
124
|
+
})) : F("", !0),
|
125
|
+
v(l, {
|
126
|
+
variant: "plain",
|
127
|
+
"prepend-icon": "edit",
|
128
|
+
onClick: n[3] || (n[3] = (s) => {
|
129
|
+
s.stopPropagation(), r("edit");
|
130
|
+
})
|
131
|
+
})
|
132
|
+
]);
|
133
|
+
};
|
134
|
+
}
|
135
|
+
}), ie = /* @__PURE__ */ h({
|
136
|
+
__name: "TerminalDialog",
|
137
|
+
props: {
|
138
|
+
terminal: {
|
139
|
+
type: Object
|
140
|
+
}
|
141
|
+
},
|
142
|
+
setup(y) {
|
143
|
+
var w, _, I;
|
144
|
+
const o = y, i = X(), r = H(), d = C(), a = C((w = o.terminal) == null ? void 0 : w.name), n = C((_ = o.terminal) == null ? void 0 : _.referenceId), l = C(((I = o.terminal) == null ? void 0 : I.status) === "Active"), s = Y(() => i.restaurants.value.map((T) => ({
|
145
|
+
label: T.profile.name,
|
146
|
+
value: T._id
|
147
|
+
})));
|
148
|
+
return (T, p) => {
|
149
|
+
const e = f("FmSelect"), t = f("FmTextField"), u = f("FmSwitch"), k = f("FmButton"), S = f("FmForm");
|
150
|
+
return g(), b(S, {
|
151
|
+
ref: d.value,
|
152
|
+
class: "flex flex-col gap-16 mb-6",
|
153
|
+
onValidationSuccess: p[3] || (p[3] = () => {
|
154
|
+
m(r).emitData({ name: a.value, referenceId: n.value, status: l.value ? "Active" : "Inactive" }), m(r).emitAction("primary");
|
155
|
+
})
|
156
|
+
}, {
|
157
|
+
default: B(() => [
|
158
|
+
o.terminal ? F("", !0) : (g(), b(e, {
|
159
|
+
key: 0,
|
160
|
+
modelValue: n.value,
|
161
|
+
"onUpdate:modelValue": p[0] || (p[0] = (c) => n.value = c),
|
162
|
+
label: "Restaurant",
|
163
|
+
"helper-text": "If you can't find the restaurant please change the business to the restaurant's business.",
|
164
|
+
items: s.value,
|
165
|
+
rules: m(R)(m(U).string())
|
166
|
+
}, null, 8, ["modelValue", "items", "rules"])),
|
167
|
+
v(t, {
|
168
|
+
modelValue: a.value,
|
169
|
+
"onUpdate:modelValue": p[1] || (p[1] = (c) => a.value = c),
|
170
|
+
label: "Terminal Name",
|
171
|
+
rules: m(R)(m(U).string())
|
172
|
+
}, null, 8, ["modelValue", "rules"]),
|
173
|
+
o.terminal ? (g(), b(u, {
|
174
|
+
key: 1,
|
175
|
+
modelValue: l.value,
|
176
|
+
"onUpdate:modelValue": p[2] || (p[2] = (c) => l.value = c),
|
177
|
+
label: "Status"
|
178
|
+
}, null, 8, ["modelValue"])) : F("", !0),
|
179
|
+
v(k, {
|
180
|
+
type: "submit",
|
181
|
+
label: "Create"
|
182
|
+
})
|
183
|
+
]),
|
184
|
+
_: 1
|
185
|
+
}, 512);
|
186
|
+
};
|
187
|
+
}
|
188
|
+
}), le = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" }, ce = { class: "flex space-x-4" }, we = /* @__PURE__ */ h({
|
189
|
+
__name: "Terminal",
|
190
|
+
setup(y) {
|
191
|
+
const o = C(), { searchKey: i, deviceType: r } = j({
|
192
|
+
searchKey: "",
|
193
|
+
deviceType: void 0
|
194
|
+
});
|
195
|
+
K(r, () => {
|
196
|
+
var e;
|
197
|
+
return (e = o.value) == null ? void 0 : e.reset();
|
198
|
+
});
|
199
|
+
let d;
|
200
|
+
K(i, async () => {
|
201
|
+
d && clearTimeout(d), d = setTimeout(
|
202
|
+
() => {
|
203
|
+
var e;
|
204
|
+
return (e = o.value) == null ? void 0 : e.reset();
|
205
|
+
},
|
206
|
+
700
|
207
|
+
);
|
208
|
+
});
|
209
|
+
const a = ee(), n = J(), l = D();
|
210
|
+
async function s(e) {
|
211
|
+
Z(
|
212
|
+
n,
|
213
|
+
"Terminal Unbind",
|
214
|
+
"Are you sure to unbind terminal from device? This action cannot be revert and device will be logged out!",
|
215
|
+
async () => {
|
216
|
+
var t;
|
217
|
+
try {
|
218
|
+
await A.unbind(e), (t = o.value) == null || t.reset(), l.open({
|
219
|
+
type: "success",
|
220
|
+
message: "Terminal unbind successfully"
|
221
|
+
});
|
222
|
+
} catch (u) {
|
223
|
+
l.open({
|
224
|
+
type: "error",
|
225
|
+
title: "Error occurs when unbind terminal",
|
226
|
+
message: N(u)
|
227
|
+
});
|
228
|
+
}
|
229
|
+
}
|
230
|
+
);
|
231
|
+
}
|
232
|
+
async function w(e) {
|
233
|
+
const t = await A.getBindCode(e);
|
234
|
+
n.open({
|
235
|
+
title: "Terminal Bind Code",
|
236
|
+
closeButton: !0,
|
237
|
+
overlay: !0,
|
238
|
+
contentComponent: ne,
|
239
|
+
contentComponentProps: { code: t }
|
240
|
+
});
|
241
|
+
}
|
242
|
+
async function _(e) {
|
243
|
+
n.open({
|
244
|
+
title: e ? "Update Terminal" : "Create New Terminal",
|
245
|
+
closeButton: !0,
|
246
|
+
overlay: !0,
|
247
|
+
contentComponent: ie,
|
248
|
+
contentComponentProps: { terminal: e }
|
249
|
+
}).onPrimary(async (t) => {
|
250
|
+
var u;
|
251
|
+
n.close();
|
252
|
+
try {
|
253
|
+
await A.create(t), (u = o.value) == null || u.reset(), l.open({
|
254
|
+
type: "success",
|
255
|
+
message: e ? "Terminal udpated successfully" : "Terminal created successfully."
|
256
|
+
});
|
257
|
+
} catch (k) {
|
258
|
+
l.open({
|
259
|
+
type: "error",
|
260
|
+
title: "Error occurs when create terminal",
|
261
|
+
message: N(k)
|
262
|
+
});
|
263
|
+
}
|
264
|
+
});
|
265
|
+
}
|
266
|
+
const I = function(e) {
|
267
|
+
return {
|
268
|
+
id: e._id,
|
269
|
+
status: e.status,
|
270
|
+
referenceId: e.referenceId,
|
271
|
+
name: e.name,
|
272
|
+
deviceId: e.deviceId,
|
273
|
+
deviceType: e.deviceType,
|
274
|
+
updatedAt: q(e.updatedAt).format("YYYY-MM-DD hh:mm:ss")
|
275
|
+
};
|
276
|
+
}, T = [
|
277
|
+
{
|
278
|
+
accessorKey: "id",
|
279
|
+
header: () => "Terminal ID",
|
280
|
+
meta: {
|
281
|
+
textAlign: "right"
|
282
|
+
},
|
283
|
+
cell: ({ cell: e, row: t }) => E(oe, { row: t, data: e.getValue() })
|
284
|
+
},
|
285
|
+
{
|
286
|
+
accessorKey: "deviceType",
|
287
|
+
header: () => "Device Type",
|
288
|
+
meta: {
|
289
|
+
textAlign: "left"
|
290
|
+
}
|
291
|
+
},
|
292
|
+
{
|
293
|
+
accessorKey: "name",
|
294
|
+
header: () => "Name",
|
295
|
+
meta: {
|
296
|
+
textAlign: "left"
|
297
|
+
}
|
298
|
+
},
|
299
|
+
{
|
300
|
+
accessorKey: "referenceId",
|
301
|
+
header: () => "Reference",
|
302
|
+
meta: {
|
303
|
+
textAlign: "left"
|
304
|
+
}
|
305
|
+
},
|
306
|
+
{
|
307
|
+
accessorKey: "deviceId",
|
308
|
+
header: () => "Bound Device Id",
|
309
|
+
meta: {
|
310
|
+
textAlign: "left"
|
311
|
+
}
|
312
|
+
},
|
313
|
+
{
|
314
|
+
accessorKey: "updatedAt",
|
315
|
+
header: () => "Last Updated",
|
316
|
+
meta: {
|
317
|
+
textAlign: "left"
|
318
|
+
}
|
319
|
+
},
|
320
|
+
{
|
321
|
+
accessorKey: "id",
|
322
|
+
header: () => "Actions",
|
323
|
+
meta: {
|
324
|
+
textAlign: "center"
|
325
|
+
},
|
326
|
+
cell: ({ row: e }) => {
|
327
|
+
var u;
|
328
|
+
const t = (u = o.value) == null ? void 0 : u.pageData().at(e.index);
|
329
|
+
return E(re, {
|
330
|
+
data: t,
|
331
|
+
onLink: () => w(t._id),
|
332
|
+
onUnlink: () => s(t._id),
|
333
|
+
onEdit: () => _(t)
|
334
|
+
});
|
335
|
+
}
|
336
|
+
}
|
337
|
+
], p = [
|
338
|
+
{
|
339
|
+
label: "POS",
|
340
|
+
value: "POS"
|
341
|
+
},
|
342
|
+
{
|
343
|
+
label: "KIOSK",
|
344
|
+
value: "KIOSK"
|
345
|
+
},
|
346
|
+
{
|
347
|
+
label: "TERMINAL",
|
348
|
+
value: "TERMINAL"
|
349
|
+
}
|
350
|
+
];
|
351
|
+
return (e, t) => {
|
352
|
+
const u = f("FmSearch"), k = f("FmSelect"), S = f("FmButton");
|
353
|
+
return g(), b(Q, {
|
354
|
+
title: "Terminals",
|
355
|
+
loading: !1
|
356
|
+
}, {
|
357
|
+
default: B(() => [
|
358
|
+
x("div", le, [
|
359
|
+
x("div", se, [
|
360
|
+
v(u, {
|
361
|
+
"model-value": m(i),
|
362
|
+
"onUpdate:modelValue": t[0] || (t[0] = (c) => P(i) ? i.value = c : null),
|
363
|
+
class: "mr-8",
|
364
|
+
label: "Search",
|
365
|
+
placeholder: "Search Terminals ..."
|
366
|
+
}, null, 8, ["model-value"]),
|
367
|
+
v(k, {
|
368
|
+
modelValue: m(r),
|
369
|
+
"onUpdate:modelValue": t[1] || (t[1] = (c) => P(r) ? r.value = c : null),
|
370
|
+
class: "ml-6 w-[180px]",
|
371
|
+
label: "Device",
|
372
|
+
items: p
|
373
|
+
}, null, 8, ["modelValue"])
|
374
|
+
]),
|
375
|
+
x("div", ce, [
|
376
|
+
v(S, {
|
377
|
+
label: "Create",
|
378
|
+
icon: "add",
|
379
|
+
onClick: t[2] || (t[2] = () => _())
|
380
|
+
})
|
381
|
+
])
|
382
|
+
]),
|
383
|
+
v(G, {
|
384
|
+
ref_key: "controller",
|
385
|
+
ref: o,
|
386
|
+
"column-defs": T,
|
387
|
+
"rows-defs": I,
|
388
|
+
paginate: (c, $) => m(A).read({ searchKey: m(i), deviceType: m(r), limit: c, cursor: $ }),
|
389
|
+
onRowClick: t[3] || (t[3] = (c) => m(a).push({
|
390
|
+
name: "mf-payment-admin.terminal-setting",
|
391
|
+
params: {
|
392
|
+
terminalId: c._id
|
393
|
+
}
|
394
|
+
}))
|
395
|
+
}, null, 8, ["paginate"])
|
396
|
+
]),
|
397
|
+
_: 1
|
398
|
+
});
|
399
|
+
};
|
400
|
+
}
|
401
|
+
});
|
402
|
+
export {
|
403
|
+
we as default
|
404
|
+
};
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as T, openBlock as b, createElementBlock as N, Fragment as Y, createElementVNode as g, createTextVNode as V, toDisplayString as S, toRef as M, ref as F, watch as D, onMounted as G, computed as O, resolveComponent as f, unref as k, createVNode as I, createBlock as _, withCtx as q, createCommentVNode as B, isRef as h, resolveDynamicComponent as L, normalizeProps as j, mergeProps as E } from "vue";
|
2
|
-
import { u as R, e as U } from "./index-
|
2
|
+
import { u as R, e as U } from "./index-Bl77l-UI.js";
|
3
3
|
import { useRouter as A } from "vue-router";
|
4
|
-
import { t as C } from "./index-
|
4
|
+
import { t as C } from "./index-B5pmhl4r.js";
|
5
5
|
import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
-
import { u as H } from "./index-
|
6
|
+
import { u as H } from "./index-BWpuTiNy.js";
|
7
7
|
import { useSnackbar as Q } from "@feedmepos/ui-library";
|
8
8
|
import { u as J } from "./error-K1CakhA9.js";
|
9
9
|
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
@@ -1,20 +1,20 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { c as m } from "./index-
|
3
|
-
import { h } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as k } from "./index-
|
5
|
-
import { _ as
|
1
|
+
import { defineComponent as y, openBlock as p, createElementBlock as C, Fragment as O, unref as r, createCommentVNode as F, createElementVNode as d, resolveComponent as h, createBlock as R, normalizeClass as D, withCtx as N, 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-Bl77l-UI.js";
|
3
|
+
import { h as g } from "./moment-h96o7c8I.js";
|
4
|
+
import { u as k } from "./index-BWpuTiNy.js";
|
5
|
+
import { _ as K } from "./index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js";
|
6
6
|
import "@feedmepos/ui-library";
|
7
|
-
import { g as
|
8
|
-
import { E as
|
7
|
+
import { g as Y } from "./assets-NM2zCyV8.js";
|
8
|
+
import { E as $, t as b } from "./index-BpclEVci.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";
|
12
|
-
import { _ as
|
13
|
-
import { _ as
|
14
|
-
import { _ as
|
15
|
-
import { _ as
|
16
|
-
import { _ as
|
17
|
-
const z = ["src"], Q = ["src"], H = /* @__PURE__ */
|
12
|
+
import { _ as q } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
13
|
+
import { _ as U } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
14
|
+
import { _ as P } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
15
|
+
import { _ as j } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
16
|
+
import { _ as W } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
17
|
+
const z = ["src"], Q = ["src"], H = /* @__PURE__ */ y({
|
18
18
|
__name: "Gateway",
|
19
19
|
props: {
|
20
20
|
row: {},
|
@@ -25,15 +25,15 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
25
25
|
o.row.original.ecrGateway ? (p(), C("img", {
|
26
26
|
key: 0,
|
27
27
|
class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
28
|
-
src: r(
|
28
|
+
src: r($)
|
29
29
|
}, null, 8, z)) : F("", !0),
|
30
30
|
d("img", {
|
31
31
|
class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
|
32
|
-
src: r(
|
32
|
+
src: r(Y)(o.row.original.gateway)
|
33
33
|
}, null, 8, Q)
|
34
34
|
], 64));
|
35
35
|
}
|
36
|
-
}), J = /* @__PURE__ */
|
36
|
+
}), J = /* @__PURE__ */ y({
|
37
37
|
__name: "Status",
|
38
38
|
props: {
|
39
39
|
row: {},
|
@@ -45,27 +45,27 @@ 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 =
|
49
|
-
return p(),
|
48
|
+
const c = h("FmBadge");
|
49
|
+
return p(), R(c, {
|
50
50
|
inline: "",
|
51
51
|
class: D(n())
|
52
52
|
}, {
|
53
|
-
default:
|
53
|
+
default: N(() => [
|
54
54
|
d("div", null, V(l.data.toUpperCase()), 1)
|
55
55
|
]),
|
56
56
|
_: 1
|
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" },
|
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__ */ y({
|
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:
|
68
|
-
endDate:
|
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], () => {
|
@@ -102,28 +102,30 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
102
102
|
label: "Failed",
|
103
103
|
value: m.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
|
104
104
|
}
|
105
|
-
],
|
105
|
+
], v = function(e) {
|
106
106
|
const a = e;
|
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:
|
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,
|
117
|
-
amount: u
|
118
|
+
amount: u,
|
119
|
+
seqNumber: e.seqNumber
|
118
120
|
};
|
119
|
-
},
|
121
|
+
}, S = [
|
120
122
|
{
|
121
|
-
accessorKey: "
|
123
|
+
accessorKey: "transactionId",
|
122
124
|
header: () => "Transaction ID",
|
123
125
|
meta: {
|
124
126
|
textAlign: "left"
|
125
127
|
},
|
126
|
-
cell: ({ cell: e }) =>
|
128
|
+
cell: ({ cell: e }) => I(U, { data: e.getValue() })
|
127
129
|
},
|
128
130
|
{
|
129
131
|
accessorKey: "orderId",
|
@@ -132,6 +134,10 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
132
134
|
textAlign: "left"
|
133
135
|
}
|
134
136
|
},
|
137
|
+
{
|
138
|
+
header: () => "Bill Seq No",
|
139
|
+
accessorKey: "seqNumber"
|
140
|
+
},
|
135
141
|
{
|
136
142
|
accessorKey: "refId",
|
137
143
|
header: () => "Reference ID",
|
@@ -146,7 +152,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
146
152
|
textAlign: "center",
|
147
153
|
maxWidth: "128px"
|
148
154
|
},
|
149
|
-
cell: ({ cell: e, row: a }) =>
|
155
|
+
cell: ({ cell: e, row: a }) => I(H, { row: a, data: e.getValue() })
|
150
156
|
},
|
151
157
|
{
|
152
158
|
accessorKey: "action",
|
@@ -155,7 +161,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
155
161
|
textAlign: "right",
|
156
162
|
maxWidth: "132px"
|
157
163
|
},
|
158
|
-
cell: ({ cell: e, row: a }) =>
|
164
|
+
cell: ({ cell: e, row: a }) => I(J, { row: a, data: e.getValue() })
|
159
165
|
},
|
160
166
|
{
|
161
167
|
accessorKey: "amount",
|
@@ -180,13 +186,13 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
180
186
|
}
|
181
187
|
];
|
182
188
|
return (e, a) => {
|
183
|
-
const u =
|
184
|
-
return p(),
|
189
|
+
const u = h("FmSearch"), w = h("FmSelect");
|
190
|
+
return p(), R(P, {
|
185
191
|
title: "Terminal Transactions",
|
186
192
|
description: "Transactions are purchases or payments made in retail using electronic devices such as POS systems, kiosks, terminals, or ECRs.",
|
187
193
|
loading: !1
|
188
194
|
}, {
|
189
|
-
default:
|
195
|
+
default: N(() => [
|
190
196
|
d("div", X, [
|
191
197
|
d("div", Z, [
|
192
198
|
i(B),
|
@@ -206,8 +212,8 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
206
212
|
multiselect: "",
|
207
213
|
items: x
|
208
214
|
}, {
|
209
|
-
"prepend-menu":
|
210
|
-
i(
|
215
|
+
"prepend-menu": N(() => [
|
216
|
+
i(j, {
|
211
217
|
modelValue: r(s),
|
212
218
|
"onUpdate:modelValue": a[1] || (a[1] = (t) => _(s) ? s.value = t : null),
|
213
219
|
items: x
|
@@ -217,7 +223,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
217
223
|
}, 8, ["modelValue"])
|
218
224
|
]),
|
219
225
|
d("div", ee, [
|
220
|
-
i(
|
226
|
+
i(q, {
|
221
227
|
button: {
|
222
228
|
appendIcon: "file_download",
|
223
229
|
variant: "primary",
|
@@ -225,27 +231,27 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
225
231
|
},
|
226
232
|
handler: () => {
|
227
233
|
var t;
|
228
|
-
return r(
|
234
|
+
return r(b).downloadTransactions(((t = n.value) == null ? void 0 : t.data()) ?? []);
|
229
235
|
}
|
230
236
|
}, null, 8, ["handler"])
|
231
237
|
])
|
232
238
|
]),
|
233
239
|
d("div", ae, [
|
234
|
-
i(
|
240
|
+
i(W, {
|
235
241
|
modelValue: r(l),
|
236
242
|
"onUpdate:modelValue": a[3] || (a[3] = (t) => _(l) ? l.value = t : null)
|
237
243
|
}, null, 8, ["modelValue"])
|
238
244
|
]),
|
239
|
-
i(
|
245
|
+
i(K, {
|
240
246
|
ref_key: "controller",
|
241
247
|
ref: n,
|
242
|
-
"column-defs":
|
243
|
-
"rows-defs":
|
244
|
-
paginate: (t,
|
248
|
+
"column-defs": S,
|
249
|
+
"rows-defs": v,
|
250
|
+
paginate: (t, E) => r(b).readRestaurantTransactions({
|
245
251
|
status: r(s),
|
246
252
|
searchKey: r(c),
|
247
253
|
limit: t,
|
248
|
-
cursor:
|
254
|
+
cursor: E,
|
249
255
|
start: r(l).startDate,
|
250
256
|
end: r(l).endDate
|
251
257
|
})
|
@@ -257,5 +263,5 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
257
263
|
}
|
258
264
|
});
|
259
265
|
export {
|
260
|
-
|
266
|
+
Ie as default
|
261
267
|
};
|