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