@feedmepos/mf-payment 1.4.26 → 1.4.28
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-DKeIpNIW.js → Actions.vue_vue_type_script_setup_true_lang-CLMalWxE.js} +2 -2
- package/dist/{Chargeback-BDRSyAmK.js → Chargeback-_-KfXEVv.js} +5 -5
- package/dist/{OnboardForm-BSOqOm95.js → OnboardForm-OsCSZD51.js} +4 -4
- package/dist/{OnboardForm-AB0mVuJ9.js → OnboardForm-hY9l_enH.js} +202 -196
- package/dist/{OnboardSubmission-DRWeuOKJ.js → OnboardSubmission-ByDceZ70.js} +5 -5
- package/dist/{OnboardSubmission-Dnk7gYO_.js → OnboardSubmission-CttvUQ4D.js} +2 -2
- package/dist/{PayoutAccount-xYdw-qwo.js → PayoutAccount-BdasKqjH.js} +5 -5
- package/dist/{PayoutAccount-_3rSThA1.js → PayoutAccount-eW-MqpMH.js} +5 -5
- package/dist/{PayoutAccountSetting-BkFPooSa.js → PayoutAccountSetting-LxWKmBOI.js} +3 -3
- package/dist/{Restaurant-7tDDS7PZ.js → Restaurant-CiaK6wV9.js} +4 -4
- package/dist/{RestaurantSetting-jsHDhjrj.js → RestaurantSetting-DOcVGjiD.js} +3 -3
- package/dist/{Settlement-BPeUovFo.js → Settlement-0g10njYN.js} +3 -3
- package/dist/{Settlement-BOQdhdzn.js → Settlement-CU8BlYx0.js} +3 -3
- package/dist/{SettlementTransactions-D7wfVl0P.js → SettlementTransactions-DsWWADGe.js} +4 -4
- package/dist/{SettlementTransactions-CmzgEQs0.js → SettlementTransactions-G9Q6Bi0g.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-D3aXDlnu.js → Status.vue_vue_type_script_setup_true_lang-COp6-_i4.js} +1 -1
- package/dist/{Terminal-Bk-fLvmw.js → Terminal-CetdabFy.js} +5 -5
- package/dist/TerminalSetting-MKI0jupT.js +1460 -0
- package/dist/{Transaction-CD3eAEsP.js → Transaction-BBGFc7jF.js} +146 -130
- package/dist/{Transaction-B5xuKV97.js → Transaction-CL0kwjHI.js} +162 -146
- package/dist/{TransactionOld-D8xULx8n.js → TransactionOld-_tvyK7TV.js} +6 -6
- package/dist/api/index.d.ts +2 -2
- package/dist/{app-BGLSsKgl.js → app--H8J5dFW.js} +23 -23
- package/dist/app.js +1 -1
- package/dist/assets-DCTj0P5R.js +134 -0
- package/dist/{grafana-Dq_GUJiP.js → grafana-3qKGKghh.js} +1 -1
- package/dist/{index-BIKn02lu.js → index-BQwri7nC.js} +1 -1
- package/dist/{index-tbFfJPr9.js → index-BsbqgL6x.js} +2 -2
- package/dist/{index-DeG469p5.js → index-C3ZceSMT.js} +8255 -8114
- package/dist/{index-hkLk1b3K.js → index-CElp-4g_.js} +5 -4
- package/dist/{index-hAcBjD4I.js → index-DOLajImh.js} +1 -1
- package/dist/{index-0n1_opm-.js → index-DrP0JZhQ.js} +1 -1
- package/dist/{index-oXO2UZ2G.js → index-DvDscxQR.js} +1 -1
- package/dist/{index-CqAsZVgo.js → index-MQyL_1-a.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BJ9Ys3KF.js → index.vue_vue_type_script_setup_true_lang-D__Vi_FK.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-DRg9Hv9K.js → payout-account-BQpkiil1.js} +3 -3
- package/dist/{plugins-CXIAJ_yL.js → plugins-CMp8J-MM.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 +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +210 -0
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +18 -4
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +18 -4
- package/dist/views/admin/transaction/cell/BillSeqNumber.vue.d.ts +7 -0
- package/dist/views/transaction/cell/BillSeqNumber.vue.d.ts +7 -0
- package/package.json +2 -2
- package/dist/TerminalSetting-BGtvOvPk.js +0 -1369
- package/dist/assets-BDZz71O5.js +0 -133
|
@@ -1,1369 +0,0 @@
|
|
|
1
|
-
import { defineComponent as V, openBlock as f, createElementBlock as N, Fragment as M, createElementVNode as _, createTextVNode as D, toDisplayString as G, ref as I, resolveComponent as g, createVNode as v, createCommentVNode as C, unref as S, computed as q, isRef as B, createBlock as w, resolveDynamicComponent as Y, normalizeProps as K, mergeProps as L, toRef as R, watch as $, onMounted as O, withCtx as P, renderList as h } from "vue";
|
|
2
|
-
import { u as z, e as U } from "./index-DeG469p5.js";
|
|
3
|
-
import { useRouter as W } from "vue-router";
|
|
4
|
-
import { t as A } from "./index-BIKn02lu.js";
|
|
5
|
-
import { _ as X } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
|
6
|
-
import { u as E } from "./index-0n1_opm-.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-D5jtpt9A.js";
|
|
11
|
-
const te = /* @__PURE__ */ V({
|
|
12
|
-
__name: "Information",
|
|
13
|
-
props: {
|
|
14
|
-
terminal: {
|
|
15
|
-
type: Object,
|
|
16
|
-
required: !0
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
setup(F) {
|
|
20
|
-
return (m, a) => (f(), N(M, null, [
|
|
21
|
-
a[0] || (a[0] = _("b", null, "Name", -1)),
|
|
22
|
-
D(": " + G(F.terminal.name), 1),
|
|
23
|
-
a[1] || (a[1] = _("br", null, null, -1)),
|
|
24
|
-
a[2] || (a[2] = _("b", null, "Status", -1)),
|
|
25
|
-
D(": " + G(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(": " + G(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(": " + G(F.terminal.deviceType ?? "-"), 1),
|
|
32
|
-
a[7] || (a[7] = _("br", null, null, -1))
|
|
33
|
-
], 64));
|
|
34
|
-
}
|
|
35
|
-
}), le = { key: 0 }, ne = { class: "mt-6 space-x-6" }, oe = /* @__PURE__ */ V({
|
|
36
|
-
__name: "KioskMode",
|
|
37
|
-
props: {
|
|
38
|
-
terminal: {
|
|
39
|
-
type: Object,
|
|
40
|
-
required: !0
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
setup(F) {
|
|
44
|
-
const { isLoading: m, startAsyncCall: a } = z(!1), b = Q(), n = I({
|
|
45
|
-
enable: !1,
|
|
46
|
-
password: []
|
|
47
|
-
}), r = F;
|
|
48
|
-
function e() {
|
|
49
|
-
return n.value.enable && n.value.password.filter((d) => !!d).length !== 6 ? b.open({
|
|
50
|
-
type: "error",
|
|
51
|
-
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
|
52
|
-
}) : a(async () => {
|
|
53
|
-
const d = { enable: n.value.enable };
|
|
54
|
-
d.enable && Object.assign(d, {
|
|
55
|
-
password: n.value.password.join("")
|
|
56
|
-
});
|
|
57
|
-
const s = await A.kioskModeRequest(r.terminal._id, d);
|
|
58
|
-
if (s === "OK")
|
|
59
|
-
return b.open({ type: "info", message: "Kiosk mode applied successfully." });
|
|
60
|
-
let y = s;
|
|
61
|
-
return s === "client_not_connected" && (y = "Terminal not connected to the websocket server."), s.startsWith("terminal: ") && (y = s.replaceAll("terminal: ", "")), b.open({
|
|
62
|
-
type: "error",
|
|
63
|
-
message: y
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return (d, s) => {
|
|
68
|
-
const y = g("FmSwitch"), c = g("FmPinField"), i = g("FmButton");
|
|
69
|
-
return f(), N(M, null, [
|
|
70
|
-
v(y, {
|
|
71
|
-
modelValue: n.value.enable,
|
|
72
|
-
"onUpdate:modelValue": s[0] || (s[0] = (t) => n.value.enable = t),
|
|
73
|
-
label: "Enable Kiosk Mode?"
|
|
74
|
-
}, null, 8, ["modelValue"]),
|
|
75
|
-
n.value.enable ? (f(), N("div", le, [
|
|
76
|
-
s[2] || (s[2] = _("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
|
77
|
-
v(c, {
|
|
78
|
-
modelValue: n.value.password,
|
|
79
|
-
"onUpdate:modelValue": s[1] || (s[1] = (t) => n.value.password = t)
|
|
80
|
-
}, null, 8, ["modelValue"])
|
|
81
|
-
])) : C("", !0),
|
|
82
|
-
_("div", ne, [
|
|
83
|
-
v(i, {
|
|
84
|
-
variant: "primary",
|
|
85
|
-
label: "Send",
|
|
86
|
-
icon: "send",
|
|
87
|
-
loading: S(m),
|
|
88
|
-
onclick: e
|
|
89
|
-
}, null, 8, ["loading"])
|
|
90
|
-
])
|
|
91
|
-
], 64);
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}), re = /* @__PURE__ */ V({
|
|
95
|
-
__name: "SettingRequest",
|
|
96
|
-
props: {
|
|
97
|
-
terminal: {
|
|
98
|
-
type: Object,
|
|
99
|
-
required: !0
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
setup(F) {
|
|
103
|
-
const { settingTab: m } = E({
|
|
104
|
-
settingTab: "kiosk_mode"
|
|
105
|
-
}), a = [
|
|
106
|
-
{
|
|
107
|
-
label: "Kiosk Mode",
|
|
108
|
-
value: "kiosk_mode",
|
|
109
|
-
render: oe
|
|
110
|
-
}
|
|
111
|
-
], b = F, n = q(() => a.find((r) => r.value === m.value));
|
|
112
|
-
return (r, e) => {
|
|
113
|
-
var s;
|
|
114
|
-
const d = g("FmTabs");
|
|
115
|
-
return f(), N(M, null, [
|
|
116
|
-
e[1] || (e[1] = _("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
117
|
-
_("b", null, "Note: "),
|
|
118
|
-
D(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
|
119
|
-
], -1)),
|
|
120
|
-
v(d, {
|
|
121
|
-
"model-value": S(m),
|
|
122
|
-
"onUpdate:modelValue": e[0] || (e[0] = (y) => B(m) ? m.value = y : null),
|
|
123
|
-
class: "mb-6",
|
|
124
|
-
items: a
|
|
125
|
-
}, null, 8, ["model-value"]),
|
|
126
|
-
S(m) ? (f(), w(Y((s = n.value) == null ? void 0 : s.render), K(L({ key: 0 }, { terminal: b.terminal })), null, 16)) : C("", !0)
|
|
127
|
-
], 64);
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
}), ue = {
|
|
131
|
-
key: 0,
|
|
132
|
-
class: "text-sm text-gray-500"
|
|
133
|
-
}, ie = { class: "flex mt-6 space-x-6" }, se = /* @__PURE__ */ V({
|
|
134
|
-
__name: "SoftposGateway",
|
|
135
|
-
props: {
|
|
136
|
-
terminal: {
|
|
137
|
-
type: Object,
|
|
138
|
-
required: !0
|
|
139
|
-
},
|
|
140
|
-
onUpdate: {
|
|
141
|
-
type: Function,
|
|
142
|
-
required: !0
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
setup(F) {
|
|
146
|
-
const m = F, a = j().currentCountry, b = [
|
|
147
|
-
{
|
|
148
|
-
label: "Fiuu Malaysia",
|
|
149
|
-
value: "cc.feedme.payment.rms",
|
|
150
|
-
region: U.F_COUNTRY.enum.MY,
|
|
151
|
-
gateway: "Fiuu",
|
|
152
|
-
isLegacy: !0,
|
|
153
|
-
isOutdated: !0
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
label: "Fiuu Malaysia V2",
|
|
157
|
-
value: "cc.feedme.payment.fiuu_my",
|
|
158
|
-
region: U.F_COUNTRY.enum.MY,
|
|
159
|
-
gateway: "Fiuu",
|
|
160
|
-
isLegacy: !0
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
label: "Fiuu Singapore",
|
|
164
|
-
value: "cc.feedme.payment.fiuu_sg",
|
|
165
|
-
region: U.F_COUNTRY.enum.SG,
|
|
166
|
-
gateway: "Fiuu",
|
|
167
|
-
isLegacy: !0
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
label: "Softspace Malaysia",
|
|
171
|
-
value: "cc.feedme.payment.softspace_my",
|
|
172
|
-
gateway: "Softspace",
|
|
173
|
-
region: U.F_COUNTRY.enum.MY
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
label: "Digio Thailand",
|
|
177
|
-
value: "cc.feedme.payment.digio_th",
|
|
178
|
-
gateway: "Digio",
|
|
179
|
-
region: U.F_COUNTRY.enum.TH
|
|
180
|
-
}
|
|
181
|
-
], n = R(() => m.terminal), r = I(), e = I({
|
|
182
|
-
packageId: "",
|
|
183
|
-
uniqueId: "",
|
|
184
|
-
developerId: "",
|
|
185
|
-
isUat: !1
|
|
186
|
-
}), d = () => {
|
|
187
|
-
e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "";
|
|
188
|
-
}, s = () => {
|
|
189
|
-
if (!n.value.gateways || n.value.gateways.length === 0)
|
|
190
|
-
return d();
|
|
191
|
-
const t = n.value.gateways[0];
|
|
192
|
-
if (!t.config)
|
|
193
|
-
return d();
|
|
194
|
-
switch (t.gateway) {
|
|
195
|
-
case "Fiuu":
|
|
196
|
-
e.value = {
|
|
197
|
-
packageId: t.config.packageId,
|
|
198
|
-
uniqueId: t.config.uniqueId,
|
|
199
|
-
developerId: "",
|
|
200
|
-
isUat: !1
|
|
201
|
-
};
|
|
202
|
-
break;
|
|
203
|
-
case "Softspace":
|
|
204
|
-
case "Digio":
|
|
205
|
-
const l = JSON.parse(t.config.uniqueId);
|
|
206
|
-
e.value = {
|
|
207
|
-
packageId: t.config.packageId,
|
|
208
|
-
uniqueId: l.uniqueId,
|
|
209
|
-
developerId: l.developerId,
|
|
210
|
-
isUat: l.isUat
|
|
211
|
-
};
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
$(n, s), O(s);
|
|
216
|
-
async function y(t) {
|
|
217
|
-
var l;
|
|
218
|
-
(l = n.value.gateways) == null || l.splice(t, 1), m.onUpdate(n.value);
|
|
219
|
-
}
|
|
220
|
-
const c = q(() => b.filter((t) => t.region === a.value)), i = q(() => c.value.find((t) => t.value === e.value.packageId));
|
|
221
|
-
return (t, l) => {
|
|
222
|
-
const u = g("FmSelect"), p = g("FmTextField"), x = g("FmCheckbox"), o = g("FmButton"), T = g("FmForm");
|
|
223
|
-
return f(), w(T, {
|
|
224
|
-
ref: r.value,
|
|
225
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
226
|
-
onValidationSuccess: l[5] || (l[5] = () => {
|
|
227
|
-
const k = i.value;
|
|
228
|
-
if (!k)
|
|
229
|
-
return;
|
|
230
|
-
let H = e.value.uniqueId;
|
|
231
|
-
k.isLegacy || (H = JSON.stringify({ uniqueId: e.value.uniqueId, developerId: e.value.developerId, isUat: e.value.isUat }));
|
|
232
|
-
const J = {
|
|
233
|
-
gateway: k.gateway,
|
|
234
|
-
config: {
|
|
235
|
-
packageId: k.value,
|
|
236
|
-
uniqueId: H
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
(!n.value.gateways || n.value.gateways.length > 1) && (n.value.gateways = []), n.value.gateways[0] = J, m.onUpdate(n.value);
|
|
240
|
-
})
|
|
241
|
-
}, {
|
|
242
|
-
default: P(() => [
|
|
243
|
-
v(u, {
|
|
244
|
-
modelValue: e.value.packageId,
|
|
245
|
-
"onUpdate:modelValue": l[0] || (l[0] = (k) => e.value.packageId = k),
|
|
246
|
-
label: "Package ID",
|
|
247
|
-
items: c.value
|
|
248
|
-
}, null, 8, ["modelValue", "items"]),
|
|
249
|
-
i.value && i.value.isLegacy ? (f(), N(M, { key: 0 }, [
|
|
250
|
-
v(p, {
|
|
251
|
-
modelValue: e.value.uniqueId,
|
|
252
|
-
"onUpdate:modelValue": l[1] || (l[1] = (k) => e.value.uniqueId = k),
|
|
253
|
-
label: "Unique ID (TID)"
|
|
254
|
-
}, null, 8, ["modelValue"]),
|
|
255
|
-
i.value.isOutdated ? (f(), N("span", ue, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : C("", !0)
|
|
256
|
-
], 64)) : (f(), N(M, { key: 1 }, [
|
|
257
|
-
v(p, {
|
|
258
|
-
modelValue: e.value.developerId,
|
|
259
|
-
"onUpdate:modelValue": l[2] || (l[2] = (k) => e.value.developerId = k),
|
|
260
|
-
label: "Developer ID (MID)"
|
|
261
|
-
}, null, 8, ["modelValue"]),
|
|
262
|
-
v(p, {
|
|
263
|
-
modelValue: e.value.uniqueId,
|
|
264
|
-
"onUpdate:modelValue": l[3] || (l[3] = (k) => e.value.uniqueId = k),
|
|
265
|
-
label: "Unique ID (TID)"
|
|
266
|
-
}, null, 8, ["modelValue"]),
|
|
267
|
-
v(x, {
|
|
268
|
-
modelValue: e.value.isUat,
|
|
269
|
-
"onUpdate:modelValue": l[4] || (l[4] = (k) => e.value.isUat = k),
|
|
270
|
-
label: "Is UAT (Test)",
|
|
271
|
-
value: "1"
|
|
272
|
-
}, null, 8, ["modelValue"])
|
|
273
|
-
], 64)),
|
|
274
|
-
_("div", ie, [
|
|
275
|
-
n.value.gateways && n.value.gateways.length > 0 ? (f(), w(o, {
|
|
276
|
-
key: 0,
|
|
277
|
-
class: "flex-1",
|
|
278
|
-
variant: "secondary",
|
|
279
|
-
label: "Delete",
|
|
280
|
-
onclick: () => y(0)
|
|
281
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
282
|
-
v(o, {
|
|
283
|
-
type: "submit",
|
|
284
|
-
class: "flex-1",
|
|
285
|
-
variant: "primary",
|
|
286
|
-
label: "Save"
|
|
287
|
-
})
|
|
288
|
-
])
|
|
289
|
-
]),
|
|
290
|
-
_: 1
|
|
291
|
-
}, 512);
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
}), ce = {
|
|
295
|
-
key: 0,
|
|
296
|
-
class: "flex items-center justify-center min-h-[80vh]"
|
|
297
|
-
}, de = { class: "flex mt-6 space-x-6" }, me = /* @__PURE__ */ V({
|
|
298
|
-
__name: "TerminalGateway",
|
|
299
|
-
props: {
|
|
300
|
-
terminal: {
|
|
301
|
-
type: Object,
|
|
302
|
-
required: !0
|
|
303
|
-
},
|
|
304
|
-
onUpdate: {
|
|
305
|
-
type: Function,
|
|
306
|
-
required: !0
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
setup(F) {
|
|
310
|
-
const { isLoading: m, startAsyncCall: a } = z(), b = F, n = R(() => b.terminal), r = I(), e = I(), d = I(-1), s = I({
|
|
311
|
-
terminalId: ""
|
|
312
|
-
}), y = () => {
|
|
313
|
-
s.value.terminalId = "", d.value = -1;
|
|
314
|
-
}, c = () => {
|
|
315
|
-
if (a(async () => {
|
|
316
|
-
r.value = await A.getRestaurantTerminals(b.terminal.referenceId);
|
|
317
|
-
}), !b.terminal.ecrs)
|
|
318
|
-
return y();
|
|
319
|
-
const l = b.terminal.ecrs.findIndex((p) => p && p.gateway && p.gateway === "FeedMe");
|
|
320
|
-
if (l === -1)
|
|
321
|
-
return y();
|
|
322
|
-
d.value = l;
|
|
323
|
-
const u = b.terminal.ecrs.at(l);
|
|
324
|
-
u.gateway === "FeedMe" && u.config && (s.value = {
|
|
325
|
-
terminalId: u.config.terminalId
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
|
-
$(n, c), O(c);
|
|
329
|
-
const i = q(() => (r.value ?? []).map((l) => ({
|
|
330
|
-
label: l.name ?? l._id,
|
|
331
|
-
value: l._id
|
|
332
|
-
})));
|
|
333
|
-
async function t(l) {
|
|
334
|
-
var u;
|
|
335
|
-
(u = b.terminal.ecrs) == null || u.splice(l, 1), b.onUpdate(b.terminal);
|
|
336
|
-
}
|
|
337
|
-
return (l, u) => {
|
|
338
|
-
const p = g("FmCircularProgress"), x = g("FmSelect"), o = g("FmButton"), T = g("FmForm");
|
|
339
|
-
return S(m) ? (f(), N("div", ce, [
|
|
340
|
-
v(p, { size: "xxl" })
|
|
341
|
-
])) : (f(), w(T, {
|
|
342
|
-
key: 1,
|
|
343
|
-
ref: e.value,
|
|
344
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
345
|
-
onValidationSuccess: u[1] || (u[1] = () => {
|
|
346
|
-
d.value > -1 ? n.value.ecrs[d.value] = { gateway: "FeedMe", config: s.value } : (n.value.ecrs || (n.value.ecrs = []), n.value.ecrs.push({ gateway: "FeedMe", config: s.value })), b.onUpdate(n.value);
|
|
347
|
-
})
|
|
348
|
-
}, {
|
|
349
|
-
default: P(() => [
|
|
350
|
-
v(x, {
|
|
351
|
-
modelValue: s.value.terminalId,
|
|
352
|
-
"onUpdate:modelValue": u[0] || (u[0] = (k) => s.value.terminalId = k),
|
|
353
|
-
label: "Terminal ID",
|
|
354
|
-
items: i.value,
|
|
355
|
-
rules: S(ee)(S(ae).string())
|
|
356
|
-
}, null, 8, ["modelValue", "items", "rules"]),
|
|
357
|
-
_("div", de, [
|
|
358
|
-
d.value > -1 ? (f(), w(o, {
|
|
359
|
-
key: 0,
|
|
360
|
-
class: "flex-1",
|
|
361
|
-
variant: "secondary",
|
|
362
|
-
label: "Delete",
|
|
363
|
-
onclick: () => t(d.value)
|
|
364
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
365
|
-
v(o, {
|
|
366
|
-
type: "submit",
|
|
367
|
-
class: "flex-1",
|
|
368
|
-
variant: "primary",
|
|
369
|
-
label: "Save"
|
|
370
|
-
})
|
|
371
|
-
])
|
|
372
|
-
]),
|
|
373
|
-
_: 1
|
|
374
|
-
}, 512));
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
}), pe = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */ V({
|
|
378
|
-
__name: "GhlGateway",
|
|
379
|
-
props: {
|
|
380
|
-
terminal: {
|
|
381
|
-
type: Object,
|
|
382
|
-
required: !0
|
|
383
|
-
},
|
|
384
|
-
onUpdate: {
|
|
385
|
-
type: Function,
|
|
386
|
-
required: !0
|
|
387
|
-
}
|
|
388
|
-
},
|
|
389
|
-
setup(F) {
|
|
390
|
-
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I({
|
|
391
|
-
merchantId: "",
|
|
392
|
-
terminalId: "",
|
|
393
|
-
privateKey: ""
|
|
394
|
-
}), e = () => {
|
|
395
|
-
r.value.merchantId = "", r.value.terminalId = "", r.value.privateKey = "", n.value = -1;
|
|
396
|
-
}, d = () => {
|
|
397
|
-
if (!a.value.ecrs)
|
|
398
|
-
return e();
|
|
399
|
-
const y = a.value.ecrs.findIndex((i) => i && i.gateway && i.gateway === "Ghl");
|
|
400
|
-
if (y === -1)
|
|
401
|
-
return e();
|
|
402
|
-
n.value = y;
|
|
403
|
-
const c = a.value.ecrs.at(y);
|
|
404
|
-
c.gateway === "Ghl" && c.config && (r.value = {
|
|
405
|
-
merchantId: c.config.merchantId,
|
|
406
|
-
terminalId: c.config.terminalId,
|
|
407
|
-
privateKey: c.config.privateKey || ""
|
|
408
|
-
});
|
|
409
|
-
};
|
|
410
|
-
$(a, d), O(d);
|
|
411
|
-
async function s(y) {
|
|
412
|
-
var c;
|
|
413
|
-
(c = a.value.ecrs) == null || c.splice(y, 1), m.onUpdate(a.value);
|
|
414
|
-
}
|
|
415
|
-
return (y, c) => {
|
|
416
|
-
const i = g("FmTextField"), t = g("FmTextarea"), l = g("FmButton"), u = g("FmForm");
|
|
417
|
-
return f(), w(u, {
|
|
418
|
-
ref: b.value,
|
|
419
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
420
|
-
onValidationSuccess: c[3] || (c[3] = () => {
|
|
421
|
-
n.value > -1 ? a.value.ecrs[n.value] = { gateway: "Ghl", config: r.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "Ghl", config: r.value })), m.onUpdate(a.value);
|
|
422
|
-
})
|
|
423
|
-
}, {
|
|
424
|
-
default: P(() => [
|
|
425
|
-
v(i, {
|
|
426
|
-
modelValue: r.value.merchantId,
|
|
427
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) => r.value.merchantId = p),
|
|
428
|
-
label: "Merchant ID"
|
|
429
|
-
}, null, 8, ["modelValue"]),
|
|
430
|
-
v(i, {
|
|
431
|
-
modelValue: r.value.terminalId,
|
|
432
|
-
"onUpdate:modelValue": c[1] || (c[1] = (p) => r.value.terminalId = p),
|
|
433
|
-
label: "Terminal ID"
|
|
434
|
-
}, null, 8, ["modelValue"]),
|
|
435
|
-
v(t, {
|
|
436
|
-
modelValue: r.value.privateKey,
|
|
437
|
-
"onUpdate:modelValue": c[2] || (c[2] = (p) => r.value.privateKey = p),
|
|
438
|
-
label: "Private Key",
|
|
439
|
-
"label-mark": "optional",
|
|
440
|
-
"label-info": "Default will use FeedMe Private Key"
|
|
441
|
-
}, null, 8, ["modelValue"]),
|
|
442
|
-
_("div", pe, [
|
|
443
|
-
n.value > -1 ? (f(), w(l, {
|
|
444
|
-
key: 0,
|
|
445
|
-
class: "flex-1",
|
|
446
|
-
variant: "secondary",
|
|
447
|
-
label: "Delete",
|
|
448
|
-
onclick: () => s(n.value)
|
|
449
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
450
|
-
v(l, {
|
|
451
|
-
type: "submit",
|
|
452
|
-
class: "flex-1",
|
|
453
|
-
variant: "primary",
|
|
454
|
-
label: "Save"
|
|
455
|
-
})
|
|
456
|
-
])
|
|
457
|
-
]),
|
|
458
|
-
_: 1
|
|
459
|
-
}, 512);
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
}), ye = { class: "flex items-end" }, fe = { class: "flex flex-wrap gap-8 items-center mt-4" }, ge = { class: "flex mt-6 space-x-6" }, be = /* @__PURE__ */ V({
|
|
463
|
-
__name: "MaybankGateway",
|
|
464
|
-
props: {
|
|
465
|
-
terminal: {
|
|
466
|
-
type: Object,
|
|
467
|
-
required: !0
|
|
468
|
-
},
|
|
469
|
-
onUpdate: {
|
|
470
|
-
type: Function,
|
|
471
|
-
required: !0
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
setup(F) {
|
|
475
|
-
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
|
476
|
-
ip: "",
|
|
477
|
-
receiptName: "",
|
|
478
|
-
cardTypes: []
|
|
479
|
-
}), d = () => {
|
|
480
|
-
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
|
481
|
-
}, s = () => {
|
|
482
|
-
var u;
|
|
483
|
-
if (!a.value.ecrIntegrations)
|
|
484
|
-
return d();
|
|
485
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank");
|
|
486
|
-
if (t === -1)
|
|
487
|
-
return d();
|
|
488
|
-
n.value = t;
|
|
489
|
-
const l = i.at(t);
|
|
490
|
-
l.gateway === "Maybank" && l.config && (e.value = {
|
|
491
|
-
ip: l.config.ip ?? "",
|
|
492
|
-
receiptName: l.receiptName ?? "",
|
|
493
|
-
cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
494
|
-
});
|
|
495
|
-
};
|
|
496
|
-
$(a, s), O(s);
|
|
497
|
-
async function y(i) {
|
|
498
|
-
var t;
|
|
499
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
|
500
|
-
}
|
|
501
|
-
async function c() {
|
|
502
|
-
e.value.cardTypes.push(r.value), r.value = "";
|
|
503
|
-
}
|
|
504
|
-
return (i, t) => {
|
|
505
|
-
const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
506
|
-
return f(), w(x, {
|
|
507
|
-
ref: b.value,
|
|
508
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
509
|
-
onValidationSuccess: t[3] || (t[3] = () => {
|
|
510
|
-
var o, T;
|
|
511
|
-
n.value > -1 ? a.value.ecrIntegrations[n.value] = {
|
|
512
|
-
gateway: "Maybank",
|
|
513
|
-
config: { ip: e.value.ip },
|
|
514
|
-
receiptName: e.value.receiptName,
|
|
515
|
-
dialogConfig: {
|
|
516
|
-
...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
|
|
517
|
-
cardTypes: e.value.cardTypes
|
|
518
|
-
}
|
|
519
|
-
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
520
|
-
gateway: "Maybank",
|
|
521
|
-
config: { ip: e.value.ip },
|
|
522
|
-
receiptName: e.value.receiptName,
|
|
523
|
-
dialogConfig: {
|
|
524
|
-
cardTypes: e.value.cardTypes
|
|
525
|
-
}
|
|
526
|
-
})), m.onUpdate(a.value);
|
|
527
|
-
})
|
|
528
|
-
}, {
|
|
529
|
-
default: P(() => [
|
|
530
|
-
v(l, {
|
|
531
|
-
modelValue: e.value.ip,
|
|
532
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
533
|
-
label: "IP Address"
|
|
534
|
-
}, null, 8, ["modelValue"]),
|
|
535
|
-
v(l, {
|
|
536
|
-
modelValue: e.value.receiptName,
|
|
537
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
538
|
-
label: "Receipt Payment Name",
|
|
539
|
-
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
540
|
-
}, null, 8, ["modelValue"]),
|
|
541
|
-
_("div", ye, [
|
|
542
|
-
v(l, {
|
|
543
|
-
modelValue: r.value,
|
|
544
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
545
|
-
label: "Fallback Card Types",
|
|
546
|
-
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
547
|
-
}, null, 8, ["modelValue"]),
|
|
548
|
-
v(u, {
|
|
549
|
-
class: "ml-4",
|
|
550
|
-
icon: "add",
|
|
551
|
-
onClick: c
|
|
552
|
-
})
|
|
553
|
-
]),
|
|
554
|
-
_("div", fe, [
|
|
555
|
-
(f(!0), N(M, null, h(e.value.cardTypes, (o) => (f(), w(p, {
|
|
556
|
-
key: o,
|
|
557
|
-
label: o,
|
|
558
|
-
removable: !0,
|
|
559
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
560
|
-
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
561
|
-
]),
|
|
562
|
-
_("div", ge, [
|
|
563
|
-
n.value > -1 ? (f(), w(u, {
|
|
564
|
-
key: 0,
|
|
565
|
-
class: "flex-1",
|
|
566
|
-
variant: "secondary",
|
|
567
|
-
label: "Delete",
|
|
568
|
-
onclick: () => y(n.value)
|
|
569
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
570
|
-
v(u, {
|
|
571
|
-
type: "submit",
|
|
572
|
-
class: "flex-1",
|
|
573
|
-
variant: "primary",
|
|
574
|
-
label: "Save"
|
|
575
|
-
})
|
|
576
|
-
])
|
|
577
|
-
]),
|
|
578
|
-
_: 1
|
|
579
|
-
}, 512);
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
}), _e = { class: "flex items-end" }, Ie = { class: "flex flex-wrap gap-8 items-center mt-4" }, Fe = { class: "flex mt-6 space-x-6" }, we = /* @__PURE__ */ V({
|
|
583
|
-
__name: "Maybank2Gateway",
|
|
584
|
-
props: {
|
|
585
|
-
terminal: {
|
|
586
|
-
type: Object,
|
|
587
|
-
required: !0
|
|
588
|
-
},
|
|
589
|
-
onUpdate: {
|
|
590
|
-
type: Function,
|
|
591
|
-
required: !0
|
|
592
|
-
}
|
|
593
|
-
},
|
|
594
|
-
setup(F) {
|
|
595
|
-
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
|
596
|
-
ip: "",
|
|
597
|
-
receiptName: "",
|
|
598
|
-
cardTypes: []
|
|
599
|
-
}), d = () => {
|
|
600
|
-
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
|
601
|
-
}, s = () => {
|
|
602
|
-
var u;
|
|
603
|
-
if (!a.value.ecrIntegrations)
|
|
604
|
-
return d();
|
|
605
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank2");
|
|
606
|
-
if (t === -1)
|
|
607
|
-
return d();
|
|
608
|
-
n.value = t;
|
|
609
|
-
const l = i.at(t);
|
|
610
|
-
l.gateway === "Maybank2" && l.config && (e.value = {
|
|
611
|
-
ip: l.config.ip ?? "",
|
|
612
|
-
receiptName: l.receiptName ?? "",
|
|
613
|
-
cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
614
|
-
});
|
|
615
|
-
};
|
|
616
|
-
$(a, s), O(s);
|
|
617
|
-
async function y(i) {
|
|
618
|
-
var t;
|
|
619
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
|
620
|
-
}
|
|
621
|
-
async function c() {
|
|
622
|
-
e.value.cardTypes.push(r.value), r.value = "";
|
|
623
|
-
}
|
|
624
|
-
return (i, t) => {
|
|
625
|
-
const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
626
|
-
return f(), w(x, {
|
|
627
|
-
ref: b.value,
|
|
628
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
629
|
-
onValidationSuccess: t[3] || (t[3] = () => {
|
|
630
|
-
var o, T;
|
|
631
|
-
n.value > -1 ? a.value.ecrIntegrations[n.value] = {
|
|
632
|
-
gateway: "Maybank2",
|
|
633
|
-
config: { ip: e.value.ip },
|
|
634
|
-
receiptName: e.value.receiptName,
|
|
635
|
-
dialogConfig: {
|
|
636
|
-
...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
|
|
637
|
-
cardTypes: e.value.cardTypes
|
|
638
|
-
}
|
|
639
|
-
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
640
|
-
gateway: "Maybank2",
|
|
641
|
-
config: { ip: e.value.ip },
|
|
642
|
-
receiptName: e.value.receiptName,
|
|
643
|
-
dialogConfig: {
|
|
644
|
-
cardTypes: e.value.cardTypes
|
|
645
|
-
}
|
|
646
|
-
})), m.onUpdate(a.value);
|
|
647
|
-
})
|
|
648
|
-
}, {
|
|
649
|
-
default: P(() => [
|
|
650
|
-
v(l, {
|
|
651
|
-
modelValue: e.value.ip,
|
|
652
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
653
|
-
label: "IP Address"
|
|
654
|
-
}, null, 8, ["modelValue"]),
|
|
655
|
-
v(l, {
|
|
656
|
-
modelValue: e.value.receiptName,
|
|
657
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
658
|
-
label: "Receipt Payment Name",
|
|
659
|
-
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
660
|
-
}, null, 8, ["modelValue"]),
|
|
661
|
-
_("div", _e, [
|
|
662
|
-
v(l, {
|
|
663
|
-
modelValue: r.value,
|
|
664
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
665
|
-
label: "Fallback Card Types",
|
|
666
|
-
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
667
|
-
}, null, 8, ["modelValue"]),
|
|
668
|
-
v(u, {
|
|
669
|
-
class: "ml-4",
|
|
670
|
-
icon: "add",
|
|
671
|
-
onClick: c
|
|
672
|
-
})
|
|
673
|
-
]),
|
|
674
|
-
_("div", Ie, [
|
|
675
|
-
(f(!0), N(M, null, h(e.value.cardTypes, (o) => (f(), w(p, {
|
|
676
|
-
key: o,
|
|
677
|
-
label: o,
|
|
678
|
-
removable: !0,
|
|
679
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
680
|
-
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
681
|
-
]),
|
|
682
|
-
_("div", Fe, [
|
|
683
|
-
n.value > -1 ? (f(), w(u, {
|
|
684
|
-
key: 0,
|
|
685
|
-
class: "flex-1",
|
|
686
|
-
variant: "secondary",
|
|
687
|
-
label: "Delete",
|
|
688
|
-
onclick: () => y(n.value)
|
|
689
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
690
|
-
v(u, {
|
|
691
|
-
type: "submit",
|
|
692
|
-
class: "flex-1",
|
|
693
|
-
variant: "primary",
|
|
694
|
-
label: "Save"
|
|
695
|
-
})
|
|
696
|
-
])
|
|
697
|
-
]),
|
|
698
|
-
_: 1
|
|
699
|
-
}, 512);
|
|
700
|
-
};
|
|
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__ */ V({
|
|
703
|
-
__name: "Maybank3Gateway",
|
|
704
|
-
props: {
|
|
705
|
-
terminal: {
|
|
706
|
-
type: Object,
|
|
707
|
-
required: !0
|
|
708
|
-
},
|
|
709
|
-
onUpdate: {
|
|
710
|
-
type: Function,
|
|
711
|
-
required: !0
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
setup(F) {
|
|
715
|
-
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
|
716
|
-
receiptName: "",
|
|
717
|
-
config: {},
|
|
718
|
-
cardTypes: []
|
|
719
|
-
}), d = () => {
|
|
720
|
-
e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
|
721
|
-
}, s = () => {
|
|
722
|
-
var u;
|
|
723
|
-
if (!a.value.ecrIntegrations)
|
|
724
|
-
return d();
|
|
725
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Maybank3");
|
|
726
|
-
if (t === -1)
|
|
727
|
-
return d();
|
|
728
|
-
n.value = t;
|
|
729
|
-
const l = i.at(t);
|
|
730
|
-
l.gateway === "Maybank3" && l.config && (e.value = {
|
|
731
|
-
config: l.config,
|
|
732
|
-
receiptName: l.receiptName ?? "",
|
|
733
|
-
cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
734
|
-
});
|
|
735
|
-
};
|
|
736
|
-
$(a, s), O(s);
|
|
737
|
-
async function y(i) {
|
|
738
|
-
var t;
|
|
739
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
|
740
|
-
}
|
|
741
|
-
async function c() {
|
|
742
|
-
e.value.cardTypes.push(r.value), r.value = "";
|
|
743
|
-
}
|
|
744
|
-
return (i, t) => {
|
|
745
|
-
const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
746
|
-
return f(), w(x, {
|
|
747
|
-
ref: b.value,
|
|
748
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
749
|
-
onValidationSuccess: t[2] || (t[2] = () => {
|
|
750
|
-
var o, T;
|
|
751
|
-
n.value > -1 ? a.value.ecrIntegrations[n.value] = {
|
|
752
|
-
gateway: "Maybank3",
|
|
753
|
-
config: e.value.config,
|
|
754
|
-
receiptName: e.value.receiptName,
|
|
755
|
-
dialogConfig: {
|
|
756
|
-
...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
|
|
757
|
-
cardTypes: e.value.cardTypes
|
|
758
|
-
}
|
|
759
|
-
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
760
|
-
gateway: "Maybank3",
|
|
761
|
-
config: e.value.config,
|
|
762
|
-
receiptName: e.value.receiptName,
|
|
763
|
-
dialogConfig: {
|
|
764
|
-
cardTypes: e.value.cardTypes
|
|
765
|
-
}
|
|
766
|
-
})), m.onUpdate(a.value);
|
|
767
|
-
})
|
|
768
|
-
}, {
|
|
769
|
-
default: P(() => [
|
|
770
|
-
v(l, {
|
|
771
|
-
modelValue: e.value.receiptName,
|
|
772
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
773
|
-
label: "Receipt Payment Name",
|
|
774
|
-
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
775
|
-
}, null, 8, ["modelValue"]),
|
|
776
|
-
_("div", Te, [
|
|
777
|
-
v(l, {
|
|
778
|
-
modelValue: r.value,
|
|
779
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
780
|
-
label: "Fallback Card Types",
|
|
781
|
-
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
782
|
-
}, null, 8, ["modelValue"]),
|
|
783
|
-
v(u, {
|
|
784
|
-
class: "ml-4",
|
|
785
|
-
icon: "add",
|
|
786
|
-
onClick: c
|
|
787
|
-
})
|
|
788
|
-
]),
|
|
789
|
-
_("div", xe, [
|
|
790
|
-
(f(!0), N(M, null, h(e.value.cardTypes, (o) => (f(), w(p, {
|
|
791
|
-
key: o,
|
|
792
|
-
label: o,
|
|
793
|
-
removable: !0,
|
|
794
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
795
|
-
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
796
|
-
]),
|
|
797
|
-
_("div", ke, [
|
|
798
|
-
n.value > -1 ? (f(), w(u, {
|
|
799
|
-
key: 0,
|
|
800
|
-
class: "flex-1",
|
|
801
|
-
variant: "secondary",
|
|
802
|
-
label: "Delete",
|
|
803
|
-
onclick: () => y(n.value)
|
|
804
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
805
|
-
v(u, {
|
|
806
|
-
type: "submit",
|
|
807
|
-
class: "flex-1",
|
|
808
|
-
variant: "primary",
|
|
809
|
-
label: "Save"
|
|
810
|
-
})
|
|
811
|
-
])
|
|
812
|
-
]),
|
|
813
|
-
_: 1
|
|
814
|
-
}, 512);
|
|
815
|
-
};
|
|
816
|
-
}
|
|
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__ */ V({
|
|
818
|
-
__name: "NetsGateway",
|
|
819
|
-
props: {
|
|
820
|
-
terminal: {
|
|
821
|
-
type: Object,
|
|
822
|
-
required: !0
|
|
823
|
-
},
|
|
824
|
-
onUpdate: {
|
|
825
|
-
type: Function,
|
|
826
|
-
required: !0
|
|
827
|
-
}
|
|
828
|
-
},
|
|
829
|
-
setup(F) {
|
|
830
|
-
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
|
831
|
-
ip: "",
|
|
832
|
-
receiptName: "",
|
|
833
|
-
cardTypes: []
|
|
834
|
-
}), d = () => {
|
|
835
|
-
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
|
836
|
-
}, s = () => {
|
|
837
|
-
var u;
|
|
838
|
-
if (!a.value.ecrIntegrations)
|
|
839
|
-
return d();
|
|
840
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Nets");
|
|
841
|
-
if (t === -1)
|
|
842
|
-
return d();
|
|
843
|
-
n.value = t;
|
|
844
|
-
const l = i.at(t);
|
|
845
|
-
l.gateway === "Nets" && l.config && (e.value = {
|
|
846
|
-
ip: l.config.ip ?? "",
|
|
847
|
-
receiptName: l.receiptName ?? "",
|
|
848
|
-
cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
849
|
-
});
|
|
850
|
-
};
|
|
851
|
-
$(a, s), O(s);
|
|
852
|
-
async function y(i) {
|
|
853
|
-
var t;
|
|
854
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
|
855
|
-
}
|
|
856
|
-
async function c() {
|
|
857
|
-
e.value.cardTypes.push(r.value), r.value = "";
|
|
858
|
-
}
|
|
859
|
-
return (i, t) => {
|
|
860
|
-
const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
861
|
-
return f(), w(x, {
|
|
862
|
-
ref: b.value,
|
|
863
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
864
|
-
onValidationSuccess: t[3] || (t[3] = () => {
|
|
865
|
-
var o, T;
|
|
866
|
-
n.value > -1 ? a.value.ecrIntegrations[n.value] = {
|
|
867
|
-
gateway: "Nets",
|
|
868
|
-
config: { ip: e.value.ip },
|
|
869
|
-
receiptName: e.value.receiptName,
|
|
870
|
-
dialogConfig: {
|
|
871
|
-
...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
|
|
872
|
-
cardTypes: e.value.cardTypes
|
|
873
|
-
}
|
|
874
|
-
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
875
|
-
gateway: "Nets",
|
|
876
|
-
config: { ip: e.value.ip },
|
|
877
|
-
receiptName: e.value.receiptName,
|
|
878
|
-
dialogConfig: {
|
|
879
|
-
cardTypes: e.value.cardTypes
|
|
880
|
-
}
|
|
881
|
-
})), m.onUpdate(a.value);
|
|
882
|
-
})
|
|
883
|
-
}, {
|
|
884
|
-
default: P(() => [
|
|
885
|
-
v(l, {
|
|
886
|
-
modelValue: e.value.ip,
|
|
887
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.ip = o),
|
|
888
|
-
label: "IP Address"
|
|
889
|
-
}, null, 8, ["modelValue"]),
|
|
890
|
-
v(l, {
|
|
891
|
-
modelValue: e.value.receiptName,
|
|
892
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => e.value.receiptName = o),
|
|
893
|
-
label: "Receipt Payment Name",
|
|
894
|
-
"label-info": "Default receipt display will be 'TERMINAL_NETS'"
|
|
895
|
-
}, null, 8, ["modelValue"]),
|
|
896
|
-
_("div", Ce, [
|
|
897
|
-
v(l, {
|
|
898
|
-
modelValue: r.value,
|
|
899
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
900
|
-
label: "Fallback Card Types",
|
|
901
|
-
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
902
|
-
}, null, 8, ["modelValue"]),
|
|
903
|
-
v(u, {
|
|
904
|
-
class: "ml-4",
|
|
905
|
-
icon: "add",
|
|
906
|
-
onClick: c
|
|
907
|
-
})
|
|
908
|
-
]),
|
|
909
|
-
_("div", Ve, [
|
|
910
|
-
(f(!0), N(M, null, h(e.value.cardTypes, (o) => (f(), w(p, {
|
|
911
|
-
key: o,
|
|
912
|
-
label: o,
|
|
913
|
-
removable: !0,
|
|
914
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
915
|
-
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
916
|
-
]),
|
|
917
|
-
_("div", Ue, [
|
|
918
|
-
n.value > -1 ? (f(), w(u, {
|
|
919
|
-
key: 0,
|
|
920
|
-
class: "flex-1",
|
|
921
|
-
variant: "secondary",
|
|
922
|
-
label: "Delete",
|
|
923
|
-
onclick: () => y(n.value)
|
|
924
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
925
|
-
v(u, {
|
|
926
|
-
type: "submit",
|
|
927
|
-
class: "flex-1",
|
|
928
|
-
variant: "primary",
|
|
929
|
-
label: "Save"
|
|
930
|
-
})
|
|
931
|
-
])
|
|
932
|
-
]),
|
|
933
|
-
_: 1
|
|
934
|
-
}, 512);
|
|
935
|
-
};
|
|
936
|
-
}
|
|
937
|
-
}), Me = { class: "flex items-end" }, qe = { class: "flex flex-wrap gap-8 items-center mt-4" }, Oe = { class: "flex mt-6 space-x-6" }, Pe = /* @__PURE__ */ V({
|
|
938
|
-
__name: "KBankGateway",
|
|
939
|
-
props: {
|
|
940
|
-
terminal: {
|
|
941
|
-
type: Object,
|
|
942
|
-
required: !0
|
|
943
|
-
},
|
|
944
|
-
onUpdate: {
|
|
945
|
-
type: Function,
|
|
946
|
-
required: !0
|
|
947
|
-
}
|
|
948
|
-
},
|
|
949
|
-
setup(F) {
|
|
950
|
-
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I(), e = I({
|
|
951
|
-
receiptName: "",
|
|
952
|
-
cardTypes: []
|
|
953
|
-
}), d = () => {
|
|
954
|
-
e.value.receiptName = "", e.value.cardTypes = [], n.value = -1;
|
|
955
|
-
}, s = () => {
|
|
956
|
-
var u;
|
|
957
|
-
if (!a.value.ecrIntegrations)
|
|
958
|
-
return d();
|
|
959
|
-
const i = a.value.ecrIntegrations, t = i.findIndex((p) => p && p.gateway && p.gateway === "Kbank");
|
|
960
|
-
if (t === -1)
|
|
961
|
-
return d();
|
|
962
|
-
n.value = t;
|
|
963
|
-
const l = i.at(t);
|
|
964
|
-
l.gateway === "Kbank" && l.config && (e.value = {
|
|
965
|
-
receiptName: l.receiptName ?? "",
|
|
966
|
-
cardTypes: ((u = l.dialogConfig) == null ? void 0 : u.cardTypes) ?? []
|
|
967
|
-
});
|
|
968
|
-
};
|
|
969
|
-
$(a, s), O(s);
|
|
970
|
-
async function y(i) {
|
|
971
|
-
var t;
|
|
972
|
-
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), m.onUpdate(a.value);
|
|
973
|
-
}
|
|
974
|
-
async function c() {
|
|
975
|
-
e.value.cardTypes.push(r.value), r.value = "";
|
|
976
|
-
}
|
|
977
|
-
return (i, t) => {
|
|
978
|
-
const l = g("FmTextField"), u = g("FmButton"), p = g("FmChip"), x = g("FmForm");
|
|
979
|
-
return f(), w(x, {
|
|
980
|
-
ref: b.value,
|
|
981
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
982
|
-
onValidationSuccess: t[2] || (t[2] = () => {
|
|
983
|
-
var o, T;
|
|
984
|
-
n.value > -1 ? a.value.ecrIntegrations[n.value] = {
|
|
985
|
-
gateway: "Kbank",
|
|
986
|
-
config: {},
|
|
987
|
-
receiptName: e.value.receiptName,
|
|
988
|
-
dialogConfig: {
|
|
989
|
-
...(T = (o = a.value.ecrIntegrations) == null ? void 0 : o[n.value]) == null ? void 0 : T.dialogConfig,
|
|
990
|
-
cardTypes: e.value.cardTypes
|
|
991
|
-
}
|
|
992
|
-
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
993
|
-
gateway: "Kbank",
|
|
994
|
-
config: {},
|
|
995
|
-
receiptName: e.value.receiptName,
|
|
996
|
-
dialogConfig: {
|
|
997
|
-
cardTypes: e.value.cardTypes
|
|
998
|
-
}
|
|
999
|
-
})), m.onUpdate(a.value);
|
|
1000
|
-
})
|
|
1001
|
-
}, {
|
|
1002
|
-
default: P(() => [
|
|
1003
|
-
v(l, {
|
|
1004
|
-
modelValue: e.value.receiptName,
|
|
1005
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => e.value.receiptName = o),
|
|
1006
|
-
label: "Receipt Payment Name",
|
|
1007
|
-
"label-info": "Default receipt display will be 'TERMINAL_KBANK'"
|
|
1008
|
-
}, null, 8, ["modelValue"]),
|
|
1009
|
-
_("div", Me, [
|
|
1010
|
-
v(l, {
|
|
1011
|
-
modelValue: r.value,
|
|
1012
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
|
|
1013
|
-
label: "Fallback Card Types",
|
|
1014
|
-
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1015
|
-
}, null, 8, ["modelValue"]),
|
|
1016
|
-
v(u, {
|
|
1017
|
-
class: "ml-4",
|
|
1018
|
-
icon: "add",
|
|
1019
|
-
onClick: c
|
|
1020
|
-
})
|
|
1021
|
-
]),
|
|
1022
|
-
_("div", qe, [
|
|
1023
|
-
(f(!0), N(M, null, h(e.value.cardTypes, (o) => (f(), w(p, {
|
|
1024
|
-
key: o,
|
|
1025
|
-
label: o,
|
|
1026
|
-
removable: !0,
|
|
1027
|
-
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(o), 1)
|
|
1028
|
-
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1029
|
-
]),
|
|
1030
|
-
_("div", Oe, [
|
|
1031
|
-
n.value > -1 ? (f(), w(u, {
|
|
1032
|
-
key: 0,
|
|
1033
|
-
class: "flex-1",
|
|
1034
|
-
variant: "secondary",
|
|
1035
|
-
label: "Delete",
|
|
1036
|
-
onclick: () => y(n.value)
|
|
1037
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
1038
|
-
v(u, {
|
|
1039
|
-
type: "submit",
|
|
1040
|
-
class: "flex-1",
|
|
1041
|
-
variant: "primary",
|
|
1042
|
-
label: "Save"
|
|
1043
|
-
})
|
|
1044
|
-
])
|
|
1045
|
-
]),
|
|
1046
|
-
_: 1
|
|
1047
|
-
}, 512);
|
|
1048
|
-
};
|
|
1049
|
-
}
|
|
1050
|
-
}), Re = { class: "flex items-center" }, $e = { class: "w-[260px] self-start" }, De = { class: "flex-1" }, Ae = /* @__PURE__ */ V({
|
|
1051
|
-
__name: "EcrGateway",
|
|
1052
|
-
props: {
|
|
1053
|
-
terminal: {
|
|
1054
|
-
type: Object,
|
|
1055
|
-
required: !0
|
|
1056
|
-
},
|
|
1057
|
-
onUpdate: {
|
|
1058
|
-
type: Function,
|
|
1059
|
-
required: !0
|
|
1060
|
-
}
|
|
1061
|
-
},
|
|
1062
|
-
setup(F) {
|
|
1063
|
-
var d;
|
|
1064
|
-
const m = F, a = [
|
|
1065
|
-
{
|
|
1066
|
-
label: "FeedMe Terminal",
|
|
1067
|
-
value: "terminal",
|
|
1068
|
-
render: me
|
|
1069
|
-
},
|
|
1070
|
-
{
|
|
1071
|
-
label: "GHL Terminal (V2)",
|
|
1072
|
-
value: "ghl",
|
|
1073
|
-
render: ve,
|
|
1074
|
-
region: [U.F_COUNTRY.enum.MY]
|
|
1075
|
-
},
|
|
1076
|
-
{
|
|
1077
|
-
label: "Maybank Terminal (ITB)",
|
|
1078
|
-
value: "mb-itb",
|
|
1079
|
-
render: be,
|
|
1080
|
-
region: [U.F_COUNTRY.enum.MY]
|
|
1081
|
-
},
|
|
1082
|
-
{
|
|
1083
|
-
label: "Maybank Terminal (PMA)",
|
|
1084
|
-
value: "mb-pma",
|
|
1085
|
-
render: we,
|
|
1086
|
-
region: [U.F_COUNTRY.enum.MY]
|
|
1087
|
-
},
|
|
1088
|
-
{
|
|
1089
|
-
label: "Maybank Terminal (Paysys)",
|
|
1090
|
-
value: "mb-paysys",
|
|
1091
|
-
render: Ne,
|
|
1092
|
-
region: [U.F_COUNTRY.enum.MY]
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
label: "Nets Terminal",
|
|
1096
|
-
value: "nets",
|
|
1097
|
-
render: Se,
|
|
1098
|
-
region: [U.F_COUNTRY.enum.SG]
|
|
1099
|
-
},
|
|
1100
|
-
{
|
|
1101
|
-
label: "KBank Terminal",
|
|
1102
|
-
value: "kbank",
|
|
1103
|
-
render: Pe,
|
|
1104
|
-
region: [U.F_COUNTRY.enum.TH]
|
|
1105
|
-
}
|
|
1106
|
-
], b = q(() => a.find((s) => s.value === e.value)), n = j().currentCountry, r = q(() => a.filter((s) => !s.region || s.region.includes(n.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
|
|
1107
|
-
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
1108
|
-
});
|
|
1109
|
-
return (s, y) => {
|
|
1110
|
-
var i;
|
|
1111
|
-
const c = g("FmTabs");
|
|
1112
|
-
return f(), N("div", Re, [
|
|
1113
|
-
_("div", $e, [
|
|
1114
|
-
v(c, {
|
|
1115
|
-
"model-value": S(e),
|
|
1116
|
-
"onUpdate:modelValue": y[0] || (y[0] = (t) => B(e) ? e.value = t : null),
|
|
1117
|
-
class: "mb-6",
|
|
1118
|
-
vertical: !0,
|
|
1119
|
-
items: r.value
|
|
1120
|
-
}, null, 8, ["model-value", "items"])
|
|
1121
|
-
]),
|
|
1122
|
-
_("div", De, [
|
|
1123
|
-
S(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), K(L({ key: 0 }, {
|
|
1124
|
-
terminal: m.terminal,
|
|
1125
|
-
onUpdate: m.onUpdate
|
|
1126
|
-
})), null, 16)) : C("", !0)
|
|
1127
|
-
])
|
|
1128
|
-
]);
|
|
1129
|
-
};
|
|
1130
|
-
}
|
|
1131
|
-
}), he = { class: "flex mt-6 space-x-6" }, Ge = /* @__PURE__ */ V({
|
|
1132
|
-
__name: "PromptPayGateway",
|
|
1133
|
-
props: {
|
|
1134
|
-
terminal: {
|
|
1135
|
-
type: Object,
|
|
1136
|
-
required: !0
|
|
1137
|
-
},
|
|
1138
|
-
onUpdate: {
|
|
1139
|
-
type: Function,
|
|
1140
|
-
required: !0
|
|
1141
|
-
}
|
|
1142
|
-
},
|
|
1143
|
-
setup(F) {
|
|
1144
|
-
const m = F, a = R(() => m.terminal), b = I(), n = I(-1), r = I({
|
|
1145
|
-
account: "",
|
|
1146
|
-
receiptName: ""
|
|
1147
|
-
}), e = () => {
|
|
1148
|
-
r.value.account = "", r.value.receiptName = "", n.value = -1;
|
|
1149
|
-
}, d = () => {
|
|
1150
|
-
if (!a.value.qrIntegrations)
|
|
1151
|
-
return e();
|
|
1152
|
-
const y = a.value.qrIntegrations, c = y.findIndex((t) => t && t.gateway && t.gateway === "PROMPTPAY");
|
|
1153
|
-
if (c === -1)
|
|
1154
|
-
return e();
|
|
1155
|
-
n.value = c;
|
|
1156
|
-
const i = y.at(c);
|
|
1157
|
-
i.gateway === "PROMPTPAY" && i.config && (r.value = {
|
|
1158
|
-
account: i.config.account ?? "",
|
|
1159
|
-
receiptName: i.receiptName ?? ""
|
|
1160
|
-
});
|
|
1161
|
-
};
|
|
1162
|
-
$(a, d), O(d);
|
|
1163
|
-
async function s(y) {
|
|
1164
|
-
var c;
|
|
1165
|
-
(c = a.value.qrIntegrations) == null || c.splice(y, 1), m.onUpdate(a.value);
|
|
1166
|
-
}
|
|
1167
|
-
return (y, c) => {
|
|
1168
|
-
const i = g("FmTextField"), t = g("FmButton"), l = g("FmForm");
|
|
1169
|
-
return f(), w(l, {
|
|
1170
|
-
ref: b.value,
|
|
1171
|
-
class: "flex flex-col gap-16 w-[500px]",
|
|
1172
|
-
onValidationSuccess: c[2] || (c[2] = () => {
|
|
1173
|
-
n.value > -1 ? a.value.qrIntegrations[n.value] = { gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName } : (a.value.qrIntegrations || (a.value.qrIntegrations = []), a.value.qrIntegrations.push({ gateway: "PROMPTPAY", config: { account: r.value.account }, receiptName: r.value.receiptName })), m.onUpdate(a.value);
|
|
1174
|
-
})
|
|
1175
|
-
}, {
|
|
1176
|
-
default: P(() => [
|
|
1177
|
-
v(i, {
|
|
1178
|
-
modelValue: r.value.account,
|
|
1179
|
-
"onUpdate:modelValue": c[0] || (c[0] = (u) => r.value.account = u),
|
|
1180
|
-
label: "Thai Phone Number / Thai Naitonal ID",
|
|
1181
|
-
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
1182
|
-
}, null, 8, ["modelValue"]),
|
|
1183
|
-
v(i, {
|
|
1184
|
-
modelValue: r.value.receiptName,
|
|
1185
|
-
"onUpdate:modelValue": c[1] || (c[1] = (u) => r.value.receiptName = u),
|
|
1186
|
-
label: "Receipt Payment Name",
|
|
1187
|
-
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
1188
|
-
}, null, 8, ["modelValue"]),
|
|
1189
|
-
_("div", he, [
|
|
1190
|
-
n.value > -1 ? (f(), w(t, {
|
|
1191
|
-
key: 0,
|
|
1192
|
-
class: "flex-1",
|
|
1193
|
-
variant: "secondary",
|
|
1194
|
-
label: "Delete",
|
|
1195
|
-
onclick: () => s(n.value)
|
|
1196
|
-
}, null, 8, ["onclick"])) : C("", !0),
|
|
1197
|
-
v(t, {
|
|
1198
|
-
type: "submit",
|
|
1199
|
-
class: "flex-1",
|
|
1200
|
-
variant: "primary",
|
|
1201
|
-
label: "Save"
|
|
1202
|
-
})
|
|
1203
|
-
])
|
|
1204
|
-
]),
|
|
1205
|
-
_: 1
|
|
1206
|
-
}, 512);
|
|
1207
|
-
};
|
|
1208
|
-
}
|
|
1209
|
-
}), Be = { class: "flex items-center" }, Ye = { class: "w-[260px] self-start" }, Ke = { class: "flex-1" }, Le = /* @__PURE__ */ V({
|
|
1210
|
-
__name: "QrGateway",
|
|
1211
|
-
props: {
|
|
1212
|
-
terminal: {
|
|
1213
|
-
type: Object,
|
|
1214
|
-
required: !0
|
|
1215
|
-
},
|
|
1216
|
-
onUpdate: {
|
|
1217
|
-
type: Function,
|
|
1218
|
-
required: !0
|
|
1219
|
-
}
|
|
1220
|
-
},
|
|
1221
|
-
setup(F) {
|
|
1222
|
-
var d;
|
|
1223
|
-
const m = F, a = [
|
|
1224
|
-
{
|
|
1225
|
-
label: "PromptPay",
|
|
1226
|
-
value: "promptpay",
|
|
1227
|
-
render: Ge,
|
|
1228
|
-
region: [U.F_COUNTRY.enum.TH]
|
|
1229
|
-
}
|
|
1230
|
-
], b = q(() => a.find((s) => s.value === e.value)), n = j().currentCountry, r = q(() => a.filter((s) => !s.region || s.region.includes(n.value ?? U.F_COUNTRY.enum.MY))), { gatewayTab: e } = E({
|
|
1231
|
-
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
1232
|
-
});
|
|
1233
|
-
return (s, y) => {
|
|
1234
|
-
var i;
|
|
1235
|
-
const c = g("FmTabs");
|
|
1236
|
-
return f(), N("div", Be, [
|
|
1237
|
-
_("div", Ye, [
|
|
1238
|
-
v(c, {
|
|
1239
|
-
"model-value": S(e),
|
|
1240
|
-
"onUpdate:modelValue": y[0] || (y[0] = (t) => B(e) ? e.value = t : null),
|
|
1241
|
-
class: "mb-6",
|
|
1242
|
-
vertical: !0,
|
|
1243
|
-
items: r.value
|
|
1244
|
-
}, null, 8, ["model-value", "items"])
|
|
1245
|
-
]),
|
|
1246
|
-
_("div", Ke, [
|
|
1247
|
-
S(e) ? (f(), w(Y((i = b.value) == null ? void 0 : i.render), K(L({ key: 0 }, {
|
|
1248
|
-
terminal: m.terminal,
|
|
1249
|
-
onUpdate: m.onUpdate
|
|
1250
|
-
})), null, 16)) : C("", !0)
|
|
1251
|
-
])
|
|
1252
|
-
]);
|
|
1253
|
-
};
|
|
1254
|
-
}
|
|
1255
|
-
}), aa = /* @__PURE__ */ V({
|
|
1256
|
-
__name: "TerminalSetting",
|
|
1257
|
-
props: {
|
|
1258
|
-
terminalId: {
|
|
1259
|
-
type: String,
|
|
1260
|
-
required: !0
|
|
1261
|
-
}
|
|
1262
|
-
},
|
|
1263
|
-
setup(F) {
|
|
1264
|
-
const m = F, { tab: a } = E({
|
|
1265
|
-
tab: "information"
|
|
1266
|
-
}), { isLoading: b, startAsyncCall: n } = z(!0), r = W(), e = Q(), d = I();
|
|
1267
|
-
async function s(l) {
|
|
1268
|
-
n(async () => {
|
|
1269
|
-
try {
|
|
1270
|
-
await A.updateById(
|
|
1271
|
-
m.terminalId,
|
|
1272
|
-
{
|
|
1273
|
-
name: l.name,
|
|
1274
|
-
status: l.status,
|
|
1275
|
-
ecrs: l.ecrs ?? [],
|
|
1276
|
-
gateways: l.gateways ?? [],
|
|
1277
|
-
ecrIntegrations: l.ecrIntegrations ?? [],
|
|
1278
|
-
qrIntegrations: l.qrIntegrations ?? []
|
|
1279
|
-
}
|
|
1280
|
-
), d.value = await A.readById(m.terminalId), e.open({
|
|
1281
|
-
type: "success",
|
|
1282
|
-
message: "Terminal updated successfully"
|
|
1283
|
-
});
|
|
1284
|
-
} catch (u) {
|
|
1285
|
-
e.open({
|
|
1286
|
-
type: "error",
|
|
1287
|
-
title: "Error occurs when update terminal",
|
|
1288
|
-
message: Z(u)
|
|
1289
|
-
});
|
|
1290
|
-
}
|
|
1291
|
-
});
|
|
1292
|
-
}
|
|
1293
|
-
const y = [
|
|
1294
|
-
{
|
|
1295
|
-
label: "Information",
|
|
1296
|
-
value: "information",
|
|
1297
|
-
icon: "overview",
|
|
1298
|
-
render: te
|
|
1299
|
-
},
|
|
1300
|
-
{
|
|
1301
|
-
label: "Setting Request",
|
|
1302
|
-
value: "settings",
|
|
1303
|
-
icon: "settings",
|
|
1304
|
-
render: re,
|
|
1305
|
-
onlyFor: ["TERMINAL"]
|
|
1306
|
-
},
|
|
1307
|
-
{
|
|
1308
|
-
label: "SoftPos Gateway",
|
|
1309
|
-
value: "softpos",
|
|
1310
|
-
icon: "payment",
|
|
1311
|
-
render: se
|
|
1312
|
-
},
|
|
1313
|
-
{
|
|
1314
|
-
label: "ECR Gateway",
|
|
1315
|
-
value: "ecr",
|
|
1316
|
-
icon: "point_of_sale",
|
|
1317
|
-
render: Ae,
|
|
1318
|
-
onlyFor: ["POS", "KIOSK"]
|
|
1319
|
-
},
|
|
1320
|
-
{
|
|
1321
|
-
label: "QR Gateway",
|
|
1322
|
-
value: "qr",
|
|
1323
|
-
icon: "qr_code",
|
|
1324
|
-
render: Le,
|
|
1325
|
-
onlyFor: ["POS", "KIOSK"]
|
|
1326
|
-
}
|
|
1327
|
-
];
|
|
1328
|
-
j().currentCountry;
|
|
1329
|
-
const c = q(() => {
|
|
1330
|
-
var l;
|
|
1331
|
-
return (l = y.find((u) => u.value === a.value)) == null ? void 0 : l.render;
|
|
1332
|
-
});
|
|
1333
|
-
async function i() {
|
|
1334
|
-
n(async () => {
|
|
1335
|
-
d.value = await A.readById(m.terminalId);
|
|
1336
|
-
});
|
|
1337
|
-
}
|
|
1338
|
-
const t = q(() => y.filter((l) => {
|
|
1339
|
-
var u;
|
|
1340
|
-
return !l.onlyFor || l.onlyFor.includes(((u = d.value) == null ? void 0 : u.deviceType) ?? "");
|
|
1341
|
-
}));
|
|
1342
|
-
return O(i), (l, u) => {
|
|
1343
|
-
var x, o;
|
|
1344
|
-
const p = g("FmTabs");
|
|
1345
|
-
return f(), w(X, {
|
|
1346
|
-
title: `${(x = d.value) == null ? void 0 : x.deviceType} (${(o = d.value) == null ? void 0 : o._id})`,
|
|
1347
|
-
loading: S(b),
|
|
1348
|
-
onBack: S(r).back
|
|
1349
|
-
}, {
|
|
1350
|
-
default: P(() => [
|
|
1351
|
-
v(p, {
|
|
1352
|
-
"model-value": S(a),
|
|
1353
|
-
"onUpdate:modelValue": u[0] || (u[0] = (T) => B(a) ? a.value = T : null),
|
|
1354
|
-
class: "mb-6",
|
|
1355
|
-
items: t.value
|
|
1356
|
-
}, null, 8, ["model-value", "items"]),
|
|
1357
|
-
S(a) ? (f(), w(Y(c.value), K(L({ key: 0 }, {
|
|
1358
|
-
terminal: d.value,
|
|
1359
|
-
onUpdate: s
|
|
1360
|
-
})), null, 16)) : C("", !0)
|
|
1361
|
-
]),
|
|
1362
|
-
_: 1
|
|
1363
|
-
}, 8, ["title", "loading", "onBack"]);
|
|
1364
|
-
};
|
|
1365
|
-
}
|
|
1366
|
-
});
|
|
1367
|
-
export {
|
|
1368
|
-
aa as default
|
|
1369
|
-
};
|