@feedmepos/mf-payment 1.11.22-dev → 1.12.0
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-DEkSpYbw.js +118 -0
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DlTlaRr0.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CZeyS_-_.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-CqFT58M_.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BGU64S5Z.js} +3 -3
- package/dist/{Chargeback-D71IAGTk.js → Chargeback-DwXllRT4.js} +9 -9
- package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js → DateRangePicker.vue_vue_type_script_setup_true_lang-5ZaLjKl_.js} +2 -2
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-Dj3fMKVr.js → DocumentViewer.vue_vue_type_script_setup_true_lang-saQlwl6a.js} +857 -857
- package/dist/{ExternalTerminal-Cc9qwfN3.js → ExternalTerminal-DWnv8BaM.js} +31 -31
- package/dist/{OnboardForm-oAWTQnVu.js → OnboardForm--to1SX2z.js} +631 -694
- package/dist/{OnboardForm-DQ44zTWg.js → OnboardForm-BWIWimOG.js} +8 -8
- package/dist/OnboardSubmission-BtiI1ewF.js +449 -0
- package/dist/{OnboardSubmission-CSDvUix8.js → OnboardSubmission-DFhK_eus.js} +7 -7
- package/dist/{PaymentCheckout-oHQmbYkX.js → PaymentCheckout-CsDfQl6k.js} +4 -4
- package/dist/{mascot-side-BE_abER6.js → PayoutAccount-DtUHIt8d.js} +598 -206
- package/dist/{PayoutAccount-Dx8OtJxp.js → PayoutAccount-DxC8i69H.js} +9 -9
- package/dist/{PayoutAccountSetting-DoCZVhn3.js → PayoutAccountSetting-z-TySDXR.js} +10 -10
- package/dist/{Restaurant-Ct9aQWSp.js → Restaurant-3NdsiWwv.js} +5 -5
- package/dist/{RestaurantSetting-D7Yuuw47.js → RestaurantSetting-Cyn1i8dn.js} +9 -23
- package/dist/Settlement--SIL-7He.js +625 -0
- package/dist/{Settlement-gUV3TF4A.js → Settlement-CiKtgAZ4.js} +5 -5
- package/dist/{SettlementTransactions-BY3T-dG3.js → SettlementTransactions-C52wiVAb.js} +6 -6
- package/dist/{SettlementTransactions-DIkkrW6-.js → SettlementTransactions-CI2SHJB3.js} +97 -106
- package/dist/{Status.vue_vue_type_script_setup_true_lang-CQlT9Qj_.js → Status.vue_vue_type_script_setup_true_lang-DgqA7PhV.js} +1 -1
- package/dist/{Terminal-CPoxr6Ga.js → Terminal-Cx-X-ik5.js} +19 -19
- package/dist/{TerminalSetting-hmswppko.js → TerminalSetting-DY0EYdD-.js} +650 -776
- package/dist/{TerminalTemplate-B3zOtzmP.js → TerminalTemplate-BORrJdEH.js} +7 -7
- package/dist/{TerminalTemplateSetting-2R_LV6YP.js → TerminalTemplateSetting-CYaaQ5jC.js} +6 -6
- package/dist/{TextInputDialog.vue_vue_type_script_setup_true_lang-C3AeZqwO.js → TextInputDialog.vue_vue_type_script_setup_true_lang-CJ29Mqtm.js} +1 -1
- package/dist/{Transaction-CE5Y7oSP.js → Transaction-Bj9ckoKD.js} +19 -20
- package/dist/{Transaction-BV-_41-w.js → Transaction-D1W9J-YG.js} +54 -56
- package/dist/{TransactionOld-B2i6FWoP.js → TransactionOld-C-3Y9idi.js} +11 -12
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-D07Iu5dG.js → TransactionStatus.vue_vue_type_script_setup_true_lang-C6ybTX_E.js} +2 -2
- package/dist/api/document/index.d.ts +0 -2
- package/dist/api/onboard-submission/index.d.ts +1 -6
- package/dist/api/terminal/index.d.ts +1 -2
- package/dist/{app-Db-hwBve.js → app-C8rDUQ-r.js} +14579 -14132
- package/dist/app.js +1 -1
- package/dist/{assets-CB7rE-mh.js → assets-QZbz5BYj.js} +46 -47
- package/dist/components/CursorTable/index.vue.d.ts +21 -3
- package/dist/components/PagingTable/index.vue.d.ts +9 -3
- package/dist/{grafana-5eWxG5r8.js → grafana-CHfYDJ1b.js} +4 -4
- package/dist/{index-rGzBv5-u.js → index-4KwdYYMe.js} +2 -2
- package/dist/{index-X_UgwLJS.js → index-7ofYlGzn.js} +1 -1
- package/dist/index-BgS9t01N.js +62 -0
- package/dist/{index-bczomY2M.js → index-Bgh4RGim.js} +2 -2
- package/dist/{index-DWU5m3QZ.js → index-CX2hs-UQ.js} +1 -1
- package/dist/{index-BNEwsJyD.js → index-CX9xj_f6.js} +1 -6
- package/dist/index-CdIL37va.js +33692 -0
- package/dist/{index-DWVs6h52.js → index-DVsHI6PR.js} +29 -52
- package/dist/{index-BCnQ-hAJ.js → index-Yt_qv8lG.js} +5 -39
- package/dist/index-mU9AofgQ.js +137 -0
- package/dist/{index-BmV1RaRw.js → index-x-AN2d5y.js} +2 -2
- package/dist/{index-DxQ3wF-X.js → index-yTZ7Gd-r.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CSeS9lVS.js → index.vue_vue_type_script_setup_true_lang-CtE5UAGa.js} +1 -1
- package/dist/mf-payment.css +1 -0
- package/dist/model/onboard-submission.d.ts +5 -5
- package/dist/model/payout-account.d.ts +2 -3
- package/dist/{moment-h96o7c8I.js → moment-FRs5-R1e.js} +1194 -1067
- package/dist/{onboard-submission-BTnbIwsJ.js → onboard-submission-BdIQCrc0.js} +7 -8
- package/dist/package.json +76 -18
- package/dist/payout-account-CKYWpyP9.js +466 -0
- package/dist/router/index.d.ts +1 -3
- package/dist/stores/payoutAccount.d.ts +38 -40
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{teya-UA6TM323.js → tyro-BovmsorS.js} +2 -3
- package/dist/{useQuery-BJX-S-uW.js → useQuery-CkPLx8V5.js} +1 -1
- package/dist/{validator-CTlVogBQ.js → validator-Bz2eU53Y.js} +6 -6
- package/dist/views/admin/external-terminal/ExternalTerminalPairDialog.vue.d.ts +8 -8
- package/dist/views/admin/external-terminal/ExternalTerminalSideSheet.vue.d.ts +14 -14
- package/dist/views/admin/external-terminal/pair/BRITerminal.vue.d.ts +8 -8
- package/dist/views/admin/external-terminal/pair/BeamTerminal.vue.d.ts +8 -8
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +24 -24
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +24 -24
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +24 -24
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +38 -40
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +60 -62
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +60 -62
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +38 -40
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +38 -40
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +60 -62
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +2 -2
- 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 +8 -32
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +4 -10
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -6
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -6
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalSideSheet.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/BeamGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/BriGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/PbbGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +22 -38
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +22 -38
- package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +30 -30
- package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +18 -18
- package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +18 -18
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +76 -80
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +28 -28
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +14 -14
- package/dist/views/settlement/SettlementTable.vue.d.ts +5 -15
- package/dist/views/settlement/SettlementTransactions.vue.d.ts +1 -11
- package/package.json +16 -17
- package/dist/Actions.vue_vue_type_script_setup_true_lang-COGP4bH0.js +0 -64
- package/dist/FoodCourtPayoutAccount-58TARaq6.js +0 -187
- package/dist/FoodCourtSettlement-BGgvu91A.js +0 -68
- package/dist/FoodCourtTransaction-B1rZHqE_.js +0 -212
- package/dist/Method.vue_vue_type_script_setup_true_lang-B8Vq5gSl.js +0 -58
- package/dist/OnboardSubmission-ncq-dkfF.js +0 -733
- package/dist/PayoutAccount-4ZI4Ik2p.js +0 -405
- package/dist/Settlement-BPaaEj_X.js +0 -510
- package/dist/SettlementTable.vue_vue_type_script_setup_true_lang-BsGmww2X.js +0 -132
- package/dist/api/food-court/index.d.ts +0 -31
- package/dist/index-B-xGomR7.js +0 -131
- package/dist/index-B6SmnK1g.js +0 -32927
- package/dist/index-CazeCsOR.js +0 -13
- package/dist/index-DXIvYLMm.js +0 -75
- package/dist/index-j-zqgMuS.js +0 -52
- package/dist/payout-account-BRzRptNv.js +0 -474
- package/dist/router/context-guard.d.ts +0 -3
- package/dist/router/food-court.d.ts +0 -3
- package/dist/style.css +0 -1
- package/dist/utils/food-court.d.ts +0 -2
- package/dist/views/admin/onboard-submission/forms/TeyaSubmission.vue.d.ts +0 -117
- package/dist/views/admin/terminal/tabs/ecr/TeyaGateway.vue.d.ts +0 -212
- package/dist/views/food-court/FoodCourtPayoutAccount.vue.d.ts +0 -2
- package/dist/views/food-court/FoodCourtSettlement.vue.d.ts +0 -2
- package/dist/views/food-court/FoodCourtTransaction.vue.d.ts +0 -2
- package/dist/views/onboard-submission/useTeyaConnect.d.ts +0 -71
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as
|
|
1
|
+
import { defineComponent as R, openBlock as g, createElementBlock as V, Fragment as $, createElementVNode as I, createTextVNode as Z, toDisplayString as J, ref as _, resolveComponent as f, createBlock as F, withCtx as M, createVNode as y, unref as S, computed as N, createCommentVNode as h, isRef as ee, resolveDynamicComponent as ae, normalizeProps as te, mergeProps as le, watch as A, onBeforeUnmount as Te, toRef as G, onMounted as q, renderList as L } from "vue";
|
|
2
|
+
import { u as X, p as ve } from "./index-CdIL37va.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 j } from "./index-CX9xj_f6.js";
|
|
5
|
+
import { t as pe } from "./index-yTZ7Gd-r.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 ne } from "./index-mU9AofgQ.js";
|
|
8
|
+
import { useDialogChild as ye, useSnackbar as me, 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 W } from "./error-K1CakhA9.js";
|
|
11
|
+
import { useI18n as oe, useCoreStore as re } from "@feedmepos/mf-common";
|
|
12
|
+
import { z as ie, a as se } from "./validator-Bz2eU53Y.js";
|
|
13
|
+
import { e as P } from "./app-C8rDUQ-r.js";
|
|
14
|
+
import { o as Ce } from "./index-Yt_qv8lG.js";
|
|
15
|
+
import { c as ke } from "./index-MdV54cWO.js";
|
|
16
|
+
import { e as fe } from "./index-7ofYlGzn.js";
|
|
17
|
+
import { P as Ne } from "./PaymentCheckout-CsDfQl6k.js";
|
|
18
|
+
const Ve = /* @__PURE__ */ R({
|
|
19
19
|
__name: "Information",
|
|
20
20
|
props: {
|
|
21
21
|
terminal: {
|
|
@@ -23,26 +23,26 @@ const Ve = /* @__PURE__ */ h({
|
|
|
23
23
|
required: !0
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
-
setup(
|
|
27
|
-
return (p, a) => (g(),
|
|
26
|
+
setup(T) {
|
|
27
|
+
return (p, a) => (g(), V($, null, [
|
|
28
28
|
a[0] || (a[0] = I("b", null, "Name", -1)),
|
|
29
|
-
Z(": " +
|
|
29
|
+
Z(": " + J(T.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(": " + J(T.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(": " + J(T.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(": " + J(T.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" }, Re = /* @__PURE__ */ R({
|
|
43
43
|
__name: "TerminalSaveTemplateDialog",
|
|
44
|
-
setup(
|
|
45
|
-
const p = ye(), { t: a } =
|
|
44
|
+
setup(T) {
|
|
45
|
+
const p = ye(), { t: a } = oe(), 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__ */ h({
|
|
|
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"), s = f("FmTextField"), t = f("FmSwitch"), o = f("FmButton"), i = f("FmForm");
|
|
54
|
+
return g(), F(i, {
|
|
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: M(() => [
|
|
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, J(S(a)("payment.terminal_template.scope_info")), 1)
|
|
67
67
|
]),
|
|
68
|
-
y(
|
|
68
|
+
y(s, {
|
|
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: S(ie)(S(se).string().min(1, "Template name is required"))
|
|
74
74
|
}, null, 8, ["modelValue", "rules"]),
|
|
75
|
-
y(
|
|
75
|
+
y(s, {
|
|
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__ */ h({
|
|
|
96
96
|
}, 512);
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
}),
|
|
99
|
+
}), Pe = { class: "flex flex-col gap-16 min-h-[240px]" }, Be = { class: "flex items-start gap-8 rounded-md bg-fm-color-neutral-gray-100 px-16 py-12" }, Oe = { 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__ */ R({
|
|
106
106
|
__name: "TerminalApplyTemplateDialog",
|
|
107
107
|
props: {
|
|
108
108
|
templates: {}
|
|
109
109
|
},
|
|
110
|
-
setup(
|
|
111
|
-
const p =
|
|
110
|
+
setup(T) {
|
|
111
|
+
const p = T, a = ye(), { t: b } = oe(), l = _(""), r = N(
|
|
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__ */ h({
|
|
|
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"), s = f("FmButton");
|
|
121
|
+
return g(), V("div", Pe, [
|
|
122
|
+
I("div", Be, [
|
|
123
123
|
y(v, {
|
|
124
124
|
name: "info",
|
|
125
125
|
class: "mt-4 shrink-0"
|
|
126
126
|
}),
|
|
127
|
-
I("div",
|
|
127
|
+
I("div", Oe, J(S(b)("payment.terminal_template.scope_info")), 1)
|
|
128
128
|
]),
|
|
129
|
-
r.value.length === 0 ? (g(),
|
|
129
|
+
r.value.length === 0 ? (g(), V("div", Me, " No setting template exists for this business and device type yet. ")) : (g(), F(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(), V("div", Ae, [
|
|
137
|
+
y(s, {
|
|
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
|
+
])) : h("", !0)
|
|
144
144
|
]);
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
}), Ge = { key: 0 },
|
|
147
|
+
}), Ge = { key: 0 }, De = { class: "mt-6 space-x-6" }, $e = /* @__PURE__ */ R({
|
|
148
148
|
__name: "KioskMode",
|
|
149
149
|
props: {
|
|
150
150
|
terminal: {
|
|
@@ -152,11 +152,11 @@ const Ve = /* @__PURE__ */ h({
|
|
|
152
152
|
required: !0
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
|
-
setup(
|
|
156
|
-
const { isLoading: p, startAsyncCall: a } =
|
|
155
|
+
setup(T) {
|
|
156
|
+
const { isLoading: p, startAsyncCall: a } = X(!1), b = me(), l = _({
|
|
157
157
|
enable: !1,
|
|
158
158
|
password: []
|
|
159
|
-
}), r =
|
|
159
|
+
}), r = T;
|
|
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__ */ h({
|
|
|
166
166
|
d.enable && Object.assign(d, {
|
|
167
167
|
password: l.value.password.join("")
|
|
168
168
|
});
|
|
169
|
-
const c = await
|
|
169
|
+
const c = await j.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__ */ h({
|
|
|
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"), s = f("FmButton");
|
|
181
|
+
return g(), V($, 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(), V("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
|
+
])) : h("", !0),
|
|
194
|
+
I("div", De, [
|
|
195
|
+
y(s, {
|
|
196
196
|
variant: "primary",
|
|
197
197
|
label: "Send",
|
|
198
198
|
icon: "send",
|
|
199
|
-
loading:
|
|
199
|
+
loading: S(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__ */ R({
|
|
207
207
|
__name: "SettingRequest",
|
|
208
208
|
props: {
|
|
209
209
|
terminal: {
|
|
@@ -211,80 +211,80 @@ const Ve = /* @__PURE__ */ h({
|
|
|
211
211
|
required: !0
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
-
setup(
|
|
215
|
-
const { settingTab: p } =
|
|
214
|
+
setup(T) {
|
|
215
|
+
const { settingTab: p } = ne({
|
|
216
216
|
settingTab: "kiosk_mode"
|
|
217
217
|
}), a = [
|
|
218
218
|
{
|
|
219
219
|
label: "Kiosk Mode",
|
|
220
220
|
value: "kiosk_mode",
|
|
221
|
-
render:
|
|
221
|
+
render: $e
|
|
222
222
|
}
|
|
223
|
-
], b =
|
|
223
|
+
], b = T, l = N(() => 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(), V($, 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": S(p),
|
|
234
|
+
"onUpdate:modelValue": e[0] || (e[0] = (v) => ee(p) ? p.value = v : null),
|
|
235
235
|
class: "mb-6",
|
|
236
236
|
items: a
|
|
237
237
|
}, null, 8, ["model-value"]),
|
|
238
|
-
|
|
238
|
+
S(p) ? (g(), F(ae((c = l.value) == null ? void 0 : c.render), te(le({ key: 0 }, { terminal: b.terminal })), null, 16)) : h("", !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(T) {
|
|
244
|
+
const { isLoading: p, startLoading: a, stopLoading: b } = X(!1), { t: l } = oe(), r = me(), e = _(null), d = N(() => {
|
|
245
|
+
var k, O;
|
|
246
|
+
const w = (k = T.value.gateways) == null ? void 0 : k.find(
|
|
247
|
+
(D) => D.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 = w == null ? void 0 : w.config) == null ? void 0 : O.uniqueId) || "";
|
|
250
|
+
}), c = N(() => !!d.value), v = N(() => {
|
|
251
|
+
var w;
|
|
252
|
+
return ((w = e.value) == null ? void 0 : w.status) === "ready";
|
|
253
|
+
}), m = N(() => {
|
|
254
|
+
var w, k;
|
|
255
|
+
return v.value && !!((k = (w = e.value) == null ? void 0 : w.fields) != null && k.tyroLocationId) && !!T.value.deviceId && !c.value;
|
|
256
|
+
}), s = N(() => !v.value && !c.value), t = N(
|
|
257
257
|
() => l("payment.onboard-submission.tyro.syncDisabledHint")
|
|
258
|
-
), o =
|
|
259
|
-
async function
|
|
260
|
-
if (!
|
|
258
|
+
), o = N(() => c.value ? "Synced" : "Sync");
|
|
259
|
+
async function i() {
|
|
260
|
+
if (!T.value.referenceId) {
|
|
261
261
|
e.value = null;
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
try {
|
|
265
|
-
const
|
|
266
|
-
|
|
265
|
+
const w = await Ce.getByRestaurant(
|
|
266
|
+
T.value.referenceId
|
|
267
267
|
);
|
|
268
|
-
e.value =
|
|
269
|
-
(
|
|
268
|
+
e.value = w.find(
|
|
269
|
+
(k) => k.type === ve.FdoOnboardType.enum.tyro
|
|
270
270
|
) ?? null;
|
|
271
|
-
} catch (
|
|
271
|
+
} catch (w) {
|
|
272
272
|
e.value = null, r.open({
|
|
273
273
|
type: "error",
|
|
274
|
-
message:
|
|
274
|
+
message: W(w)
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
const u =
|
|
278
|
+
const u = ke({
|
|
279
279
|
intervalMs: Le,
|
|
280
280
|
timeoutMs: Ye,
|
|
281
|
-
onTick: async ({ isCurrentRun:
|
|
282
|
-
var
|
|
283
|
-
const O = await
|
|
284
|
-
if (!
|
|
281
|
+
onTick: async ({ isCurrentRun: w, stop: k }) => {
|
|
282
|
+
var K, z;
|
|
283
|
+
const O = await j.readById(T.value._id);
|
|
284
|
+
if (!w())
|
|
285
285
|
return;
|
|
286
|
-
const
|
|
287
|
-
(
|
|
286
|
+
const D = (K = O.gateways) == null ? void 0 : K.find((ue) => ue.gateway === "Tyro");
|
|
287
|
+
(D == null ? void 0 : D.gateway) === "Tyro" && ((z = D == null ? void 0 : D.config) != null && z.uniqueId) && (k({ invalidate: !1 }), b(), Object.assign(T.value, O), r.open({
|
|
288
288
|
type: "success",
|
|
289
289
|
message: "Tyro reader created successfully"
|
|
290
290
|
}));
|
|
@@ -295,20 +295,20 @@ function Ke(F) {
|
|
|
295
295
|
message: je
|
|
296
296
|
});
|
|
297
297
|
},
|
|
298
|
-
onError: (
|
|
298
|
+
onError: (w) => {
|
|
299
299
|
b(), r.open({
|
|
300
300
|
type: "error",
|
|
301
|
-
message:
|
|
301
|
+
message: W(w)
|
|
302
302
|
});
|
|
303
303
|
}
|
|
304
304
|
}), C = u.isPolling;
|
|
305
305
|
function n() {
|
|
306
306
|
u.stop(), b();
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function x() {
|
|
309
309
|
n(), a(), u.start();
|
|
310
310
|
}
|
|
311
|
-
async function
|
|
311
|
+
async function E() {
|
|
312
312
|
if (!m.value) {
|
|
313
313
|
r.open({
|
|
314
314
|
type: "error",
|
|
@@ -317,18 +317,18 @@ function Ke(F) {
|
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
try {
|
|
320
|
-
a(), await
|
|
321
|
-
} catch (
|
|
320
|
+
a(), await j.syncTyroReader(T.value._id), x();
|
|
321
|
+
} catch (w) {
|
|
322
322
|
n(), r.open({
|
|
323
323
|
type: "error",
|
|
324
|
-
message:
|
|
324
|
+
message: W(w)
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
return
|
|
329
|
-
() =>
|
|
328
|
+
return A(
|
|
329
|
+
() => T.value.referenceId,
|
|
330
330
|
async () => {
|
|
331
|
-
await
|
|
331
|
+
await i();
|
|
332
332
|
},
|
|
333
333
|
{ immediate: !0 }
|
|
334
334
|
), Te(() => {
|
|
@@ -338,16 +338,16 @@ function Ke(F) {
|
|
|
338
338
|
isPollingTyroReader: C,
|
|
339
339
|
uniqueId: d,
|
|
340
340
|
canSyncTyroReader: m,
|
|
341
|
-
showTyroSyncPopover:
|
|
341
|
+
showTyroSyncPopover: s,
|
|
342
342
|
tyroSyncPopoverMessage: t,
|
|
343
343
|
tyroSyncButtonLabel: o,
|
|
344
|
-
syncTyroReader:
|
|
344
|
+
syncTyroReader: E
|
|
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__ */ R({
|
|
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(T) {
|
|
363
|
+
const p = T, a = re().currentCountry, b = [
|
|
364
364
|
{
|
|
365
365
|
label: "Fiuu Malaysia",
|
|
366
366
|
value: "cc.feedme.payment.rms",
|
|
367
|
-
region:
|
|
367
|
+
region: P.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: P.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: P.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: P.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: P.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: P.F_COUNTRY.enum.AU
|
|
403
403
|
}
|
|
404
|
-
], l =
|
|
404
|
+
], l = G(() => 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 = N(() => b.filter((U) => U.region === a.value)), v = N(() => c.value.find(
|
|
412
|
+
(U) => U.value === e.value.packageId
|
|
413
|
+
)), m = N(
|
|
414
414
|
() => {
|
|
415
|
-
var
|
|
416
|
-
return ((
|
|
415
|
+
var U;
|
|
416
|
+
return ((U = v.value) == null ? void 0 : U.gateway) === "Tyro";
|
|
417
417
|
}
|
|
418
418
|
), {
|
|
419
|
-
isLoading:
|
|
419
|
+
isLoading: s,
|
|
420
420
|
isPollingTyroReader: t,
|
|
421
421
|
uniqueId: o,
|
|
422
|
-
canSyncTyroReader:
|
|
422
|
+
canSyncTyroReader: i,
|
|
423
423
|
showTyroSyncPopover: u,
|
|
424
424
|
tyroSyncPopoverMessage: C,
|
|
425
425
|
tyroSyncButtonLabel: n,
|
|
426
|
-
syncTyroReader:
|
|
427
|
-
} = Ke(l),
|
|
426
|
+
syncTyroReader: x
|
|
427
|
+
} = Ke(l), E = N(() => m.value ? "button" : "submit"), w = N(() => m.value ? n.value : "Save"), k = N(() => m.value ? s.value : !1), O = N(() => m.value ? !i.value || t.value : !1), D = () => {
|
|
428
428
|
if (!l.value.gateways || l.value.gateways.length === 0)
|
|
429
429
|
return d();
|
|
430
|
-
const
|
|
431
|
-
if (!
|
|
430
|
+
const U = l.value.gateways[0];
|
|
431
|
+
if (!U.config)
|
|
432
432
|
return d();
|
|
433
|
-
if (
|
|
433
|
+
if (U.gateway === "Tyro") {
|
|
434
434
|
e.value = {
|
|
435
|
-
packageId:
|
|
436
|
-
uniqueId:
|
|
435
|
+
packageId: U.config.packageId,
|
|
436
|
+
uniqueId: U.config.uniqueId,
|
|
437
437
|
developerId: "",
|
|
438
438
|
isUat: !1
|
|
439
439
|
};
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
switch (
|
|
442
|
+
switch (U.gateway) {
|
|
443
443
|
case "Fiuu":
|
|
444
444
|
e.value = {
|
|
445
|
-
packageId:
|
|
446
|
-
uniqueId:
|
|
445
|
+
packageId: U.config.packageId,
|
|
446
|
+
uniqueId: U.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(U.config.uniqueId);
|
|
454
454
|
e.value = {
|
|
455
|
-
packageId:
|
|
455
|
+
packageId: U.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
|
+
A(l, D), q(D);
|
|
464
|
+
const K = (U) => {
|
|
465
|
+
var B, Q, H;
|
|
466
|
+
if (((H = (Q = (B = l.value.gateways) == null ? void 0 : B[0]) == null ? void 0 : Q.config) == null ? void 0 : H.packageId) === U)
|
|
467
|
+
return D();
|
|
468
468
|
e.value.uniqueId = "", e.value.developerId = "", e.value.isUat = !1;
|
|
469
469
|
};
|
|
470
|
-
async function
|
|
471
|
-
const
|
|
472
|
-
if (!
|
|
470
|
+
async function z() {
|
|
471
|
+
const U = v.value;
|
|
472
|
+
if (!U)
|
|
473
473
|
return;
|
|
474
474
|
let B = e.value.uniqueId;
|
|
475
|
-
|
|
475
|
+
U.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 Q = {
|
|
481
|
+
gateway: U.gateway,
|
|
482
482
|
config: {
|
|
483
|
-
packageId:
|
|
483
|
+
packageId: U.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] = Q, await p.onUpdate(l.value);
|
|
488
488
|
}
|
|
489
|
-
async function
|
|
489
|
+
async function ue(U) {
|
|
490
490
|
var B;
|
|
491
|
-
(B = l.value.gateways) == null || B.splice(
|
|
491
|
+
(B = l.value.gateways) == null || B.splice(U, 1), p.onUpdate(l.value);
|
|
492
492
|
}
|
|
493
493
|
function de() {
|
|
494
|
-
m.value &&
|
|
494
|
+
m.value && x();
|
|
495
495
|
}
|
|
496
|
-
return (
|
|
497
|
-
const
|
|
498
|
-
return g(),
|
|
496
|
+
return (U, B) => {
|
|
497
|
+
const Q = f("FmSelect"), H = f("FmTextField"), ge = f("FmCheckbox"), ce = f("FmButton"), be = f("FmTooltip"), _e = f("FmForm");
|
|
498
|
+
return g(), F(_e, {
|
|
499
499
|
ref: r.value,
|
|
500
500
|
class: "flex flex-col gap-16 w-[500px]",
|
|
501
|
-
onValidationSuccess:
|
|
501
|
+
onValidationSuccess: z
|
|
502
502
|
}, {
|
|
503
|
-
default:
|
|
504
|
-
y(
|
|
503
|
+
default: M(() => [
|
|
504
|
+
y(Q, {
|
|
505
505
|
modelValue: e.value.packageId,
|
|
506
506
|
"onUpdate:modelValue": [
|
|
507
|
-
B[0] || (B[0] = (
|
|
508
|
-
|
|
507
|
+
B[0] || (B[0] = (Y) => e.value.packageId = Y),
|
|
508
|
+
K
|
|
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(), V($, { key: 0 }, [
|
|
514
|
+
m.value ? (g(), F(H, {
|
|
515
515
|
key: 0,
|
|
516
|
-
"model-value":
|
|
516
|
+
"model-value": S(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(), V($, { key: 1 }, [
|
|
520
|
+
y(H, {
|
|
521
521
|
modelValue: e.value.uniqueId,
|
|
522
|
-
"onUpdate:modelValue": B[1] || (B[1] = (
|
|
522
|
+
"onUpdate:modelValue": B[1] || (B[1] = (Y) => e.value.uniqueId = Y),
|
|
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(), V("span", He, " Note: For outdated gateway is no longer continued development, please use the new gateway instead. ")) : h("", !0)
|
|
526
|
+
], 64)) : (g(), V($, { key: 2 }, [
|
|
527
|
+
y(H, {
|
|
528
528
|
modelValue: e.value.developerId,
|
|
529
|
-
"onUpdate:modelValue": B[2] || (B[2] = (
|
|
529
|
+
"onUpdate:modelValue": B[2] || (B[2] = (Y) => e.value.developerId = Y),
|
|
530
530
|
label: "Developer ID (MID)"
|
|
531
531
|
}, null, 8, ["modelValue"]),
|
|
532
|
-
y(
|
|
532
|
+
y(H, {
|
|
533
533
|
modelValue: e.value.uniqueId,
|
|
534
|
-
"onUpdate:modelValue": B[3] || (B[3] = (
|
|
534
|
+
"onUpdate:modelValue": B[3] || (B[3] = (Y) => e.value.uniqueId = Y),
|
|
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] = (Y) => e.value.isUat = Y),
|
|
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(), F(ce, {
|
|
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: () => ue(0)
|
|
551
|
+
}, null, 8, ["onclick"])) : h("", !0),
|
|
552
|
+
m.value && S(u) && O.value ? (g(), F(be, {
|
|
553
553
|
key: 1,
|
|
554
554
|
class: "flex-1",
|
|
555
555
|
variant: "plain",
|
|
556
556
|
placement: "top",
|
|
557
|
-
content:
|
|
557
|
+
content: S(C)
|
|
558
558
|
}, {
|
|
559
|
-
default:
|
|
559
|
+
default: M(() => [
|
|
560
560
|
I("div", Qe, [
|
|
561
|
-
y(
|
|
562
|
-
type:
|
|
561
|
+
y(ce, {
|
|
562
|
+
type: E.value,
|
|
563
563
|
class: "w-full",
|
|
564
564
|
variant: "primary",
|
|
565
|
-
loading:
|
|
565
|
+
loading: k.value,
|
|
566
566
|
disabled: O.value,
|
|
567
|
-
label:
|
|
567
|
+
label: w.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(), F(ce, {
|
|
574
574
|
key: 2,
|
|
575
|
-
type:
|
|
575
|
+
type: E.value,
|
|
576
576
|
class: "flex-1",
|
|
577
577
|
variant: "primary",
|
|
578
|
-
loading:
|
|
578
|
+
loading: k.value,
|
|
579
579
|
disabled: O.value,
|
|
580
|
-
label:
|
|
580
|
+
label: w.value,
|
|
581
581
|
onClick: de
|
|
582
582
|
}, null, 8, ["type", "loading", "disabled", "label"]))
|
|
583
583
|
])
|
|
584
|
-
], 64)) :
|
|
584
|
+
], 64)) : h("", !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__ */ R({
|
|
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(T) {
|
|
606
|
+
const { isLoading: p, startAsyncCall: a } = X(), b = T, l = G(() => 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 j.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 i = b.terminal.ecrs.at(o);
|
|
620
|
+
i.gateway === "FeedMe" && i.config && (c.value = {
|
|
621
|
+
terminalId: i.config.terminalId
|
|
622
622
|
});
|
|
623
623
|
};
|
|
624
|
-
|
|
625
|
-
const
|
|
624
|
+
A(l, m), q(m);
|
|
625
|
+
const s = N(() => (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 i;
|
|
631
|
+
(i = b.terminal.ecrs) == null || i.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, i) => {
|
|
634
|
+
const u = f("FmCircularProgress"), C = f("FmSelect"), n = f("FmButton"), x = f("FmForm");
|
|
635
|
+
return S(p) ? (g(), V("div", We, [
|
|
636
636
|
y(u, { size: "xxl" })
|
|
637
|
-
])) : (g(),
|
|
637
|
+
])) : (g(), F(x, {
|
|
638
638
|
key: 1,
|
|
639
639
|
ref: e.value,
|
|
640
640
|
class: "flex flex-col gap-16 w-[500px]",
|
|
641
|
-
onValidationSuccess:
|
|
641
|
+
onValidationSuccess: i[1] || (i[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: M(() => [
|
|
646
646
|
y(C, {
|
|
647
647
|
modelValue: c.value.terminalId,
|
|
648
|
-
"onUpdate:modelValue":
|
|
648
|
+
"onUpdate:modelValue": i[0] || (i[0] = (E) => c.value.terminalId = E),
|
|
649
649
|
label: "Terminal ID",
|
|
650
|
-
items:
|
|
651
|
-
rules:
|
|
650
|
+
items: s.value,
|
|
651
|
+
rules: S(ie)(S(se).string())
|
|
652
652
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
653
653
|
I("div", Xe, [
|
|
654
|
-
d.value > -1 ? (g(),
|
|
654
|
+
d.value > -1 ? (g(), F(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"])) : h("", !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__ */ R({
|
|
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(T) {
|
|
686
|
+
const p = T, a = G(() => 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((s) => s && s.gateway && s.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
|
+
A(a, d), q(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 s = f("FmTextField"), t = f("FmTextarea"), o = f("FmButton"), i = f("FmForm");
|
|
713
|
+
return g(), F(i, {
|
|
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: M(() => [
|
|
721
|
+
y(s, {
|
|
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(s, {
|
|
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(), F(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"])) : h("", !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__ */ R({
|
|
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(T) {
|
|
771
|
+
const p = T, a = G(() => 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 i;
|
|
779
779
|
if (!a.value.ecrIntegrations)
|
|
780
780
|
return d();
|
|
781
|
-
const
|
|
781
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
790
790
|
});
|
|
791
791
|
};
|
|
792
|
-
|
|
793
|
-
async function v(
|
|
792
|
+
A(a, c), q(c);
|
|
793
|
+
async function v(s) {
|
|
794
794
|
var t;
|
|
795
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
795
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
801
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
802
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
866
|
+
y(i, {
|
|
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" }, ia = { class: "flex flex-wrap gap-8 items-center mt-4" }, sa = { class: "flex mt-6 space-x-6" }, ua = /* @__PURE__ */ R({
|
|
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(T) {
|
|
891
|
+
const p = T, a = G(() => 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 i;
|
|
899
899
|
if (!a.value.ecrIntegrations)
|
|
900
900
|
return d();
|
|
901
|
-
const
|
|
901
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
910
910
|
});
|
|
911
911
|
};
|
|
912
|
-
|
|
913
|
-
async function v(
|
|
912
|
+
A(a, c), q(c);
|
|
913
|
+
async function v(s) {
|
|
914
914
|
var t;
|
|
915
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
915
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
921
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
922
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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", ia, [
|
|
971
|
+
(g(!0), V($, null, L(e.value.cardTypes, (n) => (g(), F(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", sa, [
|
|
979
|
+
l.value > -1 ? (g(), F(i, {
|
|
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"])) : h("", !0),
|
|
986
|
+
y(i, {
|
|
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__ */ R({
|
|
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(T) {
|
|
1011
|
+
const p = T, a = G(() => 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 i;
|
|
1019
1019
|
if (!a.value.ecrIntegrations)
|
|
1020
1020
|
return d();
|
|
1021
|
-
const
|
|
1021
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1030
1030
|
});
|
|
1031
1031
|
};
|
|
1032
|
-
|
|
1033
|
-
async function v(
|
|
1032
|
+
A(a, c), q(c);
|
|
1033
|
+
async function v(s) {
|
|
1034
1034
|
var t;
|
|
1035
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1035
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1041
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1042
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
1101
|
+
y(i, {
|
|
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__ */ R({
|
|
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(T) {
|
|
1126
|
+
const p = T, a = G(() => 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 i;
|
|
1134
1134
|
if (!a.value.ecrIntegrations)
|
|
1135
1135
|
return d();
|
|
1136
|
-
const
|
|
1136
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1145
1145
|
});
|
|
1146
1146
|
};
|
|
1147
|
-
|
|
1148
|
-
async function v(
|
|
1147
|
+
A(a, c), q(c);
|
|
1148
|
+
async function v(s) {
|
|
1149
1149
|
var t;
|
|
1150
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1150
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1156
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1157
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
1221
|
+
y(i, {
|
|
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__ */ R({
|
|
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(T) {
|
|
1246
|
+
const p = T, a = G(() => 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 i;
|
|
1253
1253
|
if (!a.value.ecrIntegrations)
|
|
1254
1254
|
return d();
|
|
1255
|
-
const
|
|
1255
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.at(t);
|
|
1260
1260
|
o.gateway === "Kbank" && o.config && (e.value = {
|
|
1261
1261
|
receiptName: o.receiptName ?? "",
|
|
1262
|
-
cardTypes: ((
|
|
1262
|
+
cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1263
1263
|
});
|
|
1264
1264
|
};
|
|
1265
|
-
|
|
1266
|
-
async function v(
|
|
1265
|
+
A(a, c), q(c);
|
|
1266
|
+
async function v(s) {
|
|
1267
1267
|
var t;
|
|
1268
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1268
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1274
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1275
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
1334
|
+
y(i, {
|
|
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__ */ R({
|
|
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(T) {
|
|
1359
|
+
const p = T, a = G(() => 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 s = v.at(m);
|
|
1372
|
+
s.gateway === "Ghl2" && s.config && (r.value = {
|
|
1373
|
+
ip: s.config.ip ?? "",
|
|
1374
|
+
receiptName: s.receiptName ?? ""
|
|
1375
1375
|
});
|
|
1376
1376
|
};
|
|
1377
|
-
|
|
1377
|
+
A(a, d), q(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 s = f("FmTextField"), t = f("FmButton"), o = f("FmForm");
|
|
1384
|
+
return g(), F(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: M(() => [
|
|
1400
|
+
y(s, {
|
|
1401
1401
|
modelValue: r.value.ip,
|
|
1402
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
1402
|
+
"onUpdate:modelValue": m[0] || (m[0] = (i) => r.value.ip = i),
|
|
1403
1403
|
label: "IP Address"
|
|
1404
1404
|
}, null, 8, ["modelValue"]),
|
|
1405
|
-
y(
|
|
1405
|
+
y(s, {
|
|
1406
1406
|
modelValue: r.value.receiptName,
|
|
1407
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
1407
|
+
"onUpdate:modelValue": m[1] || (m[1] = (i) => r.value.receiptName = i),
|
|
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(), F(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"])) : h("", !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" }, ka = { class: "flex mt-6 space-x-6" }, Na = /* @__PURE__ */ R({
|
|
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(T) {
|
|
1444
|
+
const p = T, a = G(() => 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 i;
|
|
1452
1452
|
if (!a.value.ecrIntegrations)
|
|
1453
1453
|
return d();
|
|
1454
|
-
const
|
|
1454
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1465
1465
|
});
|
|
1466
1466
|
};
|
|
1467
|
-
|
|
1468
|
-
async function v(
|
|
1467
|
+
A(a, c), q(c);
|
|
1468
|
+
async function v(s) {
|
|
1469
1469
|
var t;
|
|
1470
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1470
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1476
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1477
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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", ka, [
|
|
1529
|
+
l.value > -1 ? (g(), F(i, {
|
|
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"])) : h("", !0),
|
|
1536
|
+
y(i, {
|
|
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__ */ R({
|
|
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(T) {
|
|
1561
|
+
const p = T, a = G(() => 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 i;
|
|
1569
1569
|
if (!a.value.ecrIntegrations)
|
|
1570
1570
|
return d();
|
|
1571
|
-
const
|
|
1571
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1582
1582
|
});
|
|
1583
1583
|
};
|
|
1584
|
-
|
|
1585
|
-
async function v(
|
|
1584
|
+
A(a, c), q(c);
|
|
1585
|
+
async function v(s) {
|
|
1586
1586
|
var t;
|
|
1587
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1587
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1593
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1594
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
1653
|
+
y(i, {
|
|
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
|
+
}), Ra = { class: "flex items-end" }, Pa = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ba = { class: "flex mt-6 space-x-6" }, Oa = /* @__PURE__ */ R({
|
|
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(T) {
|
|
1678
|
+
const p = T, a = G(() => 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 i;
|
|
1686
1686
|
if (!a.value.ecrIntegrations)
|
|
1687
1687
|
return d();
|
|
1688
|
-
const
|
|
1688
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1699
1699
|
});
|
|
1700
1700
|
};
|
|
1701
|
-
|
|
1702
|
-
async function v(
|
|
1701
|
+
A(a, c), q(c);
|
|
1702
|
+
async function v(s) {
|
|
1703
1703
|
var t;
|
|
1704
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1704
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1710
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1711
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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", Ra, [
|
|
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(i, {
|
|
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", Pa, [
|
|
1760
|
+
(g(!0), V($, null, L(e.value.cardTypes, (n) => (g(), F(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", Ba, [
|
|
1768
|
+
l.value > -1 ? (g(), F(i, {
|
|
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"])) : h("", !0),
|
|
1775
|
+
y(i, {
|
|
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__ */ R({
|
|
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(T) {
|
|
1800
|
+
const p = T, a = G(() => 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 i;
|
|
1807
1807
|
if (!a.value.ecrIntegrations)
|
|
1808
1808
|
return d();
|
|
1809
|
-
const
|
|
1809
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.at(t);
|
|
1816
1816
|
o.gateway === "Oma" && o.config && (e.value = {
|
|
1817
1817
|
receiptName: o.receiptName ?? "",
|
|
1818
|
-
cardTypes: ((
|
|
1818
|
+
cardTypes: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1819
1819
|
});
|
|
1820
1820
|
};
|
|
1821
|
-
|
|
1822
|
-
async function v(
|
|
1821
|
+
A(a, c), q(c);
|
|
1822
|
+
async function v(s) {
|
|
1823
1823
|
var t;
|
|
1824
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1824
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1830
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1831
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
1890
|
+
y(i, {
|
|
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
|
+
}), Da = { class: "flex items-end" }, $a = { class: "flex flex-wrap gap-8 items-center mt-4" }, Ea = { class: "flex mt-6 space-x-6" }, La = /* @__PURE__ */ R({
|
|
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(T) {
|
|
1915
|
+
const p = T, a = G(() => 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 i;
|
|
1923
1923
|
if (!a.value.ecrIntegrations)
|
|
1924
1924
|
return d();
|
|
1925
|
-
const
|
|
1925
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
1936
1936
|
});
|
|
1937
1937
|
};
|
|
1938
|
-
|
|
1939
|
-
async function v(
|
|
1938
|
+
A(a, c), q(c);
|
|
1939
|
+
async function v(s) {
|
|
1940
1940
|
var t;
|
|
1941
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
1941
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
1947
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
1948
|
+
return g(), F(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 x, E;
|
|
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
|
+
...(E = (x = a.value.ecrIntegrations) == null ? void 0 : x[l.value]) == null ? void 0 : E.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: M(() => [
|
|
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", Da, [
|
|
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(i, {
|
|
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", $a, [
|
|
2002
|
+
(g(!0), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
2017
|
+
y(i, {
|
|
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__ */ R({
|
|
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(T) {
|
|
2045
|
+
const { isLoading: p, startAsyncCall: a } = X(), b = T, l = G(() => 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 i = b.terminal.ecrs.at(o);
|
|
2062
|
+
i.gateway === "Beam" && i.config && (c.value = {
|
|
2063
|
+
externalTerminalId: i.config.externalTerminalId
|
|
2064
2064
|
});
|
|
2065
2065
|
};
|
|
2066
|
-
|
|
2067
|
-
const
|
|
2066
|
+
A(l, m), q(m);
|
|
2067
|
+
const s = N(() => (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 i;
|
|
2073
|
+
(i = b.terminal.ecrs) == null || i.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, i) => {
|
|
2076
|
+
const u = f("FmCircularProgress"), C = f("FmSelect"), n = f("FmButton"), x = f("FmForm");
|
|
2077
|
+
return S(p) ? (g(), V("div", Ya, [
|
|
2078
2078
|
y(u, { size: "xxl" })
|
|
2079
|
-
])) : (g(),
|
|
2079
|
+
])) : (g(), F(x, {
|
|
2080
2080
|
key: 1,
|
|
2081
2081
|
ref: e.value,
|
|
2082
2082
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2083
|
-
onValidationSuccess:
|
|
2083
|
+
onValidationSuccess: i[1] || (i[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: M(() => [
|
|
2088
2088
|
y(C, {
|
|
2089
2089
|
modelValue: c.value.externalTerminalId,
|
|
2090
|
-
"onUpdate:modelValue":
|
|
2090
|
+
"onUpdate:modelValue": i[0] || (i[0] = (E) => c.value.externalTerminalId = E),
|
|
2091
2091
|
label: "External Terminal",
|
|
2092
|
-
items:
|
|
2093
|
-
rules:
|
|
2092
|
+
items: s.value,
|
|
2093
|
+
rules: S(ie)(S(se).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(), F(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"])) : h("", !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__ */ R({
|
|
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(T) {
|
|
2131
|
+
const { isLoading: p, startAsyncCall: a } = X(), b = T, l = G(() => 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 i = b.terminal.ecrs.findIndex((C) => C && C.gateway && C.gateway === "Bri");
|
|
2144
|
+
if (i === -1)
|
|
2145
2145
|
return v();
|
|
2146
|
-
d.value =
|
|
2147
|
-
const u = b.terminal.ecrs.at(
|
|
2146
|
+
d.value = i;
|
|
2147
|
+
const u = b.terminal.ecrs.at(i);
|
|
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
|
+
A(l, m), q(m);
|
|
2153
|
+
const s = N(() => (r.value ?? []).filter((i) => i.status === "READY").map((i) => ({ label: i.name, value: i._id }))), t = N(() => {
|
|
2154
|
+
if (s.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(i) {
|
|
2158
2158
|
var u;
|
|
2159
|
-
(u = b.terminal.ecrs) == null || u.splice(
|
|
2159
|
+
(u = b.terminal.ecrs) == null || u.splice(i, 1), b.onUpdate(b.terminal);
|
|
2160
2160
|
}
|
|
2161
|
-
return (
|
|
2162
|
-
const C = f("FmCircularProgress"), n = f("FmSelect"),
|
|
2163
|
-
return
|
|
2161
|
+
return (i, u) => {
|
|
2162
|
+
const C = f("FmCircularProgress"), n = f("FmSelect"), x = f("FmButton"), E = f("FmForm");
|
|
2163
|
+
return S(p) ? (g(), V("div", Ha, [
|
|
2164
2164
|
y(C, { size: "xxl" })
|
|
2165
|
-
])) : (g(),
|
|
2165
|
+
])) : (g(), F(E, {
|
|
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: M(() => [
|
|
2174
2174
|
y(n, {
|
|
2175
2175
|
modelValue: c.value.externalTerminalId,
|
|
2176
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
2176
|
+
"onUpdate:modelValue": u[0] || (u[0] = (w) => c.value.externalTerminalId = w),
|
|
2177
2177
|
label: "External Terminal",
|
|
2178
|
-
items:
|
|
2178
|
+
items: s.value,
|
|
2179
2179
|
"helper-text": t.value,
|
|
2180
|
-
rules:
|
|
2180
|
+
rules: S(ie)(S(se).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(), F(x, {
|
|
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"])) : h("", !0),
|
|
2190
|
+
y(x, {
|
|
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__ */ R({
|
|
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(T) {
|
|
2215
|
+
const p = T, a = G(() => 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 i;
|
|
2223
2223
|
if (!a.value.ecrIntegrations)
|
|
2224
2224
|
return d();
|
|
2225
|
-
const
|
|
2225
|
+
const s = a.value.ecrIntegrations, t = s.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 = s.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: ((i = o.dialogConfig) == null ? void 0 : i.cardTypes) ?? []
|
|
2234
2234
|
});
|
|
2235
2235
|
};
|
|
2236
|
-
|
|
2237
|
-
async function v(
|
|
2236
|
+
A(a, c), q(c);
|
|
2237
|
+
async function v(s) {
|
|
2238
2238
|
var t;
|
|
2239
|
-
(t = a.value.ecrIntegrations) == null || t.splice(
|
|
2239
|
+
(t = a.value.ecrIntegrations) == null || t.splice(s, 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 (s, t) => {
|
|
2245
|
+
const o = f("FmTextField"), i = f("FmButton"), u = f("FmChip"), C = f("FmForm");
|
|
2246
|
+
return g(), F(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, x;
|
|
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
|
+
...(x = (n = a.value.ecrIntegrations) == null ? void 0 : n[l.value]) == null ? void 0 : x.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: M(() => [
|
|
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(i, {
|
|
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), V($, null, L(e.value.cardTypes, (n) => (g(), F(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(), F(i, {
|
|
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"])) : h("", !0),
|
|
2310
|
+
y(i, {
|
|
2311
2311
|
type: "submit",
|
|
2312
2312
|
class: "flex-1",
|
|
2313
2313
|
variant: "primary",
|
|
@@ -2319,127 +2319,7 @@ const He = {
|
|
|
2319
2319
|
}, 512);
|
|
2320
2320
|
};
|
|
2321
2321
|
}
|
|
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({
|
|
2322
|
+
}), et = { class: "flex items-center" }, at = { class: "w-[260px] self-start" }, tt = { class: "flex-1" }, lt = /* @__PURE__ */ R({
|
|
2443
2323
|
__name: "EcrGateway",
|
|
2444
2324
|
props: {
|
|
2445
2325
|
terminal: {
|
|
@@ -2451,9 +2331,9 @@ const He = {
|
|
|
2451
2331
|
required: !0
|
|
2452
2332
|
}
|
|
2453
2333
|
},
|
|
2454
|
-
setup(
|
|
2334
|
+
setup(T) {
|
|
2455
2335
|
var d;
|
|
2456
|
-
const p =
|
|
2336
|
+
const p = T, a = [
|
|
2457
2337
|
{
|
|
2458
2338
|
label: "FeedMe Terminal",
|
|
2459
2339
|
value: "terminal",
|
|
@@ -2463,127 +2343,121 @@ const He = {
|
|
|
2463
2343
|
label: "GHL Terminal",
|
|
2464
2344
|
value: "ghl",
|
|
2465
2345
|
render: aa,
|
|
2466
|
-
region: [
|
|
2346
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2467
2347
|
},
|
|
2468
2348
|
{
|
|
2469
2349
|
label: "GHL2 Terminal",
|
|
2470
2350
|
value: "ghl2",
|
|
2471
2351
|
render: wa,
|
|
2472
|
-
region: [
|
|
2352
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2473
2353
|
},
|
|
2474
2354
|
{
|
|
2475
2355
|
label: "ITB Maybank Terminal",
|
|
2476
2356
|
value: "mb-itb",
|
|
2477
2357
|
render: oa,
|
|
2478
|
-
region: [
|
|
2358
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2479
2359
|
},
|
|
2480
2360
|
{
|
|
2481
2361
|
label: "PMA Maybank Terminal",
|
|
2482
2362
|
value: "mb-pma",
|
|
2483
2363
|
render: ua,
|
|
2484
|
-
region: [
|
|
2364
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2485
2365
|
},
|
|
2486
2366
|
{
|
|
2487
2367
|
label: "Paysys Maybank Terminal",
|
|
2488
2368
|
value: "mb-paysys",
|
|
2489
2369
|
render: pa,
|
|
2490
|
-
region: [
|
|
2370
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2491
2371
|
},
|
|
2492
2372
|
{
|
|
2493
2373
|
label: "Nets Terminal",
|
|
2494
2374
|
value: "nets",
|
|
2495
2375
|
render: ga,
|
|
2496
|
-
region: [
|
|
2376
|
+
region: [P.F_COUNTRY.enum.SG]
|
|
2497
2377
|
},
|
|
2498
2378
|
{
|
|
2499
2379
|
label: "KBank Terminal",
|
|
2500
2380
|
value: "kbank",
|
|
2501
2381
|
render: Ia,
|
|
2502
|
-
region: [
|
|
2382
|
+
region: [P.F_COUNTRY.enum.TH]
|
|
2503
2383
|
},
|
|
2504
2384
|
{
|
|
2505
2385
|
label: "GHL Terminal",
|
|
2506
2386
|
value: "ghl3",
|
|
2507
|
-
render:
|
|
2508
|
-
region: [
|
|
2387
|
+
render: Na,
|
|
2388
|
+
region: [P.F_COUNTRY.enum.TH]
|
|
2509
2389
|
},
|
|
2510
2390
|
{
|
|
2511
2391
|
label: "Paysys HLBB Terminal",
|
|
2512
2392
|
value: "hlbb",
|
|
2513
2393
|
render: ha,
|
|
2514
|
-
region: [
|
|
2394
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2515
2395
|
},
|
|
2516
2396
|
{
|
|
2517
2397
|
label: "GPAP Terminal",
|
|
2518
2398
|
value: "globalpayments",
|
|
2519
|
-
render:
|
|
2520
|
-
region: [
|
|
2399
|
+
render: Oa,
|
|
2400
|
+
region: [P.F_COUNTRY.enum.SG]
|
|
2521
2401
|
},
|
|
2522
2402
|
{
|
|
2523
2403
|
label: "OMA Terminal",
|
|
2524
2404
|
value: "oma",
|
|
2525
2405
|
render: Ga,
|
|
2526
|
-
region: [
|
|
2406
|
+
region: [P.F_COUNTRY.enum.PK]
|
|
2527
2407
|
},
|
|
2528
2408
|
{
|
|
2529
2409
|
label: "Revenue PBB Terminal",
|
|
2530
2410
|
value: "revenue",
|
|
2531
2411
|
render: La,
|
|
2532
|
-
region: [
|
|
2412
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2533
2413
|
},
|
|
2534
2414
|
{
|
|
2535
2415
|
label: "Paysys PBB Terminal",
|
|
2536
2416
|
value: "pbb",
|
|
2537
2417
|
render: Za,
|
|
2538
|
-
region: [
|
|
2418
|
+
region: [P.F_COUNTRY.enum.MY]
|
|
2539
2419
|
},
|
|
2540
2420
|
{
|
|
2541
2421
|
label: "Beam Terminal",
|
|
2542
2422
|
value: "beam",
|
|
2543
2423
|
render: Ka,
|
|
2544
|
-
region: [
|
|
2424
|
+
region: [P.F_COUNTRY.enum.TH]
|
|
2545
2425
|
},
|
|
2546
2426
|
{
|
|
2547
2427
|
label: "BRI Terminal",
|
|
2548
2428
|
value: "bri",
|
|
2549
2429
|
render: Qa,
|
|
2550
|
-
region: [
|
|
2551
|
-
},
|
|
2552
|
-
{
|
|
2553
|
-
label: "Teya Terminal",
|
|
2554
|
-
value: "teya",
|
|
2555
|
-
render: ot,
|
|
2556
|
-
region: [R.F_COUNTRY.enum.GB]
|
|
2430
|
+
region: [P.F_COUNTRY.enum.ID]
|
|
2557
2431
|
}
|
|
2558
|
-
], b =
|
|
2559
|
-
(c) => !c.region || c.region.includes(l.value ??
|
|
2560
|
-
)), { gatewayTab: e } =
|
|
2432
|
+
], b = N(() => a.find((c) => c.value === e.value)), l = re().currentCountry, r = N(() => a.filter(
|
|
2433
|
+
(c) => !c.region || c.region.includes(l.value ?? P.F_COUNTRY.enum.MY)
|
|
2434
|
+
)), { gatewayTab: e } = ne({
|
|
2561
2435
|
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
2562
2436
|
});
|
|
2563
2437
|
return (c, v) => {
|
|
2564
|
-
var
|
|
2438
|
+
var s;
|
|
2565
2439
|
const m = f("FmTabs");
|
|
2566
|
-
return g(),
|
|
2567
|
-
I("div",
|
|
2440
|
+
return g(), V("div", et, [
|
|
2441
|
+
I("div", at, [
|
|
2568
2442
|
y(m, {
|
|
2569
|
-
"model-value":
|
|
2570
|
-
"onUpdate:modelValue": v[0] || (v[0] = (t) =>
|
|
2443
|
+
"model-value": S(e),
|
|
2444
|
+
"onUpdate:modelValue": v[0] || (v[0] = (t) => ee(e) ? e.value = t : null),
|
|
2571
2445
|
class: "mb-6",
|
|
2572
2446
|
vertical: !0,
|
|
2573
2447
|
items: r.value,
|
|
2574
2448
|
"show-more-at": Number.POSITIVE_INFINITY
|
|
2575
2449
|
}, null, 8, ["model-value", "items", "show-more-at"])
|
|
2576
2450
|
]),
|
|
2577
|
-
I("div",
|
|
2578
|
-
|
|
2451
|
+
I("div", tt, [
|
|
2452
|
+
S(e) ? (g(), F(ae((s = b.value) == null ? void 0 : s.render), te(le({ key: 0 }, {
|
|
2579
2453
|
terminal: p.terminal,
|
|
2580
2454
|
onUpdate: p.onUpdate
|
|
2581
|
-
})), null, 16)) :
|
|
2455
|
+
})), null, 16)) : h("", !0)
|
|
2582
2456
|
])
|
|
2583
2457
|
]);
|
|
2584
2458
|
};
|
|
2585
2459
|
}
|
|
2586
|
-
}),
|
|
2460
|
+
}), nt = { class: "flex mt-6 space-x-6" }, ot = /* @__PURE__ */ R({
|
|
2587
2461
|
__name: "PromptPayGateway",
|
|
2588
2462
|
props: {
|
|
2589
2463
|
terminal: {
|
|
@@ -2595,8 +2469,8 @@ const He = {
|
|
|
2595
2469
|
required: !0
|
|
2596
2470
|
}
|
|
2597
2471
|
},
|
|
2598
|
-
setup(
|
|
2599
|
-
const p =
|
|
2472
|
+
setup(T) {
|
|
2473
|
+
const p = T, a = G(() => p.terminal), b = _(), l = _(-1), r = _({
|
|
2600
2474
|
account: "",
|
|
2601
2475
|
receiptName: ""
|
|
2602
2476
|
}), e = () => {
|
|
@@ -2608,47 +2482,47 @@ const He = {
|
|
|
2608
2482
|
if (m === -1)
|
|
2609
2483
|
return e();
|
|
2610
2484
|
l.value = m;
|
|
2611
|
-
const
|
|
2612
|
-
|
|
2613
|
-
account:
|
|
2614
|
-
receiptName:
|
|
2485
|
+
const s = v.at(m);
|
|
2486
|
+
s.gateway === "PROMPTPAY" && s.config && (r.value = {
|
|
2487
|
+
account: s.config.account ?? "",
|
|
2488
|
+
receiptName: s.receiptName ?? ""
|
|
2615
2489
|
});
|
|
2616
2490
|
};
|
|
2617
|
-
|
|
2491
|
+
A(a, d), q(d);
|
|
2618
2492
|
async function c(v) {
|
|
2619
2493
|
var m;
|
|
2620
2494
|
(m = a.value.qrIntegrations) == null || m.splice(v, 1), p.onUpdate(a.value);
|
|
2621
2495
|
}
|
|
2622
2496
|
return (v, m) => {
|
|
2623
|
-
const
|
|
2624
|
-
return g(),
|
|
2497
|
+
const s = f("FmTextField"), t = f("FmButton"), o = f("FmForm");
|
|
2498
|
+
return g(), F(o, {
|
|
2625
2499
|
ref: b.value,
|
|
2626
2500
|
class: "flex flex-col gap-16 w-[500px]",
|
|
2627
2501
|
onValidationSuccess: m[2] || (m[2] = () => {
|
|
2628
2502
|
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);
|
|
2629
2503
|
})
|
|
2630
2504
|
}, {
|
|
2631
|
-
default:
|
|
2632
|
-
y(
|
|
2505
|
+
default: M(() => [
|
|
2506
|
+
y(s, {
|
|
2633
2507
|
modelValue: r.value.account,
|
|
2634
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
2508
|
+
"onUpdate:modelValue": m[0] || (m[0] = (i) => r.value.account = i),
|
|
2635
2509
|
label: "Thai Phone Number / Thai Naitonal ID",
|
|
2636
2510
|
"label-info": "Thai Phone Number can be prefixed with 66 or 0 will be fine both will works well."
|
|
2637
2511
|
}, null, 8, ["modelValue"]),
|
|
2638
|
-
y(
|
|
2512
|
+
y(s, {
|
|
2639
2513
|
modelValue: r.value.receiptName,
|
|
2640
|
-
"onUpdate:modelValue": m[1] || (m[1] = (
|
|
2514
|
+
"onUpdate:modelValue": m[1] || (m[1] = (i) => r.value.receiptName = i),
|
|
2641
2515
|
label: "Receipt Payment Name",
|
|
2642
2516
|
"label-info": "Default receipt display will be 'TERMINAL_MAYBANK'"
|
|
2643
2517
|
}, null, 8, ["modelValue"]),
|
|
2644
|
-
I("div",
|
|
2645
|
-
l.value > -1 ? (g(),
|
|
2518
|
+
I("div", nt, [
|
|
2519
|
+
l.value > -1 ? (g(), F(t, {
|
|
2646
2520
|
key: 0,
|
|
2647
2521
|
class: "flex-1",
|
|
2648
2522
|
variant: "secondary",
|
|
2649
2523
|
label: "Delete",
|
|
2650
2524
|
onclick: () => c(l.value)
|
|
2651
|
-
}, null, 8, ["onclick"])) :
|
|
2525
|
+
}, null, 8, ["onclick"])) : h("", !0),
|
|
2652
2526
|
y(t, {
|
|
2653
2527
|
type: "submit",
|
|
2654
2528
|
class: "flex-1",
|
|
@@ -2661,7 +2535,7 @@ const He = {
|
|
|
2661
2535
|
}, 512);
|
|
2662
2536
|
};
|
|
2663
2537
|
}
|
|
2664
|
-
}),
|
|
2538
|
+
}), rt = { class: "flex items-center" }, it = { class: "w-[260px] self-start" }, st = { class: "flex-1" }, ut = /* @__PURE__ */ R({
|
|
2665
2539
|
__name: "QrGateway",
|
|
2666
2540
|
props: {
|
|
2667
2541
|
terminal: {
|
|
@@ -2673,41 +2547,41 @@ const He = {
|
|
|
2673
2547
|
required: !0
|
|
2674
2548
|
}
|
|
2675
2549
|
},
|
|
2676
|
-
setup(
|
|
2550
|
+
setup(T) {
|
|
2677
2551
|
var d;
|
|
2678
|
-
const p =
|
|
2552
|
+
const p = T, a = [
|
|
2679
2553
|
{
|
|
2680
2554
|
label: "PromptPay",
|
|
2681
2555
|
value: "promptpay",
|
|
2682
|
-
render:
|
|
2683
|
-
region: [
|
|
2556
|
+
render: ot,
|
|
2557
|
+
region: [P.F_COUNTRY.enum.TH]
|
|
2684
2558
|
}
|
|
2685
|
-
], b =
|
|
2559
|
+
], b = N(() => a.find((c) => c.value === e.value)), l = re().currentCountry, r = N(() => a.filter((c) => !c.region || c.region.includes(l.value ?? P.F_COUNTRY.enum.MY))), { gatewayTab: e } = ne({
|
|
2686
2560
|
gatewayTab: (d = r.value[0]) == null ? void 0 : d.value
|
|
2687
2561
|
});
|
|
2688
2562
|
return (c, v) => {
|
|
2689
|
-
var
|
|
2563
|
+
var s;
|
|
2690
2564
|
const m = f("FmTabs");
|
|
2691
|
-
return g(),
|
|
2692
|
-
I("div",
|
|
2565
|
+
return g(), V("div", rt, [
|
|
2566
|
+
I("div", it, [
|
|
2693
2567
|
y(m, {
|
|
2694
|
-
"model-value":
|
|
2695
|
-
"onUpdate:modelValue": v[0] || (v[0] = (t) =>
|
|
2568
|
+
"model-value": S(e),
|
|
2569
|
+
"onUpdate:modelValue": v[0] || (v[0] = (t) => ee(e) ? e.value = t : null),
|
|
2696
2570
|
class: "mb-6",
|
|
2697
2571
|
vertical: !0,
|
|
2698
2572
|
items: r.value
|
|
2699
2573
|
}, null, 8, ["model-value", "items"])
|
|
2700
2574
|
]),
|
|
2701
|
-
I("div",
|
|
2702
|
-
|
|
2575
|
+
I("div", st, [
|
|
2576
|
+
S(e) ? (g(), F(ae((s = b.value) == null ? void 0 : s.render), te(le({ key: 0 }, {
|
|
2703
2577
|
terminal: p.terminal,
|
|
2704
2578
|
onUpdate: p.onUpdate
|
|
2705
|
-
})), null, 16)) :
|
|
2579
|
+
})), null, 16)) : h("", !0)
|
|
2706
2580
|
])
|
|
2707
2581
|
]);
|
|
2708
2582
|
};
|
|
2709
2583
|
}
|
|
2710
|
-
}),
|
|
2584
|
+
}), Nt = /* @__PURE__ */ R({
|
|
2711
2585
|
__name: "TerminalSetting",
|
|
2712
2586
|
props: {
|
|
2713
2587
|
terminalId: {
|
|
@@ -2715,22 +2589,22 @@ const He = {
|
|
|
2715
2589
|
required: !0
|
|
2716
2590
|
}
|
|
2717
2591
|
},
|
|
2718
|
-
setup(
|
|
2719
|
-
const p =
|
|
2592
|
+
setup(T) {
|
|
2593
|
+
const p = T, { tab: a } = ne({
|
|
2720
2594
|
tab: "information"
|
|
2721
|
-
}), { isLoading: b, startAsyncCall: l } =
|
|
2722
|
-
async function m(
|
|
2595
|
+
}), { isLoading: b, startAsyncCall: l } = X(!0), r = Ie(), e = me(), d = we(), { t: c } = oe(), v = _();
|
|
2596
|
+
async function m(w, k) {
|
|
2723
2597
|
l(async () => {
|
|
2724
2598
|
try {
|
|
2725
|
-
await
|
|
2726
|
-
name:
|
|
2727
|
-
status:
|
|
2728
|
-
ecrs:
|
|
2729
|
-
gateways:
|
|
2730
|
-
ecrIntegrations:
|
|
2731
|
-
qrIntegrations:
|
|
2732
|
-
...
|
|
2733
|
-
}), v.value = await
|
|
2599
|
+
await j.updateById(p.terminalId, {
|
|
2600
|
+
name: w.name,
|
|
2601
|
+
status: w.status,
|
|
2602
|
+
ecrs: w.ecrs ?? [],
|
|
2603
|
+
gateways: w.gateways ?? [],
|
|
2604
|
+
ecrIntegrations: w.ecrIntegrations ?? [],
|
|
2605
|
+
qrIntegrations: w.qrIntegrations ?? [],
|
|
2606
|
+
...k ? { paymentCheckouts: k } : {}
|
|
2607
|
+
}), v.value = await j.readById(p.terminalId), e.open({
|
|
2734
2608
|
type: "success",
|
|
2735
2609
|
message: "Terminal updated successfully"
|
|
2736
2610
|
});
|
|
@@ -2738,12 +2612,12 @@ const He = {
|
|
|
2738
2612
|
e.open({
|
|
2739
2613
|
type: "error",
|
|
2740
2614
|
title: "Error occurs when update terminal",
|
|
2741
|
-
message:
|
|
2615
|
+
message: W(O)
|
|
2742
2616
|
});
|
|
2743
2617
|
}
|
|
2744
2618
|
});
|
|
2745
2619
|
}
|
|
2746
|
-
const
|
|
2620
|
+
const s = [
|
|
2747
2621
|
{
|
|
2748
2622
|
label: "Information",
|
|
2749
2623
|
value: "information",
|
|
@@ -2767,51 +2641,51 @@ const He = {
|
|
|
2767
2641
|
label: "ECR Gateway",
|
|
2768
2642
|
value: "ecr",
|
|
2769
2643
|
icon: "point_of_sale",
|
|
2770
|
-
render:
|
|
2644
|
+
render: lt,
|
|
2771
2645
|
onlyFor: ["POS", "KIOSK"]
|
|
2772
2646
|
},
|
|
2773
2647
|
{
|
|
2774
2648
|
label: "QR Gateway",
|
|
2775
2649
|
value: "qr",
|
|
2776
2650
|
icon: "qr_code",
|
|
2777
|
-
render:
|
|
2651
|
+
render: ut,
|
|
2778
2652
|
onlyFor: ["POS", "KIOSK"]
|
|
2779
2653
|
},
|
|
2780
2654
|
{
|
|
2781
2655
|
label: "Payment Checkout",
|
|
2782
2656
|
value: "payment-checkout",
|
|
2783
2657
|
icon: "tune",
|
|
2784
|
-
render:
|
|
2658
|
+
render: Ne,
|
|
2785
2659
|
onlyFor: ["KIOSK", "POS"]
|
|
2786
2660
|
}
|
|
2787
|
-
], t = ve.FdoTerminalTemplateDeviceType.options, o =
|
|
2661
|
+
], t = ve.FdoTerminalTemplateDeviceType.options, o = N(
|
|
2788
2662
|
() => {
|
|
2789
|
-
var
|
|
2790
|
-
return t.includes(((
|
|
2663
|
+
var w;
|
|
2664
|
+
return t.includes(((w = v.value) == null ? void 0 : w.deviceType) ?? "");
|
|
2791
2665
|
}
|
|
2792
2666
|
);
|
|
2793
|
-
function
|
|
2794
|
-
const
|
|
2667
|
+
function i() {
|
|
2668
|
+
const w = v.value;
|
|
2795
2669
|
d.open({
|
|
2796
2670
|
title: "Save as Template",
|
|
2797
2671
|
closeButton: !0,
|
|
2798
2672
|
overlay: !0,
|
|
2799
|
-
contentComponent:
|
|
2800
|
-
}).onPrimary(async (
|
|
2673
|
+
contentComponent: Re
|
|
2674
|
+
}).onPrimary(async (k) => {
|
|
2801
2675
|
d.close();
|
|
2802
2676
|
try {
|
|
2803
2677
|
await pe.create({
|
|
2804
|
-
name:
|
|
2805
|
-
description:
|
|
2806
|
-
businessId:
|
|
2807
|
-
deviceType:
|
|
2808
|
-
isDefault:
|
|
2678
|
+
name: k.name,
|
|
2679
|
+
description: k.description,
|
|
2680
|
+
businessId: w.restaurant.businessId,
|
|
2681
|
+
deviceType: w.deviceType,
|
|
2682
|
+
isDefault: k.isDefault,
|
|
2809
2683
|
settings: {
|
|
2810
|
-
ecrs: (
|
|
2811
|
-
ecrIntegrations: (
|
|
2684
|
+
ecrs: (w.ecrs ?? []).map(({ gateway: O }) => ({ gateway: O })),
|
|
2685
|
+
ecrIntegrations: (w.ecrIntegrations ?? []).map(
|
|
2812
2686
|
({ gateway: O }) => ({ gateway: O })
|
|
2813
2687
|
),
|
|
2814
|
-
paymentCheckouts:
|
|
2688
|
+
paymentCheckouts: w.paymentCheckouts ?? []
|
|
2815
2689
|
}
|
|
2816
2690
|
}), e.open({
|
|
2817
2691
|
type: "success",
|
|
@@ -2821,22 +2695,22 @@ const He = {
|
|
|
2821
2695
|
e.open({
|
|
2822
2696
|
type: "error",
|
|
2823
2697
|
title: "Error occurs when create setting template",
|
|
2824
|
-
message:
|
|
2698
|
+
message: W(O)
|
|
2825
2699
|
});
|
|
2826
2700
|
}
|
|
2827
2701
|
});
|
|
2828
2702
|
}
|
|
2829
2703
|
async function u() {
|
|
2830
|
-
const
|
|
2831
|
-
|
|
2832
|
-
|
|
2704
|
+
const w = v.value, k = await pe.readByBusiness(
|
|
2705
|
+
w.restaurant.businessId,
|
|
2706
|
+
w.deviceType
|
|
2833
2707
|
);
|
|
2834
2708
|
d.open({
|
|
2835
2709
|
title: "Apply Template",
|
|
2836
2710
|
closeButton: !0,
|
|
2837
2711
|
overlay: !0,
|
|
2838
2712
|
contentComponent: qe,
|
|
2839
|
-
contentComponentProps: { templates:
|
|
2713
|
+
contentComponentProps: { templates: k }
|
|
2840
2714
|
}).onPrimary(async (O) => {
|
|
2841
2715
|
d.close(), xe(
|
|
2842
2716
|
d,
|
|
@@ -2845,15 +2719,15 @@ const He = {
|
|
|
2845
2719
|
async () => {
|
|
2846
2720
|
l(async () => {
|
|
2847
2721
|
try {
|
|
2848
|
-
await
|
|
2722
|
+
await j.applyTemplate(p.terminalId, O.templateId), v.value = await j.readById(p.terminalId), e.open({
|
|
2849
2723
|
type: "success",
|
|
2850
2724
|
message: "Setting template applied successfully."
|
|
2851
2725
|
});
|
|
2852
|
-
} catch (
|
|
2726
|
+
} catch (D) {
|
|
2853
2727
|
e.open({
|
|
2854
2728
|
type: "error",
|
|
2855
2729
|
title: "Error occurs when apply setting template",
|
|
2856
|
-
message:
|
|
2730
|
+
message: W(D)
|
|
2857
2731
|
});
|
|
2858
2732
|
}
|
|
2859
2733
|
});
|
|
@@ -2861,48 +2735,48 @@ const He = {
|
|
|
2861
2735
|
);
|
|
2862
2736
|
});
|
|
2863
2737
|
}
|
|
2864
|
-
const C =
|
|
2738
|
+
const C = N(
|
|
2865
2739
|
() => o.value ? [
|
|
2866
|
-
{ label: "Save as Template", fn:
|
|
2740
|
+
{ label: "Save as Template", fn: i },
|
|
2867
2741
|
{ label: "Apply Template", fn: u }
|
|
2868
2742
|
] : []
|
|
2869
2743
|
);
|
|
2870
|
-
|
|
2871
|
-
const n =
|
|
2872
|
-
var
|
|
2873
|
-
return (
|
|
2744
|
+
re().currentCountry;
|
|
2745
|
+
const n = N(() => {
|
|
2746
|
+
var w;
|
|
2747
|
+
return (w = s.find((k) => k.value === a.value)) == null ? void 0 : w.render;
|
|
2874
2748
|
});
|
|
2875
|
-
async function
|
|
2749
|
+
async function x() {
|
|
2876
2750
|
l(async () => {
|
|
2877
|
-
v.value = await
|
|
2751
|
+
v.value = await j.readById(p.terminalId);
|
|
2878
2752
|
});
|
|
2879
2753
|
}
|
|
2880
|
-
const
|
|
2881
|
-
(
|
|
2882
|
-
var
|
|
2883
|
-
return !
|
|
2754
|
+
const E = N(() => s.filter(
|
|
2755
|
+
(w) => {
|
|
2756
|
+
var k;
|
|
2757
|
+
return !w.onlyFor || w.onlyFor.includes(((k = v.value) == null ? void 0 : k.deviceType) ?? "");
|
|
2884
2758
|
}
|
|
2885
2759
|
));
|
|
2886
|
-
return
|
|
2887
|
-
var
|
|
2760
|
+
return q(x), (w, k) => {
|
|
2761
|
+
var D, K;
|
|
2888
2762
|
const O = f("FmTabs");
|
|
2889
|
-
return g(),
|
|
2890
|
-
title: `${(
|
|
2891
|
-
loading:
|
|
2763
|
+
return g(), F(Fe, {
|
|
2764
|
+
title: `${(D = v.value) == null ? void 0 : D.deviceType} (${(K = v.value) == null ? void 0 : K._id})`,
|
|
2765
|
+
loading: S(b),
|
|
2892
2766
|
actions: C.value,
|
|
2893
|
-
onBack:
|
|
2767
|
+
onBack: S(r).back
|
|
2894
2768
|
}, {
|
|
2895
|
-
default:
|
|
2769
|
+
default: M(() => [
|
|
2896
2770
|
y(O, {
|
|
2897
|
-
"model-value":
|
|
2898
|
-
"onUpdate:modelValue":
|
|
2771
|
+
"model-value": S(a),
|
|
2772
|
+
"onUpdate:modelValue": k[0] || (k[0] = (z) => ee(a) ? a.value = z : null),
|
|
2899
2773
|
class: "mb-6",
|
|
2900
|
-
items:
|
|
2774
|
+
items: E.value
|
|
2901
2775
|
}, null, 8, ["model-value", "items"]),
|
|
2902
|
-
|
|
2776
|
+
S(a) ? (g(), F(ae(n.value), te(le({ key: 0 }, {
|
|
2903
2777
|
terminal: v.value,
|
|
2904
2778
|
onUpdate: m
|
|
2905
|
-
})), null, 16)) :
|
|
2779
|
+
})), null, 16)) : h("", !0)
|
|
2906
2780
|
]),
|
|
2907
2781
|
_: 1
|
|
2908
2782
|
}, 8, ["title", "loading", "actions", "onBack"]);
|
|
@@ -2910,5 +2784,5 @@ const He = {
|
|
|
2910
2784
|
}
|
|
2911
2785
|
});
|
|
2912
2786
|
export {
|
|
2913
|
-
|
|
2787
|
+
Nt as default
|
|
2914
2788
|
};
|