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