@feedmepos/mf-payment 1.3.19 → 1.3.20
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/{OnboardForm-DPP9sDQZ.js → OnboardForm-BXyoazh5.js} +131 -126
- package/dist/OnboardForm-Kg41JzfR.js +774 -0
- package/dist/{OnboardSubmission-DXUcu1dt.js → OnboardSubmission-DYxlgxNk.js} +1 -1
- package/dist/{OnboardSubmission-BAl9Ow45.js → OnboardSubmission-Dc7x4iX2.js} +1 -1
- package/dist/{PayoutAccount-CXDYrAd3.js → PayoutAccount-BGp3dZty.js} +3 -3
- package/dist/{PayoutAccount-NSgjtEeb.js → PayoutAccount-BsG-nuC9.js} +1 -1
- package/dist/{TerminalSetting-CmpDYU7f.js → TerminalSetting-7tjf9xaV.js} +89 -89
- package/dist/{app-BNDwaB8P.js → app-CQEW3s-w.js} +10 -10
- package/dist/app.js +1 -1
- package/dist/components/ImagePreview.vue.d.ts +13 -0
- package/dist/{index-D1aKlCrl.js → index-BA8uBmty.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-B5NqmtVV.js → payout-account-D0urRPdK.js} +2 -2
- package/dist/{plugins-P9PV_l1I.js → plugins-CHAPQLQ_.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/onboard-submission/cell/UploadButton.vue.d.ts +9 -2
- package/package.json +1 -1
- package/dist/OnboardForm-Dwj9j1vz.js +0 -673
@@ -3,7 +3,7 @@ import { _ as q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js
|
|
3
3
|
import { u as G, p as J, e as L } from "./index-CJPiBIRm.js";
|
4
4
|
import { useI18n as K, useCoreStore as Q } from "@feedmepos/mf-common";
|
5
5
|
import { _ as X } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DyLnqQYe.js";
|
6
|
-
import { o as Z } from "./index-
|
6
|
+
import { o as Z } from "./index-BA8uBmty.js";
|
7
7
|
import { useRouter as w } from "vue-router";
|
8
8
|
import { i as ss } from "./softspace-25X2bjBx.js";
|
9
9
|
const es = { class: "flex justify-left items-center mb-6" }, ts = { class: "grid grid-cols-3 gap-6" }, os = { class: "flex items-center" }, ns = ["src"], is = { class: "px-16 text-sm flex-grow" }, rs = { class: "list-disc pl-6" }, ms = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { defineComponent as A, ref as V, watch as v, computed as p, resolveComponent as x, openBlock as h, createBlock as w, withCtx as f, createElementVNode as S, createVNode as r, unref as l, isRef as n, h as k } from "vue";
|
2
|
-
import { o as K } from "./index-
|
2
|
+
import { o as K } from "./index-BA8uBmty.js";
|
3
3
|
import { p as m } from "./index-CJPiBIRm.js";
|
4
4
|
import { _ as O } from "./index.vue_vue_type_script_setup_true_lang-CaVufHjO.js";
|
5
5
|
import { useRouter as F } from "vue-router";
|
@@ -3,12 +3,12 @@ import { p as K } from "./index-DZYRliw9.js";
|
|
3
3
|
import { p as U, u as gA, e as lA } from "./index-CJPiBIRm.js";
|
4
4
|
import { defineStore as rA } from "pinia";
|
5
5
|
import { useI18n as R, useCoreStore as eA } from "@feedmepos/mf-common";
|
6
|
-
import { c as cA, a as _, P as J } from "./payout-account-
|
6
|
+
import { c as cA, a as _, P as J } from "./payout-account-D0urRPdK.js";
|
7
7
|
import { useDialogChild as nA, useDialog as BA } from "@feedmepos/ui-library";
|
8
8
|
import { z as F, a as H } from "./validator-D5jtpt9A.js";
|
9
9
|
import { P as $ } from "./PDFViewer-DlSCBBxr.js";
|
10
|
-
import "./app-
|
11
|
-
import "./plugins-
|
10
|
+
import "./app-CQEW3s-w.js";
|
11
|
+
import "./plugins-CHAPQLQ_.js";
|
12
12
|
import { _ as uA } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
13
13
|
function wA() {
|
14
14
|
return {
|
@@ -2,7 +2,7 @@ import { defineComponent as y, resolveComponent as u, openBlock as h, createBloc
|
|
2
2
|
import { u as O } from "./index-98tll3Hu.js";
|
3
3
|
import { p as K } from "./index-CJPiBIRm.js";
|
4
4
|
import { _ as A } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
5
|
-
import { P as V } from "./payout-account-
|
5
|
+
import { P as V } from "./payout-account-D0urRPdK.js";
|
6
6
|
import { p as D } from "./index-DZYRliw9.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
8
|
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-CaVufHjO.js";
|
@@ -17,7 +17,7 @@ const te = /* @__PURE__ */ V({
|
|
17
17
|
}
|
18
18
|
},
|
19
19
|
setup(F) {
|
20
|
-
return (
|
20
|
+
return (m, a) => (f(), N(M, null, [
|
21
21
|
a[0] || (a[0] = _("b", null, "Name", -1)),
|
22
22
|
A(": " + h(F.terminal.name), 1),
|
23
23
|
a[1] || (a[1] = _("br", null, null, -1)),
|
@@ -41,20 +41,20 @@ const te = /* @__PURE__ */ V({
|
|
41
41
|
}
|
42
42
|
},
|
43
43
|
setup(F) {
|
44
|
-
const { isLoading:
|
44
|
+
const { isLoading: m, startAsyncCall: a } = z(!1), b = Q(), n = I({
|
45
45
|
enable: !1,
|
46
46
|
password: []
|
47
47
|
}), r = F;
|
48
48
|
function e() {
|
49
|
-
return n.value.enable && n.value.password.filter((
|
49
|
+
return n.value.enable && n.value.password.filter((d) => !!d).length !== 6 ? b.open({
|
50
50
|
type: "error",
|
51
51
|
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
52
52
|
}) : a(async () => {
|
53
|
-
const
|
54
|
-
|
53
|
+
const d = { enable: n.value.enable };
|
54
|
+
d.enable && Object.assign(d, {
|
55
55
|
password: n.value.password.join("")
|
56
56
|
});
|
57
|
-
const s = await D.kioskModeRequest(r.terminal._id,
|
57
|
+
const s = await D.kioskModeRequest(r.terminal._id, d);
|
58
58
|
if (s === "OK")
|
59
59
|
return b.open({ type: "info", message: "Kiosk mode applied successfully." });
|
60
60
|
let y = s;
|
@@ -64,7 +64,7 @@ const te = /* @__PURE__ */ V({
|
|
64
64
|
});
|
65
65
|
});
|
66
66
|
}
|
67
|
-
return (
|
67
|
+
return (d, s) => {
|
68
68
|
const y = g("FmSwitch"), c = g("FmPinField"), i = g("FmButton");
|
69
69
|
return f(), N(M, null, [
|
70
70
|
v(y, {
|
@@ -84,7 +84,7 @@ const te = /* @__PURE__ */ V({
|
|
84
84
|
variant: "primary",
|
85
85
|
label: "Send",
|
86
86
|
icon: "send",
|
87
|
-
loading: S(
|
87
|
+
loading: S(m),
|
88
88
|
onclick: e
|
89
89
|
}, null, 8, ["loading"])
|
90
90
|
])
|
@@ -100,7 +100,7 @@ const te = /* @__PURE__ */ V({
|
|
100
100
|
}
|
101
101
|
},
|
102
102
|
setup(F) {
|
103
|
-
const { settingTab:
|
103
|
+
const { settingTab: m } = E({
|
104
104
|
settingTab: "kiosk_mode"
|
105
105
|
}), a = [
|
106
106
|
{
|
@@ -108,22 +108,22 @@ const te = /* @__PURE__ */ V({
|
|
108
108
|
value: "kiosk_mode",
|
109
109
|
render: oe
|
110
110
|
}
|
111
|
-
], b = F, n = q(() => a.find((r) => r.value ===
|
111
|
+
], b = F, n = q(() => a.find((r) => r.value === m.value));
|
112
112
|
return (r, e) => {
|
113
113
|
var s;
|
114
|
-
const
|
114
|
+
const d = g("FmTabs");
|
115
115
|
return f(), N(M, null, [
|
116
116
|
e[1] || (e[1] = _("p", { className: "mt-1 my-6 text-gray-600" }, [
|
117
117
|
_("b", null, "Note: "),
|
118
118
|
A(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
119
119
|
], -1)),
|
120
|
-
v(
|
121
|
-
"model-value": S(
|
122
|
-
"onUpdate:modelValue": e[0] || (e[0] = (y) => B(
|
120
|
+
v(d, {
|
121
|
+
"model-value": S(m),
|
122
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => B(m) ? m.value = y : null),
|
123
123
|
class: "mb-6",
|
124
124
|
items: a
|
125
125
|
}, null, 8, ["model-value"]),
|
126
|
-
S(
|
126
|
+
S(m) ? (f(), w(Y((s = n.value) == null ? void 0 : s.render), K(L({ key: 0 }, { terminal: b.terminal })), null, 16)) : C("", !0)
|
127
127
|
], 64);
|
128
128
|
};
|
129
129
|
}
|
@@ -143,7 +143,7 @@ const te = /* @__PURE__ */ V({
|
|
143
143
|
}
|
144
144
|
},
|
145
145
|
setup(F) {
|
146
|
-
const
|
146
|
+
const m = F, a = j().currentCountry, b = [
|
147
147
|
{
|
148
148
|
label: "Fiuu Malaysia",
|
149
149
|
value: "cc.feedme.payment.rms",
|
@@ -178,19 +178,19 @@ const te = /* @__PURE__ */ V({
|
|
178
178
|
gateway: "Digio",
|
179
179
|
region: U.F_COUNTRY.enum.TH
|
180
180
|
}
|
181
|
-
], n = R(() =>
|
181
|
+
], n = R(() => m.terminal), r = I(), e = I({
|
182
182
|
packageId: "",
|
183
183
|
uniqueId: "",
|
184
184
|
developerId: "",
|
185
185
|
isUat: !1
|
186
|
-
}),
|
186
|
+
}), d = () => {
|
187
187
|
e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "";
|
188
188
|
}, s = () => {
|
189
189
|
if (!n.value.gateways || n.value.gateways.length === 0)
|
190
|
-
return
|
190
|
+
return d();
|
191
191
|
const t = n.value.gateways[0];
|
192
192
|
if (!t.config)
|
193
|
-
return
|
193
|
+
return d();
|
194
194
|
switch (t.gateway) {
|
195
195
|
case "Fiuu":
|
196
196
|
e.value = {
|
@@ -215,7 +215,7 @@ const te = /* @__PURE__ */ V({
|
|
215
215
|
$(n, s), O(s);
|
216
216
|
async function y(t) {
|
217
217
|
var l;
|
218
|
-
(l = n.value.gateways) == null || l.splice(t, 1),
|
218
|
+
(l = n.value.gateways) == null || l.splice(t, 1), m.onUpdate(n.value);
|
219
219
|
}
|
220
220
|
const c = q(() => b.filter((t) => t.region === a.value)), i = q(() => c.value.find((t) => t.value === e.value.packageId));
|
221
221
|
return (t, l) => {
|
@@ -236,7 +236,7 @@ const te = /* @__PURE__ */ V({
|
|
236
236
|
uniqueId: H
|
237
237
|
}
|
238
238
|
};
|
239
|
-
(!n.value.gateways || n.value.gateways.length > 1) && (n.value.gateways = []), n.value.gateways[0] = J,
|
239
|
+
(!n.value.gateways || n.value.gateways.length > 1) && (n.value.gateways = []), n.value.gateways[0] = J, m.onUpdate(n.value);
|
240
240
|
})
|
241
241
|
}, {
|
242
242
|
default: P(() => [
|
@@ -307,10 +307,10 @@ const te = /* @__PURE__ */ V({
|
|
307
307
|
}
|
308
308
|
},
|
309
309
|
setup(F) {
|
310
|
-
const { isLoading:
|
310
|
+
const { isLoading: m, startAsyncCall: a } = z(), b = F, n = R(() => b.terminal), r = I(), e = I(), d = I(-1), s = I({
|
311
311
|
terminalId: ""
|
312
312
|
}), y = () => {
|
313
|
-
s.value.terminalId = "",
|
313
|
+
s.value.terminalId = "", d.value = -1;
|
314
314
|
}, c = () => {
|
315
315
|
if (a(async () => {
|
316
316
|
r.value = await D.getRestaurantTerminals(b.terminal.referenceId);
|
@@ -319,7 +319,7 @@ const te = /* @__PURE__ */ V({
|
|
319
319
|
const l = b.terminal.ecrs.findIndex((p) => p && p.gateway && p.gateway === "FeedMe");
|
320
320
|
if (l === -1)
|
321
321
|
return y();
|
322
|
-
|
322
|
+
d.value = l;
|
323
323
|
const u = b.terminal.ecrs.at(l);
|
324
324
|
u.gateway === "FeedMe" && u.config && (s.value = {
|
325
325
|
terminalId: u.config.terminalId
|
@@ -336,14 +336,14 @@ const te = /* @__PURE__ */ V({
|
|
336
336
|
}
|
337
337
|
return (l, u) => {
|
338
338
|
const p = g("FmCircularProgress"), x = g("FmSelect"), o = g("FmButton"), T = g("FmForm");
|
339
|
-
return S(
|
339
|
+
return S(m) ? (f(), N("div", ce, [
|
340
340
|
v(p, { size: "xxl" })
|
341
341
|
])) : (f(), w(T, {
|
342
342
|
key: 1,
|
343
343
|
ref: e.value,
|
344
344
|
class: "flex flex-col gap-16 w-[500px]",
|
345
345
|
onValidationSuccess: u[1] || (u[1] = () => {
|
346
|
-
|
346
|
+
d.value > -1 ? n.value.ecrs[d.value] = { gateway: "FeedMe", config: s.value } : (n.value.ecrs || (n.value.ecrs = []), n.value.ecrs.push({ gateway: "FeedMe", config: s.value })), b.onUpdate(n.value);
|
347
347
|
})
|
348
348
|
}, {
|
349
349
|
default: P(() => [
|
@@ -355,12 +355,12 @@ const te = /* @__PURE__ */ V({
|
|
355
355
|
rules: S(ee)(S(ae).string())
|
356
356
|
}, null, 8, ["modelValue", "items", "rules"]),
|
357
357
|
_("div", de, [
|
358
|
-
|
358
|
+
d.value > -1 ? (f(), w(o, {
|
359
359
|
key: 0,
|
360
360
|
class: "flex-1",
|
361
361
|
variant: "secondary",
|
362
362
|
label: "Delete",
|
363
|
-
onclick: () => t(
|
363
|
+
onclick: () => t(d.value)
|
364
364
|
}, null, 8, ["onclick"])) : C("", !0),
|
365
365
|
v(o, {
|
366
366
|
type: "submit",
|
@@ -387,13 +387,13 @@ const te = /* @__PURE__ */ V({
|
|
387
387
|
}
|
388
388
|
},
|
389
389
|
setup(F) {
|
390
|
-
const
|
390
|
+
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I({
|
391
391
|
merchantId: "",
|
392
392
|
terminalId: "",
|
393
393
|
privateKey: ""
|
394
394
|
}), e = () => {
|
395
395
|
r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", n.value = -1;
|
396
|
-
},
|
396
|
+
}, d = () => {
|
397
397
|
if (!a.value.ecrs)
|
398
398
|
return e();
|
399
399
|
const y = a.value.ecrs.findIndex((i) => i && i.gateway && i.gateway === "Ghl");
|
@@ -407,10 +407,10 @@ const te = /* @__PURE__ */ V({
|
|
407
407
|
privateKey: c.config.privateKey
|
408
408
|
});
|
409
409
|
};
|
410
|
-
$(a,
|
410
|
+
$(a, d), O(d);
|
411
411
|
async function s(y) {
|
412
412
|
var c;
|
413
|
-
(c = a.value.ecrs) == null || c.splice(y, 1),
|
413
|
+
(c = a.value.ecrs) == null || c.splice(y, 1), m.onUpdate(a.value);
|
414
414
|
}
|
415
415
|
return (y, c) => {
|
416
416
|
const i = g("FmTextField"), t = g("FmTextarea"), l = g("FmButton"), u = g("FmForm");
|
@@ -418,7 +418,7 @@ const te = /* @__PURE__ */ V({
|
|
418
418
|
ref: b.value,
|
419
419
|
class: "flex flex-col gap-16 w-[500px]",
|
420
420
|
onValidationSuccess: c[3] || (c[3] = () => {
|
421
|
-
n.value > -1 ? a.value.ecrs[n.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })),
|
421
|
+
n.value > -1 ? a.value.ecrs[n.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })), m.onUpdate(a.value);
|
422
422
|
})
|
423
423
|
}, {
|
424
424
|
default: P(() => [
|
@@ -472,19 +472,19 @@ const te = /* @__PURE__ */ V({
|
|
472
472
|
}
|
473
473
|
},
|
474
474
|
setup(F) {
|
475
|
-
const
|
475
|
+
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
476
476
|
ip: "",
|
477
477
|
receiptName: "",
|
478
478
|
cardTypes: []
|
479
|
-
}),
|
479
|
+
}), d = () => {
|
480
480
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
481
481
|
}, s = () => {
|
482
482
|
var u;
|
483
483
|
if (!a.value.ecrIntegrations)
|
484
|
-
return
|
484
|
+
return d();
|
485
485
|
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank");
|
486
486
|
if (t === -1)
|
487
|
-
return
|
487
|
+
return d();
|
488
488
|
n.value = t;
|
489
489
|
const l = i.at(t);
|
490
490
|
l.gateway === "Maybank" && l.config && (e.value = {
|
@@ -496,7 +496,7 @@ const te = /* @__PURE__ */ V({
|
|
496
496
|
$(a, s), O(s);
|
497
497
|
async function y(i) {
|
498
498
|
var t;
|
499
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1),
|
499
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
500
500
|
}
|
501
501
|
async function c() {
|
502
502
|
e.value.cardTypes.push(r.value), r.value = "";
|
@@ -523,7 +523,7 @@ const te = /* @__PURE__ */ V({
|
|
523
523
|
dialogConfig: {
|
524
524
|
cardTypes: e.value.cardTypes
|
525
525
|
}
|
526
|
-
})),
|
526
|
+
})), m.onUpdate(a.value);
|
527
527
|
})
|
528
528
|
}, {
|
529
529
|
default: P(() => [
|
@@ -592,19 +592,19 @@ const te = /* @__PURE__ */ V({
|
|
592
592
|
}
|
593
593
|
},
|
594
594
|
setup(F) {
|
595
|
-
const
|
595
|
+
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
596
596
|
ip: "",
|
597
597
|
receiptName: "",
|
598
598
|
cardTypes: []
|
599
|
-
}),
|
599
|
+
}), d = () => {
|
600
600
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
601
601
|
}, s = () => {
|
602
602
|
var u;
|
603
603
|
if (!a.value.ecrIntegrations)
|
604
|
-
return
|
604
|
+
return d();
|
605
605
|
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
|
606
606
|
if (t === -1)
|
607
|
-
return
|
607
|
+
return d();
|
608
608
|
n.value = t;
|
609
609
|
const l = i.at(t);
|
610
610
|
l.gateway === "Maybank2" && l.config && (e.value = {
|
@@ -616,7 +616,7 @@ const te = /* @__PURE__ */ V({
|
|
616
616
|
$(a, s), O(s);
|
617
617
|
async function y(i) {
|
618
618
|
var t;
|
619
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1),
|
619
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
620
620
|
}
|
621
621
|
async function c() {
|
622
622
|
e.value.cardTypes.push(r.value), r.value = "";
|
@@ -643,7 +643,7 @@ const te = /* @__PURE__ */ V({
|
|
643
643
|
dialogConfig: {
|
644
644
|
cardTypes: e.value.cardTypes
|
645
645
|
}
|
646
|
-
})),
|
646
|
+
})), m.onUpdate(a.value);
|
647
647
|
})
|
648
648
|
}, {
|
649
649
|
default: P(() => [
|
@@ -712,19 +712,19 @@ const te = /* @__PURE__ */ V({
|
|
712
712
|
}
|
713
713
|
},
|
714
714
|
setup(F) {
|
715
|
-
const
|
715
|
+
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
716
716
|
ip: "",
|
717
717
|
receiptName: "",
|
718
718
|
cardTypes: []
|
719
|
-
}),
|
719
|
+
}), d = () => {
|
720
720
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
721
721
|
}, s = () => {
|
722
722
|
var u;
|
723
723
|
if (!a.value.ecrIntegrations)
|
724
|
-
return
|
724
|
+
return d();
|
725
725
|
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank3");
|
726
726
|
if (t === -1)
|
727
|
-
return
|
727
|
+
return d();
|
728
728
|
n.value = t;
|
729
729
|
const l = i.at(t);
|
730
730
|
l.gateway === "Maybank3" && l.config && (e.value = {
|
@@ -736,7 +736,7 @@ const te = /* @__PURE__ */ V({
|
|
736
736
|
$(a, s), O(s);
|
737
737
|
async function y(i) {
|
738
738
|
var t;
|
739
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1),
|
739
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
740
740
|
}
|
741
741
|
async function c() {
|
742
742
|
e.value.cardTypes.push(r.value), r.value = "";
|
@@ -763,7 +763,7 @@ const te = /* @__PURE__ */ V({
|
|
763
763
|
dialogConfig: {
|
764
764
|
cardTypes: e.value.cardTypes
|
765
765
|
}
|
766
|
-
})),
|
766
|
+
})), m.onUpdate(a.value);
|
767
767
|
})
|
768
768
|
}, {
|
769
769
|
default: P(() => [
|
@@ -832,19 +832,19 @@ const te = /* @__PURE__ */ V({
|
|
832
832
|
}
|
833
833
|
},
|
834
834
|
setup(F) {
|
835
|
-
const
|
835
|
+
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
836
836
|
ip: "",
|
837
837
|
receiptName: "",
|
838
838
|
cardTypes: []
|
839
|
-
}),
|
839
|
+
}), d = () => {
|
840
840
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
841
841
|
}, s = () => {
|
842
842
|
var u;
|
843
843
|
if (!a.value.ecrIntegrations)
|
844
|
-
return
|
844
|
+
return d();
|
845
845
|
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Nets");
|
846
846
|
if (t === -1)
|
847
|
-
return
|
847
|
+
return d();
|
848
848
|
n.value = t;
|
849
849
|
const l = i.at(t);
|
850
850
|
l.gateway === "Nets" && l.config && (e.value = {
|
@@ -856,7 +856,7 @@ const te = /* @__PURE__ */ V({
|
|
856
856
|
$(a, s), O(s);
|
857
857
|
async function y(i) {
|
858
858
|
var t;
|
859
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1),
|
859
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
860
860
|
}
|
861
861
|
async function c() {
|
862
862
|
e.value.cardTypes.push(r.value), r.value = "";
|
@@ -883,7 +883,7 @@ const te = /* @__PURE__ */ V({
|
|
883
883
|
dialogConfig: {
|
884
884
|
cardTypes: e.value.cardTypes
|
885
885
|
}
|
886
|
-
})),
|
886
|
+
})), m.onUpdate(a.value);
|
887
887
|
})
|
888
888
|
}, {
|
889
889
|
default: P(() => [
|
@@ -952,18 +952,18 @@ const te = /* @__PURE__ */ V({
|
|
952
952
|
}
|
953
953
|
},
|
954
954
|
setup(F) {
|
955
|
-
const
|
955
|
+
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
956
956
|
receiptName: "",
|
957
957
|
cardTypes: []
|
958
|
-
}),
|
958
|
+
}), d = () => {
|
959
959
|
e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
960
960
|
}, s = () => {
|
961
961
|
var u;
|
962
962
|
if (!a.value.ecrIntegrations)
|
963
|
-
return
|
963
|
+
return d();
|
964
964
|
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Kbank");
|
965
965
|
if (t === -1)
|
966
|
-
return
|
966
|
+
return d();
|
967
967
|
n.value = t;
|
968
968
|
const l = i.at(t);
|
969
969
|
l.gateway === "Kbank" && l.config && (e.value = {
|
@@ -974,7 +974,7 @@ const te = /* @__PURE__ */ V({
|
|
974
974
|
$(a, s), O(s);
|
975
975
|
async function y(i) {
|
976
976
|
var t;
|
977
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1),
|
977
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
978
978
|
}
|
979
979
|
async function c() {
|
980
980
|
e.value.cardTypes.push(r.value), r.value = "";
|
@@ -1001,7 +1001,7 @@ const te = /* @__PURE__ */ V({
|
|
1001
1001
|
dialogConfig: {
|
1002
1002
|
cardTypes: e.value.cardTypes
|
1003
1003
|
}
|
1004
|
-
})),
|
1004
|
+
})), m.onUpdate(a.value);
|
1005
1005
|
})
|
1006
1006
|
}, {
|
1007
1007
|
default: P(() => [
|
@@ -1065,8 +1065,8 @@ const te = /* @__PURE__ */ V({
|
|
1065
1065
|
}
|
1066
1066
|
},
|
1067
1067
|
setup(F) {
|
1068
|
-
var
|
1069
|
-
const
|
1068
|
+
var d;
|
1069
|
+
const m = F, a = [
|
1070
1070
|
{
|
1071
1071
|
label: "FeedMe Terminal",
|
1072
1072
|
value: "terminal",
|
@@ -1109,7 +1109,7 @@ const te = /* @__PURE__ */ V({
|
|
1109
1109
|
region: [U.F_COUNTRY.enum.TH]
|
1110
1110
|
}
|
1111
1111
|
], b = q(() => a.find((s) => s.value === e.value)), n = j().currentCountry, r = q(() => a.filter((s) => !s.region || s.region.includes(n.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
|
1112
|
-
gatewayTab: (
|
1112
|
+
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
1113
1113
|
});
|
1114
1114
|
return (s, y) => {
|
1115
1115
|
var i;
|
@@ -1126,8 +1126,8 @@ const te = /* @__PURE__ */ V({
|
|
1126
1126
|
]),
|
1127
1127
|
_("div", Ae, [
|
1128
1128
|
S(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), K(L({ key: 0 }, {
|
1129
|
-
terminal:
|
1130
|
-
onUpdate:
|
1129
|
+
terminal: m.terminal,
|
1130
|
+
onUpdate: m.onUpdate
|
1131
1131
|
})), null, 16)) : C("", !0)
|
1132
1132
|
])
|
1133
1133
|
]);
|
@@ -1146,12 +1146,12 @@ const te = /* @__PURE__ */ V({
|
|
1146
1146
|
}
|
1147
1147
|
},
|
1148
1148
|
setup(F) {
|
1149
|
-
const
|
1149
|
+
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I({
|
1150
1150
|
account: "",
|
1151
1151
|
receiptName: ""
|
1152
1152
|
}), e = () => {
|
1153
1153
|
r.value.account = "", r.value.receiptName = "", n.value = -1;
|
1154
|
-
},
|
1154
|
+
}, d = () => {
|
1155
1155
|
if (!a.value.qrIntegrations)
|
1156
1156
|
return e();
|
1157
1157
|
const y = a.value.qrIntegrations, c = y.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
|
@@ -1164,10 +1164,10 @@ const te = /* @__PURE__ */ V({
|
|
1164
1164
|
receiptName: i.receiptName ?? ""
|
1165
1165
|
});
|
1166
1166
|
};
|
1167
|
-
$(a,
|
1167
|
+
$(a, d), O(d);
|
1168
1168
|
async function s(y) {
|
1169
1169
|
var c;
|
1170
|
-
(c = a.value.qrIntegrations) == null || c.splice(y, 1),
|
1170
|
+
(c = a.value.qrIntegrations) == null || c.splice(y, 1), m.onUpdate(a.value);
|
1171
1171
|
}
|
1172
1172
|
return (y, c) => {
|
1173
1173
|
const i = g("FmTextField"), t = g("FmButton"), l = g("FmForm");
|
@@ -1175,7 +1175,7 @@ const te = /* @__PURE__ */ V({
|
|
1175
1175
|
ref: b.value,
|
1176
1176
|
class: "flex flex-col gap-16 w-[500px]",
|
1177
1177
|
onValidationSuccess: c[2] || (c[2] = () => {
|
1178
|
-
n.value > -1 ? a.value.qrIntegrations[n.value] = { gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName })),
|
1178
|
+
n.value > -1 ? a.value.qrIntegrations[n.value] = { gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName })), m.onUpdate(a.value);
|
1179
1179
|
})
|
1180
1180
|
}, {
|
1181
1181
|
default: P(() => [
|
@@ -1224,8 +1224,8 @@ const te = /* @__PURE__ */ V({
|
|
1224
1224
|
}
|
1225
1225
|
},
|
1226
1226
|
setup(F) {
|
1227
|
-
var
|
1228
|
-
const
|
1227
|
+
var d;
|
1228
|
+
const m = F, a = [
|
1229
1229
|
{
|
1230
1230
|
label: "PromptPay",
|
1231
1231
|
value: "promptpay",
|
@@ -1233,7 +1233,7 @@ const te = /* @__PURE__ */ V({
|
|
1233
1233
|
region: [U.F_COUNTRY.enum.TH]
|
1234
1234
|
}
|
1235
1235
|
], b = q(() => a.find((s) => s.value === e.value)), n = j().currentCountry, r = q(() => a.filter((s) => !s.region || s.region.includes(n.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
|
1236
|
-
gatewayTab: (
|
1236
|
+
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
1237
1237
|
});
|
1238
1238
|
return (s, y) => {
|
1239
1239
|
var i;
|
@@ -1250,8 +1250,8 @@ const te = /* @__PURE__ */ V({
|
|
1250
1250
|
]),
|
1251
1251
|
_("div", Ke, [
|
1252
1252
|
S(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), K(L({ key: 0 }, {
|
1253
|
-
terminal:
|
1254
|
-
onUpdate:
|
1253
|
+
terminal: m.terminal,
|
1254
|
+
onUpdate: m.onUpdate
|
1255
1255
|
})), null, 16)) : C("", !0)
|
1256
1256
|
])
|
1257
1257
|
]);
|
@@ -1266,14 +1266,14 @@ const te = /* @__PURE__ */ V({
|
|
1266
1266
|
}
|
1267
1267
|
},
|
1268
1268
|
setup(F) {
|
1269
|
-
const
|
1269
|
+
const m = F, { tab: a } = E({
|
1270
1270
|
tab: "information"
|
1271
|
-
}), { isLoading: b, startAsyncCall: n } = z(!0), r = W(), e = Q(),
|
1271
|
+
}), { isLoading: b, startAsyncCall: n } = z(!0), r = W(), e = Q(), d = I();
|
1272
1272
|
async function s(l) {
|
1273
1273
|
n(async () => {
|
1274
1274
|
try {
|
1275
1275
|
await D.updateById(
|
1276
|
-
|
1276
|
+
m.terminalId,
|
1277
1277
|
{
|
1278
1278
|
name: l.name,
|
1279
1279
|
status: l.status,
|
@@ -1282,7 +1282,7 @@ const te = /* @__PURE__ */ V({
|
|
1282
1282
|
ecrIntegrations: l.ecrIntegrations ?? [],
|
1283
1283
|
qrIntegrations: l.qrIntegrations ?? []
|
1284
1284
|
}
|
1285
|
-
),
|
1285
|
+
), d.value = await D.readById(m.terminalId), e.open({
|
1286
1286
|
type: "success",
|
1287
1287
|
message: "Terminal updated successfully"
|
1288
1288
|
});
|
@@ -1337,30 +1337,30 @@ const te = /* @__PURE__ */ V({
|
|
1337
1337
|
});
|
1338
1338
|
async function i() {
|
1339
1339
|
n(async () => {
|
1340
|
-
|
1340
|
+
d.value = await D.readById(m.terminalId);
|
1341
1341
|
});
|
1342
1342
|
}
|
1343
1343
|
const t = q(() => y.filter((l) => {
|
1344
1344
|
var u;
|
1345
|
-
return !l.onlyFor || l.onlyFor.includes(((u =
|
1345
|
+
return !l.onlyFor || l.onlyFor.includes(((u = d.value) == null ? void 0 : u.deviceType) ?? "");
|
1346
1346
|
}));
|
1347
1347
|
return O(i), (l, u) => {
|
1348
|
-
var x;
|
1348
|
+
var x, o;
|
1349
1349
|
const p = g("FmTabs");
|
1350
1350
|
return f(), w(X, {
|
1351
|
-
title:
|
1351
|
+
title: `${(x = d.value) == null ? void 0 : x.deviceType} (${(o = d.value) == null ? void 0 : o._id})`,
|
1352
1352
|
loading: S(b),
|
1353
1353
|
onBack: S(r).back
|
1354
1354
|
}, {
|
1355
1355
|
default: P(() => [
|
1356
1356
|
v(p, {
|
1357
1357
|
"model-value": S(a),
|
1358
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
1358
|
+
"onUpdate:modelValue": u[0] || (u[0] = (T) => B(a) ? a.value = T : null),
|
1359
1359
|
class: "mb-6",
|
1360
1360
|
items: t.value
|
1361
1361
|
}, null, 8, ["model-value", "items"]),
|
1362
1362
|
S(a) ? (f(), w(Y(c.value), K(L({ key: 0 }, {
|
1363
|
-
terminal:
|
1363
|
+
terminal: d.value,
|
1364
1364
|
onUpdate: s
|
1365
1365
|
})), null, 16)) : C("", !0)
|
1366
1366
|
]),
|