@feedmepos/mf-payment 1.11.15-dev → 1.11.16-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-jHHxT2aC.js → Actions.vue_vue_type_script_setup_true_lang-C7wa3o3y.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-VFoXeuLu.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BvhrP3i-.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-By8zolfK.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BjGEcK8R.js} +3 -3
- package/dist/{Chargeback-BU_boVPd.js → Chargeback-CCzx9M4d.js} +6 -6
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-sVsPiyYk.js → DocumentViewer.vue_vue_type_script_setup_true_lang-Cgetk-s9.js} +1 -1
- package/dist/{ExternalTerminal-BuREkqWh.js → ExternalTerminal-BL5sEkJK.js} +7 -7
- package/dist/{OnboardForm-xv4zv6RH.js → OnboardForm-CHBL2xs2.js} +6 -6
- package/dist/{OnboardForm-BPMVwISA.js → OnboardForm-CwoQ-u0X.js} +694 -631
- package/dist/OnboardSubmission-CwdA6Fh0.js +733 -0
- package/dist/{OnboardSubmission-C3ZnK3wz.js → OnboardSubmission-De50hDlQ.js} +6 -6
- package/dist/{PaymentCheckout-Bxi5DX2A.js → PaymentCheckout-C4zXAkTu.js} +2 -2
- package/dist/{PayoutAccount-mFiIK-eR.js → PayoutAccount-ChqGHuRR.js} +7 -7
- package/dist/{PayoutAccount-DBxrNUbb.js → PayoutAccount-CpJaVhKj.js} +5 -5
- package/dist/{PayoutAccountSetting-CCUtehbr.js → PayoutAccountSetting-SjFMSEu9.js} +7 -7
- package/dist/{Restaurant-CtUQKbwI.js → Restaurant-CYJ-XLRZ.js} +5 -5
- package/dist/{RestaurantSetting-BHH2eOVN.js → RestaurantSetting-BdXl1yPZ.js} +22 -8
- package/dist/{Settlement-CO-MmLbZ.js → Settlement-DFRxxs_m.js} +3 -3
- package/dist/{Settlement-X16CO-_E.js → Settlement-DlNwIY-o.js} +4 -4
- package/dist/{SettlementTransactions-Brsp124P.js → SettlementTransactions-C3Fsm_X9.js} +5 -5
- package/dist/{SettlementTransactions-D5I725nZ.js → SettlementTransactions-CGBKh1GN.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-EGE_gOFG.js → Status.vue_vue_type_script_setup_true_lang-B64OGluJ.js} +1 -1
- package/dist/{Terminal-CfYYUt2Y.js → Terminal-C-rbyBC8.js} +7 -7
- package/dist/{TerminalSetting-B7ywXMUB.js → TerminalSetting-CcTRaKIt.js} +776 -650
- package/dist/{TerminalTemplate-yC-gGBJU.js → TerminalTemplate-DLaa9wUZ.js} +5 -5
- package/dist/{TerminalTemplateSetting-CxinRgs9.js → TerminalTemplateSetting-YzhPDF8J.js} +6 -6
- package/dist/{Transaction-BgjI8TyL.js → Transaction-Bk8usnmd.js} +10 -10
- package/dist/{Transaction-BWI8AhZS.js → Transaction-ou3zdIBB.js} +12 -12
- package/dist/{TransactionOld-DMXawoi0.js → TransactionOld-0X1celu9.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-BgrsuHFn.js → TransactionStatus.vue_vue_type_script_setup_true_lang-BS4AYaq1.js} +1 -1
- package/dist/api/onboard-submission/index.d.ts +6 -1
- package/dist/api/terminal/index.d.ts +2 -1
- package/dist/{app-CgsrQ6oc.js → app-obftSkFb.js} +10174 -9260
- package/dist/app.js +1 -1
- package/dist/{assets-DZQKL_fH.js → assets-DLPXM2Y4.js} +47 -46
- package/dist/{grafana-YDhbkDxd.js → grafana-BXLOtIvx.js} +1 -1
- package/dist/{index-Corqznx3.js → index-BQadSOBj.js} +6 -1
- package/dist/{index-CCVtM-GN.js → index-Baec1AT2.js} +6901 -6958
- package/dist/{index-CRUvX-Q1.js → index-CAT0OmJZ.js} +1 -1
- package/dist/{index-Dd7KHdD-.js → index-CJPHA9xo.js} +1 -1
- package/dist/{index-CGG3_dOy.js → index-CK7aA2pd.js} +1 -1
- package/dist/{index-BxxakqT7.js → index-CR-HSdwu.js} +2 -2
- package/dist/{index-noO83PTl.js → index-CtbE-KF0.js} +1 -1
- package/dist/{index-DzpswLTy.js → index-DRy36FqO.js} +1 -1
- package/dist/{index-CRwE0jgw.js → index-Dlng-M3Z.js} +39 -5
- package/dist/{index-D7cOsILR.js → index-a8lvAiCb.js} +1 -1
- package/dist/{index-62AsZ3ly.js → index-owIgdVJd.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DRHqtOV6.js → index.vue_vue_type_script_setup_true_lang-DrxOa3Bv.js} +1 -1
- package/dist/model/onboard-submission.d.ts +5 -5
- package/dist/{onboard-submission-B14SKa5e.js → onboard-submission-Dzw9Nu3k.js} +4 -3
- package/dist/package.json +5 -5
- package/dist/{payout-account-DkHFhIZJ.js → payout-account-BXeQXNBN.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{tyro-BovmsorS.js → teya-UA6TM323.js} +3 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useQuery-D9w7g4U4.js → useQuery-COlCU4ZR.js} +1 -1
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +4 -4
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +4 -4
- package/dist/views/admin/onboard-submission/forms/TeyaSubmission.vue.d.ts +117 -0
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +4 -4
- 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/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +32 -8
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +4 -0
- package/dist/views/admin/terminal/TerminalSideSheet.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/BeamGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/BriGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/PbbGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/ecr/TeyaGateway.vue.d.ts +210 -0
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +16 -2
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +16 -2
- package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +4 -4
- package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +2 -2
- package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +2 -2
- package/dist/views/onboard-submission/useTeyaConnect.d.ts +71 -0
- package/package.json +5 -5
- package/dist/OnboardSubmission-CIfvaz_u.js +0 -449
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
1
|
+
import { defineComponent as h, openBlock as g, createElementBlock as k, Fragment as E, createElementVNode as I, createTextVNode as Z, toDisplayString as K, ref as _, resolveComponent as f, createBlock as w, withCtx as A, createVNode as y, unref as V, computed as S, createCommentVNode as U, isRef as te, resolveDynamicComponent as le, normalizeProps as ne, mergeProps as oe, watch as q, onBeforeUnmount as Te, toRef as D, onMounted as G, renderList as L } from "vue";
|
|
2
|
+
import { u as J, p as ve } from "./index-Baec1AT2.js";
|
|
3
3
|
import { useRouter as Ie } from "vue-router";
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as pe } from "./index-
|
|
4
|
+
import { t as Y } from "./index-BQadSOBj.js";
|
|
5
|
+
import { t as pe } from "./index-CJPHA9xo.js";
|
|
6
6
|
import { _ as Fe } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
7
|
-
import { u as
|
|
8
|
-
import { useDialogChild as ye, useSnackbar as
|
|
7
|
+
import { u as re } from "./index-CAT0OmJZ.js";
|
|
8
|
+
import { useDialogChild as ye, useSnackbar as se, useDialog as we } from "@feedmepos/ui-library";
|
|
9
9
|
import { w as xe } from "./Modal-DB8M9o1T.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { z as
|
|
13
|
-
import { e as
|
|
14
|
-
import { o as Ce } from "./index-
|
|
15
|
-
import { c as
|
|
16
|
-
import { e as fe } from "./index-
|
|
17
|
-
import { P as
|
|
18
|
-
const Ve = /* @__PURE__ */
|
|
10
|
+
import { u as Q } from "./error-K1CakhA9.js";
|
|
11
|
+
import { useI18n as ie, useCoreStore as ue } from "@feedmepos/mf-common";
|
|
12
|
+
import { z as ee, a as ae } from "./validator-CTlVogBQ.js";
|
|
13
|
+
import { e as R } from "./app-obftSkFb.js";
|
|
14
|
+
import { o as Ce } from "./index-Dlng-M3Z.js";
|
|
15
|
+
import { c as Ne } from "./index-MdV54cWO.js";
|
|
16
|
+
import { e as fe } from "./index-DRy36FqO.js";
|
|
17
|
+
import { P as ke } from "./PaymentCheckout-C4zXAkTu.js";
|
|
18
|
+
const Ve = /* @__PURE__ */ h({
|
|
19
19
|
__name: "Information",
|
|
20
20
|
props: {
|
|
21
21
|
terminal: {
|
|
@@ -23,26 +23,26 @@ const Ve = /* @__PURE__ */ R({
|
|
|
23
23
|
required: !0
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
27
|
-
return (p, a) => (g(),
|
|
26
|
+
setup(F) {
|
|
27
|
+
return (p, a) => (g(), k(E, null, [
|
|
28
28
|
a[0] || (a[0] = I("b", null, "Name", -1)),
|
|
29
|
-
Z(": " +
|
|
29
|
+
Z(": " + K(F.terminal.name), 1),
|
|
30
30
|
a[1] || (a[1] = I("br", null, null, -1)),
|
|
31
31
|
a[2] || (a[2] = I("b", null, "Status", -1)),
|
|
32
|
-
Z(": " +
|
|
32
|
+
Z(": " + K(F.terminal.status), 1),
|
|
33
33
|
a[3] || (a[3] = I("br", null, null, -1)),
|
|
34
34
|
a[4] || (a[4] = I("b", null, "Device ID", -1)),
|
|
35
|
-
Z(": " +
|
|
35
|
+
Z(": " + K(F.terminal.deviceId ?? "-"), 1),
|
|
36
36
|
a[5] || (a[5] = I("br", null, null, -1)),
|
|
37
37
|
a[6] || (a[6] = I("b", null, "Device Type", -1)),
|
|
38
|
-
Z(": " +
|
|
38
|
+
Z(": " + K(F.terminal.deviceType ?? "-"), 1),
|
|
39
39
|
a[7] || (a[7] = I("br", null, null, -1))
|
|
40
40
|
], 64));
|
|
41
41
|
}
|
|
42
|
-
}), Se = { class: "flex items-center gap-8 rounded-md bg-fm-color-neutral-gray-100 px-16 py-12" }, Ue = { class: "fm-typo-en-body-md-400" }, he = { class: "mt-auto pt-24 pb-24" },
|
|
42
|
+
}), Se = { class: "flex items-center gap-8 rounded-md bg-fm-color-neutral-gray-100 px-16 py-12" }, Ue = { class: "fm-typo-en-body-md-400" }, he = { class: "mt-auto pt-24 pb-24" }, Pe = /* @__PURE__ */ h({
|
|
43
43
|
__name: "TerminalSaveTemplateDialog",
|
|
44
|
-
setup(
|
|
45
|
-
const p = ye(), { t: a } =
|
|
44
|
+
setup(F) {
|
|
45
|
+
const p = ye(), { t: a } = ie(), b = _(), l = _(""), r = _(""), e = _(!1), d = () => {
|
|
46
46
|
p.emitData({
|
|
47
47
|
name: l.value,
|
|
48
48
|
description: r.value,
|
|
@@ -50,29 +50,29 @@ const Ve = /* @__PURE__ */ R({
|
|
|
50
50
|
}), p.emitAction("primary");
|
|
51
51
|
};
|
|
52
52
|
return (c, v) => {
|
|
53
|
-
const m = f("FmIcon"),
|
|
54
|
-
return g(),
|
|
53
|
+
const m = f("FmIcon"), i = f("FmTextField"), t = f("FmSwitch"), o = f("FmButton"), s = f("FmForm");
|
|
54
|
+
return g(), w(s, {
|
|
55
55
|
ref_key: "form",
|
|
56
56
|
ref: b,
|
|
57
57
|
class: "flex flex-col gap-16 min-h-[240px]",
|
|
58
58
|
onValidationSuccess: d
|
|
59
59
|
}, {
|
|
60
|
-
default:
|
|
60
|
+
default: A(() => [
|
|
61
61
|
I("div", Se, [
|
|
62
62
|
y(m, {
|
|
63
63
|
name: "info",
|
|
64
64
|
class: "shrink-0"
|
|
65
65
|
}),
|
|
66
|
-
I("span", Ue,
|
|
66
|
+
I("span", Ue, K(V(a)("payment.terminal_template.scope_info")), 1)
|
|
67
67
|
]),
|
|
68
|
-
y(
|
|
68
|
+
y(i, {
|
|
69
69
|
modelValue: l.value,
|
|
70
70
|
"onUpdate:modelValue": v[0] || (v[0] = (u) => l.value = u),
|
|
71
71
|
label: "Template Name",
|
|
72
72
|
"label-mark": "required",
|
|
73
|
-
rules:
|
|
73
|
+
rules: V(ee)(V(ae).string().min(1, "Template name is required"))
|
|
74
74
|
}, null, 8, ["modelValue", "rules"]),
|
|
75
|
-
y(
|
|
75
|
+
y(i, {
|
|
76
76
|
modelValue: r.value,
|
|
77
77
|
"onUpdate:modelValue": v[1] || (v[1] = (u) => r.value = u),
|
|
78
78
|
label: "Description",
|
|
@@ -96,19 +96,19 @@ const Ve = /* @__PURE__ */ R({
|
|
|
96
96
|
}, 512);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
99
|
+
}), Re = { class: "flex flex-col gap-16 min-h-[240px]" }, Oe = { class: "flex items-start gap-8 rounded-md bg-fm-color-neutral-gray-100 px-16 py-12" }, Be = { class: "fm-typo-en-body-md-400" }, Me = {
|
|
100
100
|
key: 0,
|
|
101
101
|
class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-500"
|
|
102
102
|
}, Ae = {
|
|
103
103
|
key: 2,
|
|
104
104
|
class: "mt-auto pt-24 pb-24"
|
|
105
|
-
}, qe = /* @__PURE__ */
|
|
105
|
+
}, qe = /* @__PURE__ */ h({
|
|
106
106
|
__name: "TerminalApplyTemplateDialog",
|
|
107
107
|
props: {
|
|
108
108
|
templates: {}
|
|
109
109
|
},
|
|
110
|
-
setup(
|
|
111
|
-
const p =
|
|
110
|
+
setup(F) {
|
|
111
|
+
const p = F, a = ye(), { t: b } = ie(), l = _(""), r = S(
|
|
112
112
|
() => p.templates.map((d) => ({
|
|
113
113
|
label: d.isDefault ? `${d.name} (default)` : d.name,
|
|
114
114
|
value: d._id
|
|
@@ -117,34 +117,34 @@ const Ve = /* @__PURE__ */ R({
|
|
|
117
117
|
a.emitData({ templateId: l.value }), a.emitAction("primary");
|
|
118
118
|
};
|
|
119
119
|
return (d, c) => {
|
|
120
|
-
const v = f("FmIcon"), m = f("FmSelect"),
|
|
121
|
-
return g(),
|
|
122
|
-
I("div",
|
|
120
|
+
const v = f("FmIcon"), m = f("FmSelect"), i = f("FmButton");
|
|
121
|
+
return g(), k("div", Re, [
|
|
122
|
+
I("div", Oe, [
|
|
123
123
|
y(v, {
|
|
124
124
|
name: "info",
|
|
125
125
|
class: "mt-4 shrink-0"
|
|
126
126
|
}),
|
|
127
|
-
I("div",
|
|
127
|
+
I("div", Be, K(V(b)("payment.terminal_template.scope_info")), 1)
|
|
128
128
|
]),
|
|
129
|
-
r.value.length === 0 ? (g(),
|
|
129
|
+
r.value.length === 0 ? (g(), k("div", Me, " No setting template exists for this business and device type yet. ")) : (g(), w(m, {
|
|
130
130
|
key: 1,
|
|
131
131
|
modelValue: l.value,
|
|
132
132
|
"onUpdate:modelValue": c[0] || (c[0] = (t) => l.value = t),
|
|
133
133
|
label: "Template",
|
|
134
134
|
items: r.value
|
|
135
135
|
}, null, 8, ["modelValue", "items"])),
|
|
136
|
-
r.value.length > 0 ? (g(),
|
|
137
|
-
y(
|
|
136
|
+
r.value.length > 0 ? (g(), k("div", Ae, [
|
|
137
|
+
y(i, {
|
|
138
138
|
class: "w-full",
|
|
139
139
|
label: "Apply",
|
|
140
140
|
disabled: !l.value,
|
|
141
141
|
onClick: e
|
|
142
142
|
}, null, 8, ["disabled"])
|
|
143
|
-
])) :
|
|
143
|
+
])) : U("", !0)
|
|
144
144
|
]);
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
}), Ge = { key: 0 },
|
|
147
|
+
}), Ge = { key: 0 }, $e = { class: "mt-6 space-x-6" }, De = /* @__PURE__ */ h({
|
|
148
148
|
__name: "KioskMode",
|
|
149
149
|
props: {
|
|
150
150
|
terminal: {
|
|
@@ -152,11 +152,11 @@ const Ve = /* @__PURE__ */ R({
|
|
|
152
152
|
required: !0
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
|
-
setup(
|
|
156
|
-
const { isLoading: p, startAsyncCall: a } =
|
|
155
|
+
setup(F) {
|
|
156
|
+
const { isLoading: p, startAsyncCall: a } = J(!1), b = se(), l = _({
|
|
157
157
|
enable: !1,
|
|
158
158
|
password: []
|
|
159
|
-
}), r =
|
|
159
|
+
}), r = F;
|
|
160
160
|
function e() {
|
|
161
161
|
return l.value.enable && l.value.password.filter((d) => !!d).length !== 6 ? b.open({
|
|
162
162
|
type: "error",
|
|
@@ -166,7 +166,7 @@ const Ve = /* @__PURE__ */ R({
|
|
|
166
166
|
d.enable && Object.assign(d, {
|
|
167
167
|
password: l.value.password.join("")
|
|
168
168
|
});
|
|
169
|
-
const c = await
|
|
169
|
+
const c = await Y.kioskModeRequest(r.terminal._id, d);
|
|
170
170
|
if (c === "OK")
|
|
171
171
|
return b.open({ type: "info", message: "Kiosk mode applied successfully." });
|
|
172
172
|
let v = c;
|
|
@@ -177,33 +177,33 @@ const Ve = /* @__PURE__ */ R({
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
return (d, c) => {
|
|
180
|
-
const v = f("FmSwitch"), m = f("FmPinField"),
|
|
181
|
-
return g(),
|
|
180
|
+
const v = f("FmSwitch"), m = f("FmPinField"), i = f("FmButton");
|
|
181
|
+
return g(), k(E, null, [
|
|
182
182
|
y(v, {
|
|
183
183
|
modelValue: l.value.enable,
|
|
184
184
|
"onUpdate:modelValue": c[0] || (c[0] = (t) => l.value.enable = t),
|
|
185
185
|
label: "Enable Kiosk Mode?"
|
|
186
186
|
}, null, 8, ["modelValue"]),
|
|
187
|
-
l.value.enable ? (g(),
|
|
187
|
+
l.value.enable ? (g(), k("div", Ge, [
|
|
188
188
|
c[2] || (c[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
|
189
189
|
y(m, {
|
|
190
190
|
modelValue: l.value.password,
|
|
191
191
|
"onUpdate:modelValue": c[1] || (c[1] = (t) => l.value.password = t)
|
|
192
192
|
}, null, 8, ["modelValue"])
|
|
193
|
-
])) :
|
|
194
|
-
I("div",
|
|
195
|
-
y(
|
|
193
|
+
])) : U("", !0),
|
|
194
|
+
I("div", $e, [
|
|
195
|
+
y(i, {
|
|
196
196
|
variant: "primary",
|
|
197
197
|
label: "Send",
|
|
198
198
|
icon: "send",
|
|
199
|
-
loading:
|
|
199
|
+
loading: V(p),
|
|
200
200
|
onclick: e
|
|
201
201
|
}, null, 8, ["loading"])
|
|
202
202
|
])
|
|
203
203
|
], 64);
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
}), Ee = /* @__PURE__ */
|
|
206
|
+
}), Ee = /* @__PURE__ */ h({
|
|
207
207
|
__name: "SettingRequest",
|
|
208
208
|
props: {
|
|
209
209
|
terminal: {
|
|
@@ -211,80 +211,80 @@ const Ve = /* @__PURE__ */ R({
|
|
|
211
211
|
required: !0
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
-
setup(
|
|
215
|
-
const { settingTab: p } =
|
|
214
|
+
setup(F) {
|
|
215
|
+
const { settingTab: p } = re({
|
|
216
216
|
settingTab: "kiosk_mode"
|
|
217
217
|
}), a = [
|
|
218
218
|
{
|
|
219
219
|
label: "Kiosk Mode",
|
|
220
220
|
value: "kiosk_mode",
|
|
221
|
-
render:
|
|
221
|
+
render: De
|
|
222
222
|
}
|
|
223
|
-
], b =
|
|
223
|
+
], b = F, l = S(() => a.find((r) => r.value === p.value));
|
|
224
224
|
return (r, e) => {
|
|
225
225
|
var c;
|
|
226
226
|
const d = f("FmTabs");
|
|
227
|
-
return g(),
|
|
227
|
+
return g(), k(E, null, [
|
|
228
228
|
e[1] || (e[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
|
|
229
229
|
I("b", null, "Note: "),
|
|
230
230
|
Z(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
|
231
231
|
], -1)),
|
|
232
232
|
y(d, {
|
|
233
|
-
"model-value":
|
|
234
|
-
"onUpdate:modelValue": e[0] || (e[0] = (v) =>
|
|
233
|
+
"model-value": V(p),
|
|
234
|
+
"onUpdate:modelValue": e[0] || (e[0] = (v) => te(p) ? p.value = v : null),
|
|
235
235
|
class: "mb-6",
|
|
236
236
|
items: a
|
|
237
237
|
}, null, 8, ["model-value"]),
|
|
238
|
-
|
|
238
|
+
V(p) ? (g(), w(le((c = l.value) == null ? void 0 : c.render), ne(oe({ key: 0 }, { terminal: b.terminal })), null, 16)) : U("", !0)
|
|
239
239
|
], 64);
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
242
|
}), Le = 2e3, Ye = 12e4, je = "Timed out waiting for the Tyro reader to sync. Please try again.";
|
|
243
|
-
function Ke(
|
|
244
|
-
const { isLoading: p, startLoading: a, stopLoading: b } =
|
|
245
|
-
var
|
|
246
|
-
const
|
|
247
|
-
(
|
|
243
|
+
function Ke(F) {
|
|
244
|
+
const { isLoading: p, startLoading: a, stopLoading: b } = J(!1), { t: l } = ie(), r = se(), e = _(null), d = S(() => {
|
|
245
|
+
var N, O;
|
|
246
|
+
const x = (N = F.value.gateways) == null ? void 0 : N.find(
|
|
247
|
+
($) => $.gateway === "Tyro"
|
|
248
248
|
);
|
|
249
|
-
return ((O =
|
|
250
|
-
}), c =
|
|
251
|
-
var
|
|
252
|
-
return ((
|
|
253
|
-
}), m =
|
|
254
|
-
var
|
|
255
|
-
return v.value && !!((
|
|
256
|
-
}),
|
|
249
|
+
return ((O = x == null ? void 0 : x.config) == null ? void 0 : O.uniqueId) || "";
|
|
250
|
+
}), c = S(() => !!d.value), v = S(() => {
|
|
251
|
+
var x;
|
|
252
|
+
return ((x = e.value) == null ? void 0 : x.status) === "ready";
|
|
253
|
+
}), m = S(() => {
|
|
254
|
+
var x, N;
|
|
255
|
+
return v.value && !!((N = (x = e.value) == null ? void 0 : x.fields) != null && N.tyroLocationId) && !!F.value.deviceId && !c.value;
|
|
256
|
+
}), i = S(() => !v.value && !c.value), t = S(
|
|
257
257
|
() => l("payment.onboard-submission.tyro.syncDisabledHint")
|
|
258
|
-
), o =
|
|
259
|
-
async function
|
|
260
|
-
if (!
|
|
258
|
+
), o = S(() => c.value ? "Synced" : "Sync");
|
|
259
|
+
async function s() {
|
|
260
|
+
if (!F.value.referenceId) {
|
|
261
261
|
e.value = null;
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
try {
|
|
265
|
-
const
|
|
266
|
-
|
|
265
|
+
const x = await Ce.getByRestaurant(
|
|
266
|
+
F.value.referenceId
|
|
267
267
|
);
|
|
268
|
-
e.value =
|
|
269
|
-
(
|
|
268
|
+
e.value = x.find(
|
|
269
|
+
(N) => N.type === ve.FdoOnboardType.enum.tyro
|
|
270
270
|
) ?? null;
|
|
271
|
-
} catch (
|
|
271
|
+
} catch (x) {
|
|
272
272
|
e.value = null, r.open({
|
|
273
273
|
type: "error",
|
|
274
|
-
message:
|
|
274
|
+
message: Q(x)
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
const u =
|
|
278
|
+
const u = Ne({
|
|
279
279
|
intervalMs: Le,
|
|
280
280
|
timeoutMs: Ye,
|
|
281
|
-
onTick: async ({ isCurrentRun:
|
|
282
|
-
var
|
|
283
|
-
const O = await
|
|
284
|
-
if (!
|
|
281
|
+
onTick: async ({ isCurrentRun: x, stop: N }) => {
|
|
282
|
+
var H, W;
|
|
283
|
+
const O = await Y.readById(F.value._id);
|
|
284
|
+
if (!x())
|
|
285
285
|
return;
|
|
286
|
-
const
|
|
287
|
-
(
|
|
286
|
+
const $ = (H = O.gateways) == null ? void 0 : H.find((ce) => ce.gateway === "Tyro");
|
|
287
|
+
($ == null ? void 0 : $.gateway) === "Tyro" && ((W = $ == null ? void 0 : $.config) != null && W.uniqueId) && (N({ invalidate: !1 }), b(), Object.assign(F.value, O), r.open({
|
|
288
288
|
type: "success",
|
|
289
289
|
message: "Tyro reader created successfully"
|
|
290
290
|
}));
|
|
@@ -295,20 +295,20 @@ function Ke(T) {
|
|
|
295
295
|
message: je
|
|
296
296
|
});
|
|
297
297
|
},
|
|
298
|
-
onError: (
|
|
298
|
+
onError: (x) => {
|
|
299
299
|
b(), r.open({
|
|
300
300
|
type: "error",
|
|
301
|
-
message:
|
|
301
|
+
message: Q(x)
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
304
|
}), C = u.isPolling;
|
|
305
305
|
function n() {
|
|
306
306
|
u.stop(), b();
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function T() {
|
|
309
309
|
n(), a(), u.start();
|
|
310
310
|
}
|
|
311
|
-
async function
|
|
311
|
+
async function M() {
|
|
312
312
|
if (!m.value) {
|
|
313
313
|
r.open({
|
|
314
314
|
type: "error",
|
|
@@ -317,18 +317,18 @@ function Ke(T) {
|
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
try {
|
|
320
|
-
a(), await
|
|
321
|
-
} catch (
|
|
320
|
+
a(), await Y.syncTyroReader(F.value._id), T();
|
|
321
|
+
} catch (x) {
|
|
322
322
|
n(), r.open({
|
|
323
323
|
type: "error",
|
|
324
|
-
message:
|
|
324
|
+
message: Q(x)
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
return
|
|
329
|
-
() =>
|
|
328
|
+
return q(
|
|
329
|
+
() => F.value.referenceId,
|
|
330
330
|
async () => {
|
|
331
|
-
await
|
|
331
|
+
await s();
|
|
332
332
|
},
|
|
333
333
|
{ immediate: !0 }
|
|
334
334
|
), Te(() => {
|
|
@@ -338,16 +338,16 @@ function Ke(T) {
|
|
|
338
338
|
isPollingTyroReader: C,
|
|
339
339
|
uniqueId: d,
|
|
340
340
|
canSyncTyroReader: m,
|
|
341
|
-
showTyroSyncPopover:
|
|
341
|
+
showTyroSyncPopover: i,
|
|
342
342
|
tyroSyncPopoverMessage: t,
|
|
343
343
|
tyroSyncButtonLabel: o,
|
|
344
|
-
syncTyroReader:
|
|
344
|
+
syncTyroReader: M
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
347
|
const He = {
|
|
348
348
|
key: 0,
|
|
349
349
|
class: "text-sm text-gray-500"
|
|
350
|
-
}, ze = { class: "flex mt-6 space-x-6" }, Qe = { class: "flex-1" }, Je = /* @__PURE__ */
|
|
350
|
+
}, ze = { class: "flex mt-6 space-x-6" }, Qe = { class: "flex-1" }, Je = /* @__PURE__ */ h({
|
|
351
351
|
__name: "SoftposGateway",
|
|
352
352
|
props: {
|
|
353
353
|
terminal: {
|
|
@@ -359,12 +359,12 @@ const He = {
|
|
|
359
359
|
required: !0
|
|
360
360
|
}
|
|
361
361
|
},
|
|
362
|
-
setup(
|
|
363
|
-
const p =
|
|
362
|
+
setup(F) {
|
|
363
|
+
const p = F, a = ue().currentCountry, b = [
|
|
364
364
|
{
|
|
365
365
|
label: "Fiuu Malaysia",
|
|
366
366
|
value: "cc.feedme.payment.rms",
|
|
367
|
-
region:
|
|
367
|
+
region: R.F_COUNTRY.enum.MY,
|
|
368
368
|
gateway: "Fiuu",
|
|
369
369
|
isLegacy: !0,
|
|
370
370
|
isOutdated: !0
|
|
@@ -372,14 +372,14 @@ const He = {
|
|
|
372
372
|
{
|
|
373
373
|
label: "Fiuu Malaysia V2",
|
|
374
374
|
value: "cc.feedme.payment.fiuu_my",
|
|
375
|
-
region:
|
|
375
|
+
region: R.F_COUNTRY.enum.MY,
|
|
376
376
|
gateway: "Fiuu",
|
|
377
377
|
isLegacy: !0
|
|
378
378
|
},
|
|
379
379
|
{
|
|
380
380
|
label: "Fiuu Singapore",
|
|
381
381
|
value: "cc.feedme.payment.fiuu_sg",
|
|
382
|
-
region:
|
|
382
|
+
region: R.F_COUNTRY.enum.SG,
|
|
383
383
|
gateway: "Fiuu",
|
|
384
384
|
isLegacy: !0
|
|
385
385
|
},
|
|
@@ -387,72 +387,72 @@ const He = {
|
|
|
387
387
|
label: "Softspace Malaysia",
|
|
388
388
|
value: "cc.feedme.payment.softspace_my",
|
|
389
389
|
gateway: "Softspace",
|
|
390
|
-
region:
|
|
390
|
+
region: R.F_COUNTRY.enum.MY
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
label: "Digio Thailand",
|
|
394
394
|
value: "cc.feedme.payment.digio_th",
|
|
395
395
|
gateway: "Digio",
|
|
396
|
-
region:
|
|
396
|
+
region: R.F_COUNTRY.enum.TH
|
|
397
397
|
},
|
|
398
398
|
{
|
|
399
399
|
label: "Tyro Australia",
|
|
400
400
|
value: "cc.feedme.payment.tyro_au",
|
|
401
401
|
gateway: "Tyro",
|
|
402
|
-
region:
|
|
402
|
+
region: R.F_COUNTRY.enum.AU
|
|
403
403
|
}
|
|
404
|
-
], l =
|
|
404
|
+
], l = D(() => p.terminal), r = _(), e = _({
|
|
405
405
|
packageId: "",
|
|
406
406
|
uniqueId: "",
|
|
407
407
|
developerId: "",
|
|
408
408
|
isUat: !1
|
|
409
409
|
}), d = () => {
|
|
410
410
|
e.value.uniqueId = "", e.value.packageId = "", e.value.developerId = "", e.value.isUat = !1;
|
|
411
|
-
}, c =
|
|
412
|
-
(
|
|
413
|
-
)), m =
|
|
411
|
+
}, c = S(() => b.filter((P) => P.region === a.value)), v = S(() => c.value.find(
|
|
412
|
+
(P) => P.value === e.value.packageId
|
|
413
|
+
)), m = S(
|
|
414
414
|
() => {
|
|
415
|
-
var
|
|
416
|
-
return ((
|
|
415
|
+
var P;
|
|
416
|
+
return ((P = v.value) == null ? void 0 : P.gateway) === "Tyro";
|
|
417
417
|
}
|
|
418
418
|
), {
|
|
419
|
-
isLoading:
|
|
419
|
+
isLoading: i,
|
|
420
420
|
isPollingTyroReader: t,
|
|
421
421
|
uniqueId: o,
|
|
422
|
-
canSyncTyroReader:
|
|
422
|
+
canSyncTyroReader: s,
|
|
423
423
|
showTyroSyncPopover: u,
|
|
424
424
|
tyroSyncPopoverMessage: C,
|
|
425
425
|
tyroSyncButtonLabel: n,
|
|
426
|
-
syncTyroReader:
|
|
427
|
-
} = Ke(l),
|
|
426
|
+
syncTyroReader: T
|
|
427
|
+
} = Ke(l), M = S(() => m.value ? "button" : "submit"), x = S(() => m.value ? n.value : "Save"), N = S(() => m.value ? i.value : !1), O = S(() => m.value ? !s.value || t.value : !1), $ = () => {
|
|
428
428
|
if (!l.value.gateways || l.value.gateways.length === 0)
|
|
429
429
|
return d();
|
|
430
|
-
const
|
|
431
|
-
if (!
|
|
430
|
+
const P = l.value.gateways[0];
|
|
431
|
+
if (!P.config)
|
|
432
432
|
return d();
|
|
433
|
-
if (
|
|
433
|
+
if (P.gateway === "Tyro") {
|
|
434
434
|
e.value = {
|
|
435
|
-
packageId:
|
|
436
|
-
uniqueId:
|
|
435
|
+
packageId: P.config.packageId,
|
|
436
|
+
uniqueId: P.config.uniqueId,
|
|
437
437
|
developerId: "",
|
|
438
438
|
isUat: !1
|
|
439
439
|
};
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
switch (
|
|
442
|
+
switch (P.gateway) {
|
|
443
443
|
case "Fiuu":
|
|
444
444
|
e.value = {
|
|
445
|
-
packageId:
|
|
446
|
-
uniqueId:
|
|
445
|
+
packageId: P.config.packageId,
|
|
446
|
+
uniqueId: P.config.uniqueId,
|
|
447
447
|
developerId: "",
|
|
448
448
|
isUat: !1
|
|
449
449
|
};
|
|
450
450
|
break;
|
|
451
451
|
case "Softspace":
|
|
452
452
|
case "Digio":
|
|
453
|
-
const B = JSON.parse(
|
|
453
|
+
const B = JSON.parse(P.config.uniqueId);
|
|
454
454
|
e.value = {
|
|
455
|
-
packageId:
|
|
455
|
+
packageId: P.config.packageId,
|
|
456
456
|
uniqueId: B.uniqueId,
|
|
457
457
|
developerId: B.developerId,
|
|
458
458
|
isUat: B.isUat
|
|
@@ -460,128 +460,128 @@ const He = {
|
|
|
460
460
|
return;
|
|
461
461
|
}
|
|
462
462
|
};
|
|
463
|
-
|
|
464
|
-
const
|
|
465
|
-
var B,
|
|
466
|
-
if (((
|
|
467
|
-
return
|
|
463
|
+
q(l, $), G($);
|
|
464
|
+
const H = (P) => {
|
|
465
|
+
var B, X, z;
|
|
466
|
+
if (((z = (X = (B = l.value.gateways) == null ? void 0 : B[0]) == null ? void 0 : X.config) == null ? void 0 : z.packageId) === P)
|
|
467
|
+
return $();
|
|
468
468
|
e.value.uniqueId = "", e.value.developerId = "", e.value.isUat = !1;
|
|
469
469
|
};
|
|
470
|
-
async function
|
|
471
|
-
const
|
|
472
|
-
if (!
|
|
470
|
+
async function W() {
|
|
471
|
+
const P = v.value;
|
|
472
|
+
if (!P)
|
|
473
473
|
return;
|
|
474
474
|
let B = e.value.uniqueId;
|
|
475
|
-
|
|
475
|
+
P.isLegacy || (B = JSON.stringify({
|
|
476
476
|
uniqueId: e.value.uniqueId,
|
|
477
477
|
developerId: e.value.developerId,
|
|
478
478
|
isUat: e.value.isUat
|
|
479
479
|
}));
|
|
480
|
-
const
|
|
481
|
-
gateway:
|
|
480
|
+
const X = {
|
|
481
|
+
gateway: P.gateway,
|
|
482
482
|
config: {
|
|
483
|
-
packageId:
|
|
483
|
+
packageId: P.value,
|
|
484
484
|
uniqueId: B
|
|
485
485
|
}
|
|
486
486
|
};
|
|
487
|
-
(!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] =
|
|
487
|
+
(!l.value.gateways || l.value.gateways.length > 1) && (l.value.gateways = []), l.value.gateways[0] = X, await p.onUpdate(l.value);
|
|
488
488
|
}
|
|
489
|
-
async function
|
|
489
|
+
async function ce(P) {
|
|
490
490
|
var B;
|
|
491
|
-
(B = l.value.gateways) == null || B.splice(
|
|
491
|
+
(B = l.value.gateways) == null || B.splice(P, 1), p.onUpdate(l.value);
|
|
492
492
|
}
|
|
493
493
|
function de() {
|
|
494
|
-
m.value &&
|
|
494
|
+
m.value && T();
|
|
495
495
|
}
|
|
496
|
-
return (
|
|
497
|
-
const
|
|
498
|
-
return g(),
|
|
496
|
+
return (P, B) => {
|
|
497
|
+
const X = f("FmSelect"), z = f("FmTextField"), ge = f("FmCheckbox"), me = f("FmButton"), be = f("FmTooltip"), _e = f("FmForm");
|
|
498
|
+
return g(), w(_e, {
|
|
499
499
|
ref: r.value,
|
|
500
500
|
class: "flex flex-col gap-16 w-[500px]",
|
|
501
|
-
onValidationSuccess:
|
|
501
|
+
onValidationSuccess: W
|
|
502
502
|
}, {
|
|
503
|
-
default:
|
|
504
|
-
y(
|
|
503
|
+
default: A(() => [
|
|
504
|
+
y(X, {
|
|
505
505
|
modelValue: e.value.packageId,
|
|
506
506
|
"onUpdate:modelValue": [
|
|
507
|
-
B[0] || (B[0] = (
|
|
508
|
-
|
|
507
|
+
B[0] || (B[0] = (j) => e.value.packageId = j),
|
|
508
|
+
H
|
|
509
509
|
],
|
|
510
510
|
label: "Package ID",
|
|
511
511
|
items: c.value
|
|
512
512
|
}, null, 8, ["modelValue", "items"]),
|
|
513
|
-
v.value ? (g(),
|
|
514
|
-
m.value ? (g(),
|
|
513
|
+
v.value ? (g(), k(E, { key: 0 }, [
|
|
514
|
+
m.value ? (g(), w(z, {
|
|
515
515
|
key: 0,
|
|
516
|
-
"model-value":
|
|
516
|
+
"model-value": V(o),
|
|
517
517
|
label: "Unique ID (Reader ID)",
|
|
518
518
|
disabled: ""
|
|
519
|
-
}, null, 8, ["model-value"])) : v.value && v.value.isLegacy ? (g(),
|
|
520
|
-
y(
|
|
519
|
+
}, null, 8, ["model-value"])) : v.value && v.value.isLegacy ? (g(), k(E, { key: 1 }, [
|
|
520
|
+
y(z, {
|
|
521
521
|
modelValue: e.value.uniqueId,
|
|
522
|
-
"onUpdate:modelValue": B[1] || (B[1] = (
|
|
522
|
+
"onUpdate:modelValue": B[1] || (B[1] = (j) => e.value.uniqueId = j),
|
|
523
523
|
label: "Unique ID (TID)"
|
|
524
524
|
}, null, 8, ["modelValue"]),
|
|
525
|
-
v.value.isOutdated ? (g(),
|
|
526
|
-
], 64)) : (g(),
|
|
527
|
-
y(
|
|
525
|
+
v.value.isOutdated ? (g(), k("span", He, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : U("", !0)
|
|
526
|
+
], 64)) : (g(), k(E, { key: 2 }, [
|
|
527
|
+
y(z, {
|
|
528
528
|
modelValue: e.value.developerId,
|
|
529
|
-
"onUpdate:modelValue": B[2] || (B[2] = (
|
|
529
|
+
"onUpdate:modelValue": B[2] || (B[2] = (j) => e.value.developerId = j),
|
|
530
530
|
label: "Developer ID (MID)"
|
|
531
531
|
}, null, 8, ["modelValue"]),
|
|
532
|
-
y(
|
|
532
|
+
y(z, {
|
|
533
533
|
modelValue: e.value.uniqueId,
|
|
534
|
-
"onUpdate:modelValue": B[3] || (B[3] = (
|
|
534
|
+
"onUpdate:modelValue": B[3] || (B[3] = (j) => e.value.uniqueId = j),
|
|
535
535
|
label: "Unique ID (TID)"
|
|
536
536
|
}, null, 8, ["modelValue"]),
|
|
537
537
|
y(ge, {
|
|
538
538
|
modelValue: e.value.isUat,
|
|
539
|
-
"onUpdate:modelValue": B[4] || (B[4] = (
|
|
539
|
+
"onUpdate:modelValue": B[4] || (B[4] = (j) => e.value.isUat = j),
|
|
540
540
|
label: "Is UAT (Test)",
|
|
541
541
|
value: "1"
|
|
542
542
|
}, null, 8, ["modelValue"])
|
|
543
543
|
], 64)),
|
|
544
544
|
I("div", ze, [
|
|
545
|
-
l.value.gateways && l.value.gateways.length > 0 ? (g(),
|
|
545
|
+
l.value.gateways && l.value.gateways.length > 0 ? (g(), w(me, {
|
|
546
546
|
key: 0,
|
|
547
547
|
class: "flex-1",
|
|
548
548
|
variant: "secondary",
|
|
549
549
|
label: "Delete",
|
|
550
|
-
onclick: () =>
|
|
551
|
-
}, null, 8, ["onclick"])) :
|
|
552
|
-
m.value &&
|
|
550
|
+
onclick: () => ce(0)
|
|
551
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
552
|
+
m.value && V(u) && O.value ? (g(), w(be, {
|
|
553
553
|
key: 1,
|
|
554
554
|
class: "flex-1",
|
|
555
555
|
variant: "plain",
|
|
556
556
|
placement: "top",
|
|
557
|
-
content:
|
|
557
|
+
content: V(C)
|
|
558
558
|
}, {
|
|
559
|
-
default:
|
|
559
|
+
default: A(() => [
|
|
560
560
|
I("div", Qe, [
|
|
561
|
-
y(
|
|
562
|
-
type:
|
|
561
|
+
y(me, {
|
|
562
|
+
type: M.value,
|
|
563
563
|
class: "w-full",
|
|
564
564
|
variant: "primary",
|
|
565
|
-
loading:
|
|
565
|
+
loading: N.value,
|
|
566
566
|
disabled: O.value,
|
|
567
|
-
label:
|
|
567
|
+
label: x.value,
|
|
568
568
|
onClick: de
|
|
569
569
|
}, null, 8, ["type", "loading", "disabled", "label"])
|
|
570
570
|
])
|
|
571
571
|
]),
|
|
572
572
|
_: 1
|
|
573
|
-
}, 8, ["content"])) : (g(),
|
|
573
|
+
}, 8, ["content"])) : (g(), w(me, {
|
|
574
574
|
key: 2,
|
|
575
|
-
type:
|
|
575
|
+
type: M.value,
|
|
576
576
|
class: "flex-1",
|
|
577
577
|
variant: "primary",
|
|
578
|
-
loading:
|
|
578
|
+
loading: N.value,
|
|
579
579
|
disabled: O.value,
|
|
580
|
-
label:
|
|
580
|
+
label: x.value,
|
|
581
581
|
onClick: de
|
|
582
582
|
}, null, 8, ["type", "loading", "disabled", "label"]))
|
|
583
583
|
])
|
|
584
|
-
], 64)) :
|
|
584
|
+
], 64)) : U("", !0)
|
|
585
585
|
]),
|
|
586
586
|
_: 1
|
|
587
587
|
}, 512);
|
|
@@ -590,7 +590,7 @@ const He = {
|
|
|
590
590
|
}), We = {
|
|
591
591
|
key: 0,
|
|
592
592
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
593
|
-
}, Xe = { class: "flex mt-6 space-x-6" }, Ze = /* @__PURE__ */
|
|
593
|
+
}, Xe = { class: "flex mt-6 space-x-6" }, Ze = /* @__PURE__ */ h({
|
|
594
594
|
__name: "TerminalGateway",
|
|
595
595
|
props: {
|
|
596
596
|
terminal: {
|
|
@@ -602,62 +602,62 @@ const He = {
|
|
|
602
602
|
required: !0
|
|
603
603
|
}
|
|
604
604
|
},
|
|
605
|
-
setup(
|
|
606
|
-
const { isLoading: p, startAsyncCall: a } =
|
|
605
|
+
setup(F) {
|
|
606
|
+
const { isLoading: p, startAsyncCall: a } = J(), b = F, l = D(() => b.terminal), r = _(), e = _(), d = _(-1), c = _({
|
|
607
607
|
terminalId: ""
|
|
608
608
|
}), v = () => {
|
|
609
609
|
c.value.terminalId = "", d.value = -1;
|
|
610
610
|
}, m = () => {
|
|
611
611
|
if (a(async () => {
|
|
612
|
-
r.value = await
|
|
612
|
+
r.value = await Y.getRestaurantTerminals(b.terminal.referenceId);
|
|
613
613
|
}), !b.terminal.ecrs)
|
|
614
614
|
return v();
|
|
615
615
|
const o = b.terminal.ecrs.findIndex((u) => u && u.gateway && u.gateway === "FeedMe");
|
|
616
616
|
if (o === -1)
|
|
617
617
|
return v();
|
|
618
618
|
d.value = o;
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
terminalId:
|
|
619
|
+
const s = b.terminal.ecrs.at(o);
|
|
620
|
+
s.gateway === "FeedMe" && s.config && (c.value = {
|
|
621
|
+
terminalId: s.config.terminalId
|
|
622
622
|
});
|
|
623
623
|
};
|
|
624
|
-
|
|
625
|
-
const
|
|
624
|
+
q(l, m), G(m);
|
|
625
|
+
const i = S(() => (r.value ?? []).map((o) => ({
|
|
626
626
|
label: o.name ?? o._id,
|
|
627
627
|
value: o._id
|
|
628
628
|
})));
|
|
629
629
|
async function t(o) {
|
|
630
|
-
var
|
|
631
|
-
(
|
|
630
|
+
var s;
|
|
631
|
+
(s = b.terminal.ecrs) == null || s.splice(o, 1), b.onUpdate(b.terminal);
|
|
632
632
|
}
|
|
633
|
-
return (o,
|
|
634
|
-
const u = f("FmCircularProgress"), C = f("FmSelect"), n = f("FmButton"),
|
|
635
|
-
return
|
|
633
|
+
return (o, s) => {
|
|
634
|
+
const u = f("FmCircularProgress"), C = f("FmSelect"), n = f("FmButton"), T = f("FmForm");
|
|
635
|
+
return V(p) ? (g(), k("div", We, [
|
|
636
636
|
y(u, { size: "xxl" })
|
|
637
|
-
])) : (g(),
|
|
637
|
+
])) : (g(), w(T, {
|
|
638
638
|
key: 1,
|
|
639
639
|
ref: e.value,
|
|
640
640
|
class: "flex flex-col gap-16 w-[500px]",
|
|
641
|
-
onValidationSuccess:
|
|
641
|
+
onValidationSuccess: s[1] || (s[1] = () => {
|
|
642
642
|
d.value > -1 ? l.value.ecrs[d.value] = { gateway: "FeedMe", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "FeedMe", config: c.value })), b.onUpdate(l.value);
|
|
643
643
|
})
|
|
644
644
|
}, {
|
|
645
|
-
default:
|
|
645
|
+
default: A(() => [
|
|
646
646
|
y(C, {
|
|
647
647
|
modelValue: c.value.terminalId,
|
|
648
|
-
"onUpdate:modelValue":
|
|
648
|
+
"onUpdate:modelValue": s[0] || (s[0] = (M) => c.value.terminalId = M),
|
|
649
649
|
label: "Terminal ID",
|
|
650
|
-
items:
|
|
651
|
-
rules:
|
|
650
|
+
items: i.value,
|
|
651
|
+
rules: V(ee)(V(ae).string())
|
|
652
652
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
653
653
|
I("div", Xe, [
|
|
654
|
-
d.value > -1 ? (g(),
|
|
654
|
+
d.value > -1 ? (g(), w(n, {
|
|
655
655
|
key: 0,
|
|
656
656
|
class: "flex-1",
|
|
657
657
|
variant: "secondary",
|
|
658
658
|
label: "Delete",
|
|
659
659
|
onclick: () => t(d.value)
|
|
660
|
-
}, null, 8, ["onclick"])) :
|
|
660
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
661
661
|
y(n, {
|
|
662
662
|
type: "submit",
|
|
663
663
|
class: "flex-1",
|
|
@@ -670,7 +670,7 @@ const He = {
|
|
|
670
670
|
}, 512));
|
|
671
671
|
};
|
|
672
672
|
}
|
|
673
|
-
}), ea = { class: "flex mt-6 space-x-6" }, aa = /* @__PURE__ */
|
|
673
|
+
}), ea = { class: "flex mt-6 space-x-6" }, aa = /* @__PURE__ */ h({
|
|
674
674
|
__name: "GhlGateway",
|
|
675
675
|
props: {
|
|
676
676
|
terminal: {
|
|
@@ -682,8 +682,8 @@ const He = {
|
|
|
682
682
|
required: !0
|
|
683
683
|
}
|
|
684
684
|
},
|
|
685
|
-
setup(
|
|
686
|
-
const p =
|
|
685
|
+
setup(F) {
|
|
686
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _({
|
|
687
687
|
merchantId: "",
|
|
688
688
|
terminalId: "",
|
|
689
689
|
privateKey: ""
|
|
@@ -692,7 +692,7 @@ const He = {
|
|
|
692
692
|
}, d = () => {
|
|
693
693
|
if (!a.value.ecrs)
|
|
694
694
|
return e();
|
|
695
|
-
const v = a.value.ecrs.findIndex((
|
|
695
|
+
const v = a.value.ecrs.findIndex((i) => i && i.gateway && i.gateway === "Ghl");
|
|
696
696
|
if (v === -1)
|
|
697
697
|
return e();
|
|
698
698
|
l.value = v;
|
|
@@ -703,27 +703,27 @@ const He = {
|
|
|
703
703
|
privateKey: m.config.privateKey || ""
|
|
704
704
|
});
|
|
705
705
|
};
|
|
706
|
-
|
|
706
|
+
q(a, d), G(d);
|
|
707
707
|
async function c(v) {
|
|
708
708
|
var m;
|
|
709
709
|
(m = a.value.ecrs) == null || m.splice(v, 1), p.onUpdate(a.value);
|
|
710
710
|
}
|
|
711
711
|
return (v, m) => {
|
|
712
|
-
const
|
|
713
|
-
return g(),
|
|
712
|
+
const i = f("FmTextField"), t = f("FmTextarea"), o = f("FmButton"), s = f("FmForm");
|
|
713
|
+
return g(), w(s, {
|
|
714
714
|
ref: b.value,
|
|
715
715
|
class: "flex flex-col gap-16 w-[500px]",
|
|
716
716
|
onValidationSuccess: m[3] || (m[3] = () => {
|
|
717
717
|
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 })), p.onUpdate(a.value);
|
|
718
718
|
})
|
|
719
719
|
}, {
|
|
720
|
-
default:
|
|
721
|
-
y(
|
|
720
|
+
default: A(() => [
|
|
721
|
+
y(i, {
|
|
722
722
|
modelValue: r.value.merchantId,
|
|
723
723
|
"onUpdate:modelValue": m[0] || (m[0] = (u) => r.value.merchantId = u),
|
|
724
724
|
label: "Merchant ID"
|
|
725
725
|
}, null, 8, ["modelValue"]),
|
|
726
|
-
y(
|
|
726
|
+
y(i, {
|
|
727
727
|
modelValue: r.value.terminalId,
|
|
728
728
|
"onUpdate:modelValue": m[1] || (m[1] = (u) => r.value.terminalId = u),
|
|
729
729
|
label: "Terminal ID"
|
|
@@ -736,13 +736,13 @@ const He = {
|
|
|
736
736
|
"label-info": "Default will use FeedMe Private Key"
|
|
737
737
|
}, null, 8, ["modelValue"]),
|
|
738
738
|
I("div", ea, [
|
|
739
|
-
l.value > -1 ? (g(),
|
|
739
|
+
l.value > -1 ? (g(), w(o, {
|
|
740
740
|
key: 0,
|
|
741
741
|
class: "flex-1",
|
|
742
742
|
variant: "secondary",
|
|
743
743
|
label: "Delete",
|
|
744
744
|
onclick: () => c(l.value)
|
|
745
|
-
}, null, 8, ["onclick"])) :
|
|
745
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
746
746
|
y(o, {
|
|
747
747
|
type: "submit",
|
|
748
748
|
class: "flex-1",
|
|
@@ -755,7 +755,7 @@ const He = {
|
|
|
755
755
|
}, 512);
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
|
-
}), ta = { class: "flex items-end" }, la = { class: "flex flex-wrap gap-8 items-center mt-4" }, na = { class: "flex mt-6 space-x-6" }, oa = /* @__PURE__ */
|
|
758
|
+
}), ta = { class: "flex items-end" }, la = { class: "flex flex-wrap gap-8 items-center mt-4" }, na = { class: "flex mt-6 space-x-6" }, oa = /* @__PURE__ */ h({
|
|
759
759
|
__name: "MaybankGateway",
|
|
760
760
|
props: {
|
|
761
761
|
terminal: {
|
|
@@ -767,49 +767,49 @@ const He = {
|
|
|
767
767
|
required: !0
|
|
768
768
|
}
|
|
769
769
|
},
|
|
770
|
-
setup(
|
|
771
|
-
const p =
|
|
770
|
+
setup(F) {
|
|
771
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
772
772
|
ip: "",
|
|
773
773
|
receiptName: "",
|
|
774
774
|
cardTypes: []
|
|
775
775
|
}), d = () => {
|
|
776
776
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
777
777
|
}, c = () => {
|
|
778
|
-
var
|
|
778
|
+
var s;
|
|
779
779
|
if (!a.value.ecrIntegrations)
|
|
780
780
|
return d();
|
|
781
|
-
const
|
|
781
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((u) => u && u.gateway && u.gateway === "Maybank");
|
|
782
782
|
if (t === -1)
|
|
783
783
|
return d();
|
|
784
784
|
l.value = t;
|
|
785
|
-
const o =
|
|
785
|
+
const o = i.at(t);
|
|
786
786
|
o.gateway === "Maybank" && o.config && (e.value = {
|
|
787
787
|
ip: o.config.ip ?? "",
|
|
788
788
|
receiptName: o.receiptName ?? "",
|
|
789
|
-
cardTypes: ((
|
|
789
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
790
790
|
});
|
|
791
791
|
};
|
|
792
|
-
|
|
793
|
-
async function v(
|
|
792
|
+
q(a, c), G(c);
|
|
793
|
+
async function v(i) {
|
|
794
794
|
var t;
|
|
795
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
795
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
796
796
|
}
|
|
797
797
|
async function m() {
|
|
798
798
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
799
799
|
}
|
|
800
|
-
return (
|
|
801
|
-
const o = f("FmTextField"),
|
|
802
|
-
return g(),
|
|
800
|
+
return (i, t) => {
|
|
801
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
802
|
+
return g(), w(C, {
|
|
803
803
|
ref: b.value,
|
|
804
804
|
class: "flex flex-col gap-16 w-[500px]",
|
|
805
805
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
806
|
-
var n,
|
|
806
|
+
var n, T;
|
|
807
807
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
808
808
|
gateway: "Maybank",
|
|
809
809
|
config: { ip: e.value.ip },
|
|
810
810
|
receiptName: e.value.receiptName,
|
|
811
811
|
dialogConfig: {
|
|
812
|
-
...(
|
|
812
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
813
813
|
cardTypes: e.value.cardTypes
|
|
814
814
|
}
|
|
815
815
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -822,7 +822,7 @@ const He = {
|
|
|
822
822
|
})), p.onUpdate(a.value);
|
|
823
823
|
})
|
|
824
824
|
}, {
|
|
825
|
-
default:
|
|
825
|
+
default: A(() => [
|
|
826
826
|
y(o, {
|
|
827
827
|
modelValue: e.value.ip,
|
|
828
828
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
|
|
@@ -841,14 +841,14 @@ const He = {
|
|
|
841
841
|
label: "Fallback Card Types",
|
|
842
842
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
843
843
|
}, null, 8, ["modelValue"]),
|
|
844
|
-
y(
|
|
844
|
+
y(s, {
|
|
845
845
|
class: "ml-4",
|
|
846
846
|
icon: "add",
|
|
847
847
|
onClick: m
|
|
848
848
|
})
|
|
849
849
|
]),
|
|
850
850
|
I("div", la, [
|
|
851
|
-
(g(!0),
|
|
851
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
852
852
|
key: n,
|
|
853
853
|
label: n,
|
|
854
854
|
removable: !0,
|
|
@@ -856,14 +856,14 @@ const He = {
|
|
|
856
856
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
857
857
|
]),
|
|
858
858
|
I("div", na, [
|
|
859
|
-
l.value > -1 ? (g(),
|
|
859
|
+
l.value > -1 ? (g(), w(s, {
|
|
860
860
|
key: 0,
|
|
861
861
|
class: "flex-1",
|
|
862
862
|
variant: "secondary",
|
|
863
863
|
label: "Delete",
|
|
864
864
|
onclick: () => v(l.value)
|
|
865
|
-
}, null, 8, ["onclick"])) :
|
|
866
|
-
y(
|
|
865
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
866
|
+
y(s, {
|
|
867
867
|
type: "submit",
|
|
868
868
|
class: "flex-1",
|
|
869
869
|
variant: "primary",
|
|
@@ -875,7 +875,7 @@ const He = {
|
|
|
875
875
|
}, 512);
|
|
876
876
|
};
|
|
877
877
|
}
|
|
878
|
-
}), ra = { class: "flex items-end" },
|
|
878
|
+
}), ra = { class: "flex items-end" }, sa = { class: "flex flex-wrap gap-8 items-center mt-4" }, ia = { class: "flex mt-6 space-x-6" }, ua = /* @__PURE__ */ h({
|
|
879
879
|
__name: "Maybank2Gateway",
|
|
880
880
|
props: {
|
|
881
881
|
terminal: {
|
|
@@ -887,49 +887,49 @@ const He = {
|
|
|
887
887
|
required: !0
|
|
888
888
|
}
|
|
889
889
|
},
|
|
890
|
-
setup(
|
|
891
|
-
const p =
|
|
890
|
+
setup(F) {
|
|
891
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
892
892
|
ip: "",
|
|
893
893
|
receiptName: "",
|
|
894
894
|
cardTypes: []
|
|
895
895
|
}), d = () => {
|
|
896
896
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
897
897
|
}, c = () => {
|
|
898
|
-
var
|
|
898
|
+
var s;
|
|
899
899
|
if (!a.value.ecrIntegrations)
|
|
900
900
|
return d();
|
|
901
|
-
const
|
|
901
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((u) => u && u.gateway && u.gateway === "Maybank2");
|
|
902
902
|
if (t === -1)
|
|
903
903
|
return d();
|
|
904
904
|
l.value = t;
|
|
905
|
-
const o =
|
|
905
|
+
const o = i.at(t);
|
|
906
906
|
o.gateway === "Maybank2" && o.config && (e.value = {
|
|
907
907
|
ip: o.config.ip ?? "",
|
|
908
908
|
receiptName: o.receiptName ?? "",
|
|
909
|
-
cardTypes: ((
|
|
909
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
910
910
|
});
|
|
911
911
|
};
|
|
912
|
-
|
|
913
|
-
async function v(
|
|
912
|
+
q(a, c), G(c);
|
|
913
|
+
async function v(i) {
|
|
914
914
|
var t;
|
|
915
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
915
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
916
916
|
}
|
|
917
917
|
async function m() {
|
|
918
918
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
919
919
|
}
|
|
920
|
-
return (
|
|
921
|
-
const o = f("FmTextField"),
|
|
922
|
-
return g(),
|
|
920
|
+
return (i, t) => {
|
|
921
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
922
|
+
return g(), w(C, {
|
|
923
923
|
ref: b.value,
|
|
924
924
|
class: "flex flex-col gap-16 w-[500px]",
|
|
925
925
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
926
|
-
var n,
|
|
926
|
+
var n, T;
|
|
927
927
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
928
928
|
gateway: "Maybank2",
|
|
929
929
|
config: { ip: e.value.ip },
|
|
930
930
|
receiptName: e.value.receiptName,
|
|
931
931
|
dialogConfig: {
|
|
932
|
-
...(
|
|
932
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
933
933
|
cardTypes: e.value.cardTypes
|
|
934
934
|
}
|
|
935
935
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -942,7 +942,7 @@ const He = {
|
|
|
942
942
|
})), p.onUpdate(a.value);
|
|
943
943
|
})
|
|
944
944
|
}, {
|
|
945
|
-
default:
|
|
945
|
+
default: A(() => [
|
|
946
946
|
y(o, {
|
|
947
947
|
modelValue: e.value.ip,
|
|
948
948
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
|
|
@@ -961,29 +961,29 @@ const He = {
|
|
|
961
961
|
label: "Fallback Card Types",
|
|
962
962
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
963
963
|
}, null, 8, ["modelValue"]),
|
|
964
|
-
y(
|
|
964
|
+
y(s, {
|
|
965
965
|
class: "ml-4",
|
|
966
966
|
icon: "add",
|
|
967
967
|
onClick: m
|
|
968
968
|
})
|
|
969
969
|
]),
|
|
970
|
-
I("div",
|
|
971
|
-
(g(!0),
|
|
970
|
+
I("div", sa, [
|
|
971
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
972
972
|
key: n,
|
|
973
973
|
label: n,
|
|
974
974
|
removable: !0,
|
|
975
975
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
|
|
976
976
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
977
977
|
]),
|
|
978
|
-
I("div",
|
|
979
|
-
l.value > -1 ? (g(),
|
|
978
|
+
I("div", ia, [
|
|
979
|
+
l.value > -1 ? (g(), w(s, {
|
|
980
980
|
key: 0,
|
|
981
981
|
class: "flex-1",
|
|
982
982
|
variant: "secondary",
|
|
983
983
|
label: "Delete",
|
|
984
984
|
onclick: () => v(l.value)
|
|
985
|
-
}, null, 8, ["onclick"])) :
|
|
986
|
-
y(
|
|
985
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
986
|
+
y(s, {
|
|
987
987
|
type: "submit",
|
|
988
988
|
class: "flex-1",
|
|
989
989
|
variant: "primary",
|
|
@@ -995,7 +995,7 @@ const He = {
|
|
|
995
995
|
}, 512);
|
|
996
996
|
};
|
|
997
997
|
}
|
|
998
|
-
}), ca = { class: "flex items-end" }, ma = { class: "flex flex-wrap gap-8 items-center mt-4" }, da = { class: "flex mt-6 space-x-6" }, pa = /* @__PURE__ */
|
|
998
|
+
}), ca = { class: "flex items-end" }, ma = { class: "flex flex-wrap gap-8 items-center mt-4" }, da = { class: "flex mt-6 space-x-6" }, pa = /* @__PURE__ */ h({
|
|
999
999
|
__name: "Maybank3Gateway",
|
|
1000
1000
|
props: {
|
|
1001
1001
|
terminal: {
|
|
@@ -1007,49 +1007,49 @@ const He = {
|
|
|
1007
1007
|
required: !0
|
|
1008
1008
|
}
|
|
1009
1009
|
},
|
|
1010
|
-
setup(
|
|
1011
|
-
const p =
|
|
1010
|
+
setup(F) {
|
|
1011
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1012
1012
|
receiptName: "",
|
|
1013
1013
|
config: {},
|
|
1014
1014
|
cardTypes: []
|
|
1015
1015
|
}), d = () => {
|
|
1016
1016
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1017
1017
|
}, c = () => {
|
|
1018
|
-
var
|
|
1018
|
+
var s;
|
|
1019
1019
|
if (!a.value.ecrIntegrations)
|
|
1020
1020
|
return d();
|
|
1021
|
-
const
|
|
1021
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((u) => u && u.gateway && u.gateway === "Maybank3");
|
|
1022
1022
|
if (t === -1)
|
|
1023
1023
|
return d();
|
|
1024
1024
|
l.value = t;
|
|
1025
|
-
const o =
|
|
1025
|
+
const o = i.at(t);
|
|
1026
1026
|
o.gateway === "Maybank3" && o.config && (e.value = {
|
|
1027
1027
|
config: o.config,
|
|
1028
1028
|
receiptName: o.receiptName ?? "",
|
|
1029
|
-
cardTypes: ((
|
|
1029
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1030
1030
|
});
|
|
1031
1031
|
};
|
|
1032
|
-
|
|
1033
|
-
async function v(
|
|
1032
|
+
q(a, c), G(c);
|
|
1033
|
+
async function v(i) {
|
|
1034
1034
|
var t;
|
|
1035
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1035
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1036
1036
|
}
|
|
1037
1037
|
async function m() {
|
|
1038
1038
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1039
1039
|
}
|
|
1040
|
-
return (
|
|
1041
|
-
const o = f("FmTextField"),
|
|
1042
|
-
return g(),
|
|
1040
|
+
return (i, t) => {
|
|
1041
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1042
|
+
return g(), w(C, {
|
|
1043
1043
|
ref: b.value,
|
|
1044
1044
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1045
1045
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1046
|
-
var n,
|
|
1046
|
+
var n, T;
|
|
1047
1047
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1048
1048
|
gateway: "Maybank3",
|
|
1049
1049
|
config: e.value.config,
|
|
1050
1050
|
receiptName: e.value.receiptName,
|
|
1051
1051
|
dialogConfig: {
|
|
1052
|
-
...(
|
|
1052
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1053
1053
|
cardTypes: e.value.cardTypes
|
|
1054
1054
|
}
|
|
1055
1055
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1062,7 +1062,7 @@ const He = {
|
|
|
1062
1062
|
})), p.onUpdate(a.value);
|
|
1063
1063
|
})
|
|
1064
1064
|
}, {
|
|
1065
|
-
default:
|
|
1065
|
+
default: A(() => [
|
|
1066
1066
|
y(o, {
|
|
1067
1067
|
modelValue: e.value.receiptName,
|
|
1068
1068
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
|
|
@@ -1076,14 +1076,14 @@ const He = {
|
|
|
1076
1076
|
label: "Fallback Card Types",
|
|
1077
1077
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1078
1078
|
}, null, 8, ["modelValue"]),
|
|
1079
|
-
y(
|
|
1079
|
+
y(s, {
|
|
1080
1080
|
class: "ml-4",
|
|
1081
1081
|
icon: "add",
|
|
1082
1082
|
onClick: m
|
|
1083
1083
|
})
|
|
1084
1084
|
]),
|
|
1085
1085
|
I("div", ma, [
|
|
1086
|
-
(g(!0),
|
|
1086
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
1087
1087
|
key: n,
|
|
1088
1088
|
label: n,
|
|
1089
1089
|
removable: !0,
|
|
@@ -1091,14 +1091,14 @@ const He = {
|
|
|
1091
1091
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1092
1092
|
]),
|
|
1093
1093
|
I("div", da, [
|
|
1094
|
-
l.value > -1 ? (g(),
|
|
1094
|
+
l.value > -1 ? (g(), w(s, {
|
|
1095
1095
|
key: 0,
|
|
1096
1096
|
class: "flex-1",
|
|
1097
1097
|
variant: "secondary",
|
|
1098
1098
|
label: "Delete",
|
|
1099
1099
|
onclick: () => v(l.value)
|
|
1100
|
-
}, null, 8, ["onclick"])) :
|
|
1101
|
-
y(
|
|
1100
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1101
|
+
y(s, {
|
|
1102
1102
|
type: "submit",
|
|
1103
1103
|
class: "flex-1",
|
|
1104
1104
|
variant: "primary",
|
|
@@ -1110,7 +1110,7 @@ const He = {
|
|
|
1110
1110
|
}, 512);
|
|
1111
1111
|
};
|
|
1112
1112
|
}
|
|
1113
|
-
}), va = { class: "flex items-end" }, ya = { class: "flex flex-wrap gap-8 items-center mt-4" }, fa = { class: "flex mt-6 space-x-6" }, ga = /* @__PURE__ */
|
|
1113
|
+
}), va = { class: "flex items-end" }, ya = { class: "flex flex-wrap gap-8 items-center mt-4" }, fa = { class: "flex mt-6 space-x-6" }, ga = /* @__PURE__ */ h({
|
|
1114
1114
|
__name: "NetsGateway",
|
|
1115
1115
|
props: {
|
|
1116
1116
|
terminal: {
|
|
@@ -1122,49 +1122,49 @@ const He = {
|
|
|
1122
1122
|
required: !0
|
|
1123
1123
|
}
|
|
1124
1124
|
},
|
|
1125
|
-
setup(
|
|
1126
|
-
const p =
|
|
1125
|
+
setup(F) {
|
|
1126
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1127
1127
|
ip: "",
|
|
1128
1128
|
receiptName: "",
|
|
1129
1129
|
cardTypes: []
|
|
1130
1130
|
}), d = () => {
|
|
1131
1131
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1132
1132
|
}, c = () => {
|
|
1133
|
-
var
|
|
1133
|
+
var s;
|
|
1134
1134
|
if (!a.value.ecrIntegrations)
|
|
1135
1135
|
return d();
|
|
1136
|
-
const
|
|
1136
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((u) => u && u.gateway && u.gateway === "Nets");
|
|
1137
1137
|
if (t === -1)
|
|
1138
1138
|
return d();
|
|
1139
1139
|
l.value = t;
|
|
1140
|
-
const o =
|
|
1140
|
+
const o = i.at(t);
|
|
1141
1141
|
o.gateway === "Nets" && o.config && (e.value = {
|
|
1142
1142
|
ip: o.config.ip ?? "",
|
|
1143
1143
|
receiptName: o.receiptName ?? "",
|
|
1144
|
-
cardTypes: ((
|
|
1144
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1145
1145
|
});
|
|
1146
1146
|
};
|
|
1147
|
-
|
|
1148
|
-
async function v(
|
|
1147
|
+
q(a, c), G(c);
|
|
1148
|
+
async function v(i) {
|
|
1149
1149
|
var t;
|
|
1150
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1150
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1151
1151
|
}
|
|
1152
1152
|
async function m() {
|
|
1153
1153
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1154
1154
|
}
|
|
1155
|
-
return (
|
|
1156
|
-
const o = f("FmTextField"),
|
|
1157
|
-
return g(),
|
|
1155
|
+
return (i, t) => {
|
|
1156
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1157
|
+
return g(), w(C, {
|
|
1158
1158
|
ref: b.value,
|
|
1159
1159
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1160
1160
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
1161
|
-
var n,
|
|
1161
|
+
var n, T;
|
|
1162
1162
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1163
1163
|
gateway: "Nets",
|
|
1164
1164
|
config: { ip: e.value.ip },
|
|
1165
1165
|
receiptName: e.value.receiptName,
|
|
1166
1166
|
dialogConfig: {
|
|
1167
|
-
...(
|
|
1167
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1168
1168
|
cardTypes: e.value.cardTypes
|
|
1169
1169
|
}
|
|
1170
1170
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1177,7 +1177,7 @@ const He = {
|
|
|
1177
1177
|
})), p.onUpdate(a.value);
|
|
1178
1178
|
})
|
|
1179
1179
|
}, {
|
|
1180
|
-
default:
|
|
1180
|
+
default: A(() => [
|
|
1181
1181
|
y(o, {
|
|
1182
1182
|
modelValue: e.value.ip,
|
|
1183
1183
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
|
|
@@ -1196,14 +1196,14 @@ const He = {
|
|
|
1196
1196
|
label: "Fallback Card Types",
|
|
1197
1197
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1198
1198
|
}, null, 8, ["modelValue"]),
|
|
1199
|
-
y(
|
|
1199
|
+
y(s, {
|
|
1200
1200
|
class: "ml-4",
|
|
1201
1201
|
icon: "add",
|
|
1202
1202
|
onClick: m
|
|
1203
1203
|
})
|
|
1204
1204
|
]),
|
|
1205
1205
|
I("div", ya, [
|
|
1206
|
-
(g(!0),
|
|
1206
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
1207
1207
|
key: n,
|
|
1208
1208
|
label: n,
|
|
1209
1209
|
removable: !0,
|
|
@@ -1211,14 +1211,14 @@ const He = {
|
|
|
1211
1211
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1212
1212
|
]),
|
|
1213
1213
|
I("div", fa, [
|
|
1214
|
-
l.value > -1 ? (g(),
|
|
1214
|
+
l.value > -1 ? (g(), w(s, {
|
|
1215
1215
|
key: 0,
|
|
1216
1216
|
class: "flex-1",
|
|
1217
1217
|
variant: "secondary",
|
|
1218
1218
|
label: "Delete",
|
|
1219
1219
|
onclick: () => v(l.value)
|
|
1220
|
-
}, null, 8, ["onclick"])) :
|
|
1221
|
-
y(
|
|
1220
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1221
|
+
y(s, {
|
|
1222
1222
|
type: "submit",
|
|
1223
1223
|
class: "flex-1",
|
|
1224
1224
|
variant: "primary",
|
|
@@ -1230,7 +1230,7 @@ const He = {
|
|
|
1230
1230
|
}, 512);
|
|
1231
1231
|
};
|
|
1232
1232
|
}
|
|
1233
|
-
}), ba = { class: "flex items-end" }, _a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ta = { class: "flex mt-6 space-x-6" }, Ia = /* @__PURE__ */
|
|
1233
|
+
}), ba = { class: "flex items-end" }, _a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ta = { class: "flex mt-6 space-x-6" }, Ia = /* @__PURE__ */ h({
|
|
1234
1234
|
__name: "KBankGateway",
|
|
1235
1235
|
props: {
|
|
1236
1236
|
terminal: {
|
|
@@ -1242,47 +1242,47 @@ const He = {
|
|
|
1242
1242
|
required: !0
|
|
1243
1243
|
}
|
|
1244
1244
|
},
|
|
1245
|
-
setup(
|
|
1246
|
-
const p =
|
|
1245
|
+
setup(F) {
|
|
1246
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1247
1247
|
receiptName: "",
|
|
1248
1248
|
cardTypes: []
|
|
1249
1249
|
}), d = () => {
|
|
1250
1250
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1251
1251
|
}, c = () => {
|
|
1252
|
-
var
|
|
1252
|
+
var s;
|
|
1253
1253
|
if (!a.value.ecrIntegrations)
|
|
1254
1254
|
return d();
|
|
1255
|
-
const
|
|
1255
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((u) => u && u.gateway && u.gateway === "Kbank");
|
|
1256
1256
|
if (t === -1)
|
|
1257
1257
|
return d();
|
|
1258
1258
|
l.value = t;
|
|
1259
|
-
const o =
|
|
1259
|
+
const o = i.at(t);
|
|
1260
1260
|
o.gateway === "Kbank" && o.config && (e.value = {
|
|
1261
1261
|
receiptName: o.receiptName ?? "",
|
|
1262
|
-
cardTypes: ((
|
|
1262
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1263
1263
|
});
|
|
1264
1264
|
};
|
|
1265
|
-
|
|
1266
|
-
async function v(
|
|
1265
|
+
q(a, c), G(c);
|
|
1266
|
+
async function v(i) {
|
|
1267
1267
|
var t;
|
|
1268
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1268
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1269
1269
|
}
|
|
1270
1270
|
async function m() {
|
|
1271
1271
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1272
1272
|
}
|
|
1273
|
-
return (
|
|
1274
|
-
const o = f("FmTextField"),
|
|
1275
|
-
return g(),
|
|
1273
|
+
return (i, t) => {
|
|
1274
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1275
|
+
return g(), w(C, {
|
|
1276
1276
|
ref: b.value,
|
|
1277
1277
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1278
1278
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1279
|
-
var n,
|
|
1279
|
+
var n, T;
|
|
1280
1280
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1281
1281
|
gateway: "Kbank",
|
|
1282
1282
|
config: {},
|
|
1283
1283
|
receiptName: e.value.receiptName,
|
|
1284
1284
|
dialogConfig: {
|
|
1285
|
-
...(
|
|
1285
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1286
1286
|
cardTypes: e.value.cardTypes
|
|
1287
1287
|
}
|
|
1288
1288
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1295,7 +1295,7 @@ const He = {
|
|
|
1295
1295
|
})), p.onUpdate(a.value);
|
|
1296
1296
|
})
|
|
1297
1297
|
}, {
|
|
1298
|
-
default:
|
|
1298
|
+
default: A(() => [
|
|
1299
1299
|
y(o, {
|
|
1300
1300
|
modelValue: e.value.receiptName,
|
|
1301
1301
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
|
|
@@ -1309,14 +1309,14 @@ const He = {
|
|
|
1309
1309
|
label: "Fallback Card Types",
|
|
1310
1310
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1311
1311
|
}, null, 8, ["modelValue"]),
|
|
1312
|
-
y(
|
|
1312
|
+
y(s, {
|
|
1313
1313
|
class: "ml-4",
|
|
1314
1314
|
icon: "add",
|
|
1315
1315
|
onClick: m
|
|
1316
1316
|
})
|
|
1317
1317
|
]),
|
|
1318
1318
|
I("div", _a, [
|
|
1319
|
-
(g(!0),
|
|
1319
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
1320
1320
|
key: n,
|
|
1321
1321
|
label: n,
|
|
1322
1322
|
removable: !0,
|
|
@@ -1324,14 +1324,14 @@ const He = {
|
|
|
1324
1324
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1325
1325
|
]),
|
|
1326
1326
|
I("div", Ta, [
|
|
1327
|
-
l.value > -1 ? (g(),
|
|
1327
|
+
l.value > -1 ? (g(), w(s, {
|
|
1328
1328
|
key: 0,
|
|
1329
1329
|
class: "flex-1",
|
|
1330
1330
|
variant: "secondary",
|
|
1331
1331
|
label: "Delete",
|
|
1332
1332
|
onclick: () => v(l.value)
|
|
1333
|
-
}, null, 8, ["onclick"])) :
|
|
1334
|
-
y(
|
|
1333
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1334
|
+
y(s, {
|
|
1335
1335
|
type: "submit",
|
|
1336
1336
|
class: "flex-1",
|
|
1337
1337
|
variant: "primary",
|
|
@@ -1343,7 +1343,7 @@ const He = {
|
|
|
1343
1343
|
}, 512);
|
|
1344
1344
|
};
|
|
1345
1345
|
}
|
|
1346
|
-
}), Fa = { class: "flex mt-6 space-x-6" }, wa = /* @__PURE__ */
|
|
1346
|
+
}), Fa = { class: "flex mt-6 space-x-6" }, wa = /* @__PURE__ */ h({
|
|
1347
1347
|
__name: "Ghl2Gateway",
|
|
1348
1348
|
props: {
|
|
1349
1349
|
terminal: {
|
|
@@ -1355,8 +1355,8 @@ const He = {
|
|
|
1355
1355
|
required: !0
|
|
1356
1356
|
}
|
|
1357
1357
|
},
|
|
1358
|
-
setup(
|
|
1359
|
-
const p =
|
|
1358
|
+
setup(F) {
|
|
1359
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _({
|
|
1360
1360
|
ip: "",
|
|
1361
1361
|
receiptName: ""
|
|
1362
1362
|
}), e = () => {
|
|
@@ -1368,20 +1368,20 @@ const He = {
|
|
|
1368
1368
|
if (m === -1)
|
|
1369
1369
|
return e();
|
|
1370
1370
|
l.value = m;
|
|
1371
|
-
const
|
|
1372
|
-
|
|
1373
|
-
ip:
|
|
1374
|
-
receiptName:
|
|
1371
|
+
const i = v.at(m);
|
|
1372
|
+
i.gateway === "Ghl2" && i.config && (r.value = {
|
|
1373
|
+
ip: i.config.ip ?? "",
|
|
1374
|
+
receiptName: i.receiptName ?? ""
|
|
1375
1375
|
});
|
|
1376
1376
|
};
|
|
1377
|
-
|
|
1377
|
+
q(a, d), G(d);
|
|
1378
1378
|
async function c(v) {
|
|
1379
1379
|
var m;
|
|
1380
1380
|
(m = a.value.ecrIntegrations) == null || m.splice(v, 1), p.onUpdate(a.value);
|
|
1381
1381
|
}
|
|
1382
1382
|
return (v, m) => {
|
|
1383
|
-
const
|
|
1384
|
-
return g(),
|
|
1383
|
+
const i = f("FmTextField"), t = f("FmButton"), o = f("FmForm");
|
|
1384
|
+
return g(), w(o, {
|
|
1385
1385
|
ref: b.value,
|
|
1386
1386
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1387
1387
|
onValidationSuccess: m[2] || (m[2] = () => {
|
|
@@ -1396,26 +1396,26 @@ const He = {
|
|
|
1396
1396
|
}), p.onUpdate(a.value);
|
|
1397
1397
|
})
|
|
1398
1398
|
}, {
|
|
1399
|
-
default:
|
|
1400
|
-
y(
|
|
1399
|
+
default: A(() => [
|
|
1400
|
+
y(i, {
|
|
1401
1401
|
modelValue: r.value.ip,
|
|
1402
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
1402
|
+
"onUpdate:modelValue": m[0] || (m[0] = (s) => r.value.ip = s),
|
|
1403
1403
|
label: "IP Address"
|
|
1404
1404
|
}, null, 8, ["modelValue"]),
|
|
1405
|
-
y(
|
|
1405
|
+
y(i, {
|
|
1406
1406
|
modelValue: r.value.receiptName,
|
|
1407
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
1407
|
+
"onUpdate:modelValue": m[1] || (m[1] = (s) => r.value.receiptName = s),
|
|
1408
1408
|
label: "Receipt Payment Name",
|
|
1409
1409
|
"label-info": "Default receipt display will be 'TERMINAL_GHL_2'"
|
|
1410
1410
|
}, null, 8, ["modelValue"]),
|
|
1411
1411
|
I("div", Fa, [
|
|
1412
|
-
l.value > -1 ? (g(),
|
|
1412
|
+
l.value > -1 ? (g(), w(t, {
|
|
1413
1413
|
key: 0,
|
|
1414
1414
|
class: "flex-1",
|
|
1415
1415
|
variant: "secondary",
|
|
1416
1416
|
label: "Delete",
|
|
1417
1417
|
onclick: () => c(l.value)
|
|
1418
|
-
}, null, 8, ["onclick"])) :
|
|
1418
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1419
1419
|
y(t, {
|
|
1420
1420
|
type: "submit",
|
|
1421
1421
|
class: "flex-1",
|
|
@@ -1428,7 +1428,7 @@ const He = {
|
|
|
1428
1428
|
}, 512);
|
|
1429
1429
|
};
|
|
1430
1430
|
}
|
|
1431
|
-
}), xa = { class: "flex items-end" }, Ca = { class: "flex flex-wrap gap-8 items-center mt-4" },
|
|
1431
|
+
}), xa = { class: "flex items-end" }, Ca = { class: "flex flex-wrap gap-8 items-center mt-4" }, Na = { class: "flex mt-6 space-x-6" }, ka = /* @__PURE__ */ h({
|
|
1432
1432
|
__name: "Ghl3Gateway",
|
|
1433
1433
|
props: {
|
|
1434
1434
|
terminal: {
|
|
@@ -1440,51 +1440,51 @@ const He = {
|
|
|
1440
1440
|
required: !0
|
|
1441
1441
|
}
|
|
1442
1442
|
},
|
|
1443
|
-
setup(
|
|
1444
|
-
const p =
|
|
1443
|
+
setup(F) {
|
|
1444
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1445
1445
|
receiptName: "",
|
|
1446
1446
|
config: {},
|
|
1447
1447
|
cardTypes: []
|
|
1448
1448
|
}), d = () => {
|
|
1449
1449
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1450
1450
|
}, c = () => {
|
|
1451
|
-
var
|
|
1451
|
+
var s;
|
|
1452
1452
|
if (!a.value.ecrIntegrations)
|
|
1453
1453
|
return d();
|
|
1454
|
-
const
|
|
1454
|
+
const i = a.value.ecrIntegrations, t = i.findIndex(
|
|
1455
1455
|
(u) => u && u.gateway && u.gateway === "Ghl3"
|
|
1456
1456
|
);
|
|
1457
1457
|
if (t === -1)
|
|
1458
1458
|
return d();
|
|
1459
1459
|
l.value = t;
|
|
1460
|
-
const o =
|
|
1460
|
+
const o = i.at(t);
|
|
1461
1461
|
o.gateway === "Ghl3" && o.config && (e.value = {
|
|
1462
1462
|
config: o.config,
|
|
1463
1463
|
receiptName: o.receiptName ?? "",
|
|
1464
|
-
cardTypes: ((
|
|
1464
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1465
1465
|
});
|
|
1466
1466
|
};
|
|
1467
|
-
|
|
1468
|
-
async function v(
|
|
1467
|
+
q(a, c), G(c);
|
|
1468
|
+
async function v(i) {
|
|
1469
1469
|
var t;
|
|
1470
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1470
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1471
1471
|
}
|
|
1472
1472
|
async function m() {
|
|
1473
1473
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1474
1474
|
}
|
|
1475
|
-
return (
|
|
1476
|
-
const o = f("FmTextField"),
|
|
1477
|
-
return g(),
|
|
1475
|
+
return (i, t) => {
|
|
1476
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1477
|
+
return g(), w(C, {
|
|
1478
1478
|
ref: b.value,
|
|
1479
1479
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1480
1480
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1481
|
-
var n,
|
|
1481
|
+
var n, T;
|
|
1482
1482
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1483
1483
|
gateway: "Ghl3",
|
|
1484
1484
|
config: e.value.config,
|
|
1485
1485
|
receiptName: e.value.receiptName,
|
|
1486
1486
|
dialogConfig: {
|
|
1487
|
-
...(
|
|
1487
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1488
1488
|
cardTypes: e.value.cardTypes
|
|
1489
1489
|
}
|
|
1490
1490
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1497,7 +1497,7 @@ const He = {
|
|
|
1497
1497
|
})), p.onUpdate(a.value);
|
|
1498
1498
|
})
|
|
1499
1499
|
}, {
|
|
1500
|
-
default:
|
|
1500
|
+
default: A(() => [
|
|
1501
1501
|
y(o, {
|
|
1502
1502
|
modelValue: e.value.receiptName,
|
|
1503
1503
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
|
|
@@ -1511,29 +1511,29 @@ const He = {
|
|
|
1511
1511
|
label: "Fallback Card Types",
|
|
1512
1512
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1513
1513
|
}, null, 8, ["modelValue"]),
|
|
1514
|
-
y(
|
|
1514
|
+
y(s, {
|
|
1515
1515
|
class: "ml-4",
|
|
1516
1516
|
icon: "add",
|
|
1517
1517
|
onClick: m
|
|
1518
1518
|
})
|
|
1519
1519
|
]),
|
|
1520
1520
|
I("div", Ca, [
|
|
1521
|
-
(g(!0),
|
|
1521
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
1522
1522
|
key: n,
|
|
1523
1523
|
label: n,
|
|
1524
1524
|
removable: !0,
|
|
1525
1525
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
|
|
1526
1526
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1527
1527
|
]),
|
|
1528
|
-
I("div",
|
|
1529
|
-
l.value > -1 ? (g(),
|
|
1528
|
+
I("div", Na, [
|
|
1529
|
+
l.value > -1 ? (g(), w(s, {
|
|
1530
1530
|
key: 0,
|
|
1531
1531
|
class: "flex-1",
|
|
1532
1532
|
variant: "secondary",
|
|
1533
1533
|
label: "Delete",
|
|
1534
1534
|
onclick: () => v(l.value)
|
|
1535
|
-
}, null, 8, ["onclick"])) :
|
|
1536
|
-
y(
|
|
1535
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1536
|
+
y(s, {
|
|
1537
1537
|
type: "submit",
|
|
1538
1538
|
class: "flex-1",
|
|
1539
1539
|
variant: "primary",
|
|
@@ -1545,7 +1545,7 @@ const He = {
|
|
|
1545
1545
|
}, 512);
|
|
1546
1546
|
};
|
|
1547
1547
|
}
|
|
1548
|
-
}), Va = { class: "flex items-end" }, Sa = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ua = { class: "flex mt-6 space-x-6" }, ha = /* @__PURE__ */
|
|
1548
|
+
}), Va = { class: "flex items-end" }, Sa = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ua = { class: "flex mt-6 space-x-6" }, ha = /* @__PURE__ */ h({
|
|
1549
1549
|
__name: "HlbbGateway",
|
|
1550
1550
|
props: {
|
|
1551
1551
|
terminal: {
|
|
@@ -1557,51 +1557,51 @@ const He = {
|
|
|
1557
1557
|
required: !0
|
|
1558
1558
|
}
|
|
1559
1559
|
},
|
|
1560
|
-
setup(
|
|
1561
|
-
const p =
|
|
1560
|
+
setup(F) {
|
|
1561
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1562
1562
|
receiptName: "",
|
|
1563
1563
|
config: {},
|
|
1564
1564
|
cardTypes: []
|
|
1565
1565
|
}), d = () => {
|
|
1566
1566
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1567
1567
|
}, c = () => {
|
|
1568
|
-
var
|
|
1568
|
+
var s;
|
|
1569
1569
|
if (!a.value.ecrIntegrations)
|
|
1570
1570
|
return d();
|
|
1571
|
-
const
|
|
1571
|
+
const i = a.value.ecrIntegrations, t = i.findIndex(
|
|
1572
1572
|
(u) => u && u.gateway && u.gateway === "Hlbb"
|
|
1573
1573
|
);
|
|
1574
1574
|
if (t === -1)
|
|
1575
1575
|
return d();
|
|
1576
1576
|
l.value = t;
|
|
1577
|
-
const o =
|
|
1577
|
+
const o = i.at(t);
|
|
1578
1578
|
o.gateway === "Hlbb" && o.config && (e.value = {
|
|
1579
1579
|
config: o.config,
|
|
1580
1580
|
receiptName: o.receiptName ?? "",
|
|
1581
|
-
cardTypes: ((
|
|
1581
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1582
1582
|
});
|
|
1583
1583
|
};
|
|
1584
|
-
|
|
1585
|
-
async function v(
|
|
1584
|
+
q(a, c), G(c);
|
|
1585
|
+
async function v(i) {
|
|
1586
1586
|
var t;
|
|
1587
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1587
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1588
1588
|
}
|
|
1589
1589
|
async function m() {
|
|
1590
1590
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1591
1591
|
}
|
|
1592
|
-
return (
|
|
1593
|
-
const o = f("FmTextField"),
|
|
1594
|
-
return g(),
|
|
1592
|
+
return (i, t) => {
|
|
1593
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1594
|
+
return g(), w(C, {
|
|
1595
1595
|
ref: b.value,
|
|
1596
1596
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1597
1597
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1598
|
-
var n,
|
|
1598
|
+
var n, T;
|
|
1599
1599
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1600
1600
|
gateway: "Hlbb",
|
|
1601
1601
|
config: e.value.config,
|
|
1602
1602
|
receiptName: e.value.receiptName,
|
|
1603
1603
|
dialogConfig: {
|
|
1604
|
-
...(
|
|
1604
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1605
1605
|
cardTypes: e.value.cardTypes
|
|
1606
1606
|
}
|
|
1607
1607
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1614,7 +1614,7 @@ const He = {
|
|
|
1614
1614
|
})), p.onUpdate(a.value);
|
|
1615
1615
|
})
|
|
1616
1616
|
}, {
|
|
1617
|
-
default:
|
|
1617
|
+
default: A(() => [
|
|
1618
1618
|
y(o, {
|
|
1619
1619
|
modelValue: e.value.receiptName,
|
|
1620
1620
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
|
|
@@ -1628,14 +1628,14 @@ const He = {
|
|
|
1628
1628
|
label: "Fallback Card Types",
|
|
1629
1629
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1630
1630
|
}, null, 8, ["modelValue"]),
|
|
1631
|
-
y(
|
|
1631
|
+
y(s, {
|
|
1632
1632
|
class: "ml-4",
|
|
1633
1633
|
icon: "add",
|
|
1634
1634
|
onClick: m
|
|
1635
1635
|
})
|
|
1636
1636
|
]),
|
|
1637
1637
|
I("div", Sa, [
|
|
1638
|
-
(g(!0),
|
|
1638
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
1639
1639
|
key: n,
|
|
1640
1640
|
label: n,
|
|
1641
1641
|
removable: !0,
|
|
@@ -1643,14 +1643,14 @@ const He = {
|
|
|
1643
1643
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1644
1644
|
]),
|
|
1645
1645
|
I("div", Ua, [
|
|
1646
|
-
l.value > -1 ? (g(),
|
|
1646
|
+
l.value > -1 ? (g(), w(s, {
|
|
1647
1647
|
key: 0,
|
|
1648
1648
|
class: "flex-1",
|
|
1649
1649
|
variant: "secondary",
|
|
1650
1650
|
label: "Delete",
|
|
1651
1651
|
onclick: () => v(l.value)
|
|
1652
|
-
}, null, 8, ["onclick"])) :
|
|
1653
|
-
y(
|
|
1652
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1653
|
+
y(s, {
|
|
1654
1654
|
type: "submit",
|
|
1655
1655
|
class: "flex-1",
|
|
1656
1656
|
variant: "primary",
|
|
@@ -1662,7 +1662,7 @@ const He = {
|
|
|
1662
1662
|
}, 512);
|
|
1663
1663
|
};
|
|
1664
1664
|
}
|
|
1665
|
-
}),
|
|
1665
|
+
}), Pa = { class: "flex items-end" }, Ra = { class: "flex flex-wrap gap-8 items-center mt-4" }, Oa = { class: "flex mt-6 space-x-6" }, Ba = /* @__PURE__ */ h({
|
|
1666
1666
|
__name: "GlobalPaymentsGateway",
|
|
1667
1667
|
props: {
|
|
1668
1668
|
terminal: {
|
|
@@ -1674,51 +1674,51 @@ const He = {
|
|
|
1674
1674
|
required: !0
|
|
1675
1675
|
}
|
|
1676
1676
|
},
|
|
1677
|
-
setup(
|
|
1678
|
-
const p =
|
|
1677
|
+
setup(F) {
|
|
1678
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1679
1679
|
ip: "",
|
|
1680
1680
|
receiptName: "",
|
|
1681
1681
|
cardTypes: []
|
|
1682
1682
|
}), d = () => {
|
|
1683
1683
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1684
1684
|
}, c = () => {
|
|
1685
|
-
var
|
|
1685
|
+
var s;
|
|
1686
1686
|
if (!a.value.ecrIntegrations)
|
|
1687
1687
|
return d();
|
|
1688
|
-
const
|
|
1688
|
+
const i = a.value.ecrIntegrations, t = i.findIndex(
|
|
1689
1689
|
(u) => u && u.gateway && u.gateway === "GlobalPayments"
|
|
1690
1690
|
);
|
|
1691
1691
|
if (t === -1)
|
|
1692
1692
|
return d();
|
|
1693
1693
|
l.value = t;
|
|
1694
|
-
const o =
|
|
1694
|
+
const o = i.at(t);
|
|
1695
1695
|
o.gateway === "GlobalPayments" && o.config && (e.value = {
|
|
1696
1696
|
ip: o.config.ip ?? "",
|
|
1697
1697
|
receiptName: o.receiptName ?? "",
|
|
1698
|
-
cardTypes: ((
|
|
1698
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1699
1699
|
});
|
|
1700
1700
|
};
|
|
1701
|
-
|
|
1702
|
-
async function v(
|
|
1701
|
+
q(a, c), G(c);
|
|
1702
|
+
async function v(i) {
|
|
1703
1703
|
var t;
|
|
1704
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1704
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1705
1705
|
}
|
|
1706
1706
|
async function m() {
|
|
1707
1707
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1708
1708
|
}
|
|
1709
|
-
return (
|
|
1710
|
-
const o = f("FmTextField"),
|
|
1711
|
-
return g(),
|
|
1709
|
+
return (i, t) => {
|
|
1710
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1711
|
+
return g(), w(C, {
|
|
1712
1712
|
ref: b.value,
|
|
1713
1713
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1714
1714
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
1715
|
-
var n,
|
|
1715
|
+
var n, T;
|
|
1716
1716
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1717
1717
|
gateway: "GlobalPayments",
|
|
1718
1718
|
config: { ip: e.value.ip },
|
|
1719
1719
|
receiptName: e.value.receiptName,
|
|
1720
1720
|
dialogConfig: {
|
|
1721
|
-
...(
|
|
1721
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1722
1722
|
cardTypes: e.value.cardTypes
|
|
1723
1723
|
}
|
|
1724
1724
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1731,7 +1731,7 @@ const He = {
|
|
|
1731
1731
|
})), p.onUpdate(a.value);
|
|
1732
1732
|
})
|
|
1733
1733
|
}, {
|
|
1734
|
-
default:
|
|
1734
|
+
default: A(() => [
|
|
1735
1735
|
y(o, {
|
|
1736
1736
|
modelValue: e.value.ip,
|
|
1737
1737
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
|
|
@@ -1743,36 +1743,36 @@ const He = {
|
|
|
1743
1743
|
label: "Receipt Payment Name",
|
|
1744
1744
|
"label-info": "Default receipt display will be 'TERMINAL_GP'"
|
|
1745
1745
|
}, null, 8, ["modelValue"]),
|
|
1746
|
-
I("div",
|
|
1746
|
+
I("div", Pa, [
|
|
1747
1747
|
y(o, {
|
|
1748
1748
|
modelValue: r.value,
|
|
1749
1749
|
"onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
|
|
1750
1750
|
label: "Fallback Card Types",
|
|
1751
1751
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1752
1752
|
}, null, 8, ["modelValue"]),
|
|
1753
|
-
y(
|
|
1753
|
+
y(s, {
|
|
1754
1754
|
class: "ml-4",
|
|
1755
1755
|
icon: "add",
|
|
1756
1756
|
onClick: m
|
|
1757
1757
|
})
|
|
1758
1758
|
]),
|
|
1759
|
-
I("div",
|
|
1760
|
-
(g(!0),
|
|
1759
|
+
I("div", Ra, [
|
|
1760
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
1761
1761
|
key: n,
|
|
1762
1762
|
label: n,
|
|
1763
1763
|
removable: !0,
|
|
1764
1764
|
onChipClosed: () => e.value.cardTypes.splice(e.value.cardTypes.indexOf(n), 1)
|
|
1765
1765
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1766
1766
|
]),
|
|
1767
|
-
I("div",
|
|
1768
|
-
l.value > -1 ? (g(),
|
|
1767
|
+
I("div", Oa, [
|
|
1768
|
+
l.value > -1 ? (g(), w(s, {
|
|
1769
1769
|
key: 0,
|
|
1770
1770
|
class: "flex-1",
|
|
1771
1771
|
variant: "secondary",
|
|
1772
1772
|
label: "Delete",
|
|
1773
1773
|
onclick: () => v(l.value)
|
|
1774
|
-
}, null, 8, ["onclick"])) :
|
|
1775
|
-
y(
|
|
1774
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1775
|
+
y(s, {
|
|
1776
1776
|
type: "submit",
|
|
1777
1777
|
class: "flex-1",
|
|
1778
1778
|
variant: "primary",
|
|
@@ -1784,7 +1784,7 @@ const He = {
|
|
|
1784
1784
|
}, 512);
|
|
1785
1785
|
};
|
|
1786
1786
|
}
|
|
1787
|
-
}), Ma = { class: "flex items-end" }, Aa = { class: "flex flex-wrap gap-8 items-center mt-4" }, qa = { class: "flex mt-6 space-x-6" }, Ga = /* @__PURE__ */
|
|
1787
|
+
}), Ma = { class: "flex items-end" }, Aa = { class: "flex flex-wrap gap-8 items-center mt-4" }, qa = { class: "flex mt-6 space-x-6" }, Ga = /* @__PURE__ */ h({
|
|
1788
1788
|
__name: "OmaGateway",
|
|
1789
1789
|
props: {
|
|
1790
1790
|
terminal: {
|
|
@@ -1796,49 +1796,49 @@ const He = {
|
|
|
1796
1796
|
required: !0
|
|
1797
1797
|
}
|
|
1798
1798
|
},
|
|
1799
|
-
setup(
|
|
1800
|
-
const p =
|
|
1799
|
+
setup(F) {
|
|
1800
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1801
1801
|
receiptName: "",
|
|
1802
1802
|
cardTypes: []
|
|
1803
1803
|
}), d = () => {
|
|
1804
1804
|
e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
1805
1805
|
}, c = () => {
|
|
1806
|
-
var
|
|
1806
|
+
var s;
|
|
1807
1807
|
if (!a.value.ecrIntegrations)
|
|
1808
1808
|
return d();
|
|
1809
|
-
const
|
|
1809
|
+
const i = a.value.ecrIntegrations, t = i.findIndex(
|
|
1810
1810
|
(u) => u && u.gateway && u.gateway === "Oma"
|
|
1811
1811
|
);
|
|
1812
1812
|
if (t === -1)
|
|
1813
1813
|
return d();
|
|
1814
1814
|
l.value = t;
|
|
1815
|
-
const o =
|
|
1815
|
+
const o = i.at(t);
|
|
1816
1816
|
o.gateway === "Oma" && o.config && (e.value = {
|
|
1817
1817
|
receiptName: o.receiptName ?? "",
|
|
1818
|
-
cardTypes: ((
|
|
1818
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1819
1819
|
});
|
|
1820
1820
|
};
|
|
1821
|
-
|
|
1822
|
-
async function v(
|
|
1821
|
+
q(a, c), G(c);
|
|
1822
|
+
async function v(i) {
|
|
1823
1823
|
var t;
|
|
1824
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1824
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1825
1825
|
}
|
|
1826
1826
|
async function m() {
|
|
1827
1827
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1828
1828
|
}
|
|
1829
|
-
return (
|
|
1830
|
-
const o = f("FmTextField"),
|
|
1831
|
-
return g(),
|
|
1829
|
+
return (i, t) => {
|
|
1830
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1831
|
+
return g(), w(C, {
|
|
1832
1832
|
ref: b.value,
|
|
1833
1833
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1834
1834
|
onValidationSuccess: t[2] || (t[2] = () => {
|
|
1835
|
-
var n,
|
|
1835
|
+
var n, T;
|
|
1836
1836
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
1837
1837
|
gateway: "Oma",
|
|
1838
1838
|
config: {},
|
|
1839
1839
|
receiptName: e.value.receiptName,
|
|
1840
1840
|
dialogConfig: {
|
|
1841
|
-
...(
|
|
1841
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
1842
1842
|
cardTypes: e.value.cardTypes
|
|
1843
1843
|
}
|
|
1844
1844
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1851,7 +1851,7 @@ const He = {
|
|
|
1851
1851
|
})), p.onUpdate(a.value);
|
|
1852
1852
|
})
|
|
1853
1853
|
}, {
|
|
1854
|
-
default:
|
|
1854
|
+
default: A(() => [
|
|
1855
1855
|
y(o, {
|
|
1856
1856
|
modelValue: e.value.receiptName,
|
|
1857
1857
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.receiptName = n),
|
|
@@ -1865,14 +1865,14 @@ const He = {
|
|
|
1865
1865
|
label: "Fallback Card Types",
|
|
1866
1866
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1867
1867
|
}, null, 8, ["modelValue"]),
|
|
1868
|
-
y(
|
|
1868
|
+
y(s, {
|
|
1869
1869
|
class: "ml-4",
|
|
1870
1870
|
icon: "add",
|
|
1871
1871
|
onClick: m
|
|
1872
1872
|
})
|
|
1873
1873
|
]),
|
|
1874
1874
|
I("div", Aa, [
|
|
1875
|
-
(g(!0),
|
|
1875
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
1876
1876
|
key: n,
|
|
1877
1877
|
label: n,
|
|
1878
1878
|
removable: !0,
|
|
@@ -1880,14 +1880,14 @@ const He = {
|
|
|
1880
1880
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
1881
1881
|
]),
|
|
1882
1882
|
I("div", qa, [
|
|
1883
|
-
l.value > -1 ? (g(),
|
|
1883
|
+
l.value > -1 ? (g(), w(s, {
|
|
1884
1884
|
key: 0,
|
|
1885
1885
|
class: "flex-1",
|
|
1886
1886
|
variant: "secondary",
|
|
1887
1887
|
label: "Delete",
|
|
1888
1888
|
onclick: () => v(l.value)
|
|
1889
|
-
}, null, 8, ["onclick"])) :
|
|
1890
|
-
y(
|
|
1889
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
1890
|
+
y(s, {
|
|
1891
1891
|
type: "submit",
|
|
1892
1892
|
class: "flex-1",
|
|
1893
1893
|
variant: "primary",
|
|
@@ -1899,7 +1899,7 @@ const He = {
|
|
|
1899
1899
|
}, 512);
|
|
1900
1900
|
};
|
|
1901
1901
|
}
|
|
1902
|
-
}),
|
|
1902
|
+
}), $a = { class: "flex items-end" }, Da = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ea = { class: "flex mt-6 space-x-6" }, La = /* @__PURE__ */ h({
|
|
1903
1903
|
__name: "RevenueGateway",
|
|
1904
1904
|
props: {
|
|
1905
1905
|
terminal: {
|
|
@@ -1911,45 +1911,45 @@ const He = {
|
|
|
1911
1911
|
required: !0
|
|
1912
1912
|
}
|
|
1913
1913
|
},
|
|
1914
|
-
setup(
|
|
1915
|
-
const p =
|
|
1914
|
+
setup(F) {
|
|
1915
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
1916
1916
|
receiptName: "",
|
|
1917
1917
|
ip: "",
|
|
1918
1918
|
cardTypes: []
|
|
1919
1919
|
}), d = () => {
|
|
1920
1920
|
e.value.receiptName = "", e.value.ip = "", e.value.cardTypes = [], l.value = -1;
|
|
1921
1921
|
}, c = () => {
|
|
1922
|
-
var
|
|
1922
|
+
var s;
|
|
1923
1923
|
if (!a.value.ecrIntegrations)
|
|
1924
1924
|
return d();
|
|
1925
|
-
const
|
|
1925
|
+
const i = a.value.ecrIntegrations, t = i.findIndex(
|
|
1926
1926
|
(u) => u && u.gateway && u.gateway === "Revenue"
|
|
1927
1927
|
);
|
|
1928
1928
|
if (t === -1)
|
|
1929
1929
|
return d();
|
|
1930
1930
|
l.value = t;
|
|
1931
|
-
const o =
|
|
1931
|
+
const o = i.at(t);
|
|
1932
1932
|
o.gateway === "Revenue" && o.config && (e.value = {
|
|
1933
1933
|
receiptName: o.receiptName ?? "",
|
|
1934
1934
|
ip: o.config.ip ?? "",
|
|
1935
|
-
cardTypes: ((
|
|
1935
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
1936
1936
|
});
|
|
1937
1937
|
};
|
|
1938
|
-
|
|
1939
|
-
async function v(
|
|
1938
|
+
q(a, c), G(c);
|
|
1939
|
+
async function v(i) {
|
|
1940
1940
|
var t;
|
|
1941
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1941
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
1942
1942
|
}
|
|
1943
1943
|
async function m() {
|
|
1944
1944
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
1945
1945
|
}
|
|
1946
|
-
return (
|
|
1947
|
-
const o = f("FmTextField"),
|
|
1948
|
-
return g(),
|
|
1946
|
+
return (i, t) => {
|
|
1947
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1948
|
+
return g(), w(C, {
|
|
1949
1949
|
ref: b.value,
|
|
1950
1950
|
class: "flex flex-col gap-16 w-[500px]",
|
|
1951
1951
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
1952
|
-
var
|
|
1952
|
+
var T, M;
|
|
1953
1953
|
const n = {
|
|
1954
1954
|
type: "tcp",
|
|
1955
1955
|
ip: e.value.ip
|
|
@@ -1959,7 +1959,7 @@ const He = {
|
|
|
1959
1959
|
config: n,
|
|
1960
1960
|
receiptName: e.value.receiptName,
|
|
1961
1961
|
dialogConfig: {
|
|
1962
|
-
...(
|
|
1962
|
+
...(M = (T = a.value.ecrIntegrations) == null ? void 0 : T[l.value]) == null ? void 0 : M.dialogConfig,
|
|
1963
1963
|
cardTypes: e.value.cardTypes
|
|
1964
1964
|
}
|
|
1965
1965
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -1972,7 +1972,7 @@ const He = {
|
|
|
1972
1972
|
})), p.onUpdate(a.value);
|
|
1973
1973
|
})
|
|
1974
1974
|
}, {
|
|
1975
|
-
default:
|
|
1975
|
+
default: A(() => [
|
|
1976
1976
|
y(o, {
|
|
1977
1977
|
modelValue: e.value.ip,
|
|
1978
1978
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
|
|
@@ -1985,21 +1985,21 @@ const He = {
|
|
|
1985
1985
|
label: "Receipt Payment Name",
|
|
1986
1986
|
"label-info": "Default receipt display will be 'TERMINAL_REVENUE'"
|
|
1987
1987
|
}, null, 8, ["modelValue"]),
|
|
1988
|
-
I("div",
|
|
1988
|
+
I("div", $a, [
|
|
1989
1989
|
y(o, {
|
|
1990
1990
|
modelValue: r.value,
|
|
1991
1991
|
"onUpdate:modelValue": t[2] || (t[2] = (n) => r.value = n),
|
|
1992
1992
|
label: "Fallback Card Types",
|
|
1993
1993
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
1994
1994
|
}, null, 8, ["modelValue"]),
|
|
1995
|
-
y(
|
|
1995
|
+
y(s, {
|
|
1996
1996
|
class: "ml-4",
|
|
1997
1997
|
icon: "add",
|
|
1998
1998
|
onClick: m
|
|
1999
1999
|
})
|
|
2000
2000
|
]),
|
|
2001
|
-
I("div",
|
|
2002
|
-
(g(!0),
|
|
2001
|
+
I("div", Da, [
|
|
2002
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
2003
2003
|
key: n,
|
|
2004
2004
|
label: n,
|
|
2005
2005
|
removable: !0,
|
|
@@ -2007,14 +2007,14 @@ const He = {
|
|
|
2007
2007
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
2008
2008
|
]),
|
|
2009
2009
|
I("div", Ea, [
|
|
2010
|
-
l.value > -1 ? (g(),
|
|
2010
|
+
l.value > -1 ? (g(), w(s, {
|
|
2011
2011
|
key: 0,
|
|
2012
2012
|
class: "flex-1",
|
|
2013
2013
|
variant: "secondary",
|
|
2014
2014
|
label: "Delete",
|
|
2015
2015
|
onclick: () => v(l.value)
|
|
2016
|
-
}, null, 8, ["onclick"])) :
|
|
2017
|
-
y(
|
|
2016
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
2017
|
+
y(s, {
|
|
2018
2018
|
type: "submit",
|
|
2019
2019
|
class: "flex-1",
|
|
2020
2020
|
variant: "primary",
|
|
@@ -2029,7 +2029,7 @@ const He = {
|
|
|
2029
2029
|
}), Ya = {
|
|
2030
2030
|
key: 0,
|
|
2031
2031
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
2032
|
-
}, ja = { class: "flex mt-6 space-x-6" }, Ka = /* @__PURE__ */
|
|
2032
|
+
}, ja = { class: "flex mt-6 space-x-6" }, Ka = /* @__PURE__ */ h({
|
|
2033
2033
|
__name: "BeamGateway",
|
|
2034
2034
|
props: {
|
|
2035
2035
|
terminal: {
|
|
@@ -2041,8 +2041,8 @@ const He = {
|
|
|
2041
2041
|
required: !0
|
|
2042
2042
|
}
|
|
2043
2043
|
},
|
|
2044
|
-
setup(
|
|
2045
|
-
const { isLoading: p, startAsyncCall: a } =
|
|
2044
|
+
setup(F) {
|
|
2045
|
+
const { isLoading: p, startAsyncCall: a } = J(), b = F, l = D(() => b.terminal), r = _(), e = _(), d = _(-1), c = _({
|
|
2046
2046
|
externalTerminalId: ""
|
|
2047
2047
|
}), v = () => {
|
|
2048
2048
|
c.value.externalTerminalId = "", d.value = -1;
|
|
@@ -2058,48 +2058,48 @@ const He = {
|
|
|
2058
2058
|
if (o === -1)
|
|
2059
2059
|
return v();
|
|
2060
2060
|
d.value = o;
|
|
2061
|
-
const
|
|
2062
|
-
|
|
2063
|
-
externalTerminalId:
|
|
2061
|
+
const s = b.terminal.ecrs.at(o);
|
|
2062
|
+
s.gateway === "Beam" && s.config && (c.value = {
|
|
2063
|
+
externalTerminalId: s.config.externalTerminalId
|
|
2064
2064
|
});
|
|
2065
2065
|
};
|
|
2066
|
-
|
|
2067
|
-
const
|
|
2066
|
+
q(l, m), G(m);
|
|
2067
|
+
const i = S(() => (r.value ?? []).map((o) => ({
|
|
2068
2068
|
label: o.status === "READY" ? o.name : `${o.name} (unpaired)`,
|
|
2069
2069
|
value: o._id
|
|
2070
2070
|
})));
|
|
2071
2071
|
async function t(o) {
|
|
2072
|
-
var
|
|
2073
|
-
(
|
|
2072
|
+
var s;
|
|
2073
|
+
(s = b.terminal.ecrs) == null || s.splice(o, 1), b.onUpdate(b.terminal);
|
|
2074
2074
|
}
|
|
2075
|
-
return (o,
|
|
2076
|
-
const u = f("FmCircularProgress"), C = f("FmSelect"), n = f("FmButton"),
|
|
2077
|
-
return
|
|
2075
|
+
return (o, s) => {
|
|
2076
|
+
const u = f("FmCircularProgress"), C = f("FmSelect"), n = f("FmButton"), T = f("FmForm");
|
|
2077
|
+
return V(p) ? (g(), k("div", Ya, [
|
|
2078
2078
|
y(u, { size: "xxl" })
|
|
2079
|
-
])) : (g(),
|
|
2079
|
+
])) : (g(), w(T, {
|
|
2080
2080
|
key: 1,
|
|
2081
2081
|
ref: e.value,
|
|
2082
2082
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2083
|
-
onValidationSuccess:
|
|
2083
|
+
onValidationSuccess: s[1] || (s[1] = () => {
|
|
2084
2084
|
d.value > -1 ? l.value.ecrs[d.value] = { gateway: "Beam", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "Beam", config: c.value })), b.onUpdate(l.value);
|
|
2085
2085
|
})
|
|
2086
2086
|
}, {
|
|
2087
|
-
default:
|
|
2087
|
+
default: A(() => [
|
|
2088
2088
|
y(C, {
|
|
2089
2089
|
modelValue: c.value.externalTerminalId,
|
|
2090
|
-
"onUpdate:modelValue":
|
|
2090
|
+
"onUpdate:modelValue": s[0] || (s[0] = (M) => c.value.externalTerminalId = M),
|
|
2091
2091
|
label: "External Terminal",
|
|
2092
|
-
items:
|
|
2093
|
-
rules:
|
|
2092
|
+
items: i.value,
|
|
2093
|
+
rules: V(ee)(V(ae).string().min(1, "External terminal is required"))
|
|
2094
2094
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
2095
2095
|
I("div", ja, [
|
|
2096
|
-
d.value > -1 ? (g(),
|
|
2096
|
+
d.value > -1 ? (g(), w(n, {
|
|
2097
2097
|
key: 0,
|
|
2098
2098
|
class: "flex-1",
|
|
2099
2099
|
variant: "secondary",
|
|
2100
2100
|
label: "Delete",
|
|
2101
2101
|
onclick: () => t(d.value)
|
|
2102
|
-
}, null, 8, ["onclick"])) :
|
|
2102
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
2103
2103
|
y(n, {
|
|
2104
2104
|
type: "submit",
|
|
2105
2105
|
class: "flex-1",
|
|
@@ -2115,7 +2115,7 @@ const He = {
|
|
|
2115
2115
|
}), Ha = {
|
|
2116
2116
|
key: 0,
|
|
2117
2117
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
2118
|
-
}, za = { class: "flex mt-6 space-x-6" }, Qa = /* @__PURE__ */
|
|
2118
|
+
}, za = { class: "flex mt-6 space-x-6" }, Qa = /* @__PURE__ */ h({
|
|
2119
2119
|
__name: "BriGateway",
|
|
2120
2120
|
props: {
|
|
2121
2121
|
terminal: {
|
|
@@ -2127,8 +2127,8 @@ const He = {
|
|
|
2127
2127
|
required: !0
|
|
2128
2128
|
}
|
|
2129
2129
|
},
|
|
2130
|
-
setup(
|
|
2131
|
-
const { isLoading: p, startAsyncCall: a } =
|
|
2130
|
+
setup(F) {
|
|
2131
|
+
const { isLoading: p, startAsyncCall: a } = J(), b = F, l = D(() => b.terminal), r = _(), e = _(), d = _(-1), c = _({
|
|
2132
2132
|
externalTerminalId: ""
|
|
2133
2133
|
}), v = () => {
|
|
2134
2134
|
c.value.externalTerminalId = "", d.value = -1;
|
|
@@ -2140,29 +2140,29 @@ const He = {
|
|
|
2140
2140
|
);
|
|
2141
2141
|
}), !b.terminal.ecrs)
|
|
2142
2142
|
return v();
|
|
2143
|
-
const
|
|
2144
|
-
if (
|
|
2143
|
+
const s = b.terminal.ecrs.findIndex((C) => C && C.gateway && C.gateway === "Bri");
|
|
2144
|
+
if (s === -1)
|
|
2145
2145
|
return v();
|
|
2146
|
-
d.value =
|
|
2147
|
-
const u = b.terminal.ecrs.at(
|
|
2146
|
+
d.value = s;
|
|
2147
|
+
const u = b.terminal.ecrs.at(s);
|
|
2148
2148
|
u.gateway === "Bri" && u.config && (c.value = {
|
|
2149
2149
|
externalTerminalId: u.config.externalTerminalId
|
|
2150
2150
|
});
|
|
2151
2151
|
};
|
|
2152
|
-
|
|
2153
|
-
const
|
|
2154
|
-
if (
|
|
2152
|
+
q(l, m), G(m);
|
|
2153
|
+
const i = S(() => (r.value ?? []).filter((s) => s.status === "READY").map((s) => ({ label: s.name, value: s._id }))), t = S(() => {
|
|
2154
|
+
if (i.value.length === 0)
|
|
2155
2155
|
return "Please pair one BRI terminal under External Terminals before applying here.";
|
|
2156
2156
|
});
|
|
2157
|
-
async function o(
|
|
2157
|
+
async function o(s) {
|
|
2158
2158
|
var u;
|
|
2159
|
-
(u = b.terminal.ecrs) == null || u.splice(
|
|
2159
|
+
(u = b.terminal.ecrs) == null || u.splice(s, 1), b.onUpdate(b.terminal);
|
|
2160
2160
|
}
|
|
2161
|
-
return (
|
|
2162
|
-
const C = f("FmCircularProgress"), n = f("FmSelect"),
|
|
2163
|
-
return
|
|
2161
|
+
return (s, u) => {
|
|
2162
|
+
const C = f("FmCircularProgress"), n = f("FmSelect"), T = f("FmButton"), M = f("FmForm");
|
|
2163
|
+
return V(p) ? (g(), k("div", Ha, [
|
|
2164
2164
|
y(C, { size: "xxl" })
|
|
2165
|
-
])) : (g(),
|
|
2165
|
+
])) : (g(), w(M, {
|
|
2166
2166
|
key: 1,
|
|
2167
2167
|
ref: e.value,
|
|
2168
2168
|
class: "flex flex-col gap-16 w-[500px]",
|
|
@@ -2170,24 +2170,24 @@ const He = {
|
|
|
2170
2170
|
d.value > -1 ? l.value.ecrs[d.value] = { gateway: "Bri", config: c.value } : (l.value.ecrs || (l.value.ecrs = []), l.value.ecrs.push({ gateway: "Bri", config: c.value })), b.onUpdate(l.value);
|
|
2171
2171
|
})
|
|
2172
2172
|
}, {
|
|
2173
|
-
default:
|
|
2173
|
+
default: A(() => [
|
|
2174
2174
|
y(n, {
|
|
2175
2175
|
modelValue: c.value.externalTerminalId,
|
|
2176
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
2176
|
+
"onUpdate:modelValue": u[0] || (u[0] = (x) => c.value.externalTerminalId = x),
|
|
2177
2177
|
label: "External Terminal",
|
|
2178
|
-
items:
|
|
2178
|
+
items: i.value,
|
|
2179
2179
|
"helper-text": t.value,
|
|
2180
|
-
rules:
|
|
2180
|
+
rules: V(ee)(V(ae).string().min(1, "External terminal is required"))
|
|
2181
2181
|
}, null, 8, ["modelValue", "items", "helper-text", "rules"]),
|
|
2182
2182
|
I("div", za, [
|
|
2183
|
-
d.value > -1 ? (g(),
|
|
2183
|
+
d.value > -1 ? (g(), w(T, {
|
|
2184
2184
|
key: 0,
|
|
2185
2185
|
class: "flex-1",
|
|
2186
2186
|
variant: "secondary",
|
|
2187
2187
|
label: "Delete",
|
|
2188
2188
|
onclick: () => o(d.value)
|
|
2189
|
-
}, null, 8, ["onclick"])) :
|
|
2190
|
-
y(
|
|
2189
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
2190
|
+
y(T, {
|
|
2191
2191
|
type: "submit",
|
|
2192
2192
|
class: "flex-1",
|
|
2193
2193
|
variant: "primary",
|
|
@@ -2199,7 +2199,7 @@ const He = {
|
|
|
2199
2199
|
}, 512));
|
|
2200
2200
|
};
|
|
2201
2201
|
}
|
|
2202
|
-
}), Ja = { class: "flex items-end" }, Wa = { class: "flex flex-wrap gap-8 items-center mt-4" }, Xa = { class: "flex mt-6 space-x-6" }, Za = /* @__PURE__ */
|
|
2202
|
+
}), Ja = { class: "flex items-end" }, Wa = { class: "flex flex-wrap gap-8 items-center mt-4" }, Xa = { class: "flex mt-6 space-x-6" }, Za = /* @__PURE__ */ h({
|
|
2203
2203
|
__name: "PbbGateway",
|
|
2204
2204
|
props: {
|
|
2205
2205
|
terminal: {
|
|
@@ -2211,49 +2211,49 @@ const He = {
|
|
|
2211
2211
|
required: !0
|
|
2212
2212
|
}
|
|
2213
2213
|
},
|
|
2214
|
-
setup(
|
|
2215
|
-
const p =
|
|
2214
|
+
setup(F) {
|
|
2215
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _(), e = _({
|
|
2216
2216
|
ip: "",
|
|
2217
2217
|
receiptName: "",
|
|
2218
2218
|
cardTypes: []
|
|
2219
2219
|
}), d = () => {
|
|
2220
2220
|
e.value.ip = "", e.value.receiptName = "", e.value.cardTypes = [], l.value = -1;
|
|
2221
2221
|
}, c = () => {
|
|
2222
|
-
var
|
|
2222
|
+
var s;
|
|
2223
2223
|
if (!a.value.ecrIntegrations)
|
|
2224
2224
|
return d();
|
|
2225
|
-
const
|
|
2225
|
+
const i = a.value.ecrIntegrations, t = i.findIndex((u) => u && u.gateway && u.gateway === "Pbb");
|
|
2226
2226
|
if (t === -1)
|
|
2227
2227
|
return d();
|
|
2228
2228
|
l.value = t;
|
|
2229
|
-
const o =
|
|
2229
|
+
const o = i.at(t);
|
|
2230
2230
|
o.gateway === "Pbb" && o.config && (e.value = {
|
|
2231
2231
|
ip: o.config.ip ?? "",
|
|
2232
2232
|
receiptName: o.receiptName ?? "",
|
|
2233
|
-
cardTypes: ((
|
|
2233
|
+
cardTypes: ((s = o.dialogConfig) == null ? void 0 : s.cardTypes) ?? []
|
|
2234
2234
|
});
|
|
2235
2235
|
};
|
|
2236
|
-
|
|
2237
|
-
async function v(
|
|
2236
|
+
q(a, c), G(c);
|
|
2237
|
+
async function v(i) {
|
|
2238
2238
|
var t;
|
|
2239
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
2239
|
+
(t = a.value.ecrIntegrations) == null || t.splice(i, 1), p.onUpdate(a.value);
|
|
2240
2240
|
}
|
|
2241
2241
|
async function m() {
|
|
2242
2242
|
e.value.cardTypes.push(r.value), r.value = "";
|
|
2243
2243
|
}
|
|
2244
|
-
return (
|
|
2245
|
-
const o = f("FmTextField"),
|
|
2246
|
-
return g(),
|
|
2244
|
+
return (i, t) => {
|
|
2245
|
+
const o = f("FmTextField"), s = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
2246
|
+
return g(), w(C, {
|
|
2247
2247
|
ref: b.value,
|
|
2248
2248
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2249
2249
|
onValidationSuccess: t[3] || (t[3] = () => {
|
|
2250
|
-
var n,
|
|
2250
|
+
var n, T;
|
|
2251
2251
|
l.value > -1 ? a.value.ecrIntegrations[l.value] = {
|
|
2252
2252
|
gateway: "Pbb",
|
|
2253
2253
|
config: { ip: e.value.ip },
|
|
2254
2254
|
receiptName: e.value.receiptName,
|
|
2255
2255
|
dialogConfig: {
|
|
2256
|
-
...(
|
|
2256
|
+
...(T = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : T.dialogConfig,
|
|
2257
2257
|
cardTypes: e.value.cardTypes
|
|
2258
2258
|
}
|
|
2259
2259
|
} : (a.value.ecrIntegrations || (a.value.ecrIntegrations = []), a.value.ecrIntegrations.push({
|
|
@@ -2266,7 +2266,7 @@ const He = {
|
|
|
2266
2266
|
})), p.onUpdate(a.value);
|
|
2267
2267
|
})
|
|
2268
2268
|
}, {
|
|
2269
|
-
default:
|
|
2269
|
+
default: A(() => [
|
|
2270
2270
|
y(o, {
|
|
2271
2271
|
modelValue: e.value.ip,
|
|
2272
2272
|
"onUpdate:modelValue": t[0] || (t[0] = (n) => e.value.ip = n),
|
|
@@ -2285,14 +2285,14 @@ const He = {
|
|
|
2285
2285
|
label: "Fallback Card Types",
|
|
2286
2286
|
"label-info": "List of cards when fallback to reconcile dialog. Default VISA, MASTER"
|
|
2287
2287
|
}, null, 8, ["modelValue"]),
|
|
2288
|
-
y(
|
|
2288
|
+
y(s, {
|
|
2289
2289
|
class: "ml-4",
|
|
2290
2290
|
icon: "add",
|
|
2291
2291
|
onClick: m
|
|
2292
2292
|
})
|
|
2293
2293
|
]),
|
|
2294
2294
|
I("div", Wa, [
|
|
2295
|
-
(g(!0),
|
|
2295
|
+
(g(!0), k(E, null, L(e.value.cardTypes, (n) => (g(), w(u, {
|
|
2296
2296
|
key: n,
|
|
2297
2297
|
label: n,
|
|
2298
2298
|
removable: !0,
|
|
@@ -2300,14 +2300,14 @@ const He = {
|
|
|
2300
2300
|
}, null, 8, ["label", "onChipClosed"]))), 128))
|
|
2301
2301
|
]),
|
|
2302
2302
|
I("div", Xa, [
|
|
2303
|
-
l.value > -1 ? (g(),
|
|
2303
|
+
l.value > -1 ? (g(), w(s, {
|
|
2304
2304
|
key: 0,
|
|
2305
2305
|
class: "flex-1",
|
|
2306
2306
|
variant: "secondary",
|
|
2307
2307
|
label: "Delete",
|
|
2308
2308
|
onclick: () => v(l.value)
|
|
2309
|
-
}, null, 8, ["onclick"])) :
|
|
2310
|
-
y(
|
|
2309
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
2310
|
+
y(s, {
|
|
2311
2311
|
type: "submit",
|
|
2312
2312
|
class: "flex-1",
|
|
2313
2313
|
variant: "primary",
|
|
@@ -2319,7 +2319,127 @@ const He = {
|
|
|
2319
2319
|
}, 512);
|
|
2320
2320
|
};
|
|
2321
2321
|
}
|
|
2322
|
-
}), et = {
|
|
2322
|
+
}), et = {
|
|
2323
|
+
key: 0,
|
|
2324
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
|
2325
|
+
}, at = {
|
|
2326
|
+
key: 0,
|
|
2327
|
+
class: "text-sm text-fm-color-typo-error"
|
|
2328
|
+
}, tt = {
|
|
2329
|
+
key: 1,
|
|
2330
|
+
class: "text-sm text-gray-600"
|
|
2331
|
+
}, lt = { class: "font-medium" }, nt = { class: "flex mt-6 space-x-6" }, ot = /* @__PURE__ */ h({
|
|
2332
|
+
__name: "TeyaGateway",
|
|
2333
|
+
props: {
|
|
2334
|
+
terminal: {
|
|
2335
|
+
type: Object,
|
|
2336
|
+
required: !0
|
|
2337
|
+
},
|
|
2338
|
+
onUpdate: {
|
|
2339
|
+
type: Function,
|
|
2340
|
+
required: !0
|
|
2341
|
+
}
|
|
2342
|
+
},
|
|
2343
|
+
setup(F) {
|
|
2344
|
+
const { isLoading: p, startAsyncCall: a } = J(), b = se(), l = F, r = D(() => l.terminal), e = _([]), d = _(), c = _(""), v = _(), m = _(-1), i = _({
|
|
2345
|
+
terminalId: "",
|
|
2346
|
+
serialNumber: "",
|
|
2347
|
+
terminalName: ""
|
|
2348
|
+
}), t = () => {
|
|
2349
|
+
i.value = { terminalId: "", serialNumber: "", terminalName: "" }, m.value = -1;
|
|
2350
|
+
};
|
|
2351
|
+
function o() {
|
|
2352
|
+
a(async () => {
|
|
2353
|
+
try {
|
|
2354
|
+
const n = await Y.getTeyaTerminals(l.terminal._id);
|
|
2355
|
+
e.value = n.results, d.value = n.storeName, c.value = "";
|
|
2356
|
+
} catch (n) {
|
|
2357
|
+
e.value = [], c.value = Q(n), b.open({ type: "error", message: c.value });
|
|
2358
|
+
}
|
|
2359
|
+
});
|
|
2360
|
+
}
|
|
2361
|
+
const s = () => {
|
|
2362
|
+
var M;
|
|
2363
|
+
o();
|
|
2364
|
+
const n = ((M = l.terminal.ecrs) == null ? void 0 : M.findIndex((x) => (x == null ? void 0 : x.gateway) === "Teya")) ?? -1;
|
|
2365
|
+
if (n === -1)
|
|
2366
|
+
return t();
|
|
2367
|
+
m.value = n;
|
|
2368
|
+
const T = l.terminal.ecrs.at(n);
|
|
2369
|
+
T.gateway !== "Teya" || !T.config || (i.value = { ...T.config });
|
|
2370
|
+
};
|
|
2371
|
+
q(r, s), G(s);
|
|
2372
|
+
const u = S(() => {
|
|
2373
|
+
const n = e.value.map((T) => ({
|
|
2374
|
+
label: [T.serialNumber ?? T.terminalId, T.terminalName].filter(Boolean).join(" · "),
|
|
2375
|
+
value: T.terminalId
|
|
2376
|
+
}));
|
|
2377
|
+
return i.value.terminalId && !n.some((T) => T.value === i.value.terminalId) && n.push({
|
|
2378
|
+
label: `${i.value.serialNumber ?? i.value.terminalId} (not in Teya store)`,
|
|
2379
|
+
value: i.value.terminalId
|
|
2380
|
+
}), n;
|
|
2381
|
+
});
|
|
2382
|
+
q(() => i.value.terminalId, (n) => {
|
|
2383
|
+
const T = e.value.find((M) => M.terminalId === n);
|
|
2384
|
+
T && (i.value.serialNumber = T.serialNumber, i.value.terminalName = T.terminalName);
|
|
2385
|
+
});
|
|
2386
|
+
async function C(n) {
|
|
2387
|
+
var T;
|
|
2388
|
+
(T = l.terminal.ecrs) == null || T.splice(n, 1), l.onUpdate(l.terminal);
|
|
2389
|
+
}
|
|
2390
|
+
return (n, T) => {
|
|
2391
|
+
const M = f("FmCircularProgress"), x = f("FmSelect"), N = f("FmButton"), O = f("FmForm");
|
|
2392
|
+
return V(p) ? (g(), k("div", et, [
|
|
2393
|
+
y(M, { size: "xxl" })
|
|
2394
|
+
])) : (g(), w(O, {
|
|
2395
|
+
key: 1,
|
|
2396
|
+
ref: v.value,
|
|
2397
|
+
class: "flex flex-col gap-16 w-[500px]",
|
|
2398
|
+
onValidationSuccess: T[1] || (T[1] = () => {
|
|
2399
|
+
m.value > -1 ? r.value.ecrs[m.value] = { gateway: "Teya", config: i.value } : (r.value.ecrs || (r.value.ecrs = []), r.value.ecrs.push({ gateway: "Teya", config: i.value })), l.onUpdate(r.value);
|
|
2400
|
+
})
|
|
2401
|
+
}, {
|
|
2402
|
+
default: A(() => [
|
|
2403
|
+
c.value ? (g(), k("p", at, K(c.value) + ". Connect the restaurant's Teya account and select a store in Payment Onboarding first. ", 1)) : d.value ? (g(), k("p", tt, [
|
|
2404
|
+
T[2] || (T[2] = Z(" Teya store: ", -1)),
|
|
2405
|
+
I("span", lt, K(d.value), 1)
|
|
2406
|
+
])) : U("", !0),
|
|
2407
|
+
y(x, {
|
|
2408
|
+
modelValue: i.value.terminalId,
|
|
2409
|
+
"onUpdate:modelValue": T[0] || (T[0] = ($) => i.value.terminalId = $),
|
|
2410
|
+
label: "Teya Card Machine",
|
|
2411
|
+
items: u.value,
|
|
2412
|
+
rules: V(ee)(V(ae).string().min(1, "Card machine is required"))
|
|
2413
|
+
}, null, 8, ["modelValue", "items", "rules"]),
|
|
2414
|
+
T[3] || (T[3] = I("p", { class: "text-xs text-gray-500" }, " Enable Cloud communication on the card machine: Settings, POS integrations, External ePOS integrations. ", -1)),
|
|
2415
|
+
I("div", nt, [
|
|
2416
|
+
y(N, {
|
|
2417
|
+
class: "flex-1",
|
|
2418
|
+
variant: "tertiary",
|
|
2419
|
+
"prepend-icon": "sync",
|
|
2420
|
+
label: "Sync",
|
|
2421
|
+
onclick: o
|
|
2422
|
+
}),
|
|
2423
|
+
m.value > -1 ? (g(), w(N, {
|
|
2424
|
+
key: 0,
|
|
2425
|
+
class: "flex-1",
|
|
2426
|
+
variant: "secondary",
|
|
2427
|
+
label: "Delete",
|
|
2428
|
+
onclick: () => C(m.value)
|
|
2429
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
2430
|
+
y(N, {
|
|
2431
|
+
type: "submit",
|
|
2432
|
+
class: "flex-1",
|
|
2433
|
+
variant: "primary",
|
|
2434
|
+
label: "Save"
|
|
2435
|
+
})
|
|
2436
|
+
])
|
|
2437
|
+
]),
|
|
2438
|
+
_: 1
|
|
2439
|
+
}, 512));
|
|
2440
|
+
};
|
|
2441
|
+
}
|
|
2442
|
+
}), rt = { class: "flex items-center" }, st = { class: "w-[260px] self-start" }, it = { class: "flex-1" }, ut = /* @__PURE__ */ h({
|
|
2323
2443
|
__name: "EcrGateway",
|
|
2324
2444
|
props: {
|
|
2325
2445
|
terminal: {
|
|
@@ -2331,9 +2451,9 @@ const He = {
|
|
|
2331
2451
|
required: !0
|
|
2332
2452
|
}
|
|
2333
2453
|
},
|
|
2334
|
-
setup(
|
|
2454
|
+
setup(F) {
|
|
2335
2455
|
var d;
|
|
2336
|
-
const p =
|
|
2456
|
+
const p = F, a = [
|
|
2337
2457
|
{
|
|
2338
2458
|
label: "FeedMe Terminal",
|
|
2339
2459
|
value: "terminal",
|
|
@@ -2343,121 +2463,127 @@ const He = {
|
|
|
2343
2463
|
label: "GHL Terminal",
|
|
2344
2464
|
value: "ghl",
|
|
2345
2465
|
render: aa,
|
|
2346
|
-
region: [
|
|
2466
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2347
2467
|
},
|
|
2348
2468
|
{
|
|
2349
2469
|
label: "GHL2 Terminal",
|
|
2350
2470
|
value: "ghl2",
|
|
2351
2471
|
render: wa,
|
|
2352
|
-
region: [
|
|
2472
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2353
2473
|
},
|
|
2354
2474
|
{
|
|
2355
2475
|
label: "ITB Maybank Terminal",
|
|
2356
2476
|
value: "mb-itb",
|
|
2357
2477
|
render: oa,
|
|
2358
|
-
region: [
|
|
2478
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2359
2479
|
},
|
|
2360
2480
|
{
|
|
2361
2481
|
label: "PMA Maybank Terminal",
|
|
2362
2482
|
value: "mb-pma",
|
|
2363
2483
|
render: ua,
|
|
2364
|
-
region: [
|
|
2484
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2365
2485
|
},
|
|
2366
2486
|
{
|
|
2367
2487
|
label: "Paysys Maybank Terminal",
|
|
2368
2488
|
value: "mb-paysys",
|
|
2369
2489
|
render: pa,
|
|
2370
|
-
region: [
|
|
2490
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2371
2491
|
},
|
|
2372
2492
|
{
|
|
2373
2493
|
label: "Nets Terminal",
|
|
2374
2494
|
value: "nets",
|
|
2375
2495
|
render: ga,
|
|
2376
|
-
region: [
|
|
2496
|
+
region: [R.F_COUNTRY.enum.SG]
|
|
2377
2497
|
},
|
|
2378
2498
|
{
|
|
2379
2499
|
label: "KBank Terminal",
|
|
2380
2500
|
value: "kbank",
|
|
2381
2501
|
render: Ia,
|
|
2382
|
-
region: [
|
|
2502
|
+
region: [R.F_COUNTRY.enum.TH]
|
|
2383
2503
|
},
|
|
2384
2504
|
{
|
|
2385
2505
|
label: "GHL Terminal",
|
|
2386
2506
|
value: "ghl3",
|
|
2387
|
-
render:
|
|
2388
|
-
region: [
|
|
2507
|
+
render: ka,
|
|
2508
|
+
region: [R.F_COUNTRY.enum.TH]
|
|
2389
2509
|
},
|
|
2390
2510
|
{
|
|
2391
2511
|
label: "Paysys HLBB Terminal",
|
|
2392
2512
|
value: "hlbb",
|
|
2393
2513
|
render: ha,
|
|
2394
|
-
region: [
|
|
2514
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2395
2515
|
},
|
|
2396
2516
|
{
|
|
2397
2517
|
label: "GPAP Terminal",
|
|
2398
2518
|
value: "globalpayments",
|
|
2399
|
-
render:
|
|
2400
|
-
region: [
|
|
2519
|
+
render: Ba,
|
|
2520
|
+
region: [R.F_COUNTRY.enum.SG]
|
|
2401
2521
|
},
|
|
2402
2522
|
{
|
|
2403
2523
|
label: "OMA Terminal",
|
|
2404
2524
|
value: "oma",
|
|
2405
2525
|
render: Ga,
|
|
2406
|
-
region: [
|
|
2526
|
+
region: [R.F_COUNTRY.enum.PK]
|
|
2407
2527
|
},
|
|
2408
2528
|
{
|
|
2409
2529
|
label: "Revenue PBB Terminal",
|
|
2410
2530
|
value: "revenue",
|
|
2411
2531
|
render: La,
|
|
2412
|
-
region: [
|
|
2532
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2413
2533
|
},
|
|
2414
2534
|
{
|
|
2415
2535
|
label: "Paysys PBB Terminal",
|
|
2416
2536
|
value: "pbb",
|
|
2417
2537
|
render: Za,
|
|
2418
|
-
region: [
|
|
2538
|
+
region: [R.F_COUNTRY.enum.MY]
|
|
2419
2539
|
},
|
|
2420
2540
|
{
|
|
2421
2541
|
label: "Beam Terminal",
|
|
2422
2542
|
value: "beam",
|
|
2423
2543
|
render: Ka,
|
|
2424
|
-
region: [
|
|
2544
|
+
region: [R.F_COUNTRY.enum.TH]
|
|
2425
2545
|
},
|
|
2426
2546
|
{
|
|
2427
2547
|
label: "BRI Terminal",
|
|
2428
2548
|
value: "bri",
|
|
2429
2549
|
render: Qa,
|
|
2430
|
-
region: [
|
|
2550
|
+
region: [R.F_COUNTRY.enum.ID]
|
|
2551
|
+
},
|
|
2552
|
+
{
|
|
2553
|
+
label: "Teya Terminal",
|
|
2554
|
+
value: "teya",
|
|
2555
|
+
render: ot,
|
|
2556
|
+
region: [R.F_COUNTRY.enum.GB]
|
|
2431
2557
|
}
|
|
2432
|
-
], b =
|
|
2433
|
-
(c) => !c.region || c.region.includes(l.value ??
|
|
2434
|
-
)), { gatewayTab: e } =
|
|
2558
|
+
], b = S(() => a.find((c) => c.value === e.value)), l = ue().currentCountry, r = S(() => a.filter(
|
|
2559
|
+
(c) => !c.region || c.region.includes(l.value ?? R.F_COUNTRY.enum.MY)
|
|
2560
|
+
)), { gatewayTab: e } = re({
|
|
2435
2561
|
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
2436
2562
|
});
|
|
2437
2563
|
return (c, v) => {
|
|
2438
|
-
var
|
|
2564
|
+
var i;
|
|
2439
2565
|
const m = f("FmTabs");
|
|
2440
|
-
return g(),
|
|
2441
|
-
I("div",
|
|
2566
|
+
return g(), k("div", rt, [
|
|
2567
|
+
I("div", st, [
|
|
2442
2568
|
y(m, {
|
|
2443
|
-
"model-value":
|
|
2444
|
-
"onUpdate:modelValue": v[0] || (v[0] = (t) =>
|
|
2569
|
+
"model-value": V(e),
|
|
2570
|
+
"onUpdate:modelValue": v[0] || (v[0] = (t) => te(e) ? e.value = t : null),
|
|
2445
2571
|
class: "mb-6",
|
|
2446
2572
|
vertical: !0,
|
|
2447
2573
|
items: r.value,
|
|
2448
2574
|
"show-more-at": Number.POSITIVE_INFINITY
|
|
2449
2575
|
}, null, 8, ["model-value", "items", "show-more-at"])
|
|
2450
2576
|
]),
|
|
2451
|
-
I("div",
|
|
2452
|
-
|
|
2577
|
+
I("div", it, [
|
|
2578
|
+
V(e) ? (g(), w(le((i = b.value) == null ? void 0 : i.render), ne(oe({ key: 0 }, {
|
|
2453
2579
|
terminal: p.terminal,
|
|
2454
2580
|
onUpdate: p.onUpdate
|
|
2455
|
-
})), null, 16)) :
|
|
2581
|
+
})), null, 16)) : U("", !0)
|
|
2456
2582
|
])
|
|
2457
2583
|
]);
|
|
2458
2584
|
};
|
|
2459
2585
|
}
|
|
2460
|
-
}),
|
|
2586
|
+
}), ct = { class: "flex mt-6 space-x-6" }, mt = /* @__PURE__ */ h({
|
|
2461
2587
|
__name: "PromptPayGateway",
|
|
2462
2588
|
props: {
|
|
2463
2589
|
terminal: {
|
|
@@ -2469,8 +2595,8 @@ const He = {
|
|
|
2469
2595
|
required: !0
|
|
2470
2596
|
}
|
|
2471
2597
|
},
|
|
2472
|
-
setup(
|
|
2473
|
-
const p =
|
|
2598
|
+
setup(F) {
|
|
2599
|
+
const p = F, a = D(() => p.terminal), b = _(), l = _(-1), r = _({
|
|
2474
2600
|
account: "",
|
|
2475
2601
|
receiptName: ""
|
|
2476
2602
|
}), e = () => {
|
|
@@ -2482,47 +2608,47 @@ const He = {
|
|
|
2482
2608
|
if (m === -1)
|
|
2483
2609
|
return e();
|
|
2484
2610
|
l.value = m;
|
|
2485
|
-
const
|
|
2486
|
-
|
|
2487
|
-
account:
|
|
2488
|
-
receiptName:
|
|
2611
|
+
const i = v.at(m);
|
|
2612
|
+
i.gateway === "PROMPTPAY" && i.config && (r.value = {
|
|
2613
|
+
account: i.config.account ?? "",
|
|
2614
|
+
receiptName: i.receiptName ?? ""
|
|
2489
2615
|
});
|
|
2490
2616
|
};
|
|
2491
|
-
|
|
2617
|
+
q(a, d), G(d);
|
|
2492
2618
|
async function c(v) {
|
|
2493
2619
|
var m;
|
|
2494
2620
|
(m = a.value.qrIntegrations) == null || m.splice(v, 1), p.onUpdate(a.value);
|
|
2495
2621
|
}
|
|
2496
2622
|
return (v, m) => {
|
|
2497
|
-
const
|
|
2498
|
-
return g(),
|
|
2623
|
+
const i = f("FmTextField"), t = f("FmButton"), o = f("FmForm");
|
|
2624
|
+
return g(), w(o, {
|
|
2499
2625
|
ref: b.value,
|
|
2500
2626
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2501
2627
|
onValidationSuccess: m[2] || (m[2] = () => {
|
|
2502
2628
|
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 })), p.onUpdate(a.value);
|
|
2503
2629
|
})
|
|
2504
2630
|
}, {
|
|
2505
|
-
default:
|
|
2506
|
-
y(
|
|
2631
|
+
default: A(() => [
|
|
2632
|
+
y(i, {
|
|
2507
2633
|
modelValue: r.value.account,
|
|
2508
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
2634
|
+
"onUpdate:modelValue": m[0] || (m[0] = (s) => r.value.account = s),
|
|
2509
2635
|
label: "Thai Phone Number / Thai Naitonal ID",
|
|
2510
2636
|
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
2511
2637
|
}, null, 8, ["modelValue"]),
|
|
2512
|
-
y(
|
|
2638
|
+
y(i, {
|
|
2513
2639
|
modelValue: r.value.receiptName,
|
|
2514
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
2640
|
+
"onUpdate:modelValue": m[1] || (m[1] = (s) => r.value.receiptName = s),
|
|
2515
2641
|
label: "Receipt Payment Name",
|
|
2516
2642
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
2517
2643
|
}, null, 8, ["modelValue"]),
|
|
2518
|
-
I("div",
|
|
2519
|
-
l.value > -1 ? (g(),
|
|
2644
|
+
I("div", ct, [
|
|
2645
|
+
l.value > -1 ? (g(), w(t, {
|
|
2520
2646
|
key: 0,
|
|
2521
2647
|
class: "flex-1",
|
|
2522
2648
|
variant: "secondary",
|
|
2523
2649
|
label: "Delete",
|
|
2524
2650
|
onclick: () => c(l.value)
|
|
2525
|
-
}, null, 8, ["onclick"])) :
|
|
2651
|
+
}, null, 8, ["onclick"])) : U("", !0),
|
|
2526
2652
|
y(t, {
|
|
2527
2653
|
type: "submit",
|
|
2528
2654
|
class: "flex-1",
|
|
@@ -2535,7 +2661,7 @@ const He = {
|
|
|
2535
2661
|
}, 512);
|
|
2536
2662
|
};
|
|
2537
2663
|
}
|
|
2538
|
-
}),
|
|
2664
|
+
}), dt = { class: "flex items-center" }, pt = { class: "w-[260px] self-start" }, vt = { class: "flex-1" }, yt = /* @__PURE__ */ h({
|
|
2539
2665
|
__name: "QrGateway",
|
|
2540
2666
|
props: {
|
|
2541
2667
|
terminal: {
|
|
@@ -2547,41 +2673,41 @@ const He = {
|
|
|
2547
2673
|
required: !0
|
|
2548
2674
|
}
|
|
2549
2675
|
},
|
|
2550
|
-
setup(
|
|
2676
|
+
setup(F) {
|
|
2551
2677
|
var d;
|
|
2552
|
-
const p =
|
|
2678
|
+
const p = F, a = [
|
|
2553
2679
|
{
|
|
2554
2680
|
label: "PromptPay",
|
|
2555
2681
|
value: "promptpay",
|
|
2556
|
-
render:
|
|
2557
|
-
region: [
|
|
2682
|
+
render: mt,
|
|
2683
|
+
region: [R.F_COUNTRY.enum.TH]
|
|
2558
2684
|
}
|
|
2559
|
-
], b =
|
|
2685
|
+
], b = S(() => a.find((c) => c.value === e.value)), l = ue().currentCountry, r = S(() => a.filter((c) => !c.region || c.region.includes(l.value ?? R.F_COUNTRY.enum.MY))), { gatewayTab: e } = re({
|
|
2560
2686
|
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
2561
2687
|
});
|
|
2562
2688
|
return (c, v) => {
|
|
2563
|
-
var
|
|
2689
|
+
var i;
|
|
2564
2690
|
const m = f("FmTabs");
|
|
2565
|
-
return g(),
|
|
2566
|
-
I("div",
|
|
2691
|
+
return g(), k("div", dt, [
|
|
2692
|
+
I("div", pt, [
|
|
2567
2693
|
y(m, {
|
|
2568
|
-
"model-value":
|
|
2569
|
-
"onUpdate:modelValue": v[0] || (v[0] = (t) =>
|
|
2694
|
+
"model-value": V(e),
|
|
2695
|
+
"onUpdate:modelValue": v[0] || (v[0] = (t) => te(e) ? e.value = t : null),
|
|
2570
2696
|
class: "mb-6",
|
|
2571
2697
|
vertical: !0,
|
|
2572
2698
|
items: r.value
|
|
2573
2699
|
}, null, 8, ["model-value", "items"])
|
|
2574
2700
|
]),
|
|
2575
|
-
I("div",
|
|
2576
|
-
|
|
2701
|
+
I("div", vt, [
|
|
2702
|
+
V(e) ? (g(), w(le((i = b.value) == null ? void 0 : i.render), ne(oe({ key: 0 }, {
|
|
2577
2703
|
terminal: p.terminal,
|
|
2578
2704
|
onUpdate: p.onUpdate
|
|
2579
|
-
})), null, 16)) :
|
|
2705
|
+
})), null, 16)) : U("", !0)
|
|
2580
2706
|
])
|
|
2581
2707
|
]);
|
|
2582
2708
|
};
|
|
2583
2709
|
}
|
|
2584
|
-
}),
|
|
2710
|
+
}), Rt = /* @__PURE__ */ h({
|
|
2585
2711
|
__name: "TerminalSetting",
|
|
2586
2712
|
props: {
|
|
2587
2713
|
terminalId: {
|
|
@@ -2589,22 +2715,22 @@ const He = {
|
|
|
2589
2715
|
required: !0
|
|
2590
2716
|
}
|
|
2591
2717
|
},
|
|
2592
|
-
setup(
|
|
2593
|
-
const p =
|
|
2718
|
+
setup(F) {
|
|
2719
|
+
const p = F, { tab: a } = re({
|
|
2594
2720
|
tab: "information"
|
|
2595
|
-
}), { isLoading: b, startAsyncCall: l } =
|
|
2596
|
-
async function m(
|
|
2721
|
+
}), { isLoading: b, startAsyncCall: l } = J(!0), r = Ie(), e = se(), d = we(), { t: c } = ie(), v = _();
|
|
2722
|
+
async function m(x, N) {
|
|
2597
2723
|
l(async () => {
|
|
2598
2724
|
try {
|
|
2599
|
-
await
|
|
2600
|
-
name:
|
|
2601
|
-
status:
|
|
2602
|
-
ecrs:
|
|
2603
|
-
gateways:
|
|
2604
|
-
ecrIntegrations:
|
|
2605
|
-
qrIntegrations:
|
|
2606
|
-
...
|
|
2607
|
-
}), v.value = await
|
|
2725
|
+
await Y.updateById(p.terminalId, {
|
|
2726
|
+
name: x.name,
|
|
2727
|
+
status: x.status,
|
|
2728
|
+
ecrs: x.ecrs ?? [],
|
|
2729
|
+
gateways: x.gateways ?? [],
|
|
2730
|
+
ecrIntegrations: x.ecrIntegrations ?? [],
|
|
2731
|
+
qrIntegrations: x.qrIntegrations ?? [],
|
|
2732
|
+
...N ? { paymentCheckouts: N } : {}
|
|
2733
|
+
}), v.value = await Y.readById(p.terminalId), e.open({
|
|
2608
2734
|
type: "success",
|
|
2609
2735
|
message: "Terminal updated successfully"
|
|
2610
2736
|
});
|
|
@@ -2612,12 +2738,12 @@ const He = {
|
|
|
2612
2738
|
e.open({
|
|
2613
2739
|
type: "error",
|
|
2614
2740
|
title: "Error occurs when update terminal",
|
|
2615
|
-
message:
|
|
2741
|
+
message: Q(O)
|
|
2616
2742
|
});
|
|
2617
2743
|
}
|
|
2618
2744
|
});
|
|
2619
2745
|
}
|
|
2620
|
-
const
|
|
2746
|
+
const i = [
|
|
2621
2747
|
{
|
|
2622
2748
|
label: "Information",
|
|
2623
2749
|
value: "information",
|
|
@@ -2641,51 +2767,51 @@ const He = {
|
|
|
2641
2767
|
label: "ECR Gateway",
|
|
2642
2768
|
value: "ecr",
|
|
2643
2769
|
icon: "point_of_sale",
|
|
2644
|
-
render:
|
|
2770
|
+
render: ut,
|
|
2645
2771
|
onlyFor: ["POS", "KIOSK"]
|
|
2646
2772
|
},
|
|
2647
2773
|
{
|
|
2648
2774
|
label: "QR Gateway",
|
|
2649
2775
|
value: "qr",
|
|
2650
2776
|
icon: "qr_code",
|
|
2651
|
-
render:
|
|
2777
|
+
render: yt,
|
|
2652
2778
|
onlyFor: ["POS", "KIOSK"]
|
|
2653
2779
|
},
|
|
2654
2780
|
{
|
|
2655
2781
|
label: "Payment Checkout",
|
|
2656
2782
|
value: "payment-checkout",
|
|
2657
2783
|
icon: "tune",
|
|
2658
|
-
render:
|
|
2784
|
+
render: ke,
|
|
2659
2785
|
onlyFor: ["KIOSK", "POS"]
|
|
2660
2786
|
}
|
|
2661
|
-
], t = ve.FdoTerminalTemplateDeviceType.options, o =
|
|
2787
|
+
], t = ve.FdoTerminalTemplateDeviceType.options, o = S(
|
|
2662
2788
|
() => {
|
|
2663
|
-
var
|
|
2664
|
-
return t.includes(((
|
|
2789
|
+
var x;
|
|
2790
|
+
return t.includes(((x = v.value) == null ? void 0 : x.deviceType) ?? "");
|
|
2665
2791
|
}
|
|
2666
2792
|
);
|
|
2667
|
-
function
|
|
2668
|
-
const
|
|
2793
|
+
function s() {
|
|
2794
|
+
const x = v.value;
|
|
2669
2795
|
d.open({
|
|
2670
2796
|
title: "Save as Template",
|
|
2671
2797
|
closeButton: !0,
|
|
2672
2798
|
overlay: !0,
|
|
2673
|
-
contentComponent:
|
|
2674
|
-
}).onPrimary(async (
|
|
2799
|
+
contentComponent: Pe
|
|
2800
|
+
}).onPrimary(async (N) => {
|
|
2675
2801
|
d.close();
|
|
2676
2802
|
try {
|
|
2677
2803
|
await pe.create({
|
|
2678
|
-
name:
|
|
2679
|
-
description:
|
|
2680
|
-
businessId:
|
|
2681
|
-
deviceType:
|
|
2682
|
-
isDefault:
|
|
2804
|
+
name: N.name,
|
|
2805
|
+
description: N.description,
|
|
2806
|
+
businessId: x.restaurant.businessId,
|
|
2807
|
+
deviceType: x.deviceType,
|
|
2808
|
+
isDefault: N.isDefault,
|
|
2683
2809
|
settings: {
|
|
2684
|
-
ecrs: (
|
|
2685
|
-
ecrIntegrations: (
|
|
2810
|
+
ecrs: (x.ecrs ?? []).map(({ gateway: O }) => ({ gateway: O })),
|
|
2811
|
+
ecrIntegrations: (x.ecrIntegrations ?? []).map(
|
|
2686
2812
|
({ gateway: O }) => ({ gateway: O })
|
|
2687
2813
|
),
|
|
2688
|
-
paymentCheckouts:
|
|
2814
|
+
paymentCheckouts: x.paymentCheckouts ?? []
|
|
2689
2815
|
}
|
|
2690
2816
|
}), e.open({
|
|
2691
2817
|
type: "success",
|
|
@@ -2695,22 +2821,22 @@ const He = {
|
|
|
2695
2821
|
e.open({
|
|
2696
2822
|
type: "error",
|
|
2697
2823
|
title: "Error occurs when create setting template",
|
|
2698
|
-
message:
|
|
2824
|
+
message: Q(O)
|
|
2699
2825
|
});
|
|
2700
2826
|
}
|
|
2701
2827
|
});
|
|
2702
2828
|
}
|
|
2703
2829
|
async function u() {
|
|
2704
|
-
const
|
|
2705
|
-
|
|
2706
|
-
|
|
2830
|
+
const x = v.value, N = await pe.readByBusiness(
|
|
2831
|
+
x.restaurant.businessId,
|
|
2832
|
+
x.deviceType
|
|
2707
2833
|
);
|
|
2708
2834
|
d.open({
|
|
2709
2835
|
title: "Apply Template",
|
|
2710
2836
|
closeButton: !0,
|
|
2711
2837
|
overlay: !0,
|
|
2712
2838
|
contentComponent: qe,
|
|
2713
|
-
contentComponentProps: { templates:
|
|
2839
|
+
contentComponentProps: { templates: N }
|
|
2714
2840
|
}).onPrimary(async (O) => {
|
|
2715
2841
|
d.close(), xe(
|
|
2716
2842
|
d,
|
|
@@ -2719,15 +2845,15 @@ const He = {
|
|
|
2719
2845
|
async () => {
|
|
2720
2846
|
l(async () => {
|
|
2721
2847
|
try {
|
|
2722
|
-
await
|
|
2848
|
+
await Y.applyTemplate(p.terminalId, O.templateId), v.value = await Y.readById(p.terminalId), e.open({
|
|
2723
2849
|
type: "success",
|
|
2724
2850
|
message: "Setting template applied successfully."
|
|
2725
2851
|
});
|
|
2726
|
-
} catch (
|
|
2852
|
+
} catch ($) {
|
|
2727
2853
|
e.open({
|
|
2728
2854
|
type: "error",
|
|
2729
2855
|
title: "Error occurs when apply setting template",
|
|
2730
|
-
message:
|
|
2856
|
+
message: Q($)
|
|
2731
2857
|
});
|
|
2732
2858
|
}
|
|
2733
2859
|
});
|
|
@@ -2735,48 +2861,48 @@ const He = {
|
|
|
2735
2861
|
);
|
|
2736
2862
|
});
|
|
2737
2863
|
}
|
|
2738
|
-
const C =
|
|
2864
|
+
const C = S(
|
|
2739
2865
|
() => o.value ? [
|
|
2740
|
-
{ label: "Save as Template", fn:
|
|
2866
|
+
{ label: "Save as Template", fn: s },
|
|
2741
2867
|
{ label: "Apply Template", fn: u }
|
|
2742
2868
|
] : []
|
|
2743
2869
|
);
|
|
2744
|
-
|
|
2745
|
-
const n =
|
|
2746
|
-
var
|
|
2747
|
-
return (
|
|
2870
|
+
ue().currentCountry;
|
|
2871
|
+
const n = S(() => {
|
|
2872
|
+
var x;
|
|
2873
|
+
return (x = i.find((N) => N.value === a.value)) == null ? void 0 : x.render;
|
|
2748
2874
|
});
|
|
2749
|
-
async function
|
|
2875
|
+
async function T() {
|
|
2750
2876
|
l(async () => {
|
|
2751
|
-
v.value = await
|
|
2877
|
+
v.value = await Y.readById(p.terminalId);
|
|
2752
2878
|
});
|
|
2753
2879
|
}
|
|
2754
|
-
const
|
|
2755
|
-
(
|
|
2756
|
-
var
|
|
2757
|
-
return !
|
|
2880
|
+
const M = S(() => i.filter(
|
|
2881
|
+
(x) => {
|
|
2882
|
+
var N;
|
|
2883
|
+
return !x.onlyFor || x.onlyFor.includes(((N = v.value) == null ? void 0 : N.deviceType) ?? "");
|
|
2758
2884
|
}
|
|
2759
2885
|
));
|
|
2760
|
-
return
|
|
2761
|
-
var
|
|
2886
|
+
return G(T), (x, N) => {
|
|
2887
|
+
var $, H;
|
|
2762
2888
|
const O = f("FmTabs");
|
|
2763
|
-
return g(),
|
|
2764
|
-
title: `${(
|
|
2765
|
-
loading:
|
|
2889
|
+
return g(), w(Fe, {
|
|
2890
|
+
title: `${($ = v.value) == null ? void 0 : $.deviceType} (${(H = v.value) == null ? void 0 : H._id})`,
|
|
2891
|
+
loading: V(b),
|
|
2766
2892
|
actions: C.value,
|
|
2767
|
-
onBack:
|
|
2893
|
+
onBack: V(r).back
|
|
2768
2894
|
}, {
|
|
2769
|
-
default:
|
|
2895
|
+
default: A(() => [
|
|
2770
2896
|
y(O, {
|
|
2771
|
-
"model-value":
|
|
2772
|
-
"onUpdate:modelValue":
|
|
2897
|
+
"model-value": V(a),
|
|
2898
|
+
"onUpdate:modelValue": N[0] || (N[0] = (W) => te(a) ? a.value = W : null),
|
|
2773
2899
|
class: "mb-6",
|
|
2774
|
-
items:
|
|
2900
|
+
items: M.value
|
|
2775
2901
|
}, null, 8, ["model-value", "items"]),
|
|
2776
|
-
|
|
2902
|
+
V(a) ? (g(), w(le(n.value), ne(oe({ key: 0 }, {
|
|
2777
2903
|
terminal: v.value,
|
|
2778
2904
|
onUpdate: m
|
|
2779
|
-
})), null, 16)) :
|
|
2905
|
+
})), null, 16)) : U("", !0)
|
|
2780
2906
|
]),
|
|
2781
2907
|
_: 1
|
|
2782
2908
|
}, 8, ["title", "loading", "actions", "onBack"]);
|
|
@@ -2784,5 +2910,5 @@ const He = {
|
|
|
2784
2910
|
}
|
|
2785
2911
|
});
|
|
2786
2912
|
export {
|
|
2787
|
-
|
|
2913
|
+
Rt as default
|
|
2788
2914
|
};
|