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