@feedmepos/mf-payment 1.1.13 → 1.1.14-beta.1
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-lT5iiQa-.js → PayoutAccount-BhC9GdVa.js} +7 -6
- package/dist/{PayoutAccount-DH1z58gO.js → PayoutAccount-BjcP1n1D.js} +8 -7
- package/dist/{PayoutAccountSetting-BuUync07.js → PayoutAccountSetting-61UI9TTU.js} +3 -3
- package/dist/{Restaurant-31NaCvCd.js → Restaurant-BEjGTeZK.js} +4 -4
- package/dist/{RestaurantSetting-ByCb54gA.js → RestaurantSetting-CH5KXJd-.js} +3 -3
- package/dist/{Settlement-MPJE29Ry.js → Settlement-CpWtqcbV.js} +3 -3
- package/dist/{Settlement-DUHtGLUl.js → Settlement-Ekk7fPLv.js} +3 -3
- package/dist/{SettlementTransactions-BIs9YpoK.js → SettlementTransactions-CytrIXUM.js} +3 -3
- package/dist/{SettlementTransactions-BAMliC1r.js → SettlementTransactions-DddCRhIs.js} +3 -3
- package/dist/{Terminal-DID1yck1.js → Terminal-5BRplzny.js} +6 -6
- package/dist/TerminalSetting-D8nuI1Gv.js +587 -0
- package/dist/{Transaction-VhRzUzbg.js → Transaction-Bnm30wxt.js} +9 -8
- package/dist/{Transaction-Bfr51t2I.js → Transaction-D2qgyVJA.js} +5 -5
- package/dist/{TransactionOld-DP6geerP.js → TransactionOld-DL9vMDXr.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-DMYLTNO7.js → TransactionTable.vue_vue_type_script_setup_true_lang-PXvQ-nrK.js} +3 -3
- package/dist/{app-dky8a2sP.js → app--PNGHtZ3.js} +338 -338
- package/dist/app.js +1 -1
- package/dist/{assets-CGSnvwg_.js → assets-BAvqcM2y.js} +30 -28
- package/dist/{grafana-DpTNZERD.js → grafana-XJlaGQ8C.js} +7 -10
- package/dist/{index-yCRcX8ql.js → index-B4xE-ETp.js} +12862 -12264
- package/dist/{index-O5yk1zsL.js → index-DXzezAJQ.js} +4 -3
- package/dist/{index-B_tCR11q.js → index-DsT_D8r0.js} +1 -1
- package/dist/index-DtHh0OLe.js +162 -0
- package/dist/{index-KziNLTAM.js → index-SqBpMlb0.js} +1 -1
- package/dist/{index-l4KSc_D9.js → index-pPbE76Vg.js} +1 -1
- package/dist/{index-CcFjStnT.js → index-s6srEUqZ.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-JJ6R-Wfm.js → index.vue_vue_type_script_setup_true_lang-aFl1Lbk1.js} +1 -1
- package/dist/model/transaction.d.ts +1 -2
- package/dist/package.json +2 -2
- package/dist/payout-account-TSBuddbd.js +1953 -0
- package/dist/stores/payoutAccount.d.ts +4 -4
- 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/PaymentChannel.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +16 -16
- 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 +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +90 -0
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +22 -28
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +22 -28
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +40 -40
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +20 -20
- package/package.json +2 -2
- package/dist/TerminalSetting-B9w9AaTE.js +0 -497
- package/dist/payout-account-BVO1uUOe.js +0 -1819
@@ -0,0 +1,587 @@
|
|
1
|
+
import { defineComponent as T, openBlock as I, createElementBlock as C, Fragment as B, createElementVNode as w, createTextVNode as U, toDisplayString as G, toRef as N, ref as b, watch as R, onMounted as O, computed as Y, resolveComponent as f, unref as _, createVNode as F, createBlock as k, withCtx as M, createCommentVNode as V, isRef as P, resolveDynamicComponent as $, normalizeProps as j, mergeProps as L } from "vue";
|
2
|
+
import { u as D, e as x } from "./index-B4xE-ETp.js";
|
3
|
+
import { useRouter as H } from "vue-router";
|
4
|
+
import { t as q } from "./index-s6srEUqZ.js";
|
5
|
+
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
+
import { u as A } from "./index-SqBpMlb0.js";
|
7
|
+
import { useSnackbar as E } from "@feedmepos/ui-library";
|
8
|
+
import { u as W } from "./error-K1CakhA9.js";
|
9
|
+
import { z as J, a as X } from "./validator-D5jtpt9A.js";
|
10
|
+
import { useCoreStore as K } from "@feedmepos/mf-common";
|
11
|
+
const Z = /* @__PURE__ */ T({
|
12
|
+
__name: "Information",
|
13
|
+
props: {
|
14
|
+
terminal: {
|
15
|
+
type: Object,
|
16
|
+
required: !0
|
17
|
+
}
|
18
|
+
},
|
19
|
+
setup(g) {
|
20
|
+
return (s, a) => (I(), C(B, null, [
|
21
|
+
a[0] || (a[0] = w("b", null, "Name", -1)),
|
22
|
+
U(": " + G(g.terminal.name), 1),
|
23
|
+
a[1] || (a[1] = w("br", null, null, -1)),
|
24
|
+
a[2] || (a[2] = w("b", null, "Status", -1)),
|
25
|
+
U(": " + G(g.terminal.status), 1),
|
26
|
+
a[3] || (a[3] = w("br", null, null, -1)),
|
27
|
+
a[4] || (a[4] = w("b", null, "Device ID", -1)),
|
28
|
+
U(": " + G(g.terminal.deviceId ?? "-"), 1),
|
29
|
+
a[5] || (a[5] = w("br", null, null, -1)),
|
30
|
+
a[6] || (a[6] = w("b", null, "Device Type", -1)),
|
31
|
+
U(": " + G(g.terminal.deviceType ?? "-"), 1),
|
32
|
+
a[7] || (a[7] = w("br", null, null, -1))
|
33
|
+
], 64));
|
34
|
+
}
|
35
|
+
}), ee = {
|
36
|
+
key: 0,
|
37
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
38
|
+
}, ae = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ T({
|
39
|
+
__name: "TerminalGateway",
|
40
|
+
props: {
|
41
|
+
terminal: {
|
42
|
+
type: Object,
|
43
|
+
required: !0
|
44
|
+
},
|
45
|
+
onUpdate: {
|
46
|
+
type: Function,
|
47
|
+
required: !0
|
48
|
+
}
|
49
|
+
},
|
50
|
+
setup(g) {
|
51
|
+
const { isLoading: s, startAsyncCall: a } = D(), p = g, e = N(() => p.terminal), i = b(), r = b(), t = b(-1), o = b({
|
52
|
+
terminalId: ""
|
53
|
+
}), m = () => {
|
54
|
+
o.value.terminalId = "", t.value = -1;
|
55
|
+
}, u = () => {
|
56
|
+
if (a(async () => {
|
57
|
+
i.value = await q.getRestaurantTerminals(p.terminal.referenceId);
|
58
|
+
}), !p.terminal.ecrs)
|
59
|
+
return m();
|
60
|
+
const l = p.terminal.ecrs.findIndex((y) => y && y.gateway && y.gateway === "FeedMe");
|
61
|
+
if (l === -1)
|
62
|
+
return m();
|
63
|
+
t.value = l;
|
64
|
+
const d = p.terminal.ecrs.at(l);
|
65
|
+
d.gateway === "FeedMe" && d.config && (o.value = {
|
66
|
+
terminalId: d.config.terminalId
|
67
|
+
});
|
68
|
+
};
|
69
|
+
R(e, u), O(u);
|
70
|
+
const c = Y(() => (i.value ?? []).map((l) => ({
|
71
|
+
label: l.name ?? l._id,
|
72
|
+
value: l._id
|
73
|
+
})));
|
74
|
+
async function n(l) {
|
75
|
+
var d;
|
76
|
+
(d = p.terminal.ecrs) == null || d.splice(l, 1), p.onUpdate(p.terminal);
|
77
|
+
}
|
78
|
+
return (l, d) => {
|
79
|
+
const y = f("FmCircularProgress"), S = f("FmSelect"), v = f("FmButton"), h = f("FmForm");
|
80
|
+
return _(s) ? (I(), C("div", ee, [
|
81
|
+
F(y, { size: "xxl" })
|
82
|
+
])) : (I(), k(h, {
|
83
|
+
key: 1,
|
84
|
+
ref: r.value,
|
85
|
+
class: "flex flex-col gap-16 w-[500px]",
|
86
|
+
onValidationSuccess: d[1] || (d[1] = () => {
|
87
|
+
t.value > -1 ? e.value.ecrs[t.value] = { gateway: "FeedMe", config: o.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "FeedMe", config: o.value })), p.onUpdate(e.value);
|
88
|
+
})
|
89
|
+
}, {
|
90
|
+
default: M(() => [
|
91
|
+
F(S, {
|
92
|
+
modelValue: o.value.terminalId,
|
93
|
+
"onUpdate:modelValue": d[0] || (d[0] = (z) => o.value.terminalId = z),
|
94
|
+
label: "Terminal ID",
|
95
|
+
items: c.value,
|
96
|
+
rules: _(J)(_(X).string())
|
97
|
+
}, null, 8, ["modelValue", "items", "rules"]),
|
98
|
+
w("div", ae, [
|
99
|
+
t.value > -1 ? (I(), k(v, {
|
100
|
+
key: 0,
|
101
|
+
class: "flex-1",
|
102
|
+
variant: "secondary",
|
103
|
+
label: "Delete",
|
104
|
+
onclick: () => n(t.value)
|
105
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
106
|
+
F(v, {
|
107
|
+
type: "submit",
|
108
|
+
class: "flex-1",
|
109
|
+
variant: "primary",
|
110
|
+
label: "Save"
|
111
|
+
})
|
112
|
+
])
|
113
|
+
]),
|
114
|
+
_: 1
|
115
|
+
}, 512));
|
116
|
+
};
|
117
|
+
}
|
118
|
+
}), ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */ T({
|
119
|
+
__name: "FiuuGateway",
|
120
|
+
props: {
|
121
|
+
terminal: {
|
122
|
+
type: Object,
|
123
|
+
required: !0
|
124
|
+
},
|
125
|
+
onUpdate: {
|
126
|
+
type: Function,
|
127
|
+
required: !0
|
128
|
+
}
|
129
|
+
},
|
130
|
+
setup(g) {
|
131
|
+
const s = g, a = K().currentCountry, p = [
|
132
|
+
{
|
133
|
+
label: "Fiuu Malaysia",
|
134
|
+
value: "cc.feedme.payment.rms",
|
135
|
+
region: x.F_COUNTRY.enum.MY
|
136
|
+
},
|
137
|
+
{
|
138
|
+
label: "Fiuu Malaysia V2",
|
139
|
+
value: "cc.feedme.payment.fiuu_my",
|
140
|
+
region: x.F_COUNTRY.enum.MY
|
141
|
+
},
|
142
|
+
{
|
143
|
+
label: "Fiuu Singapore",
|
144
|
+
value: "cc.feedme.payment.fiuu_sg",
|
145
|
+
region: x.F_COUNTRY.enum.SG
|
146
|
+
}
|
147
|
+
], e = N(() => s.terminal), i = b(), r = b(-1), t = b({
|
148
|
+
packageId: "",
|
149
|
+
uniqueId: ""
|
150
|
+
}), o = () => {
|
151
|
+
t.value.uniqueId = "", t.value.packageId = "", r.value = -1;
|
152
|
+
}, m = () => {
|
153
|
+
if (!e.value.gateways)
|
154
|
+
return o();
|
155
|
+
const c = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Fiuu");
|
156
|
+
if (c === -1)
|
157
|
+
return o();
|
158
|
+
r.value = c;
|
159
|
+
const n = e.value.gateways.at(c);
|
160
|
+
n.gateway === "Fiuu" && n.config && (t.value = {
|
161
|
+
packageId: n.config.packageId,
|
162
|
+
uniqueId: n.config.uniqueId
|
163
|
+
});
|
164
|
+
};
|
165
|
+
R(e, m), O(m);
|
166
|
+
async function u(c) {
|
167
|
+
var n;
|
168
|
+
(n = e.value.gateways) == null || n.splice(c, 1), s.onUpdate(e.value);
|
169
|
+
}
|
170
|
+
return (c, n) => {
|
171
|
+
const l = f("FmSelect"), d = f("FmTextField"), y = f("FmButton"), S = f("FmForm");
|
172
|
+
return I(), k(S, {
|
173
|
+
ref: i.value,
|
174
|
+
class: "flex flex-col gap-16 w-[500px]",
|
175
|
+
onValidationSuccess: n[2] || (n[2] = () => {
|
176
|
+
r.value > -1 ? e.value.gateways[r.value] = { gateway: "Fiuu", config: t.value } : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push({ gateway: "Fiuu", config: t.value })), s.onUpdate(e.value);
|
177
|
+
})
|
178
|
+
}, {
|
179
|
+
default: M(() => [
|
180
|
+
F(l, {
|
181
|
+
modelValue: t.value.packageId,
|
182
|
+
"onUpdate:modelValue": n[0] || (n[0] = (v) => t.value.packageId = v),
|
183
|
+
label: "Package ID",
|
184
|
+
items: p.filter((v) => v.region === _(a))
|
185
|
+
}, null, 8, ["modelValue", "items"]),
|
186
|
+
F(d, {
|
187
|
+
modelValue: t.value.uniqueId,
|
188
|
+
"onUpdate:modelValue": n[1] || (n[1] = (v) => t.value.uniqueId = v),
|
189
|
+
label: "Unique ID"
|
190
|
+
}, null, 8, ["modelValue"]),
|
191
|
+
w("div", ne, [
|
192
|
+
r.value > -1 ? (I(), k(y, {
|
193
|
+
key: 0,
|
194
|
+
class: "flex-1",
|
195
|
+
variant: "secondary",
|
196
|
+
label: "Delete",
|
197
|
+
onclick: () => u(r.value)
|
198
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
199
|
+
F(y, {
|
200
|
+
type: "submit",
|
201
|
+
class: "flex-1",
|
202
|
+
variant: "primary",
|
203
|
+
label: "Save"
|
204
|
+
})
|
205
|
+
])
|
206
|
+
]),
|
207
|
+
_: 1
|
208
|
+
}, 512);
|
209
|
+
};
|
210
|
+
}
|
211
|
+
}), oe = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ T({
|
212
|
+
__name: "GhlGateway",
|
213
|
+
props: {
|
214
|
+
terminal: {
|
215
|
+
type: Object,
|
216
|
+
required: !0
|
217
|
+
},
|
218
|
+
onUpdate: {
|
219
|
+
type: Function,
|
220
|
+
required: !0
|
221
|
+
}
|
222
|
+
},
|
223
|
+
setup(g) {
|
224
|
+
const s = g, a = N(() => s.terminal), p = b(), e = b(-1), i = b({
|
225
|
+
merchantId: "",
|
226
|
+
terminalId: "",
|
227
|
+
privateKey: ""
|
228
|
+
}), r = () => {
|
229
|
+
i.value.merchantId = "", i.value.terminalId = "", i.value.privateKey = "", e.value = -1;
|
230
|
+
}, t = () => {
|
231
|
+
if (!a.value.ecrs)
|
232
|
+
return r();
|
233
|
+
const m = a.value.ecrs.findIndex((c) => c && c.gateway && c.gateway === "Ghl");
|
234
|
+
if (m === -1)
|
235
|
+
return r();
|
236
|
+
e.value = m;
|
237
|
+
const u = a.value.ecrs.at(m);
|
238
|
+
u.gateway === "Ghl" && u.config && (i.value = {
|
239
|
+
merchantId: u.config.merchantId,
|
240
|
+
terminalId: u.config.terminalId,
|
241
|
+
privateKey: u.config.privateKey
|
242
|
+
});
|
243
|
+
};
|
244
|
+
R(a, t), O(t);
|
245
|
+
async function o(m) {
|
246
|
+
var u;
|
247
|
+
(u = a.value.ecrs) == null || u.splice(m, 1), s.onUpdate(a.value);
|
248
|
+
}
|
249
|
+
return (m, u) => {
|
250
|
+
const c = f("FmTextField"), n = f("FmTextarea"), l = f("FmButton"), d = f("FmForm");
|
251
|
+
return I(), k(d, {
|
252
|
+
ref: p.value,
|
253
|
+
class: "flex flex-col gap-16 w-[500px]",
|
254
|
+
onValidationSuccess: u[3] || (u[3] = () => {
|
255
|
+
e.value > -1 ? a.value.ecrs[e.value] = { gateway: "Ghl", config: i.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: i.value })), s.onUpdate(a.value);
|
256
|
+
})
|
257
|
+
}, {
|
258
|
+
default: M(() => [
|
259
|
+
F(c, {
|
260
|
+
modelValue: i.value.merchantId,
|
261
|
+
"onUpdate:modelValue": u[0] || (u[0] = (y) => i.value.merchantId = y),
|
262
|
+
label: "Merchant ID"
|
263
|
+
}, null, 8, ["modelValue"]),
|
264
|
+
F(c, {
|
265
|
+
modelValue: i.value.terminalId,
|
266
|
+
"onUpdate:modelValue": u[1] || (u[1] = (y) => i.value.terminalId = y),
|
267
|
+
label: "Terminal ID"
|
268
|
+
}, null, 8, ["modelValue"]),
|
269
|
+
F(n, {
|
270
|
+
modelValue: i.value.privateKey,
|
271
|
+
"onUpdate:modelValue": u[2] || (u[2] = (y) => i.value.privateKey = y),
|
272
|
+
label: "Private Key"
|
273
|
+
}, null, 8, ["modelValue"]),
|
274
|
+
w("div", oe, [
|
275
|
+
e.value > -1 ? (I(), k(l, {
|
276
|
+
key: 0,
|
277
|
+
class: "flex-1",
|
278
|
+
variant: "secondary",
|
279
|
+
label: "Delete",
|
280
|
+
onclick: () => o(e.value)
|
281
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
282
|
+
F(l, {
|
283
|
+
type: "submit",
|
284
|
+
class: "flex-1",
|
285
|
+
variant: "primary",
|
286
|
+
label: "Save"
|
287
|
+
})
|
288
|
+
])
|
289
|
+
]),
|
290
|
+
_: 1
|
291
|
+
}, 512);
|
292
|
+
};
|
293
|
+
}
|
294
|
+
}), ue = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ T({
|
295
|
+
__name: "KioskMode",
|
296
|
+
props: {
|
297
|
+
terminal: {
|
298
|
+
type: Object,
|
299
|
+
required: !0
|
300
|
+
}
|
301
|
+
},
|
302
|
+
setup(g) {
|
303
|
+
const { isLoading: s, startAsyncCall: a } = D(!1), p = E(), e = b({
|
304
|
+
enable: !1,
|
305
|
+
password: []
|
306
|
+
}), i = g;
|
307
|
+
function r() {
|
308
|
+
return e.value.enable && e.value.password.filter((t) => !!t).length !== 6 ? p.open({
|
309
|
+
type: "error",
|
310
|
+
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
311
|
+
}) : a(async () => {
|
312
|
+
const t = { enable: e.value.enable };
|
313
|
+
t.enable && Object.assign(t, {
|
314
|
+
password: e.value.password.join("")
|
315
|
+
});
|
316
|
+
const o = await q.kioskModeRequest(i.terminal._id, t);
|
317
|
+
if (o === "OK")
|
318
|
+
return p.open({ type: "info", message: "Kiosk mode applied successfully." });
|
319
|
+
let m = o;
|
320
|
+
return o === "client_not_connected" && (m = "Terminal not connected to the websocket server."), o.startsWith("terminal: ") && (m = o.replaceAll("terminal: ", "")), p.open({
|
321
|
+
type: "error",
|
322
|
+
message: m
|
323
|
+
});
|
324
|
+
});
|
325
|
+
}
|
326
|
+
return (t, o) => {
|
327
|
+
const m = f("FmSwitch"), u = f("FmPinField"), c = f("FmButton");
|
328
|
+
return I(), C(B, null, [
|
329
|
+
F(m, {
|
330
|
+
modelValue: e.value.enable,
|
331
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => e.value.enable = n),
|
332
|
+
label: "Enable Kiosk Mode?"
|
333
|
+
}, null, 8, ["modelValue"]),
|
334
|
+
e.value.enable ? (I(), C("div", ue, [
|
335
|
+
o[2] || (o[2] = w("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
336
|
+
F(u, {
|
337
|
+
modelValue: e.value.password,
|
338
|
+
"onUpdate:modelValue": o[1] || (o[1] = (n) => e.value.password = n)
|
339
|
+
}, null, 8, ["modelValue"])
|
340
|
+
])) : V("", !0),
|
341
|
+
w("div", se, [
|
342
|
+
F(c, {
|
343
|
+
variant: "primary",
|
344
|
+
label: "Send",
|
345
|
+
icon: "send",
|
346
|
+
loading: _(s),
|
347
|
+
onclick: r
|
348
|
+
}, null, 8, ["loading"])
|
349
|
+
])
|
350
|
+
], 64);
|
351
|
+
};
|
352
|
+
}
|
353
|
+
}), me = /* @__PURE__ */ T({
|
354
|
+
__name: "SettingRequest",
|
355
|
+
props: {
|
356
|
+
terminal: {
|
357
|
+
type: Object,
|
358
|
+
required: !0
|
359
|
+
}
|
360
|
+
},
|
361
|
+
setup(g) {
|
362
|
+
const { settingTab: s } = A({
|
363
|
+
settingTab: "kiosk_mode"
|
364
|
+
}), a = [
|
365
|
+
{
|
366
|
+
label: "Kiosk Mode",
|
367
|
+
value: "kiosk_mode",
|
368
|
+
render: ie
|
369
|
+
}
|
370
|
+
], p = g, e = Y(() => a.find((i) => i.value === s.value));
|
371
|
+
return (i, r) => {
|
372
|
+
var o;
|
373
|
+
const t = f("FmTabs");
|
374
|
+
return I(), C(B, null, [
|
375
|
+
r[1] || (r[1] = w("p", { className: "mt-1 my-6 text-gray-600" }, [
|
376
|
+
w("b", null, "Note: "),
|
377
|
+
U(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
378
|
+
], -1)),
|
379
|
+
F(t, {
|
380
|
+
"model-value": _(s),
|
381
|
+
"onUpdate:modelValue": r[0] || (r[0] = (m) => P(s) ? s.value = m : null),
|
382
|
+
class: "mb-6",
|
383
|
+
items: a
|
384
|
+
}, null, 8, ["model-value"]),
|
385
|
+
_(s) ? (I(), k($((o = e.value) == null ? void 0 : o.render), j(L({ key: 0 }, { terminal: p.terminal })), null, 16)) : V("", !0)
|
386
|
+
], 64);
|
387
|
+
};
|
388
|
+
}
|
389
|
+
}), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */ T({
|
390
|
+
__name: "SoftspaceGateway",
|
391
|
+
props: {
|
392
|
+
terminal: {
|
393
|
+
type: Object,
|
394
|
+
required: !0
|
395
|
+
},
|
396
|
+
onUpdate: {
|
397
|
+
type: Function,
|
398
|
+
required: !0
|
399
|
+
}
|
400
|
+
},
|
401
|
+
setup(g) {
|
402
|
+
const s = g, a = K().currentCountry, p = [
|
403
|
+
{
|
404
|
+
label: "Softspace Malaysia",
|
405
|
+
value: "cc.feedme.payment.softspace_my",
|
406
|
+
region: x.F_COUNTRY.enum.MY
|
407
|
+
}
|
408
|
+
], e = N(() => s.terminal), i = b(), r = b(-1), t = b({
|
409
|
+
packageId: "",
|
410
|
+
uniqueId: ""
|
411
|
+
}), o = () => {
|
412
|
+
t.value.uniqueId = "", t.value.packageId = "", r.value = -1;
|
413
|
+
}, m = () => {
|
414
|
+
if (!e.value.gateways)
|
415
|
+
return o();
|
416
|
+
const c = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Softspace");
|
417
|
+
if (c === -1)
|
418
|
+
return o();
|
419
|
+
r.value = c;
|
420
|
+
const n = e.value.gateways.at(c);
|
421
|
+
n.gateway === "Softspace" && n.config && (t.value = {
|
422
|
+
packageId: n.config.packageId,
|
423
|
+
uniqueId: n.config.uniqueId
|
424
|
+
});
|
425
|
+
};
|
426
|
+
R(e, m), O(m);
|
427
|
+
async function u(c) {
|
428
|
+
var n;
|
429
|
+
(n = e.value.gateways) == null || n.splice(c, 1), s.onUpdate(e.value);
|
430
|
+
}
|
431
|
+
return (c, n) => {
|
432
|
+
const l = f("FmSelect"), d = f("FmTextField"), y = f("FmButton"), S = f("FmForm");
|
433
|
+
return I(), k(S, {
|
434
|
+
ref: i.value,
|
435
|
+
class: "flex flex-col gap-16 w-[500px]",
|
436
|
+
onValidationSuccess: n[2] || (n[2] = () => {
|
437
|
+
r.value > -1 ? e.value.gateways[r.value] = { gateway: "Softspace", config: t.value } : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push({ gateway: "Softspace", config: t.value })), s.onUpdate(e.value);
|
438
|
+
})
|
439
|
+
}, {
|
440
|
+
default: M(() => [
|
441
|
+
F(l, {
|
442
|
+
modelValue: t.value.packageId,
|
443
|
+
"onUpdate:modelValue": n[0] || (n[0] = (v) => t.value.packageId = v),
|
444
|
+
label: "Package ID",
|
445
|
+
items: p.filter((v) => v.region === _(a))
|
446
|
+
}, null, 8, ["modelValue", "items"]),
|
447
|
+
F(d, {
|
448
|
+
modelValue: t.value.uniqueId,
|
449
|
+
"onUpdate:modelValue": n[1] || (n[1] = (v) => t.value.uniqueId = v),
|
450
|
+
label: "Unique ID"
|
451
|
+
}, null, 8, ["modelValue"]),
|
452
|
+
w("div", ce, [
|
453
|
+
r.value > -1 ? (I(), k(y, {
|
454
|
+
key: 0,
|
455
|
+
class: "flex-1",
|
456
|
+
variant: "secondary",
|
457
|
+
label: "Delete",
|
458
|
+
onclick: () => u(r.value)
|
459
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
460
|
+
F(y, {
|
461
|
+
type: "submit",
|
462
|
+
class: "flex-1",
|
463
|
+
variant: "primary",
|
464
|
+
label: "Save"
|
465
|
+
})
|
466
|
+
])
|
467
|
+
]),
|
468
|
+
_: 1
|
469
|
+
}, 512);
|
470
|
+
};
|
471
|
+
}
|
472
|
+
}), ke = /* @__PURE__ */ T({
|
473
|
+
__name: "TerminalSetting",
|
474
|
+
props: {
|
475
|
+
terminalId: {
|
476
|
+
type: String,
|
477
|
+
required: !0
|
478
|
+
}
|
479
|
+
},
|
480
|
+
setup(g) {
|
481
|
+
const s = g, { tab: a } = A({
|
482
|
+
tab: "information"
|
483
|
+
}), { isLoading: p, startAsyncCall: e } = D(!0), i = H(), r = E(), t = b();
|
484
|
+
async function o(l) {
|
485
|
+
e(async () => {
|
486
|
+
try {
|
487
|
+
await q.updateById(
|
488
|
+
s.terminalId,
|
489
|
+
{
|
490
|
+
name: l.name,
|
491
|
+
status: l.status,
|
492
|
+
ecrs: l.ecrs ?? [],
|
493
|
+
gateways: l.gateways ?? []
|
494
|
+
}
|
495
|
+
), t.value = await q.readById(s.terminalId), r.open({
|
496
|
+
type: "success",
|
497
|
+
message: "Terminal updated successfully"
|
498
|
+
});
|
499
|
+
} catch (d) {
|
500
|
+
r.open({
|
501
|
+
type: "error",
|
502
|
+
title: "Error occurs when update terminal",
|
503
|
+
message: W(d)
|
504
|
+
});
|
505
|
+
}
|
506
|
+
});
|
507
|
+
}
|
508
|
+
const m = [
|
509
|
+
{
|
510
|
+
label: "Information",
|
511
|
+
value: "information",
|
512
|
+
icon: "overview",
|
513
|
+
render: Z
|
514
|
+
},
|
515
|
+
{
|
516
|
+
label: "Setting Request",
|
517
|
+
value: "settings",
|
518
|
+
icon: "settings",
|
519
|
+
render: me,
|
520
|
+
onlyFor: ["TERMINAL"]
|
521
|
+
},
|
522
|
+
{
|
523
|
+
label: "Fiuu",
|
524
|
+
value: "fiuu",
|
525
|
+
icon: "payment",
|
526
|
+
render: le,
|
527
|
+
region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
|
528
|
+
},
|
529
|
+
{
|
530
|
+
label: "Softspace",
|
531
|
+
value: "softspace",
|
532
|
+
icon: "payment",
|
533
|
+
render: de,
|
534
|
+
region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
|
535
|
+
},
|
536
|
+
{
|
537
|
+
label: "FeedMe Terminal",
|
538
|
+
value: "terminal",
|
539
|
+
icon: "shopping_cart_checkout",
|
540
|
+
render: te,
|
541
|
+
onlyFor: ["POS", "KIOSK"]
|
542
|
+
},
|
543
|
+
{
|
544
|
+
label: "GHL Terminal (V2)",
|
545
|
+
value: "ghl",
|
546
|
+
icon: "shopping_cart_checkout",
|
547
|
+
render: re,
|
548
|
+
onlyFor: ["POS", "KIOSK"],
|
549
|
+
region: [x.F_COUNTRY.enum.MY]
|
550
|
+
}
|
551
|
+
], u = K().currentCountry, c = Y(() => {
|
552
|
+
var l;
|
553
|
+
return (l = m.find((d) => d.value === a.value)) == null ? void 0 : l.render;
|
554
|
+
});
|
555
|
+
async function n() {
|
556
|
+
e(async () => {
|
557
|
+
t.value = await q.readById(s.terminalId);
|
558
|
+
});
|
559
|
+
}
|
560
|
+
return O(n), (l, d) => {
|
561
|
+
var S;
|
562
|
+
const y = f("FmTabs");
|
563
|
+
return I(), k(Q, {
|
564
|
+
title: `Terminal (${(S = t.value) == null ? void 0 : S._id})`,
|
565
|
+
loading: _(p),
|
566
|
+
onBack: _(i).back
|
567
|
+
}, {
|
568
|
+
default: M(() => [
|
569
|
+
F(y, {
|
570
|
+
"model-value": _(a),
|
571
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => P(a) ? a.value = v : null),
|
572
|
+
class: "mb-6",
|
573
|
+
items: m.filter((v) => !v.onlyFor || v.onlyFor.includes(t.value.deviceType)).filter((v) => !v.region || v.region.includes(_(u) ?? _(x.F_COUNTRY).enum.MY))
|
574
|
+
}, null, 8, ["model-value", "items"]),
|
575
|
+
_(a) ? (I(), k($(c.value), j(L({ key: 0 }, {
|
576
|
+
terminal: t.value,
|
577
|
+
onUpdate: o
|
578
|
+
})), null, 16)) : V("", !0)
|
579
|
+
]),
|
580
|
+
_: 1
|
581
|
+
}, 8, ["title", "loading", "onBack"]);
|
582
|
+
};
|
583
|
+
}
|
584
|
+
});
|
585
|
+
export {
|
586
|
+
ke as default
|
587
|
+
};
|
@@ -1,16 +1,17 @@
|
|
1
1
|
import { defineComponent as B, ref as g, watch as E, computed as I, onMounted as J, resolveComponent as b, openBlock as v, createElementBlock as P, Fragment as Y, unref as t, createBlock as N, createCommentVNode as O, withCtx as T, createVNode as i, renderList as k, createElementVNode as V, isRef as y } from "vue";
|
2
|
-
import { t as L, b as G } from "./assets-
|
3
|
-
import { u as K
|
4
|
-
import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-
|
2
|
+
import { t as L, b as G } from "./assets-BAvqcM2y.js";
|
3
|
+
import { u as K } from "./index-B4xE-ETp.js";
|
4
|
+
import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-PXvQ-nrK.js";
|
5
5
|
import { h as $ } from "./moment-h96o7c8I.js";
|
6
6
|
import { useI18n as j, useCoreStore as q } from "@feedmepos/mf-common";
|
7
7
|
import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
|
-
import { u as W } from "./index-
|
8
|
+
import { u as W } from "./index-SqBpMlb0.js";
|
9
9
|
import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
10
10
|
import { _ as Z } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
11
11
|
import { _ as ee } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
12
|
-
import { p as te } from "./index-
|
13
|
-
import { t as ae } from "./index-
|
12
|
+
import { p as te } from "./index-DXzezAJQ.js";
|
13
|
+
import { t as ae } from "./index-s6srEUqZ.js";
|
14
|
+
import { _ as C } from "./index-DtHh0OLe.js";
|
14
15
|
const ne = /* @__PURE__ */ B({
|
15
16
|
__name: "SourceSelector",
|
16
17
|
props: {
|
@@ -111,7 +112,7 @@ const ne = /* @__PURE__ */ B({
|
|
111
112
|
], 64);
|
112
113
|
};
|
113
114
|
}
|
114
|
-
}), le = { class: "flex justify-between mb-6 items-center" }, oe = { class: "flex space-x-8 items-start" }, se = { class: "flex space-x-4 self-center" }, re = { class: "flex space-x-12 mb-6" },
|
115
|
+
}), le = { class: "flex justify-between mb-6 items-center" }, oe = { class: "flex space-x-8 items-start" }, se = { class: "flex space-x-4 self-center" }, re = { class: "flex space-x-12 mb-6" }, Ne = /* @__PURE__ */ B({
|
115
116
|
__name: "Transaction",
|
116
117
|
setup(z) {
|
117
118
|
const { isLoading: x, startAsyncCall: F } = K(!0), { currentBusiness: f } = q(), { t: s } = j(), { dateRange: m, searchKey: r, status: l, id: c, by: p } = W({
|
@@ -246,5 +247,5 @@ const ne = /* @__PURE__ */ B({
|
|
246
247
|
}
|
247
248
|
});
|
248
249
|
export {
|
249
|
-
|
250
|
+
Ne as default
|
250
251
|
};
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import { defineComponent as b, resolveComponent as h, openBlock as m, createBlock as F, normalizeClass as R, withCtx as w, createElementVNode as _, toDisplayString as V, createElementBlock as S, unref as d, createVNode as f, Fragment as Y, renderList as C, ref as O, watch as v, isRef as I, h as y } from "vue";
|
2
|
-
import { g as P, a as U, t as g, b as B, c as N } from "./assets-
|
2
|
+
import { g as P, a as U, t as g, b as B, c as N } from "./assets-BAvqcM2y.js";
|
3
3
|
import { h as T } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as G } from "./index-
|
4
|
+
import { u as G } from "./index-SqBpMlb0.js";
|
5
5
|
import { _ as L } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
6
6
|
import { _ as j } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
7
7
|
import { useSnackbar as Q, useDialog as z } from "@feedmepos/ui-library";
|
8
8
|
import { w as k } from "./Modal-DB8M9o1T.js";
|
9
9
|
import { u as x } from "./error-K1CakhA9.js";
|
10
10
|
import { _ as H } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
11
|
-
import { g as J } from "./grafana-
|
12
|
-
import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-
|
13
|
-
import { e as D } from "./index-
|
11
|
+
import { g as J } from "./grafana-XJlaGQ8C.js";
|
12
|
+
import { _ as W } from "./index.vue_vue_type_script_setup_true_lang-aFl1Lbk1.js";
|
13
|
+
import { e as D } from "./index-B4xE-ETp.js";
|
14
14
|
import { _ as X } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
15
15
|
const Z = /* @__PURE__ */ b({
|
16
16
|
__name: "Status",
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as T, ref as y, onMounted as Y, watch as f, resolveComponent as V, openBlock as C, createBlock as M, unref as t, withCtx as O, createElementVNode as u, createVNode as i, isRef as h } from "vue";
|
2
|
-
import { t as g, b as S } from "./assets-
|
3
|
-
import { u as $ } from "./index-
|
4
|
-
import { _ as N } from "./TransactionTable.vue_vue_type_script_setup_true_lang-
|
2
|
+
import { t as g, b as S } from "./assets-BAvqcM2y.js";
|
3
|
+
import { u as $ } from "./index-B4xE-ETp.js";
|
4
|
+
import { _ as N } from "./TransactionTable.vue_vue_type_script_setup_true_lang-PXvQ-nrK.js";
|
5
5
|
import { h as x } from "./moment-h96o7c8I.js";
|
6
6
|
import { useCoreStore as k, useI18n as E } from "@feedmepos/mf-common";
|
7
7
|
import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
|
-
import { u as P } from "./index-
|
8
|
+
import { u as P } from "./index-SqBpMlb0.js";
|
9
9
|
import { _ as A } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
10
10
|
import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DyLnqQYe.js";
|
11
11
|
import { _ as F } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { defineComponent as m, resolveComponent as d, openBlock as l, createBlock as f, normalizeClass as v, withCtx as y, createElementVNode as x, toDisplayString as P, createElementBlock as w, unref as E, createVNode as q, Fragment as R, renderList as V, ref as D, h as p } from "vue";
|
2
2
|
import { useSnackbar as U, useDialog as B } from "@feedmepos/ui-library";
|
3
|
-
import { g as $, a as L, t as b, c as N } from "./assets-
|
4
|
-
import { e as h } from "./index-
|
5
|
-
import { g as G } from "./grafana-
|
3
|
+
import { g as $, a as L, t as b, c as N } from "./assets-BAvqcM2y.js";
|
4
|
+
import { e as h } from "./index-B4xE-ETp.js";
|
5
|
+
import { g as G } from "./grafana-XJlaGQ8C.js";
|
6
6
|
import { w as k } from "./Modal-DB8M9o1T.js";
|
7
7
|
import { u as T } from "./error-K1CakhA9.js";
|
8
8
|
import { useCoreStore as O, useI18n as Y } from "@feedmepos/mf-common";
|