@feedmepos/mf-payment 1.5.77 → 1.5.79-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-D_PoXVbz.js → Actions.vue_vue_type_script_setup_true_lang-B1k6lqk9.js} +1 -1
- package/dist/{Chargeback-CzwL8PJv.js → Chargeback-DDW6Z35O.js} +7 -7
- package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js → DateRangePicker.vue_vue_type_script_setup_true_lang-BNVnvrVY.js} +1 -1
- package/dist/{no-data-BRmo6XOO.js → DocumentViewer.vue_vue_type_script_setup_true_lang-0t7PrKly.js} +91 -2
- package/dist/{OnboardForm-DZeWRzRD.js → OnboardForm-CMiPKEAD.js} +554 -482
- package/dist/{OnboardForm-C6LuVVyr.js → OnboardForm-UvHyCi9w.js} +6 -6
- package/dist/{OnboardSubmission-C2BYK2p1.js → OnboardSubmission-BWv_zw6C.js} +27 -27
- package/dist/OnboardSubmission-faKhsdmy.js +446 -0
- package/dist/{PayoutAccount-BMQZ5bOZ.js → PayoutAccount-DHFs5gyw.js} +5 -5
- package/dist/{PayoutAccount-VbRd7cmv.js → PayoutAccount-mNPnD2h1.js} +394 -415
- package/dist/PayoutAccountSetting-DFOPZ5Lh.js +1502 -0
- package/dist/{Restaurant-4cO60aVP.js → Restaurant-jkwyYKCC.js} +4 -4
- package/dist/{RestaurantSetting-Bvk0dnCI.js → RestaurantSetting-D6uSwnZI.js} +325 -243
- package/dist/{Settlement-Cme1wMB-.js → Settlement-COK5hned.js} +5 -5
- package/dist/{Settlement-CklF8pz7.js → Settlement-CPLwwE2V.js} +4 -4
- package/dist/{SettlementTransactions-DD285bSJ.js → SettlementTransactions-BaD7Xzc_.js} +4 -4
- package/dist/{SettlementTransactions-3F4EOoyz.js → SettlementTransactions-Coc4SIYf.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-CUnCf_fx.js → Status.vue_vue_type_script_setup_true_lang-COmSmTD-.js} +1 -1
- package/dist/{Terminal-CK6ULW6U.js → Terminal-Bi-pgpLy.js} +6 -6
- package/dist/{TerminalSetting-CEQG3OV6.js → TerminalSetting-Bn7dMb8m.js} +887 -712
- package/dist/{TextInputDialog.vue_vue_type_script_setup_true_lang-BvGYVca0.js → TextInputDialog.vue_vue_type_script_setup_true_lang-D8W8_SO2.js} +1 -1
- package/dist/{Transaction-DjzWqLtN.js → Transaction-C0tvyLUP.js} +99 -102
- package/dist/Transaction-Dc3ppbQO.js +507 -0
- package/dist/TransactionOld-0b8NDOAr.js +313 -0
- package/dist/api/onboard-submission/index.d.ts +3 -1
- package/dist/api/terminal/index.d.ts +1 -0
- package/dist/app-DLOPYVQT.js +9185 -0
- package/dist/app.d.ts +96 -1
- package/dist/app.js +5 -4
- package/dist/{assets-DIbq1BVX.js → assets-CHl9dRwW.js} +81 -79
- package/dist/composable/async-poller/index.d.ts +22 -0
- package/dist/{grafana-B0iQmK6j.js → grafana-W-wciFnf.js} +1 -1
- package/dist/index-7WseRv3u.js +63 -0
- package/dist/{index-BHCs_NnD.js → index-BUvHMo4V.js} +1 -1
- package/dist/{index-CxnWUe_K.js → index-BXl4SMxF.js} +3 -3
- package/dist/{index-C_Y5Sfc9.js → index-Bz9betjL.js} +1 -1
- package/dist/{index-B0L21J1j.js → index-C_13hvar.js} +1 -1
- package/dist/{index-D0j1LZAB.js → index-DGyTvHj8.js} +9430 -9267
- package/dist/{index-BkQ7t3F6.js → index-Dic547vC.js} +1 -1
- package/dist/index-MdV54cWO.js +58 -0
- package/dist/{index-C80a7-Ks.js → index-c2WIf6FM.js} +1 -1
- package/dist/{index-CnN_MV2-.js → index-oz80FaA5.js} +24 -9
- package/dist/{index.vue_vue_type_script_setup_true_lang-BksGFeSf.js → index.vue_vue_type_script_setup_true_lang-Cj6xgRBA.js} +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/model/payout-account.d.ts +2 -2
- package/dist/package.json +4 -3
- package/dist/{payout-account-B7OikYn5.js → payout-account-CygV7FSk.js} +37 -37
- package/dist/stores/payoutAccount.d.ts +44 -34
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/tyro-BovmsorS.js +5 -0
- package/dist/utils/permission.d.ts +1 -0
- package/dist/{validator-CTlVogBQ.js → validator-DzjyJnvv.js} +0 -1
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +16 -16
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +16 -16
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +81 -0
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +44 -34
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +64 -54
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +64 -54
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +44 -34
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +44 -43
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +64 -54
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +39 -0
- 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/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +48 -0
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -4
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +24 -24
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/useTyroSoftposGateway.d.ts +12 -0
- package/dist/views/onboard-submission/tyro-submission-polling.d.ts +27 -0
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +88 -68
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +84 -84
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +42 -42
- package/dist/views/settlement/SettlementTable.vue.d.ts +24 -24
- package/dist/views/transaction/TransactionTable.vue.d.ts +2 -2
- package/package.json +4 -3
- package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-KebV8Zws.js +0 -94
- package/dist/Forbidden-1aaq-Ilm.js +0 -38
- package/dist/OnboardSubmission-DvWwQFy6.js +0 -222
- package/dist/PayoutAccountSetting-DzzABgzs.js +0 -1765
- package/dist/Transaction-D-Z3zRd7.js +0 -517
- package/dist/TransactionOld-BXjA15Dd.js +0 -314
- package/dist/app-CEy5Ojtg.js +0 -7661
- package/dist/index-XTdSN6CV.js +0 -60
- package/dist/softspace-D9cEyOQT.js +0 -4
- package/dist/views/admin/payout-account/tabs/SettlementEditDialog.vue.d.ts +0 -56
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { t as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { u as
|
|
7
|
-
import { useSnackbar as
|
|
8
|
-
import { u as
|
|
9
|
-
import { useCoreStore as
|
|
10
|
-
import {
|
|
11
|
-
|
|
1
|
+
import { defineComponent as R, openBlock as f, createElementBlock as M, Fragment as G, createElementVNode as I, createTextVNode as j, toDisplayString as W, ref as b, resolveComponent as g, createVNode as v, createCommentVNode as V, unref as h, computed as C, isRef as Z, createBlock as F, resolveDynamicComponent as ee, normalizeProps as ae, mergeProps as te, watch as P, onBeforeUnmount as pe, toRef as A, onMounted as q, withCtx as O, renderList as Y } from "vue";
|
|
2
|
+
import { u as le, p as me, e as U } from "./index-DGyTvHj8.js";
|
|
3
|
+
import { useRouter as ve } from "vue-router";
|
|
4
|
+
import { t as E } from "./index-7WseRv3u.js";
|
|
5
|
+
import { _ as ye } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
+
import { u as ne } from "./index-Dic547vC.js";
|
|
7
|
+
import { useSnackbar as se } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as X } from "./error-K1CakhA9.js";
|
|
9
|
+
import { useI18n as fe, useCoreStore as oe } from "@feedmepos/mf-common";
|
|
10
|
+
import { o as ge } from "./index-oz80FaA5.js";
|
|
11
|
+
import { c as be } from "./index-MdV54cWO.js";
|
|
12
|
+
import { z as Te, a as _e } from "./validator-DzjyJnvv.js";
|
|
13
|
+
const Ie = /* @__PURE__ */ R({
|
|
12
14
|
__name: "Information",
|
|
13
15
|
props: {
|
|
14
16
|
terminal: {
|
|
@@ -16,23 +18,23 @@ const le = /* @__PURE__ */ C({
|
|
|
16
18
|
required: !0
|
|
17
19
|
}
|
|
18
20
|
},
|
|
19
|
-
setup(
|
|
20
|
-
return (
|
|
21
|
-
a[0] || (a[0] =
|
|
22
|
-
|
|
23
|
-
a[1] || (a[1] =
|
|
24
|
-
a[2] || (a[2] =
|
|
25
|
-
|
|
26
|
-
a[3] || (a[3] =
|
|
27
|
-
a[4] || (a[4] =
|
|
28
|
-
|
|
29
|
-
a[5] || (a[5] =
|
|
30
|
-
a[6] || (a[6] =
|
|
31
|
-
|
|
32
|
-
a[7] || (a[7] =
|
|
21
|
+
setup(_) {
|
|
22
|
+
return (d, a) => (f(), M(G, null, [
|
|
23
|
+
a[0] || (a[0] = I("b", null, "Name", -1)),
|
|
24
|
+
j(": " + W(_.terminal.name), 1),
|
|
25
|
+
a[1] || (a[1] = I("br", null, null, -1)),
|
|
26
|
+
a[2] || (a[2] = I("b", null, "Status", -1)),
|
|
27
|
+
j(": " + W(_.terminal.status), 1),
|
|
28
|
+
a[3] || (a[3] = I("br", null, null, -1)),
|
|
29
|
+
a[4] || (a[4] = I("b", null, "Device ID", -1)),
|
|
30
|
+
j(": " + W(_.terminal.deviceId ?? "-"), 1),
|
|
31
|
+
a[5] || (a[5] = I("br", null, null, -1)),
|
|
32
|
+
a[6] || (a[6] = I("b", null, "Device Type", -1)),
|
|
33
|
+
j(": " + W(_.terminal.deviceType ?? "-"), 1),
|
|
34
|
+
a[7] || (a[7] = I("br", null, null, -1))
|
|
33
35
|
], 64));
|
|
34
36
|
}
|
|
35
|
-
}),
|
|
37
|
+
}), Fe = { key: 0 }, we = { class: "mt-6 space-x-6" }, xe = /* @__PURE__ */ R({
|
|
36
38
|
__name: "KioskMode",
|
|
37
39
|
props: {
|
|
38
40
|
terminal: {
|
|
@@ -40,58 +42,58 @@ const le = /* @__PURE__ */ C({
|
|
|
40
42
|
required: !0
|
|
41
43
|
}
|
|
42
44
|
},
|
|
43
|
-
setup(
|
|
44
|
-
const { isLoading:
|
|
45
|
+
setup(_) {
|
|
46
|
+
const { isLoading: d, startAsyncCall: a } = le(!1), T = se(), l = b({
|
|
45
47
|
enable: !1,
|
|
46
48
|
password: []
|
|
47
|
-
}), r =
|
|
49
|
+
}), r = _;
|
|
48
50
|
function e() {
|
|
49
|
-
return
|
|
51
|
+
return l.value.enable && l.value.password.filter((m) => !!m).length !== 6 ? T.open({
|
|
50
52
|
type: "error",
|
|
51
53
|
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
|
52
54
|
}) : a(async () => {
|
|
53
|
-
const m = { enable:
|
|
55
|
+
const m = { enable: l.value.enable };
|
|
54
56
|
m.enable && Object.assign(m, {
|
|
55
|
-
password:
|
|
57
|
+
password: l.value.password.join("")
|
|
56
58
|
});
|
|
57
|
-
const
|
|
58
|
-
if (
|
|
59
|
+
const c = await E.kioskModeRequest(r.terminal._id, m);
|
|
60
|
+
if (c === "OK")
|
|
59
61
|
return T.open({ type: "info", message: "Kiosk mode applied successfully." });
|
|
60
|
-
let
|
|
61
|
-
return
|
|
62
|
+
let y = c;
|
|
63
|
+
return c === "client_not_connected" && (y = "Terminal not connected to the websocket server."), c.startsWith("terminal: ") && (y = c.replaceAll("terminal: ", "")), T.open({
|
|
62
64
|
type: "error",
|
|
63
|
-
message:
|
|
65
|
+
message: y
|
|
64
66
|
});
|
|
65
67
|
});
|
|
66
68
|
}
|
|
67
|
-
return (m,
|
|
68
|
-
const
|
|
69
|
-
return
|
|
70
|
-
v(
|
|
71
|
-
modelValue:
|
|
72
|
-
"onUpdate:modelValue":
|
|
69
|
+
return (m, c) => {
|
|
70
|
+
const y = g("FmSwitch"), u = g("FmPinField"), s = g("FmButton");
|
|
71
|
+
return f(), M(G, null, [
|
|
72
|
+
v(y, {
|
|
73
|
+
modelValue: l.value.enable,
|
|
74
|
+
"onUpdate:modelValue": c[0] || (c[0] = (t) => l.value.enable = t),
|
|
73
75
|
label: "Enable Kiosk Mode?"
|
|
74
76
|
}, null, 8, ["modelValue"]),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
v(s, {
|
|
78
|
-
modelValue: n.value.password,
|
|
79
|
-
"onUpdate:modelValue": d[1] || (d[1] = (l) => n.value.password = l)
|
|
80
|
-
}, null, 8, ["modelValue"])
|
|
81
|
-
])) : N("", !0),
|
|
82
|
-
_("div", ne, [
|
|
77
|
+
l.value.enable ? (f(), M("div", Fe, [
|
|
78
|
+
c[2] || (c[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
|
83
79
|
v(u, {
|
|
80
|
+
modelValue: l.value.password,
|
|
81
|
+
"onUpdate:modelValue": c[1] || (c[1] = (t) => l.value.password = t)
|
|
82
|
+
}, null, 8, ["modelValue"])
|
|
83
|
+
])) : V("", !0),
|
|
84
|
+
I("div", we, [
|
|
85
|
+
v(s, {
|
|
84
86
|
variant: "primary",
|
|
85
87
|
label: "Send",
|
|
86
88
|
icon: "send",
|
|
87
|
-
loading: h(
|
|
89
|
+
loading: h(d),
|
|
88
90
|
onclick: e
|
|
89
91
|
}, null, 8, ["loading"])
|
|
90
92
|
])
|
|
91
93
|
], 64);
|
|
92
94
|
};
|
|
93
95
|
}
|
|
94
|
-
}),
|
|
96
|
+
}), Ne = /* @__PURE__ */ R({
|
|
95
97
|
__name: "SettingRequest",
|
|
96
98
|
props: {
|
|
97
99
|
terminal: {
|
|
@@ -99,38 +101,143 @@ const le = /* @__PURE__ */ C({
|
|
|
99
101
|
required: !0
|
|
100
102
|
}
|
|
101
103
|
},
|
|
102
|
-
setup(
|
|
103
|
-
const { settingTab:
|
|
104
|
+
setup(_) {
|
|
105
|
+
const { settingTab: d } = ne({
|
|
104
106
|
settingTab: "kiosk_mode"
|
|
105
107
|
}), a = [
|
|
106
108
|
{
|
|
107
109
|
label: "Kiosk Mode",
|
|
108
110
|
value: "kiosk_mode",
|
|
109
|
-
render:
|
|
111
|
+
render: xe
|
|
110
112
|
}
|
|
111
|
-
], T =
|
|
113
|
+
], T = _, l = C(() => a.find((r) => r.value === d.value));
|
|
112
114
|
return (r, e) => {
|
|
113
|
-
var
|
|
114
|
-
const m =
|
|
115
|
-
return
|
|
116
|
-
e[1] || (e[1] =
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
var c;
|
|
116
|
+
const m = g("FmTabs");
|
|
117
|
+
return f(), M(G, null, [
|
|
118
|
+
e[1] || (e[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
119
|
+
I("b", null, "Note: "),
|
|
120
|
+
j(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
|
119
121
|
], -1)),
|
|
120
122
|
v(m, {
|
|
121
|
-
"model-value": h(
|
|
122
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
123
|
+
"model-value": h(d),
|
|
124
|
+
"onUpdate:modelValue": e[0] || (e[0] = (y) => Z(d) ? d.value = y : null),
|
|
123
125
|
class: "mb-6",
|
|
124
126
|
items: a
|
|
125
127
|
}, null, 8, ["model-value"]),
|
|
126
|
-
h(
|
|
128
|
+
h(d) ? (f(), F(ee((c = l.value) == null ? void 0 : c.render), ae(te({ key: 0 }, { terminal: T.terminal })), null, 16)) : V("", !0)
|
|
127
129
|
], 64);
|
|
128
130
|
};
|
|
129
131
|
}
|
|
130
|
-
}),
|
|
132
|
+
}), ke = 2e3, Ce = 12e4, Ve = "Timed out waiting for the Tyro reader to sync. Please try again.";
|
|
133
|
+
function Se(_) {
|
|
134
|
+
const { isLoading: d, startLoading: a, stopLoading: T } = le(!1), { t: l } = fe(), r = se(), e = b(null), m = C(() => {
|
|
135
|
+
var D, B;
|
|
136
|
+
const k = (D = _.value.gateways) == null ? void 0 : D.find(
|
|
137
|
+
($) => $.gateway === "Tyro"
|
|
138
|
+
);
|
|
139
|
+
return ((B = k == null ? void 0 : k.config) == null ? void 0 : B.uniqueId) || "";
|
|
140
|
+
}), c = C(() => !!m.value), y = C(() => {
|
|
141
|
+
var k;
|
|
142
|
+
return ((k = e.value) == null ? void 0 : k.status) === "ready";
|
|
143
|
+
}), u = C(() => {
|
|
144
|
+
var k, D;
|
|
145
|
+
return y.value && !!((D = (k = e.value) == null ? void 0 : k.fields) != null && D.tyroLocationId) && !!_.value.deviceId && !c.value;
|
|
146
|
+
}), s = C(() => !y.value && !c.value), t = C(
|
|
147
|
+
() => l("payment.onboard-submission.tyro.syncDisabledHint")
|
|
148
|
+
), n = C(() => c.value ? "Synced" : "Sync");
|
|
149
|
+
async function i() {
|
|
150
|
+
if (!_.value.referenceId) {
|
|
151
|
+
e.value = null;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
const k = await ge.getByRestaurant(
|
|
156
|
+
_.value.referenceId
|
|
157
|
+
);
|
|
158
|
+
e.value = k.find(
|
|
159
|
+
(D) => D.type === me.FdoOnboardType.enum.tyro
|
|
160
|
+
) ?? null;
|
|
161
|
+
} catch (k) {
|
|
162
|
+
e.value = null, r.open({
|
|
163
|
+
type: "error",
|
|
164
|
+
message: X(k)
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const p = be({
|
|
169
|
+
intervalMs: ke,
|
|
170
|
+
timeoutMs: Ce,
|
|
171
|
+
onTick: async ({ isCurrentRun: k, stop: D }) => {
|
|
172
|
+
var H, z;
|
|
173
|
+
const B = await E.readById(_.value._id);
|
|
174
|
+
if (!k())
|
|
175
|
+
return;
|
|
176
|
+
const $ = (H = B.gateways) == null ? void 0 : H.find((Q) => Q.gateway === "Tyro");
|
|
177
|
+
($ == null ? void 0 : $.gateway) === "Tyro" && ((z = $ == null ? void 0 : $.config) != null && z.uniqueId) && (D({ invalidate: !1 }), T(), Object.assign(_.value, B), r.open({
|
|
178
|
+
type: "success",
|
|
179
|
+
message: "Tyro reader created successfully"
|
|
180
|
+
}));
|
|
181
|
+
},
|
|
182
|
+
onTimeout: () => {
|
|
183
|
+
T(), r.open({
|
|
184
|
+
type: "error",
|
|
185
|
+
message: Ve
|
|
186
|
+
});
|
|
187
|
+
},
|
|
188
|
+
onError: (k) => {
|
|
189
|
+
T(), r.open({
|
|
190
|
+
type: "error",
|
|
191
|
+
message: X(k)
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
}), x = p.isPolling;
|
|
195
|
+
function o() {
|
|
196
|
+
p.stop(), T();
|
|
197
|
+
}
|
|
198
|
+
function w() {
|
|
199
|
+
o(), a(), p.start();
|
|
200
|
+
}
|
|
201
|
+
async function K() {
|
|
202
|
+
if (!u.value) {
|
|
203
|
+
r.open({
|
|
204
|
+
type: "error",
|
|
205
|
+
message: "Tyro reader sync is not available"
|
|
206
|
+
});
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
try {
|
|
210
|
+
a(), await E.syncTyroReader(_.value._id), w();
|
|
211
|
+
} catch (k) {
|
|
212
|
+
o(), r.open({
|
|
213
|
+
type: "error",
|
|
214
|
+
message: X(k)
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return P(
|
|
219
|
+
() => _.value.referenceId,
|
|
220
|
+
async () => {
|
|
221
|
+
await i();
|
|
222
|
+
},
|
|
223
|
+
{ immediate: !0 }
|
|
224
|
+
), pe(() => {
|
|
225
|
+
o();
|
|
226
|
+
}), {
|
|
227
|
+
isLoading: d,
|
|
228
|
+
isPollingTyroReader: x,
|
|
229
|
+
uniqueId: m,
|
|
230
|
+
canSyncTyroReader: u,
|
|
231
|
+
showTyroSyncPopover: s,
|
|
232
|
+
tyroSyncPopoverMessage: t,
|
|
233
|
+
tyroSyncButtonLabel: n,
|
|
234
|
+
syncTyroReader: K
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
const Ue = {
|
|
131
238
|
key: 0,
|
|
132
239
|
class: "text-sm text-gray-500"
|
|
133
|
-
},
|
|
240
|
+
}, Re = { class: "flex mt-6 space-x-6" }, Me = { class: "flex-1" }, he = /* @__PURE__ */ R({
|
|
134
241
|
__name: "SoftposGateway",
|
|
135
242
|
props: {
|
|
136
243
|
terminal: {
|
|
@@ -142,12 +249,12 @@ const le = /* @__PURE__ */ C({
|
|
|
142
249
|
required: !0
|
|
143
250
|
}
|
|
144
251
|
},
|
|
145
|
-
setup(
|
|
146
|
-
const
|
|
252
|
+
setup(_) {
|
|
253
|
+
const d = _, a = oe().currentCountry, T = [
|
|
147
254
|
{
|
|
148
255
|
label: "Fiuu Malaysia",
|
|
149
256
|
value: "cc.feedme.payment.rms",
|
|
150
|
-
region:
|
|
257
|
+
region: U.F_COUNTRY.enum.MY,
|
|
151
258
|
gateway: "Fiuu",
|
|
152
259
|
isLegacy: !0,
|
|
153
260
|
isOutdated: !0
|
|
@@ -155,14 +262,14 @@ const le = /* @__PURE__ */ C({
|
|
|
155
262
|
{
|
|
156
263
|
label: "Fiuu Malaysia V2",
|
|
157
264
|
value: "cc.feedme.payment.fiuu_my",
|
|
158
|
-
region:
|
|
265
|
+
region: U.F_COUNTRY.enum.MY,
|
|
159
266
|
gateway: "Fiuu",
|
|
160
267
|
isLegacy: !0
|
|
161
268
|
},
|
|
162
269
|
{
|
|
163
270
|
label: "Fiuu Singapore",
|
|
164
271
|
value: "cc.feedme.payment.fiuu_sg",
|
|
165
|
-
region:
|
|
272
|
+
region: U.F_COUNTRY.enum.SG,
|
|
166
273
|
gateway: "Fiuu",
|
|
167
274
|
isLegacy: !0
|
|
168
275
|
},
|
|
@@ -170,131 +277,199 @@ const le = /* @__PURE__ */ C({
|
|
|
170
277
|
label: "Softspace Malaysia",
|
|
171
278
|
value: "cc.feedme.payment.softspace_my",
|
|
172
279
|
gateway: "Softspace",
|
|
173
|
-
region:
|
|
280
|
+
region: U.F_COUNTRY.enum.MY
|
|
174
281
|
},
|
|
175
282
|
{
|
|
176
283
|
label: "Digio Thailand",
|
|
177
284
|
value: "cc.feedme.payment.digio_th",
|
|
178
285
|
gateway: "Digio",
|
|
179
|
-
region:
|
|
286
|
+
region: U.F_COUNTRY.enum.TH
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
label: "Tyro Australia",
|
|
290
|
+
value: "cc.feedme.payment.tyro_au",
|
|
291
|
+
gateway: "Tyro",
|
|
292
|
+
region: U.F_COUNTRY.enum.AU
|
|
180
293
|
}
|
|
181
|
-
],
|
|
294
|
+
], l = A(() => d.terminal), r = b(), e = b({
|
|
182
295
|
packageId: "",
|
|
183
296
|
uniqueId: "",
|
|
184
297
|
developerId: "",
|
|
185
298
|
isUat: !1
|
|
186
299
|
}), m = () => {
|
|
187
|
-
e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "";
|
|
188
|
-
},
|
|
189
|
-
|
|
300
|
+
e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "", e.value.isUat = !1;
|
|
301
|
+
}, c = C(() => T.filter((N) => N.region === a.value)), y = C(() => c.value.find(
|
|
302
|
+
(N) => N.value === e.value.packageId
|
|
303
|
+
)), u = C(
|
|
304
|
+
() => {
|
|
305
|
+
var N;
|
|
306
|
+
return ((N = y.value) == null ? void 0 : N.gateway) === "Tyro";
|
|
307
|
+
}
|
|
308
|
+
), {
|
|
309
|
+
isLoading: s,
|
|
310
|
+
isPollingTyroReader: t,
|
|
311
|
+
uniqueId: n,
|
|
312
|
+
canSyncTyroReader: i,
|
|
313
|
+
showTyroSyncPopover: p,
|
|
314
|
+
tyroSyncPopoverMessage: x,
|
|
315
|
+
tyroSyncButtonLabel: o,
|
|
316
|
+
syncTyroReader: w
|
|
317
|
+
} = Se(l), K = C(() => u.value ? "button" : "submit"), k = C(() => u.value ? o.value : "Save"), D = C(() => u.value ? s.value : !1), B = C(() => u.value ? !i.value || t.value : !1), $ = () => {
|
|
318
|
+
if (!l.value.gateways || l.value.gateways.length === 0)
|
|
190
319
|
return m();
|
|
191
|
-
const
|
|
192
|
-
if (!
|
|
320
|
+
const N = l.value.gateways[0];
|
|
321
|
+
if (!N.config)
|
|
193
322
|
return m();
|
|
194
|
-
|
|
323
|
+
if (N.gateway === "Tyro") {
|
|
324
|
+
e.value = {
|
|
325
|
+
packageId: N.config.packageId,
|
|
326
|
+
uniqueId: N.config.uniqueId,
|
|
327
|
+
developerId: "",
|
|
328
|
+
isUat: !1
|
|
329
|
+
};
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
switch (N.gateway) {
|
|
195
333
|
case "Fiuu":
|
|
196
334
|
e.value = {
|
|
197
|
-
packageId:
|
|
198
|
-
uniqueId:
|
|
335
|
+
packageId: N.config.packageId,
|
|
336
|
+
uniqueId: N.config.uniqueId,
|
|
199
337
|
developerId: "",
|
|
200
338
|
isUat: !1
|
|
201
339
|
};
|
|
202
340
|
break;
|
|
203
341
|
case "Softspace":
|
|
204
342
|
case "Digio":
|
|
205
|
-
const
|
|
343
|
+
const S = JSON.parse(N.config.uniqueId);
|
|
206
344
|
e.value = {
|
|
207
|
-
packageId:
|
|
208
|
-
uniqueId:
|
|
209
|
-
developerId:
|
|
210
|
-
isUat:
|
|
345
|
+
packageId: N.config.packageId,
|
|
346
|
+
uniqueId: S.uniqueId,
|
|
347
|
+
developerId: S.developerId,
|
|
348
|
+
isUat: S.isUat
|
|
211
349
|
};
|
|
212
350
|
return;
|
|
213
351
|
}
|
|
214
352
|
};
|
|
215
|
-
|
|
216
|
-
async function
|
|
217
|
-
|
|
218
|
-
|
|
353
|
+
P(l, $), q($);
|
|
354
|
+
async function H() {
|
|
355
|
+
const N = y.value;
|
|
356
|
+
if (!N)
|
|
357
|
+
return;
|
|
358
|
+
let S = e.value.uniqueId;
|
|
359
|
+
N.isLegacy || (S = JSON.stringify({
|
|
360
|
+
uniqueId: e.value.uniqueId,
|
|
361
|
+
developerId: e.value.developerId,
|
|
362
|
+
isUat: e.value.isUat
|
|
363
|
+
}));
|
|
364
|
+
const re = {
|
|
365
|
+
gateway: N.gateway,
|
|
366
|
+
config: {
|
|
367
|
+
packageId: N.value,
|
|
368
|
+
uniqueId: S
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
(!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = re, await d.onUpdate(l.value);
|
|
372
|
+
}
|
|
373
|
+
async function z(N) {
|
|
374
|
+
var S;
|
|
375
|
+
(S = l.value.gateways) == null || S.splice(N, 1), d.onUpdate(l.value);
|
|
376
|
+
}
|
|
377
|
+
function Q() {
|
|
378
|
+
u.value && w();
|
|
219
379
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return y(), I(w, {
|
|
380
|
+
return (N, S) => {
|
|
381
|
+
const re = g("FmSelect"), J = g("FmTextField"), ue = g("FmCheckbox"), ie = g("FmButton"), ce = g("FmTooltip"), de = g("FmForm");
|
|
382
|
+
return f(), F(de, {
|
|
224
383
|
ref: r.value,
|
|
225
384
|
class: "flex flex-col gap-16 w-[500px]",
|
|
226
|
-
onValidationSuccess:
|
|
227
|
-
const U = u.value;
|
|
228
|
-
if (!U)
|
|
229
|
-
return;
|
|
230
|
-
let z = e.value.uniqueId;
|
|
231
|
-
U.isLegacy || (z = JSON.stringify({ uniqueId: e.value.uniqueId, developerId: e.value.developerId, isUat: e.value.isUat }));
|
|
232
|
-
const J = {
|
|
233
|
-
gateway: U.gateway,
|
|
234
|
-
config: {
|
|
235
|
-
packageId: U.value,
|
|
236
|
-
uniqueId: z
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
(!n.value.gateways || n.value.gateways.length > 1) && (n.value.gateways = []), n.value.gateways[0] = J, c.onUpdate(n.value);
|
|
240
|
-
})
|
|
385
|
+
onValidationSuccess: H
|
|
241
386
|
}, {
|
|
242
|
-
default:
|
|
243
|
-
v(
|
|
387
|
+
default: O(() => [
|
|
388
|
+
v(re, {
|
|
244
389
|
modelValue: e.value.packageId,
|
|
245
|
-
"onUpdate:modelValue":
|
|
390
|
+
"onUpdate:modelValue": S[0] || (S[0] = (L) => e.value.packageId = L),
|
|
246
391
|
label: "Package ID",
|
|
247
|
-
items:
|
|
392
|
+
items: c.value
|
|
248
393
|
}, null, 8, ["modelValue", "items"]),
|
|
249
|
-
u.value
|
|
250
|
-
|
|
394
|
+
u.value ? (f(), F(J, {
|
|
395
|
+
key: 0,
|
|
396
|
+
"model-value": h(n),
|
|
397
|
+
label: "Unique ID (Reader ID)",
|
|
398
|
+
disabled: ""
|
|
399
|
+
}, null, 8, ["model-value"])) : y.value && y.value.isLegacy ? (f(), M(G, { key: 1 }, [
|
|
400
|
+
v(J, {
|
|
251
401
|
modelValue: e.value.uniqueId,
|
|
252
|
-
"onUpdate:modelValue":
|
|
402
|
+
"onUpdate:modelValue": S[1] || (S[1] = (L) => e.value.uniqueId = L),
|
|
253
403
|
label: "Unique ID (TID)"
|
|
254
404
|
}, null, 8, ["modelValue"]),
|
|
255
|
-
|
|
256
|
-
], 64)) : (
|
|
257
|
-
v(
|
|
405
|
+
y.value.isOutdated ? (f(), M("span", Ue, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : V("", !0)
|
|
406
|
+
], 64)) : u.value ? V("", !0) : (f(), M(G, { key: 2 }, [
|
|
407
|
+
v(J, {
|
|
258
408
|
modelValue: e.value.developerId,
|
|
259
|
-
"onUpdate:modelValue":
|
|
409
|
+
"onUpdate:modelValue": S[2] || (S[2] = (L) => e.value.developerId = L),
|
|
260
410
|
label: "Developer ID (MID)"
|
|
261
411
|
}, null, 8, ["modelValue"]),
|
|
262
|
-
v(
|
|
412
|
+
v(J, {
|
|
263
413
|
modelValue: e.value.uniqueId,
|
|
264
|
-
"onUpdate:modelValue":
|
|
414
|
+
"onUpdate:modelValue": S[3] || (S[3] = (L) => e.value.uniqueId = L),
|
|
265
415
|
label: "Unique ID (TID)"
|
|
266
416
|
}, null, 8, ["modelValue"]),
|
|
267
|
-
v(
|
|
417
|
+
v(ue, {
|
|
268
418
|
modelValue: e.value.isUat,
|
|
269
|
-
"onUpdate:modelValue":
|
|
419
|
+
"onUpdate:modelValue": S[4] || (S[4] = (L) => e.value.isUat = L),
|
|
270
420
|
label: "Is UAT (Test)",
|
|
271
421
|
value: "1"
|
|
272
422
|
}, null, 8, ["modelValue"])
|
|
273
423
|
], 64)),
|
|
274
|
-
|
|
275
|
-
|
|
424
|
+
I("div", Re, [
|
|
425
|
+
l.value.gateways && l.value.gateways.length > 0 ? (f(), F(ie, {
|
|
276
426
|
key: 0,
|
|
277
427
|
class: "flex-1",
|
|
278
428
|
variant: "secondary",
|
|
279
429
|
label: "Delete",
|
|
280
|
-
onclick: () =>
|
|
281
|
-
}, null, 8, ["onclick"])) :
|
|
282
|
-
|
|
283
|
-
|
|
430
|
+
onclick: () => z(0)
|
|
431
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
432
|
+
u.value && h(p) && B.value ? (f(), F(ce, {
|
|
433
|
+
key: 1,
|
|
434
|
+
class: "flex-1",
|
|
435
|
+
variant: "plain",
|
|
436
|
+
placement: "top",
|
|
437
|
+
content: h(x)
|
|
438
|
+
}, {
|
|
439
|
+
default: O(() => [
|
|
440
|
+
I("div", Me, [
|
|
441
|
+
v(ie, {
|
|
442
|
+
type: K.value,
|
|
443
|
+
class: "w-full",
|
|
444
|
+
variant: "primary",
|
|
445
|
+
loading: D.value,
|
|
446
|
+
disabled: B.value,
|
|
447
|
+
label: k.value,
|
|
448
|
+
onClick: Q
|
|
449
|
+
}, null, 8, ["type", "loading", "disabled", "label"])
|
|
450
|
+
])
|
|
451
|
+
]),
|
|
452
|
+
_: 1
|
|
453
|
+
}, 8, ["content"])) : (f(), F(ie, {
|
|
454
|
+
key: 2,
|
|
455
|
+
type: K.value,
|
|
284
456
|
class: "flex-1",
|
|
285
457
|
variant: "primary",
|
|
286
|
-
|
|
287
|
-
|
|
458
|
+
loading: D.value,
|
|
459
|
+
disabled: B.value,
|
|
460
|
+
label: k.value,
|
|
461
|
+
onClick: Q
|
|
462
|
+
}, null, 8, ["type", "loading", "disabled", "label"]))
|
|
288
463
|
])
|
|
289
464
|
]),
|
|
290
465
|
_: 1
|
|
291
466
|
}, 512);
|
|
292
467
|
};
|
|
293
468
|
}
|
|
294
|
-
}),
|
|
469
|
+
}), Oe = {
|
|
295
470
|
key: 0,
|
|
296
471
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
297
|
-
},
|
|
472
|
+
}, Pe = { class: "flex mt-6 space-x-6" }, qe = /* @__PURE__ */ R({
|
|
298
473
|
__name: "TerminalGateway",
|
|
299
474
|
props: {
|
|
300
475
|
terminal: {
|
|
@@ -306,62 +481,62 @@ const le = /* @__PURE__ */ C({
|
|
|
306
481
|
required: !0
|
|
307
482
|
}
|
|
308
483
|
},
|
|
309
|
-
setup(
|
|
310
|
-
const { isLoading:
|
|
484
|
+
setup(_) {
|
|
485
|
+
const { isLoading: d, startAsyncCall: a } = le(), T = _, l = A(() => T.terminal), r = b(), e = b(), m = b(-1), c = b({
|
|
311
486
|
terminalId: ""
|
|
312
|
-
}),
|
|
313
|
-
|
|
314
|
-
},
|
|
487
|
+
}), y = () => {
|
|
488
|
+
c.value.terminalId = "", m.value = -1;
|
|
489
|
+
}, u = () => {
|
|
315
490
|
if (a(async () => {
|
|
316
|
-
r.value = await
|
|
491
|
+
r.value = await E.getRestaurantTerminals(T.terminal.referenceId);
|
|
317
492
|
}), !T.terminal.ecrs)
|
|
318
|
-
return
|
|
319
|
-
const
|
|
320
|
-
if (
|
|
321
|
-
return
|
|
322
|
-
m.value =
|
|
323
|
-
const i = T.terminal.ecrs.at(
|
|
324
|
-
i.gateway === "FeedMe" && i.config && (
|
|
493
|
+
return y();
|
|
494
|
+
const n = T.terminal.ecrs.findIndex((p) => p && p.gateway && p.gateway === "FeedMe");
|
|
495
|
+
if (n === -1)
|
|
496
|
+
return y();
|
|
497
|
+
m.value = n;
|
|
498
|
+
const i = T.terminal.ecrs.at(n);
|
|
499
|
+
i.gateway === "FeedMe" && i.config && (c.value = {
|
|
325
500
|
terminalId: i.config.terminalId
|
|
326
501
|
});
|
|
327
502
|
};
|
|
328
|
-
|
|
329
|
-
const
|
|
330
|
-
label:
|
|
331
|
-
value:
|
|
503
|
+
P(l, u), q(u);
|
|
504
|
+
const s = C(() => (r.value ?? []).map((n) => ({
|
|
505
|
+
label: n.name ?? n._id,
|
|
506
|
+
value: n._id
|
|
332
507
|
})));
|
|
333
|
-
async function
|
|
508
|
+
async function t(n) {
|
|
334
509
|
var i;
|
|
335
|
-
(i = T.terminal.ecrs) == null || i.splice(
|
|
510
|
+
(i = T.terminal.ecrs) == null || i.splice(n, 1), T.onUpdate(T.terminal);
|
|
336
511
|
}
|
|
337
|
-
return (
|
|
338
|
-
const p =
|
|
339
|
-
return h(
|
|
512
|
+
return (n, i) => {
|
|
513
|
+
const p = g("FmCircularProgress"), x = g("FmSelect"), o = g("FmButton"), w = g("FmForm");
|
|
514
|
+
return h(d) ? (f(), M("div", Oe, [
|
|
340
515
|
v(p, { size: "xxl" })
|
|
341
|
-
])) : (
|
|
516
|
+
])) : (f(), F(w, {
|
|
342
517
|
key: 1,
|
|
343
518
|
ref: e.value,
|
|
344
519
|
class: "flex flex-col gap-16 w-[500px]",
|
|
345
520
|
onValidationSuccess: i[1] || (i[1] = () => {
|
|
346
|
-
m.value > -1 ?
|
|
521
|
+
m.value > -1 ? l.value.ecrs[m.value] = { gateway: "FeedMe", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: c.value })), T.onUpdate(l.value);
|
|
347
522
|
})
|
|
348
523
|
}, {
|
|
349
|
-
default:
|
|
524
|
+
default: O(() => [
|
|
350
525
|
v(x, {
|
|
351
|
-
modelValue:
|
|
352
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
526
|
+
modelValue: c.value.terminalId,
|
|
527
|
+
"onUpdate:modelValue": i[0] || (i[0] = (K) => c.value.terminalId = K),
|
|
353
528
|
label: "Terminal ID",
|
|
354
|
-
items:
|
|
355
|
-
rules: h(
|
|
529
|
+
items: s.value,
|
|
530
|
+
rules: h(Te)(h(_e).string())
|
|
356
531
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
357
|
-
|
|
358
|
-
m.value > -1 ? (
|
|
532
|
+
I("div", Pe, [
|
|
533
|
+
m.value > -1 ? (f(), F(o, {
|
|
359
534
|
key: 0,
|
|
360
535
|
class: "flex-1",
|
|
361
536
|
variant: "secondary",
|
|
362
537
|
label: "Delete",
|
|
363
|
-
onclick: () =>
|
|
364
|
-
}, null, 8, ["onclick"])) :
|
|
538
|
+
onclick: () => t(m.value)
|
|
539
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
365
540
|
v(o, {
|
|
366
541
|
type: "submit",
|
|
367
542
|
class: "flex-1",
|
|
@@ -374,7 +549,7 @@ const le = /* @__PURE__ */ C({
|
|
|
374
549
|
}, 512));
|
|
375
550
|
};
|
|
376
551
|
}
|
|
377
|
-
}),
|
|
552
|
+
}), Ge = { class: "flex mt-6 space-x-6" }, Ae = /* @__PURE__ */ R({
|
|
378
553
|
__name: "GhlGateway",
|
|
379
554
|
props: {
|
|
380
555
|
terminal: {
|
|
@@ -386,68 +561,68 @@ const le = /* @__PURE__ */ C({
|
|
|
386
561
|
required: !0
|
|
387
562
|
}
|
|
388
563
|
},
|
|
389
|
-
setup(
|
|
390
|
-
const
|
|
564
|
+
setup(_) {
|
|
565
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b({
|
|
391
566
|
merchantId: "",
|
|
392
567
|
terminalId: "",
|
|
393
568
|
privateKey: ""
|
|
394
569
|
}), e = () => {
|
|
395
|
-
r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "",
|
|
570
|
+
r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", l.value = -1;
|
|
396
571
|
}, m = () => {
|
|
397
572
|
if (!a.value.ecrs)
|
|
398
573
|
return e();
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
574
|
+
const y = a.value.ecrs.findIndex((s) => s && s.gateway && s.gateway === "Ghl");
|
|
575
|
+
if (y === -1)
|
|
401
576
|
return e();
|
|
402
|
-
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
merchantId:
|
|
406
|
-
terminalId:
|
|
407
|
-
privateKey:
|
|
577
|
+
l.value = y;
|
|
578
|
+
const u = a.value.ecrs.at(y);
|
|
579
|
+
u.gateway === "Ghl" && u.config && (r.value = {
|
|
580
|
+
merchantId: u.config.merchantId,
|
|
581
|
+
terminalId: u.config.terminalId,
|
|
582
|
+
privateKey: u.config.privateKey || ""
|
|
408
583
|
});
|
|
409
584
|
};
|
|
410
|
-
|
|
411
|
-
async function
|
|
412
|
-
var
|
|
413
|
-
(
|
|
585
|
+
P(a, m), q(m);
|
|
586
|
+
async function c(y) {
|
|
587
|
+
var u;
|
|
588
|
+
(u = a.value.ecrs) == null || u.splice(y, 1), d.onUpdate(a.value);
|
|
414
589
|
}
|
|
415
|
-
return (
|
|
416
|
-
const
|
|
417
|
-
return
|
|
590
|
+
return (y, u) => {
|
|
591
|
+
const s = g("FmTextField"), t = g("FmTextarea"), n = g("FmButton"), i = g("FmForm");
|
|
592
|
+
return f(), F(i, {
|
|
418
593
|
ref: T.value,
|
|
419
594
|
class: "flex flex-col gap-16 w-[500px]",
|
|
420
|
-
onValidationSuccess:
|
|
421
|
-
|
|
595
|
+
onValidationSuccess: u[3] || (u[3] = () => {
|
|
596
|
+
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);
|
|
422
597
|
})
|
|
423
598
|
}, {
|
|
424
|
-
default:
|
|
425
|
-
v(
|
|
599
|
+
default: O(() => [
|
|
600
|
+
v(s, {
|
|
426
601
|
modelValue: r.value.merchantId,
|
|
427
|
-
"onUpdate:modelValue":
|
|
602
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => r.value.merchantId = p),
|
|
428
603
|
label: "Merchant ID"
|
|
429
604
|
}, null, 8, ["modelValue"]),
|
|
430
|
-
v(
|
|
605
|
+
v(s, {
|
|
431
606
|
modelValue: r.value.terminalId,
|
|
432
|
-
"onUpdate:modelValue":
|
|
607
|
+
"onUpdate:modelValue": u[1] || (u[1] = (p) => r.value.terminalId = p),
|
|
433
608
|
label: "Terminal ID"
|
|
434
609
|
}, null, 8, ["modelValue"]),
|
|
435
|
-
v(
|
|
610
|
+
v(t, {
|
|
436
611
|
modelValue: r.value.privateKey,
|
|
437
|
-
"onUpdate:modelValue":
|
|
612
|
+
"onUpdate:modelValue": u[2] || (u[2] = (p) => r.value.privateKey = p),
|
|
438
613
|
label: "Private Key",
|
|
439
614
|
"label-mark": "optional",
|
|
440
615
|
"label-info": "Default will use FeedMe Private Key"
|
|
441
616
|
}, null, 8, ["modelValue"]),
|
|
442
|
-
|
|
443
|
-
|
|
617
|
+
I("div", Ge, [
|
|
618
|
+
l.value > -1 ? (f(), F(n, {
|
|
444
619
|
key: 0,
|
|
445
620
|
class: "flex-1",
|
|
446
621
|
variant: "secondary",
|
|
447
622
|
label: "Delete",
|
|
448
|
-
onclick: () =>
|
|
449
|
-
}, null, 8, ["onclick"])) :
|
|
450
|
-
v(
|
|
623
|
+
onclick: () => c(l.value)
|
|
624
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
625
|
+
v(n, {
|
|
451
626
|
type: "submit",
|
|
452
627
|
class: "flex-1",
|
|
453
628
|
variant: "primary",
|
|
@@ -459,7 +634,7 @@ const le = /* @__PURE__ */ C({
|
|
|
459
634
|
}, 512);
|
|
460
635
|
};
|
|
461
636
|
}
|
|
462
|
-
}),
|
|
637
|
+
}), De = { class: "flex items-end" }, $e = { class: "flex flex-wrap gap-8 items-center mt-4" }, Be = { class: "flex mt-6 space-x-6" }, Le = /* @__PURE__ */ R({
|
|
463
638
|
__name: "MaybankGateway",
|
|
464
639
|
props: {
|
|
465
640
|
terminal: {
|
|
@@ -471,49 +646,49 @@ const le = /* @__PURE__ */ C({
|
|
|
471
646
|
required: !0
|
|
472
647
|
}
|
|
473
648
|
},
|
|
474
|
-
setup(
|
|
475
|
-
const
|
|
649
|
+
setup(_) {
|
|
650
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
476
651
|
ip: "",
|
|
477
652
|
receiptName: "",
|
|
478
653
|
cardTypes: []
|
|
479
654
|
}), m = () => {
|
|
480
|
-
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [],
|
|
481
|
-
},
|
|
655
|
+
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
656
|
+
}, c = () => {
|
|
482
657
|
var i;
|
|
483
658
|
if (!a.value.ecrIntegrations)
|
|
484
659
|
return m();
|
|
485
|
-
const
|
|
486
|
-
if (
|
|
660
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Maybank");
|
|
661
|
+
if (t === -1)
|
|
487
662
|
return m();
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
|
|
491
|
-
ip:
|
|
492
|
-
receiptName:
|
|
493
|
-
cardTypes: ((i =
|
|
663
|
+
l.value = t;
|
|
664
|
+
const n = s.at(t);
|
|
665
|
+
n.gateway === "Maybank" && n.config && (e.value = {
|
|
666
|
+
ip: n.config.ip ?? "",
|
|
667
|
+
receiptName: n.receiptName ?? "",
|
|
668
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
494
669
|
});
|
|
495
670
|
};
|
|
496
|
-
|
|
497
|
-
async function
|
|
498
|
-
var
|
|
499
|
-
(
|
|
671
|
+
P(a, c), q(c);
|
|
672
|
+
async function y(s) {
|
|
673
|
+
var t;
|
|
674
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
500
675
|
}
|
|
501
|
-
async function
|
|
676
|
+
async function u() {
|
|
502
677
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
503
678
|
}
|
|
504
|
-
return (
|
|
505
|
-
const
|
|
506
|
-
return
|
|
679
|
+
return (s, t) => {
|
|
680
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
681
|
+
return f(), F(x, {
|
|
507
682
|
ref: T.value,
|
|
508
683
|
class: "flex flex-col gap-16 w-[500px]",
|
|
509
|
-
onValidationSuccess:
|
|
684
|
+
onValidationSuccess: t[3] || (t[3] = () => {
|
|
510
685
|
var o, w;
|
|
511
|
-
|
|
686
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
512
687
|
gateway: "Maybank",
|
|
513
688
|
config: { ip: e.value.ip },
|
|
514
689
|
receiptName: e.value.receiptName,
|
|
515
690
|
dialogConfig: {
|
|
516
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
691
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
517
692
|
cardTypes: e.value.cardTypes
|
|
518
693
|
}
|
|
519
694
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -523,50 +698,50 @@ const le = /* @__PURE__ */ C({
|
|
|
523
698
|
dialogConfig: {
|
|
524
699
|
cardTypes: e.value.cardTypes
|
|
525
700
|
}
|
|
526
|
-
})),
|
|
701
|
+
})), d.onUpdate(a.value);
|
|
527
702
|
})
|
|
528
703
|
}, {
|
|
529
|
-
default:
|
|
530
|
-
v(
|
|
704
|
+
default: O(() => [
|
|
705
|
+
v(n, {
|
|
531
706
|
modelValue: e.value.ip,
|
|
532
|
-
"onUpdate:modelValue":
|
|
707
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
533
708
|
label: "IP Address"
|
|
534
709
|
}, null, 8, ["modelValue"]),
|
|
535
|
-
v(
|
|
710
|
+
v(n, {
|
|
536
711
|
modelValue: e.value.receiptName,
|
|
537
|
-
"onUpdate:modelValue":
|
|
712
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
538
713
|
label: "Receipt Payment Name",
|
|
539
714
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
540
715
|
}, null, 8, ["modelValue"]),
|
|
541
|
-
|
|
542
|
-
v(
|
|
716
|
+
I("div", De, [
|
|
717
|
+
v(n, {
|
|
543
718
|
modelValue: r.value,
|
|
544
|
-
"onUpdate:modelValue":
|
|
719
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
545
720
|
label: "Fallback Card Types",
|
|
546
721
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
547
722
|
}, null, 8, ["modelValue"]),
|
|
548
723
|
v(i, {
|
|
549
724
|
class: "ml-4",
|
|
550
725
|
icon: "add",
|
|
551
|
-
onClick:
|
|
726
|
+
onClick: u
|
|
552
727
|
})
|
|
553
728
|
]),
|
|
554
|
-
|
|
555
|
-
(
|
|
729
|
+
I("div", $e, [
|
|
730
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
556
731
|
key: o,
|
|
557
732
|
label: o,
|
|
558
733
|
removable: !0,
|
|
559
734
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
560
735
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
561
736
|
]),
|
|
562
|
-
|
|
563
|
-
|
|
737
|
+
I("div", Be, [
|
|
738
|
+
l.value > -1 ? (f(), F(i, {
|
|
564
739
|
key: 0,
|
|
565
740
|
class: "flex-1",
|
|
566
741
|
variant: "secondary",
|
|
567
742
|
label: "Delete",
|
|
568
|
-
onclick: () =>
|
|
569
|
-
}, null, 8, ["onclick"])) :
|
|
743
|
+
onclick: () => y(l.value)
|
|
744
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
570
745
|
v(i, {
|
|
571
746
|
type: "submit",
|
|
572
747
|
class: "flex-1",
|
|
@@ -579,7 +754,7 @@ const le = /* @__PURE__ */ C({
|
|
|
579
754
|
}, 512);
|
|
580
755
|
};
|
|
581
756
|
}
|
|
582
|
-
}),
|
|
757
|
+
}), Ye = { class: "flex items-end" }, Ee = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ke = { class: "flex mt-6 space-x-6" }, je = /* @__PURE__ */ R({
|
|
583
758
|
__name: "Maybank2Gateway",
|
|
584
759
|
props: {
|
|
585
760
|
terminal: {
|
|
@@ -591,49 +766,49 @@ const le = /* @__PURE__ */ C({
|
|
|
591
766
|
required: !0
|
|
592
767
|
}
|
|
593
768
|
},
|
|
594
|
-
setup(
|
|
595
|
-
const
|
|
769
|
+
setup(_) {
|
|
770
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
596
771
|
ip: "",
|
|
597
772
|
receiptName: "",
|
|
598
773
|
cardTypes: []
|
|
599
774
|
}), m = () => {
|
|
600
|
-
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [],
|
|
601
|
-
},
|
|
775
|
+
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
776
|
+
}, c = () => {
|
|
602
777
|
var i;
|
|
603
778
|
if (!a.value.ecrIntegrations)
|
|
604
779
|
return m();
|
|
605
|
-
const
|
|
606
|
-
if (
|
|
780
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
|
|
781
|
+
if (t === -1)
|
|
607
782
|
return m();
|
|
608
|
-
|
|
609
|
-
const
|
|
610
|
-
|
|
611
|
-
ip:
|
|
612
|
-
receiptName:
|
|
613
|
-
cardTypes: ((i =
|
|
783
|
+
l.value = t;
|
|
784
|
+
const n = s.at(t);
|
|
785
|
+
n.gateway === "Maybank2" && n.config && (e.value = {
|
|
786
|
+
ip: n.config.ip ?? "",
|
|
787
|
+
receiptName: n.receiptName ?? "",
|
|
788
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
614
789
|
});
|
|
615
790
|
};
|
|
616
|
-
|
|
617
|
-
async function
|
|
618
|
-
var
|
|
619
|
-
(
|
|
791
|
+
P(a, c), q(c);
|
|
792
|
+
async function y(s) {
|
|
793
|
+
var t;
|
|
794
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
620
795
|
}
|
|
621
|
-
async function
|
|
796
|
+
async function u() {
|
|
622
797
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
623
798
|
}
|
|
624
|
-
return (
|
|
625
|
-
const
|
|
626
|
-
return
|
|
799
|
+
return (s, t) => {
|
|
800
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
801
|
+
return f(), F(x, {
|
|
627
802
|
ref: T.value,
|
|
628
803
|
class: "flex flex-col gap-16 w-[500px]",
|
|
629
|
-
onValidationSuccess:
|
|
804
|
+
onValidationSuccess: t[3] || (t[3] = () => {
|
|
630
805
|
var o, w;
|
|
631
|
-
|
|
806
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
632
807
|
gateway: "Maybank2",
|
|
633
808
|
config: { ip: e.value.ip },
|
|
634
809
|
receiptName: e.value.receiptName,
|
|
635
810
|
dialogConfig: {
|
|
636
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
811
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
637
812
|
cardTypes: e.value.cardTypes
|
|
638
813
|
}
|
|
639
814
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -643,50 +818,50 @@ const le = /* @__PURE__ */ C({
|
|
|
643
818
|
dialogConfig: {
|
|
644
819
|
cardTypes: e.value.cardTypes
|
|
645
820
|
}
|
|
646
|
-
})),
|
|
821
|
+
})), d.onUpdate(a.value);
|
|
647
822
|
})
|
|
648
823
|
}, {
|
|
649
|
-
default:
|
|
650
|
-
v(
|
|
824
|
+
default: O(() => [
|
|
825
|
+
v(n, {
|
|
651
826
|
modelValue: e.value.ip,
|
|
652
|
-
"onUpdate:modelValue":
|
|
827
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
653
828
|
label: "IP Address"
|
|
654
829
|
}, null, 8, ["modelValue"]),
|
|
655
|
-
v(
|
|
830
|
+
v(n, {
|
|
656
831
|
modelValue: e.value.receiptName,
|
|
657
|
-
"onUpdate:modelValue":
|
|
832
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
658
833
|
label: "Receipt Payment Name",
|
|
659
834
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
660
835
|
}, null, 8, ["modelValue"]),
|
|
661
|
-
|
|
662
|
-
v(
|
|
836
|
+
I("div", Ye, [
|
|
837
|
+
v(n, {
|
|
663
838
|
modelValue: r.value,
|
|
664
|
-
"onUpdate:modelValue":
|
|
839
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
665
840
|
label: "Fallback Card Types",
|
|
666
841
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
667
842
|
}, null, 8, ["modelValue"]),
|
|
668
843
|
v(i, {
|
|
669
844
|
class: "ml-4",
|
|
670
845
|
icon: "add",
|
|
671
|
-
onClick:
|
|
846
|
+
onClick: u
|
|
672
847
|
})
|
|
673
848
|
]),
|
|
674
|
-
|
|
675
|
-
(
|
|
849
|
+
I("div", Ee, [
|
|
850
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
676
851
|
key: o,
|
|
677
852
|
label: o,
|
|
678
853
|
removable: !0,
|
|
679
854
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
680
855
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
681
856
|
]),
|
|
682
|
-
|
|
683
|
-
|
|
857
|
+
I("div", Ke, [
|
|
858
|
+
l.value > -1 ? (f(), F(i, {
|
|
684
859
|
key: 0,
|
|
685
860
|
class: "flex-1",
|
|
686
861
|
variant: "secondary",
|
|
687
862
|
label: "Delete",
|
|
688
|
-
onclick: () =>
|
|
689
|
-
}, null, 8, ["onclick"])) :
|
|
863
|
+
onclick: () => y(l.value)
|
|
864
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
690
865
|
v(i, {
|
|
691
866
|
type: "submit",
|
|
692
867
|
class: "flex-1",
|
|
@@ -699,7 +874,7 @@ const le = /* @__PURE__ */ C({
|
|
|
699
874
|
}, 512);
|
|
700
875
|
};
|
|
701
876
|
}
|
|
702
|
-
}),
|
|
877
|
+
}), He = { class: "flex items-end" }, ze = { class: "flex flex-wrap gap-8 items-center mt-4" }, Qe = { class: "flex mt-6 space-x-6" }, Je = /* @__PURE__ */ R({
|
|
703
878
|
__name: "Maybank3Gateway",
|
|
704
879
|
props: {
|
|
705
880
|
terminal: {
|
|
@@ -711,49 +886,49 @@ const le = /* @__PURE__ */ C({
|
|
|
711
886
|
required: !0
|
|
712
887
|
}
|
|
713
888
|
},
|
|
714
|
-
setup(
|
|
715
|
-
const
|
|
889
|
+
setup(_) {
|
|
890
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
716
891
|
receiptName: "",
|
|
717
892
|
config: {},
|
|
718
893
|
cardTypes: []
|
|
719
894
|
}), m = () => {
|
|
720
|
-
e.value.receiptName = "", e.value.cardTypes = [],
|
|
721
|
-
},
|
|
895
|
+
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
896
|
+
}, c = () => {
|
|
722
897
|
var i;
|
|
723
898
|
if (!a.value.ecrIntegrations)
|
|
724
899
|
return m();
|
|
725
|
-
const
|
|
726
|
-
if (
|
|
900
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Maybank3");
|
|
901
|
+
if (t === -1)
|
|
727
902
|
return m();
|
|
728
|
-
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
config:
|
|
732
|
-
receiptName:
|
|
733
|
-
cardTypes: ((i =
|
|
903
|
+
l.value = t;
|
|
904
|
+
const n = s.at(t);
|
|
905
|
+
n.gateway === "Maybank3" && n.config && (e.value = {
|
|
906
|
+
config: n.config,
|
|
907
|
+
receiptName: n.receiptName ?? "",
|
|
908
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
734
909
|
});
|
|
735
910
|
};
|
|
736
|
-
|
|
737
|
-
async function
|
|
738
|
-
var
|
|
739
|
-
(
|
|
911
|
+
P(a, c), q(c);
|
|
912
|
+
async function y(s) {
|
|
913
|
+
var t;
|
|
914
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
740
915
|
}
|
|
741
|
-
async function
|
|
916
|
+
async function u() {
|
|
742
917
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
743
918
|
}
|
|
744
|
-
return (
|
|
745
|
-
const
|
|
746
|
-
return
|
|
919
|
+
return (s, t) => {
|
|
920
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
921
|
+
return f(), F(x, {
|
|
747
922
|
ref: T.value,
|
|
748
923
|
class: "flex flex-col gap-16 w-[500px]",
|
|
749
|
-
onValidationSuccess:
|
|
924
|
+
onValidationSuccess: t[2] || (t[2] = () => {
|
|
750
925
|
var o, w;
|
|
751
|
-
|
|
926
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
752
927
|
gateway: "Maybank3",
|
|
753
928
|
config: e.value.config,
|
|
754
929
|
receiptName: e.value.receiptName,
|
|
755
930
|
dialogConfig: {
|
|
756
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
931
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
757
932
|
cardTypes: e.value.cardTypes
|
|
758
933
|
}
|
|
759
934
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -763,45 +938,45 @@ const le = /* @__PURE__ */ C({
|
|
|
763
938
|
dialogConfig: {
|
|
764
939
|
cardTypes: e.value.cardTypes
|
|
765
940
|
}
|
|
766
|
-
})),
|
|
941
|
+
})), d.onUpdate(a.value);
|
|
767
942
|
})
|
|
768
943
|
}, {
|
|
769
|
-
default:
|
|
770
|
-
v(
|
|
944
|
+
default: O(() => [
|
|
945
|
+
v(n, {
|
|
771
946
|
modelValue: e.value.receiptName,
|
|
772
|
-
"onUpdate:modelValue":
|
|
947
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
773
948
|
label: "Receipt Payment Name",
|
|
774
949
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
775
950
|
}, null, 8, ["modelValue"]),
|
|
776
|
-
|
|
777
|
-
v(
|
|
951
|
+
I("div", He, [
|
|
952
|
+
v(n, {
|
|
778
953
|
modelValue: r.value,
|
|
779
|
-
"onUpdate:modelValue":
|
|
954
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
780
955
|
label: "Fallback Card Types",
|
|
781
956
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
782
957
|
}, null, 8, ["modelValue"]),
|
|
783
958
|
v(i, {
|
|
784
959
|
class: "ml-4",
|
|
785
960
|
icon: "add",
|
|
786
|
-
onClick:
|
|
961
|
+
onClick: u
|
|
787
962
|
})
|
|
788
963
|
]),
|
|
789
|
-
|
|
790
|
-
(
|
|
964
|
+
I("div", ze, [
|
|
965
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
791
966
|
key: o,
|
|
792
967
|
label: o,
|
|
793
968
|
removable: !0,
|
|
794
969
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
795
970
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
796
971
|
]),
|
|
797
|
-
|
|
798
|
-
|
|
972
|
+
I("div", Qe, [
|
|
973
|
+
l.value > -1 ? (f(), F(i, {
|
|
799
974
|
key: 0,
|
|
800
975
|
class: "flex-1",
|
|
801
976
|
variant: "secondary",
|
|
802
977
|
label: "Delete",
|
|
803
|
-
onclick: () =>
|
|
804
|
-
}, null, 8, ["onclick"])) :
|
|
978
|
+
onclick: () => y(l.value)
|
|
979
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
805
980
|
v(i, {
|
|
806
981
|
type: "submit",
|
|
807
982
|
class: "flex-1",
|
|
@@ -814,7 +989,7 @@ const le = /* @__PURE__ */ C({
|
|
|
814
989
|
}, 512);
|
|
815
990
|
};
|
|
816
991
|
}
|
|
817
|
-
}),
|
|
992
|
+
}), We = { class: "flex items-end" }, Xe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ze = { class: "flex mt-6 space-x-6" }, ea = /* @__PURE__ */ R({
|
|
818
993
|
__name: "NetsGateway",
|
|
819
994
|
props: {
|
|
820
995
|
terminal: {
|
|
@@ -826,49 +1001,49 @@ const le = /* @__PURE__ */ C({
|
|
|
826
1001
|
required: !0
|
|
827
1002
|
}
|
|
828
1003
|
},
|
|
829
|
-
setup(
|
|
830
|
-
const
|
|
1004
|
+
setup(_) {
|
|
1005
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
831
1006
|
ip: "",
|
|
832
1007
|
receiptName: "",
|
|
833
1008
|
cardTypes: []
|
|
834
1009
|
}), m = () => {
|
|
835
|
-
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [],
|
|
836
|
-
},
|
|
1010
|
+
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1011
|
+
}, c = () => {
|
|
837
1012
|
var i;
|
|
838
1013
|
if (!a.value.ecrIntegrations)
|
|
839
1014
|
return m();
|
|
840
|
-
const
|
|
841
|
-
if (
|
|
1015
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Nets");
|
|
1016
|
+
if (t === -1)
|
|
842
1017
|
return m();
|
|
843
|
-
|
|
844
|
-
const
|
|
845
|
-
|
|
846
|
-
ip:
|
|
847
|
-
receiptName:
|
|
848
|
-
cardTypes: ((i =
|
|
1018
|
+
l.value = t;
|
|
1019
|
+
const n = s.at(t);
|
|
1020
|
+
n.gateway === "Nets" && n.config && (e.value = {
|
|
1021
|
+
ip: n.config.ip ?? "",
|
|
1022
|
+
receiptName: n.receiptName ?? "",
|
|
1023
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
849
1024
|
});
|
|
850
1025
|
};
|
|
851
|
-
|
|
852
|
-
async function
|
|
853
|
-
var
|
|
854
|
-
(
|
|
1026
|
+
P(a, c), q(c);
|
|
1027
|
+
async function y(s) {
|
|
1028
|
+
var t;
|
|
1029
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
855
1030
|
}
|
|
856
|
-
async function
|
|
1031
|
+
async function u() {
|
|
857
1032
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
858
1033
|
}
|
|
859
|
-
return (
|
|
860
|
-
const
|
|
861
|
-
return
|
|
1034
|
+
return (s, t) => {
|
|
1035
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
1036
|
+
return f(), F(x, {
|
|
862
1037
|
ref: T.value,
|
|
863
1038
|
class: "flex flex-col gap-16 w-[500px]",
|
|
864
|
-
onValidationSuccess:
|
|
1039
|
+
onValidationSuccess: t[3] || (t[3] = () => {
|
|
865
1040
|
var o, w;
|
|
866
|
-
|
|
1041
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
867
1042
|
gateway: "Nets",
|
|
868
1043
|
config: { ip: e.value.ip },
|
|
869
1044
|
receiptName: e.value.receiptName,
|
|
870
1045
|
dialogConfig: {
|
|
871
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
1046
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
872
1047
|
cardTypes: e.value.cardTypes
|
|
873
1048
|
}
|
|
874
1049
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -878,50 +1053,50 @@ const le = /* @__PURE__ */ C({
|
|
|
878
1053
|
dialogConfig: {
|
|
879
1054
|
cardTypes: e.value.cardTypes
|
|
880
1055
|
}
|
|
881
|
-
})),
|
|
1056
|
+
})), d.onUpdate(a.value);
|
|
882
1057
|
})
|
|
883
1058
|
}, {
|
|
884
|
-
default:
|
|
885
|
-
v(
|
|
1059
|
+
default: O(() => [
|
|
1060
|
+
v(n, {
|
|
886
1061
|
modelValue: e.value.ip,
|
|
887
|
-
"onUpdate:modelValue":
|
|
1062
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
888
1063
|
label: "IP Address"
|
|
889
1064
|
}, null, 8, ["modelValue"]),
|
|
890
|
-
v(
|
|
1065
|
+
v(n, {
|
|
891
1066
|
modelValue: e.value.receiptName,
|
|
892
|
-
"onUpdate:modelValue":
|
|
1067
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
893
1068
|
label: "Receipt Payment Name",
|
|
894
1069
|
"label-info": "Default receipt display will be 'TERMINAL_NETS'"
|
|
895
1070
|
}, null, 8, ["modelValue"]),
|
|
896
|
-
|
|
897
|
-
v(
|
|
1071
|
+
I("div", We, [
|
|
1072
|
+
v(n, {
|
|
898
1073
|
modelValue: r.value,
|
|
899
|
-
"onUpdate:modelValue":
|
|
1074
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
900
1075
|
label: "Fallback Card Types",
|
|
901
1076
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
902
1077
|
}, null, 8, ["modelValue"]),
|
|
903
1078
|
v(i, {
|
|
904
1079
|
class: "ml-4",
|
|
905
1080
|
icon: "add",
|
|
906
|
-
onClick:
|
|
1081
|
+
onClick: u
|
|
907
1082
|
})
|
|
908
1083
|
]),
|
|
909
|
-
|
|
910
|
-
(
|
|
1084
|
+
I("div", Xe, [
|
|
1085
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
911
1086
|
key: o,
|
|
912
1087
|
label: o,
|
|
913
1088
|
removable: !0,
|
|
914
1089
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
915
1090
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
916
1091
|
]),
|
|
917
|
-
|
|
918
|
-
|
|
1092
|
+
I("div", Ze, [
|
|
1093
|
+
l.value > -1 ? (f(), F(i, {
|
|
919
1094
|
key: 0,
|
|
920
1095
|
class: "flex-1",
|
|
921
1096
|
variant: "secondary",
|
|
922
1097
|
label: "Delete",
|
|
923
|
-
onclick: () =>
|
|
924
|
-
}, null, 8, ["onclick"])) :
|
|
1098
|
+
onclick: () => y(l.value)
|
|
1099
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
925
1100
|
v(i, {
|
|
926
1101
|
type: "submit",
|
|
927
1102
|
class: "flex-1",
|
|
@@ -934,7 +1109,7 @@ const le = /* @__PURE__ */ C({
|
|
|
934
1109
|
}, 512);
|
|
935
1110
|
};
|
|
936
1111
|
}
|
|
937
|
-
}),
|
|
1112
|
+
}), aa = { class: "flex items-end" }, ta = { class: "flex flex-wrap gap-8 items-center mt-4" }, la = { class: "flex mt-6 space-x-6" }, na = /* @__PURE__ */ R({
|
|
938
1113
|
__name: "KBankGateway",
|
|
939
1114
|
props: {
|
|
940
1115
|
terminal: {
|
|
@@ -946,47 +1121,47 @@ const le = /* @__PURE__ */ C({
|
|
|
946
1121
|
required: !0
|
|
947
1122
|
}
|
|
948
1123
|
},
|
|
949
|
-
setup(
|
|
950
|
-
const
|
|
1124
|
+
setup(_) {
|
|
1125
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
951
1126
|
receiptName: "",
|
|
952
1127
|
cardTypes: []
|
|
953
1128
|
}), m = () => {
|
|
954
|
-
e.value.receiptName = "", e.value.cardTypes = [],
|
|
955
|
-
},
|
|
1129
|
+
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1130
|
+
}, c = () => {
|
|
956
1131
|
var i;
|
|
957
1132
|
if (!a.value.ecrIntegrations)
|
|
958
1133
|
return m();
|
|
959
|
-
const
|
|
960
|
-
if (
|
|
1134
|
+
const s = a.value.ecrIntegrations, t = s.findIndex((p) => p && p.gateway && p.gateway === "Kbank");
|
|
1135
|
+
if (t === -1)
|
|
961
1136
|
return m();
|
|
962
|
-
|
|
963
|
-
const
|
|
964
|
-
|
|
965
|
-
receiptName:
|
|
966
|
-
cardTypes: ((i =
|
|
1137
|
+
l.value = t;
|
|
1138
|
+
const n = s.at(t);
|
|
1139
|
+
n.gateway === "Kbank" && n.config && (e.value = {
|
|
1140
|
+
receiptName: n.receiptName ?? "",
|
|
1141
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
967
1142
|
});
|
|
968
1143
|
};
|
|
969
|
-
|
|
970
|
-
async function
|
|
971
|
-
var
|
|
972
|
-
(
|
|
1144
|
+
P(a, c), q(c);
|
|
1145
|
+
async function y(s) {
|
|
1146
|
+
var t;
|
|
1147
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
973
1148
|
}
|
|
974
|
-
async function
|
|
1149
|
+
async function u() {
|
|
975
1150
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
976
1151
|
}
|
|
977
|
-
return (
|
|
978
|
-
const
|
|
979
|
-
return
|
|
1152
|
+
return (s, t) => {
|
|
1153
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
1154
|
+
return f(), F(x, {
|
|
980
1155
|
ref: T.value,
|
|
981
1156
|
class: "flex flex-col gap-16 w-[500px]",
|
|
982
|
-
onValidationSuccess:
|
|
1157
|
+
onValidationSuccess: t[2] || (t[2] = () => {
|
|
983
1158
|
var o, w;
|
|
984
|
-
|
|
1159
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
985
1160
|
gateway: "Kbank",
|
|
986
1161
|
config: {},
|
|
987
1162
|
receiptName: e.value.receiptName,
|
|
988
1163
|
dialogConfig: {
|
|
989
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
1164
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
990
1165
|
cardTypes: e.value.cardTypes
|
|
991
1166
|
}
|
|
992
1167
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -996,45 +1171,45 @@ const le = /* @__PURE__ */ C({
|
|
|
996
1171
|
dialogConfig: {
|
|
997
1172
|
cardTypes: e.value.cardTypes
|
|
998
1173
|
}
|
|
999
|
-
})),
|
|
1174
|
+
})), d.onUpdate(a.value);
|
|
1000
1175
|
})
|
|
1001
1176
|
}, {
|
|
1002
|
-
default:
|
|
1003
|
-
v(
|
|
1177
|
+
default: O(() => [
|
|
1178
|
+
v(n, {
|
|
1004
1179
|
modelValue: e.value.receiptName,
|
|
1005
|
-
"onUpdate:modelValue":
|
|
1180
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1006
1181
|
label: "Receipt Payment Name",
|
|
1007
1182
|
"label-info": "Default receipt display will be 'TERMINAL_KBANK'"
|
|
1008
1183
|
}, null, 8, ["modelValue"]),
|
|
1009
|
-
|
|
1010
|
-
v(
|
|
1184
|
+
I("div", aa, [
|
|
1185
|
+
v(n, {
|
|
1011
1186
|
modelValue: r.value,
|
|
1012
|
-
"onUpdate:modelValue":
|
|
1187
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1013
1188
|
label: "Fallback Card Types",
|
|
1014
1189
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1015
1190
|
}, null, 8, ["modelValue"]),
|
|
1016
1191
|
v(i, {
|
|
1017
1192
|
class: "ml-4",
|
|
1018
1193
|
icon: "add",
|
|
1019
|
-
onClick:
|
|
1194
|
+
onClick: u
|
|
1020
1195
|
})
|
|
1021
1196
|
]),
|
|
1022
|
-
|
|
1023
|
-
(
|
|
1197
|
+
I("div", ta, [
|
|
1198
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
1024
1199
|
key: o,
|
|
1025
1200
|
label: o,
|
|
1026
1201
|
removable: !0,
|
|
1027
1202
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1028
1203
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1029
1204
|
]),
|
|
1030
|
-
|
|
1031
|
-
|
|
1205
|
+
I("div", la, [
|
|
1206
|
+
l.value > -1 ? (f(), F(i, {
|
|
1032
1207
|
key: 0,
|
|
1033
1208
|
class: "flex-1",
|
|
1034
1209
|
variant: "secondary",
|
|
1035
1210
|
label: "Delete",
|
|
1036
|
-
onclick: () =>
|
|
1037
|
-
}, null, 8, ["onclick"])) :
|
|
1211
|
+
onclick: () => y(l.value)
|
|
1212
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
1038
1213
|
v(i, {
|
|
1039
1214
|
type: "submit",
|
|
1040
1215
|
class: "flex-1",
|
|
@@ -1047,7 +1222,7 @@ const le = /* @__PURE__ */ C({
|
|
|
1047
1222
|
}, 512);
|
|
1048
1223
|
};
|
|
1049
1224
|
}
|
|
1050
|
-
}),
|
|
1225
|
+
}), oa = { class: "flex mt-6 space-x-6" }, ra = /* @__PURE__ */ R({
|
|
1051
1226
|
__name: "Ghl2Gateway",
|
|
1052
1227
|
props: {
|
|
1053
1228
|
terminal: {
|
|
@@ -1059,37 +1234,37 @@ const le = /* @__PURE__ */ C({
|
|
|
1059
1234
|
required: !0
|
|
1060
1235
|
}
|
|
1061
1236
|
},
|
|
1062
|
-
setup(
|
|
1063
|
-
const
|
|
1237
|
+
setup(_) {
|
|
1238
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b({
|
|
1064
1239
|
ip: "",
|
|
1065
1240
|
receiptName: ""
|
|
1066
1241
|
}), e = () => {
|
|
1067
|
-
r.value.ip = "", r.value.receiptName = "",
|
|
1242
|
+
r.value.ip = "", r.value.receiptName = "", l.value = -1;
|
|
1068
1243
|
}, m = () => {
|
|
1069
1244
|
if (!a.value.ecrIntegrations)
|
|
1070
1245
|
return e();
|
|
1071
|
-
const
|
|
1072
|
-
if (
|
|
1246
|
+
const y = a.value.ecrIntegrations, u = y.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
|
|
1247
|
+
if (u === -1)
|
|
1073
1248
|
return e();
|
|
1074
|
-
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1077
|
-
ip:
|
|
1078
|
-
receiptName:
|
|
1249
|
+
l.value = u;
|
|
1250
|
+
const s = y.at(u);
|
|
1251
|
+
s.gateway === "Ghl2" && s.config && (r.value = {
|
|
1252
|
+
ip: s.config.ip ?? "",
|
|
1253
|
+
receiptName: s.receiptName ?? ""
|
|
1079
1254
|
});
|
|
1080
1255
|
};
|
|
1081
|
-
|
|
1082
|
-
async function
|
|
1083
|
-
var
|
|
1084
|
-
(
|
|
1256
|
+
P(a, m), q(m);
|
|
1257
|
+
async function c(y) {
|
|
1258
|
+
var u;
|
|
1259
|
+
(u = a.value.ecrIntegrations) == null || u.splice(y, 1), d.onUpdate(a.value);
|
|
1085
1260
|
}
|
|
1086
|
-
return (
|
|
1087
|
-
const
|
|
1088
|
-
return
|
|
1261
|
+
return (y, u) => {
|
|
1262
|
+
const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
|
|
1263
|
+
return f(), F(n, {
|
|
1089
1264
|
ref: T.value,
|
|
1090
1265
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1091
|
-
onValidationSuccess:
|
|
1092
|
-
a.value.ecrIntegrations || (a.value.ecrIntegrations = []),
|
|
1266
|
+
onValidationSuccess: u[2] || (u[2] = () => {
|
|
1267
|
+
a.value.ecrIntegrations || (a.value.ecrIntegrations = []), l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1093
1268
|
gateway: "Ghl2",
|
|
1094
1269
|
config: { ip: r.value.ip },
|
|
1095
1270
|
receiptName: r.value.receiptName
|
|
@@ -1097,30 +1272,30 @@ const le = /* @__PURE__ */ C({
|
|
|
1097
1272
|
gateway: "Ghl2",
|
|
1098
1273
|
config: { ip: r.value.ip },
|
|
1099
1274
|
receiptName: r.value.receiptName
|
|
1100
|
-
}),
|
|
1275
|
+
}), d.onUpdate(a.value);
|
|
1101
1276
|
})
|
|
1102
1277
|
}, {
|
|
1103
|
-
default:
|
|
1104
|
-
v(
|
|
1278
|
+
default: O(() => [
|
|
1279
|
+
v(s, {
|
|
1105
1280
|
modelValue: r.value.ip,
|
|
1106
|
-
"onUpdate:modelValue":
|
|
1281
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => r.value.ip = i),
|
|
1107
1282
|
label: "IP Address"
|
|
1108
1283
|
}, null, 8, ["modelValue"]),
|
|
1109
|
-
v(
|
|
1284
|
+
v(s, {
|
|
1110
1285
|
modelValue: r.value.receiptName,
|
|
1111
|
-
"onUpdate:modelValue":
|
|
1286
|
+
"onUpdate:modelValue": u[1] || (u[1] = (i) => r.value.receiptName = i),
|
|
1112
1287
|
label: "Receipt Payment Name",
|
|
1113
1288
|
"label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
|
|
1114
1289
|
}, null, 8, ["modelValue"]),
|
|
1115
|
-
|
|
1116
|
-
|
|
1290
|
+
I("div", oa, [
|
|
1291
|
+
l.value > -1 ? (f(), F(t, {
|
|
1117
1292
|
key: 0,
|
|
1118
1293
|
class: "flex-1",
|
|
1119
1294
|
variant: "secondary",
|
|
1120
1295
|
label: "Delete",
|
|
1121
|
-
onclick: () =>
|
|
1122
|
-
}, null, 8, ["onclick"])) :
|
|
1123
|
-
v(
|
|
1296
|
+
onclick: () => c(l.value)
|
|
1297
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
1298
|
+
v(t, {
|
|
1124
1299
|
type: "submit",
|
|
1125
1300
|
class: "flex-1",
|
|
1126
1301
|
variant: "primary",
|
|
@@ -1132,7 +1307,7 @@ const le = /* @__PURE__ */ C({
|
|
|
1132
1307
|
}, 512);
|
|
1133
1308
|
};
|
|
1134
1309
|
}
|
|
1135
|
-
}),
|
|
1310
|
+
}), ia = { class: "flex items-end" }, sa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ua = { class: "flex mt-6 space-x-6" }, ca = /* @__PURE__ */ R({
|
|
1136
1311
|
__name: "Ghl3Gateway",
|
|
1137
1312
|
props: {
|
|
1138
1313
|
terminal: {
|
|
@@ -1144,51 +1319,51 @@ const le = /* @__PURE__ */ C({
|
|
|
1144
1319
|
required: !0
|
|
1145
1320
|
}
|
|
1146
1321
|
},
|
|
1147
|
-
setup(
|
|
1148
|
-
const
|
|
1322
|
+
setup(_) {
|
|
1323
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
1149
1324
|
receiptName: "",
|
|
1150
1325
|
config: {},
|
|
1151
1326
|
cardTypes: []
|
|
1152
1327
|
}), m = () => {
|
|
1153
|
-
e.value.receiptName = "", e.value.cardTypes = [],
|
|
1154
|
-
},
|
|
1328
|
+
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1329
|
+
}, c = () => {
|
|
1155
1330
|
var i;
|
|
1156
1331
|
if (!a.value.ecrIntegrations)
|
|
1157
1332
|
return m();
|
|
1158
|
-
const
|
|
1333
|
+
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1159
1334
|
(p) => p && p.gateway && p.gateway === "Ghl3"
|
|
1160
1335
|
);
|
|
1161
|
-
if (
|
|
1336
|
+
if (t === -1)
|
|
1162
1337
|
return m();
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1166
|
-
config:
|
|
1167
|
-
receiptName:
|
|
1168
|
-
cardTypes: ((i =
|
|
1338
|
+
l.value = t;
|
|
1339
|
+
const n = s.at(t);
|
|
1340
|
+
n.gateway === "Ghl3" && n.config && (e.value = {
|
|
1341
|
+
config: n.config,
|
|
1342
|
+
receiptName: n.receiptName ?? "",
|
|
1343
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1169
1344
|
});
|
|
1170
1345
|
};
|
|
1171
|
-
|
|
1172
|
-
async function
|
|
1173
|
-
var
|
|
1174
|
-
(
|
|
1346
|
+
P(a, c), q(c);
|
|
1347
|
+
async function y(s) {
|
|
1348
|
+
var t;
|
|
1349
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1175
1350
|
}
|
|
1176
|
-
async function
|
|
1351
|
+
async function u() {
|
|
1177
1352
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1178
1353
|
}
|
|
1179
|
-
return (
|
|
1180
|
-
const
|
|
1181
|
-
return
|
|
1354
|
+
return (s, t) => {
|
|
1355
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
1356
|
+
return f(), F(x, {
|
|
1182
1357
|
ref: T.value,
|
|
1183
1358
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1184
|
-
onValidationSuccess:
|
|
1359
|
+
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1185
1360
|
var o, w;
|
|
1186
|
-
|
|
1361
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1187
1362
|
gateway: "Ghl3",
|
|
1188
1363
|
config: e.value.config,
|
|
1189
1364
|
receiptName: e.value.receiptName,
|
|
1190
1365
|
dialogConfig: {
|
|
1191
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
1366
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
1192
1367
|
cardTypes: e.value.cardTypes
|
|
1193
1368
|
}
|
|
1194
1369
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1198,45 +1373,45 @@ const le = /* @__PURE__ */ C({
|
|
|
1198
1373
|
dialogConfig: {
|
|
1199
1374
|
cardTypes: e.value.cardTypes
|
|
1200
1375
|
}
|
|
1201
|
-
})),
|
|
1376
|
+
})), d.onUpdate(a.value);
|
|
1202
1377
|
})
|
|
1203
1378
|
}, {
|
|
1204
|
-
default:
|
|
1205
|
-
v(
|
|
1379
|
+
default: O(() => [
|
|
1380
|
+
v(n, {
|
|
1206
1381
|
modelValue: e.value.receiptName,
|
|
1207
|
-
"onUpdate:modelValue":
|
|
1382
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1208
1383
|
label: "Receipt Payment Name",
|
|
1209
1384
|
"label-info": "Default receipt display will be 'TERMINAL_GHL'"
|
|
1210
1385
|
}, null, 8, ["modelValue"]),
|
|
1211
|
-
|
|
1212
|
-
v(
|
|
1386
|
+
I("div", ia, [
|
|
1387
|
+
v(n, {
|
|
1213
1388
|
modelValue: r.value,
|
|
1214
|
-
"onUpdate:modelValue":
|
|
1389
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1215
1390
|
label: "Fallback Card Types",
|
|
1216
1391
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1217
1392
|
}, null, 8, ["modelValue"]),
|
|
1218
1393
|
v(i, {
|
|
1219
1394
|
class: "ml-4",
|
|
1220
1395
|
icon: "add",
|
|
1221
|
-
onClick:
|
|
1396
|
+
onClick: u
|
|
1222
1397
|
})
|
|
1223
1398
|
]),
|
|
1224
|
-
|
|
1225
|
-
(
|
|
1399
|
+
I("div", sa, [
|
|
1400
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
1226
1401
|
key: o,
|
|
1227
1402
|
label: o,
|
|
1228
1403
|
removable: !0,
|
|
1229
1404
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1230
1405
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1231
1406
|
]),
|
|
1232
|
-
|
|
1233
|
-
|
|
1407
|
+
I("div", ua, [
|
|
1408
|
+
l.value > -1 ? (f(), F(i, {
|
|
1234
1409
|
key: 0,
|
|
1235
1410
|
class: "flex-1",
|
|
1236
1411
|
variant: "secondary",
|
|
1237
1412
|
label: "Delete",
|
|
1238
|
-
onclick: () =>
|
|
1239
|
-
}, null, 8, ["onclick"])) :
|
|
1413
|
+
onclick: () => y(l.value)
|
|
1414
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
1240
1415
|
v(i, {
|
|
1241
1416
|
type: "submit",
|
|
1242
1417
|
class: "flex-1",
|
|
@@ -1249,7 +1424,7 @@ const le = /* @__PURE__ */ C({
|
|
|
1249
1424
|
}, 512);
|
|
1250
1425
|
};
|
|
1251
1426
|
}
|
|
1252
|
-
}),
|
|
1427
|
+
}), da = { class: "flex items-end" }, pa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ma = { class: "flex mt-6 space-x-6" }, va = /* @__PURE__ */ R({
|
|
1253
1428
|
__name: "HlbbGateway",
|
|
1254
1429
|
props: {
|
|
1255
1430
|
terminal: {
|
|
@@ -1261,51 +1436,51 @@ const le = /* @__PURE__ */ C({
|
|
|
1261
1436
|
required: !0
|
|
1262
1437
|
}
|
|
1263
1438
|
},
|
|
1264
|
-
setup(
|
|
1265
|
-
const
|
|
1439
|
+
setup(_) {
|
|
1440
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
1266
1441
|
receiptName: "",
|
|
1267
1442
|
config: {},
|
|
1268
1443
|
cardTypes: []
|
|
1269
1444
|
}), m = () => {
|
|
1270
|
-
e.value.receiptName = "", e.value.cardTypes = [],
|
|
1271
|
-
},
|
|
1445
|
+
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1446
|
+
}, c = () => {
|
|
1272
1447
|
var i;
|
|
1273
1448
|
if (!a.value.ecrIntegrations)
|
|
1274
1449
|
return m();
|
|
1275
|
-
const
|
|
1450
|
+
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1276
1451
|
(p) => p && p.gateway && p.gateway === "Hlbb"
|
|
1277
1452
|
);
|
|
1278
|
-
if (
|
|
1453
|
+
if (t === -1)
|
|
1279
1454
|
return m();
|
|
1280
|
-
|
|
1281
|
-
const
|
|
1282
|
-
|
|
1283
|
-
config:
|
|
1284
|
-
receiptName:
|
|
1285
|
-
cardTypes: ((i =
|
|
1455
|
+
l.value = t;
|
|
1456
|
+
const n = s.at(t);
|
|
1457
|
+
n.gateway === "Hlbb" && n.config && (e.value = {
|
|
1458
|
+
config: n.config,
|
|
1459
|
+
receiptName: n.receiptName ?? "",
|
|
1460
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1286
1461
|
});
|
|
1287
1462
|
};
|
|
1288
|
-
|
|
1289
|
-
async function
|
|
1290
|
-
var
|
|
1291
|
-
(
|
|
1463
|
+
P(a, c), q(c);
|
|
1464
|
+
async function y(s) {
|
|
1465
|
+
var t;
|
|
1466
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1292
1467
|
}
|
|
1293
|
-
async function
|
|
1468
|
+
async function u() {
|
|
1294
1469
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1295
1470
|
}
|
|
1296
|
-
return (
|
|
1297
|
-
const
|
|
1298
|
-
return
|
|
1471
|
+
return (s, t) => {
|
|
1472
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
1473
|
+
return f(), F(x, {
|
|
1299
1474
|
ref: T.value,
|
|
1300
1475
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1301
|
-
onValidationSuccess:
|
|
1476
|
+
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1302
1477
|
var o, w;
|
|
1303
|
-
|
|
1478
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1304
1479
|
gateway: "Hlbb",
|
|
1305
1480
|
config: e.value.config,
|
|
1306
1481
|
receiptName: e.value.receiptName,
|
|
1307
1482
|
dialogConfig: {
|
|
1308
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
1483
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
1309
1484
|
cardTypes: e.value.cardTypes
|
|
1310
1485
|
}
|
|
1311
1486
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1315,45 +1490,45 @@ const le = /* @__PURE__ */ C({
|
|
|
1315
1490
|
dialogConfig: {
|
|
1316
1491
|
cardTypes: e.value.cardTypes
|
|
1317
1492
|
}
|
|
1318
|
-
})),
|
|
1493
|
+
})), d.onUpdate(a.value);
|
|
1319
1494
|
})
|
|
1320
1495
|
}, {
|
|
1321
|
-
default:
|
|
1322
|
-
v(
|
|
1496
|
+
default: O(() => [
|
|
1497
|
+
v(n, {
|
|
1323
1498
|
modelValue: e.value.receiptName,
|
|
1324
|
-
"onUpdate:modelValue":
|
|
1499
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1325
1500
|
label: "Receipt Payment Name",
|
|
1326
1501
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
1327
1502
|
}, null, 8, ["modelValue"]),
|
|
1328
|
-
|
|
1329
|
-
v(
|
|
1503
|
+
I("div", da, [
|
|
1504
|
+
v(n, {
|
|
1330
1505
|
modelValue: r.value,
|
|
1331
|
-
"onUpdate:modelValue":
|
|
1506
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1332
1507
|
label: "Fallback Card Types",
|
|
1333
1508
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1334
1509
|
}, null, 8, ["modelValue"]),
|
|
1335
1510
|
v(i, {
|
|
1336
1511
|
class: "ml-4",
|
|
1337
1512
|
icon: "add",
|
|
1338
|
-
onClick:
|
|
1513
|
+
onClick: u
|
|
1339
1514
|
})
|
|
1340
1515
|
]),
|
|
1341
|
-
|
|
1342
|
-
(
|
|
1516
|
+
I("div", pa, [
|
|
1517
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
1343
1518
|
key: o,
|
|
1344
1519
|
label: o,
|
|
1345
1520
|
removable: !0,
|
|
1346
1521
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1347
1522
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1348
1523
|
]),
|
|
1349
|
-
|
|
1350
|
-
|
|
1524
|
+
I("div", ma, [
|
|
1525
|
+
l.value > -1 ? (f(), F(i, {
|
|
1351
1526
|
key: 0,
|
|
1352
1527
|
class: "flex-1",
|
|
1353
1528
|
variant: "secondary",
|
|
1354
1529
|
label: "Delete",
|
|
1355
|
-
onclick: () =>
|
|
1356
|
-
}, null, 8, ["onclick"])) :
|
|
1530
|
+
onclick: () => y(l.value)
|
|
1531
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
1357
1532
|
v(i, {
|
|
1358
1533
|
type: "submit",
|
|
1359
1534
|
class: "flex-1",
|
|
@@ -1366,7 +1541,7 @@ const le = /* @__PURE__ */ C({
|
|
|
1366
1541
|
}, 512);
|
|
1367
1542
|
};
|
|
1368
1543
|
}
|
|
1369
|
-
}),
|
|
1544
|
+
}), ya = { class: "flex items-end" }, fa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ga = { class: "flex mt-6 space-x-6" }, ba = /* @__PURE__ */ R({
|
|
1370
1545
|
__name: "GlobalPaymentsGateway",
|
|
1371
1546
|
props: {
|
|
1372
1547
|
terminal: {
|
|
@@ -1378,51 +1553,51 @@ const le = /* @__PURE__ */ C({
|
|
|
1378
1553
|
required: !0
|
|
1379
1554
|
}
|
|
1380
1555
|
},
|
|
1381
|
-
setup(
|
|
1382
|
-
const
|
|
1556
|
+
setup(_) {
|
|
1557
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
1383
1558
|
ip: "",
|
|
1384
1559
|
receiptName: "",
|
|
1385
1560
|
cardTypes: []
|
|
1386
1561
|
}), m = () => {
|
|
1387
|
-
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [],
|
|
1388
|
-
},
|
|
1562
|
+
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1563
|
+
}, c = () => {
|
|
1389
1564
|
var i;
|
|
1390
1565
|
if (!a.value.ecrIntegrations)
|
|
1391
1566
|
return m();
|
|
1392
|
-
const
|
|
1567
|
+
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1393
1568
|
(p) => p && p.gateway && p.gateway === "GlobalPayments"
|
|
1394
1569
|
);
|
|
1395
|
-
if (
|
|
1570
|
+
if (t === -1)
|
|
1396
1571
|
return m();
|
|
1397
|
-
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
ip:
|
|
1401
|
-
receiptName:
|
|
1402
|
-
cardTypes: ((i =
|
|
1572
|
+
l.value = t;
|
|
1573
|
+
const n = s.at(t);
|
|
1574
|
+
n.gateway === "GlobalPayments" && n.config && (e.value = {
|
|
1575
|
+
ip: n.config.ip ?? "",
|
|
1576
|
+
receiptName: n.receiptName ?? "",
|
|
1577
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1403
1578
|
});
|
|
1404
1579
|
};
|
|
1405
|
-
|
|
1406
|
-
async function
|
|
1407
|
-
var
|
|
1408
|
-
(
|
|
1580
|
+
P(a, c), q(c);
|
|
1581
|
+
async function y(s) {
|
|
1582
|
+
var t;
|
|
1583
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1409
1584
|
}
|
|
1410
|
-
async function
|
|
1585
|
+
async function u() {
|
|
1411
1586
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1412
1587
|
}
|
|
1413
|
-
return (
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1588
|
+
return (s, t) => {
|
|
1589
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
1590
|
+
return f(), F(x, {
|
|
1416
1591
|
ref: T.value,
|
|
1417
1592
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1418
|
-
onValidationSuccess:
|
|
1593
|
+
onValidationSuccess: t[3] || (t[3] = () => {
|
|
1419
1594
|
var o, w;
|
|
1420
|
-
|
|
1595
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1421
1596
|
gateway: "GlobalPayments",
|
|
1422
1597
|
config: { ip: e.value.ip },
|
|
1423
1598
|
receiptName: e.value.receiptName,
|
|
1424
1599
|
dialogConfig: {
|
|
1425
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
1600
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
1426
1601
|
cardTypes: e.value.cardTypes
|
|
1427
1602
|
}
|
|
1428
1603
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1432,50 +1607,50 @@ const le = /* @__PURE__ */ C({
|
|
|
1432
1607
|
dialogConfig: {
|
|
1433
1608
|
cardTypes: e.value.cardTypes
|
|
1434
1609
|
}
|
|
1435
|
-
})),
|
|
1610
|
+
})), d.onUpdate(a.value);
|
|
1436
1611
|
})
|
|
1437
1612
|
}, {
|
|
1438
|
-
default:
|
|
1439
|
-
v(
|
|
1613
|
+
default: O(() => [
|
|
1614
|
+
v(n, {
|
|
1440
1615
|
modelValue: e.value.ip,
|
|
1441
|
-
"onUpdate:modelValue":
|
|
1616
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
1442
1617
|
label: "IP Address"
|
|
1443
1618
|
}, null, 8, ["modelValue"]),
|
|
1444
|
-
v(
|
|
1619
|
+
v(n, {
|
|
1445
1620
|
modelValue: e.value.receiptName,
|
|
1446
|
-
"onUpdate:modelValue":
|
|
1621
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
1447
1622
|
label: "Receipt Payment Name",
|
|
1448
1623
|
"label-info": "Default receipt display will be 'TERMINAL_GP'"
|
|
1449
1624
|
}, null, 8, ["modelValue"]),
|
|
1450
|
-
|
|
1451
|
-
v(
|
|
1625
|
+
I("div", ya, [
|
|
1626
|
+
v(n, {
|
|
1452
1627
|
modelValue: r.value,
|
|
1453
|
-
"onUpdate:modelValue":
|
|
1628
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
1454
1629
|
label: "Fallback Card Types",
|
|
1455
1630
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1456
1631
|
}, null, 8, ["modelValue"]),
|
|
1457
1632
|
v(i, {
|
|
1458
1633
|
class: "ml-4",
|
|
1459
1634
|
icon: "add",
|
|
1460
|
-
onClick:
|
|
1635
|
+
onClick: u
|
|
1461
1636
|
})
|
|
1462
1637
|
]),
|
|
1463
|
-
|
|
1464
|
-
(
|
|
1638
|
+
I("div", fa, [
|
|
1639
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
1465
1640
|
key: o,
|
|
1466
1641
|
label: o,
|
|
1467
1642
|
removable: !0,
|
|
1468
1643
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1469
1644
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1470
1645
|
]),
|
|
1471
|
-
|
|
1472
|
-
|
|
1646
|
+
I("div", ga, [
|
|
1647
|
+
l.value > -1 ? (f(), F(i, {
|
|
1473
1648
|
key: 0,
|
|
1474
1649
|
class: "flex-1",
|
|
1475
1650
|
variant: "secondary",
|
|
1476
1651
|
label: "Delete",
|
|
1477
|
-
onclick: () =>
|
|
1478
|
-
}, null, 8, ["onclick"])) :
|
|
1652
|
+
onclick: () => y(l.value)
|
|
1653
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
1479
1654
|
v(i, {
|
|
1480
1655
|
type: "submit",
|
|
1481
1656
|
class: "flex-1",
|
|
@@ -1488,7 +1663,7 @@ const le = /* @__PURE__ */ C({
|
|
|
1488
1663
|
}, 512);
|
|
1489
1664
|
};
|
|
1490
1665
|
}
|
|
1491
|
-
}),
|
|
1666
|
+
}), Ta = { class: "flex items-end" }, _a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ia = { class: "flex mt-6 space-x-6" }, Fa = /* @__PURE__ */ R({
|
|
1492
1667
|
__name: "OmaGateway",
|
|
1493
1668
|
props: {
|
|
1494
1669
|
terminal: {
|
|
@@ -1500,49 +1675,49 @@ const le = /* @__PURE__ */ C({
|
|
|
1500
1675
|
required: !0
|
|
1501
1676
|
}
|
|
1502
1677
|
},
|
|
1503
|
-
setup(
|
|
1504
|
-
const
|
|
1678
|
+
setup(_) {
|
|
1679
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b(), e = b({
|
|
1505
1680
|
receiptName: "",
|
|
1506
1681
|
cardTypes: []
|
|
1507
1682
|
}), m = () => {
|
|
1508
|
-
e.value.receiptName = "", e.value.cardTypes = [],
|
|
1509
|
-
},
|
|
1683
|
+
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1684
|
+
}, c = () => {
|
|
1510
1685
|
var i;
|
|
1511
1686
|
if (!a.value.ecrIntegrations)
|
|
1512
1687
|
return m();
|
|
1513
|
-
const
|
|
1688
|
+
const s = a.value.ecrIntegrations, t = s.findIndex(
|
|
1514
1689
|
(p) => p && p.gateway && p.gateway === "Oma"
|
|
1515
1690
|
);
|
|
1516
|
-
if (
|
|
1691
|
+
if (t === -1)
|
|
1517
1692
|
return m();
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1521
|
-
receiptName:
|
|
1522
|
-
cardTypes: ((i =
|
|
1693
|
+
l.value = t;
|
|
1694
|
+
const n = s.at(t);
|
|
1695
|
+
n.gateway === "Oma" && n.config && (e.value = {
|
|
1696
|
+
receiptName: n.receiptName ?? "",
|
|
1697
|
+
cardTypes: ((i = n.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1523
1698
|
});
|
|
1524
1699
|
};
|
|
1525
|
-
|
|
1526
|
-
async function
|
|
1527
|
-
var
|
|
1528
|
-
(
|
|
1700
|
+
P(a, c), q(c);
|
|
1701
|
+
async function y(s) {
|
|
1702
|
+
var t;
|
|
1703
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 1), d.onUpdate(a.value);
|
|
1529
1704
|
}
|
|
1530
|
-
async function
|
|
1705
|
+
async function u() {
|
|
1531
1706
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1532
1707
|
}
|
|
1533
|
-
return (
|
|
1534
|
-
const
|
|
1535
|
-
return
|
|
1708
|
+
return (s, t) => {
|
|
1709
|
+
const n = g("FmTextField"), i = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
1710
|
+
return f(), F(x, {
|
|
1536
1711
|
ref: T.value,
|
|
1537
1712
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1538
|
-
onValidationSuccess:
|
|
1713
|
+
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1539
1714
|
var o, w;
|
|
1540
|
-
|
|
1715
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1541
1716
|
gateway: "Oma",
|
|
1542
1717
|
config: {},
|
|
1543
1718
|
receiptName: e.value.receiptName,
|
|
1544
1719
|
dialogConfig: {
|
|
1545
|
-
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[
|
|
1720
|
+
...(w = (o = a.value.ecrIntegrations) == null ? void 0 : o[l.value]) == null ? void 0 : w.dialogConfig,
|
|
1546
1721
|
cardTypes: e.value.cardTypes
|
|
1547
1722
|
}
|
|
1548
1723
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1552,45 +1727,45 @@ const le = /* @__PURE__ */ C({
|
|
|
1552
1727
|
dialogConfig: {
|
|
1553
1728
|
cardTypes: e.value.cardTypes
|
|
1554
1729
|
}
|
|
1555
|
-
})),
|
|
1730
|
+
})), d.onUpdate(a.value);
|
|
1556
1731
|
})
|
|
1557
1732
|
}, {
|
|
1558
|
-
default:
|
|
1559
|
-
v(
|
|
1733
|
+
default: O(() => [
|
|
1734
|
+
v(n, {
|
|
1560
1735
|
modelValue: e.value.receiptName,
|
|
1561
|
-
"onUpdate:modelValue":
|
|
1736
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1562
1737
|
label: "Receipt Payment Name",
|
|
1563
1738
|
"label-info": "Default receipt display will be 'TERMINAL_OMA'"
|
|
1564
1739
|
}, null, 8, ["modelValue"]),
|
|
1565
|
-
|
|
1566
|
-
v(
|
|
1740
|
+
I("div", Ta, [
|
|
1741
|
+
v(n, {
|
|
1567
1742
|
modelValue: r.value,
|
|
1568
|
-
"onUpdate:modelValue":
|
|
1743
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1569
1744
|
label: "Fallback Card Types",
|
|
1570
1745
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1571
1746
|
}, null, 8, ["modelValue"]),
|
|
1572
1747
|
v(i, {
|
|
1573
1748
|
class: "ml-4",
|
|
1574
1749
|
icon: "add",
|
|
1575
|
-
onClick:
|
|
1750
|
+
onClick: u
|
|
1576
1751
|
})
|
|
1577
1752
|
]),
|
|
1578
|
-
|
|
1579
|
-
(
|
|
1753
|
+
I("div", _a, [
|
|
1754
|
+
(f(!0), M(G, null, Y(e.value.cardTypes, (o) => (f(), F(p, {
|
|
1580
1755
|
key: o,
|
|
1581
1756
|
label: o,
|
|
1582
1757
|
removable: !0,
|
|
1583
1758
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1584
1759
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1585
1760
|
]),
|
|
1586
|
-
|
|
1587
|
-
|
|
1761
|
+
I("div", Ia, [
|
|
1762
|
+
l.value > -1 ? (f(), F(i, {
|
|
1588
1763
|
key: 0,
|
|
1589
1764
|
class: "flex-1",
|
|
1590
1765
|
variant: "secondary",
|
|
1591
1766
|
label: "Delete",
|
|
1592
|
-
onclick: () =>
|
|
1593
|
-
}, null, 8, ["onclick"])) :
|
|
1767
|
+
onclick: () => y(l.value)
|
|
1768
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
1594
1769
|
v(i, {
|
|
1595
1770
|
type: "submit",
|
|
1596
1771
|
class: "flex-1",
|
|
@@ -1603,7 +1778,7 @@ const le = /* @__PURE__ */ C({
|
|
|
1603
1778
|
}, 512);
|
|
1604
1779
|
};
|
|
1605
1780
|
}
|
|
1606
|
-
}),
|
|
1781
|
+
}), wa = { class: "flex items-center" }, xa = { class: "w-[260px] self-start" }, Na = { class: "flex-1" }, ka = /* @__PURE__ */ R({
|
|
1607
1782
|
__name: "EcrGateway",
|
|
1608
1783
|
props: {
|
|
1609
1784
|
terminal: {
|
|
@@ -1615,109 +1790,109 @@ const le = /* @__PURE__ */ C({
|
|
|
1615
1790
|
required: !0
|
|
1616
1791
|
}
|
|
1617
1792
|
},
|
|
1618
|
-
setup(
|
|
1793
|
+
setup(_) {
|
|
1619
1794
|
var m;
|
|
1620
|
-
const
|
|
1795
|
+
const d = _, a = [
|
|
1621
1796
|
{
|
|
1622
1797
|
label: "FeedMe Terminal",
|
|
1623
1798
|
value: "terminal",
|
|
1624
|
-
render:
|
|
1799
|
+
render: qe
|
|
1625
1800
|
},
|
|
1626
1801
|
{
|
|
1627
1802
|
label: "GHL Terminal",
|
|
1628
1803
|
value: "ghl",
|
|
1629
|
-
render:
|
|
1630
|
-
region: [
|
|
1804
|
+
render: Ae,
|
|
1805
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
1631
1806
|
},
|
|
1632
1807
|
{
|
|
1633
1808
|
label: "GHL2 Terminal",
|
|
1634
1809
|
value: "ghl2",
|
|
1635
|
-
render:
|
|
1636
|
-
region: [
|
|
1810
|
+
render: ra,
|
|
1811
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
1637
1812
|
},
|
|
1638
1813
|
{
|
|
1639
1814
|
label: "ITB Maybank Terminal",
|
|
1640
1815
|
value: "mb-itb",
|
|
1641
|
-
render:
|
|
1642
|
-
region: [
|
|
1816
|
+
render: Le,
|
|
1817
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
1643
1818
|
},
|
|
1644
1819
|
{
|
|
1645
1820
|
label: "PMA Maybank Terminal",
|
|
1646
1821
|
value: "mb-pma",
|
|
1647
|
-
render:
|
|
1648
|
-
region: [
|
|
1822
|
+
render: je,
|
|
1823
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
1649
1824
|
},
|
|
1650
1825
|
{
|
|
1651
1826
|
label: "Paysys Maybank Terminal",
|
|
1652
1827
|
value: "mb-paysys",
|
|
1653
|
-
render:
|
|
1654
|
-
region: [
|
|
1828
|
+
render: Je,
|
|
1829
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
1655
1830
|
},
|
|
1656
1831
|
{
|
|
1657
1832
|
label: "Nets Terminal",
|
|
1658
1833
|
value: "nets",
|
|
1659
|
-
render:
|
|
1660
|
-
region: [
|
|
1834
|
+
render: ea,
|
|
1835
|
+
region: [U.F_COUNTRY.enum.SG]
|
|
1661
1836
|
},
|
|
1662
1837
|
{
|
|
1663
1838
|
label: "KBank Terminal",
|
|
1664
1839
|
value: "kbank",
|
|
1665
|
-
render:
|
|
1666
|
-
region: [
|
|
1840
|
+
render: na,
|
|
1841
|
+
region: [U.F_COUNTRY.enum.TH]
|
|
1667
1842
|
},
|
|
1668
1843
|
{
|
|
1669
1844
|
label: "GHL Terminal",
|
|
1670
1845
|
value: "ghl3",
|
|
1671
|
-
render:
|
|
1672
|
-
region: [
|
|
1846
|
+
render: ca,
|
|
1847
|
+
region: [U.F_COUNTRY.enum.TH]
|
|
1673
1848
|
},
|
|
1674
1849
|
{
|
|
1675
1850
|
label: "Paysys HLBB Terminal",
|
|
1676
1851
|
value: "hlbb",
|
|
1677
|
-
render:
|
|
1678
|
-
region: [
|
|
1852
|
+
render: va,
|
|
1853
|
+
region: [U.F_COUNTRY.enum.MY]
|
|
1679
1854
|
},
|
|
1680
1855
|
{
|
|
1681
1856
|
label: "GPAP Terminal",
|
|
1682
1857
|
value: "globalpayments",
|
|
1683
|
-
render:
|
|
1684
|
-
region: [
|
|
1858
|
+
render: ba,
|
|
1859
|
+
region: [U.F_COUNTRY.enum.SG]
|
|
1685
1860
|
},
|
|
1686
1861
|
{
|
|
1687
1862
|
label: "OMA Terminal",
|
|
1688
1863
|
value: "oma",
|
|
1689
|
-
render:
|
|
1690
|
-
region: [
|
|
1864
|
+
render: Fa,
|
|
1865
|
+
region: [U.F_COUNTRY.enum.PK]
|
|
1691
1866
|
}
|
|
1692
|
-
], T =
|
|
1693
|
-
(
|
|
1694
|
-
)), { gatewayTab: e } =
|
|
1867
|
+
], T = C(() => a.find((c) => c.value === e.value)), l = oe().currentCountry, r = C(() => a.filter(
|
|
1868
|
+
(c) => !c.region || c.region.includes(l.value ?? U.F_COUNTRY.enum.MY)
|
|
1869
|
+
)), { gatewayTab: e } = ne({
|
|
1695
1870
|
gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
|
|
1696
1871
|
});
|
|
1697
|
-
return (
|
|
1698
|
-
var
|
|
1699
|
-
const
|
|
1700
|
-
return
|
|
1701
|
-
|
|
1702
|
-
v(
|
|
1872
|
+
return (c, y) => {
|
|
1873
|
+
var s;
|
|
1874
|
+
const u = g("FmTabs");
|
|
1875
|
+
return f(), M("div", wa, [
|
|
1876
|
+
I("div", xa, [
|
|
1877
|
+
v(u, {
|
|
1703
1878
|
"model-value": h(e),
|
|
1704
|
-
"onUpdate:modelValue":
|
|
1879
|
+
"onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
|
|
1705
1880
|
class: "mb-6",
|
|
1706
1881
|
vertical: !0,
|
|
1707
1882
|
items: r.value,
|
|
1708
1883
|
"show-more-at": Number.POSITIVE_INFINITY
|
|
1709
1884
|
}, null, 8, ["model-value", "items", "show-more-at"])
|
|
1710
1885
|
]),
|
|
1711
|
-
|
|
1712
|
-
h(e) ? (
|
|
1713
|
-
terminal:
|
|
1714
|
-
onUpdate:
|
|
1715
|
-
})), null, 16)) :
|
|
1886
|
+
I("div", Na, [
|
|
1887
|
+
h(e) ? (f(), F(ee((s = T.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
|
|
1888
|
+
terminal: d.terminal,
|
|
1889
|
+
onUpdate: d.onUpdate
|
|
1890
|
+
})), null, 16)) : V("", !0)
|
|
1716
1891
|
])
|
|
1717
1892
|
]);
|
|
1718
1893
|
};
|
|
1719
1894
|
}
|
|
1720
|
-
}),
|
|
1895
|
+
}), Ca = { class: "flex mt-6 space-x-6" }, Va = /* @__PURE__ */ R({
|
|
1721
1896
|
__name: "PromptPayGateway",
|
|
1722
1897
|
props: {
|
|
1723
1898
|
terminal: {
|
|
@@ -1729,61 +1904,61 @@ const le = /* @__PURE__ */ C({
|
|
|
1729
1904
|
required: !0
|
|
1730
1905
|
}
|
|
1731
1906
|
},
|
|
1732
|
-
setup(
|
|
1733
|
-
const
|
|
1907
|
+
setup(_) {
|
|
1908
|
+
const d = _, a = A(() => d.terminal), T = b(), l = b(-1), r = b({
|
|
1734
1909
|
account: "",
|
|
1735
1910
|
receiptName: ""
|
|
1736
1911
|
}), e = () => {
|
|
1737
|
-
r.value.account = "", r.value.receiptName = "",
|
|
1912
|
+
r.value.account = "", r.value.receiptName = "", l.value = -1;
|
|
1738
1913
|
}, m = () => {
|
|
1739
1914
|
if (!a.value.qrIntegrations)
|
|
1740
1915
|
return e();
|
|
1741
|
-
const
|
|
1742
|
-
if (
|
|
1916
|
+
const y = a.value.qrIntegrations, u = y.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
|
|
1917
|
+
if (u === -1)
|
|
1743
1918
|
return e();
|
|
1744
|
-
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1747
|
-
account:
|
|
1748
|
-
receiptName:
|
|
1919
|
+
l.value = u;
|
|
1920
|
+
const s = y.at(u);
|
|
1921
|
+
s.gateway === "PROMPTPAY" && s.config && (r.value = {
|
|
1922
|
+
account: s.config.account ?? "",
|
|
1923
|
+
receiptName: s.receiptName ?? ""
|
|
1749
1924
|
});
|
|
1750
1925
|
};
|
|
1751
|
-
|
|
1752
|
-
async function
|
|
1753
|
-
var
|
|
1754
|
-
(
|
|
1926
|
+
P(a, m), q(m);
|
|
1927
|
+
async function c(y) {
|
|
1928
|
+
var u;
|
|
1929
|
+
(u = a.value.qrIntegrations) == null || u.splice(y, 1), d.onUpdate(a.value);
|
|
1755
1930
|
}
|
|
1756
|
-
return (
|
|
1757
|
-
const
|
|
1758
|
-
return
|
|
1931
|
+
return (y, u) => {
|
|
1932
|
+
const s = g("FmTextField"), t = g("FmButton"), n = g("FmForm");
|
|
1933
|
+
return f(), F(n, {
|
|
1759
1934
|
ref: T.value,
|
|
1760
1935
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1761
|
-
onValidationSuccess:
|
|
1762
|
-
|
|
1936
|
+
onValidationSuccess: u[2] || (u[2] = () => {
|
|
1937
|
+
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);
|
|
1763
1938
|
})
|
|
1764
1939
|
}, {
|
|
1765
|
-
default:
|
|
1766
|
-
v(
|
|
1940
|
+
default: O(() => [
|
|
1941
|
+
v(s, {
|
|
1767
1942
|
modelValue: r.value.account,
|
|
1768
|
-
"onUpdate:modelValue":
|
|
1943
|
+
"onUpdate:modelValue": u[0] || (u[0] = (i) => r.value.account = i),
|
|
1769
1944
|
label: "Thai Phone Number / Thai Naitonal ID",
|
|
1770
1945
|
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
1771
1946
|
}, null, 8, ["modelValue"]),
|
|
1772
|
-
v(
|
|
1947
|
+
v(s, {
|
|
1773
1948
|
modelValue: r.value.receiptName,
|
|
1774
|
-
"onUpdate:modelValue":
|
|
1949
|
+
"onUpdate:modelValue": u[1] || (u[1] = (i) => r.value.receiptName = i),
|
|
1775
1950
|
label: "Receipt Payment Name",
|
|
1776
1951
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
1777
1952
|
}, null, 8, ["modelValue"]),
|
|
1778
|
-
|
|
1779
|
-
|
|
1953
|
+
I("div", Ca, [
|
|
1954
|
+
l.value > -1 ? (f(), F(t, {
|
|
1780
1955
|
key: 0,
|
|
1781
1956
|
class: "flex-1",
|
|
1782
1957
|
variant: "secondary",
|
|
1783
1958
|
label: "Delete",
|
|
1784
|
-
onclick: () =>
|
|
1785
|
-
}, null, 8, ["onclick"])) :
|
|
1786
|
-
v(
|
|
1959
|
+
onclick: () => c(l.value)
|
|
1960
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
|
1961
|
+
v(t, {
|
|
1787
1962
|
type: "submit",
|
|
1788
1963
|
class: "flex-1",
|
|
1789
1964
|
variant: "primary",
|
|
@@ -1795,7 +1970,7 @@ const le = /* @__PURE__ */ C({
|
|
|
1795
1970
|
}, 512);
|
|
1796
1971
|
};
|
|
1797
1972
|
}
|
|
1798
|
-
}),
|
|
1973
|
+
}), Sa = { class: "flex items-center" }, Ua = { class: "w-[260px] self-start" }, Ra = { class: "flex-1" }, Ma = /* @__PURE__ */ R({
|
|
1799
1974
|
__name: "QrGateway",
|
|
1800
1975
|
props: {
|
|
1801
1976
|
terminal: {
|
|
@@ -1807,41 +1982,41 @@ const le = /* @__PURE__ */ C({
|
|
|
1807
1982
|
required: !0
|
|
1808
1983
|
}
|
|
1809
1984
|
},
|
|
1810
|
-
setup(
|
|
1985
|
+
setup(_) {
|
|
1811
1986
|
var m;
|
|
1812
|
-
const
|
|
1987
|
+
const d = _, a = [
|
|
1813
1988
|
{
|
|
1814
1989
|
label: "PromptPay",
|
|
1815
1990
|
value: "promptpay",
|
|
1816
|
-
render:
|
|
1817
|
-
region: [
|
|
1991
|
+
render: Va,
|
|
1992
|
+
region: [U.F_COUNTRY.enum.TH]
|
|
1818
1993
|
}
|
|
1819
|
-
], T =
|
|
1994
|
+
], T = C(() => a.find((c) => c.value === e.value)), l = oe().currentCountry, r = C(() => a.filter((c) => !c.region || c.region.includes(l.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = ne({
|
|
1820
1995
|
gatewayTab: (m = r.value[0]) == null ? void 0 : m.value
|
|
1821
1996
|
});
|
|
1822
|
-
return (
|
|
1823
|
-
var
|
|
1824
|
-
const
|
|
1825
|
-
return
|
|
1826
|
-
|
|
1827
|
-
v(
|
|
1997
|
+
return (c, y) => {
|
|
1998
|
+
var s;
|
|
1999
|
+
const u = g("FmTabs");
|
|
2000
|
+
return f(), M("div", Sa, [
|
|
2001
|
+
I("div", Ua, [
|
|
2002
|
+
v(u, {
|
|
1828
2003
|
"model-value": h(e),
|
|
1829
|
-
"onUpdate:modelValue":
|
|
2004
|
+
"onUpdate:modelValue": y[0] || (y[0] = (t) => Z(e) ? e.value = t : null),
|
|
1830
2005
|
class: "mb-6",
|
|
1831
2006
|
vertical: !0,
|
|
1832
2007
|
items: r.value
|
|
1833
2008
|
}, null, 8, ["model-value", "items"])
|
|
1834
2009
|
]),
|
|
1835
|
-
|
|
1836
|
-
h(e) ? (
|
|
1837
|
-
terminal:
|
|
1838
|
-
onUpdate:
|
|
1839
|
-
})), null, 16)) :
|
|
2010
|
+
I("div", Ra, [
|
|
2011
|
+
h(e) ? (f(), F(ee((s = T.value) == null ? void 0 : s.render), ae(te({ key: 0 }, {
|
|
2012
|
+
terminal: d.terminal,
|
|
2013
|
+
onUpdate: d.onUpdate
|
|
2014
|
+
})), null, 16)) : V("", !0)
|
|
1840
2015
|
])
|
|
1841
2016
|
]);
|
|
1842
2017
|
};
|
|
1843
2018
|
}
|
|
1844
|
-
}),
|
|
2019
|
+
}), Ka = /* @__PURE__ */ R({
|
|
1845
2020
|
__name: "TerminalSetting",
|
|
1846
2021
|
props: {
|
|
1847
2022
|
terminalId: {
|
|
@@ -1849,24 +2024,24 @@ const le = /* @__PURE__ */ C({
|
|
|
1849
2024
|
required: !0
|
|
1850
2025
|
}
|
|
1851
2026
|
},
|
|
1852
|
-
setup(
|
|
1853
|
-
const
|
|
2027
|
+
setup(_) {
|
|
2028
|
+
const d = _, { tab: a } = ne({
|
|
1854
2029
|
tab: "information"
|
|
1855
|
-
}), { isLoading: T, startAsyncCall:
|
|
1856
|
-
async function
|
|
1857
|
-
|
|
2030
|
+
}), { isLoading: T, startAsyncCall: l } = le(!0), r = ve(), e = se(), m = b();
|
|
2031
|
+
async function c(n) {
|
|
2032
|
+
l(async () => {
|
|
1858
2033
|
try {
|
|
1859
|
-
await
|
|
1860
|
-
|
|
2034
|
+
await E.updateById(
|
|
2035
|
+
d.terminalId,
|
|
1861
2036
|
{
|
|
1862
|
-
name:
|
|
1863
|
-
status:
|
|
1864
|
-
ecrs:
|
|
1865
|
-
gateways:
|
|
1866
|
-
ecrIntegrations:
|
|
1867
|
-
qrIntegrations:
|
|
2037
|
+
name: n.name,
|
|
2038
|
+
status: n.status,
|
|
2039
|
+
ecrs: n.ecrs ?? [],
|
|
2040
|
+
gateways: n.gateways ?? [],
|
|
2041
|
+
ecrIntegrations: n.ecrIntegrations ?? [],
|
|
2042
|
+
qrIntegrations: n.qrIntegrations ?? []
|
|
1868
2043
|
}
|
|
1869
|
-
), m.value = await
|
|
2044
|
+
), m.value = await E.readById(d.terminalId), e.open({
|
|
1870
2045
|
type: "success",
|
|
1871
2046
|
message: "Terminal updated successfully"
|
|
1872
2047
|
});
|
|
@@ -1874,79 +2049,79 @@ const le = /* @__PURE__ */ C({
|
|
|
1874
2049
|
e.open({
|
|
1875
2050
|
type: "error",
|
|
1876
2051
|
title: "Error occurs when update terminal",
|
|
1877
|
-
message:
|
|
2052
|
+
message: X(i)
|
|
1878
2053
|
});
|
|
1879
2054
|
}
|
|
1880
2055
|
});
|
|
1881
2056
|
}
|
|
1882
|
-
const
|
|
2057
|
+
const y = [
|
|
1883
2058
|
{
|
|
1884
2059
|
label: "Information",
|
|
1885
2060
|
value: "information",
|
|
1886
2061
|
icon: "overview",
|
|
1887
|
-
render:
|
|
2062
|
+
render: Ie
|
|
1888
2063
|
},
|
|
1889
2064
|
{
|
|
1890
2065
|
label: "Setting Request",
|
|
1891
2066
|
value: "settings",
|
|
1892
2067
|
icon: "settings",
|
|
1893
|
-
render:
|
|
2068
|
+
render: Ne,
|
|
1894
2069
|
onlyFor: ["TERMINAL"]
|
|
1895
2070
|
},
|
|
1896
2071
|
{
|
|
1897
2072
|
label: "SoftPos Gateway",
|
|
1898
2073
|
value: "softpos",
|
|
1899
2074
|
icon: "payment",
|
|
1900
|
-
render:
|
|
2075
|
+
render: he
|
|
1901
2076
|
},
|
|
1902
2077
|
{
|
|
1903
2078
|
label: "ECR Gateway",
|
|
1904
2079
|
value: "ecr",
|
|
1905
2080
|
icon: "point_of_sale",
|
|
1906
|
-
render:
|
|
2081
|
+
render: ka,
|
|
1907
2082
|
onlyFor: ["POS", "KIOSK"]
|
|
1908
2083
|
},
|
|
1909
2084
|
{
|
|
1910
2085
|
label: "QR Gateway",
|
|
1911
2086
|
value: "qr",
|
|
1912
2087
|
icon: "qr_code",
|
|
1913
|
-
render:
|
|
2088
|
+
render: Ma,
|
|
1914
2089
|
onlyFor: ["POS", "KIOSK"]
|
|
1915
2090
|
}
|
|
1916
2091
|
];
|
|
1917
|
-
|
|
1918
|
-
const
|
|
1919
|
-
var
|
|
1920
|
-
return (
|
|
2092
|
+
oe().currentCountry;
|
|
2093
|
+
const u = C(() => {
|
|
2094
|
+
var n;
|
|
2095
|
+
return (n = y.find((i) => i.value === a.value)) == null ? void 0 : n.render;
|
|
1921
2096
|
});
|
|
1922
|
-
async function
|
|
1923
|
-
|
|
1924
|
-
m.value = await
|
|
2097
|
+
async function s() {
|
|
2098
|
+
l(async () => {
|
|
2099
|
+
m.value = await E.readById(d.terminalId);
|
|
1925
2100
|
});
|
|
1926
2101
|
}
|
|
1927
|
-
const
|
|
2102
|
+
const t = C(() => y.filter((n) => {
|
|
1928
2103
|
var i;
|
|
1929
|
-
return !
|
|
2104
|
+
return !n.onlyFor || n.onlyFor.includes(((i = m.value) == null ? void 0 : i.deviceType) ?? "");
|
|
1930
2105
|
}));
|
|
1931
|
-
return
|
|
2106
|
+
return q(s), (n, i) => {
|
|
1932
2107
|
var x, o;
|
|
1933
|
-
const p =
|
|
1934
|
-
return
|
|
2108
|
+
const p = g("FmTabs");
|
|
2109
|
+
return f(), F(ye, {
|
|
1935
2110
|
title: `${(x = m.value) == null ? void 0 : x.deviceType} (${(o = m.value) == null ? void 0 : o._id})`,
|
|
1936
2111
|
loading: h(T),
|
|
1937
2112
|
onBack: h(r).back
|
|
1938
2113
|
}, {
|
|
1939
|
-
default:
|
|
2114
|
+
default: O(() => [
|
|
1940
2115
|
v(p, {
|
|
1941
2116
|
"model-value": h(a),
|
|
1942
|
-
"onUpdate:modelValue": i[0] || (i[0] = (w) =>
|
|
2117
|
+
"onUpdate:modelValue": i[0] || (i[0] = (w) => Z(a) ? a.value = w : null),
|
|
1943
2118
|
class: "mb-6",
|
|
1944
|
-
items:
|
|
2119
|
+
items: t.value
|
|
1945
2120
|
}, null, 8, ["model-value", "items"]),
|
|
1946
|
-
h(a) ? (
|
|
2121
|
+
h(a) ? (f(), F(ee(u.value), ae(te({ key: 0 }, {
|
|
1947
2122
|
terminal: m.value,
|
|
1948
|
-
onUpdate:
|
|
1949
|
-
})), null, 16)) :
|
|
2123
|
+
onUpdate: c
|
|
2124
|
+
})), null, 16)) : V("", !0)
|
|
1950
2125
|
]),
|
|
1951
2126
|
_: 1
|
|
1952
2127
|
}, 8, ["title", "loading", "onBack"]);
|
|
@@ -1954,5 +2129,5 @@ const le = /* @__PURE__ */ C({
|
|
|
1954
2129
|
}
|
|
1955
2130
|
});
|
|
1956
2131
|
export {
|
|
1957
|
-
|
|
2132
|
+
Ka as default
|
|
1958
2133
|
};
|