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