@feedmepos/mf-payment 0.0.0-beta.40 → 0.0.0-beta.42
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{PayoutAccount-Bx7WBGhx.js → PayoutAccount-BmZwmSt4.js} +5 -5
- package/dist/{PayoutAccount-CW3L2i8M.js → PayoutAccount-UHEZ4sXv.js} +3 -3
- package/dist/{PayoutAccountSetting-CPaxWLYZ.js → PayoutAccountSetting-CywVFXxL.js} +3 -3
- package/dist/{Settlement-DL8ff0Vv.js → Settlement-CwdBiElJ.js} +3 -3
- package/dist/{Settlement-CRGaycXE.js → Settlement-ID4SKZQU.js} +3 -3
- package/dist/{SettlementTransactions-W0DQHQMd.js → SettlementTransactions-CZc3gg2W.js} +4 -4
- package/dist/{SettlementTransactions-CdL1ExM6.js → SettlementTransactions-Cva0BhNe.js} +4 -4
- package/dist/{Terminal-D0TElER9.js → Terminal-CD2HjTZ6.js} +4 -4
- package/dist/TerminalSetting-1bqfLfaT.js +379 -0
- package/dist/{TerminalTransaction-GEIPUUzT.js → TerminalTransaction-DYrFWTIb.js} +5 -5
- package/dist/{TerminalTransaction-BszPZSBF.js → TerminalTransaction-jVoZHvia.js} +5 -5
- package/dist/{Transaction-16R7hUeI.js → Transaction-CjUdHN9-.js} +4 -4
- package/dist/{Transaction-C8P0mIss.js → Transaction-D1RHJmuR.js} +4 -4
- package/dist/app.js +13 -13
- package/dist/{assets-CFcerXvc.js → assets-BhBS0p9e.js} +1 -1
- package/dist/{index-DtBydBjg.js → index-9ujJCGqe.js} +2 -2
- package/dist/{index-B43_27r6.js → index-BlGpdOEP.js} +1 -1
- package/dist/{index-DU5MydmH.js → index-C074LfUa.js} +1 -1
- package/dist/{index-Cck_cJ4W.js → index-C5AZUa6M.js} +1 -1
- package/dist/{index-BDfIDSZM.js → index-CM83utfE.js} +1 -1
- package/dist/{index-DEkrv1NK.js → index-DuCv6dOI.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BSRXe76m.js → index.vue_vue_type_script_setup_true_lang-DcbfY6SQ.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-9gryxf2v.js → payout-account-D_HmqPHp.js} +215 -215
- package/dist/{transaction-kfOOv_cv.js → transaction-D5lnozQA.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/TerminalSetting-lqi5bdAq.js +0 -378
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as b, resolveComponent as m, openBlock as g, createBlock as h, normalizeClass as N, withCtx as f, createElementVNode as P, toDisplayString as C, createVNode as c, computed as x, ref as E, watch as F, unref as l, isRef as k, h as w } from "vue";
|
2
|
-
import { u as S } from "./index-
|
3
|
-
import { _ as O } from "./index-
|
2
|
+
import { u as S } from "./index-C5AZUa6M.js";
|
3
|
+
import { _ as O } from "./index-9ujJCGqe.js";
|
4
4
|
import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
5
|
-
import { P as V } from "./payout-account-
|
6
|
-
import { p as D } from "./index-
|
5
|
+
import { P as V } from "./payout-account-D_HmqPHp.js";
|
6
|
+
import { p as D } from "./index-BlGpdOEP.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
|
-
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-
|
8
|
+
import { _ as T } from "./index.vue_vue_type_script_setup_true_lang-DcbfY6SQ.js";
|
9
9
|
import { useRouter as $ } from "vue-router";
|
10
10
|
const G = /* @__PURE__ */ b({
|
11
11
|
__name: "Status",
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as F, ref as P, reactive as k, computed as Z, watch as y, resolveComponent as i, openBlock as c, createBlock as Y, withCtx as X, createElementVNode as g, createVNode as u, unref as n, createCommentVNode as v, createElementBlock as p, normalizeClass as N, toDisplayString as R, h as W, onMounted as T, Fragment as L } from "vue";
|
2
|
-
import { p as z } from "./index-
|
3
|
-
import { _ as I, u as S,
|
2
|
+
import { p as z } from "./index-BlGpdOEP.js";
|
3
|
+
import { _ as I, u as S, e as h } from "./index-9ujJCGqe.js";
|
4
4
|
import { defineStore as _ } from "pinia";
|
5
5
|
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
6
|
-
import { c as AA, P as j } from "./payout-account-
|
6
|
+
import { c as AA, P as j } from "./payout-account-D_HmqPHp.js";
|
7
7
|
import { useDialogChild as sA, useDialog as eA } from "@feedmepos/ui-library";
|
8
8
|
import { z as f, a as q } from "./validator-D5jtpt9A.js";
|
9
9
|
import { P as K } from "./PDFViewer-CjH_C1uT.js";
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as I, resolveComponent as y, openBlock as b, createElementBlock as $, Fragment as T, createElementVNode as i, createVNode as o, withCtx as F, createTextVNode as S, toDisplayString as C, createCommentVNode as U, createBlock as V, ref as k, watch as N, computed as E, unref as d, isRef as M, h as K, onMounted as O, resolveDynamicComponent as j, normalizeProps as z, mergeProps as H } from "vue";
|
2
|
-
import { p as R } from "./index-
|
3
|
-
import { g as _, b as B, u as L } from "./index-
|
2
|
+
import { p as R } from "./index-BlGpdOEP.js";
|
3
|
+
import { g as _, b as B, u as L } from "./index-9ujJCGqe.js";
|
4
4
|
import { _ as Z } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
5
5
|
import { useRouter as J } from "vue-router";
|
6
|
-
import { u as Q } from "./index-
|
6
|
+
import { u as Q } from "./index-C5AZUa6M.js";
|
7
7
|
import { P as q } from "./PDFViewer-CjH_C1uT.js";
|
8
8
|
import { useSnackbar as X } from "@feedmepos/ui-library";
|
9
9
|
import { u as Y } from "./error-K1CakhA9.js";
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import { defineComponent as w, ref as S, computed as D, resolveComponent as h, openBlock as v, createBlock as x, h as A, onMounted as k, watch as F, unref as n, withCtx as V, createElementVNode as p, createVNode as i, isRef as C } from "vue";
|
2
|
-
import { u as $ } from "./index-
|
2
|
+
import { u as $ } from "./index-9ujJCGqe.js";
|
3
3
|
import { h as _ } from "./moment-h96o7c8I.js";
|
4
4
|
import { useCoreStore as b } from "@feedmepos/mf-common";
|
5
5
|
import { _ as I } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
6
|
-
import { s as g } from "./index-
|
6
|
+
import { s as g } from "./index-C074LfUa.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
8
|
import { d as f } from "./dinero-CIVmXLL-.js";
|
9
9
|
import { _ as K } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
|
10
10
|
import { useRouter as P } from "vue-router";
|
11
|
-
import { u as O } from "./index-
|
11
|
+
import { u as O } from "./index-C5AZUa6M.js";
|
12
12
|
import { _ as Y } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
13
13
|
import { _ as B } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
14
14
|
const L = /* @__PURE__ */ w({
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { defineComponent as w, ref as h, computed as S, resolveComponent as v, openBlock as x, createBlock as D, h as A, watch as k, onMounted as F, unref as o, withCtx as R, createElementVNode as u, createVNode as p, isRef as V } from "vue";
|
2
|
-
import { u as b } from "./index-
|
2
|
+
import { u as b } from "./index-9ujJCGqe.js";
|
3
3
|
import { h as _ } from "./moment-h96o7c8I.js";
|
4
|
-
import { s as g } from "./index-
|
4
|
+
import { s as g } from "./index-C074LfUa.js";
|
5
5
|
import "@feedmepos/ui-library";
|
6
6
|
import { d as f } from "./dinero-CIVmXLL-.js";
|
7
7
|
import { _ as C } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
|
8
8
|
import { useRouter as $ } from "vue-router";
|
9
9
|
import { _ as I } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
10
|
-
import { u as K } from "./index-
|
10
|
+
import { u as K } from "./index-C5AZUa6M.js";
|
11
11
|
import { _ as P } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
12
|
const B = /* @__PURE__ */ w({
|
13
13
|
__name: "SettlementTable",
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as T, resolveComponent as g, openBlock as F, createBlock as P, normalizeClass as z, withCtx as l, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as c, ref as _, onMounted as G, watch as $, createVNode as a, createTextVNode as i, h as C } from "vue";
|
2
|
-
import {
|
2
|
+
import { e as E, u as j } from "./index-9ujJCGqe.js";
|
3
3
|
import "@feedmepos/ui-library";
|
4
4
|
import { d as h } from "./dinero-CIVmXLL-.js";
|
5
|
-
import { g as Y, a as H } from "./assets-
|
6
|
-
import { t as q, a as J } from "./transaction-
|
5
|
+
import { g as Y, a as H } from "./assets-BhBS0p9e.js";
|
6
|
+
import { t as q, a as J } from "./transaction-D5lnozQA.js";
|
7
7
|
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
8
8
|
import { useRouter as W } from "vue-router";
|
9
|
-
import { s as X } from "./index-
|
9
|
+
import { s as X } from "./index-C074LfUa.js";
|
10
10
|
import { useCoreStore as Z } from "@feedmepos/mf-common";
|
11
11
|
const ee = /* @__PURE__ */ T({
|
12
12
|
__name: "Status",
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as k, normalizeClass as j, withCtx as l, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as p, ref as T, onMounted as Y, watch as H, createVNode as n, createTextVNode as i, h as N } from "vue";
|
2
|
-
import {
|
2
|
+
import { e as E, u as q } from "./index-9ujJCGqe.js";
|
3
3
|
import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
|
4
4
|
import { d as B } from "./dinero-CIVmXLL-.js";
|
5
|
-
import { g as W, a as X } from "./assets-
|
6
|
-
import { t as P, a as Z } from "./transaction-
|
5
|
+
import { g as W, a as X } from "./assets-BhBS0p9e.js";
|
6
|
+
import { t as P, a as Z } from "./transaction-D5lnozQA.js";
|
7
7
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
8
8
|
import { useRouter as te } from "vue-router";
|
9
|
-
import { s as ae } from "./index-
|
9
|
+
import { s as ae } from "./index-C074LfUa.js";
|
10
10
|
import { u as ne } from "./error-K1CakhA9.js";
|
11
11
|
import { w as oe } from "./Modal-DB8M9o1T.js";
|
12
12
|
const re = /* @__PURE__ */ w({
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as x, openBlock as f, createElementBlock as B, createTextVNode as L, createElementVNode as h, toDisplayString as U, resolveComponent as p, createVNode as v, normalizeClass as O, withCtx as V, createBlock as g, createCommentVNode as I, ref as k, computed as z, unref as c, watch as D, isRef as K, h as E } from "vue";
|
2
|
-
import "./index-
|
2
|
+
import "./index-9ujJCGqe.js";
|
3
3
|
import { h as Y } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as j } from "./index-
|
5
|
-
import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-
|
4
|
+
import { u as j } from "./index-C5AZUa6M.js";
|
5
|
+
import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-DcbfY6SQ.js";
|
6
6
|
import { _ as Q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
7
|
import { useSnackbar as $, useDialogChild as G, useDialog as H } from "@feedmepos/ui-library";
|
8
|
-
import { t as A } from "./index-
|
8
|
+
import { t as A } from "./index-DuCv6dOI.js";
|
9
9
|
import { c as J } from "./clipboard-4jh1WteU.js";
|
10
10
|
import { u as N } from "./error-K1CakhA9.js";
|
11
11
|
import { z as P, a as R } from "./validator-D5jtpt9A.js";
|
@@ -0,0 +1,379 @@
|
|
1
|
+
import { defineComponent as x, openBlock as I, createElementBlock as M, Fragment as $, createElementVNode as v, createTextVNode as T, toDisplayString as V, ref as g, onMounted as C, computed as D, resolveComponent as f, unref as b, createVNode as F, createBlock as w, withCtx as G, createCommentVNode as q, isRef as P, resolveDynamicComponent as R, normalizeProps as Y, mergeProps as K } from "vue";
|
2
|
+
import { u as _, e as U } from "./index-9ujJCGqe.js";
|
3
|
+
import { useRouter as L } from "vue-router";
|
4
|
+
import { t as S } from "./index-DuCv6dOI.js";
|
5
|
+
import { _ as j } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
6
|
+
import { u as E } from "./index-C5AZUa6M.js";
|
7
|
+
import { useSnackbar as A } from "@feedmepos/ui-library";
|
8
|
+
import { u as z } from "./error-K1CakhA9.js";
|
9
|
+
import { useCoreStore as N } from "@feedmepos/mf-common";
|
10
|
+
const h = /* @__PURE__ */ x({
|
11
|
+
__name: "Information",
|
12
|
+
props: {
|
13
|
+
terminal: {
|
14
|
+
type: Object,
|
15
|
+
required: !0
|
16
|
+
}
|
17
|
+
},
|
18
|
+
setup(t) {
|
19
|
+
return (r, a) => (I(), M($, null, [
|
20
|
+
a[0] || (a[0] = v("b", null, "Name", -1)),
|
21
|
+
T(": " + V(t.terminal.name), 1),
|
22
|
+
a[1] || (a[1] = v("br", null, null, -1)),
|
23
|
+
a[2] || (a[2] = v("b", null, "Status", -1)),
|
24
|
+
T(": " + V(t.terminal.status), 1),
|
25
|
+
a[3] || (a[3] = v("br", null, null, -1)),
|
26
|
+
a[4] || (a[4] = v("b", null, "Device ID", -1)),
|
27
|
+
T(": " + V(t.terminal.deviceId ?? "-"), 1),
|
28
|
+
a[5] || (a[5] = v("br", null, null, -1)),
|
29
|
+
a[6] || (a[6] = v("b", null, "Device Type", -1)),
|
30
|
+
T(": " + V(t.terminal.deviceType ?? "-"), 1),
|
31
|
+
a[7] || (a[7] = v("br", null, null, -1))
|
32
|
+
], 64));
|
33
|
+
}
|
34
|
+
}), H = {
|
35
|
+
key: 0,
|
36
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
37
|
+
}, Q = { class: "flex mt-6 space-x-6" }, J = /* @__PURE__ */ x({
|
38
|
+
__name: "TerminalGateway",
|
39
|
+
props: {
|
40
|
+
terminal: {
|
41
|
+
type: Object,
|
42
|
+
required: !0
|
43
|
+
},
|
44
|
+
onUpdate: {
|
45
|
+
type: Function,
|
46
|
+
required: !0
|
47
|
+
}
|
48
|
+
},
|
49
|
+
setup(t) {
|
50
|
+
const { isLoading: r, startAsyncCall: a } = _(), o = t, s = g(), p = g(), n = g(-1), e = g({
|
51
|
+
terminalId: ""
|
52
|
+
});
|
53
|
+
C(() => {
|
54
|
+
if (a(async () => {
|
55
|
+
s.value = await S.getTerminals(o.terminal.referenceId);
|
56
|
+
}), !o.terminal.ecrs)
|
57
|
+
return;
|
58
|
+
const i = o.terminal.ecrs.findIndex((c) => c && c.gateway && c.gateway === "FeedMe");
|
59
|
+
if (i === -1)
|
60
|
+
return;
|
61
|
+
n.value = i;
|
62
|
+
const m = o.terminal.ecrs.at(i);
|
63
|
+
m.gateway === "FeedMe" && m.config && (e.value = {
|
64
|
+
terminalId: m.config.terminalId
|
65
|
+
});
|
66
|
+
});
|
67
|
+
const u = D(() => (s.value ?? []).map((i) => ({
|
68
|
+
label: i.name ?? i._id,
|
69
|
+
value: i._id
|
70
|
+
})));
|
71
|
+
async function l(i) {
|
72
|
+
var m;
|
73
|
+
(m = o.terminal.ecrs) == null || m.splice(i, 1), o.onUpdate(o.terminal);
|
74
|
+
}
|
75
|
+
return (i, m) => {
|
76
|
+
const c = f("FmCircularProgress"), y = f("FmSelect"), d = f("FmButton"), B = f("FmForm");
|
77
|
+
return b(r) ? (I(), M("div", H, [
|
78
|
+
F(c, { size: "xxl" })
|
79
|
+
])) : (I(), w(B, {
|
80
|
+
key: 1,
|
81
|
+
ref: p.value,
|
82
|
+
class: "flex flex-col gap-16 w-[500px]",
|
83
|
+
onValidationSuccess: m[1] || (m[1] = () => {
|
84
|
+
n.value > -1 ? t.terminal.ecrs[n.value] = { gateway: "FeedMe", config: e.value } : (t.terminal.ecrs || (t.terminal.ecrs = []), t.terminal.ecrs.push({ gateway: "FeedMe", config: e.value })), o.onUpdate(t.terminal);
|
85
|
+
})
|
86
|
+
}, {
|
87
|
+
default: G(() => [
|
88
|
+
F(y, {
|
89
|
+
modelValue: e.value.terminalId,
|
90
|
+
"onUpdate:modelValue": m[0] || (m[0] = (k) => e.value.terminalId = k),
|
91
|
+
label: "Terminal ID",
|
92
|
+
items: u.value
|
93
|
+
}, null, 8, ["modelValue", "items"]),
|
94
|
+
v("div", Q, [
|
95
|
+
n.value > -1 ? (I(), w(d, {
|
96
|
+
key: 0,
|
97
|
+
class: "flex-1",
|
98
|
+
variant: "secondary",
|
99
|
+
label: "Delete",
|
100
|
+
onclick: () => l(n.value)
|
101
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
102
|
+
F(d, {
|
103
|
+
type: "submit",
|
104
|
+
class: "flex-1",
|
105
|
+
variant: "primary",
|
106
|
+
label: "Save"
|
107
|
+
})
|
108
|
+
])
|
109
|
+
]),
|
110
|
+
_: 1
|
111
|
+
}, 512));
|
112
|
+
};
|
113
|
+
}
|
114
|
+
}), W = { class: "flex mt-6 space-x-6" }, X = /* @__PURE__ */ x({
|
115
|
+
__name: "FiuuGateway",
|
116
|
+
props: {
|
117
|
+
terminal: {
|
118
|
+
type: Object,
|
119
|
+
required: !0
|
120
|
+
},
|
121
|
+
onUpdate: {
|
122
|
+
type: Function,
|
123
|
+
required: !0
|
124
|
+
}
|
125
|
+
},
|
126
|
+
setup(t) {
|
127
|
+
const r = t, a = N().currentCountry, o = [
|
128
|
+
{
|
129
|
+
label: "Fiuu Malaysia",
|
130
|
+
value: "cc.feedme.payment.rms",
|
131
|
+
region: U.F_COUNTRY.enum.MY
|
132
|
+
},
|
133
|
+
{
|
134
|
+
label: "Fiuu Malaysia V2",
|
135
|
+
value: "cc.feedme.payment.fiuu_my",
|
136
|
+
region: U.F_COUNTRY.enum.MY
|
137
|
+
},
|
138
|
+
{
|
139
|
+
label: "Fiuu Singapore",
|
140
|
+
value: "cc.feedme.payment.fiuu_sg",
|
141
|
+
region: U.F_COUNTRY.enum.SG
|
142
|
+
}
|
143
|
+
], s = g(), p = g(-1), n = g({
|
144
|
+
packageId: "",
|
145
|
+
uniqueId: ""
|
146
|
+
});
|
147
|
+
C(() => {
|
148
|
+
if (!r.terminal.gateways)
|
149
|
+
return;
|
150
|
+
const u = r.terminal.gateways.findIndex((i) => i && i.gateway && i.gateway === "Fiuu");
|
151
|
+
if (u === -1)
|
152
|
+
return;
|
153
|
+
p.value = u;
|
154
|
+
const l = r.terminal.gateways.at(u);
|
155
|
+
l.gateway === "Fiuu" && l.config && (n.value = {
|
156
|
+
packageId: l.config.packageId,
|
157
|
+
uniqueId: l.config.uniqueId
|
158
|
+
});
|
159
|
+
});
|
160
|
+
async function e(u) {
|
161
|
+
var l;
|
162
|
+
(l = r.terminal.gateways) == null || l.splice(u, 1), r.onUpdate(r.terminal);
|
163
|
+
}
|
164
|
+
return (u, l) => {
|
165
|
+
const i = f("FmSelect"), m = f("FmTextField"), c = f("FmButton"), y = f("FmForm");
|
166
|
+
return I(), w(y, {
|
167
|
+
ref: s.value,
|
168
|
+
class: "flex flex-col gap-16 w-[500px]",
|
169
|
+
onValidationSuccess: l[2] || (l[2] = () => {
|
170
|
+
p.value > -1 ? t.terminal.gateways[p.value] = { gateway: "Fiuu", config: n.value } : (t.terminal.gateways || (t.terminal.gateways = []), t.terminal.gateways.push({ gateway: "Fiuu", config: n.value })), r.onUpdate(t.terminal);
|
171
|
+
})
|
172
|
+
}, {
|
173
|
+
default: G(() => [
|
174
|
+
F(i, {
|
175
|
+
modelValue: n.value.packageId,
|
176
|
+
"onUpdate:modelValue": l[0] || (l[0] = (d) => n.value.packageId = d),
|
177
|
+
label: "Package ID",
|
178
|
+
items: o.filter((d) => d.region === b(a))
|
179
|
+
}, null, 8, ["modelValue", "items"]),
|
180
|
+
F(m, {
|
181
|
+
modelValue: n.value.uniqueId,
|
182
|
+
"onUpdate:modelValue": l[1] || (l[1] = (d) => n.value.uniqueId = d),
|
183
|
+
label: "Unique ID"
|
184
|
+
}, null, 8, ["modelValue"]),
|
185
|
+
v("div", W, [
|
186
|
+
p.value > -1 ? (I(), w(c, {
|
187
|
+
key: 0,
|
188
|
+
class: "flex-1",
|
189
|
+
variant: "secondary",
|
190
|
+
label: "Delete",
|
191
|
+
onclick: () => e(p.value)
|
192
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
193
|
+
F(c, {
|
194
|
+
type: "submit",
|
195
|
+
class: "flex-1",
|
196
|
+
variant: "primary",
|
197
|
+
label: "Save"
|
198
|
+
})
|
199
|
+
])
|
200
|
+
]),
|
201
|
+
_: 1
|
202
|
+
}, 512);
|
203
|
+
};
|
204
|
+
}
|
205
|
+
}), Z = { class: "flex mt-6 space-x-6" }, ee = /* @__PURE__ */ x({
|
206
|
+
__name: "GhlGateway",
|
207
|
+
props: {
|
208
|
+
terminal: {
|
209
|
+
type: Object,
|
210
|
+
required: !0
|
211
|
+
},
|
212
|
+
onUpdate: {
|
213
|
+
type: Function,
|
214
|
+
required: !0
|
215
|
+
}
|
216
|
+
},
|
217
|
+
setup(t) {
|
218
|
+
const r = t, a = g(), o = g(-1), s = g({
|
219
|
+
merchantId: "",
|
220
|
+
terminalId: "",
|
221
|
+
privateKey: ""
|
222
|
+
});
|
223
|
+
C(() => {
|
224
|
+
if (!r.terminal.ecrs)
|
225
|
+
return;
|
226
|
+
const n = r.terminal.ecrs.findIndex((u) => u && u.gateway && u.gateway === "Ghl");
|
227
|
+
if (n === -1)
|
228
|
+
return;
|
229
|
+
o.value = n;
|
230
|
+
const e = r.terminal.ecrs.at(n);
|
231
|
+
e.gateway === "Ghl" && e.config && (s.value = {
|
232
|
+
merchantId: e.config.merchantId,
|
233
|
+
terminalId: e.config.terminalId,
|
234
|
+
privateKey: e.config.privateKey
|
235
|
+
});
|
236
|
+
});
|
237
|
+
async function p(n) {
|
238
|
+
var e;
|
239
|
+
(e = r.terminal.ecrs) == null || e.splice(n, 1), r.onUpdate(r.terminal);
|
240
|
+
}
|
241
|
+
return (n, e) => {
|
242
|
+
const u = f("FmTextField"), l = f("FmTextarea"), i = f("FmButton"), m = f("FmForm");
|
243
|
+
return I(), w(m, {
|
244
|
+
ref: a.value,
|
245
|
+
class: "flex flex-col gap-16 w-[500px]",
|
246
|
+
onValidationSuccess: e[3] || (e[3] = () => {
|
247
|
+
o.value > -1 ? t.terminal.ecrs[o.value] = { gateway: "Ghl", config: s.value } : (t.terminal.ecrs || (t.terminal.ecrs = []), t.terminal.ecrs.push({ gateway: "Ghl", config: s.value })), r.onUpdate(t.terminal);
|
248
|
+
})
|
249
|
+
}, {
|
250
|
+
default: G(() => [
|
251
|
+
F(u, {
|
252
|
+
modelValue: s.value.merchantId,
|
253
|
+
"onUpdate:modelValue": e[0] || (e[0] = (c) => s.value.merchantId = c),
|
254
|
+
label: "Merchant ID"
|
255
|
+
}, null, 8, ["modelValue"]),
|
256
|
+
F(u, {
|
257
|
+
modelValue: s.value.terminalId,
|
258
|
+
"onUpdate:modelValue": e[1] || (e[1] = (c) => s.value.terminalId = c),
|
259
|
+
label: "Terminal ID"
|
260
|
+
}, null, 8, ["modelValue"]),
|
261
|
+
F(l, {
|
262
|
+
modelValue: s.value.privateKey,
|
263
|
+
"onUpdate:modelValue": e[2] || (e[2] = (c) => s.value.privateKey = c),
|
264
|
+
label: "Private Key"
|
265
|
+
}, null, 8, ["modelValue"]),
|
266
|
+
v("div", Z, [
|
267
|
+
o.value > -1 ? (I(), w(i, {
|
268
|
+
key: 0,
|
269
|
+
class: "flex-1",
|
270
|
+
variant: "secondary",
|
271
|
+
label: "Delete",
|
272
|
+
onclick: () => p(o.value)
|
273
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
274
|
+
F(i, {
|
275
|
+
type: "submit",
|
276
|
+
class: "flex-1",
|
277
|
+
variant: "primary",
|
278
|
+
label: "Save"
|
279
|
+
})
|
280
|
+
])
|
281
|
+
]),
|
282
|
+
_: 1
|
283
|
+
}, 512);
|
284
|
+
};
|
285
|
+
}
|
286
|
+
}), se = /* @__PURE__ */ x({
|
287
|
+
__name: "TerminalSetting",
|
288
|
+
props: {
|
289
|
+
terminalId: {
|
290
|
+
type: String,
|
291
|
+
required: !0
|
292
|
+
}
|
293
|
+
},
|
294
|
+
setup(t) {
|
295
|
+
const r = t, { tab: a } = E({
|
296
|
+
tab: "information"
|
297
|
+
}), { isLoading: o, startAsyncCall: s } = _(!0), p = L(), n = A(), e = g();
|
298
|
+
async function u(y) {
|
299
|
+
try {
|
300
|
+
await S.updateById(
|
301
|
+
r.terminalId,
|
302
|
+
{
|
303
|
+
name: y.name,
|
304
|
+
status: y.status,
|
305
|
+
ecrs: y.ecrs ?? [],
|
306
|
+
gateways: y.gateways ?? []
|
307
|
+
}
|
308
|
+
), e.value = await S.readById(r.terminalId), n.open({
|
309
|
+
type: "success",
|
310
|
+
message: "Terminal updated successfully"
|
311
|
+
});
|
312
|
+
} catch (d) {
|
313
|
+
n.open({
|
314
|
+
type: "error",
|
315
|
+
title: "Error occurs when update terminal",
|
316
|
+
message: z(d)
|
317
|
+
});
|
318
|
+
}
|
319
|
+
}
|
320
|
+
const l = [
|
321
|
+
{
|
322
|
+
label: "Information",
|
323
|
+
value: "information",
|
324
|
+
icon: "overview",
|
325
|
+
render: h
|
326
|
+
},
|
327
|
+
{
|
328
|
+
label: "Fiuu",
|
329
|
+
value: "fiuu",
|
330
|
+
icon: "payment",
|
331
|
+
render: X
|
332
|
+
}
|
333
|
+
], i = N().currentCountry, m = D(() => {
|
334
|
+
var y;
|
335
|
+
return (y = l.find((d) => d.value === a.value)) == null ? void 0 : y.render;
|
336
|
+
});
|
337
|
+
async function c() {
|
338
|
+
s(async () => {
|
339
|
+
e.value = await S.readById(r.terminalId), e.value.deviceType !== "TERMINAL" && (l.push({
|
340
|
+
label: "FeedMe Terminal",
|
341
|
+
value: "terminal",
|
342
|
+
icon: "shopping_cart_checkout",
|
343
|
+
render: J
|
344
|
+
}), i.value === U.F_COUNTRY.enum.MY && l.push({
|
345
|
+
label: "GHL Terminal (V2)",
|
346
|
+
value: "ghl",
|
347
|
+
icon: "shopping_cart_checkout",
|
348
|
+
render: ee
|
349
|
+
}));
|
350
|
+
});
|
351
|
+
}
|
352
|
+
return C(c), (y, d) => {
|
353
|
+
var k;
|
354
|
+
const B = f("FmTabs");
|
355
|
+
return I(), w(j, {
|
356
|
+
title: `Terminal (${(k = e.value) == null ? void 0 : k._id})`,
|
357
|
+
loading: b(o),
|
358
|
+
onBack: b(p).back
|
359
|
+
}, {
|
360
|
+
default: G(() => [
|
361
|
+
F(B, {
|
362
|
+
"model-value": b(a),
|
363
|
+
"onUpdate:modelValue": d[0] || (d[0] = (O) => P(a) ? a.value = O : null),
|
364
|
+
class: "mb-6",
|
365
|
+
items: l
|
366
|
+
}, null, 8, ["model-value"]),
|
367
|
+
b(a) ? (I(), w(R(m.value), Y(K({ key: 0 }, {
|
368
|
+
terminal: e.value,
|
369
|
+
onUpdate: u
|
370
|
+
})), null, 16)) : q("", !0)
|
371
|
+
]),
|
372
|
+
_: 1
|
373
|
+
}, 8, ["title", "loading", "onBack"]);
|
374
|
+
};
|
375
|
+
}
|
376
|
+
});
|
377
|
+
export {
|
378
|
+
se as default
|
379
|
+
};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as I, openBlock as y, createElementBlock as h, unref as c, createCommentVNode as V, createElementVNode as w, resolveComponent as g, createBlock as v, normalizeClass as K, withCtx as N, toDisplayString as C, createVNode as p, Fragment as $, renderList as L, ref as P, watch as F, isRef as x, h as A } from "vue";
|
2
|
-
import {
|
2
|
+
import { c as f } from "./index-9ujJCGqe.js";
|
3
3
|
import { h as R } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as B } from "./index-
|
5
|
-
import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-
|
4
|
+
import { u as B } from "./index-C5AZUa6M.js";
|
5
|
+
import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-DcbfY6SQ.js";
|
6
6
|
import { _ as U } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
7
7
|
import { useSnackbar as Y, useDialog as Q } from "@feedmepos/ui-library";
|
8
|
-
import { g as W } from "./assets-
|
9
|
-
import { E as j, t as b } from "./index-
|
8
|
+
import { g as W } from "./assets-BhBS0p9e.js";
|
9
|
+
import { E as j, t as b } from "./index-CM83utfE.js";
|
10
10
|
import { d as z } from "./dinero-CIVmXLL-.js";
|
11
11
|
import { _ as H } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
12
|
import { _ as J } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as N, openBlock as _, createElementBlock as x, Fragment as F, unref as t, createCommentVNode as k, createElementVNode as d, resolveComponent as p, createBlock as R, normalizeClass as D, withCtx as C, toDisplayString as V, ref as K, watch as T, createVNode as i, isRef as g, h } from "vue";
|
2
|
-
import {
|
2
|
+
import { c as l } from "./index-9ujJCGqe.js";
|
3
3
|
import { h as I } from "./moment-h96o7c8I.js";
|
4
|
-
import { u as M } from "./index-
|
5
|
-
import { _ as $ } from "./index.vue_vue_type_script_setup_true_lang-
|
4
|
+
import { u as M } from "./index-C5AZUa6M.js";
|
5
|
+
import { _ as $ } from "./index.vue_vue_type_script_setup_true_lang-DcbfY6SQ.js";
|
6
6
|
import "@feedmepos/ui-library";
|
7
|
-
import { g as L } from "./assets-
|
8
|
-
import { E as B, t as w } from "./index-
|
7
|
+
import { g as L } from "./assets-BhBS0p9e.js";
|
8
|
+
import { E as B, t as w } from "./index-CM83utfE.js";
|
9
9
|
import { d as G } from "./dinero-CIVmXLL-.js";
|
10
10
|
import { _ as P } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
11
11
|
import { useCoreStore as U } from "@feedmepos/mf-common";
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { defineComponent as _, resolveComponent as T, openBlock as f, createBlock as N, normalizeClass as k, withCtx as R, createElementVNode as y, toDisplayString as K, createElementBlock as O, unref as o, ref as A, h as x, onMounted as V, watch as E, createVNode as p, isRef as F } from "vue";
|
2
|
-
import { t as I, a as C } from "./transaction-
|
3
|
-
import {
|
2
|
+
import { t as I, a as C } from "./transaction-D5lnozQA.js";
|
3
|
+
import { e as S, u as P } from "./index-9ujJCGqe.js";
|
4
4
|
import { useSnackbar as $ } from "@feedmepos/ui-library";
|
5
5
|
import "./dinero-CIVmXLL-.js";
|
6
6
|
import { h as b } from "./moment-h96o7c8I.js";
|
7
|
-
import { g as L, a as B } from "./assets-
|
7
|
+
import { g as L, a as B } from "./assets-BhBS0p9e.js";
|
8
8
|
import { useCoreStore as M } from "@feedmepos/mf-common";
|
9
9
|
import { _ as U } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
10
|
-
import { u as G } from "./index-
|
10
|
+
import { u as G } from "./index-C5AZUa6M.js";
|
11
11
|
import { _ as Y } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
12
|
import { _ as q } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
|
13
13
|
const J = /* @__PURE__ */ _({
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as h, resolveComponent as _, openBlock as g, createBlock as E, normalizeClass as $, withCtx as x, createElementVNode as b, toDisplayString as L, createElementBlock as F, unref as m, createVNode as y, Fragment as B, renderList as U, ref as N, h as T, onMounted as G, watch as k, isRef as D } from "vue";
|
2
|
-
import { t as w, a as J, b as R } from "./transaction-
|
3
|
-
import {
|
2
|
+
import { t as w, a as J, b as R } from "./transaction-D5lnozQA.js";
|
3
|
+
import { e as S, u as Q } from "./index-9ujJCGqe.js";
|
4
4
|
import { useSnackbar as Y, useDialog as j } from "@feedmepos/ui-library";
|
5
5
|
import "./dinero-CIVmXLL-.js";
|
6
6
|
import { h as O } from "./moment-h96o7c8I.js";
|
7
|
-
import { g as z, a as H } from "./assets-
|
7
|
+
import { g as z, a as H } from "./assets-BhBS0p9e.js";
|
8
8
|
import { _ as W } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
|
9
|
-
import { u as X } from "./index-
|
9
|
+
import { u as X } from "./index-C5AZUa6M.js";
|
10
10
|
import { _ as Z } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
|
11
11
|
import { _ as ee } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
12
12
|
import { w as P } from "./Modal-DB8M9o1T.js";
|