@feedmepos/mf-payment 1.7.9-dev → 1.7.11-dev
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/{Actions.vue_vue_type_script_setup_true_lang-DWLo1wcm.js → Actions.vue_vue_type_script_setup_true_lang-BK7eBqg8.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-Cr5NV0ER.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CJRHud1Y.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-B78DrbUV.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-kDEZmxJj.js} +2 -2
- package/dist/{Chargeback-By_S7vnJ.js → Chargeback-B24AygKB.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-B3O4-wkG.js → DocumentViewer.vue_vue_type_script_setup_true_lang-ZTBItxH4.js} +1 -1
- package/dist/{OnboardForm-m31RX8SN.js → OnboardForm-BoMXyBfu.js} +5 -5
- package/dist/{OnboardForm-BYh2dN26.js → OnboardForm-DDtgBR70.js} +5 -5
- package/dist/{OnboardSubmission-BjlAVowH.js → OnboardSubmission-FVa7wqyw.js} +3 -3
- package/dist/{OnboardSubmission-CjZWeW_E.js → OnboardSubmission-NbKQg29f.js} +17 -17
- package/dist/{PayoutAccount-BfyuYYzs.js → PayoutAccount-B7uNxA-y.js} +5 -5
- package/dist/{PayoutAccount-C6km-4G3.js → PayoutAccount-CbHUueB5.js} +42 -42
- package/dist/{PayoutAccountSetting-DWfjVMLb.js → PayoutAccountSetting-Bi8us59u.js} +6 -6
- package/dist/{Restaurant-Brhh_fMP.js → Restaurant-ZKH4-27k.js} +4 -4
- package/dist/{RestaurantSetting-C-GNgMOs.js → RestaurantSetting-5Ucv0fuX.js} +3 -3
- package/dist/{Settlement-CScOnw9b.js → Settlement-Cs3498YL.js} +3 -3
- package/dist/{Settlement-BcDMYdw_.js → Settlement-D8Yoyler.js} +4 -4
- package/dist/{SettlementTransactions-C31RnVCZ.js → SettlementTransactions-CsLXxKAk.js} +11 -10
- package/dist/{SettlementTransactions-BPSCKH8z.js → SettlementTransactions-Lsb17Lxv.js} +11 -10
- package/dist/{Status.vue_vue_type_script_setup_true_lang-DC9_-kUz.js → Status.vue_vue_type_script_setup_true_lang-eL7XwWJ3.js} +4 -4
- package/dist/{Terminal-nXbZ8iVQ.js → Terminal-BPh2BCua.js} +5 -5
- package/dist/{TerminalSetting-D4d4jfHO.js → TerminalSetting-B79qs4mL.js} +958 -821
- package/dist/{Transaction-6NZwr5Df.js → Transaction-DR2gQCKA.js} +10 -10
- package/dist/{Transaction-CYoFufei.js → Transaction-DjLL4UN4.js} +37 -36
- package/dist/{TransactionOld-CTdPTMGh.js → TransactionOld-B5s1qngv.js} +7 -7
- package/dist/TransactionStatus.vue_vue_type_script_setup_true_lang-B8mW53hn.js +89 -0
- package/dist/{app-D57WXCrH.js → app-D3wofEOS.js} +23 -23
- package/dist/app.js +1 -1
- package/dist/assets-_mNJ5BSj.js +92 -0
- package/dist/{grafana-BYnm1r5S.js → grafana-DG-OOrc6.js} +1 -1
- package/dist/{index-B0sdc-mA.js → index-BkLu8qJc.js} +1 -1
- package/dist/{index-BpSlgd3s.js → index-Bnlv9uae.js} +11502 -11016
- package/dist/{index-6C22iquA.js → index-BqgiQOtT.js} +1 -1
- package/dist/{index-CP93polV.js → index-C1BlMUKC.js} +1 -1
- package/dist/{index-PcsmeEGJ.js → index-COfZw5dL.js} +1 -1
- package/dist/{index-DAun0yIF.js → index-NX5RT8X0.js} +1 -1
- package/dist/{index-Cb4fwFWy.js → index-k8hRO-Tp.js} +1 -1
- package/dist/{index-CZ10wUcS.js → index-zND3az_w.js} +2 -2
- package/dist/{index-CuTTkcVR.js → index-zQrKAzs3.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Di0E4edn.js → index.vue_vue_type_script_setup_true_lang-B6UiGJ2f.js} +1 -1
- package/dist/{onboard-submission-DL10gjS7.js → onboard-submission-CCpAeH6U.js} +3 -3
- package/dist/package.json +2 -2
- package/dist/{payout-account-BCKw7oJN.js → payout-account-ae78i0IG.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +22 -22
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +26 -26
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +26 -26
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +26 -26
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +166 -0
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +30 -4
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +30 -4
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +44 -44
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +12 -12
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +6 -6
- package/dist/views/settlement/SettlementTable.vue.d.ts +4 -4
- package/package.json +2 -2
- package/dist/assets-CoMF0iyt.js +0 -177
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as le, p as ye, e as
|
|
1
|
+
import { defineComponent as S, openBlock as f, createElementBlock as C, Fragment as P, createElementVNode as _, createTextVNode as H, toDisplayString as j, ref as T, resolveComponent as g, createVNode as m, createCommentVNode as k, unref as M, computed as U, isRef as Z, createBlock as F, resolveDynamicComponent as ee, normalizeProps as ae, mergeProps as te, watch as q, onBeforeUnmount as ve, toRef as A, onMounted as G, withCtx as O, renderList as B } from "vue";
|
|
2
|
+
import { u as le, p as ye, e as h } from "./index-Bnlv9uae.js";
|
|
3
3
|
import { useRouter as fe } from "vue-router";
|
|
4
|
-
import { t as K } from "./index-
|
|
4
|
+
import { t as K } from "./index-C1BlMUKC.js";
|
|
5
5
|
import { _ as ge } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
-
import { u as ne } from "./index-
|
|
7
|
-
import { useSnackbar as se } from "@feedmepos/ui-library";
|
|
6
|
+
import { u as ne } from "./index-BqgiQOtT.js";
|
|
7
|
+
import { useSnackbar as se, useDialog as be } from "@feedmepos/ui-library";
|
|
8
8
|
import { u as X } from "./error-K1CakhA9.js";
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { o as Te } from "./index-
|
|
11
|
-
import { c as
|
|
9
|
+
import { useI18n as _e, useCoreStore as oe } from "@feedmepos/mf-common";
|
|
10
|
+
import { o as Te } from "./index-zND3az_w.js";
|
|
11
|
+
import { c as Ie } from "./index-MdV54cWO.js";
|
|
12
12
|
import { z as ue, a as ce } from "./validator-CTlVogBQ.js";
|
|
13
|
-
|
|
13
|
+
import { g as Fe } from "./assets-_mNJ5BSj.js";
|
|
14
|
+
import { w as we } from "./Modal-DB8M9o1T.js";
|
|
15
|
+
const xe = /* @__PURE__ */ S({
|
|
14
16
|
__name: "Information",
|
|
15
17
|
props: {
|
|
16
18
|
terminal: {
|
|
@@ -18,23 +20,23 @@ const Ie = /* @__PURE__ */ R({
|
|
|
18
20
|
required: !0
|
|
19
21
|
}
|
|
20
22
|
},
|
|
21
|
-
setup(
|
|
22
|
-
return (
|
|
23
|
-
a[0] || (a[0] =
|
|
24
|
-
|
|
25
|
-
a[1] || (a[1] =
|
|
26
|
-
a[2] || (a[2] =
|
|
27
|
-
|
|
28
|
-
a[3] || (a[3] =
|
|
29
|
-
a[4] || (a[4] =
|
|
30
|
-
|
|
31
|
-
a[5] || (a[5] =
|
|
32
|
-
a[6] || (a[6] =
|
|
33
|
-
|
|
34
|
-
a[7] || (a[7] =
|
|
23
|
+
setup(I) {
|
|
24
|
+
return (d, a) => (f(), C(P, null, [
|
|
25
|
+
a[0] || (a[0] = _("b", null, "Name", -1)),
|
|
26
|
+
H(": " + j(I.terminal.name), 1),
|
|
27
|
+
a[1] || (a[1] = _("br", null, null, -1)),
|
|
28
|
+
a[2] || (a[2] = _("b", null, "Status", -1)),
|
|
29
|
+
H(": " + j(I.terminal.status), 1),
|
|
30
|
+
a[3] || (a[3] = _("br", null, null, -1)),
|
|
31
|
+
a[4] || (a[4] = _("b", null, "Device ID", -1)),
|
|
32
|
+
H(": " + j(I.terminal.deviceId ?? "-"), 1),
|
|
33
|
+
a[5] || (a[5] = _("br", null, null, -1)),
|
|
34
|
+
a[6] || (a[6] = _("b", null, "Device Type", -1)),
|
|
35
|
+
H(": " + j(I.terminal.deviceType ?? "-"), 1),
|
|
36
|
+
a[7] || (a[7] = _("br", null, null, -1))
|
|
35
37
|
], 64));
|
|
36
38
|
}
|
|
37
|
-
}),
|
|
39
|
+
}), Ce = { key: 0 }, Ne = { class: "mt-6 space-x-6" }, ke = /* @__PURE__ */ S({
|
|
38
40
|
__name: "KioskMode",
|
|
39
41
|
props: {
|
|
40
42
|
terminal: {
|
|
@@ -42,58 +44,58 @@ const Ie = /* @__PURE__ */ R({
|
|
|
42
44
|
required: !0
|
|
43
45
|
}
|
|
44
46
|
},
|
|
45
|
-
setup(
|
|
46
|
-
const { isLoading:
|
|
47
|
+
setup(I) {
|
|
48
|
+
const { isLoading: d, startAsyncCall: a } = le(!1), b = se(), l = T({
|
|
47
49
|
enable: !1,
|
|
48
50
|
password: []
|
|
49
|
-
}), r =
|
|
51
|
+
}), r = I;
|
|
50
52
|
function e() {
|
|
51
|
-
return l.value.enable && l.value.password.filter((
|
|
53
|
+
return l.value.enable && l.value.password.filter((v) => !!v).length !== 6 ? b.open({
|
|
52
54
|
type: "error",
|
|
53
55
|
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
|
54
56
|
}) : a(async () => {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
+
const v = { enable: l.value.enable };
|
|
58
|
+
v.enable && Object.assign(v, {
|
|
57
59
|
password: l.value.password.join("")
|
|
58
60
|
});
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
return
|
|
62
|
-
let
|
|
63
|
-
return
|
|
61
|
+
const p = await K.kioskModeRequest(r.terminal._id, v);
|
|
62
|
+
if (p === "OK")
|
|
63
|
+
return b.open({ type: "info", message: "Kiosk mode applied successfully." });
|
|
64
|
+
let y = p;
|
|
65
|
+
return p === "client_not_connected" && (y = "Terminal not connected to the websocket server."), p.startsWith("terminal: ") && (y = p.replaceAll("terminal: ", "")), b.open({
|
|
64
66
|
type: "error",
|
|
65
|
-
message:
|
|
67
|
+
message: y
|
|
66
68
|
});
|
|
67
69
|
});
|
|
68
70
|
}
|
|
69
|
-
return (
|
|
70
|
-
const
|
|
71
|
-
return
|
|
72
|
-
|
|
71
|
+
return (v, p) => {
|
|
72
|
+
const y = g("FmSwitch"), c = g("FmPinField"), s = g("FmButton");
|
|
73
|
+
return f(), C(P, null, [
|
|
74
|
+
m(y, {
|
|
73
75
|
modelValue: l.value.enable,
|
|
74
|
-
"onUpdate:modelValue":
|
|
76
|
+
"onUpdate:modelValue": p[0] || (p[0] = (t) => l.value.enable = t),
|
|
75
77
|
label: "Enable Kiosk Mode?"
|
|
76
78
|
}, null, 8, ["modelValue"]),
|
|
77
|
-
l.value.enable ? (
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
l.value.enable ? (f(), C("div", Ce, [
|
|
80
|
+
p[2] || (p[2] = _("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
|
81
|
+
m(c, {
|
|
80
82
|
modelValue: l.value.password,
|
|
81
|
-
"onUpdate:modelValue":
|
|
83
|
+
"onUpdate:modelValue": p[1] || (p[1] = (t) => l.value.password = t)
|
|
82
84
|
}, null, 8, ["modelValue"])
|
|
83
|
-
])) :
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
])) : k("", !0),
|
|
86
|
+
_("div", Ne, [
|
|
87
|
+
m(s, {
|
|
86
88
|
variant: "primary",
|
|
87
89
|
label: "Send",
|
|
88
90
|
icon: "send",
|
|
89
|
-
loading: M(
|
|
91
|
+
loading: M(d),
|
|
90
92
|
onclick: e
|
|
91
93
|
}, null, 8, ["loading"])
|
|
92
94
|
])
|
|
93
95
|
], 64);
|
|
94
96
|
};
|
|
95
97
|
}
|
|
96
|
-
}),
|
|
98
|
+
}), Ve = /* @__PURE__ */ S({
|
|
97
99
|
__name: "SettingRequest",
|
|
98
100
|
props: {
|
|
99
101
|
terminal: {
|
|
@@ -101,105 +103,105 @@ const Ie = /* @__PURE__ */ R({
|
|
|
101
103
|
required: !0
|
|
102
104
|
}
|
|
103
105
|
},
|
|
104
|
-
setup(
|
|
105
|
-
const { settingTab:
|
|
106
|
+
setup(I) {
|
|
107
|
+
const { settingTab: d } = ne({
|
|
106
108
|
settingTab: "kiosk_mode"
|
|
107
109
|
}), a = [
|
|
108
110
|
{
|
|
109
111
|
label: "Kiosk Mode",
|
|
110
112
|
value: "kiosk_mode",
|
|
111
|
-
render:
|
|
113
|
+
render: ke
|
|
112
114
|
}
|
|
113
|
-
],
|
|
115
|
+
], b = I, l = U(() => a.find((r) => r.value === d.value));
|
|
114
116
|
return (r, e) => {
|
|
115
|
-
var
|
|
116
|
-
const
|
|
117
|
-
return
|
|
118
|
-
e[1] || (e[1] =
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
var p;
|
|
118
|
+
const v = g("FmTabs");
|
|
119
|
+
return f(), C(P, null, [
|
|
120
|
+
e[1] || (e[1] = _("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
121
|
+
_("b", null, "Note: "),
|
|
122
|
+
H(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
|
121
123
|
], -1)),
|
|
122
|
-
v
|
|
123
|
-
"model-value": M(
|
|
124
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
124
|
+
m(v, {
|
|
125
|
+
"model-value": M(d),
|
|
126
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => Z(d) ? d.value = y : null),
|
|
125
127
|
class: "mb-6",
|
|
126
128
|
items: a
|
|
127
129
|
}, null, 8, ["model-value"]),
|
|
128
|
-
M(
|
|
130
|
+
M(d) ? (f(), F(ee((p = l.value) == null ? void 0 : p.render), ae(te({ key: 0 }, { terminal: b.terminal })), null, 16)) : k("", !0)
|
|
129
131
|
], 64);
|
|
130
132
|
};
|
|
131
133
|
}
|
|
132
|
-
}),
|
|
133
|
-
function
|
|
134
|
-
const { isLoading:
|
|
134
|
+
}), Ue = 2e3, Se = 12e4, he = "Timed out waiting for the Tyro reader to sync. Please try again.";
|
|
135
|
+
function Re(I) {
|
|
136
|
+
const { isLoading: d, startLoading: a, stopLoading: b } = le(!1), { t: l } = _e(), r = se(), e = T(null), v = U(() => {
|
|
135
137
|
var $, E;
|
|
136
|
-
const
|
|
138
|
+
const V = ($ = I.value.gateways) == null ? void 0 : $.find(
|
|
137
139
|
(D) => D.gateway === "Tyro"
|
|
138
140
|
);
|
|
139
|
-
return ((E =
|
|
140
|
-
}),
|
|
141
|
-
var
|
|
142
|
-
return ((
|
|
143
|
-
}),
|
|
144
|
-
var
|
|
145
|
-
return
|
|
146
|
-
}), s =
|
|
141
|
+
return ((E = V == null ? void 0 : V.config) == null ? void 0 : E.uniqueId) || "";
|
|
142
|
+
}), p = U(() => !!v.value), y = U(() => {
|
|
143
|
+
var V;
|
|
144
|
+
return ((V = e.value) == null ? void 0 : V.status) === "ready";
|
|
145
|
+
}), c = U(() => {
|
|
146
|
+
var V, $;
|
|
147
|
+
return y.value && !!(($ = (V = e.value) == null ? void 0 : V.fields) != null && $.tyroLocationId) && !!I.value.deviceId && !p.value;
|
|
148
|
+
}), s = U(() => !y.value && !p.value), t = U(
|
|
147
149
|
() => l("payment.onboard-submission.tyro.syncDisabledHint")
|
|
148
|
-
),
|
|
150
|
+
), n = U(() => p.value ? "Synced" : "Sync");
|
|
149
151
|
async function i() {
|
|
150
|
-
if (!
|
|
152
|
+
if (!I.value.referenceId) {
|
|
151
153
|
e.value = null;
|
|
152
154
|
return;
|
|
153
155
|
}
|
|
154
156
|
try {
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
+
const V = await Te.getByRestaurant(
|
|
158
|
+
I.value.referenceId
|
|
157
159
|
);
|
|
158
|
-
e.value =
|
|
160
|
+
e.value = V.find(
|
|
159
161
|
($) => $.type === ye.FdoOnboardType.enum.tyro
|
|
160
162
|
) ?? null;
|
|
161
|
-
} catch (
|
|
163
|
+
} catch (V) {
|
|
162
164
|
e.value = null, r.open({
|
|
163
165
|
type: "error",
|
|
164
|
-
message: X(
|
|
166
|
+
message: X(V)
|
|
165
167
|
});
|
|
166
168
|
}
|
|
167
169
|
}
|
|
168
|
-
const
|
|
169
|
-
intervalMs:
|
|
170
|
-
timeoutMs:
|
|
171
|
-
onTick: async ({ isCurrentRun:
|
|
172
|
-
var
|
|
173
|
-
const E = await K.readById(
|
|
174
|
-
if (!
|
|
170
|
+
const u = Ie({
|
|
171
|
+
intervalMs: Ue,
|
|
172
|
+
timeoutMs: Se,
|
|
173
|
+
onTick: async ({ isCurrentRun: V, stop: $ }) => {
|
|
174
|
+
var z, Q;
|
|
175
|
+
const E = await K.readById(I.value._id);
|
|
176
|
+
if (!V())
|
|
175
177
|
return;
|
|
176
|
-
const D = (
|
|
177
|
-
(D == null ? void 0 : D.gateway) === "Tyro" && ((
|
|
178
|
+
const D = (z = E.gateways) == null ? void 0 : z.find((J) => J.gateway === "Tyro");
|
|
179
|
+
(D == null ? void 0 : D.gateway) === "Tyro" && ((Q = D == null ? void 0 : D.config) != null && Q.uniqueId) && ($({ invalidate: !1 }), b(), Object.assign(I.value, E), r.open({
|
|
178
180
|
type: "success",
|
|
179
181
|
message: "Tyro reader created successfully"
|
|
180
182
|
}));
|
|
181
183
|
},
|
|
182
184
|
onTimeout: () => {
|
|
183
|
-
|
|
185
|
+
b(), r.open({
|
|
184
186
|
type: "error",
|
|
185
|
-
message:
|
|
187
|
+
message: he
|
|
186
188
|
});
|
|
187
189
|
},
|
|
188
|
-
onError: (
|
|
189
|
-
|
|
190
|
+
onError: (V) => {
|
|
191
|
+
b(), r.open({
|
|
190
192
|
type: "error",
|
|
191
|
-
message: X(
|
|
193
|
+
message: X(V)
|
|
192
194
|
});
|
|
193
195
|
}
|
|
194
|
-
}),
|
|
195
|
-
function
|
|
196
|
-
|
|
196
|
+
}), w = u.isPolling;
|
|
197
|
+
function o() {
|
|
198
|
+
u.stop(), b();
|
|
197
199
|
}
|
|
198
|
-
function
|
|
199
|
-
|
|
200
|
+
function x() {
|
|
201
|
+
o(), a(), u.start();
|
|
200
202
|
}
|
|
201
203
|
async function L() {
|
|
202
|
-
if (!
|
|
204
|
+
if (!c.value) {
|
|
203
205
|
r.open({
|
|
204
206
|
type: "error",
|
|
205
207
|
message: "Tyro reader sync is not available"
|
|
@@ -207,37 +209,37 @@ function Ue(_) {
|
|
|
207
209
|
return;
|
|
208
210
|
}
|
|
209
211
|
try {
|
|
210
|
-
a(), await K.syncTyroReader(
|
|
211
|
-
} catch (
|
|
212
|
-
|
|
212
|
+
a(), await K.syncTyroReader(I.value._id), x();
|
|
213
|
+
} catch (V) {
|
|
214
|
+
o(), r.open({
|
|
213
215
|
type: "error",
|
|
214
|
-
message: X(
|
|
216
|
+
message: X(V)
|
|
215
217
|
});
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
return q(
|
|
219
|
-
() =>
|
|
221
|
+
() => I.value.referenceId,
|
|
220
222
|
async () => {
|
|
221
223
|
await i();
|
|
222
224
|
},
|
|
223
225
|
{ immediate: !0 }
|
|
224
226
|
), ve(() => {
|
|
225
|
-
|
|
227
|
+
o();
|
|
226
228
|
}), {
|
|
227
|
-
isLoading:
|
|
228
|
-
isPollingTyroReader:
|
|
229
|
-
uniqueId:
|
|
230
|
-
canSyncTyroReader:
|
|
229
|
+
isLoading: d,
|
|
230
|
+
isPollingTyroReader: w,
|
|
231
|
+
uniqueId: v,
|
|
232
|
+
canSyncTyroReader: c,
|
|
231
233
|
showTyroSyncPopover: s,
|
|
232
234
|
tyroSyncPopoverMessage: t,
|
|
233
|
-
tyroSyncButtonLabel:
|
|
235
|
+
tyroSyncButtonLabel: n,
|
|
234
236
|
syncTyroReader: L
|
|
235
237
|
};
|
|
236
238
|
}
|
|
237
|
-
const
|
|
239
|
+
const Me = {
|
|
238
240
|
key: 0,
|
|
239
241
|
class: "text-sm text-gray-500"
|
|
240
|
-
},
|
|
242
|
+
}, Oe = { class: "flex mt-6 space-x-6" }, Pe = { class: "flex-1" }, qe = /* @__PURE__ */ S({
|
|
241
243
|
__name: "SoftposGateway",
|
|
242
244
|
props: {
|
|
243
245
|
terminal: {
|
|
@@ -249,12 +251,12 @@ const Se = {
|
|
|
249
251
|
required: !0
|
|
250
252
|
}
|
|
251
253
|
},
|
|
252
|
-
setup(
|
|
253
|
-
const
|
|
254
|
+
setup(I) {
|
|
255
|
+
const d = I, a = oe().currentCountry, b = [
|
|
254
256
|
{
|
|
255
257
|
label: "Fiuu Malaysia",
|
|
256
258
|
value: "cc.feedme.payment.rms",
|
|
257
|
-
region:
|
|
259
|
+
region: h.F_COUNTRY.enum.MY,
|
|
258
260
|
gateway: "Fiuu",
|
|
259
261
|
isLegacy: !0,
|
|
260
262
|
isOutdated: !0
|
|
@@ -262,14 +264,14 @@ const Se = {
|
|
|
262
264
|
{
|
|
263
265
|
label: "Fiuu Malaysia V2",
|
|
264
266
|
value: "cc.feedme.payment.fiuu_my",
|
|
265
|
-
region:
|
|
267
|
+
region: h.F_COUNTRY.enum.MY,
|
|
266
268
|
gateway: "Fiuu",
|
|
267
269
|
isLegacy: !0
|
|
268
270
|
},
|
|
269
271
|
{
|
|
270
272
|
label: "Fiuu Singapore",
|
|
271
273
|
value: "cc.feedme.payment.fiuu_sg",
|
|
272
|
-
region:
|
|
274
|
+
region: h.F_COUNTRY.enum.SG,
|
|
273
275
|
gateway: "Fiuu",
|
|
274
276
|
isLegacy: !0
|
|
275
277
|
},
|
|
@@ -277,49 +279,49 @@ const Se = {
|
|
|
277
279
|
label: "Softspace Malaysia",
|
|
278
280
|
value: "cc.feedme.payment.softspace_my",
|
|
279
281
|
gateway: "Softspace",
|
|
280
|
-
region:
|
|
282
|
+
region: h.F_COUNTRY.enum.MY
|
|
281
283
|
},
|
|
282
284
|
{
|
|
283
285
|
label: "Digio Thailand",
|
|
284
286
|
value: "cc.feedme.payment.digio_th",
|
|
285
287
|
gateway: "Digio",
|
|
286
|
-
region:
|
|
288
|
+
region: h.F_COUNTRY.enum.TH
|
|
287
289
|
},
|
|
288
290
|
{
|
|
289
291
|
label: "Tyro Australia",
|
|
290
292
|
value: "cc.feedme.payment.tyro_au",
|
|
291
293
|
gateway: "Tyro",
|
|
292
|
-
region:
|
|
294
|
+
region: h.F_COUNTRY.enum.AU
|
|
293
295
|
}
|
|
294
|
-
], l = A(() =>
|
|
296
|
+
], l = A(() => d.terminal), r = T(), e = T({
|
|
295
297
|
packageId: "",
|
|
296
298
|
uniqueId: "",
|
|
297
299
|
developerId: "",
|
|
298
300
|
isUat: !1
|
|
299
|
-
}),
|
|
301
|
+
}), v = () => {
|
|
300
302
|
e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "", e.value.isUat = !1;
|
|
301
|
-
},
|
|
303
|
+
}, p = U(() => b.filter((N) => N.region === a.value)), y = U(() => p.value.find(
|
|
302
304
|
(N) => N.value === e.value.packageId
|
|
303
|
-
)),
|
|
305
|
+
)), c = U(
|
|
304
306
|
() => {
|
|
305
307
|
var N;
|
|
306
|
-
return ((N =
|
|
308
|
+
return ((N = y.value) == null ? void 0 : N.gateway) === "Tyro";
|
|
307
309
|
}
|
|
308
310
|
), {
|
|
309
311
|
isLoading: s,
|
|
310
312
|
isPollingTyroReader: t,
|
|
311
|
-
uniqueId:
|
|
313
|
+
uniqueId: n,
|
|
312
314
|
canSyncTyroReader: i,
|
|
313
|
-
showTyroSyncPopover:
|
|
314
|
-
tyroSyncPopoverMessage:
|
|
315
|
-
tyroSyncButtonLabel:
|
|
316
|
-
syncTyroReader:
|
|
317
|
-
} =
|
|
315
|
+
showTyroSyncPopover: u,
|
|
316
|
+
tyroSyncPopoverMessage: w,
|
|
317
|
+
tyroSyncButtonLabel: o,
|
|
318
|
+
syncTyroReader: x
|
|
319
|
+
} = Re(l), L = U(() => c.value ? "button" : "submit"), V = U(() => c.value ? o.value : "Save"), $ = U(() => c.value ? s.value : !1), E = U(() => c.value ? !i.value || t.value : !1), D = () => {
|
|
318
320
|
if (!l.value.gateways || l.value.gateways.length === 0)
|
|
319
|
-
return
|
|
321
|
+
return v();
|
|
320
322
|
const N = l.value.gateways[0];
|
|
321
323
|
if (!N.config)
|
|
322
|
-
return
|
|
324
|
+
return v();
|
|
323
325
|
if (N.gateway === "Tyro") {
|
|
324
326
|
e.value = {
|
|
325
327
|
packageId: N.config.packageId,
|
|
@@ -340,23 +342,23 @@ const Se = {
|
|
|
340
342
|
break;
|
|
341
343
|
case "Softspace":
|
|
342
344
|
case "Digio":
|
|
343
|
-
const
|
|
345
|
+
const R = JSON.parse(N.config.uniqueId);
|
|
344
346
|
e.value = {
|
|
345
347
|
packageId: N.config.packageId,
|
|
346
|
-
uniqueId:
|
|
347
|
-
developerId:
|
|
348
|
-
isUat:
|
|
348
|
+
uniqueId: R.uniqueId,
|
|
349
|
+
developerId: R.developerId,
|
|
350
|
+
isUat: R.isUat
|
|
349
351
|
};
|
|
350
352
|
return;
|
|
351
353
|
}
|
|
352
354
|
};
|
|
353
355
|
q(l, D), G(D);
|
|
354
|
-
async function
|
|
355
|
-
const N =
|
|
356
|
+
async function z() {
|
|
357
|
+
const N = y.value;
|
|
356
358
|
if (!N)
|
|
357
359
|
return;
|
|
358
|
-
let
|
|
359
|
-
N.isLegacy || (
|
|
360
|
+
let R = e.value.uniqueId;
|
|
361
|
+
N.isLegacy || (R = JSON.stringify({
|
|
360
362
|
uniqueId: e.value.uniqueId,
|
|
361
363
|
developerId: e.value.developerId,
|
|
362
364
|
isUat: e.value.isUat
|
|
@@ -365,113 +367,113 @@ const Se = {
|
|
|
365
367
|
gateway: N.gateway,
|
|
366
368
|
config: {
|
|
367
369
|
packageId: N.value,
|
|
368
|
-
uniqueId:
|
|
370
|
+
uniqueId: R
|
|
369
371
|
}
|
|
370
372
|
};
|
|
371
|
-
(!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = re, await
|
|
373
|
+
(!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = re, await d.onUpdate(l.value);
|
|
372
374
|
}
|
|
373
|
-
async function
|
|
374
|
-
var
|
|
375
|
-
(
|
|
375
|
+
async function Q(N) {
|
|
376
|
+
var R;
|
|
377
|
+
(R = l.value.gateways) == null || R.splice(N, 1), d.onUpdate(l.value);
|
|
376
378
|
}
|
|
377
|
-
function
|
|
378
|
-
|
|
379
|
+
function J() {
|
|
380
|
+
c.value && x();
|
|
379
381
|
}
|
|
380
|
-
return (N,
|
|
381
|
-
const re = g("FmSelect"),
|
|
382
|
-
return
|
|
382
|
+
return (N, R) => {
|
|
383
|
+
const re = g("FmSelect"), W = g("FmTextField"), de = g("FmCheckbox"), ie = g("FmButton"), pe = g("FmTooltip"), me = g("FmForm");
|
|
384
|
+
return f(), F(me, {
|
|
383
385
|
ref: r.value,
|
|
384
386
|
class: "flex flex-col gap-16 w-[500px]",
|
|
385
|
-
onValidationSuccess:
|
|
387
|
+
onValidationSuccess: z
|
|
386
388
|
}, {
|
|
387
389
|
default: O(() => [
|
|
388
|
-
|
|
390
|
+
m(re, {
|
|
389
391
|
modelValue: e.value.packageId,
|
|
390
|
-
"onUpdate:modelValue":
|
|
392
|
+
"onUpdate:modelValue": R[0] || (R[0] = (Y) => e.value.packageId = Y),
|
|
391
393
|
label: "Package ID",
|
|
392
|
-
items:
|
|
394
|
+
items: p.value
|
|
393
395
|
}, null, 8, ["modelValue", "items"]),
|
|
394
|
-
|
|
395
|
-
|
|
396
|
+
y.value ? (f(), C(P, { key: 0 }, [
|
|
397
|
+
c.value ? (f(), F(W, {
|
|
396
398
|
key: 0,
|
|
397
|
-
"model-value": M(
|
|
399
|
+
"model-value": M(n),
|
|
398
400
|
label: "Unique ID (Reader ID)",
|
|
399
401
|
disabled: ""
|
|
400
|
-
}, null, 8, ["model-value"])) :
|
|
401
|
-
|
|
402
|
+
}, null, 8, ["model-value"])) : y.value && y.value.isLegacy ? (f(), C(P, { key: 1 }, [
|
|
403
|
+
m(W, {
|
|
402
404
|
modelValue: e.value.uniqueId,
|
|
403
|
-
"onUpdate:modelValue":
|
|
405
|
+
"onUpdate:modelValue": R[1] || (R[1] = (Y) => e.value.uniqueId = Y),
|
|
404
406
|
label: "Unique ID (TID)"
|
|
405
407
|
}, null, 8, ["modelValue"]),
|
|
406
|
-
|
|
407
|
-
], 64)) : (
|
|
408
|
-
|
|
408
|
+
y.value.isOutdated ? (f(), C("span", Me, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : k("", !0)
|
|
409
|
+
], 64)) : (f(), C(P, { key: 2 }, [
|
|
410
|
+
m(W, {
|
|
409
411
|
modelValue: e.value.developerId,
|
|
410
|
-
"onUpdate:modelValue":
|
|
412
|
+
"onUpdate:modelValue": R[2] || (R[2] = (Y) => e.value.developerId = Y),
|
|
411
413
|
label: "Developer ID (MID)"
|
|
412
414
|
}, null, 8, ["modelValue"]),
|
|
413
|
-
|
|
415
|
+
m(W, {
|
|
414
416
|
modelValue: e.value.uniqueId,
|
|
415
|
-
"onUpdate:modelValue":
|
|
417
|
+
"onUpdate:modelValue": R[3] || (R[3] = (Y) => e.value.uniqueId = Y),
|
|
416
418
|
label: "Unique ID (TID)"
|
|
417
419
|
}, null, 8, ["modelValue"]),
|
|
418
|
-
|
|
420
|
+
m(de, {
|
|
419
421
|
modelValue: e.value.isUat,
|
|
420
|
-
"onUpdate:modelValue":
|
|
422
|
+
"onUpdate:modelValue": R[4] || (R[4] = (Y) => e.value.isUat = Y),
|
|
421
423
|
label: "Is UAT (Test)",
|
|
422
424
|
value: "1"
|
|
423
425
|
}, null, 8, ["modelValue"])
|
|
424
426
|
], 64)),
|
|
425
|
-
|
|
426
|
-
l.value.gateways && l.value.gateways.length > 0 ? (
|
|
427
|
+
_("div", Oe, [
|
|
428
|
+
l.value.gateways && l.value.gateways.length > 0 ? (f(), F(ie, {
|
|
427
429
|
key: 0,
|
|
428
430
|
class: "flex-1",
|
|
429
431
|
variant: "secondary",
|
|
430
432
|
label: "Delete",
|
|
431
|
-
onclick: () =>
|
|
432
|
-
}, null, 8, ["onclick"])) :
|
|
433
|
-
|
|
433
|
+
onclick: () => Q(0)
|
|
434
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
435
|
+
c.value && M(u) && E.value ? (f(), F(pe, {
|
|
434
436
|
key: 1,
|
|
435
437
|
class: "flex-1",
|
|
436
438
|
variant: "plain",
|
|
437
439
|
placement: "top",
|
|
438
|
-
content: M(
|
|
440
|
+
content: M(w)
|
|
439
441
|
}, {
|
|
440
442
|
default: O(() => [
|
|
441
|
-
|
|
442
|
-
|
|
443
|
+
_("div", Pe, [
|
|
444
|
+
m(ie, {
|
|
443
445
|
type: L.value,
|
|
444
446
|
class: "w-full",
|
|
445
447
|
variant: "primary",
|
|
446
448
|
loading: $.value,
|
|
447
449
|
disabled: E.value,
|
|
448
|
-
label:
|
|
449
|
-
onClick:
|
|
450
|
+
label: V.value,
|
|
451
|
+
onClick: J
|
|
450
452
|
}, null, 8, ["type", "loading", "disabled", "label"])
|
|
451
453
|
])
|
|
452
454
|
]),
|
|
453
455
|
_: 1
|
|
454
|
-
}, 8, ["content"])) : (
|
|
456
|
+
}, 8, ["content"])) : (f(), F(ie, {
|
|
455
457
|
key: 2,
|
|
456
458
|
type: L.value,
|
|
457
459
|
class: "flex-1",
|
|
458
460
|
variant: "primary",
|
|
459
461
|
loading: $.value,
|
|
460
462
|
disabled: E.value,
|
|
461
|
-
label:
|
|
462
|
-
onClick:
|
|
463
|
+
label: V.value,
|
|
464
|
+
onClick: J
|
|
463
465
|
}, null, 8, ["type", "loading", "disabled", "label"]))
|
|
464
466
|
])
|
|
465
|
-
], 64)) :
|
|
467
|
+
], 64)) : k("", !0)
|
|
466
468
|
]),
|
|
467
469
|
_: 1
|
|
468
470
|
}, 512);
|
|
469
471
|
};
|
|
470
472
|
}
|
|
471
|
-
}),
|
|
473
|
+
}), Ge = {
|
|
472
474
|
key: 0,
|
|
473
475
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
474
|
-
},
|
|
476
|
+
}, Ae = { class: "flex mt-6 space-x-6" }, $e = /* @__PURE__ */ S({
|
|
475
477
|
__name: "TerminalGateway",
|
|
476
478
|
props: {
|
|
477
479
|
terminal: {
|
|
@@ -483,63 +485,63 @@ const Se = {
|
|
|
483
485
|
required: !0
|
|
484
486
|
}
|
|
485
487
|
},
|
|
486
|
-
setup(
|
|
487
|
-
const { isLoading:
|
|
488
|
+
setup(I) {
|
|
489
|
+
const { isLoading: d, startAsyncCall: a } = le(), b = I, l = A(() => b.terminal), r = T(), e = T(), v = T(-1), p = T({
|
|
488
490
|
terminalId: ""
|
|
489
|
-
}),
|
|
490
|
-
|
|
491
|
-
},
|
|
491
|
+
}), y = () => {
|
|
492
|
+
p.value.terminalId = "", v.value = -1;
|
|
493
|
+
}, c = () => {
|
|
492
494
|
if (a(async () => {
|
|
493
|
-
r.value = await K.getRestaurantTerminals(
|
|
494
|
-
}), !
|
|
495
|
-
return
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
498
|
-
return
|
|
499
|
-
|
|
500
|
-
const i =
|
|
501
|
-
i.gateway === "FeedMe" && i.config && (
|
|
495
|
+
r.value = await K.getRestaurantTerminals(b.terminal.referenceId);
|
|
496
|
+
}), !b.terminal.ecrs)
|
|
497
|
+
return y();
|
|
498
|
+
const n = b.terminal.ecrs.findIndex((u) => u && u.gateway && u.gateway === "FeedMe");
|
|
499
|
+
if (n === -1)
|
|
500
|
+
return y();
|
|
501
|
+
v.value = n;
|
|
502
|
+
const i = b.terminal.ecrs.at(n);
|
|
503
|
+
i.gateway === "FeedMe" && i.config && (p.value = {
|
|
502
504
|
terminalId: i.config.terminalId
|
|
503
505
|
});
|
|
504
506
|
};
|
|
505
|
-
q(l,
|
|
506
|
-
const s =
|
|
507
|
-
label:
|
|
508
|
-
value:
|
|
507
|
+
q(l, c), G(c);
|
|
508
|
+
const s = U(() => (r.value ?? []).map((n) => ({
|
|
509
|
+
label: n.name ?? n._id,
|
|
510
|
+
value: n._id
|
|
509
511
|
})));
|
|
510
|
-
async function t(
|
|
512
|
+
async function t(n) {
|
|
511
513
|
var i;
|
|
512
|
-
(i =
|
|
514
|
+
(i = b.terminal.ecrs) == null || i.splice(n, 1), b.onUpdate(b.terminal);
|
|
513
515
|
}
|
|
514
|
-
return (
|
|
515
|
-
const
|
|
516
|
-
return M(
|
|
517
|
-
|
|
518
|
-
])) : (
|
|
516
|
+
return (n, i) => {
|
|
517
|
+
const u = g("FmCircularProgress"), w = g("FmSelect"), o = g("FmButton"), x = g("FmForm");
|
|
518
|
+
return M(d) ? (f(), C("div", Ge, [
|
|
519
|
+
m(u, { size: "xxl" })
|
|
520
|
+
])) : (f(), F(x, {
|
|
519
521
|
key: 1,
|
|
520
522
|
ref: e.value,
|
|
521
523
|
class: "flex flex-col gap-16 w-[500px]",
|
|
522
524
|
onValidationSuccess: i[1] || (i[1] = () => {
|
|
523
|
-
|
|
525
|
+
v.value > -1 ? l.value.ecrs[v.value] = { gateway: "FeedMe", config: p.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: p.value })), b.onUpdate(l.value);
|
|
524
526
|
})
|
|
525
527
|
}, {
|
|
526
528
|
default: O(() => [
|
|
527
|
-
|
|
528
|
-
modelValue:
|
|
529
|
-
"onUpdate:modelValue": i[0] || (i[0] = (L) =>
|
|
529
|
+
m(w, {
|
|
530
|
+
modelValue: p.value.terminalId,
|
|
531
|
+
"onUpdate:modelValue": i[0] || (i[0] = (L) => p.value.terminalId = L),
|
|
530
532
|
label: "Terminal ID",
|
|
531
533
|
items: s.value,
|
|
532
534
|
rules: M(ue)(M(ce).string())
|
|
533
535
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
534
|
-
|
|
535
|
-
|
|
536
|
+
_("div", Ae, [
|
|
537
|
+
v.value > -1 ? (f(), F(o, {
|
|
536
538
|
key: 0,
|
|
537
539
|
class: "flex-1",
|
|
538
540
|
variant: "secondary",
|
|
539
541
|
label: "Delete",
|
|
540
|
-
onclick: () => t(
|
|
541
|
-
}, null, 8, ["onclick"])) :
|
|
542
|
-
|
|
542
|
+
onclick: () => t(v.value)
|
|
543
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
544
|
+
m(o, {
|
|
543
545
|
type: "submit",
|
|
544
546
|
class: "flex-1",
|
|
545
547
|
variant: "primary",
|
|
@@ -551,7 +553,7 @@ const Se = {
|
|
|
551
553
|
}, 512));
|
|
552
554
|
};
|
|
553
555
|
}
|
|
554
|
-
}),
|
|
556
|
+
}), De = { class: "flex mt-6 space-x-6" }, Be = /* @__PURE__ */ S({
|
|
555
557
|
__name: "GhlGateway",
|
|
556
558
|
props: {
|
|
557
559
|
terminal: {
|
|
@@ -563,68 +565,68 @@ const Se = {
|
|
|
563
565
|
required: !0
|
|
564
566
|
}
|
|
565
567
|
},
|
|
566
|
-
setup(
|
|
567
|
-
const
|
|
568
|
+
setup(I) {
|
|
569
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T({
|
|
568
570
|
merchantId: "",
|
|
569
571
|
terminalId: "",
|
|
570
572
|
privateKey: ""
|
|
571
573
|
}), e = () => {
|
|
572
574
|
r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", l.value = -1;
|
|
573
|
-
},
|
|
575
|
+
}, v = () => {
|
|
574
576
|
if (!a.value.ecrs)
|
|
575
577
|
return e();
|
|
576
|
-
const
|
|
577
|
-
if (
|
|
578
|
+
const y = a.value.ecrs.findIndex((s) => s && s.gateway && s.gateway === "Ghl");
|
|
579
|
+
if (y === -1)
|
|
578
580
|
return e();
|
|
579
|
-
l.value =
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
merchantId:
|
|
583
|
-
terminalId:
|
|
584
|
-
privateKey:
|
|
581
|
+
l.value = y;
|
|
582
|
+
const c = a.value.ecrs.at(y);
|
|
583
|
+
c.gateway === "Ghl" && c.config && (r.value = {
|
|
584
|
+
merchantId: c.config.merchantId,
|
|
585
|
+
terminalId: c.config.terminalId,
|
|
586
|
+
privateKey: c.config.privateKey || ""
|
|
585
587
|
});
|
|
586
588
|
};
|
|
587
|
-
q(a,
|
|
588
|
-
async function
|
|
589
|
-
var
|
|
590
|
-
(
|
|
589
|
+
q(a, v), G(v);
|
|
590
|
+
async function p(y) {
|
|
591
|
+
var c;
|
|
592
|
+
(c = a.value.ecrs) == null || c.splice(y, 1), d.onUpdate(a.value);
|
|
591
593
|
}
|
|
592
|
-
return (
|
|
593
|
-
const s = g("FmTextField"), t = g("FmTextarea"),
|
|
594
|
-
return
|
|
595
|
-
ref:
|
|
594
|
+
return (y, c) => {
|
|
595
|
+
const s = g("FmTextField"), t = g("FmTextarea"), n = g("FmButton"), i = g("FmForm");
|
|
596
|
+
return f(), F(i, {
|
|
597
|
+
ref: b.value,
|
|
596
598
|
class: "flex flex-col gap-16 w-[500px]",
|
|
597
|
-
onValidationSuccess:
|
|
598
|
-
l.value > -1 ? a.value.ecrs[l.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })),
|
|
599
|
+
onValidationSuccess: c[3] || (c[3] = () => {
|
|
600
|
+
l.value > -1 ? a.value.ecrs[l.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })), d.onUpdate(a.value);
|
|
599
601
|
})
|
|
600
602
|
}, {
|
|
601
603
|
default: O(() => [
|
|
602
|
-
|
|
604
|
+
m(s, {
|
|
603
605
|
modelValue: r.value.merchantId,
|
|
604
|
-
"onUpdate:modelValue":
|
|
606
|
+
"onUpdate:modelValue": c[0] || (c[0] = (u) => r.value.merchantId = u),
|
|
605
607
|
label: "Merchant ID"
|
|
606
608
|
}, null, 8, ["modelValue"]),
|
|
607
|
-
|
|
609
|
+
m(s, {
|
|
608
610
|
modelValue: r.value.terminalId,
|
|
609
|
-
"onUpdate:modelValue":
|
|
611
|
+
"onUpdate:modelValue": c[1] || (c[1] = (u) => r.value.terminalId = u),
|
|
610
612
|
label: "Terminal ID"
|
|
611
613
|
}, null, 8, ["modelValue"]),
|
|
612
|
-
|
|
614
|
+
m(t, {
|
|
613
615
|
modelValue: r.value.privateKey,
|
|
614
|
-
"onUpdate:modelValue":
|
|
616
|
+
"onUpdate:modelValue": c[2] || (c[2] = (u) => r.value.privateKey = u),
|
|
615
617
|
label: "Private Key",
|
|
616
618
|
"label-mark": "optional",
|
|
617
619
|
"label-info": "Default will use FeedMe Private Key"
|
|
618
620
|
}, null, 8, ["modelValue"]),
|
|
619
|
-
|
|
620
|
-
l.value > -1 ? (
|
|
621
|
+
_("div", De, [
|
|
622
|
+
l.value > -1 ? (f(), F(n, {
|
|
621
623
|
key: 0,
|
|
622
624
|
class: "flex-1",
|
|
623
625
|
variant: "secondary",
|
|
624
626
|
label: "Delete",
|
|
625
|
-
onclick: () =>
|
|
626
|
-
}, null, 8, ["onclick"])) :
|
|
627
|
-
|
|
627
|
+
onclick: () => p(l.value)
|
|
628
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
629
|
+
m(n, {
|
|
628
630
|
type: "submit",
|
|
629
631
|
class: "flex-1",
|
|
630
632
|
variant: "primary",
|
|
@@ -636,7 +638,7 @@ const Se = {
|
|
|
636
638
|
}, 512);
|
|
637
639
|
};
|
|
638
640
|
}
|
|
639
|
-
}),
|
|
641
|
+
}), Le = { class: "flex items-end" }, Ee = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ye = { class: "flex mt-6 space-x-6" }, Ke = /* @__PURE__ */ S({
|
|
640
642
|
__name: "MaybankGateway",
|
|
641
643
|
props: {
|
|
642
644
|
terminal: {
|
|
@@ -648,49 +650,49 @@ const Se = {
|
|
|
648
650
|
required: !0
|
|
649
651
|
}
|
|
650
652
|
},
|
|
651
|
-
setup(
|
|
652
|
-
const
|
|
653
|
+
setup(I) {
|
|
654
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
653
655
|
ip: "",
|
|
654
656
|
receiptName: "",
|
|
655
657
|
cardTypes: []
|
|
656
|
-
}),
|
|
658
|
+
}), v = () => {
|
|
657
659
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
658
|
-
},
|
|
660
|
+
}, p = () => {
|
|
659
661
|
var i;
|
|
660
662
|
if (!a.value.ecrIntegrations)
|
|
661
|
-
return
|
|
662
|
-
const s = a.value.ecrIntegrations, t = s.findIndex((
|
|
663
|
+
return v();
|
|
664
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Maybank");
|
|
663
665
|
if (t === -1)
|
|
664
|
-
return
|
|
666
|
+
return v();
|
|
665
667
|
l.value = t;
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
ip:
|
|
669
|
-
receiptName:
|
|
670
|
-
cardTypes: ((i =
|
|
668
|
+
const n = s.at(t);
|
|
669
|
+
n.gateway === "Maybank" && n.config && (e.value = {
|
|
670
|
+
ip: n.config.ip ?? "",
|
|
671
|
+
receiptName: n.receiptName ?? "",
|
|
672
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
671
673
|
});
|
|
672
674
|
};
|
|
673
|
-
q(a,
|
|
674
|
-
async function
|
|
675
|
+
q(a, p), G(p);
|
|
676
|
+
async function y(s) {
|
|
675
677
|
var t;
|
|
676
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
678
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
677
679
|
}
|
|
678
|
-
async function
|
|
680
|
+
async function c() {
|
|
679
681
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
680
682
|
}
|
|
681
683
|
return (s, t) => {
|
|
682
|
-
const
|
|
683
|
-
return
|
|
684
|
-
ref:
|
|
684
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
685
|
+
return f(), F(w, {
|
|
686
|
+
ref: b.value,
|
|
685
687
|
class: "flex flex-col gap-16 w-[500px]",
|
|
686
688
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
687
|
-
var
|
|
689
|
+
var o, x;
|
|
688
690
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
689
691
|
gateway: "Maybank",
|
|
690
692
|
config: { ip: e.value.ip },
|
|
691
693
|
receiptName: e.value.receiptName,
|
|
692
694
|
dialogConfig: {
|
|
693
|
-
...(
|
|
695
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
694
696
|
cardTypes: e.value.cardTypes
|
|
695
697
|
}
|
|
696
698
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -700,51 +702,51 @@ const Se = {
|
|
|
700
702
|
dialogConfig: {
|
|
701
703
|
cardTypes: e.value.cardTypes
|
|
702
704
|
}
|
|
703
|
-
})),
|
|
705
|
+
})), d.onUpdate(a.value);
|
|
704
706
|
})
|
|
705
707
|
}, {
|
|
706
708
|
default: O(() => [
|
|
707
|
-
|
|
709
|
+
m(n, {
|
|
708
710
|
modelValue: e.value.ip,
|
|
709
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
711
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
710
712
|
label: "IP Address"
|
|
711
713
|
}, null, 8, ["modelValue"]),
|
|
712
|
-
|
|
714
|
+
m(n, {
|
|
713
715
|
modelValue: e.value.receiptName,
|
|
714
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
716
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
715
717
|
label: "Receipt Payment Name",
|
|
716
718
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
717
719
|
}, null, 8, ["modelValue"]),
|
|
718
|
-
|
|
719
|
-
|
|
720
|
+
_("div", Le, [
|
|
721
|
+
m(n, {
|
|
720
722
|
modelValue: r.value,
|
|
721
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
723
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
722
724
|
label: "Fallback Card Types",
|
|
723
725
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
724
726
|
}, null, 8, ["modelValue"]),
|
|
725
|
-
|
|
727
|
+
m(i, {
|
|
726
728
|
class: "ml-4",
|
|
727
729
|
icon: "add",
|
|
728
|
-
onClick:
|
|
730
|
+
onClick: c
|
|
729
731
|
})
|
|
730
732
|
]),
|
|
731
|
-
|
|
732
|
-
(
|
|
733
|
-
key:
|
|
734
|
-
label:
|
|
733
|
+
_("div", Ee, [
|
|
734
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
735
|
+
key: o,
|
|
736
|
+
label: o,
|
|
735
737
|
removable: !0,
|
|
736
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
738
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
737
739
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
738
740
|
]),
|
|
739
|
-
|
|
740
|
-
l.value > -1 ? (
|
|
741
|
+
_("div", Ye, [
|
|
742
|
+
l.value > -1 ? (f(), F(i, {
|
|
741
743
|
key: 0,
|
|
742
744
|
class: "flex-1",
|
|
743
745
|
variant: "secondary",
|
|
744
746
|
label: "Delete",
|
|
745
|
-
onclick: () =>
|
|
746
|
-
}, null, 8, ["onclick"])) :
|
|
747
|
-
|
|
747
|
+
onclick: () => y(l.value)
|
|
748
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
749
|
+
m(i, {
|
|
748
750
|
type: "submit",
|
|
749
751
|
class: "flex-1",
|
|
750
752
|
variant: "primary",
|
|
@@ -756,7 +758,7 @@ const Se = {
|
|
|
756
758
|
}, 512);
|
|
757
759
|
};
|
|
758
760
|
}
|
|
759
|
-
}),
|
|
761
|
+
}), je = { class: "flex items-end" }, He = { class: "flex flex-wrap gap-8 items-center mt-4" }, ze = { class: "flex mt-6 space-x-6" }, Qe = /* @__PURE__ */ S({
|
|
760
762
|
__name: "Maybank2Gateway",
|
|
761
763
|
props: {
|
|
762
764
|
terminal: {
|
|
@@ -768,49 +770,49 @@ const Se = {
|
|
|
768
770
|
required: !0
|
|
769
771
|
}
|
|
770
772
|
},
|
|
771
|
-
setup(
|
|
772
|
-
const
|
|
773
|
+
setup(I) {
|
|
774
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
773
775
|
ip: "",
|
|
774
776
|
receiptName: "",
|
|
775
777
|
cardTypes: []
|
|
776
|
-
}),
|
|
778
|
+
}), v = () => {
|
|
777
779
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
778
|
-
},
|
|
780
|
+
}, p = () => {
|
|
779
781
|
var i;
|
|
780
782
|
if (!a.value.ecrIntegrations)
|
|
781
|
-
return
|
|
782
|
-
const s = a.value.ecrIntegrations, t = s.findIndex((
|
|
783
|
+
return v();
|
|
784
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Maybank2");
|
|
783
785
|
if (t === -1)
|
|
784
|
-
return
|
|
786
|
+
return v();
|
|
785
787
|
l.value = t;
|
|
786
|
-
const
|
|
787
|
-
|
|
788
|
-
ip:
|
|
789
|
-
receiptName:
|
|
790
|
-
cardTypes: ((i =
|
|
788
|
+
const n = s.at(t);
|
|
789
|
+
n.gateway === "Maybank2" && n.config && (e.value = {
|
|
790
|
+
ip: n.config.ip ?? "",
|
|
791
|
+
receiptName: n.receiptName ?? "",
|
|
792
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
791
793
|
});
|
|
792
794
|
};
|
|
793
|
-
q(a,
|
|
794
|
-
async function
|
|
795
|
+
q(a, p), G(p);
|
|
796
|
+
async function y(s) {
|
|
795
797
|
var t;
|
|
796
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
798
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
797
799
|
}
|
|
798
|
-
async function
|
|
800
|
+
async function c() {
|
|
799
801
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
800
802
|
}
|
|
801
803
|
return (s, t) => {
|
|
802
|
-
const
|
|
803
|
-
return
|
|
804
|
-
ref:
|
|
804
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
805
|
+
return f(), F(w, {
|
|
806
|
+
ref: b.value,
|
|
805
807
|
class: "flex flex-col gap-16 w-[500px]",
|
|
806
808
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
807
|
-
var
|
|
809
|
+
var o, x;
|
|
808
810
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
809
811
|
gateway: "Maybank2",
|
|
810
812
|
config: { ip: e.value.ip },
|
|
811
813
|
receiptName: e.value.receiptName,
|
|
812
814
|
dialogConfig: {
|
|
813
|
-
...(
|
|
815
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
814
816
|
cardTypes: e.value.cardTypes
|
|
815
817
|
}
|
|
816
818
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -820,51 +822,51 @@ const Se = {
|
|
|
820
822
|
dialogConfig: {
|
|
821
823
|
cardTypes: e.value.cardTypes
|
|
822
824
|
}
|
|
823
|
-
})),
|
|
825
|
+
})), d.onUpdate(a.value);
|
|
824
826
|
})
|
|
825
827
|
}, {
|
|
826
828
|
default: O(() => [
|
|
827
|
-
|
|
829
|
+
m(n, {
|
|
828
830
|
modelValue: e.value.ip,
|
|
829
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
831
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
830
832
|
label: "IP Address"
|
|
831
833
|
}, null, 8, ["modelValue"]),
|
|
832
|
-
|
|
834
|
+
m(n, {
|
|
833
835
|
modelValue: e.value.receiptName,
|
|
834
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
836
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
835
837
|
label: "Receipt Payment Name",
|
|
836
838
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
837
839
|
}, null, 8, ["modelValue"]),
|
|
838
|
-
|
|
839
|
-
|
|
840
|
+
_("div", je, [
|
|
841
|
+
m(n, {
|
|
840
842
|
modelValue: r.value,
|
|
841
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
843
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
842
844
|
label: "Fallback Card Types",
|
|
843
845
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
844
846
|
}, null, 8, ["modelValue"]),
|
|
845
|
-
|
|
847
|
+
m(i, {
|
|
846
848
|
class: "ml-4",
|
|
847
849
|
icon: "add",
|
|
848
|
-
onClick:
|
|
850
|
+
onClick: c
|
|
849
851
|
})
|
|
850
852
|
]),
|
|
851
|
-
|
|
852
|
-
(
|
|
853
|
-
key:
|
|
854
|
-
label:
|
|
853
|
+
_("div", He, [
|
|
854
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
855
|
+
key: o,
|
|
856
|
+
label: o,
|
|
855
857
|
removable: !0,
|
|
856
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
858
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
857
859
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
858
860
|
]),
|
|
859
|
-
|
|
860
|
-
l.value > -1 ? (
|
|
861
|
+
_("div", ze, [
|
|
862
|
+
l.value > -1 ? (f(), F(i, {
|
|
861
863
|
key: 0,
|
|
862
864
|
class: "flex-1",
|
|
863
865
|
variant: "secondary",
|
|
864
866
|
label: "Delete",
|
|
865
|
-
onclick: () =>
|
|
866
|
-
}, null, 8, ["onclick"])) :
|
|
867
|
-
|
|
867
|
+
onclick: () => y(l.value)
|
|
868
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
869
|
+
m(i, {
|
|
868
870
|
type: "submit",
|
|
869
871
|
class: "flex-1",
|
|
870
872
|
variant: "primary",
|
|
@@ -876,7 +878,7 @@ const Se = {
|
|
|
876
878
|
}, 512);
|
|
877
879
|
};
|
|
878
880
|
}
|
|
879
|
-
}),
|
|
881
|
+
}), Je = { class: "flex items-end" }, We = { class: "flex flex-wrap gap-8 items-center mt-4" }, Xe = { class: "flex mt-6 space-x-6" }, Ze = /* @__PURE__ */ S({
|
|
880
882
|
__name: "Maybank3Gateway",
|
|
881
883
|
props: {
|
|
882
884
|
terminal: {
|
|
@@ -888,49 +890,49 @@ const Se = {
|
|
|
888
890
|
required: !0
|
|
889
891
|
}
|
|
890
892
|
},
|
|
891
|
-
setup(
|
|
892
|
-
const
|
|
893
|
+
setup(I) {
|
|
894
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
893
895
|
receiptName: "",
|
|
894
896
|
config: {},
|
|
895
897
|
cardTypes: []
|
|
896
|
-
}),
|
|
898
|
+
}), v = () => {
|
|
897
899
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
898
|
-
},
|
|
900
|
+
}, p = () => {
|
|
899
901
|
var i;
|
|
900
902
|
if (!a.value.ecrIntegrations)
|
|
901
|
-
return
|
|
902
|
-
const s = a.value.ecrIntegrations, t = s.findIndex((
|
|
903
|
+
return v();
|
|
904
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Maybank3");
|
|
903
905
|
if (t === -1)
|
|
904
|
-
return
|
|
906
|
+
return v();
|
|
905
907
|
l.value = t;
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
config:
|
|
909
|
-
receiptName:
|
|
910
|
-
cardTypes: ((i =
|
|
908
|
+
const n = s.at(t);
|
|
909
|
+
n.gateway === "Maybank3" && n.config && (e.value = {
|
|
910
|
+
config: n.config,
|
|
911
|
+
receiptName: n.receiptName ?? "",
|
|
912
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
911
913
|
});
|
|
912
914
|
};
|
|
913
|
-
q(a,
|
|
914
|
-
async function
|
|
915
|
+
q(a, p), G(p);
|
|
916
|
+
async function y(s) {
|
|
915
917
|
var t;
|
|
916
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
918
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
917
919
|
}
|
|
918
|
-
async function
|
|
920
|
+
async function c() {
|
|
919
921
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
920
922
|
}
|
|
921
923
|
return (s, t) => {
|
|
922
|
-
const
|
|
923
|
-
return
|
|
924
|
-
ref:
|
|
924
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
925
|
+
return f(), F(w, {
|
|
926
|
+
ref: b.value,
|
|
925
927
|
class: "flex flex-col gap-16 w-[500px]",
|
|
926
928
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
927
|
-
var
|
|
929
|
+
var o, x;
|
|
928
930
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
929
931
|
gateway: "Maybank3",
|
|
930
932
|
config: e.value.config,
|
|
931
933
|
receiptName: e.value.receiptName,
|
|
932
934
|
dialogConfig: {
|
|
933
|
-
...(
|
|
935
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
934
936
|
cardTypes: e.value.cardTypes
|
|
935
937
|
}
|
|
936
938
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -940,46 +942,46 @@ const Se = {
|
|
|
940
942
|
dialogConfig: {
|
|
941
943
|
cardTypes: e.value.cardTypes
|
|
942
944
|
}
|
|
943
|
-
})),
|
|
945
|
+
})), d.onUpdate(a.value);
|
|
944
946
|
})
|
|
945
947
|
}, {
|
|
946
948
|
default: O(() => [
|
|
947
|
-
|
|
949
|
+
m(n, {
|
|
948
950
|
modelValue: e.value.receiptName,
|
|
949
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
951
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
950
952
|
label: "Receipt Payment Name",
|
|
951
953
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
952
954
|
}, null, 8, ["modelValue"]),
|
|
953
|
-
|
|
954
|
-
|
|
955
|
+
_("div", Je, [
|
|
956
|
+
m(n, {
|
|
955
957
|
modelValue: r.value,
|
|
956
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
958
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
957
959
|
label: "Fallback Card Types",
|
|
958
960
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
959
961
|
}, null, 8, ["modelValue"]),
|
|
960
|
-
|
|
962
|
+
m(i, {
|
|
961
963
|
class: "ml-4",
|
|
962
964
|
icon: "add",
|
|
963
|
-
onClick:
|
|
965
|
+
onClick: c
|
|
964
966
|
})
|
|
965
967
|
]),
|
|
966
|
-
|
|
967
|
-
(
|
|
968
|
-
key:
|
|
969
|
-
label:
|
|
968
|
+
_("div", We, [
|
|
969
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
970
|
+
key: o,
|
|
971
|
+
label: o,
|
|
970
972
|
removable: !0,
|
|
971
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
973
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
972
974
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
973
975
|
]),
|
|
974
|
-
|
|
975
|
-
l.value > -1 ? (
|
|
976
|
+
_("div", Xe, [
|
|
977
|
+
l.value > -1 ? (f(), F(i, {
|
|
976
978
|
key: 0,
|
|
977
979
|
class: "flex-1",
|
|
978
980
|
variant: "secondary",
|
|
979
981
|
label: "Delete",
|
|
980
|
-
onclick: () =>
|
|
981
|
-
}, null, 8, ["onclick"])) :
|
|
982
|
-
|
|
982
|
+
onclick: () => y(l.value)
|
|
983
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
984
|
+
m(i, {
|
|
983
985
|
type: "submit",
|
|
984
986
|
class: "flex-1",
|
|
985
987
|
variant: "primary",
|
|
@@ -991,7 +993,7 @@ const Se = {
|
|
|
991
993
|
}, 512);
|
|
992
994
|
};
|
|
993
995
|
}
|
|
994
|
-
}),
|
|
996
|
+
}), ea = { class: "flex items-end" }, aa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ta = { class: "flex mt-6 space-x-6" }, la = /* @__PURE__ */ S({
|
|
995
997
|
__name: "NetsGateway",
|
|
996
998
|
props: {
|
|
997
999
|
terminal: {
|
|
@@ -1003,49 +1005,49 @@ const Se = {
|
|
|
1003
1005
|
required: !0
|
|
1004
1006
|
}
|
|
1005
1007
|
},
|
|
1006
|
-
setup(
|
|
1007
|
-
const
|
|
1008
|
+
setup(I) {
|
|
1009
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
1008
1010
|
ip: "",
|
|
1009
1011
|
receiptName: "",
|
|
1010
1012
|
cardTypes: []
|
|
1011
|
-
}),
|
|
1013
|
+
}), v = () => {
|
|
1012
1014
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1013
|
-
},
|
|
1015
|
+
}, p = () => {
|
|
1014
1016
|
var i;
|
|
1015
1017
|
if (!a.value.ecrIntegrations)
|
|
1016
|
-
return
|
|
1017
|
-
const s = a.value.ecrIntegrations, t = s.findIndex((
|
|
1018
|
+
return v();
|
|
1019
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Nets");
|
|
1018
1020
|
if (t === -1)
|
|
1019
|
-
return
|
|
1021
|
+
return v();
|
|
1020
1022
|
l.value = t;
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1023
|
-
ip:
|
|
1024
|
-
receiptName:
|
|
1025
|
-
cardTypes: ((i =
|
|
1023
|
+
const n = s.at(t);
|
|
1024
|
+
n.gateway === "Nets" && n.config && (e.value = {
|
|
1025
|
+
ip: n.config.ip ?? "",
|
|
1026
|
+
receiptName: n.receiptName ?? "",
|
|
1027
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1026
1028
|
});
|
|
1027
1029
|
};
|
|
1028
|
-
q(a,
|
|
1029
|
-
async function
|
|
1030
|
+
q(a, p), G(p);
|
|
1031
|
+
async function y(s) {
|
|
1030
1032
|
var t;
|
|
1031
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
1033
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1032
1034
|
}
|
|
1033
|
-
async function
|
|
1035
|
+
async function c() {
|
|
1034
1036
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1035
1037
|
}
|
|
1036
1038
|
return (s, t) => {
|
|
1037
|
-
const
|
|
1038
|
-
return
|
|
1039
|
-
ref:
|
|
1039
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
1040
|
+
return f(), F(w, {
|
|
1041
|
+
ref: b.value,
|
|
1040
1042
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1041
1043
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
1042
|
-
var
|
|
1044
|
+
var o, x;
|
|
1043
1045
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1044
1046
|
gateway: "Nets",
|
|
1045
1047
|
config: { ip: e.value.ip },
|
|
1046
1048
|
receiptName: e.value.receiptName,
|
|
1047
1049
|
dialogConfig: {
|
|
1048
|
-
...(
|
|
1050
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
1049
1051
|
cardTypes: e.value.cardTypes
|
|
1050
1052
|
}
|
|
1051
1053
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1055,51 +1057,51 @@ const Se = {
|
|
|
1055
1057
|
dialogConfig: {
|
|
1056
1058
|
cardTypes: e.value.cardTypes
|
|
1057
1059
|
}
|
|
1058
|
-
})),
|
|
1060
|
+
})), d.onUpdate(a.value);
|
|
1059
1061
|
})
|
|
1060
1062
|
}, {
|
|
1061
1063
|
default: O(() => [
|
|
1062
|
-
|
|
1064
|
+
m(n, {
|
|
1063
1065
|
modelValue: e.value.ip,
|
|
1064
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1066
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
1065
1067
|
label: "IP Address"
|
|
1066
1068
|
}, null, 8, ["modelValue"]),
|
|
1067
|
-
|
|
1069
|
+
m(n, {
|
|
1068
1070
|
modelValue: e.value.receiptName,
|
|
1069
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1071
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
1070
1072
|
label: "Receipt Payment Name",
|
|
1071
1073
|
"label-info": "Default receipt display will be 'TERMINAL_NETS'"
|
|
1072
1074
|
}, null, 8, ["modelValue"]),
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
+
_("div", ea, [
|
|
1076
|
+
m(n, {
|
|
1075
1077
|
modelValue: r.value,
|
|
1076
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
1078
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
1077
1079
|
label: "Fallback Card Types",
|
|
1078
1080
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1079
1081
|
}, null, 8, ["modelValue"]),
|
|
1080
|
-
|
|
1082
|
+
m(i, {
|
|
1081
1083
|
class: "ml-4",
|
|
1082
1084
|
icon: "add",
|
|
1083
|
-
onClick:
|
|
1085
|
+
onClick: c
|
|
1084
1086
|
})
|
|
1085
1087
|
]),
|
|
1086
|
-
|
|
1087
|
-
(
|
|
1088
|
-
key:
|
|
1089
|
-
label:
|
|
1088
|
+
_("div", aa, [
|
|
1089
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
1090
|
+
key: o,
|
|
1091
|
+
label: o,
|
|
1090
1092
|
removable: !0,
|
|
1091
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1093
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1092
1094
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1093
1095
|
]),
|
|
1094
|
-
|
|
1095
|
-
l.value > -1 ? (
|
|
1096
|
+
_("div", ta, [
|
|
1097
|
+
l.value > -1 ? (f(), F(i, {
|
|
1096
1098
|
key: 0,
|
|
1097
1099
|
class: "flex-1",
|
|
1098
1100
|
variant: "secondary",
|
|
1099
1101
|
label: "Delete",
|
|
1100
|
-
onclick: () =>
|
|
1101
|
-
}, null, 8, ["onclick"])) :
|
|
1102
|
-
|
|
1102
|
+
onclick: () => y(l.value)
|
|
1103
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1104
|
+
m(i, {
|
|
1103
1105
|
type: "submit",
|
|
1104
1106
|
class: "flex-1",
|
|
1105
1107
|
variant: "primary",
|
|
@@ -1111,7 +1113,7 @@ const Se = {
|
|
|
1111
1113
|
}, 512);
|
|
1112
1114
|
};
|
|
1113
1115
|
}
|
|
1114
|
-
}),
|
|
1116
|
+
}), na = { class: "flex items-end" }, oa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ra = { class: "flex mt-6 space-x-6" }, ia = /* @__PURE__ */ S({
|
|
1115
1117
|
__name: "KBankGateway",
|
|
1116
1118
|
props: {
|
|
1117
1119
|
terminal: {
|
|
@@ -1123,47 +1125,47 @@ const Se = {
|
|
|
1123
1125
|
required: !0
|
|
1124
1126
|
}
|
|
1125
1127
|
},
|
|
1126
|
-
setup(
|
|
1127
|
-
const
|
|
1128
|
+
setup(I) {
|
|
1129
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
1128
1130
|
receiptName: "",
|
|
1129
1131
|
cardTypes: []
|
|
1130
|
-
}),
|
|
1132
|
+
}), v = () => {
|
|
1131
1133
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1132
|
-
},
|
|
1134
|
+
}, p = () => {
|
|
1133
1135
|
var i;
|
|
1134
1136
|
if (!a.value.ecrIntegrations)
|
|
1135
|
-
return
|
|
1136
|
-
const s = a.value.ecrIntegrations, t = s.findIndex((
|
|
1137
|
+
return v();
|
|
1138
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((u) => u && u.gateway && u.gateway === "Kbank");
|
|
1137
1139
|
if (t === -1)
|
|
1138
|
-
return
|
|
1140
|
+
return v();
|
|
1139
1141
|
l.value = t;
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1142
|
-
receiptName:
|
|
1143
|
-
cardTypes: ((i =
|
|
1142
|
+
const n = s.at(t);
|
|
1143
|
+
n.gateway === "Kbank" && n.config && (e.value = {
|
|
1144
|
+
receiptName: n.receiptName ?? "",
|
|
1145
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1144
1146
|
});
|
|
1145
1147
|
};
|
|
1146
|
-
q(a,
|
|
1147
|
-
async function
|
|
1148
|
+
q(a, p), G(p);
|
|
1149
|
+
async function y(s) {
|
|
1148
1150
|
var t;
|
|
1149
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
1151
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1150
1152
|
}
|
|
1151
|
-
async function
|
|
1153
|
+
async function c() {
|
|
1152
1154
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1153
1155
|
}
|
|
1154
1156
|
return (s, t) => {
|
|
1155
|
-
const
|
|
1156
|
-
return
|
|
1157
|
-
ref:
|
|
1157
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
1158
|
+
return f(), F(w, {
|
|
1159
|
+
ref: b.value,
|
|
1158
1160
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1159
1161
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1160
|
-
var
|
|
1162
|
+
var o, x;
|
|
1161
1163
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1162
1164
|
gateway: "Kbank",
|
|
1163
1165
|
config: {},
|
|
1164
1166
|
receiptName: e.value.receiptName,
|
|
1165
1167
|
dialogConfig: {
|
|
1166
|
-
...(
|
|
1168
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
1167
1169
|
cardTypes: e.value.cardTypes
|
|
1168
1170
|
}
|
|
1169
1171
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1173,46 +1175,46 @@ const Se = {
|
|
|
1173
1175
|
dialogConfig: {
|
|
1174
1176
|
cardTypes: e.value.cardTypes
|
|
1175
1177
|
}
|
|
1176
|
-
})),
|
|
1178
|
+
})), d.onUpdate(a.value);
|
|
1177
1179
|
})
|
|
1178
1180
|
}, {
|
|
1179
1181
|
default: O(() => [
|
|
1180
|
-
|
|
1182
|
+
m(n, {
|
|
1181
1183
|
modelValue: e.value.receiptName,
|
|
1182
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1184
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1183
1185
|
label: "Receipt Payment Name",
|
|
1184
1186
|
"label-info": "Default receipt display will be 'TERMINAL_KBANK'"
|
|
1185
1187
|
}, null, 8, ["modelValue"]),
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
+
_("div", na, [
|
|
1189
|
+
m(n, {
|
|
1188
1190
|
modelValue: r.value,
|
|
1189
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1191
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1190
1192
|
label: "Fallback Card Types",
|
|
1191
1193
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1192
1194
|
}, null, 8, ["modelValue"]),
|
|
1193
|
-
|
|
1195
|
+
m(i, {
|
|
1194
1196
|
class: "ml-4",
|
|
1195
1197
|
icon: "add",
|
|
1196
|
-
onClick:
|
|
1198
|
+
onClick: c
|
|
1197
1199
|
})
|
|
1198
1200
|
]),
|
|
1199
|
-
|
|
1200
|
-
(
|
|
1201
|
-
key:
|
|
1202
|
-
label:
|
|
1201
|
+
_("div", oa, [
|
|
1202
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
1203
|
+
key: o,
|
|
1204
|
+
label: o,
|
|
1203
1205
|
removable: !0,
|
|
1204
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1206
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1205
1207
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1206
1208
|
]),
|
|
1207
|
-
|
|
1208
|
-
l.value > -1 ? (
|
|
1209
|
+
_("div", ra, [
|
|
1210
|
+
l.value > -1 ? (f(), F(i, {
|
|
1209
1211
|
key: 0,
|
|
1210
1212
|
class: "flex-1",
|
|
1211
1213
|
variant: "secondary",
|
|
1212
1214
|
label: "Delete",
|
|
1213
|
-
onclick: () =>
|
|
1214
|
-
}, null, 8, ["onclick"])) :
|
|
1215
|
-
|
|
1215
|
+
onclick: () => y(l.value)
|
|
1216
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1217
|
+
m(i, {
|
|
1216
1218
|
type: "submit",
|
|
1217
1219
|
class: "flex-1",
|
|
1218
1220
|
variant: "primary",
|
|
@@ -1224,7 +1226,7 @@ const Se = {
|
|
|
1224
1226
|
}, 512);
|
|
1225
1227
|
};
|
|
1226
1228
|
}
|
|
1227
|
-
}),
|
|
1229
|
+
}), sa = { class: "flex mt-6 space-x-6" }, ua = /* @__PURE__ */ S({
|
|
1228
1230
|
__name: "Ghl2Gateway",
|
|
1229
1231
|
props: {
|
|
1230
1232
|
terminal: {
|
|
@@ -1236,36 +1238,36 @@ const Se = {
|
|
|
1236
1238
|
required: !0
|
|
1237
1239
|
}
|
|
1238
1240
|
},
|
|
1239
|
-
setup(
|
|
1240
|
-
const
|
|
1241
|
+
setup(I) {
|
|
1242
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T({
|
|
1241
1243
|
ip: "",
|
|
1242
1244
|
receiptName: ""
|
|
1243
1245
|
}), e = () => {
|
|
1244
1246
|
r.value.ip = "", r.value.receiptName = "", l.value = -1;
|
|
1245
|
-
},
|
|
1247
|
+
}, v = () => {
|
|
1246
1248
|
if (!a.value.ecrIntegrations)
|
|
1247
1249
|
return e();
|
|
1248
|
-
const
|
|
1249
|
-
if (
|
|
1250
|
+
const y = a.value.ecrIntegrations, c = y.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
|
|
1251
|
+
if (c === -1)
|
|
1250
1252
|
return e();
|
|
1251
|
-
l.value =
|
|
1252
|
-
const s =
|
|
1253
|
+
l.value = c;
|
|
1254
|
+
const s = y.at(c);
|
|
1253
1255
|
s.gateway === "Ghl2" && s.config && (r.value = {
|
|
1254
1256
|
ip: s.config.ip ?? "",
|
|
1255
1257
|
receiptName: s.receiptName ?? ""
|
|
1256
1258
|
});
|
|
1257
1259
|
};
|
|
1258
|
-
q(a,
|
|
1259
|
-
async function
|
|
1260
|
-
var
|
|
1261
|
-
(
|
|
1260
|
+
q(a, v), G(v);
|
|
1261
|
+
async function p(y) {
|
|
1262
|
+
var c;
|
|
1263
|
+
(c = a.value.ecrIntegrations) == null || c.splice(y, 1), d.onUpdate(a.value);
|
|
1262
1264
|
}
|
|
1263
|
-
return (
|
|
1264
|
-
const s = g("FmTextField"), t = g("FmButton"),
|
|
1265
|
-
return
|
|
1266
|
-
ref:
|
|
1265
|
+
return (y, c) => {
|
|
1266
|
+
const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
|
|
1267
|
+
return f(), F(n, {
|
|
1268
|
+
ref: b.value,
|
|
1267
1269
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1268
|
-
onValidationSuccess:
|
|
1270
|
+
onValidationSuccess: c[2] || (c[2] = () => {
|
|
1269
1271
|
a.value.ecrIntegrations || (a.value.ecrIntegrations = []), l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1270
1272
|
gateway: "Ghl2",
|
|
1271
1273
|
config: { ip: r.value.ip },
|
|
@@ -1274,30 +1276,30 @@ const Se = {
|
|
|
1274
1276
|
gateway: "Ghl2",
|
|
1275
1277
|
config: { ip: r.value.ip },
|
|
1276
1278
|
receiptName: r.value.receiptName
|
|
1277
|
-
}),
|
|
1279
|
+
}), d.onUpdate(a.value);
|
|
1278
1280
|
})
|
|
1279
1281
|
}, {
|
|
1280
1282
|
default: O(() => [
|
|
1281
|
-
|
|
1283
|
+
m(s, {
|
|
1282
1284
|
modelValue: r.value.ip,
|
|
1283
|
-
"onUpdate:modelValue":
|
|
1285
|
+
"onUpdate:modelValue": c[0] || (c[0] = (i) => r.value.ip = i),
|
|
1284
1286
|
label: "IP Address"
|
|
1285
1287
|
}, null, 8, ["modelValue"]),
|
|
1286
|
-
|
|
1288
|
+
m(s, {
|
|
1287
1289
|
modelValue: r.value.receiptName,
|
|
1288
|
-
"onUpdate:modelValue":
|
|
1290
|
+
"onUpdate:modelValue": c[1] || (c[1] = (i) => r.value.receiptName = i),
|
|
1289
1291
|
label: "Receipt Payment Name",
|
|
1290
1292
|
"label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
|
|
1291
1293
|
}, null, 8, ["modelValue"]),
|
|
1292
|
-
|
|
1293
|
-
l.value > -1 ? (
|
|
1294
|
+
_("div", sa, [
|
|
1295
|
+
l.value > -1 ? (f(), F(t, {
|
|
1294
1296
|
key: 0,
|
|
1295
1297
|
class: "flex-1",
|
|
1296
1298
|
variant: "secondary",
|
|
1297
1299
|
label: "Delete",
|
|
1298
|
-
onclick: () =>
|
|
1299
|
-
}, null, 8, ["onclick"])) :
|
|
1300
|
-
|
|
1300
|
+
onclick: () => p(l.value)
|
|
1301
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1302
|
+
m(t, {
|
|
1301
1303
|
type: "submit",
|
|
1302
1304
|
class: "flex-1",
|
|
1303
1305
|
variant: "primary",
|
|
@@ -1309,7 +1311,7 @@ const Se = {
|
|
|
1309
1311
|
}, 512);
|
|
1310
1312
|
};
|
|
1311
1313
|
}
|
|
1312
|
-
}),
|
|
1314
|
+
}), ca = { class: "flex items-end" }, da = { class: "flex flex-wrap gap-8 items-center mt-4" }, pa = { class: "flex mt-6 space-x-6" }, ma = /* @__PURE__ */ S({
|
|
1313
1315
|
__name: "Ghl3Gateway",
|
|
1314
1316
|
props: {
|
|
1315
1317
|
terminal: {
|
|
@@ -1321,51 +1323,51 @@ const Se = {
|
|
|
1321
1323
|
required: !0
|
|
1322
1324
|
}
|
|
1323
1325
|
},
|
|
1324
|
-
setup(
|
|
1325
|
-
const
|
|
1326
|
+
setup(I) {
|
|
1327
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
1326
1328
|
receiptName: "",
|
|
1327
1329
|
config: {},
|
|
1328
1330
|
cardTypes: []
|
|
1329
|
-
}),
|
|
1331
|
+
}), v = () => {
|
|
1330
1332
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1331
|
-
},
|
|
1333
|
+
}, p = () => {
|
|
1332
1334
|
var i;
|
|
1333
1335
|
if (!a.value.ecrIntegrations)
|
|
1334
|
-
return
|
|
1336
|
+
return v();
|
|
1335
1337
|
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1336
|
-
(
|
|
1338
|
+
(u) => u && u.gateway && u.gateway === "Ghl3"
|
|
1337
1339
|
);
|
|
1338
1340
|
if (t === -1)
|
|
1339
|
-
return
|
|
1341
|
+
return v();
|
|
1340
1342
|
l.value = t;
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1343
|
-
config:
|
|
1344
|
-
receiptName:
|
|
1345
|
-
cardTypes: ((i =
|
|
1343
|
+
const n = s.at(t);
|
|
1344
|
+
n.gateway === "Ghl3" && n.config && (e.value = {
|
|
1345
|
+
config: n.config,
|
|
1346
|
+
receiptName: n.receiptName ?? "",
|
|
1347
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1346
1348
|
});
|
|
1347
1349
|
};
|
|
1348
|
-
q(a,
|
|
1349
|
-
async function
|
|
1350
|
+
q(a, p), G(p);
|
|
1351
|
+
async function y(s) {
|
|
1350
1352
|
var t;
|
|
1351
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
1353
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1352
1354
|
}
|
|
1353
|
-
async function
|
|
1355
|
+
async function c() {
|
|
1354
1356
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1355
1357
|
}
|
|
1356
1358
|
return (s, t) => {
|
|
1357
|
-
const
|
|
1358
|
-
return
|
|
1359
|
-
ref:
|
|
1359
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
1360
|
+
return f(), F(w, {
|
|
1361
|
+
ref: b.value,
|
|
1360
1362
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1361
1363
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1362
|
-
var
|
|
1364
|
+
var o, x;
|
|
1363
1365
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1364
1366
|
gateway: "Ghl3",
|
|
1365
1367
|
config: e.value.config,
|
|
1366
1368
|
receiptName: e.value.receiptName,
|
|
1367
1369
|
dialogConfig: {
|
|
1368
|
-
...(
|
|
1370
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
1369
1371
|
cardTypes: e.value.cardTypes
|
|
1370
1372
|
}
|
|
1371
1373
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1375,46 +1377,46 @@ const Se = {
|
|
|
1375
1377
|
dialogConfig: {
|
|
1376
1378
|
cardTypes: e.value.cardTypes
|
|
1377
1379
|
}
|
|
1378
|
-
})),
|
|
1380
|
+
})), d.onUpdate(a.value);
|
|
1379
1381
|
})
|
|
1380
1382
|
}, {
|
|
1381
1383
|
default: O(() => [
|
|
1382
|
-
|
|
1384
|
+
m(n, {
|
|
1383
1385
|
modelValue: e.value.receiptName,
|
|
1384
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1386
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1385
1387
|
label: "Receipt Payment Name",
|
|
1386
1388
|
"label-info": "Default receipt display will be 'TERMINAL_GHL'"
|
|
1387
1389
|
}, null, 8, ["modelValue"]),
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
+
_("div", ca, [
|
|
1391
|
+
m(n, {
|
|
1390
1392
|
modelValue: r.value,
|
|
1391
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1393
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1392
1394
|
label: "Fallback Card Types",
|
|
1393
1395
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1394
1396
|
}, null, 8, ["modelValue"]),
|
|
1395
|
-
|
|
1397
|
+
m(i, {
|
|
1396
1398
|
class: "ml-4",
|
|
1397
1399
|
icon: "add",
|
|
1398
|
-
onClick:
|
|
1400
|
+
onClick: c
|
|
1399
1401
|
})
|
|
1400
1402
|
]),
|
|
1401
|
-
|
|
1402
|
-
(
|
|
1403
|
-
key:
|
|
1404
|
-
label:
|
|
1403
|
+
_("div", da, [
|
|
1404
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
1405
|
+
key: o,
|
|
1406
|
+
label: o,
|
|
1405
1407
|
removable: !0,
|
|
1406
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1408
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1407
1409
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1408
1410
|
]),
|
|
1409
|
-
|
|
1410
|
-
l.value > -1 ? (
|
|
1411
|
+
_("div", pa, [
|
|
1412
|
+
l.value > -1 ? (f(), F(i, {
|
|
1411
1413
|
key: 0,
|
|
1412
1414
|
class: "flex-1",
|
|
1413
1415
|
variant: "secondary",
|
|
1414
1416
|
label: "Delete",
|
|
1415
|
-
onclick: () =>
|
|
1416
|
-
}, null, 8, ["onclick"])) :
|
|
1417
|
-
|
|
1417
|
+
onclick: () => y(l.value)
|
|
1418
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1419
|
+
m(i, {
|
|
1418
1420
|
type: "submit",
|
|
1419
1421
|
class: "flex-1",
|
|
1420
1422
|
variant: "primary",
|
|
@@ -1426,7 +1428,7 @@ const Se = {
|
|
|
1426
1428
|
}, 512);
|
|
1427
1429
|
};
|
|
1428
1430
|
}
|
|
1429
|
-
}),
|
|
1431
|
+
}), va = { class: "flex items-end" }, ya = { class: "flex flex-wrap gap-8 items-center mt-4" }, fa = { class: "flex mt-6 space-x-6" }, ga = /* @__PURE__ */ S({
|
|
1430
1432
|
__name: "HlbbGateway",
|
|
1431
1433
|
props: {
|
|
1432
1434
|
terminal: {
|
|
@@ -1438,51 +1440,51 @@ const Se = {
|
|
|
1438
1440
|
required: !0
|
|
1439
1441
|
}
|
|
1440
1442
|
},
|
|
1441
|
-
setup(
|
|
1442
|
-
const
|
|
1443
|
+
setup(I) {
|
|
1444
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
1443
1445
|
receiptName: "",
|
|
1444
1446
|
config: {},
|
|
1445
1447
|
cardTypes: []
|
|
1446
|
-
}),
|
|
1448
|
+
}), v = () => {
|
|
1447
1449
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1448
|
-
},
|
|
1450
|
+
}, p = () => {
|
|
1449
1451
|
var i;
|
|
1450
1452
|
if (!a.value.ecrIntegrations)
|
|
1451
|
-
return
|
|
1453
|
+
return v();
|
|
1452
1454
|
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1453
|
-
(
|
|
1455
|
+
(u) => u && u.gateway && u.gateway === "Hlbb"
|
|
1454
1456
|
);
|
|
1455
1457
|
if (t === -1)
|
|
1456
|
-
return
|
|
1458
|
+
return v();
|
|
1457
1459
|
l.value = t;
|
|
1458
|
-
const
|
|
1459
|
-
|
|
1460
|
-
config:
|
|
1461
|
-
receiptName:
|
|
1462
|
-
cardTypes: ((i =
|
|
1460
|
+
const n = s.at(t);
|
|
1461
|
+
n.gateway === "Hlbb" && n.config && (e.value = {
|
|
1462
|
+
config: n.config,
|
|
1463
|
+
receiptName: n.receiptName ?? "",
|
|
1464
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1463
1465
|
});
|
|
1464
1466
|
};
|
|
1465
|
-
q(a,
|
|
1466
|
-
async function
|
|
1467
|
+
q(a, p), G(p);
|
|
1468
|
+
async function y(s) {
|
|
1467
1469
|
var t;
|
|
1468
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
1470
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1469
1471
|
}
|
|
1470
|
-
async function
|
|
1472
|
+
async function c() {
|
|
1471
1473
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1472
1474
|
}
|
|
1473
1475
|
return (s, t) => {
|
|
1474
|
-
const
|
|
1475
|
-
return
|
|
1476
|
-
ref:
|
|
1476
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
1477
|
+
return f(), F(w, {
|
|
1478
|
+
ref: b.value,
|
|
1477
1479
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1478
1480
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1479
|
-
var
|
|
1481
|
+
var o, x;
|
|
1480
1482
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1481
1483
|
gateway: "Hlbb",
|
|
1482
1484
|
config: e.value.config,
|
|
1483
1485
|
receiptName: e.value.receiptName,
|
|
1484
1486
|
dialogConfig: {
|
|
1485
|
-
...(
|
|
1487
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
1486
1488
|
cardTypes: e.value.cardTypes
|
|
1487
1489
|
}
|
|
1488
1490
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1492,46 +1494,46 @@ const Se = {
|
|
|
1492
1494
|
dialogConfig: {
|
|
1493
1495
|
cardTypes: e.value.cardTypes
|
|
1494
1496
|
}
|
|
1495
|
-
})),
|
|
1497
|
+
})), d.onUpdate(a.value);
|
|
1496
1498
|
})
|
|
1497
1499
|
}, {
|
|
1498
1500
|
default: O(() => [
|
|
1499
|
-
|
|
1501
|
+
m(n, {
|
|
1500
1502
|
modelValue: e.value.receiptName,
|
|
1501
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1503
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1502
1504
|
label: "Receipt Payment Name",
|
|
1503
1505
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
1504
1506
|
}, null, 8, ["modelValue"]),
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
+
_("div", va, [
|
|
1508
|
+
m(n, {
|
|
1507
1509
|
modelValue: r.value,
|
|
1508
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1510
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1509
1511
|
label: "Fallback Card Types",
|
|
1510
1512
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1511
1513
|
}, null, 8, ["modelValue"]),
|
|
1512
|
-
|
|
1514
|
+
m(i, {
|
|
1513
1515
|
class: "ml-4",
|
|
1514
1516
|
icon: "add",
|
|
1515
|
-
onClick:
|
|
1517
|
+
onClick: c
|
|
1516
1518
|
})
|
|
1517
1519
|
]),
|
|
1518
|
-
|
|
1519
|
-
(
|
|
1520
|
-
key:
|
|
1521
|
-
label:
|
|
1520
|
+
_("div", ya, [
|
|
1521
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
1522
|
+
key: o,
|
|
1523
|
+
label: o,
|
|
1522
1524
|
removable: !0,
|
|
1523
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1525
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1524
1526
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1525
1527
|
]),
|
|
1526
|
-
|
|
1527
|
-
l.value > -1 ? (
|
|
1528
|
+
_("div", fa, [
|
|
1529
|
+
l.value > -1 ? (f(), F(i, {
|
|
1528
1530
|
key: 0,
|
|
1529
1531
|
class: "flex-1",
|
|
1530
1532
|
variant: "secondary",
|
|
1531
1533
|
label: "Delete",
|
|
1532
|
-
onclick: () =>
|
|
1533
|
-
}, null, 8, ["onclick"])) :
|
|
1534
|
-
|
|
1534
|
+
onclick: () => y(l.value)
|
|
1535
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1536
|
+
m(i, {
|
|
1535
1537
|
type: "submit",
|
|
1536
1538
|
class: "flex-1",
|
|
1537
1539
|
variant: "primary",
|
|
@@ -1543,7 +1545,7 @@ const Se = {
|
|
|
1543
1545
|
}, 512);
|
|
1544
1546
|
};
|
|
1545
1547
|
}
|
|
1546
|
-
}),
|
|
1548
|
+
}), ba = { class: "flex items-end" }, _a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ta = { class: "flex mt-6 space-x-6" }, Ia = /* @__PURE__ */ S({
|
|
1547
1549
|
__name: "GlobalPaymentsGateway",
|
|
1548
1550
|
props: {
|
|
1549
1551
|
terminal: {
|
|
@@ -1555,51 +1557,51 @@ const Se = {
|
|
|
1555
1557
|
required: !0
|
|
1556
1558
|
}
|
|
1557
1559
|
},
|
|
1558
|
-
setup(
|
|
1559
|
-
const
|
|
1560
|
+
setup(I) {
|
|
1561
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
1560
1562
|
ip: "",
|
|
1561
1563
|
receiptName: "",
|
|
1562
1564
|
cardTypes: []
|
|
1563
|
-
}),
|
|
1565
|
+
}), v = () => {
|
|
1564
1566
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1565
|
-
},
|
|
1567
|
+
}, p = () => {
|
|
1566
1568
|
var i;
|
|
1567
1569
|
if (!a.value.ecrIntegrations)
|
|
1568
|
-
return
|
|
1570
|
+
return v();
|
|
1569
1571
|
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1570
|
-
(
|
|
1572
|
+
(u) => u && u.gateway && u.gateway === "GlobalPayments"
|
|
1571
1573
|
);
|
|
1572
1574
|
if (t === -1)
|
|
1573
|
-
return
|
|
1575
|
+
return v();
|
|
1574
1576
|
l.value = t;
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
ip:
|
|
1578
|
-
receiptName:
|
|
1579
|
-
cardTypes: ((i =
|
|
1577
|
+
const n = s.at(t);
|
|
1578
|
+
n.gateway === "GlobalPayments" && n.config && (e.value = {
|
|
1579
|
+
ip: n.config.ip ?? "",
|
|
1580
|
+
receiptName: n.receiptName ?? "",
|
|
1581
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1580
1582
|
});
|
|
1581
1583
|
};
|
|
1582
|
-
q(a,
|
|
1583
|
-
async function
|
|
1584
|
+
q(a, p), G(p);
|
|
1585
|
+
async function y(s) {
|
|
1584
1586
|
var t;
|
|
1585
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
1587
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1586
1588
|
}
|
|
1587
|
-
async function
|
|
1589
|
+
async function c() {
|
|
1588
1590
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1589
1591
|
}
|
|
1590
1592
|
return (s, t) => {
|
|
1591
|
-
const
|
|
1592
|
-
return
|
|
1593
|
-
ref:
|
|
1593
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
1594
|
+
return f(), F(w, {
|
|
1595
|
+
ref: b.value,
|
|
1594
1596
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1595
1597
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
1596
|
-
var
|
|
1598
|
+
var o, x;
|
|
1597
1599
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1598
1600
|
gateway: "GlobalPayments",
|
|
1599
1601
|
config: { ip: e.value.ip },
|
|
1600
1602
|
receiptName: e.value.receiptName,
|
|
1601
1603
|
dialogConfig: {
|
|
1602
|
-
...(
|
|
1604
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
1603
1605
|
cardTypes: e.value.cardTypes
|
|
1604
1606
|
}
|
|
1605
1607
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1609,51 +1611,51 @@ const Se = {
|
|
|
1609
1611
|
dialogConfig: {
|
|
1610
1612
|
cardTypes: e.value.cardTypes
|
|
1611
1613
|
}
|
|
1612
|
-
})),
|
|
1614
|
+
})), d.onUpdate(a.value);
|
|
1613
1615
|
})
|
|
1614
1616
|
}, {
|
|
1615
1617
|
default: O(() => [
|
|
1616
|
-
|
|
1618
|
+
m(n, {
|
|
1617
1619
|
modelValue: e.value.ip,
|
|
1618
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1620
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
1619
1621
|
label: "IP Address"
|
|
1620
1622
|
}, null, 8, ["modelValue"]),
|
|
1621
|
-
|
|
1623
|
+
m(n, {
|
|
1622
1624
|
modelValue: e.value.receiptName,
|
|
1623
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1625
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
1624
1626
|
label: "Receipt Payment Name",
|
|
1625
1627
|
"label-info": "Default receipt display will be 'TERMINAL_GP'"
|
|
1626
1628
|
}, null, 8, ["modelValue"]),
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
+
_("div", ba, [
|
|
1630
|
+
m(n, {
|
|
1629
1631
|
modelValue: r.value,
|
|
1630
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
1632
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
1631
1633
|
label: "Fallback Card Types",
|
|
1632
1634
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1633
1635
|
}, null, 8, ["modelValue"]),
|
|
1634
|
-
|
|
1636
|
+
m(i, {
|
|
1635
1637
|
class: "ml-4",
|
|
1636
1638
|
icon: "add",
|
|
1637
|
-
onClick:
|
|
1639
|
+
onClick: c
|
|
1638
1640
|
})
|
|
1639
1641
|
]),
|
|
1640
|
-
|
|
1641
|
-
(
|
|
1642
|
-
key:
|
|
1643
|
-
label:
|
|
1642
|
+
_("div", _a, [
|
|
1643
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
1644
|
+
key: o,
|
|
1645
|
+
label: o,
|
|
1644
1646
|
removable: !0,
|
|
1645
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1647
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1646
1648
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1647
1649
|
]),
|
|
1648
|
-
|
|
1649
|
-
l.value > -1 ? (
|
|
1650
|
+
_("div", Ta, [
|
|
1651
|
+
l.value > -1 ? (f(), F(i, {
|
|
1650
1652
|
key: 0,
|
|
1651
1653
|
class: "flex-1",
|
|
1652
1654
|
variant: "secondary",
|
|
1653
1655
|
label: "Delete",
|
|
1654
|
-
onclick: () =>
|
|
1655
|
-
}, null, 8, ["onclick"])) :
|
|
1656
|
-
|
|
1656
|
+
onclick: () => y(l.value)
|
|
1657
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1658
|
+
m(i, {
|
|
1657
1659
|
type: "submit",
|
|
1658
1660
|
class: "flex-1",
|
|
1659
1661
|
variant: "primary",
|
|
@@ -1665,7 +1667,7 @@ const Se = {
|
|
|
1665
1667
|
}, 512);
|
|
1666
1668
|
};
|
|
1667
1669
|
}
|
|
1668
|
-
}),
|
|
1670
|
+
}), Fa = { class: "flex items-end" }, wa = { class: "flex flex-wrap gap-8 items-center mt-4" }, xa = { class: "flex mt-6 space-x-6" }, Ca = /* @__PURE__ */ S({
|
|
1669
1671
|
__name: "OmaGateway",
|
|
1670
1672
|
props: {
|
|
1671
1673
|
terminal: {
|
|
@@ -1677,49 +1679,49 @@ const Se = {
|
|
|
1677
1679
|
required: !0
|
|
1678
1680
|
}
|
|
1679
1681
|
},
|
|
1680
|
-
setup(
|
|
1681
|
-
const
|
|
1682
|
+
setup(I) {
|
|
1683
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
1682
1684
|
receiptName: "",
|
|
1683
1685
|
cardTypes: []
|
|
1684
|
-
}),
|
|
1686
|
+
}), v = () => {
|
|
1685
1687
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1686
|
-
},
|
|
1688
|
+
}, p = () => {
|
|
1687
1689
|
var i;
|
|
1688
1690
|
if (!a.value.ecrIntegrations)
|
|
1689
|
-
return
|
|
1691
|
+
return v();
|
|
1690
1692
|
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1691
|
-
(
|
|
1693
|
+
(u) => u && u.gateway && u.gateway === "Oma"
|
|
1692
1694
|
);
|
|
1693
1695
|
if (t === -1)
|
|
1694
|
-
return
|
|
1696
|
+
return v();
|
|
1695
1697
|
l.value = t;
|
|
1696
|
-
const
|
|
1697
|
-
|
|
1698
|
-
receiptName:
|
|
1699
|
-
cardTypes: ((i =
|
|
1698
|
+
const n = s.at(t);
|
|
1699
|
+
n.gateway === "Oma" && n.config && (e.value = {
|
|
1700
|
+
receiptName: n.receiptName ?? "",
|
|
1701
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1700
1702
|
});
|
|
1701
1703
|
};
|
|
1702
|
-
q(a,
|
|
1703
|
-
async function
|
|
1704
|
+
q(a, p), G(p);
|
|
1705
|
+
async function y(s) {
|
|
1704
1706
|
var t;
|
|
1705
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
1707
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1706
1708
|
}
|
|
1707
|
-
async function
|
|
1709
|
+
async function c() {
|
|
1708
1710
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1709
1711
|
}
|
|
1710
1712
|
return (s, t) => {
|
|
1711
|
-
const
|
|
1712
|
-
return
|
|
1713
|
-
ref:
|
|
1713
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
1714
|
+
return f(), F(w, {
|
|
1715
|
+
ref: b.value,
|
|
1714
1716
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1715
1717
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1716
|
-
var
|
|
1718
|
+
var o, x;
|
|
1717
1719
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1718
1720
|
gateway: "Oma",
|
|
1719
1721
|
config: {},
|
|
1720
1722
|
receiptName: e.value.receiptName,
|
|
1721
1723
|
dialogConfig: {
|
|
1722
|
-
...(
|
|
1724
|
+
...(x = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : x.dialogConfig,
|
|
1723
1725
|
cardTypes: e.value.cardTypes
|
|
1724
1726
|
}
|
|
1725
1727
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1729,46 +1731,46 @@ const Se = {
|
|
|
1729
1731
|
dialogConfig: {
|
|
1730
1732
|
cardTypes: e.value.cardTypes
|
|
1731
1733
|
}
|
|
1732
|
-
})),
|
|
1734
|
+
})), d.onUpdate(a.value);
|
|
1733
1735
|
})
|
|
1734
1736
|
}, {
|
|
1735
1737
|
default: O(() => [
|
|
1736
|
-
|
|
1738
|
+
m(n, {
|
|
1737
1739
|
modelValue: e.value.receiptName,
|
|
1738
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1740
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1739
1741
|
label: "Receipt Payment Name",
|
|
1740
1742
|
"label-info": "Default receipt display will be 'TERMINAL_OMA'"
|
|
1741
1743
|
}, null, 8, ["modelValue"]),
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
+
_("div", Fa, [
|
|
1745
|
+
m(n, {
|
|
1744
1746
|
modelValue: r.value,
|
|
1745
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1747
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1746
1748
|
label: "Fallback Card Types",
|
|
1747
1749
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1748
1750
|
}, null, 8, ["modelValue"]),
|
|
1749
|
-
|
|
1751
|
+
m(i, {
|
|
1750
1752
|
class: "ml-4",
|
|
1751
1753
|
icon: "add",
|
|
1752
|
-
onClick:
|
|
1754
|
+
onClick: c
|
|
1753
1755
|
})
|
|
1754
1756
|
]),
|
|
1755
|
-
|
|
1756
|
-
(
|
|
1757
|
-
key:
|
|
1758
|
-
label:
|
|
1757
|
+
_("div", wa, [
|
|
1758
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
1759
|
+
key: o,
|
|
1760
|
+
label: o,
|
|
1759
1761
|
removable: !0,
|
|
1760
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1762
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1761
1763
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1762
1764
|
]),
|
|
1763
|
-
|
|
1764
|
-
l.value > -1 ? (
|
|
1765
|
+
_("div", xa, [
|
|
1766
|
+
l.value > -1 ? (f(), F(i, {
|
|
1765
1767
|
key: 0,
|
|
1766
1768
|
class: "flex-1",
|
|
1767
1769
|
variant: "secondary",
|
|
1768
1770
|
label: "Delete",
|
|
1769
|
-
onclick: () =>
|
|
1770
|
-
}, null, 8, ["onclick"])) :
|
|
1771
|
-
|
|
1771
|
+
onclick: () => y(l.value)
|
|
1772
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1773
|
+
m(i, {
|
|
1772
1774
|
type: "submit",
|
|
1773
1775
|
class: "flex-1",
|
|
1774
1776
|
variant: "primary",
|
|
@@ -1780,7 +1782,7 @@ const Se = {
|
|
|
1780
1782
|
}, 512);
|
|
1781
1783
|
};
|
|
1782
1784
|
}
|
|
1783
|
-
}),
|
|
1785
|
+
}), Na = { class: "flex items-end" }, ka = { class: "flex flex-wrap gap-8 items-center mt-4" }, Va = { class: "flex mt-6 space-x-6" }, Ua = /* @__PURE__ */ S({
|
|
1784
1786
|
__name: "RevenueGateway",
|
|
1785
1787
|
props: {
|
|
1786
1788
|
terminal: {
|
|
@@ -1792,111 +1794,111 @@ const Se = {
|
|
|
1792
1794
|
required: !0
|
|
1793
1795
|
}
|
|
1794
1796
|
},
|
|
1795
|
-
setup(
|
|
1796
|
-
const
|
|
1797
|
+
setup(I) {
|
|
1798
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T(), e = T({
|
|
1797
1799
|
receiptName: "",
|
|
1798
1800
|
ip: "",
|
|
1799
1801
|
cardTypes: []
|
|
1800
|
-
}),
|
|
1802
|
+
}), v = () => {
|
|
1801
1803
|
e.value.receiptName = "", e.value.ip = "", e.value.cardTypes = [], l.value = -1;
|
|
1802
|
-
},
|
|
1804
|
+
}, p = () => {
|
|
1803
1805
|
var i;
|
|
1804
1806
|
if (!a.value.ecrIntegrations)
|
|
1805
|
-
return
|
|
1807
|
+
return v();
|
|
1806
1808
|
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1807
|
-
(
|
|
1809
|
+
(u) => u && u.gateway && u.gateway === "Revenue"
|
|
1808
1810
|
);
|
|
1809
1811
|
if (t === -1)
|
|
1810
|
-
return
|
|
1812
|
+
return v();
|
|
1811
1813
|
l.value = t;
|
|
1812
|
-
const
|
|
1813
|
-
|
|
1814
|
-
receiptName:
|
|
1815
|
-
ip:
|
|
1816
|
-
cardTypes: ((i =
|
|
1814
|
+
const n = s.at(t);
|
|
1815
|
+
n.gateway === "Revenue" && n.config && (e.value = {
|
|
1816
|
+
receiptName: n.receiptName ?? "",
|
|
1817
|
+
ip: n.config.ip ?? "",
|
|
1818
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1817
1819
|
});
|
|
1818
1820
|
};
|
|
1819
|
-
q(a,
|
|
1820
|
-
async function
|
|
1821
|
+
q(a, p), G(p);
|
|
1822
|
+
async function y(s) {
|
|
1821
1823
|
var t;
|
|
1822
|
-
(t = a.value.ecrIntegrations) == null || t.splice(s, 1),
|
|
1824
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1823
1825
|
}
|
|
1824
|
-
async function
|
|
1826
|
+
async function c() {
|
|
1825
1827
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1826
1828
|
}
|
|
1827
1829
|
return (s, t) => {
|
|
1828
|
-
const
|
|
1829
|
-
return
|
|
1830
|
-
ref:
|
|
1830
|
+
const n = g("FmTextField"), i = g("FmButton"), u = g("FmChip"), w = g("FmForm");
|
|
1831
|
+
return f(), F(w, {
|
|
1832
|
+
ref: b.value,
|
|
1831
1833
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1832
1834
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
1833
|
-
var
|
|
1834
|
-
const
|
|
1835
|
+
var x, L;
|
|
1836
|
+
const o = {
|
|
1835
1837
|
type: "tcp",
|
|
1836
1838
|
ip: e.value.ip
|
|
1837
1839
|
};
|
|
1838
1840
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1839
1841
|
gateway: "Revenue",
|
|
1840
|
-
config:
|
|
1842
|
+
config: o,
|
|
1841
1843
|
receiptName: e.value.receiptName,
|
|
1842
1844
|
dialogConfig: {
|
|
1843
|
-
...(L = (
|
|
1845
|
+
...(L = (x = a.value.ecrIntegrations) == null ? void 0 : x[l.value]) == null ? void 0 : L.dialogConfig,
|
|
1844
1846
|
cardTypes: e.value.cardTypes
|
|
1845
1847
|
}
|
|
1846
1848
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
1847
1849
|
gateway: "Revenue",
|
|
1848
|
-
config:
|
|
1850
|
+
config: o,
|
|
1849
1851
|
receiptName: e.value.receiptName,
|
|
1850
1852
|
dialogConfig: {
|
|
1851
1853
|
cardTypes: e.value.cardTypes
|
|
1852
1854
|
}
|
|
1853
|
-
})),
|
|
1855
|
+
})), d.onUpdate(a.value);
|
|
1854
1856
|
})
|
|
1855
1857
|
}, {
|
|
1856
1858
|
default: O(() => [
|
|
1857
|
-
|
|
1859
|
+
m(n, {
|
|
1858
1860
|
modelValue: e.value.ip,
|
|
1859
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1861
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
1860
1862
|
label: "Terminal IP Address",
|
|
1861
1863
|
"label-info": "Terminal WiFi IP with optional port, e.g. 192.168.1.50:8080 (defaults to port 8080)",
|
|
1862
1864
|
rules: M(ue)(M(ce).string().min(1))
|
|
1863
1865
|
}, null, 8, ["modelValue", "rules"]),
|
|
1864
|
-
|
|
1866
|
+
m(n, {
|
|
1865
1867
|
modelValue: e.value.receiptName,
|
|
1866
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1868
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
1867
1869
|
label: "Receipt Payment Name",
|
|
1868
1870
|
"label-info": "Default receipt display will be 'TERMINAL_REVENUE'"
|
|
1869
1871
|
}, null, 8, ["modelValue"]),
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
+
_("div", Na, [
|
|
1873
|
+
m(n, {
|
|
1872
1874
|
modelValue: r.value,
|
|
1873
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
1875
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
1874
1876
|
label: "Fallback Card Types",
|
|
1875
1877
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1876
1878
|
}, null, 8, ["modelValue"]),
|
|
1877
|
-
|
|
1879
|
+
m(i, {
|
|
1878
1880
|
class: "ml-4",
|
|
1879
1881
|
icon: "add",
|
|
1880
|
-
onClick:
|
|
1882
|
+
onClick: c
|
|
1881
1883
|
})
|
|
1882
1884
|
]),
|
|
1883
|
-
|
|
1884
|
-
(
|
|
1885
|
-
key:
|
|
1886
|
-
label:
|
|
1885
|
+
_("div", ka, [
|
|
1886
|
+
(f(!0), C(P, null, B(e.value.cardTypes, (o) => (f(), F(u, {
|
|
1887
|
+
key: o,
|
|
1888
|
+
label: o,
|
|
1887
1889
|
removable: !0,
|
|
1888
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1890
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1889
1891
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1890
1892
|
]),
|
|
1891
|
-
|
|
1892
|
-
l.value > -1 ? (
|
|
1893
|
+
_("div", Va, [
|
|
1894
|
+
l.value > -1 ? (f(), F(i, {
|
|
1893
1895
|
key: 0,
|
|
1894
1896
|
class: "flex-1",
|
|
1895
1897
|
variant: "secondary",
|
|
1896
1898
|
label: "Delete",
|
|
1897
|
-
onclick: () =>
|
|
1898
|
-
}, null, 8, ["onclick"])) :
|
|
1899
|
-
|
|
1899
|
+
onclick: () => y(l.value)
|
|
1900
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1901
|
+
m(i, {
|
|
1900
1902
|
type: "submit",
|
|
1901
1903
|
class: "flex-1",
|
|
1902
1904
|
variant: "primary",
|
|
@@ -1908,7 +1910,7 @@ const Se = {
|
|
|
1908
1910
|
}, 512);
|
|
1909
1911
|
};
|
|
1910
1912
|
}
|
|
1911
|
-
}),
|
|
1913
|
+
}), Sa = { class: "flex items-center" }, ha = { class: "w-[260px] self-start" }, Ra = { class: "flex-1" }, Ma = /* @__PURE__ */ S({
|
|
1912
1914
|
__name: "EcrGateway",
|
|
1913
1915
|
props: {
|
|
1914
1916
|
terminal: {
|
|
@@ -1920,115 +1922,115 @@ const Se = {
|
|
|
1920
1922
|
required: !0
|
|
1921
1923
|
}
|
|
1922
1924
|
},
|
|
1923
|
-
setup(
|
|
1924
|
-
var
|
|
1925
|
-
const
|
|
1925
|
+
setup(I) {
|
|
1926
|
+
var v;
|
|
1927
|
+
const d = I, a = [
|
|
1926
1928
|
{
|
|
1927
1929
|
label: "FeedMe Terminal",
|
|
1928
1930
|
value: "terminal",
|
|
1929
|
-
render:
|
|
1931
|
+
render: $e
|
|
1930
1932
|
},
|
|
1931
1933
|
{
|
|
1932
1934
|
label: "GHL Terminal",
|
|
1933
1935
|
value: "ghl",
|
|
1934
|
-
render:
|
|
1935
|
-
region: [
|
|
1936
|
+
render: Be,
|
|
1937
|
+
region: [h.F_COUNTRY.enum.MY]
|
|
1936
1938
|
},
|
|
1937
1939
|
{
|
|
1938
1940
|
label: "GHL2 Terminal",
|
|
1939
1941
|
value: "ghl2",
|
|
1940
|
-
render:
|
|
1941
|
-
region: [
|
|
1942
|
+
render: ua,
|
|
1943
|
+
region: [h.F_COUNTRY.enum.MY]
|
|
1942
1944
|
},
|
|
1943
1945
|
{
|
|
1944
1946
|
label: "ITB Maybank Terminal",
|
|
1945
1947
|
value: "mb-itb",
|
|
1946
|
-
render:
|
|
1947
|
-
region: [
|
|
1948
|
+
render: Ke,
|
|
1949
|
+
region: [h.F_COUNTRY.enum.MY]
|
|
1948
1950
|
},
|
|
1949
1951
|
{
|
|
1950
1952
|
label: "PMA Maybank Terminal",
|
|
1951
1953
|
value: "mb-pma",
|
|
1952
|
-
render:
|
|
1953
|
-
region: [
|
|
1954
|
+
render: Qe,
|
|
1955
|
+
region: [h.F_COUNTRY.enum.MY]
|
|
1954
1956
|
},
|
|
1955
1957
|
{
|
|
1956
1958
|
label: "Paysys Maybank Terminal",
|
|
1957
1959
|
value: "mb-paysys",
|
|
1958
|
-
render:
|
|
1959
|
-
region: [
|
|
1960
|
+
render: Ze,
|
|
1961
|
+
region: [h.F_COUNTRY.enum.MY]
|
|
1960
1962
|
},
|
|
1961
1963
|
{
|
|
1962
1964
|
label: "Nets Terminal",
|
|
1963
1965
|
value: "nets",
|
|
1964
|
-
render:
|
|
1965
|
-
region: [
|
|
1966
|
+
render: la,
|
|
1967
|
+
region: [h.F_COUNTRY.enum.SG]
|
|
1966
1968
|
},
|
|
1967
1969
|
{
|
|
1968
1970
|
label: "KBank Terminal",
|
|
1969
1971
|
value: "kbank",
|
|
1970
|
-
render:
|
|
1971
|
-
region: [
|
|
1972
|
+
render: ia,
|
|
1973
|
+
region: [h.F_COUNTRY.enum.TH]
|
|
1972
1974
|
},
|
|
1973
1975
|
{
|
|
1974
1976
|
label: "GHL Terminal",
|
|
1975
1977
|
value: "ghl3",
|
|
1976
|
-
render:
|
|
1977
|
-
region: [
|
|
1978
|
+
render: ma,
|
|
1979
|
+
region: [h.F_COUNTRY.enum.TH]
|
|
1978
1980
|
},
|
|
1979
1981
|
{
|
|
1980
1982
|
label: "Paysys HLBB Terminal",
|
|
1981
1983
|
value: "hlbb",
|
|
1982
|
-
render:
|
|
1983
|
-
region: [
|
|
1984
|
+
render: ga,
|
|
1985
|
+
region: [h.F_COUNTRY.enum.MY]
|
|
1984
1986
|
},
|
|
1985
1987
|
{
|
|
1986
1988
|
label: "GPAP Terminal",
|
|
1987
1989
|
value: "globalpayments",
|
|
1988
|
-
render:
|
|
1989
|
-
region: [
|
|
1990
|
+
render: Ia,
|
|
1991
|
+
region: [h.F_COUNTRY.enum.SG]
|
|
1990
1992
|
},
|
|
1991
1993
|
{
|
|
1992
1994
|
label: "OMA Terminal",
|
|
1993
1995
|
value: "oma",
|
|
1994
|
-
render:
|
|
1995
|
-
region: [
|
|
1996
|
+
render: Ca,
|
|
1997
|
+
region: [h.F_COUNTRY.enum.PK]
|
|
1996
1998
|
},
|
|
1997
1999
|
{
|
|
1998
2000
|
label: "Revenue PBB Terminal",
|
|
1999
2001
|
value: "revenue",
|
|
2000
|
-
render:
|
|
2001
|
-
region: [
|
|
2002
|
+
render: Ua,
|
|
2003
|
+
region: [h.F_COUNTRY.enum.MY]
|
|
2002
2004
|
}
|
|
2003
|
-
],
|
|
2004
|
-
(
|
|
2005
|
+
], b = U(() => a.find((p) => p.value === e.value)), l = oe().currentCountry, r = U(() => a.filter(
|
|
2006
|
+
(p) => !p.region || p.region.includes(l.value ?? h.F_COUNTRY.enum.MY)
|
|
2005
2007
|
)), { gatewayTab: e } = ne({
|
|
2006
|
-
gatewayTab: (
|
|
2008
|
+
gatewayTab: (v = r.value[0]) == null ? void 0 : v.value
|
|
2007
2009
|
});
|
|
2008
|
-
return (
|
|
2010
|
+
return (p, y) => {
|
|
2009
2011
|
var s;
|
|
2010
|
-
const
|
|
2011
|
-
return
|
|
2012
|
-
|
|
2013
|
-
|
|
2012
|
+
const c = g("FmTabs");
|
|
2013
|
+
return f(), C("div", Sa, [
|
|
2014
|
+
_("div", ha, [
|
|
2015
|
+
m(c, {
|
|
2014
2016
|
"model-value": M(e),
|
|
2015
|
-
"onUpdate:modelValue":
|
|
2017
|
+
"onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
|
|
2016
2018
|
class: "mb-6",
|
|
2017
2019
|
vertical: !0,
|
|
2018
2020
|
items: r.value,
|
|
2019
2021
|
"show-more-at": Number.POSITIVE_INFINITY
|
|
2020
2022
|
}, null, 8, ["model-value", "items", "show-more-at"])
|
|
2021
2023
|
]),
|
|
2022
|
-
|
|
2023
|
-
M(e) ? (
|
|
2024
|
-
terminal:
|
|
2025
|
-
onUpdate:
|
|
2026
|
-
})), null, 16)) :
|
|
2024
|
+
_("div", Ra, [
|
|
2025
|
+
M(e) ? (f(), F(ee((s = b.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
|
|
2026
|
+
terminal: d.terminal,
|
|
2027
|
+
onUpdate: d.onUpdate
|
|
2028
|
+
})), null, 16)) : k("", !0)
|
|
2027
2029
|
])
|
|
2028
2030
|
]);
|
|
2029
2031
|
};
|
|
2030
2032
|
}
|
|
2031
|
-
}),
|
|
2033
|
+
}), Oa = { class: "flex mt-6 space-x-6" }, Pa = /* @__PURE__ */ S({
|
|
2032
2034
|
__name: "PromptPayGateway",
|
|
2033
2035
|
props: {
|
|
2034
2036
|
terminal: {
|
|
@@ -2040,61 +2042,61 @@ const Se = {
|
|
|
2040
2042
|
required: !0
|
|
2041
2043
|
}
|
|
2042
2044
|
},
|
|
2043
|
-
setup(
|
|
2044
|
-
const
|
|
2045
|
+
setup(I) {
|
|
2046
|
+
const d = I, a = A(() => d.terminal), b = T(), l = T(-1), r = T({
|
|
2045
2047
|
account: "",
|
|
2046
2048
|
receiptName: ""
|
|
2047
2049
|
}), e = () => {
|
|
2048
2050
|
r.value.account = "", r.value.receiptName = "", l.value = -1;
|
|
2049
|
-
},
|
|
2051
|
+
}, v = () => {
|
|
2050
2052
|
if (!a.value.qrIntegrations)
|
|
2051
2053
|
return e();
|
|
2052
|
-
const
|
|
2053
|
-
if (
|
|
2054
|
+
const y = a.value.qrIntegrations, c = y.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
|
|
2055
|
+
if (c === -1)
|
|
2054
2056
|
return e();
|
|
2055
|
-
l.value =
|
|
2056
|
-
const s =
|
|
2057
|
+
l.value = c;
|
|
2058
|
+
const s = y.at(c);
|
|
2057
2059
|
s.gateway === "PROMPTPAY" && s.config && (r.value = {
|
|
2058
2060
|
account: s.config.account ?? "",
|
|
2059
2061
|
receiptName: s.receiptName ?? ""
|
|
2060
2062
|
});
|
|
2061
2063
|
};
|
|
2062
|
-
q(a,
|
|
2063
|
-
async function
|
|
2064
|
-
var
|
|
2065
|
-
(
|
|
2064
|
+
q(a, v), G(v);
|
|
2065
|
+
async function p(y) {
|
|
2066
|
+
var c;
|
|
2067
|
+
(c = a.value.qrIntegrations) == null || c.splice(y, 1), d.onUpdate(a.value);
|
|
2066
2068
|
}
|
|
2067
|
-
return (
|
|
2068
|
-
const s = g("FmTextField"), t = g("FmButton"),
|
|
2069
|
-
return
|
|
2070
|
-
ref:
|
|
2069
|
+
return (y, c) => {
|
|
2070
|
+
const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
|
|
2071
|
+
return f(), F(n, {
|
|
2072
|
+
ref: b.value,
|
|
2071
2073
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2072
|
-
onValidationSuccess:
|
|
2073
|
-
l.value > -1 ? a.value.qrIntegrations[l.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 })),
|
|
2074
|
+
onValidationSuccess: c[2] || (c[2] = () => {
|
|
2075
|
+
l.value > -1 ? a.value.qrIntegrations[l.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 })), d.onUpdate(a.value);
|
|
2074
2076
|
})
|
|
2075
2077
|
}, {
|
|
2076
2078
|
default: O(() => [
|
|
2077
|
-
|
|
2079
|
+
m(s, {
|
|
2078
2080
|
modelValue: r.value.account,
|
|
2079
|
-
"onUpdate:modelValue":
|
|
2081
|
+
"onUpdate:modelValue": c[0] || (c[0] = (i) => r.value.account = i),
|
|
2080
2082
|
label: "Thai Phone Number / Thai Naitonal ID",
|
|
2081
2083
|
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
2082
2084
|
}, null, 8, ["modelValue"]),
|
|
2083
|
-
|
|
2085
|
+
m(s, {
|
|
2084
2086
|
modelValue: r.value.receiptName,
|
|
2085
|
-
"onUpdate:modelValue":
|
|
2087
|
+
"onUpdate:modelValue": c[1] || (c[1] = (i) => r.value.receiptName = i),
|
|
2086
2088
|
label: "Receipt Payment Name",
|
|
2087
2089
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
2088
2090
|
}, null, 8, ["modelValue"]),
|
|
2089
|
-
|
|
2090
|
-
l.value > -1 ? (
|
|
2091
|
+
_("div", Oa, [
|
|
2092
|
+
l.value > -1 ? (f(), F(t, {
|
|
2091
2093
|
key: 0,
|
|
2092
2094
|
class: "flex-1",
|
|
2093
2095
|
variant: "secondary",
|
|
2094
2096
|
label: "Delete",
|
|
2095
|
-
onclick: () =>
|
|
2096
|
-
}, null, 8, ["onclick"])) :
|
|
2097
|
-
|
|
2097
|
+
onclick: () => p(l.value)
|
|
2098
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
2099
|
+
m(t, {
|
|
2098
2100
|
type: "submit",
|
|
2099
2101
|
class: "flex-1",
|
|
2100
2102
|
variant: "primary",
|
|
@@ -2106,7 +2108,7 @@ const Se = {
|
|
|
2106
2108
|
}, 512);
|
|
2107
2109
|
};
|
|
2108
2110
|
}
|
|
2109
|
-
}),
|
|
2111
|
+
}), qa = { class: "flex items-center" }, Ga = { class: "w-[260px] self-start" }, Aa = { class: "flex-1" }, $a = /* @__PURE__ */ S({
|
|
2110
2112
|
__name: "QrGateway",
|
|
2111
2113
|
props: {
|
|
2112
2114
|
terminal: {
|
|
@@ -2118,41 +2120,168 @@ const Se = {
|
|
|
2118
2120
|
required: !0
|
|
2119
2121
|
}
|
|
2120
2122
|
},
|
|
2121
|
-
setup(
|
|
2122
|
-
var
|
|
2123
|
-
const
|
|
2123
|
+
setup(I) {
|
|
2124
|
+
var v;
|
|
2125
|
+
const d = I, a = [
|
|
2124
2126
|
{
|
|
2125
2127
|
label: "PromptPay",
|
|
2126
2128
|
value: "promptpay",
|
|
2127
|
-
render:
|
|
2128
|
-
region: [
|
|
2129
|
+
render: Pa,
|
|
2130
|
+
region: [h.F_COUNTRY.enum.TH]
|
|
2129
2131
|
}
|
|
2130
|
-
],
|
|
2131
|
-
gatewayTab: (
|
|
2132
|
+
], b = U(() => a.find((p) => p.value === e.value)), l = oe().currentCountry, r = U(() => a.filter((p) => !p.region || p.region.includes(l.value ?? h.F_COUNTRY.enum.MY))), { gatewayTab: e } = ne({
|
|
2133
|
+
gatewayTab: (v = r.value[0]) == null ? void 0 : v.value
|
|
2132
2134
|
});
|
|
2133
|
-
return (
|
|
2135
|
+
return (p, y) => {
|
|
2134
2136
|
var s;
|
|
2135
|
-
const
|
|
2136
|
-
return
|
|
2137
|
-
|
|
2138
|
-
|
|
2137
|
+
const c = g("FmTabs");
|
|
2138
|
+
return f(), C("div", qa, [
|
|
2139
|
+
_("div", Ga, [
|
|
2140
|
+
m(c, {
|
|
2139
2141
|
"model-value": M(e),
|
|
2140
|
-
"onUpdate:modelValue":
|
|
2142
|
+
"onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
|
|
2141
2143
|
class: "mb-6",
|
|
2142
2144
|
vertical: !0,
|
|
2143
2145
|
items: r.value
|
|
2144
2146
|
}, null, 8, ["model-value", "items"])
|
|
2145
2147
|
]),
|
|
2146
|
-
|
|
2147
|
-
M(e) ? (
|
|
2148
|
-
terminal:
|
|
2149
|
-
onUpdate:
|
|
2150
|
-
})), null, 16)) :
|
|
2148
|
+
_("div", Aa, [
|
|
2149
|
+
M(e) ? (f(), F(ee((s = b.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
|
|
2150
|
+
terminal: d.terminal,
|
|
2151
|
+
onUpdate: d.onUpdate
|
|
2152
|
+
})), null, 16)) : k("", !0)
|
|
2151
2153
|
])
|
|
2152
2154
|
]);
|
|
2153
2155
|
};
|
|
2154
2156
|
}
|
|
2155
|
-
}),
|
|
2157
|
+
}), Da = { class: "flex flex-col gap-6" }, Ba = { class: "flex items-center justify-between" }, La = { class: "flex items-center gap-3" }, Ea = ["src"], Ya = { class: "text-xs font-semibold uppercase bg-gray-100 rounded px-2 py-1" }, Ka = { class: "font-medium" }, ja = { class: "grid grid-cols-2 gap-4" }, Ha = {
|
|
2158
|
+
key: 0,
|
|
2159
|
+
class: "text-gray-500"
|
|
2160
|
+
}, za = { class: "mt-2 flex gap-3" }, Qa = /* @__PURE__ */ S({
|
|
2161
|
+
__name: "PaymentCheckout",
|
|
2162
|
+
props: {
|
|
2163
|
+
terminal: {
|
|
2164
|
+
type: Object,
|
|
2165
|
+
required: !0
|
|
2166
|
+
},
|
|
2167
|
+
onUpdate: {
|
|
2168
|
+
type: Function,
|
|
2169
|
+
required: !0
|
|
2170
|
+
}
|
|
2171
|
+
},
|
|
2172
|
+
setup(I) {
|
|
2173
|
+
const d = I, a = () => (d.terminal.paymentCheckouts ?? []).map((y) => ({ ...y })), b = T(a());
|
|
2174
|
+
q(
|
|
2175
|
+
() => d.terminal.paymentCheckouts,
|
|
2176
|
+
() => {
|
|
2177
|
+
b.value = a();
|
|
2178
|
+
}
|
|
2179
|
+
);
|
|
2180
|
+
const l = {
|
|
2181
|
+
card: "Card",
|
|
2182
|
+
ecr: "ECR",
|
|
2183
|
+
ecr_qr: "ECR QR",
|
|
2184
|
+
qr: "QR",
|
|
2185
|
+
scanpay: "Scan Pay"
|
|
2186
|
+
}, r = (y) => y.action ? `${y.gateway} (${y.action})` : y.gateway;
|
|
2187
|
+
async function e() {
|
|
2188
|
+
await d.onUpdate({
|
|
2189
|
+
...d.terminal,
|
|
2190
|
+
paymentCheckouts: b.value
|
|
2191
|
+
});
|
|
2192
|
+
}
|
|
2193
|
+
const v = be();
|
|
2194
|
+
function p() {
|
|
2195
|
+
we(
|
|
2196
|
+
v,
|
|
2197
|
+
"Reset Payment Checkout",
|
|
2198
|
+
"This will clear all customizations (display name, icon, tagline, sort order, enabled state) for every payment method on this terminal and restore the defaults. This action cannot be undone.",
|
|
2199
|
+
async () => {
|
|
2200
|
+
await d.onUpdate({
|
|
2201
|
+
...d.terminal,
|
|
2202
|
+
paymentCheckouts: []
|
|
2203
|
+
});
|
|
2204
|
+
}
|
|
2205
|
+
);
|
|
2206
|
+
}
|
|
2207
|
+
return (y, c) => {
|
|
2208
|
+
const s = g("FmTooltip"), t = g("FmSwitch"), n = g("FmTextField"), i = g("FmButton");
|
|
2209
|
+
return f(), C("div", Da, [
|
|
2210
|
+
(f(!0), C(P, null, B(b.value, (u) => (f(), C("div", {
|
|
2211
|
+
key: u.id,
|
|
2212
|
+
class: "border rounded-lg p-6 flex flex-col gap-4"
|
|
2213
|
+
}, [
|
|
2214
|
+
_("div", Ba, [
|
|
2215
|
+
_("div", La, [
|
|
2216
|
+
m(s, {
|
|
2217
|
+
variant: "plain",
|
|
2218
|
+
placement: "top",
|
|
2219
|
+
content: u.gateway,
|
|
2220
|
+
"hide-arrow": !0
|
|
2221
|
+
}, {
|
|
2222
|
+
default: O(() => [
|
|
2223
|
+
_("img", {
|
|
2224
|
+
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
2225
|
+
src: M(Fe)(u.gateway.toUpperCase())
|
|
2226
|
+
}, null, 8, Ea)
|
|
2227
|
+
]),
|
|
2228
|
+
_: 2
|
|
2229
|
+
}, 1032, ["content"]),
|
|
2230
|
+
_("span", Ya, j(l[u.type] ?? u.type), 1),
|
|
2231
|
+
_("span", Ka, j(r(u)), 1)
|
|
2232
|
+
]),
|
|
2233
|
+
m(t, {
|
|
2234
|
+
modelValue: u.enabled,
|
|
2235
|
+
"onUpdate:modelValue": (w) => u.enabled = w,
|
|
2236
|
+
label: "Enabled"
|
|
2237
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2238
|
+
]),
|
|
2239
|
+
_("div", ja, [
|
|
2240
|
+
m(n, {
|
|
2241
|
+
modelValue: u.displayName,
|
|
2242
|
+
"onUpdate:modelValue": (w) => u.displayName = w,
|
|
2243
|
+
label: "Display Name"
|
|
2244
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2245
|
+
m(n, {
|
|
2246
|
+
modelValue: u.icon,
|
|
2247
|
+
"onUpdate:modelValue": (w) => u.icon = w,
|
|
2248
|
+
label: "Icon URL",
|
|
2249
|
+
"label-mark": "optional"
|
|
2250
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2251
|
+
m(n, {
|
|
2252
|
+
modelValue: u.tagline,
|
|
2253
|
+
"onUpdate:modelValue": (w) => u.tagline = w,
|
|
2254
|
+
label: "Tagline",
|
|
2255
|
+
"label-mark": "optional"
|
|
2256
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
2257
|
+
m(n, {
|
|
2258
|
+
modelValue: u.sortOrder,
|
|
2259
|
+
"onUpdate:modelValue": (w) => u.sortOrder = w,
|
|
2260
|
+
modelModifiers: { number: !0 },
|
|
2261
|
+
label: "Sort Order",
|
|
2262
|
+
type: "number"
|
|
2263
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
2264
|
+
])
|
|
2265
|
+
]))), 128)),
|
|
2266
|
+
b.value.length === 0 ? (f(), C("div", Ha, " No payment methods configured for this terminal. ")) : k("", !0),
|
|
2267
|
+
_("div", za, [
|
|
2268
|
+
m(i, {
|
|
2269
|
+
variant: "secondary",
|
|
2270
|
+
label: "Reset",
|
|
2271
|
+
icon: "restart_alt",
|
|
2272
|
+
onclick: p
|
|
2273
|
+
}),
|
|
2274
|
+
m(i, {
|
|
2275
|
+
variant: "primary",
|
|
2276
|
+
label: "Save",
|
|
2277
|
+
icon: "save",
|
|
2278
|
+
onclick: e
|
|
2279
|
+
})
|
|
2280
|
+
])
|
|
2281
|
+
]);
|
|
2282
|
+
};
|
|
2283
|
+
}
|
|
2284
|
+
}), ct = /* @__PURE__ */ S({
|
|
2156
2285
|
__name: "TerminalSetting",
|
|
2157
2286
|
props: {
|
|
2158
2287
|
terminalId: {
|
|
@@ -2160,24 +2289,25 @@ const Se = {
|
|
|
2160
2289
|
required: !0
|
|
2161
2290
|
}
|
|
2162
2291
|
},
|
|
2163
|
-
setup(
|
|
2164
|
-
const
|
|
2292
|
+
setup(I) {
|
|
2293
|
+
const d = I, { tab: a } = ne({
|
|
2165
2294
|
tab: "information"
|
|
2166
|
-
}), { isLoading:
|
|
2167
|
-
async function
|
|
2295
|
+
}), { isLoading: b, startAsyncCall: l } = le(!0), r = fe(), e = se(), v = T();
|
|
2296
|
+
async function p(n) {
|
|
2168
2297
|
l(async () => {
|
|
2169
2298
|
try {
|
|
2170
2299
|
await K.updateById(
|
|
2171
|
-
|
|
2300
|
+
d.terminalId,
|
|
2172
2301
|
{
|
|
2173
|
-
name:
|
|
2174
|
-
status:
|
|
2175
|
-
ecrs:
|
|
2176
|
-
gateways:
|
|
2177
|
-
ecrIntegrations:
|
|
2178
|
-
qrIntegrations:
|
|
2302
|
+
name: n.name,
|
|
2303
|
+
status: n.status,
|
|
2304
|
+
ecrs: n.ecrs ?? [],
|
|
2305
|
+
gateways: n.gateways ?? [],
|
|
2306
|
+
ecrIntegrations: n.ecrIntegrations ?? [],
|
|
2307
|
+
qrIntegrations: n.qrIntegrations ?? [],
|
|
2308
|
+
paymentCheckouts: n.paymentCheckouts ?? []
|
|
2179
2309
|
}
|
|
2180
|
-
),
|
|
2310
|
+
), v.value = await K.readById(d.terminalId), e.open({
|
|
2181
2311
|
type: "success",
|
|
2182
2312
|
message: "Terminal updated successfully"
|
|
2183
2313
|
});
|
|
@@ -2190,74 +2320,81 @@ const Se = {
|
|
|
2190
2320
|
}
|
|
2191
2321
|
});
|
|
2192
2322
|
}
|
|
2193
|
-
const
|
|
2323
|
+
const y = [
|
|
2194
2324
|
{
|
|
2195
2325
|
label: "Information",
|
|
2196
2326
|
value: "information",
|
|
2197
2327
|
icon: "overview",
|
|
2198
|
-
render:
|
|
2328
|
+
render: xe
|
|
2199
2329
|
},
|
|
2200
2330
|
{
|
|
2201
2331
|
label: "Setting Request",
|
|
2202
2332
|
value: "settings",
|
|
2203
2333
|
icon: "settings",
|
|
2204
|
-
render:
|
|
2334
|
+
render: Ve,
|
|
2205
2335
|
onlyFor: ["TERMINAL"]
|
|
2206
2336
|
},
|
|
2207
2337
|
{
|
|
2208
2338
|
label: "SoftPos Gateway",
|
|
2209
2339
|
value: "softpos",
|
|
2210
2340
|
icon: "payment",
|
|
2211
|
-
render:
|
|
2341
|
+
render: qe
|
|
2212
2342
|
},
|
|
2213
2343
|
{
|
|
2214
2344
|
label: "ECR Gateway",
|
|
2215
2345
|
value: "ecr",
|
|
2216
2346
|
icon: "point_of_sale",
|
|
2217
|
-
render:
|
|
2347
|
+
render: Ma,
|
|
2218
2348
|
onlyFor: ["POS", "KIOSK"]
|
|
2219
2349
|
},
|
|
2220
2350
|
{
|
|
2221
2351
|
label: "QR Gateway",
|
|
2222
2352
|
value: "qr",
|
|
2223
2353
|
icon: "qr_code",
|
|
2224
|
-
render:
|
|
2354
|
+
render: $a,
|
|
2225
2355
|
onlyFor: ["POS", "KIOSK"]
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
label: "Payment Checkout",
|
|
2359
|
+
value: "payment-checkout",
|
|
2360
|
+
icon: "tune",
|
|
2361
|
+
render: Qa,
|
|
2362
|
+
onlyFor: ["KIOSK", "POS", "TERMINAL"]
|
|
2226
2363
|
}
|
|
2227
2364
|
];
|
|
2228
2365
|
oe().currentCountry;
|
|
2229
|
-
const
|
|
2230
|
-
var
|
|
2231
|
-
return (
|
|
2366
|
+
const c = U(() => {
|
|
2367
|
+
var n;
|
|
2368
|
+
return (n = y.find((i) => i.value === a.value)) == null ? void 0 : n.render;
|
|
2232
2369
|
});
|
|
2233
2370
|
async function s() {
|
|
2234
2371
|
l(async () => {
|
|
2235
|
-
|
|
2372
|
+
v.value = await K.readById(d.terminalId);
|
|
2236
2373
|
});
|
|
2237
2374
|
}
|
|
2238
|
-
const t =
|
|
2375
|
+
const t = U(() => y.filter((n) => {
|
|
2239
2376
|
var i;
|
|
2240
|
-
return !
|
|
2377
|
+
return !n.onlyFor || n.onlyFor.includes(((i = v.value) == null ? void 0 : i.deviceType) ?? "");
|
|
2241
2378
|
}));
|
|
2242
|
-
return G(s), (
|
|
2243
|
-
var
|
|
2244
|
-
const
|
|
2245
|
-
return
|
|
2246
|
-
title: `${(
|
|
2247
|
-
loading: M(
|
|
2379
|
+
return G(s), (n, i) => {
|
|
2380
|
+
var w, o;
|
|
2381
|
+
const u = g("FmTabs");
|
|
2382
|
+
return f(), F(ge, {
|
|
2383
|
+
title: `${(w = v.value) == null ? void 0 : w.deviceType} (${(o = v.value) == null ? void 0 : o._id})`,
|
|
2384
|
+
loading: M(b),
|
|
2248
2385
|
onBack: M(r).back
|
|
2249
2386
|
}, {
|
|
2250
2387
|
default: O(() => [
|
|
2251
|
-
|
|
2388
|
+
m(u, {
|
|
2252
2389
|
"model-value": M(a),
|
|
2253
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
2390
|
+
"onUpdate:modelValue": i[0] || (i[0] = (x) => Z(a) ? a.value = x : null),
|
|
2254
2391
|
class: "mb-6",
|
|
2255
2392
|
items: t.value
|
|
2256
2393
|
}, null, 8, ["model-value", "items"]),
|
|
2257
|
-
M(a) ? (
|
|
2258
|
-
terminal:
|
|
2259
|
-
onUpdate:
|
|
2260
|
-
})), null, 16)) :
|
|
2394
|
+
M(a) ? (f(), F(ee(c.value), ae(te({ key: 0 }, {
|
|
2395
|
+
terminal: v.value,
|
|
2396
|
+
onUpdate: p
|
|
2397
|
+
})), null, 16)) : k("", !0)
|
|
2261
2398
|
]),
|
|
2262
2399
|
_: 1
|
|
2263
2400
|
}, 8, ["title", "loading", "onBack"]);
|
|
@@ -2265,5 +2402,5 @@ const Se = {
|
|
|
2265
2402
|
}
|
|
2266
2403
|
});
|
|
2267
2404
|
export {
|
|
2268
|
-
|
|
2405
|
+
ct as default
|
|
2269
2406
|
};
|