@feedmepos/mf-payment 1.4.32 → 1.4.34
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-C3p1aEDL.js → Actions.vue_vue_type_script_setup_true_lang-CuILLIJ8.js} +2 -2
- package/dist/{Chargeback-aEqBy8JJ.js → Chargeback-DZZPmcw2.js} +5 -5
- package/dist/{OnboardForm-cetQwMWi.js → OnboardForm-1NFbYR_G.js} +4 -4
- package/dist/{OnboardForm-C-dEu7Ms.js → OnboardForm-D7YhO1Ws.js} +4 -4
- package/dist/{OnboardSubmission-EZyVJtPs.js → OnboardSubmission-lXiMOlng.js} +5 -5
- package/dist/{OnboardSubmission-BC5MtKtL.js → OnboardSubmission-xPEkh68U.js} +2 -2
- package/dist/{PayoutAccount-C-PdYUyL.js → PayoutAccount-BfmsvetE.js} +5 -5
- package/dist/{PayoutAccount-BDdl8-LY.js → PayoutAccount-C3QAsgyZ.js} +5 -5
- package/dist/{PayoutAccountSetting-DRuXPzN4.js → PayoutAccountSetting-Dj8cIWno.js} +479 -391
- package/dist/{Restaurant-DrRWis75.js → Restaurant-CMjg9X88.js} +4 -4
- package/dist/{RestaurantSetting-DX3raN_M.js → RestaurantSetting-C66kJwFD.js} +3 -3
- package/dist/{Settlement-DbwsZtDs.js → Settlement-BynnBo96.js} +3 -3
- package/dist/{Settlement-CgBI2X3j.js → Settlement-DagQe3ev.js} +3 -3
- package/dist/{SettlementTransactions-tcrBkvDc.js → SettlementTransactions-CIw8y4Q4.js} +4 -4
- package/dist/{SettlementTransactions-C70_fFFA.js → SettlementTransactions-D7TuWbuI.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-uaeTXFw3.js → Status.vue_vue_type_script_setup_true_lang-DIXUpnkm.js} +1 -1
- package/dist/{Terminal-DDFHCeRH.js → Terminal-B6bEPNGC.js} +5 -5
- package/dist/{TerminalSetting-cv-DRAwO.js → TerminalSetting-D1HF1unx.js} +484 -359
- package/dist/{Transaction-Di9pJ5b-.js → Transaction-Bzf6COBo.js} +9 -9
- package/dist/{Transaction-CQg4RUsj.js → Transaction-DxfMMihr.js} +6 -6
- package/dist/{TransactionOld-a67MbfFi.js → TransactionOld-BBB5zibd.js} +6 -6
- package/dist/{app-DtDI_k_I.js → app-C7HXerto.js} +74 -74
- package/dist/app.js +1 -1
- package/dist/{assets-Crv1vHNN.js → assets-D3LUzPyw.js} +1 -1
- package/dist/{grafana-DGF5kjUv.js → grafana-CJp-OsSI.js} +1 -1
- package/dist/{index-Btev-8WJ.js → index-B2colhiY.js} +1 -1
- package/dist/{index-DlKNMBnz.js → index-B8ejEL5n.js} +8579 -8471
- package/dist/{index-X9HLi63I.js → index-BBn7cvxH.js} +1 -1
- package/dist/{index-DbTENTAQ.js → index-BksZxG5X.js} +1 -1
- package/dist/{index-DFjVdPoc.js → index-BqTuPkCO.js} +1 -1
- package/dist/{index-BKME0CUG.js → index-CRxYHQ1I.js} +1 -1
- package/dist/{index-BqXnWkg9.js → index-DDr_-beD.js} +2 -2
- package/dist/{index-UPRcqQ6e.js → index-OH-SVdfb.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Doj7ETw7.js → index.vue_vue_type_script_setup_true_lang-Bb8EC5LM.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-BOk38kSX.js → payout-account-DG61q62p.js} +3 -3
- package/dist/{plugins-DZLiBiv5.js → plugins-laA3NA9a.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +24 -24
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +10 -6
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +11 -7
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +11 -7
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +47 -0
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +9 -5
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +26 -6
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +230 -0
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +24 -4
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +24 -4
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as H, e as
|
|
1
|
+
import { defineComponent as N, openBlock as g, createElementBlock as U, Fragment as G, createElementVNode as F, createTextVNode as $, toDisplayString as A, ref as _, resolveComponent as y, createVNode as v, createCommentVNode as k, unref as S, computed as R, isRef as B, createBlock as w, resolveDynamicComponent as Y, normalizeProps as L, mergeProps as K, toRef as h, watch as O, onMounted as M, withCtx as q, renderList as P } from "vue";
|
|
2
|
+
import { u as H, e as V } from "./index-B8ejEL5n.js";
|
|
3
3
|
import { useRouter as W } from "vue-router";
|
|
4
|
-
import { t as
|
|
4
|
+
import { t as D } from "./index-CRxYHQ1I.js";
|
|
5
5
|
import { _ as X } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
6
|
-
import { u as E } from "./index-
|
|
6
|
+
import { u as E } from "./index-BBn7cvxH.js";
|
|
7
7
|
import { useSnackbar as Q } from "@feedmepos/ui-library";
|
|
8
8
|
import { u as Z } from "./error-K1CakhA9.js";
|
|
9
9
|
import { useCoreStore as j } from "@feedmepos/mf-common";
|
|
10
10
|
import { z as ee, a as ae } from "./validator-D5jtpt9A.js";
|
|
11
|
-
const te = /* @__PURE__ */
|
|
11
|
+
const te = /* @__PURE__ */ N({
|
|
12
12
|
__name: "Information",
|
|
13
13
|
props: {
|
|
14
14
|
terminal: {
|
|
@@ -16,23 +16,23 @@ const te = /* @__PURE__ */ V({
|
|
|
16
16
|
required: !0
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
setup(
|
|
20
|
-
return (d, a) => (g(), U(
|
|
21
|
-
a[0] || (a[0] =
|
|
22
|
-
$(": " + A(
|
|
23
|
-
a[1] || (a[1] =
|
|
24
|
-
a[2] || (a[2] =
|
|
25
|
-
$(": " + A(
|
|
26
|
-
a[3] || (a[3] =
|
|
27
|
-
a[4] || (a[4] =
|
|
28
|
-
$(": " + A(
|
|
29
|
-
a[5] || (a[5] =
|
|
30
|
-
a[6] || (a[6] =
|
|
31
|
-
$(": " + A(
|
|
32
|
-
a[7] || (a[7] =
|
|
19
|
+
setup(I) {
|
|
20
|
+
return (d, a) => (g(), U(G, null, [
|
|
21
|
+
a[0] || (a[0] = F("b", null, "Name", -1)),
|
|
22
|
+
$(": " + A(I.terminal.name), 1),
|
|
23
|
+
a[1] || (a[1] = F("br", null, null, -1)),
|
|
24
|
+
a[2] || (a[2] = F("b", null, "Status", -1)),
|
|
25
|
+
$(": " + A(I.terminal.status), 1),
|
|
26
|
+
a[3] || (a[3] = F("br", null, null, -1)),
|
|
27
|
+
a[4] || (a[4] = F("b", null, "Device ID", -1)),
|
|
28
|
+
$(": " + A(I.terminal.deviceId ?? "-"), 1),
|
|
29
|
+
a[5] || (a[5] = F("br", null, null, -1)),
|
|
30
|
+
a[6] || (a[6] = F("b", null, "Device Type", -1)),
|
|
31
|
+
$(": " + A(I.terminal.deviceType ?? "-"), 1),
|
|
32
|
+
a[7] || (a[7] = F("br", null, null, -1))
|
|
33
33
|
], 64));
|
|
34
34
|
}
|
|
35
|
-
}), le = { key: 0 }, ne = { class: "mt-6 space-x-6" }, oe = /* @__PURE__ */
|
|
35
|
+
}), le = { key: 0 }, ne = { class: "mt-6 space-x-6" }, oe = /* @__PURE__ */ N({
|
|
36
36
|
__name: "KioskMode",
|
|
37
37
|
props: {
|
|
38
38
|
terminal: {
|
|
@@ -40,11 +40,11 @@ const te = /* @__PURE__ */ V({
|
|
|
40
40
|
required: !0
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
setup(
|
|
43
|
+
setup(I) {
|
|
44
44
|
const { isLoading: d, startAsyncCall: a } = H(!1), b = Q(), l = _({
|
|
45
45
|
enable: !1,
|
|
46
46
|
password: []
|
|
47
|
-
}), o =
|
|
47
|
+
}), o = I;
|
|
48
48
|
function e() {
|
|
49
49
|
return l.value.enable && l.value.password.filter((m) => !!m).length !== 6 ? b.open({
|
|
50
50
|
type: "error",
|
|
@@ -54,32 +54,32 @@ const te = /* @__PURE__ */ V({
|
|
|
54
54
|
m.enable && Object.assign(m, {
|
|
55
55
|
password: l.value.password.join("")
|
|
56
56
|
});
|
|
57
|
-
const c = await
|
|
57
|
+
const c = await D.kioskModeRequest(o.terminal._id, m);
|
|
58
58
|
if (c === "OK")
|
|
59
59
|
return b.open({ type: "info", message: "Kiosk mode applied successfully." });
|
|
60
|
-
let
|
|
61
|
-
return c === "client_not_connected" && (
|
|
60
|
+
let f = c;
|
|
61
|
+
return c === "client_not_connected" && (f = "Terminal not connected to the websocket server."), c.startsWith("terminal: ") && (f = c.replaceAll("terminal: ", "")), b.open({
|
|
62
62
|
type: "error",
|
|
63
|
-
message:
|
|
63
|
+
message: f
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
return (m, c) => {
|
|
68
|
-
const
|
|
69
|
-
return g(), U(
|
|
70
|
-
v(
|
|
68
|
+
const f = y("FmSwitch"), s = y("FmPinField"), i = y("FmButton");
|
|
69
|
+
return g(), U(G, null, [
|
|
70
|
+
v(f, {
|
|
71
71
|
modelValue: l.value.enable,
|
|
72
72
|
"onUpdate:modelValue": c[0] || (c[0] = (t) => l.value.enable = t),
|
|
73
73
|
label: "Enable Kiosk Mode?"
|
|
74
74
|
}, null, 8, ["modelValue"]),
|
|
75
75
|
l.value.enable ? (g(), U("div", le, [
|
|
76
|
-
c[2] || (c[2] =
|
|
77
|
-
v(
|
|
76
|
+
c[2] || (c[2] = F("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
|
77
|
+
v(s, {
|
|
78
78
|
modelValue: l.value.password,
|
|
79
79
|
"onUpdate:modelValue": c[1] || (c[1] = (t) => l.value.password = t)
|
|
80
80
|
}, null, 8, ["modelValue"])
|
|
81
|
-
])) :
|
|
82
|
-
|
|
81
|
+
])) : k("", !0),
|
|
82
|
+
F("div", ne, [
|
|
83
83
|
v(i, {
|
|
84
84
|
variant: "primary",
|
|
85
85
|
label: "Send",
|
|
@@ -91,7 +91,7 @@ const te = /* @__PURE__ */ V({
|
|
|
91
91
|
], 64);
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
}), re = /* @__PURE__ */
|
|
94
|
+
}), re = /* @__PURE__ */ N({
|
|
95
95
|
__name: "SettingRequest",
|
|
96
96
|
props: {
|
|
97
97
|
terminal: {
|
|
@@ -99,7 +99,7 @@ const te = /* @__PURE__ */ V({
|
|
|
99
99
|
required: !0
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
|
-
setup(
|
|
102
|
+
setup(I) {
|
|
103
103
|
const { settingTab: d } = E({
|
|
104
104
|
settingTab: "kiosk_mode"
|
|
105
105
|
}), a = [
|
|
@@ -108,29 +108,29 @@ const te = /* @__PURE__ */ V({
|
|
|
108
108
|
value: "kiosk_mode",
|
|
109
109
|
render: oe
|
|
110
110
|
}
|
|
111
|
-
], b =
|
|
111
|
+
], b = I, l = R(() => a.find((o) => o.value === d.value));
|
|
112
112
|
return (o, e) => {
|
|
113
113
|
var c;
|
|
114
114
|
const m = y("FmTabs");
|
|
115
|
-
return g(), U(
|
|
116
|
-
e[1] || (e[1] =
|
|
117
|
-
|
|
115
|
+
return g(), U(G, null, [
|
|
116
|
+
e[1] || (e[1] = F("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
117
|
+
F("b", null, "Note: "),
|
|
118
118
|
$(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
|
119
119
|
], -1)),
|
|
120
120
|
v(m, {
|
|
121
121
|
"model-value": S(d),
|
|
122
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
122
|
+
"onUpdate:modelValue": e[0] || (e[0] = (f) => B(d) ? d.value = f : null),
|
|
123
123
|
class: "mb-6",
|
|
124
124
|
items: a
|
|
125
125
|
}, null, 8, ["model-value"]),
|
|
126
|
-
S(d) ? (g(), w(Y((c = l.value) == null ? void 0 : c.render), K(
|
|
126
|
+
S(d) ? (g(), w(Y((c = l.value) == null ? void 0 : c.render), L(K({ key: 0 }, { terminal: b.terminal })), null, 16)) : k("", !0)
|
|
127
127
|
], 64);
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
}), ie = {
|
|
131
131
|
key: 0,
|
|
132
132
|
class: "text-sm text-gray-500"
|
|
133
|
-
}, ue = { class: "flex mt-6 space-x-6" }, se = /* @__PURE__ */
|
|
133
|
+
}, ue = { class: "flex mt-6 space-x-6" }, se = /* @__PURE__ */ N({
|
|
134
134
|
__name: "SoftposGateway",
|
|
135
135
|
props: {
|
|
136
136
|
terminal: {
|
|
@@ -142,12 +142,12 @@ const te = /* @__PURE__ */ V({
|
|
|
142
142
|
required: !0
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
|
-
setup(
|
|
146
|
-
const d =
|
|
145
|
+
setup(I) {
|
|
146
|
+
const d = I, a = j().currentCountry, b = [
|
|
147
147
|
{
|
|
148
148
|
label: "Fiuu Malaysia",
|
|
149
149
|
value: "cc.feedme.payment.rms",
|
|
150
|
-
region:
|
|
150
|
+
region: V.F_COUNTRY.enum.MY,
|
|
151
151
|
gateway: "Fiuu",
|
|
152
152
|
isLegacy: !0,
|
|
153
153
|
isOutdated: !0
|
|
@@ -155,14 +155,14 @@ const te = /* @__PURE__ */ V({
|
|
|
155
155
|
{
|
|
156
156
|
label: "Fiuu Malaysia V2",
|
|
157
157
|
value: "cc.feedme.payment.fiuu_my",
|
|
158
|
-
region:
|
|
158
|
+
region: V.F_COUNTRY.enum.MY,
|
|
159
159
|
gateway: "Fiuu",
|
|
160
160
|
isLegacy: !0
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
label: "Fiuu Singapore",
|
|
164
164
|
value: "cc.feedme.payment.fiuu_sg",
|
|
165
|
-
region:
|
|
165
|
+
region: V.F_COUNTRY.enum.SG,
|
|
166
166
|
gateway: "Fiuu",
|
|
167
167
|
isLegacy: !0
|
|
168
168
|
},
|
|
@@ -170,15 +170,15 @@ const te = /* @__PURE__ */ V({
|
|
|
170
170
|
label: "Softspace Malaysia",
|
|
171
171
|
value: "cc.feedme.payment.softspace_my",
|
|
172
172
|
gateway: "Softspace",
|
|
173
|
-
region:
|
|
173
|
+
region: V.F_COUNTRY.enum.MY
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
label: "Digio Thailand",
|
|
177
177
|
value: "cc.feedme.payment.digio_th",
|
|
178
178
|
gateway: "Digio",
|
|
179
|
-
region:
|
|
179
|
+
region: V.F_COUNTRY.enum.TH
|
|
180
180
|
}
|
|
181
|
-
], l =
|
|
181
|
+
], l = h(() => d.terminal), o = _(), e = _({
|
|
182
182
|
packageId: "",
|
|
183
183
|
uniqueId: "",
|
|
184
184
|
developerId: "",
|
|
@@ -212,27 +212,27 @@ const te = /* @__PURE__ */ V({
|
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
|
-
|
|
216
|
-
async function
|
|
215
|
+
O(l, c), M(c);
|
|
216
|
+
async function f(t) {
|
|
217
217
|
var n;
|
|
218
218
|
(n = l.value.gateways) == null || n.splice(t, 1), d.onUpdate(l.value);
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const s = R(() => b.filter((t) => t.region === a.value)), i = R(() => s.value.find((t) => t.value === e.value.packageId));
|
|
221
221
|
return (t, n) => {
|
|
222
|
-
const
|
|
222
|
+
const u = y("FmSelect"), p = y("FmTextField"), x = y("FmCheckbox"), r = y("FmButton"), T = y("FmForm");
|
|
223
223
|
return g(), w(T, {
|
|
224
224
|
ref: o.value,
|
|
225
225
|
class: "flex flex-col gap-16 w-[500px]",
|
|
226
226
|
onValidationSuccess: n[5] || (n[5] = () => {
|
|
227
|
-
const
|
|
228
|
-
if (!
|
|
227
|
+
const C = i.value;
|
|
228
|
+
if (!C)
|
|
229
229
|
return;
|
|
230
230
|
let z = e.value.uniqueId;
|
|
231
|
-
|
|
231
|
+
C.isLegacy || (z = JSON.stringify({ uniqueId: e.value.uniqueId, developerId: e.value.developerId, isUat: e.value.isUat }));
|
|
232
232
|
const J = {
|
|
233
|
-
gateway:
|
|
233
|
+
gateway: C.gateway,
|
|
234
234
|
config: {
|
|
235
|
-
packageId:
|
|
235
|
+
packageId: C.value,
|
|
236
236
|
uniqueId: z
|
|
237
237
|
}
|
|
238
238
|
};
|
|
@@ -240,46 +240,46 @@ const te = /* @__PURE__ */ V({
|
|
|
240
240
|
})
|
|
241
241
|
}, {
|
|
242
242
|
default: q(() => [
|
|
243
|
-
v(
|
|
243
|
+
v(u, {
|
|
244
244
|
modelValue: e.value.packageId,
|
|
245
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
245
|
+
"onUpdate:modelValue": n[0] || (n[0] = (C) => e.value.packageId = C),
|
|
246
246
|
label: "Package ID",
|
|
247
|
-
items:
|
|
247
|
+
items: s.value
|
|
248
248
|
}, null, 8, ["modelValue", "items"]),
|
|
249
|
-
i.value && i.value.isLegacy ? (g(), U(
|
|
250
|
-
v(
|
|
249
|
+
i.value && i.value.isLegacy ? (g(), U(G, { key: 0 }, [
|
|
250
|
+
v(p, {
|
|
251
251
|
modelValue: e.value.uniqueId,
|
|
252
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
|
252
|
+
"onUpdate:modelValue": n[1] || (n[1] = (C) => e.value.uniqueId = C),
|
|
253
253
|
label: "Unique ID (TID)"
|
|
254
254
|
}, null, 8, ["modelValue"]),
|
|
255
|
-
i.value.isOutdated ? (g(), U("span", ie, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) :
|
|
256
|
-
], 64)) : (g(), U(
|
|
257
|
-
v(
|
|
255
|
+
i.value.isOutdated ? (g(), U("span", ie, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : k("", !0)
|
|
256
|
+
], 64)) : (g(), U(G, { key: 1 }, [
|
|
257
|
+
v(p, {
|
|
258
258
|
modelValue: e.value.developerId,
|
|
259
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
|
259
|
+
"onUpdate:modelValue": n[2] || (n[2] = (C) => e.value.developerId = C),
|
|
260
260
|
label: "Developer ID (MID)"
|
|
261
261
|
}, null, 8, ["modelValue"]),
|
|
262
|
-
v(
|
|
262
|
+
v(p, {
|
|
263
263
|
modelValue: e.value.uniqueId,
|
|
264
|
-
"onUpdate:modelValue": n[3] || (n[3] = (
|
|
264
|
+
"onUpdate:modelValue": n[3] || (n[3] = (C) => e.value.uniqueId = C),
|
|
265
265
|
label: "Unique ID (TID)"
|
|
266
266
|
}, null, 8, ["modelValue"]),
|
|
267
267
|
v(x, {
|
|
268
268
|
modelValue: e.value.isUat,
|
|
269
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
269
|
+
"onUpdate:modelValue": n[4] || (n[4] = (C) => e.value.isUat = C),
|
|
270
270
|
label: "Is UAT (Test)",
|
|
271
271
|
value: "1"
|
|
272
272
|
}, null, 8, ["modelValue"])
|
|
273
273
|
], 64)),
|
|
274
|
-
|
|
275
|
-
l.value.gateways && l.value.gateways.length > 0 ? (g(), w(
|
|
274
|
+
F("div", ue, [
|
|
275
|
+
l.value.gateways && l.value.gateways.length > 0 ? (g(), w(r, {
|
|
276
276
|
key: 0,
|
|
277
277
|
class: "flex-1",
|
|
278
278
|
variant: "secondary",
|
|
279
279
|
label: "Delete",
|
|
280
|
-
onclick: () =>
|
|
281
|
-
}, null, 8, ["onclick"])) :
|
|
282
|
-
v(
|
|
280
|
+
onclick: () => f(0)
|
|
281
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
282
|
+
v(r, {
|
|
283
283
|
type: "submit",
|
|
284
284
|
class: "flex-1",
|
|
285
285
|
variant: "primary",
|
|
@@ -294,7 +294,7 @@ const te = /* @__PURE__ */ V({
|
|
|
294
294
|
}), ce = {
|
|
295
295
|
key: 0,
|
|
296
296
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
297
|
-
}, de = { class: "flex mt-6 space-x-6" }, me = /* @__PURE__ */
|
|
297
|
+
}, de = { class: "flex mt-6 space-x-6" }, me = /* @__PURE__ */ N({
|
|
298
298
|
__name: "TerminalGateway",
|
|
299
299
|
props: {
|
|
300
300
|
terminal: {
|
|
@@ -306,63 +306,63 @@ const te = /* @__PURE__ */ V({
|
|
|
306
306
|
required: !0
|
|
307
307
|
}
|
|
308
308
|
},
|
|
309
|
-
setup(
|
|
310
|
-
const { isLoading: d, startAsyncCall: a } = H(), b =
|
|
309
|
+
setup(I) {
|
|
310
|
+
const { isLoading: d, startAsyncCall: a } = H(), b = I, l = h(() => b.terminal), o = _(), e = _(), m = _(-1), c = _({
|
|
311
311
|
terminalId: ""
|
|
312
|
-
}),
|
|
312
|
+
}), f = () => {
|
|
313
313
|
c.value.terminalId = "", m.value = -1;
|
|
314
|
-
},
|
|
314
|
+
}, s = () => {
|
|
315
315
|
if (a(async () => {
|
|
316
|
-
o.value = await
|
|
316
|
+
o.value = await D.getRestaurantTerminals(b.terminal.referenceId);
|
|
317
317
|
}), !b.terminal.ecrs)
|
|
318
|
-
return
|
|
319
|
-
const n = b.terminal.ecrs.findIndex((
|
|
318
|
+
return f();
|
|
319
|
+
const n = b.terminal.ecrs.findIndex((p) => p && p.gateway && p.gateway === "FeedMe");
|
|
320
320
|
if (n === -1)
|
|
321
|
-
return
|
|
321
|
+
return f();
|
|
322
322
|
m.value = n;
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
terminalId:
|
|
323
|
+
const u = b.terminal.ecrs.at(n);
|
|
324
|
+
u.gateway === "FeedMe" && u.config && (c.value = {
|
|
325
|
+
terminalId: u.config.terminalId
|
|
326
326
|
});
|
|
327
327
|
};
|
|
328
|
-
|
|
328
|
+
O(l, s), M(s);
|
|
329
329
|
const i = R(() => (o.value ?? []).map((n) => ({
|
|
330
330
|
label: n.name ?? n._id,
|
|
331
331
|
value: n._id
|
|
332
332
|
})));
|
|
333
333
|
async function t(n) {
|
|
334
|
-
var
|
|
335
|
-
(
|
|
334
|
+
var u;
|
|
335
|
+
(u = b.terminal.ecrs) == null || u.splice(n, 1), b.onUpdate(b.terminal);
|
|
336
336
|
}
|
|
337
|
-
return (n,
|
|
338
|
-
const
|
|
337
|
+
return (n, u) => {
|
|
338
|
+
const p = y("FmCircularProgress"), x = y("FmSelect"), r = y("FmButton"), T = y("FmForm");
|
|
339
339
|
return S(d) ? (g(), U("div", ce, [
|
|
340
|
-
v(
|
|
340
|
+
v(p, { size: "xxl" })
|
|
341
341
|
])) : (g(), w(T, {
|
|
342
342
|
key: 1,
|
|
343
343
|
ref: e.value,
|
|
344
344
|
class: "flex flex-col gap-16 w-[500px]",
|
|
345
|
-
onValidationSuccess:
|
|
345
|
+
onValidationSuccess: u[1] || (u[1] = () => {
|
|
346
346
|
m.value > -1 ? l.value.ecrs[m.value] = { gateway: "FeedMe", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: c.value })), b.onUpdate(l.value);
|
|
347
347
|
})
|
|
348
348
|
}, {
|
|
349
349
|
default: q(() => [
|
|
350
350
|
v(x, {
|
|
351
351
|
modelValue: c.value.terminalId,
|
|
352
|
-
"onUpdate:modelValue":
|
|
352
|
+
"onUpdate:modelValue": u[0] || (u[0] = (C) => c.value.terminalId = C),
|
|
353
353
|
label: "Terminal ID",
|
|
354
354
|
items: i.value,
|
|
355
355
|
rules: S(ee)(S(ae).string())
|
|
356
356
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
357
|
-
|
|
358
|
-
m.value > -1 ? (g(), w(
|
|
357
|
+
F("div", de, [
|
|
358
|
+
m.value > -1 ? (g(), w(r, {
|
|
359
359
|
key: 0,
|
|
360
360
|
class: "flex-1",
|
|
361
361
|
variant: "secondary",
|
|
362
362
|
label: "Delete",
|
|
363
363
|
onclick: () => t(m.value)
|
|
364
|
-
}, null, 8, ["onclick"])) :
|
|
365
|
-
v(
|
|
364
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
365
|
+
v(r, {
|
|
366
366
|
type: "submit",
|
|
367
367
|
class: "flex-1",
|
|
368
368
|
variant: "primary",
|
|
@@ -374,7 +374,7 @@ const te = /* @__PURE__ */ V({
|
|
|
374
374
|
}, 512));
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
}), pe = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */
|
|
377
|
+
}), pe = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */ N({
|
|
378
378
|
__name: "GhlGateway",
|
|
379
379
|
props: {
|
|
380
380
|
terminal: {
|
|
@@ -386,8 +386,8 @@ const te = /* @__PURE__ */ V({
|
|
|
386
386
|
required: !0
|
|
387
387
|
}
|
|
388
388
|
},
|
|
389
|
-
setup(
|
|
390
|
-
const d =
|
|
389
|
+
setup(I) {
|
|
390
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _({
|
|
391
391
|
merchantId: "",
|
|
392
392
|
terminalId: "",
|
|
393
393
|
privateKey: ""
|
|
@@ -396,57 +396,57 @@ const te = /* @__PURE__ */ V({
|
|
|
396
396
|
}, m = () => {
|
|
397
397
|
if (!a.value.ecrs)
|
|
398
398
|
return e();
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
399
|
+
const f = a.value.ecrs.findIndex((i) => i && i.gateway && i.gateway === "Ghl");
|
|
400
|
+
if (f === -1)
|
|
401
401
|
return e();
|
|
402
|
-
l.value =
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
merchantId:
|
|
406
|
-
terminalId:
|
|
407
|
-
privateKey:
|
|
402
|
+
l.value = f;
|
|
403
|
+
const s = a.value.ecrs.at(f);
|
|
404
|
+
s.gateway === "Ghl" && s.config && (o.value = {
|
|
405
|
+
merchantId: s.config.merchantId,
|
|
406
|
+
terminalId: s.config.terminalId,
|
|
407
|
+
privateKey: s.config.privateKey || ""
|
|
408
408
|
});
|
|
409
409
|
};
|
|
410
|
-
|
|
411
|
-
async function c(
|
|
412
|
-
var
|
|
413
|
-
(
|
|
410
|
+
O(a, m), M(m);
|
|
411
|
+
async function c(f) {
|
|
412
|
+
var s;
|
|
413
|
+
(s = a.value.ecrs) == null || s.splice(f, 1), d.onUpdate(a.value);
|
|
414
414
|
}
|
|
415
|
-
return (
|
|
416
|
-
const i = y("FmTextField"), t = y("FmTextarea"), n = y("FmButton"),
|
|
417
|
-
return g(), w(
|
|
415
|
+
return (f, s) => {
|
|
416
|
+
const i = y("FmTextField"), t = y("FmTextarea"), n = y("FmButton"), u = y("FmForm");
|
|
417
|
+
return g(), w(u, {
|
|
418
418
|
ref: b.value,
|
|
419
419
|
class: "flex flex-col gap-16 w-[500px]",
|
|
420
|
-
onValidationSuccess:
|
|
420
|
+
onValidationSuccess: s[3] || (s[3] = () => {
|
|
421
421
|
l.value > -1 ? a.value.ecrs[l.value] = { gateway: "Ghl", config: o.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: o.value })), d.onUpdate(a.value);
|
|
422
422
|
})
|
|
423
423
|
}, {
|
|
424
424
|
default: q(() => [
|
|
425
425
|
v(i, {
|
|
426
426
|
modelValue: o.value.merchantId,
|
|
427
|
-
"onUpdate:modelValue":
|
|
427
|
+
"onUpdate:modelValue": s[0] || (s[0] = (p) => o.value.merchantId = p),
|
|
428
428
|
label: "Merchant ID"
|
|
429
429
|
}, null, 8, ["modelValue"]),
|
|
430
430
|
v(i, {
|
|
431
431
|
modelValue: o.value.terminalId,
|
|
432
|
-
"onUpdate:modelValue":
|
|
432
|
+
"onUpdate:modelValue": s[1] || (s[1] = (p) => o.value.terminalId = p),
|
|
433
433
|
label: "Terminal ID"
|
|
434
434
|
}, null, 8, ["modelValue"]),
|
|
435
435
|
v(t, {
|
|
436
436
|
modelValue: o.value.privateKey,
|
|
437
|
-
"onUpdate:modelValue":
|
|
437
|
+
"onUpdate:modelValue": s[2] || (s[2] = (p) => o.value.privateKey = p),
|
|
438
438
|
label: "Private Key",
|
|
439
439
|
"label-mark": "optional",
|
|
440
440
|
"label-info": "Default will use FeedMe Private Key"
|
|
441
441
|
}, null, 8, ["modelValue"]),
|
|
442
|
-
|
|
442
|
+
F("div", pe, [
|
|
443
443
|
l.value > -1 ? (g(), w(n, {
|
|
444
444
|
key: 0,
|
|
445
445
|
class: "flex-1",
|
|
446
446
|
variant: "secondary",
|
|
447
447
|
label: "Delete",
|
|
448
448
|
onclick: () => c(l.value)
|
|
449
|
-
}, null, 8, ["onclick"])) :
|
|
449
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
450
450
|
v(n, {
|
|
451
451
|
type: "submit",
|
|
452
452
|
class: "flex-1",
|
|
@@ -459,7 +459,7 @@ const te = /* @__PURE__ */ V({
|
|
|
459
459
|
}, 512);
|
|
460
460
|
};
|
|
461
461
|
}
|
|
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__ */
|
|
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__ */ N({
|
|
463
463
|
__name: "MaybankGateway",
|
|
464
464
|
props: {
|
|
465
465
|
terminal: {
|
|
@@ -471,18 +471,18 @@ const te = /* @__PURE__ */ V({
|
|
|
471
471
|
required: !0
|
|
472
472
|
}
|
|
473
473
|
},
|
|
474
|
-
setup(
|
|
475
|
-
const d =
|
|
474
|
+
setup(I) {
|
|
475
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _(), e = _({
|
|
476
476
|
ip: "",
|
|
477
477
|
receiptName: "",
|
|
478
478
|
cardTypes: []
|
|
479
479
|
}), m = () => {
|
|
480
480
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
481
481
|
}, c = () => {
|
|
482
|
-
var
|
|
482
|
+
var u;
|
|
483
483
|
if (!a.value.ecrIntegrations)
|
|
484
484
|
return m();
|
|
485
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((
|
|
485
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank");
|
|
486
486
|
if (t === -1)
|
|
487
487
|
return m();
|
|
488
488
|
l.value = t;
|
|
@@ -490,30 +490,30 @@ const te = /* @__PURE__ */ V({
|
|
|
490
490
|
n.gateway === "Maybank" && n.config && (e.value = {
|
|
491
491
|
ip: n.config.ip ?? "",
|
|
492
492
|
receiptName: n.receiptName ?? "",
|
|
493
|
-
cardTypes: ((
|
|
493
|
+
cardTypes: ((u = n.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
494
494
|
});
|
|
495
495
|
};
|
|
496
|
-
|
|
497
|
-
async function
|
|
496
|
+
O(a, c), M(c);
|
|
497
|
+
async function f(i) {
|
|
498
498
|
var t;
|
|
499
499
|
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
|
|
500
500
|
}
|
|
501
|
-
async function
|
|
501
|
+
async function s() {
|
|
502
502
|
e.value.cardTypes.push(o.value), o.value = "";
|
|
503
503
|
}
|
|
504
504
|
return (i, t) => {
|
|
505
|
-
const n = y("FmTextField"),
|
|
505
|
+
const n = y("FmTextField"), u = y("FmButton"), p = y("FmChip"), x = y("FmForm");
|
|
506
506
|
return g(), w(x, {
|
|
507
507
|
ref: b.value,
|
|
508
508
|
class: "flex flex-col gap-16 w-[500px]",
|
|
509
509
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
510
|
-
var
|
|
510
|
+
var r, T;
|
|
511
511
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
512
512
|
gateway: "Maybank",
|
|
513
513
|
config: { ip: e.value.ip },
|
|
514
514
|
receiptName: e.value.receiptName,
|
|
515
515
|
dialogConfig: {
|
|
516
|
-
...(T = (
|
|
516
|
+
...(T = (r = a.value.ecrIntegrations) == null ? void 0 : r[l.value]) == null ? void 0 : T.dialogConfig,
|
|
517
517
|
cardTypes: e.value.cardTypes
|
|
518
518
|
}
|
|
519
519
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -529,45 +529,45 @@ const te = /* @__PURE__ */ V({
|
|
|
529
529
|
default: q(() => [
|
|
530
530
|
v(n, {
|
|
531
531
|
modelValue: e.value.ip,
|
|
532
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
532
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.ip = r),
|
|
533
533
|
label: "IP Address"
|
|
534
534
|
}, null, 8, ["modelValue"]),
|
|
535
535
|
v(n, {
|
|
536
536
|
modelValue: e.value.receiptName,
|
|
537
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
537
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.receiptName = r),
|
|
538
538
|
label: "Receipt Payment Name",
|
|
539
539
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
540
540
|
}, null, 8, ["modelValue"]),
|
|
541
|
-
|
|
541
|
+
F("div", fe, [
|
|
542
542
|
v(n, {
|
|
543
543
|
modelValue: o.value,
|
|
544
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
544
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => o.value = r),
|
|
545
545
|
label: "Fallback Card Types",
|
|
546
546
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
547
547
|
}, null, 8, ["modelValue"]),
|
|
548
|
-
v(
|
|
548
|
+
v(u, {
|
|
549
549
|
class: "ml-4",
|
|
550
550
|
icon: "add",
|
|
551
|
-
onClick:
|
|
551
|
+
onClick: s
|
|
552
552
|
})
|
|
553
553
|
]),
|
|
554
|
-
|
|
555
|
-
(g(!0), U(
|
|
556
|
-
key:
|
|
557
|
-
label:
|
|
554
|
+
F("div", ye, [
|
|
555
|
+
(g(!0), U(G, null, P(e.value.cardTypes, (r) => (g(), w(p, {
|
|
556
|
+
key: r,
|
|
557
|
+
label: r,
|
|
558
558
|
removable: !0,
|
|
559
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
559
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
|
|
560
560
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
561
561
|
]),
|
|
562
|
-
|
|
563
|
-
l.value > -1 ? (g(), w(
|
|
562
|
+
F("div", ge, [
|
|
563
|
+
l.value > -1 ? (g(), w(u, {
|
|
564
564
|
key: 0,
|
|
565
565
|
class: "flex-1",
|
|
566
566
|
variant: "secondary",
|
|
567
567
|
label: "Delete",
|
|
568
|
-
onclick: () =>
|
|
569
|
-
}, null, 8, ["onclick"])) :
|
|
570
|
-
v(
|
|
568
|
+
onclick: () => f(l.value)
|
|
569
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
570
|
+
v(u, {
|
|
571
571
|
type: "submit",
|
|
572
572
|
class: "flex-1",
|
|
573
573
|
variant: "primary",
|
|
@@ -579,7 +579,7 @@ const te = /* @__PURE__ */ V({
|
|
|
579
579
|
}, 512);
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
|
-
}), _e = { class: "flex items-end" },
|
|
582
|
+
}), _e = { class: "flex items-end" }, Fe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ie = { class: "flex mt-6 space-x-6" }, we = /* @__PURE__ */ N({
|
|
583
583
|
__name: "Maybank2Gateway",
|
|
584
584
|
props: {
|
|
585
585
|
terminal: {
|
|
@@ -591,18 +591,18 @@ const te = /* @__PURE__ */ V({
|
|
|
591
591
|
required: !0
|
|
592
592
|
}
|
|
593
593
|
},
|
|
594
|
-
setup(
|
|
595
|
-
const d =
|
|
594
|
+
setup(I) {
|
|
595
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _(), e = _({
|
|
596
596
|
ip: "",
|
|
597
597
|
receiptName: "",
|
|
598
598
|
cardTypes: []
|
|
599
599
|
}), m = () => {
|
|
600
600
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
601
601
|
}, c = () => {
|
|
602
|
-
var
|
|
602
|
+
var u;
|
|
603
603
|
if (!a.value.ecrIntegrations)
|
|
604
604
|
return m();
|
|
605
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((
|
|
605
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
|
|
606
606
|
if (t === -1)
|
|
607
607
|
return m();
|
|
608
608
|
l.value = t;
|
|
@@ -610,30 +610,30 @@ const te = /* @__PURE__ */ V({
|
|
|
610
610
|
n.gateway === "Maybank2" && n.config && (e.value = {
|
|
611
611
|
ip: n.config.ip ?? "",
|
|
612
612
|
receiptName: n.receiptName ?? "",
|
|
613
|
-
cardTypes: ((
|
|
613
|
+
cardTypes: ((u = n.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
614
614
|
});
|
|
615
615
|
};
|
|
616
|
-
|
|
617
|
-
async function
|
|
616
|
+
O(a, c), M(c);
|
|
617
|
+
async function f(i) {
|
|
618
618
|
var t;
|
|
619
619
|
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
|
|
620
620
|
}
|
|
621
|
-
async function
|
|
621
|
+
async function s() {
|
|
622
622
|
e.value.cardTypes.push(o.value), o.value = "";
|
|
623
623
|
}
|
|
624
624
|
return (i, t) => {
|
|
625
|
-
const n = y("FmTextField"),
|
|
625
|
+
const n = y("FmTextField"), u = y("FmButton"), p = y("FmChip"), x = y("FmForm");
|
|
626
626
|
return g(), w(x, {
|
|
627
627
|
ref: b.value,
|
|
628
628
|
class: "flex flex-col gap-16 w-[500px]",
|
|
629
629
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
630
|
-
var
|
|
630
|
+
var r, T;
|
|
631
631
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
632
632
|
gateway: "Maybank2",
|
|
633
633
|
config: { ip: e.value.ip },
|
|
634
634
|
receiptName: e.value.receiptName,
|
|
635
635
|
dialogConfig: {
|
|
636
|
-
...(T = (
|
|
636
|
+
...(T = (r = a.value.ecrIntegrations) == null ? void 0 : r[l.value]) == null ? void 0 : T.dialogConfig,
|
|
637
637
|
cardTypes: e.value.cardTypes
|
|
638
638
|
}
|
|
639
639
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -649,45 +649,45 @@ const te = /* @__PURE__ */ V({
|
|
|
649
649
|
default: q(() => [
|
|
650
650
|
v(n, {
|
|
651
651
|
modelValue: e.value.ip,
|
|
652
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
652
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.ip = r),
|
|
653
653
|
label: "IP Address"
|
|
654
654
|
}, null, 8, ["modelValue"]),
|
|
655
655
|
v(n, {
|
|
656
656
|
modelValue: e.value.receiptName,
|
|
657
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
657
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.receiptName = r),
|
|
658
658
|
label: "Receipt Payment Name",
|
|
659
659
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
660
660
|
}, null, 8, ["modelValue"]),
|
|
661
|
-
|
|
661
|
+
F("div", _e, [
|
|
662
662
|
v(n, {
|
|
663
663
|
modelValue: o.value,
|
|
664
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
664
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => o.value = r),
|
|
665
665
|
label: "Fallback Card Types",
|
|
666
666
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
667
667
|
}, null, 8, ["modelValue"]),
|
|
668
|
-
v(
|
|
668
|
+
v(u, {
|
|
669
669
|
class: "ml-4",
|
|
670
670
|
icon: "add",
|
|
671
|
-
onClick:
|
|
671
|
+
onClick: s
|
|
672
672
|
})
|
|
673
673
|
]),
|
|
674
|
-
|
|
675
|
-
(g(!0), U(
|
|
676
|
-
key:
|
|
677
|
-
label:
|
|
674
|
+
F("div", Fe, [
|
|
675
|
+
(g(!0), U(G, null, P(e.value.cardTypes, (r) => (g(), w(p, {
|
|
676
|
+
key: r,
|
|
677
|
+
label: r,
|
|
678
678
|
removable: !0,
|
|
679
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
679
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
|
|
680
680
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
681
681
|
]),
|
|
682
|
-
|
|
683
|
-
l.value > -1 ? (g(), w(
|
|
682
|
+
F("div", Ie, [
|
|
683
|
+
l.value > -1 ? (g(), w(u, {
|
|
684
684
|
key: 0,
|
|
685
685
|
class: "flex-1",
|
|
686
686
|
variant: "secondary",
|
|
687
687
|
label: "Delete",
|
|
688
|
-
onclick: () =>
|
|
689
|
-
}, null, 8, ["onclick"])) :
|
|
690
|
-
v(
|
|
688
|
+
onclick: () => f(l.value)
|
|
689
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
690
|
+
v(u, {
|
|
691
691
|
type: "submit",
|
|
692
692
|
class: "flex-1",
|
|
693
693
|
variant: "primary",
|
|
@@ -699,7 +699,7 @@ const te = /* @__PURE__ */ V({
|
|
|
699
699
|
}, 512);
|
|
700
700
|
};
|
|
701
701
|
}
|
|
702
|
-
}), Te = { class: "flex items-end" }, xe = { class: "flex flex-wrap gap-8 items-center mt-4" }, ke = { class: "flex mt-6 space-x-6" }, Ne = /* @__PURE__ */
|
|
702
|
+
}), Te = { class: "flex items-end" }, xe = { class: "flex flex-wrap gap-8 items-center mt-4" }, ke = { class: "flex mt-6 space-x-6" }, Ne = /* @__PURE__ */ N({
|
|
703
703
|
__name: "Maybank3Gateway",
|
|
704
704
|
props: {
|
|
705
705
|
terminal: {
|
|
@@ -711,18 +711,18 @@ const te = /* @__PURE__ */ V({
|
|
|
711
711
|
required: !0
|
|
712
712
|
}
|
|
713
713
|
},
|
|
714
|
-
setup(
|
|
715
|
-
const d =
|
|
714
|
+
setup(I) {
|
|
715
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _(), e = _({
|
|
716
716
|
receiptName: "",
|
|
717
717
|
config: {},
|
|
718
718
|
cardTypes: []
|
|
719
719
|
}), m = () => {
|
|
720
720
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
721
721
|
}, c = () => {
|
|
722
|
-
var
|
|
722
|
+
var u;
|
|
723
723
|
if (!a.value.ecrIntegrations)
|
|
724
724
|
return m();
|
|
725
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((
|
|
725
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank3");
|
|
726
726
|
if (t === -1)
|
|
727
727
|
return m();
|
|
728
728
|
l.value = t;
|
|
@@ -730,30 +730,30 @@ const te = /* @__PURE__ */ V({
|
|
|
730
730
|
n.gateway === "Maybank3" && n.config && (e.value = {
|
|
731
731
|
config: n.config,
|
|
732
732
|
receiptName: n.receiptName ?? "",
|
|
733
|
-
cardTypes: ((
|
|
733
|
+
cardTypes: ((u = n.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
734
734
|
});
|
|
735
735
|
};
|
|
736
|
-
|
|
737
|
-
async function
|
|
736
|
+
O(a, c), M(c);
|
|
737
|
+
async function f(i) {
|
|
738
738
|
var t;
|
|
739
739
|
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
|
|
740
740
|
}
|
|
741
|
-
async function
|
|
741
|
+
async function s() {
|
|
742
742
|
e.value.cardTypes.push(o.value), o.value = "";
|
|
743
743
|
}
|
|
744
744
|
return (i, t) => {
|
|
745
|
-
const n = y("FmTextField"),
|
|
745
|
+
const n = y("FmTextField"), u = y("FmButton"), p = y("FmChip"), x = y("FmForm");
|
|
746
746
|
return g(), w(x, {
|
|
747
747
|
ref: b.value,
|
|
748
748
|
class: "flex flex-col gap-16 w-[500px]",
|
|
749
749
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
750
|
-
var
|
|
750
|
+
var r, T;
|
|
751
751
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
752
752
|
gateway: "Maybank3",
|
|
753
753
|
config: e.value.config,
|
|
754
754
|
receiptName: e.value.receiptName,
|
|
755
755
|
dialogConfig: {
|
|
756
|
-
...(T = (
|
|
756
|
+
...(T = (r = a.value.ecrIntegrations) == null ? void 0 : r[l.value]) == null ? void 0 : T.dialogConfig,
|
|
757
757
|
cardTypes: e.value.cardTypes
|
|
758
758
|
}
|
|
759
759
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -769,40 +769,40 @@ const te = /* @__PURE__ */ V({
|
|
|
769
769
|
default: q(() => [
|
|
770
770
|
v(n, {
|
|
771
771
|
modelValue: e.value.receiptName,
|
|
772
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
772
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.receiptName = r),
|
|
773
773
|
label: "Receipt Payment Name",
|
|
774
774
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
775
775
|
}, null, 8, ["modelValue"]),
|
|
776
|
-
|
|
776
|
+
F("div", Te, [
|
|
777
777
|
v(n, {
|
|
778
778
|
modelValue: o.value,
|
|
779
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
779
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => o.value = r),
|
|
780
780
|
label: "Fallback Card Types",
|
|
781
781
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
782
782
|
}, null, 8, ["modelValue"]),
|
|
783
|
-
v(
|
|
783
|
+
v(u, {
|
|
784
784
|
class: "ml-4",
|
|
785
785
|
icon: "add",
|
|
786
|
-
onClick:
|
|
786
|
+
onClick: s
|
|
787
787
|
})
|
|
788
788
|
]),
|
|
789
|
-
|
|
790
|
-
(g(!0), U(
|
|
791
|
-
key:
|
|
792
|
-
label:
|
|
789
|
+
F("div", xe, [
|
|
790
|
+
(g(!0), U(G, null, P(e.value.cardTypes, (r) => (g(), w(p, {
|
|
791
|
+
key: r,
|
|
792
|
+
label: r,
|
|
793
793
|
removable: !0,
|
|
794
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
794
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
|
|
795
795
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
796
796
|
]),
|
|
797
|
-
|
|
798
|
-
l.value > -1 ? (g(), w(
|
|
797
|
+
F("div", ke, [
|
|
798
|
+
l.value > -1 ? (g(), w(u, {
|
|
799
799
|
key: 0,
|
|
800
800
|
class: "flex-1",
|
|
801
801
|
variant: "secondary",
|
|
802
802
|
label: "Delete",
|
|
803
|
-
onclick: () =>
|
|
804
|
-
}, null, 8, ["onclick"])) :
|
|
805
|
-
v(
|
|
803
|
+
onclick: () => f(l.value)
|
|
804
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
805
|
+
v(u, {
|
|
806
806
|
type: "submit",
|
|
807
807
|
class: "flex-1",
|
|
808
808
|
variant: "primary",
|
|
@@ -814,7 +814,7 @@ const te = /* @__PURE__ */ V({
|
|
|
814
814
|
}, 512);
|
|
815
815
|
};
|
|
816
816
|
}
|
|
817
|
-
}),
|
|
817
|
+
}), Ce = { 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__ */ N({
|
|
818
818
|
__name: "NetsGateway",
|
|
819
819
|
props: {
|
|
820
820
|
terminal: {
|
|
@@ -826,18 +826,18 @@ const te = /* @__PURE__ */ V({
|
|
|
826
826
|
required: !0
|
|
827
827
|
}
|
|
828
828
|
},
|
|
829
|
-
setup(
|
|
830
|
-
const d =
|
|
829
|
+
setup(I) {
|
|
830
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _(), e = _({
|
|
831
831
|
ip: "",
|
|
832
832
|
receiptName: "",
|
|
833
833
|
cardTypes: []
|
|
834
834
|
}), m = () => {
|
|
835
835
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
836
836
|
}, c = () => {
|
|
837
|
-
var
|
|
837
|
+
var u;
|
|
838
838
|
if (!a.value.ecrIntegrations)
|
|
839
839
|
return m();
|
|
840
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((
|
|
840
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Nets");
|
|
841
841
|
if (t === -1)
|
|
842
842
|
return m();
|
|
843
843
|
l.value = t;
|
|
@@ -845,30 +845,30 @@ const te = /* @__PURE__ */ V({
|
|
|
845
845
|
n.gateway === "Nets" && n.config && (e.value = {
|
|
846
846
|
ip: n.config.ip ?? "",
|
|
847
847
|
receiptName: n.receiptName ?? "",
|
|
848
|
-
cardTypes: ((
|
|
848
|
+
cardTypes: ((u = n.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
849
849
|
});
|
|
850
850
|
};
|
|
851
|
-
|
|
852
|
-
async function
|
|
851
|
+
O(a, c), M(c);
|
|
852
|
+
async function f(i) {
|
|
853
853
|
var t;
|
|
854
854
|
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
|
|
855
855
|
}
|
|
856
|
-
async function
|
|
856
|
+
async function s() {
|
|
857
857
|
e.value.cardTypes.push(o.value), o.value = "";
|
|
858
858
|
}
|
|
859
859
|
return (i, t) => {
|
|
860
|
-
const n = y("FmTextField"),
|
|
860
|
+
const n = y("FmTextField"), u = y("FmButton"), p = y("FmChip"), x = y("FmForm");
|
|
861
861
|
return g(), w(x, {
|
|
862
862
|
ref: b.value,
|
|
863
863
|
class: "flex flex-col gap-16 w-[500px]",
|
|
864
864
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
865
|
-
var
|
|
865
|
+
var r, T;
|
|
866
866
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
867
867
|
gateway: "Nets",
|
|
868
868
|
config: { ip: e.value.ip },
|
|
869
869
|
receiptName: e.value.receiptName,
|
|
870
870
|
dialogConfig: {
|
|
871
|
-
...(T = (
|
|
871
|
+
...(T = (r = a.value.ecrIntegrations) == null ? void 0 : r[l.value]) == null ? void 0 : T.dialogConfig,
|
|
872
872
|
cardTypes: e.value.cardTypes
|
|
873
873
|
}
|
|
874
874
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -884,45 +884,45 @@ const te = /* @__PURE__ */ V({
|
|
|
884
884
|
default: q(() => [
|
|
885
885
|
v(n, {
|
|
886
886
|
modelValue: e.value.ip,
|
|
887
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
887
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.ip = r),
|
|
888
888
|
label: "IP Address"
|
|
889
889
|
}, null, 8, ["modelValue"]),
|
|
890
890
|
v(n, {
|
|
891
891
|
modelValue: e.value.receiptName,
|
|
892
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
892
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.receiptName = r),
|
|
893
893
|
label: "Receipt Payment Name",
|
|
894
894
|
"label-info": "Default receipt display will be 'TERMINAL_NETS'"
|
|
895
895
|
}, null, 8, ["modelValue"]),
|
|
896
|
-
|
|
896
|
+
F("div", Ce, [
|
|
897
897
|
v(n, {
|
|
898
898
|
modelValue: o.value,
|
|
899
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
899
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => o.value = r),
|
|
900
900
|
label: "Fallback Card Types",
|
|
901
901
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
902
902
|
}, null, 8, ["modelValue"]),
|
|
903
|
-
v(
|
|
903
|
+
v(u, {
|
|
904
904
|
class: "ml-4",
|
|
905
905
|
icon: "add",
|
|
906
|
-
onClick:
|
|
906
|
+
onClick: s
|
|
907
907
|
})
|
|
908
908
|
]),
|
|
909
|
-
|
|
910
|
-
(g(!0), U(
|
|
911
|
-
key:
|
|
912
|
-
label:
|
|
909
|
+
F("div", Ve, [
|
|
910
|
+
(g(!0), U(G, null, P(e.value.cardTypes, (r) => (g(), w(p, {
|
|
911
|
+
key: r,
|
|
912
|
+
label: r,
|
|
913
913
|
removable: !0,
|
|
914
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
914
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
|
|
915
915
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
916
916
|
]),
|
|
917
|
-
|
|
918
|
-
l.value > -1 ? (g(), w(
|
|
917
|
+
F("div", Ue, [
|
|
918
|
+
l.value > -1 ? (g(), w(u, {
|
|
919
919
|
key: 0,
|
|
920
920
|
class: "flex-1",
|
|
921
921
|
variant: "secondary",
|
|
922
922
|
label: "Delete",
|
|
923
|
-
onclick: () =>
|
|
924
|
-
}, null, 8, ["onclick"])) :
|
|
925
|
-
v(
|
|
923
|
+
onclick: () => f(l.value)
|
|
924
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
925
|
+
v(u, {
|
|
926
926
|
type: "submit",
|
|
927
927
|
class: "flex-1",
|
|
928
928
|
variant: "primary",
|
|
@@ -934,7 +934,7 @@ const te = /* @__PURE__ */ V({
|
|
|
934
934
|
}, 512);
|
|
935
935
|
};
|
|
936
936
|
}
|
|
937
|
-
}), Me = { class: "flex items-end" }, qe = { class: "flex flex-wrap gap-8 items-center mt-4" },
|
|
937
|
+
}), Me = { class: "flex items-end" }, qe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ge = { class: "flex mt-6 space-x-6" }, he = /* @__PURE__ */ N({
|
|
938
938
|
__name: "KBankGateway",
|
|
939
939
|
props: {
|
|
940
940
|
terminal: {
|
|
@@ -946,47 +946,47 @@ const te = /* @__PURE__ */ V({
|
|
|
946
946
|
required: !0
|
|
947
947
|
}
|
|
948
948
|
},
|
|
949
|
-
setup(
|
|
950
|
-
const d =
|
|
949
|
+
setup(I) {
|
|
950
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _(), e = _({
|
|
951
951
|
receiptName: "",
|
|
952
952
|
cardTypes: []
|
|
953
953
|
}), m = () => {
|
|
954
954
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
955
955
|
}, c = () => {
|
|
956
|
-
var
|
|
956
|
+
var u;
|
|
957
957
|
if (!a.value.ecrIntegrations)
|
|
958
958
|
return m();
|
|
959
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((
|
|
959
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Kbank");
|
|
960
960
|
if (t === -1)
|
|
961
961
|
return m();
|
|
962
962
|
l.value = t;
|
|
963
963
|
const n = i.at(t);
|
|
964
964
|
n.gateway === "Kbank" && n.config && (e.value = {
|
|
965
965
|
receiptName: n.receiptName ?? "",
|
|
966
|
-
cardTypes: ((
|
|
966
|
+
cardTypes: ((u = n.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
967
967
|
});
|
|
968
968
|
};
|
|
969
|
-
|
|
970
|
-
async function
|
|
969
|
+
O(a, c), M(c);
|
|
970
|
+
async function f(i) {
|
|
971
971
|
var t;
|
|
972
972
|
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
|
|
973
973
|
}
|
|
974
|
-
async function
|
|
974
|
+
async function s() {
|
|
975
975
|
e.value.cardTypes.push(o.value), o.value = "";
|
|
976
976
|
}
|
|
977
977
|
return (i, t) => {
|
|
978
|
-
const n = y("FmTextField"),
|
|
978
|
+
const n = y("FmTextField"), u = y("FmButton"), p = y("FmChip"), x = y("FmForm");
|
|
979
979
|
return g(), w(x, {
|
|
980
980
|
ref: b.value,
|
|
981
981
|
class: "flex flex-col gap-16 w-[500px]",
|
|
982
982
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
983
|
-
var
|
|
983
|
+
var r, T;
|
|
984
984
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
985
985
|
gateway: "Kbank",
|
|
986
986
|
config: {},
|
|
987
987
|
receiptName: e.value.receiptName,
|
|
988
988
|
dialogConfig: {
|
|
989
|
-
...(T = (
|
|
989
|
+
...(T = (r = a.value.ecrIntegrations) == null ? void 0 : r[l.value]) == null ? void 0 : T.dialogConfig,
|
|
990
990
|
cardTypes: e.value.cardTypes
|
|
991
991
|
}
|
|
992
992
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1002,40 +1002,40 @@ const te = /* @__PURE__ */ V({
|
|
|
1002
1002
|
default: q(() => [
|
|
1003
1003
|
v(n, {
|
|
1004
1004
|
modelValue: e.value.receiptName,
|
|
1005
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
1005
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.receiptName = r),
|
|
1006
1006
|
label: "Receipt Payment Name",
|
|
1007
1007
|
"label-info": "Default receipt display will be 'TERMINAL_KBANK'"
|
|
1008
1008
|
}, null, 8, ["modelValue"]),
|
|
1009
|
-
|
|
1009
|
+
F("div", Me, [
|
|
1010
1010
|
v(n, {
|
|
1011
1011
|
modelValue: o.value,
|
|
1012
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
1012
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => o.value = r),
|
|
1013
1013
|
label: "Fallback Card Types",
|
|
1014
1014
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1015
1015
|
}, null, 8, ["modelValue"]),
|
|
1016
|
-
v(
|
|
1016
|
+
v(u, {
|
|
1017
1017
|
class: "ml-4",
|
|
1018
1018
|
icon: "add",
|
|
1019
|
-
onClick:
|
|
1019
|
+
onClick: s
|
|
1020
1020
|
})
|
|
1021
1021
|
]),
|
|
1022
|
-
|
|
1023
|
-
(g(!0), U(
|
|
1024
|
-
key:
|
|
1025
|
-
label:
|
|
1022
|
+
F("div", qe, [
|
|
1023
|
+
(g(!0), U(G, null, P(e.value.cardTypes, (r) => (g(), w(p, {
|
|
1024
|
+
key: r,
|
|
1025
|
+
label: r,
|
|
1026
1026
|
removable: !0,
|
|
1027
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(
|
|
1027
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
|
|
1028
1028
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1029
1029
|
]),
|
|
1030
|
-
|
|
1031
|
-
l.value > -1 ? (g(), w(
|
|
1030
|
+
F("div", Ge, [
|
|
1031
|
+
l.value > -1 ? (g(), w(u, {
|
|
1032
1032
|
key: 0,
|
|
1033
1033
|
class: "flex-1",
|
|
1034
1034
|
variant: "secondary",
|
|
1035
1035
|
label: "Delete",
|
|
1036
|
-
onclick: () =>
|
|
1037
|
-
}, null, 8, ["onclick"])) :
|
|
1038
|
-
v(
|
|
1036
|
+
onclick: () => f(l.value)
|
|
1037
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1038
|
+
v(u, {
|
|
1039
1039
|
type: "submit",
|
|
1040
1040
|
class: "flex-1",
|
|
1041
1041
|
variant: "primary",
|
|
@@ -1047,7 +1047,7 @@ const te = /* @__PURE__ */ V({
|
|
|
1047
1047
|
}, 512);
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
|
-
}),
|
|
1050
|
+
}), Oe = { class: "flex mt-6 space-x-6" }, Re = /* @__PURE__ */ N({
|
|
1051
1051
|
__name: "Ghl2Gateway",
|
|
1052
1052
|
props: {
|
|
1053
1053
|
terminal: {
|
|
@@ -1059,8 +1059,8 @@ const te = /* @__PURE__ */ V({
|
|
|
1059
1059
|
required: !0
|
|
1060
1060
|
}
|
|
1061
1061
|
},
|
|
1062
|
-
setup(
|
|
1063
|
-
const d =
|
|
1062
|
+
setup(I) {
|
|
1063
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _({
|
|
1064
1064
|
ip: "",
|
|
1065
1065
|
receiptName: ""
|
|
1066
1066
|
}), e = () => {
|
|
@@ -1068,27 +1068,27 @@ const te = /* @__PURE__ */ V({
|
|
|
1068
1068
|
}, m = () => {
|
|
1069
1069
|
if (!a.value.ecrIntegrations)
|
|
1070
1070
|
return e();
|
|
1071
|
-
const
|
|
1072
|
-
if (
|
|
1071
|
+
const f = a.value.ecrIntegrations, s = f.findIndex((t) => t && t.gateway && t.gateway === "Ghl2");
|
|
1072
|
+
if (s === -1)
|
|
1073
1073
|
return e();
|
|
1074
|
-
l.value =
|
|
1075
|
-
const i =
|
|
1074
|
+
l.value = s;
|
|
1075
|
+
const i = f.at(s);
|
|
1076
1076
|
i.gateway === "Ghl2" && i.config && (o.value = {
|
|
1077
1077
|
ip: i.config.ip ?? "",
|
|
1078
1078
|
receiptName: i.receiptName ?? ""
|
|
1079
1079
|
});
|
|
1080
1080
|
};
|
|
1081
|
-
|
|
1082
|
-
async function c(
|
|
1083
|
-
var
|
|
1084
|
-
(
|
|
1081
|
+
O(a, m), M(m);
|
|
1082
|
+
async function c(f) {
|
|
1083
|
+
var s;
|
|
1084
|
+
(s = a.value.ecrIntegrations) == null || s.splice(f, 1), d.onUpdate(a.value);
|
|
1085
1085
|
}
|
|
1086
|
-
return (
|
|
1086
|
+
return (f, s) => {
|
|
1087
1087
|
const i = y("FmTextField"), t = y("FmButton"), n = y("FmForm");
|
|
1088
1088
|
return g(), w(n, {
|
|
1089
1089
|
ref: b.value,
|
|
1090
1090
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1091
|
-
onValidationSuccess:
|
|
1091
|
+
onValidationSuccess: s[2] || (s[2] = () => {
|
|
1092
1092
|
a.value.ecrIntegrations || (a.value.ecrIntegrations = []), l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1093
1093
|
gateway: "Ghl2",
|
|
1094
1094
|
config: { ip: o.value.ip },
|
|
@@ -1103,23 +1103,23 @@ const te = /* @__PURE__ */ V({
|
|
|
1103
1103
|
default: q(() => [
|
|
1104
1104
|
v(i, {
|
|
1105
1105
|
modelValue: o.value.ip,
|
|
1106
|
-
"onUpdate:modelValue":
|
|
1106
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => o.value.ip = u),
|
|
1107
1107
|
label: "IP Address"
|
|
1108
1108
|
}, null, 8, ["modelValue"]),
|
|
1109
1109
|
v(i, {
|
|
1110
1110
|
modelValue: o.value.receiptName,
|
|
1111
|
-
"onUpdate:modelValue":
|
|
1111
|
+
"onUpdate:modelValue": s[1] || (s[1] = (u) => o.value.receiptName = u),
|
|
1112
1112
|
label: "Receipt Payment Name",
|
|
1113
1113
|
"label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
|
|
1114
1114
|
}, null, 8, ["modelValue"]),
|
|
1115
|
-
|
|
1115
|
+
F("div", Oe, [
|
|
1116
1116
|
l.value > -1 ? (g(), w(t, {
|
|
1117
1117
|
key: 0,
|
|
1118
1118
|
class: "flex-1",
|
|
1119
1119
|
variant: "secondary",
|
|
1120
1120
|
label: "Delete",
|
|
1121
1121
|
onclick: () => c(l.value)
|
|
1122
|
-
}, null, 8, ["onclick"])) :
|
|
1122
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1123
1123
|
v(t, {
|
|
1124
1124
|
type: "submit",
|
|
1125
1125
|
class: "flex-1",
|
|
@@ -1132,7 +1132,124 @@ const te = /* @__PURE__ */ V({
|
|
|
1132
1132
|
}, 512);
|
|
1133
1133
|
};
|
|
1134
1134
|
}
|
|
1135
|
-
}),
|
|
1135
|
+
}), Pe = { class: "flex items-end" }, $e = { class: "flex flex-wrap gap-8 items-center mt-4" }, De = { class: "flex mt-6 space-x-6" }, Ae = /* @__PURE__ */ N({
|
|
1136
|
+
__name: "Ghl3Gateway",
|
|
1137
|
+
props: {
|
|
1138
|
+
terminal: {
|
|
1139
|
+
type: Object,
|
|
1140
|
+
required: !0
|
|
1141
|
+
},
|
|
1142
|
+
onUpdate: {
|
|
1143
|
+
type: Function,
|
|
1144
|
+
required: !0
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
setup(I) {
|
|
1148
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _(), e = _({
|
|
1149
|
+
receiptName: "",
|
|
1150
|
+
config: {},
|
|
1151
|
+
cardTypes: []
|
|
1152
|
+
}), m = () => {
|
|
1153
|
+
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1154
|
+
}, c = () => {
|
|
1155
|
+
var u;
|
|
1156
|
+
if (!a.value.ecrIntegrations)
|
|
1157
|
+
return m();
|
|
1158
|
+
const i = a.value.ecrIntegrations, t = i.findIndex(
|
|
1159
|
+
(p) => p && p.gateway && p.gateway === "Ghl3"
|
|
1160
|
+
);
|
|
1161
|
+
if (t === -1)
|
|
1162
|
+
return m();
|
|
1163
|
+
l.value = t;
|
|
1164
|
+
const n = i.at(t);
|
|
1165
|
+
n.gateway === "Ghl3" && n.config && (e.value = {
|
|
1166
|
+
config: n.config,
|
|
1167
|
+
receiptName: n.receiptName ?? "",
|
|
1168
|
+
cardTypes: ((u = n.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
1169
|
+
});
|
|
1170
|
+
};
|
|
1171
|
+
O(a, c), M(c);
|
|
1172
|
+
async function f(i) {
|
|
1173
|
+
var t;
|
|
1174
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), d.onUpdate(a.value);
|
|
1175
|
+
}
|
|
1176
|
+
async function s() {
|
|
1177
|
+
e.value.cardTypes.push(o.value), o.value = "";
|
|
1178
|
+
}
|
|
1179
|
+
return (i, t) => {
|
|
1180
|
+
const n = y("FmTextField"), u = y("FmButton"), p = y("FmChip"), x = y("FmForm");
|
|
1181
|
+
return g(), w(x, {
|
|
1182
|
+
ref: b.value,
|
|
1183
|
+
class: "flex flex-col gap-16 w-[500px]",
|
|
1184
|
+
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1185
|
+
var r, T;
|
|
1186
|
+
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1187
|
+
gateway: "Ghl3",
|
|
1188
|
+
config: e.value.config,
|
|
1189
|
+
receiptName: e.value.receiptName,
|
|
1190
|
+
dialogConfig: {
|
|
1191
|
+
...(T = (r = a.value.ecrIntegrations) == null ? void 0 : r[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1192
|
+
cardTypes: e.value.cardTypes
|
|
1193
|
+
}
|
|
1194
|
+
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
1195
|
+
gateway: "Ghl3",
|
|
1196
|
+
config: e.value.config,
|
|
1197
|
+
receiptName: e.value.receiptName,
|
|
1198
|
+
dialogConfig: {
|
|
1199
|
+
cardTypes: e.value.cardTypes
|
|
1200
|
+
}
|
|
1201
|
+
})), d.onUpdate(a.value);
|
|
1202
|
+
})
|
|
1203
|
+
}, {
|
|
1204
|
+
default: q(() => [
|
|
1205
|
+
v(n, {
|
|
1206
|
+
modelValue: e.value.receiptName,
|
|
1207
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.receiptName = r),
|
|
1208
|
+
label: "Receipt Payment Name",
|
|
1209
|
+
"label-info": "Default receipt display will be 'TERMINAL_GHL'"
|
|
1210
|
+
}, null, 8, ["modelValue"]),
|
|
1211
|
+
F("div", Pe, [
|
|
1212
|
+
v(n, {
|
|
1213
|
+
modelValue: o.value,
|
|
1214
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => o.value = r),
|
|
1215
|
+
label: "Fallback Card Types",
|
|
1216
|
+
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1217
|
+
}, null, 8, ["modelValue"]),
|
|
1218
|
+
v(u, {
|
|
1219
|
+
class: "ml-4",
|
|
1220
|
+
icon: "add",
|
|
1221
|
+
onClick: s
|
|
1222
|
+
})
|
|
1223
|
+
]),
|
|
1224
|
+
F("div", $e, [
|
|
1225
|
+
(g(!0), U(G, null, P(e.value.cardTypes, (r) => (g(), w(p, {
|
|
1226
|
+
key: r,
|
|
1227
|
+
label: r,
|
|
1228
|
+
removable: !0,
|
|
1229
|
+
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(r), 1)
|
|
1230
|
+
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1231
|
+
]),
|
|
1232
|
+
F("div", De, [
|
|
1233
|
+
l.value > -1 ? (g(), w(u, {
|
|
1234
|
+
key: 0,
|
|
1235
|
+
class: "flex-1",
|
|
1236
|
+
variant: "secondary",
|
|
1237
|
+
label: "Delete",
|
|
1238
|
+
onclick: () => f(l.value)
|
|
1239
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1240
|
+
v(u, {
|
|
1241
|
+
type: "submit",
|
|
1242
|
+
class: "flex-1",
|
|
1243
|
+
variant: "primary",
|
|
1244
|
+
label: "Save"
|
|
1245
|
+
})
|
|
1246
|
+
])
|
|
1247
|
+
]),
|
|
1248
|
+
_: 1
|
|
1249
|
+
}, 512);
|
|
1250
|
+
};
|
|
1251
|
+
}
|
|
1252
|
+
}), Be = { class: "flex items-center" }, Ye = { class: "w-[260px] self-start" }, Le = { class: "flex-1" }, Ke = /* @__PURE__ */ N({
|
|
1136
1253
|
__name: "EcrGateway",
|
|
1137
1254
|
props: {
|
|
1138
1255
|
terminal: {
|
|
@@ -1144,9 +1261,9 @@ const te = /* @__PURE__ */ V({
|
|
|
1144
1261
|
required: !0
|
|
1145
1262
|
}
|
|
1146
1263
|
},
|
|
1147
|
-
setup(
|
|
1264
|
+
setup(I) {
|
|
1148
1265
|
var m;
|
|
1149
|
-
const d =
|
|
1266
|
+
const d = I, a = [
|
|
1150
1267
|
{
|
|
1151
1268
|
label: "FeedMe Terminal",
|
|
1152
1269
|
value: "terminal",
|
|
@@ -1156,70 +1273,78 @@ const te = /* @__PURE__ */ V({
|
|
|
1156
1273
|
label: "GHL Terminal (V2)",
|
|
1157
1274
|
value: "ghl",
|
|
1158
1275
|
render: ve,
|
|
1159
|
-
region: [
|
|
1276
|
+
region: [V.F_COUNTRY.enum.MY]
|
|
1160
1277
|
},
|
|
1161
1278
|
{
|
|
1162
1279
|
label: "GHL 2 Terminal",
|
|
1163
1280
|
value: "ghl2",
|
|
1164
|
-
render:
|
|
1165
|
-
region: [
|
|
1281
|
+
render: Re,
|
|
1282
|
+
region: [V.F_COUNTRY.enum.MY]
|
|
1166
1283
|
},
|
|
1167
1284
|
{
|
|
1168
1285
|
label: "Maybank Terminal (ITB)",
|
|
1169
1286
|
value: "mb-itb",
|
|
1170
1287
|
render: be,
|
|
1171
|
-
region: [
|
|
1288
|
+
region: [V.F_COUNTRY.enum.MY]
|
|
1172
1289
|
},
|
|
1173
1290
|
{
|
|
1174
1291
|
label: "Maybank Terminal (PMA)",
|
|
1175
1292
|
value: "mb-pma",
|
|
1176
1293
|
render: we,
|
|
1177
|
-
region: [
|
|
1294
|
+
region: [V.F_COUNTRY.enum.MY]
|
|
1178
1295
|
},
|
|
1179
1296
|
{
|
|
1180
1297
|
label: "Maybank Terminal (Paysys)",
|
|
1181
1298
|
value: "mb-paysys",
|
|
1182
1299
|
render: Ne,
|
|
1183
|
-
region: [
|
|
1300
|
+
region: [V.F_COUNTRY.enum.MY]
|
|
1184
1301
|
},
|
|
1185
1302
|
{
|
|
1186
1303
|
label: "Nets Terminal",
|
|
1187
1304
|
value: "nets",
|
|
1188
1305
|
render: Se,
|
|
1189
|
-
region: [
|
|
1306
|
+
region: [V.F_COUNTRY.enum.SG]
|
|
1190
1307
|
},
|
|
1191
1308
|
{
|
|
1192
1309
|
label: "KBank Terminal",
|
|
1193
1310
|
value: "kbank",
|
|
1194
|
-
render:
|
|
1195
|
-
region: [
|
|
1311
|
+
render: he,
|
|
1312
|
+
region: [V.F_COUNTRY.enum.TH]
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
label: "GHL Terminal",
|
|
1316
|
+
value: "ghl3",
|
|
1317
|
+
render: Ae,
|
|
1318
|
+
region: [V.F_COUNTRY.enum.TH]
|
|
1196
1319
|
}
|
|
1197
|
-
], b = R(() => a.find((c) => c.value === e.value)), l = j().currentCountry, o = R(() => a.filter(
|
|
1320
|
+
], b = R(() => a.find((c) => c.value === e.value)), l = j().currentCountry, o = R(() => a.filter(
|
|
1321
|
+
(c) => !c.region || c.region.includes(l.value ?? V.F_COUNTRY.enum.MY)
|
|
1322
|
+
)), { gatewayTab: e } = E({
|
|
1198
1323
|
gatewayTab: (m = o.value[0]) == null ? void 0 : m.value
|
|
1199
1324
|
});
|
|
1200
|
-
return (c,
|
|
1325
|
+
return (c, f) => {
|
|
1201
1326
|
var i;
|
|
1202
|
-
const
|
|
1203
|
-
return g(), U("div",
|
|
1204
|
-
|
|
1205
|
-
v(
|
|
1327
|
+
const s = y("FmTabs");
|
|
1328
|
+
return g(), U("div", Be, [
|
|
1329
|
+
F("div", Ye, [
|
|
1330
|
+
v(s, {
|
|
1206
1331
|
"model-value": S(e),
|
|
1207
|
-
"onUpdate:modelValue":
|
|
1332
|
+
"onUpdate:modelValue": f[0] || (f[0] = (t) => B(e) ? e.value = t : null),
|
|
1208
1333
|
class: "mb-6",
|
|
1209
1334
|
vertical: !0,
|
|
1210
1335
|
items: o.value
|
|
1211
1336
|
}, null, 8, ["model-value", "items"])
|
|
1212
1337
|
]),
|
|
1213
|
-
|
|
1214
|
-
S(e) ? (g(), w(Y((i = b.value) == null ? void 0 : i.render), K(
|
|
1338
|
+
F("div", Le, [
|
|
1339
|
+
S(e) ? (g(), w(Y((i = b.value) == null ? void 0 : i.render), L(K({ key: 0 }, {
|
|
1215
1340
|
terminal: d.terminal,
|
|
1216
1341
|
onUpdate: d.onUpdate
|
|
1217
|
-
})), null, 16)) :
|
|
1342
|
+
})), null, 16)) : k("", !0)
|
|
1218
1343
|
])
|
|
1219
1344
|
]);
|
|
1220
1345
|
};
|
|
1221
1346
|
}
|
|
1222
|
-
}),
|
|
1347
|
+
}), Ee = { class: "flex mt-6 space-x-6" }, je = /* @__PURE__ */ N({
|
|
1223
1348
|
__name: "PromptPayGateway",
|
|
1224
1349
|
props: {
|
|
1225
1350
|
terminal: {
|
|
@@ -1231,8 +1356,8 @@ const te = /* @__PURE__ */ V({
|
|
|
1231
1356
|
required: !0
|
|
1232
1357
|
}
|
|
1233
1358
|
},
|
|
1234
|
-
setup(
|
|
1235
|
-
const d =
|
|
1359
|
+
setup(I) {
|
|
1360
|
+
const d = I, a = h(() => d.terminal), b = _(), l = _(-1), o = _({
|
|
1236
1361
|
account: "",
|
|
1237
1362
|
receiptName: ""
|
|
1238
1363
|
}), e = () => {
|
|
@@ -1240,51 +1365,51 @@ const te = /* @__PURE__ */ V({
|
|
|
1240
1365
|
}, m = () => {
|
|
1241
1366
|
if (!a.value.qrIntegrations)
|
|
1242
1367
|
return e();
|
|
1243
|
-
const
|
|
1244
|
-
if (
|
|
1368
|
+
const f = a.value.qrIntegrations, s = f.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
|
|
1369
|
+
if (s === -1)
|
|
1245
1370
|
return e();
|
|
1246
|
-
l.value =
|
|
1247
|
-
const i =
|
|
1371
|
+
l.value = s;
|
|
1372
|
+
const i = f.at(s);
|
|
1248
1373
|
i.gateway === "PROMPTPAY" && i.config && (o.value = {
|
|
1249
1374
|
account: i.config.account ?? "",
|
|
1250
1375
|
receiptName: i.receiptName ?? ""
|
|
1251
1376
|
});
|
|
1252
1377
|
};
|
|
1253
|
-
|
|
1254
|
-
async function c(
|
|
1255
|
-
var
|
|
1256
|
-
(
|
|
1378
|
+
O(a, m), M(m);
|
|
1379
|
+
async function c(f) {
|
|
1380
|
+
var s;
|
|
1381
|
+
(s = a.value.qrIntegrations) == null || s.splice(f, 1), d.onUpdate(a.value);
|
|
1257
1382
|
}
|
|
1258
|
-
return (
|
|
1383
|
+
return (f, s) => {
|
|
1259
1384
|
const i = y("FmTextField"), t = y("FmButton"), n = y("FmForm");
|
|
1260
1385
|
return g(), w(n, {
|
|
1261
1386
|
ref: b.value,
|
|
1262
1387
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1263
|
-
onValidationSuccess:
|
|
1388
|
+
onValidationSuccess: s[2] || (s[2] = () => {
|
|
1264
1389
|
l.value > -1 ? a.value.qrIntegrations[l.value] = { gateway: "PROMPTPAY", config: { account: o.value.account }, receiptName: o.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: o.value.account }, receiptName: o.value.receiptName })), d.onUpdate(a.value);
|
|
1265
1390
|
})
|
|
1266
1391
|
}, {
|
|
1267
1392
|
default: q(() => [
|
|
1268
1393
|
v(i, {
|
|
1269
1394
|
modelValue: o.value.account,
|
|
1270
|
-
"onUpdate:modelValue":
|
|
1395
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => o.value.account = u),
|
|
1271
1396
|
label: "Thai Phone Number / Thai Naitonal ID",
|
|
1272
1397
|
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
1273
1398
|
}, null, 8, ["modelValue"]),
|
|
1274
1399
|
v(i, {
|
|
1275
1400
|
modelValue: o.value.receiptName,
|
|
1276
|
-
"onUpdate:modelValue":
|
|
1401
|
+
"onUpdate:modelValue": s[1] || (s[1] = (u) => o.value.receiptName = u),
|
|
1277
1402
|
label: "Receipt Payment Name",
|
|
1278
1403
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
1279
1404
|
}, null, 8, ["modelValue"]),
|
|
1280
|
-
|
|
1405
|
+
F("div", Ee, [
|
|
1281
1406
|
l.value > -1 ? (g(), w(t, {
|
|
1282
1407
|
key: 0,
|
|
1283
1408
|
class: "flex-1",
|
|
1284
1409
|
variant: "secondary",
|
|
1285
1410
|
label: "Delete",
|
|
1286
1411
|
onclick: () => c(l.value)
|
|
1287
|
-
}, null, 8, ["onclick"])) :
|
|
1412
|
+
}, null, 8, ["onclick"])) : k("", !0),
|
|
1288
1413
|
v(t, {
|
|
1289
1414
|
type: "submit",
|
|
1290
1415
|
class: "flex-1",
|
|
@@ -1297,7 +1422,7 @@ const te = /* @__PURE__ */ V({
|
|
|
1297
1422
|
}, 512);
|
|
1298
1423
|
};
|
|
1299
1424
|
}
|
|
1300
|
-
}),
|
|
1425
|
+
}), He = { class: "flex items-center" }, ze = { class: "w-[260px] self-start" }, Qe = { class: "flex-1" }, Je = /* @__PURE__ */ N({
|
|
1301
1426
|
__name: "QrGateway",
|
|
1302
1427
|
props: {
|
|
1303
1428
|
terminal: {
|
|
@@ -1309,41 +1434,41 @@ const te = /* @__PURE__ */ V({
|
|
|
1309
1434
|
required: !0
|
|
1310
1435
|
}
|
|
1311
1436
|
},
|
|
1312
|
-
setup(
|
|
1437
|
+
setup(I) {
|
|
1313
1438
|
var m;
|
|
1314
|
-
const d =
|
|
1439
|
+
const d = I, a = [
|
|
1315
1440
|
{
|
|
1316
1441
|
label: "PromptPay",
|
|
1317
1442
|
value: "promptpay",
|
|
1318
|
-
render:
|
|
1319
|
-
region: [
|
|
1443
|
+
render: je,
|
|
1444
|
+
region: [V.F_COUNTRY.enum.TH]
|
|
1320
1445
|
}
|
|
1321
|
-
], b = R(() => a.find((c) => c.value === e.value)), l = j().currentCountry, o = R(() => a.filter((c) => !c.region || c.region.includes(l.value ??
|
|
1446
|
+
], b = R(() => a.find((c) => c.value === e.value)), l = j().currentCountry, o = R(() => a.filter((c) => !c.region || c.region.includes(l.value ?? V.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
|
|
1322
1447
|
gatewayTab: (m = o.value[0]) == null ? void 0 : m.value
|
|
1323
1448
|
});
|
|
1324
|
-
return (c,
|
|
1449
|
+
return (c, f) => {
|
|
1325
1450
|
var i;
|
|
1326
|
-
const
|
|
1327
|
-
return g(), U("div",
|
|
1328
|
-
|
|
1329
|
-
v(
|
|
1451
|
+
const s = y("FmTabs");
|
|
1452
|
+
return g(), U("div", He, [
|
|
1453
|
+
F("div", ze, [
|
|
1454
|
+
v(s, {
|
|
1330
1455
|
"model-value": S(e),
|
|
1331
|
-
"onUpdate:modelValue":
|
|
1456
|
+
"onUpdate:modelValue": f[0] || (f[0] = (t) => B(e) ? e.value = t : null),
|
|
1332
1457
|
class: "mb-6",
|
|
1333
1458
|
vertical: !0,
|
|
1334
1459
|
items: o.value
|
|
1335
1460
|
}, null, 8, ["model-value", "items"])
|
|
1336
1461
|
]),
|
|
1337
|
-
|
|
1338
|
-
S(e) ? (g(), w(Y((i = b.value) == null ? void 0 : i.render), K(
|
|
1462
|
+
F("div", Qe, [
|
|
1463
|
+
S(e) ? (g(), w(Y((i = b.value) == null ? void 0 : i.render), L(K({ key: 0 }, {
|
|
1339
1464
|
terminal: d.terminal,
|
|
1340
1465
|
onUpdate: d.onUpdate
|
|
1341
|
-
})), null, 16)) :
|
|
1466
|
+
})), null, 16)) : k("", !0)
|
|
1342
1467
|
])
|
|
1343
1468
|
]);
|
|
1344
1469
|
};
|
|
1345
1470
|
}
|
|
1346
|
-
}),
|
|
1471
|
+
}), ia = /* @__PURE__ */ N({
|
|
1347
1472
|
__name: "TerminalSetting",
|
|
1348
1473
|
props: {
|
|
1349
1474
|
terminalId: {
|
|
@@ -1351,14 +1476,14 @@ const te = /* @__PURE__ */ V({
|
|
|
1351
1476
|
required: !0
|
|
1352
1477
|
}
|
|
1353
1478
|
},
|
|
1354
|
-
setup(
|
|
1355
|
-
const d =
|
|
1479
|
+
setup(I) {
|
|
1480
|
+
const d = I, { tab: a } = E({
|
|
1356
1481
|
tab: "information"
|
|
1357
1482
|
}), { isLoading: b, startAsyncCall: l } = H(!0), o = W(), e = Q(), m = _();
|
|
1358
1483
|
async function c(n) {
|
|
1359
1484
|
l(async () => {
|
|
1360
1485
|
try {
|
|
1361
|
-
await
|
|
1486
|
+
await D.updateById(
|
|
1362
1487
|
d.terminalId,
|
|
1363
1488
|
{
|
|
1364
1489
|
name: n.name,
|
|
@@ -1368,20 +1493,20 @@ const te = /* @__PURE__ */ V({
|
|
|
1368
1493
|
ecrIntegrations: n.ecrIntegrations ?? [],
|
|
1369
1494
|
qrIntegrations: n.qrIntegrations ?? []
|
|
1370
1495
|
}
|
|
1371
|
-
), m.value = await
|
|
1496
|
+
), m.value = await D.readById(d.terminalId), e.open({
|
|
1372
1497
|
type: "success",
|
|
1373
1498
|
message: "Terminal updated successfully"
|
|
1374
1499
|
});
|
|
1375
|
-
} catch (
|
|
1500
|
+
} catch (u) {
|
|
1376
1501
|
e.open({
|
|
1377
1502
|
type: "error",
|
|
1378
1503
|
title: "Error occurs when update terminal",
|
|
1379
|
-
message: Z(
|
|
1504
|
+
message: Z(u)
|
|
1380
1505
|
});
|
|
1381
1506
|
}
|
|
1382
1507
|
});
|
|
1383
1508
|
}
|
|
1384
|
-
const
|
|
1509
|
+
const f = [
|
|
1385
1510
|
{
|
|
1386
1511
|
label: "Information",
|
|
1387
1512
|
value: "information",
|
|
@@ -1405,50 +1530,50 @@ const te = /* @__PURE__ */ V({
|
|
|
1405
1530
|
label: "ECR Gateway",
|
|
1406
1531
|
value: "ecr",
|
|
1407
1532
|
icon: "point_of_sale",
|
|
1408
|
-
render:
|
|
1533
|
+
render: Ke,
|
|
1409
1534
|
onlyFor: ["POS", "KIOSK"]
|
|
1410
1535
|
},
|
|
1411
1536
|
{
|
|
1412
1537
|
label: "QR Gateway",
|
|
1413
1538
|
value: "qr",
|
|
1414
1539
|
icon: "qr_code",
|
|
1415
|
-
render:
|
|
1540
|
+
render: Je,
|
|
1416
1541
|
onlyFor: ["POS", "KIOSK"]
|
|
1417
1542
|
}
|
|
1418
1543
|
];
|
|
1419
1544
|
j().currentCountry;
|
|
1420
|
-
const
|
|
1545
|
+
const s = R(() => {
|
|
1421
1546
|
var n;
|
|
1422
|
-
return (n =
|
|
1547
|
+
return (n = f.find((u) => u.value === a.value)) == null ? void 0 : n.render;
|
|
1423
1548
|
});
|
|
1424
1549
|
async function i() {
|
|
1425
1550
|
l(async () => {
|
|
1426
|
-
m.value = await
|
|
1551
|
+
m.value = await D.readById(d.terminalId);
|
|
1427
1552
|
});
|
|
1428
1553
|
}
|
|
1429
|
-
const t = R(() =>
|
|
1430
|
-
var
|
|
1431
|
-
return !n.onlyFor || n.onlyFor.includes(((
|
|
1554
|
+
const t = R(() => f.filter((n) => {
|
|
1555
|
+
var u;
|
|
1556
|
+
return !n.onlyFor || n.onlyFor.includes(((u = m.value) == null ? void 0 : u.deviceType) ?? "");
|
|
1432
1557
|
}));
|
|
1433
|
-
return M(i), (n,
|
|
1434
|
-
var x,
|
|
1435
|
-
const
|
|
1558
|
+
return M(i), (n, u) => {
|
|
1559
|
+
var x, r;
|
|
1560
|
+
const p = y("FmTabs");
|
|
1436
1561
|
return g(), w(X, {
|
|
1437
|
-
title: `${(x = m.value) == null ? void 0 : x.deviceType} (${(
|
|
1562
|
+
title: `${(x = m.value) == null ? void 0 : x.deviceType} (${(r = m.value) == null ? void 0 : r._id})`,
|
|
1438
1563
|
loading: S(b),
|
|
1439
1564
|
onBack: S(o).back
|
|
1440
1565
|
}, {
|
|
1441
1566
|
default: q(() => [
|
|
1442
|
-
v(
|
|
1567
|
+
v(p, {
|
|
1443
1568
|
"model-value": S(a),
|
|
1444
|
-
"onUpdate:modelValue":
|
|
1569
|
+
"onUpdate:modelValue": u[0] || (u[0] = (T) => B(a) ? a.value = T : null),
|
|
1445
1570
|
class: "mb-6",
|
|
1446
1571
|
items: t.value
|
|
1447
1572
|
}, null, 8, ["model-value", "items"]),
|
|
1448
|
-
S(a) ? (g(), w(Y(
|
|
1573
|
+
S(a) ? (g(), w(Y(s.value), L(K({ key: 0 }, {
|
|
1449
1574
|
terminal: m.value,
|
|
1450
1575
|
onUpdate: c
|
|
1451
|
-
})), null, 16)) :
|
|
1576
|
+
})), null, 16)) : k("", !0)
|
|
1452
1577
|
]),
|
|
1453
1578
|
_: 1
|
|
1454
1579
|
}, 8, ["title", "loading", "onBack"]);
|
|
@@ -1456,5 +1581,5 @@ const te = /* @__PURE__ */ V({
|
|
|
1456
1581
|
}
|
|
1457
1582
|
});
|
|
1458
1583
|
export {
|
|
1459
|
-
|
|
1584
|
+
ia as default
|
|
1460
1585
|
};
|