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