@feedmepos/mf-payment 1.0.4-beta.1 → 1.0.4
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-DBhxJpFQ.js → PayoutAccount-BnYhJ0R2.js} +5 -5
- package/dist/{PayoutAccount-Dy-eEx08.js → PayoutAccount-Cjkghc6L.js} +3 -3
- package/dist/{PayoutAccountSetting-BaRtIsKY.js → PayoutAccountSetting-C1yeSNv8.js} +4 -4
- package/dist/Restaurant-B02jty0J.js +262 -0
- package/dist/{RestaurantSetting-D-cBpybz.js → RestaurantSetting-CWZAKz1A.js} +4 -4
- package/dist/{Settlement-B3CKERls.js → Settlement-BKwie9R8.js} +3 -3
- package/dist/{Settlement-SSy8FZgq.js → Settlement-ByPXBNx1.js} +3 -3
- package/dist/{SettlementTransactions-BkH69jUI.js → SettlementTransactions-DVRoAUYv.js} +4 -4
- package/dist/{SettlementTransactions-hB3JKgE5.js → SettlementTransactions-rXQceUoG.js} +4 -4
- package/dist/Terminal-DX8v8WpM.js +386 -0
- package/dist/{TerminalSetting-BltsUaiq.js → TerminalSetting-qklmRz3H.js} +3 -3
- package/dist/{TerminalTransaction-EYjZZ_w_.js → TerminalTransaction-64Bn6vh0.js} +18 -19
- package/dist/{TerminalTransaction-DC0asF22.js → TerminalTransaction-YXcGJ2ne.js} +154 -184
- package/dist/{Transaction-DJo1HsrU.js → Transaction-BOc0NW9a.js} +27 -31
- package/dist/{Transaction-DBGFZ03y.js → Transaction-CqTKm8KP.js} +48 -81
- package/dist/{app-D0XKYcX9.js → app-JZYaBz1E.js} +215 -215
- package/dist/app.js +1 -1
- package/dist/{assets-CtxhVAqn.js → assets-DjRoCcqv.js} +1 -1
- package/dist/{index-D-6CKdYb.js → index-BEFlDEyV.js} +1 -1
- package/dist/{index-5sP9T4Lq.js → index-BWFqxSU3.js} +1 -1
- package/dist/{index-l8-xPUow.js → index-BerQZMQW.js} +1 -1
- package/dist/{index-TG70bysm.js → index-Bp_58SiC.js} +1 -1
- package/dist/{index-BSWqm4n5.js → index-CKyh0nlu.js} +1 -1
- package/dist/{index-6-EWa9pE.js → index-CWGSYCJG.js} +1 -1
- package/dist/{index-D2L_rQB_.js → index-DFePh4ct.js} +1 -1
- package/dist/{index-BO5zewDS.js → index-Dj_LwPBy.js} +8151 -8295
- package/dist/{index.vue_vue_type_script_setup_true_lang-CmDoWsi3.js → index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js} +1 -1
- package/dist/model/payout-account.d.ts +1 -1
- package/dist/model/transaction.d.ts +0 -2
- package/dist/package.json +2 -2
- package/dist/{payout-account-DvLt0SFL.js → payout-account-DWXNiWdx.js} +2 -2
- package/dist/stores/payoutAccount.d.ts +6 -6
- package/dist/{transaction-DiuoGMjE.js → transaction-Bxl86wzh.js} +20 -25
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +6 -6
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
- 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 +12 -12
- package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
- package/package.json +2 -2
- package/dist/Restaurant-CQsEnEZr.js +0 -305
- package/dist/Terminal-DaCXiq41.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,11 +1,11 @@
|
|
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
|
2
|
-
import { c as m } from "./index-
|
3
|
-
import { h
|
4
|
-
import { u as k } from "./index-
|
5
|
-
import { _ as Y } from "./index.vue_vue_type_script_setup_true_lang-
|
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 $ } from "./assets-
|
8
|
-
import { E as K, t as R } from "./index-
|
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";
|
@@ -45,7 +45,7 @@ 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 =
|
48
|
+
const c = I("FmBadge");
|
49
49
|
return p(), v(c, {
|
50
50
|
inline: "",
|
51
51
|
class: D(n())
|
@@ -57,15 +57,15 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
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], () => {
|
@@ -107,11 +107,10 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
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,
|
@@ -119,12 +118,12 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
119
118
|
};
|
120
119
|
}, E = [
|
121
120
|
{
|
122
|
-
accessorKey: "
|
121
|
+
accessorKey: "id",
|
123
122
|
header: () => "Transaction ID",
|
124
123
|
meta: {
|
125
124
|
textAlign: "left"
|
126
125
|
},
|
127
|
-
cell: ({ cell: e }) =>
|
126
|
+
cell: ({ cell: e }) => g(P, { data: e.getValue() })
|
128
127
|
},
|
129
128
|
{
|
130
129
|
accessorKey: "orderId",
|
@@ -147,7 +146,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
147
146
|
textAlign: "center",
|
148
147
|
maxWidth: "128px"
|
149
148
|
},
|
150
|
-
cell: ({ cell: e, row: a }) =>
|
149
|
+
cell: ({ cell: e, row: a }) => g(H, { row: a, data: e.getValue() })
|
151
150
|
},
|
152
151
|
{
|
153
152
|
accessorKey: "action",
|
@@ -156,7 +155,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
156
155
|
textAlign: "right",
|
157
156
|
maxWidth: "132px"
|
158
157
|
},
|
159
|
-
cell: ({ cell: e, row: a }) =>
|
158
|
+
cell: ({ cell: e, row: a }) => g(J, { row: a, data: e.getValue() })
|
160
159
|
},
|
161
160
|
{
|
162
161
|
accessorKey: "amount",
|
@@ -181,7 +180,7 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
181
180
|
}
|
182
181
|
];
|
183
182
|
return (e, a) => {
|
184
|
-
const u =
|
183
|
+
const u = I("FmSearch"), w = I("FmSelect");
|
185
184
|
return p(), v(j, {
|
186
185
|
title: "Terminal Transactions",
|
187
186
|
description: "Transactions are purchases or payments made in retail using electronic devices such as POS systems, kiosks, terminals, or ECRs.",
|
@@ -258,5 +257,5 @@ const z = ["src"], Q = ["src"], H = /* @__PURE__ */ N({
|
|
258
257
|
}
|
259
258
|
});
|
260
259
|
export {
|
261
|
-
|
260
|
+
ge as default
|
262
261
|
};
|