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