@feedmepos/mf-payment 1.2.1 → 1.2.2
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/{PDFViewer-BQfgFexr.js → PDFViewer-xrBtzrlR.js} +1 -2
- package/dist/{PayoutAccount-D8R2kieb.js → PayoutAccount-C1eI-Tha.js} +6 -6
- package/dist/{PayoutAccount-CajKtGCP.js → PayoutAccount-QY9LkR0r.js} +7 -7
- package/dist/PayoutAccountSetting-Bt-BBfpF.js +970 -0
- package/dist/{Restaurant-Dbp_UTNd.js → Restaurant-DMEt0GSf.js} +4 -4
- package/dist/RestaurantSetting-Bjgjx7_c.js +487 -0
- package/dist/{Settlement-D47q_Wmh.js → Settlement-DHczxjKA.js} +3 -3
- package/dist/{Settlement-CIl7p5BM.js → Settlement-PYl2xRrw.js} +3 -3
- package/dist/{SettlementTransactions-BSN_bqJ2.js → SettlementTransactions-B6eUs4ay.js} +3 -3
- package/dist/{SettlementTransactions-VhSpt9Ya.js → SettlementTransactions-Bn2-iO30.js} +3 -3
- package/dist/{Terminal-DhDp8CZP.js → Terminal-q9AtQVTw.js} +36 -36
- package/dist/{TerminalSetting-Z4Yf71s4.js → TerminalSetting-DKvLKsrH.js} +218 -212
- package/dist/{Transaction-DfqdJTc4.js → Transaction-BSDhGkTu.js} +5 -5
- package/dist/{Transaction-DodA1Rsr.js → Transaction-DlkiWPJt.js} +7 -7
- package/dist/{TransactionOld-BVC2EZES.js → TransactionOld-B93Kp78J.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BSQyjy9r.js → TransactionTable.vue_vue_type_script_setup_true_lang-DEgiifDL.js} +3 -3
- package/dist/{app-DO-yUYMX.js → app-B1yXzXMJ.js} +361 -361
- package/dist/app.js +1 -1
- package/dist/{assets-Afjskent.js → assets-DbCf2oTj.js} +2 -2
- package/dist/{grafana-Bx1CNAeG.js → grafana-CxvNheOh.js} +1 -1
- package/dist/{index-eVDNyUp0.js → index-BoafQG_3.js} +1 -1
- package/dist/{index-DcA8mNkW.js → index-BwmZGhzh.js} +7830 -7804
- package/dist/{index-CWjhBRl-.js → index-C9YbV874.js} +1 -1
- package/dist/{index-DjMmMfFw.js → index-DJx90D2_.js} +1 -1
- package/dist/{index-9ImIPLpT.js → index-DQ6y1YEM.js} +1 -1
- package/dist/{index-BG-pqgpq.js → index-DoWYy-5F.js} +2 -2
- package/dist/{index-DJFB47Iu.js → index-DrVrxzsm.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Pj1GGD11.js → index.vue_vue_type_script_setup_true_lang-BJAdIBCX.js} +1 -1
- package/dist/package.json +4 -4
- package/dist/{payout-account-1UTg_py3.js → payout-account-Cy0D7ycP.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +62 -12
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +62 -12
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +38 -20
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +38 -20
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +62 -12
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +62 -12
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +38 -20
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +46 -1
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +50 -0
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +2 -2
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +14 -12
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +12 -12
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -12
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +124 -24
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +36 -36
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +18 -18
- package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
- package/package.json +4 -4
- package/dist/PayoutAccountSetting-DQqH71Pj.js +0 -890
- package/dist/RestaurantSetting-dem9GccJ.js +0 -412
@@ -1,14 +1,14 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { u as
|
1
|
+
import { defineComponent as T, openBlock as F, createElementBlock as N, Fragment as K, createElementVNode as I, createTextVNode as O, toDisplayString as R, toRef as B, ref as b, watch as Y, onMounted as D, computed as C, resolveComponent as v, unref as S, createVNode as f, createBlock as _, withCtx as G, createCommentVNode as q, isRef as j, resolveDynamicComponent as A, normalizeProps as L, mergeProps as E } from "vue";
|
2
|
+
import { u as P, e as x } from "./index-BwmZGhzh.js";
|
3
3
|
import { useRouter as J } from "vue-router";
|
4
|
-
import { t as
|
4
|
+
import { t as M } from "./index-DJx90D2_.js";
|
5
5
|
import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
-
import { u as
|
7
|
-
import { useSnackbar as
|
6
|
+
import { u as z } from "./index-DQ6y1YEM.js";
|
7
|
+
import { useSnackbar as h } from "@feedmepos/ui-library";
|
8
8
|
import { u as Q } from "./error-K1CakhA9.js";
|
9
9
|
import { z as W, a as X } from "./validator-D5jtpt9A.js";
|
10
|
-
import { useCoreStore as
|
11
|
-
const Z = /* @__PURE__ */
|
10
|
+
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
11
|
+
const Z = /* @__PURE__ */ T({
|
12
12
|
__name: "Information",
|
13
13
|
props: {
|
14
14
|
terminal: {
|
@@ -17,25 +17,25 @@ const Z = /* @__PURE__ */ V({
|
|
17
17
|
}
|
18
18
|
},
|
19
19
|
setup(y) {
|
20
|
-
return (
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
20
|
+
return (m, n) => (F(), N(K, null, [
|
21
|
+
n[0] || (n[0] = I("b", null, "Name", -1)),
|
22
|
+
O(": " + R(y.terminal.name), 1),
|
23
|
+
n[1] || (n[1] = I("br", null, null, -1)),
|
24
|
+
n[2] || (n[2] = I("b", null, "Status", -1)),
|
25
|
+
O(": " + R(y.terminal.status), 1),
|
26
|
+
n[3] || (n[3] = I("br", null, null, -1)),
|
27
|
+
n[4] || (n[4] = I("b", null, "Device ID", -1)),
|
28
|
+
O(": " + R(y.terminal.deviceId ?? "-"), 1),
|
29
|
+
n[5] || (n[5] = I("br", null, null, -1)),
|
30
|
+
n[6] || (n[6] = I("b", null, "Device Type", -1)),
|
31
|
+
O(": " + R(y.terminal.deviceType ?? "-"), 1),
|
32
|
+
n[7] || (n[7] = I("br", null, null, -1))
|
33
33
|
], 64));
|
34
34
|
}
|
35
35
|
}), ee = {
|
36
36
|
key: 0,
|
37
37
|
class: "flex items-center justify-center min-h-[80vh]"
|
38
|
-
}, ae = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */
|
38
|
+
}, ae = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ T({
|
39
39
|
__name: "TerminalGateway",
|
40
40
|
props: {
|
41
41
|
terminal: {
|
@@ -48,62 +48,62 @@ const Z = /* @__PURE__ */ V({
|
|
48
48
|
}
|
49
49
|
},
|
50
50
|
setup(y) {
|
51
|
-
const { isLoading:
|
51
|
+
const { isLoading: m, startAsyncCall: n } = P(), p = y, e = B(() => p.terminal), c = b(), r = b(), a = b(-1), o = b({
|
52
52
|
terminalId: ""
|
53
|
-
}),
|
53
|
+
}), d = () => {
|
54
54
|
o.value.terminalId = "", a.value = -1;
|
55
55
|
}, s = () => {
|
56
|
-
if (
|
57
|
-
|
56
|
+
if (n(async () => {
|
57
|
+
c.value = await M.getRestaurantTerminals(p.terminal.referenceId);
|
58
58
|
}), !p.terminal.ecrs)
|
59
|
-
return
|
60
|
-
const
|
61
|
-
if (
|
62
|
-
return
|
63
|
-
a.value =
|
64
|
-
const
|
65
|
-
|
66
|
-
terminalId:
|
59
|
+
return d();
|
60
|
+
const t = p.terminal.ecrs.findIndex((u) => u && u.gateway && u.gateway === "FeedMe");
|
61
|
+
if (t === -1)
|
62
|
+
return d();
|
63
|
+
a.value = t;
|
64
|
+
const l = p.terminal.ecrs.at(t);
|
65
|
+
l.gateway === "FeedMe" && l.config && (o.value = {
|
66
|
+
terminalId: l.config.terminalId
|
67
67
|
});
|
68
68
|
};
|
69
|
-
|
70
|
-
const
|
71
|
-
label:
|
72
|
-
value:
|
69
|
+
Y(e, s), D(s);
|
70
|
+
const g = C(() => (c.value ?? []).map((t) => ({
|
71
|
+
label: t.name ?? t._id,
|
72
|
+
value: t._id
|
73
73
|
})));
|
74
|
-
async function
|
75
|
-
var
|
76
|
-
(
|
74
|
+
async function i(t) {
|
75
|
+
var l;
|
76
|
+
(l = p.terminal.ecrs) == null || l.splice(t, 1), p.onUpdate(p.terminal);
|
77
77
|
}
|
78
|
-
return (
|
79
|
-
const
|
80
|
-
return
|
81
|
-
f(
|
82
|
-
])) : (
|
78
|
+
return (t, l) => {
|
79
|
+
const u = v("FmCircularProgress"), V = v("FmSelect"), k = v("FmButton"), U = v("FmForm");
|
80
|
+
return S(m) ? (F(), N("div", ee, [
|
81
|
+
f(u, { size: "xxl" })
|
82
|
+
])) : (F(), _(U, {
|
83
83
|
key: 1,
|
84
84
|
ref: r.value,
|
85
85
|
class: "flex flex-col gap-16 w-[500px]",
|
86
|
-
onValidationSuccess:
|
86
|
+
onValidationSuccess: l[1] || (l[1] = () => {
|
87
87
|
a.value > -1 ? e.value.ecrs[a.value] = { gateway: "FeedMe", config: o.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "FeedMe", config: o.value })), p.onUpdate(e.value);
|
88
88
|
})
|
89
89
|
}, {
|
90
|
-
default:
|
91
|
-
f(
|
90
|
+
default: G(() => [
|
91
|
+
f(V, {
|
92
92
|
modelValue: o.value.terminalId,
|
93
|
-
"onUpdate:modelValue":
|
93
|
+
"onUpdate:modelValue": l[0] || (l[0] = (w) => o.value.terminalId = w),
|
94
94
|
label: "Terminal ID",
|
95
|
-
items:
|
96
|
-
rules:
|
95
|
+
items: g.value,
|
96
|
+
rules: S(W)(S(X).string())
|
97
97
|
}, null, 8, ["modelValue", "items", "rules"]),
|
98
|
-
|
99
|
-
a.value > -1 ? (
|
98
|
+
I("div", ae, [
|
99
|
+
a.value > -1 ? (F(), _(k, {
|
100
100
|
key: 0,
|
101
101
|
class: "flex-1",
|
102
102
|
variant: "secondary",
|
103
103
|
label: "Delete",
|
104
|
-
onclick: () =>
|
105
|
-
}, null, 8, ["onclick"])) :
|
106
|
-
f(
|
104
|
+
onclick: () => i(a.value)
|
105
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
106
|
+
f(k, {
|
107
107
|
type: "submit",
|
108
108
|
class: "flex-1",
|
109
109
|
variant: "primary",
|
@@ -115,7 +115,7 @@ const Z = /* @__PURE__ */ V({
|
|
115
115
|
}, 512));
|
116
116
|
};
|
117
117
|
}
|
118
|
-
}), ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */
|
118
|
+
}), ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */ T({
|
119
119
|
__name: "FiuuGateway",
|
120
120
|
props: {
|
121
121
|
terminal: {
|
@@ -128,75 +128,76 @@ const Z = /* @__PURE__ */ V({
|
|
128
128
|
}
|
129
129
|
},
|
130
130
|
setup(y) {
|
131
|
-
const
|
131
|
+
const m = y, n = $().currentCountry, p = [
|
132
132
|
{
|
133
133
|
label: "Fiuu Malaysia",
|
134
134
|
value: "cc.feedme.payment.rms",
|
135
|
-
region:
|
135
|
+
region: x.F_COUNTRY.enum.MY
|
136
136
|
},
|
137
137
|
{
|
138
138
|
label: "Fiuu Malaysia V2",
|
139
139
|
value: "cc.feedme.payment.fiuu_my",
|
140
|
-
region:
|
140
|
+
region: x.F_COUNTRY.enum.MY
|
141
141
|
},
|
142
142
|
{
|
143
143
|
label: "Fiuu Singapore",
|
144
144
|
value: "cc.feedme.payment.fiuu_sg",
|
145
|
-
region:
|
145
|
+
region: x.F_COUNTRY.enum.SG
|
146
146
|
}
|
147
|
-
], e =
|
147
|
+
], e = B(() => m.terminal), c = b(), r = b(-1), a = b({
|
148
148
|
packageId: "",
|
149
149
|
uniqueId: ""
|
150
150
|
}), o = () => {
|
151
151
|
a.value.uniqueId = "", a.value.packageId = "", r.value = -1;
|
152
|
-
},
|
152
|
+
}, d = () => {
|
153
153
|
if (!e.value.gateways)
|
154
154
|
return o();
|
155
|
-
const
|
156
|
-
if (
|
155
|
+
const i = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Fiuu");
|
156
|
+
if (i === -1)
|
157
157
|
return o();
|
158
|
-
r.value =
|
159
|
-
const
|
160
|
-
|
161
|
-
packageId:
|
162
|
-
uniqueId:
|
158
|
+
r.value = i;
|
159
|
+
const t = e.value.gateways.at(i);
|
160
|
+
t.gateway === "Fiuu" && t.config && (a.value = {
|
161
|
+
packageId: t.config.packageId,
|
162
|
+
uniqueId: t.config.uniqueId
|
163
163
|
});
|
164
164
|
};
|
165
|
-
|
166
|
-
async function s(
|
167
|
-
var
|
168
|
-
(
|
165
|
+
Y(e, d), D(d);
|
166
|
+
async function s(i) {
|
167
|
+
var t;
|
168
|
+
(t = e.value.gateways) == null || t.splice(i, 1), m.onUpdate(e.value);
|
169
169
|
}
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
170
|
+
const g = C(() => p.filter((i) => i.region === n.value));
|
171
|
+
return (i, t) => {
|
172
|
+
const l = v("FmSelect"), u = v("FmTextField"), V = v("FmButton"), k = v("FmForm");
|
173
|
+
return F(), _(k, {
|
174
|
+
ref: c.value,
|
174
175
|
class: "flex flex-col gap-16 w-[500px]",
|
175
|
-
onValidationSuccess:
|
176
|
-
r.value > -1 ? e.value.gateways[r.value] = { gateway: "Fiuu", config: a.value } : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push({ gateway: "Fiuu", config: a.value })),
|
176
|
+
onValidationSuccess: t[2] || (t[2] = () => {
|
177
|
+
r.value > -1 ? e.value.gateways[r.value] = { gateway: "Fiuu", config: a.value } : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push({ gateway: "Fiuu", config: a.value })), m.onUpdate(e.value);
|
177
178
|
})
|
178
179
|
}, {
|
179
|
-
default:
|
180
|
+
default: G(() => [
|
180
181
|
f(l, {
|
181
182
|
modelValue: a.value.packageId,
|
182
|
-
"onUpdate:modelValue":
|
183
|
+
"onUpdate:modelValue": t[0] || (t[0] = (U) => a.value.packageId = U),
|
183
184
|
label: "Package ID",
|
184
|
-
items:
|
185
|
+
items: g.value
|
185
186
|
}, null, 8, ["modelValue", "items"]),
|
186
187
|
f(u, {
|
187
188
|
modelValue: a.value.uniqueId,
|
188
|
-
"onUpdate:modelValue":
|
189
|
+
"onUpdate:modelValue": t[1] || (t[1] = (U) => a.value.uniqueId = U),
|
189
190
|
label: "Unique ID"
|
190
191
|
}, null, 8, ["modelValue"]),
|
191
|
-
|
192
|
-
r.value > -1 ? (
|
192
|
+
I("div", ne, [
|
193
|
+
r.value > -1 ? (F(), _(V, {
|
193
194
|
key: 0,
|
194
195
|
class: "flex-1",
|
195
196
|
variant: "secondary",
|
196
197
|
label: "Delete",
|
197
198
|
onclick: () => s(r.value)
|
198
|
-
}, null, 8, ["onclick"])) :
|
199
|
-
f(
|
199
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
200
|
+
f(V, {
|
200
201
|
type: "submit",
|
201
202
|
class: "flex-1",
|
202
203
|
variant: "primary",
|
@@ -208,7 +209,7 @@ const Z = /* @__PURE__ */ V({
|
|
208
209
|
}, 512);
|
209
210
|
};
|
210
211
|
}
|
211
|
-
}), oe = { class: "flex mt-6 space-x-6" }, ue = /* @__PURE__ */
|
212
|
+
}), oe = { class: "flex mt-6 space-x-6" }, ue = /* @__PURE__ */ T({
|
212
213
|
__name: "GhlGateway",
|
213
214
|
props: {
|
214
215
|
terminal: {
|
@@ -221,65 +222,65 @@ const Z = /* @__PURE__ */ V({
|
|
221
222
|
}
|
222
223
|
},
|
223
224
|
setup(y) {
|
224
|
-
const
|
225
|
+
const m = y, n = B(() => m.terminal), p = b(), e = b(-1), c = b({
|
225
226
|
merchantId: "",
|
226
227
|
terminalId: "",
|
227
228
|
privateKey: ""
|
228
229
|
}), r = () => {
|
229
|
-
|
230
|
+
c.value.merchantId = "", c.value.terminalId = "", c.value.privateKey = "", e.value = -1;
|
230
231
|
}, a = () => {
|
231
|
-
if (!
|
232
|
+
if (!n.value.ecrs)
|
232
233
|
return r();
|
233
|
-
const
|
234
|
-
if (
|
234
|
+
const d = n.value.ecrs.findIndex((g) => g && g.gateway && g.gateway === "Ghl");
|
235
|
+
if (d === -1)
|
235
236
|
return r();
|
236
|
-
e.value =
|
237
|
-
const s =
|
238
|
-
s.gateway === "Ghl" && s.config && (
|
237
|
+
e.value = d;
|
238
|
+
const s = n.value.ecrs.at(d);
|
239
|
+
s.gateway === "Ghl" && s.config && (c.value = {
|
239
240
|
merchantId: s.config.merchantId,
|
240
241
|
terminalId: s.config.terminalId,
|
241
242
|
privateKey: s.config.privateKey
|
242
243
|
});
|
243
244
|
};
|
244
|
-
|
245
|
-
async function o(
|
245
|
+
Y(n, a), D(a);
|
246
|
+
async function o(d) {
|
246
247
|
var s;
|
247
|
-
(s =
|
248
|
+
(s = n.value.ecrs) == null || s.splice(d, 1), m.onUpdate(n.value);
|
248
249
|
}
|
249
|
-
return (
|
250
|
-
const
|
251
|
-
return
|
250
|
+
return (d, s) => {
|
251
|
+
const g = v("FmTextField"), i = v("FmTextarea"), t = v("FmButton"), l = v("FmForm");
|
252
|
+
return F(), _(l, {
|
252
253
|
ref: p.value,
|
253
254
|
class: "flex flex-col gap-16 w-[500px]",
|
254
255
|
onValidationSuccess: s[3] || (s[3] = () => {
|
255
|
-
e.value > -1 ?
|
256
|
+
e.value > -1 ? n.value.ecrs[e.value] = { gateway: "Ghl", config: c.value } : (n.value.ecrs || (n.value.ecrs = []), n.value.ecrs.push({ gateway: "Ghl", config: c.value })), m.onUpdate(n.value);
|
256
257
|
})
|
257
258
|
}, {
|
258
|
-
default:
|
259
|
-
f(
|
260
|
-
modelValue:
|
261
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
259
|
+
default: G(() => [
|
260
|
+
f(g, {
|
261
|
+
modelValue: c.value.merchantId,
|
262
|
+
"onUpdate:modelValue": s[0] || (s[0] = (u) => c.value.merchantId = u),
|
262
263
|
label: "Merchant ID"
|
263
264
|
}, null, 8, ["modelValue"]),
|
264
|
-
f(
|
265
|
-
modelValue:
|
266
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
265
|
+
f(g, {
|
266
|
+
modelValue: c.value.terminalId,
|
267
|
+
"onUpdate:modelValue": s[1] || (s[1] = (u) => c.value.terminalId = u),
|
267
268
|
label: "Terminal ID"
|
268
269
|
}, null, 8, ["modelValue"]),
|
269
|
-
f(
|
270
|
-
modelValue:
|
271
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
270
|
+
f(i, {
|
271
|
+
modelValue: c.value.privateKey,
|
272
|
+
"onUpdate:modelValue": s[2] || (s[2] = (u) => c.value.privateKey = u),
|
272
273
|
label: "Private Key"
|
273
274
|
}, null, 8, ["modelValue"]),
|
274
|
-
|
275
|
-
e.value > -1 ? (
|
275
|
+
I("div", oe, [
|
276
|
+
e.value > -1 ? (F(), _(t, {
|
276
277
|
key: 0,
|
277
278
|
class: "flex-1",
|
278
279
|
variant: "secondary",
|
279
280
|
label: "Delete",
|
280
281
|
onclick: () => o(e.value)
|
281
|
-
}, null, 8, ["onclick"])) :
|
282
|
-
f(
|
282
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
283
|
+
f(t, {
|
283
284
|
type: "submit",
|
284
285
|
class: "flex-1",
|
285
286
|
variant: "primary",
|
@@ -291,7 +292,7 @@ const Z = /* @__PURE__ */ V({
|
|
291
292
|
}, 512);
|
292
293
|
};
|
293
294
|
}
|
294
|
-
}), re = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */
|
295
|
+
}), re = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ T({
|
295
296
|
__name: "KioskMode",
|
296
297
|
props: {
|
297
298
|
terminal: {
|
@@ -300,57 +301,57 @@ const Z = /* @__PURE__ */ V({
|
|
300
301
|
}
|
301
302
|
},
|
302
303
|
setup(y) {
|
303
|
-
const { isLoading:
|
304
|
+
const { isLoading: m, startAsyncCall: n } = P(!1), p = h(), e = b({
|
304
305
|
enable: !1,
|
305
306
|
password: []
|
306
|
-
}),
|
307
|
+
}), c = y;
|
307
308
|
function r() {
|
308
309
|
return e.value.enable && e.value.password.filter((a) => !!a).length !== 6 ? p.open({
|
309
310
|
type: "error",
|
310
311
|
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
311
|
-
}) :
|
312
|
+
}) : n(async () => {
|
312
313
|
const a = { enable: e.value.enable };
|
313
314
|
a.enable && Object.assign(a, {
|
314
315
|
password: e.value.password.join("")
|
315
316
|
});
|
316
|
-
const o = await
|
317
|
+
const o = await M.kioskModeRequest(c.terminal._id, a);
|
317
318
|
if (o === "OK")
|
318
319
|
return p.open({ type: "info", message: "Kiosk mode applied successfully." });
|
319
|
-
let
|
320
|
-
return o === "client_not_connected" && (
|
320
|
+
let d = o;
|
321
|
+
return o === "client_not_connected" && (d = "Terminal not connected to the websocket server."), o.startsWith("terminal: ") && (d = o.replaceAll("terminal: ", "")), p.open({
|
321
322
|
type: "error",
|
322
|
-
message:
|
323
|
+
message: d
|
323
324
|
});
|
324
325
|
});
|
325
326
|
}
|
326
327
|
return (a, o) => {
|
327
|
-
const
|
328
|
-
return
|
329
|
-
f(
|
328
|
+
const d = v("FmSwitch"), s = v("FmPinField"), g = v("FmButton");
|
329
|
+
return F(), N(K, null, [
|
330
|
+
f(d, {
|
330
331
|
modelValue: e.value.enable,
|
331
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
332
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => e.value.enable = i),
|
332
333
|
label: "Enable Kiosk Mode?"
|
333
334
|
}, null, 8, ["modelValue"]),
|
334
|
-
e.value.enable ? (
|
335
|
-
o[2] || (o[2] =
|
335
|
+
e.value.enable ? (F(), N("div", re, [
|
336
|
+
o[2] || (o[2] = I("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
336
337
|
f(s, {
|
337
338
|
modelValue: e.value.password,
|
338
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
339
|
+
"onUpdate:modelValue": o[1] || (o[1] = (i) => e.value.password = i)
|
339
340
|
}, null, 8, ["modelValue"])
|
340
|
-
])) :
|
341
|
-
|
342
|
-
f(
|
341
|
+
])) : q("", !0),
|
342
|
+
I("div", se, [
|
343
|
+
f(g, {
|
343
344
|
variant: "primary",
|
344
345
|
label: "Send",
|
345
346
|
icon: "send",
|
346
|
-
loading:
|
347
|
+
loading: S(m),
|
347
348
|
onclick: r
|
348
349
|
}, null, 8, ["loading"])
|
349
350
|
])
|
350
351
|
], 64);
|
351
352
|
};
|
352
353
|
}
|
353
|
-
}), me = /* @__PURE__ */
|
354
|
+
}), me = /* @__PURE__ */ T({
|
354
355
|
__name: "SettingRequest",
|
355
356
|
props: {
|
356
357
|
terminal: {
|
@@ -359,34 +360,34 @@ const Z = /* @__PURE__ */ V({
|
|
359
360
|
}
|
360
361
|
},
|
361
362
|
setup(y) {
|
362
|
-
const { settingTab:
|
363
|
+
const { settingTab: m } = z({
|
363
364
|
settingTab: "kiosk_mode"
|
364
|
-
}),
|
365
|
+
}), n = [
|
365
366
|
{
|
366
367
|
label: "Kiosk Mode",
|
367
368
|
value: "kiosk_mode",
|
368
369
|
render: ie
|
369
370
|
}
|
370
|
-
], p = y, e =
|
371
|
-
return (
|
371
|
+
], p = y, e = C(() => n.find((c) => c.value === m.value));
|
372
|
+
return (c, r) => {
|
372
373
|
var o;
|
373
374
|
const a = v("FmTabs");
|
374
|
-
return
|
375
|
-
r[1] || (r[1] =
|
376
|
-
|
377
|
-
|
375
|
+
return F(), N(K, null, [
|
376
|
+
r[1] || (r[1] = I("p", { className: "mt-1 my-6 text-gray-600" }, [
|
377
|
+
I("b", null, "Note: "),
|
378
|
+
O(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
378
379
|
], -1)),
|
379
380
|
f(a, {
|
380
|
-
"model-value":
|
381
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
381
|
+
"model-value": S(m),
|
382
|
+
"onUpdate:modelValue": r[0] || (r[0] = (d) => j(m) ? m.value = d : null),
|
382
383
|
class: "mb-6",
|
383
|
-
items:
|
384
|
+
items: n
|
384
385
|
}, null, 8, ["model-value"]),
|
385
|
-
|
386
|
+
S(m) ? (F(), _(A((o = e.value) == null ? void 0 : o.render), L(E({ key: 0 }, { terminal: p.terminal })), null, 16)) : q("", !0)
|
386
387
|
], 64);
|
387
388
|
};
|
388
389
|
}
|
389
|
-
}), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */
|
390
|
+
}), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */ T({
|
390
391
|
__name: "SoftspaceGateway",
|
391
392
|
props: {
|
392
393
|
terminal: {
|
@@ -399,90 +400,91 @@ const Z = /* @__PURE__ */ V({
|
|
399
400
|
}
|
400
401
|
},
|
401
402
|
setup(y) {
|
402
|
-
const
|
403
|
+
const m = y, n = $().currentCountry, p = [
|
403
404
|
{
|
404
405
|
label: "Softspace Malaysia",
|
405
406
|
value: "cc.feedme.payment.softspace_my",
|
406
|
-
region:
|
407
|
+
region: x.F_COUNTRY.enum.MY
|
407
408
|
}
|
408
|
-
], e =
|
409
|
+
], e = B(() => m.terminal), c = b(), r = b(-1), a = b({
|
409
410
|
packageId: "",
|
410
411
|
uniqueId: "",
|
411
412
|
developerId: "",
|
412
413
|
isUat: !1
|
413
414
|
}), o = () => {
|
414
415
|
a.value.uniqueId = "", a.value.packageId = "", a.value.developerId = "", r.value = -1;
|
415
|
-
},
|
416
|
+
}, d = () => {
|
416
417
|
if (!e.value.gateways)
|
417
418
|
return o();
|
418
|
-
const
|
419
|
-
if (
|
419
|
+
const i = e.value.gateways.findIndex((u) => u && u.gateway && u.gateway === "Softspace");
|
420
|
+
if (i === -1)
|
420
421
|
return o();
|
421
|
-
r.value =
|
422
|
-
const
|
423
|
-
if (
|
422
|
+
r.value = i;
|
423
|
+
const t = e.value.gateways.at(i);
|
424
|
+
if (t.gateway !== "Softspace" || !t.config)
|
424
425
|
return;
|
425
|
-
const l = JSON.parse(
|
426
|
+
const l = JSON.parse(t.config.uniqueId);
|
426
427
|
a.value = {
|
427
|
-
packageId:
|
428
|
+
packageId: t.config.packageId,
|
428
429
|
uniqueId: l.uniqueId,
|
429
430
|
developerId: l.developerId,
|
430
431
|
isUat: l.isUat
|
431
432
|
};
|
432
433
|
};
|
433
|
-
|
434
|
-
async function s(
|
435
|
-
var
|
436
|
-
(
|
434
|
+
Y(e, d), D(d);
|
435
|
+
async function s(i) {
|
436
|
+
var t;
|
437
|
+
(t = e.value.gateways) == null || t.splice(i, 1), m.onUpdate(e.value);
|
437
438
|
}
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
439
|
+
const g = C(() => p.filter((i) => i.region === n.value));
|
440
|
+
return (i, t) => {
|
441
|
+
const l = v("FmSelect"), u = v("FmTextField"), V = v("FmCheckbox"), k = v("FmButton"), U = v("FmForm");
|
442
|
+
return F(), _(U, {
|
443
|
+
ref: c.value,
|
442
444
|
class: "flex flex-col gap-16 w-[500px]",
|
443
|
-
onValidationSuccess:
|
444
|
-
const
|
445
|
+
onValidationSuccess: t[4] || (t[4] = () => {
|
446
|
+
const w = {
|
445
447
|
gateway: "Softspace",
|
446
448
|
config: {
|
447
449
|
packageId: a.value.packageId,
|
448
450
|
uniqueId: JSON.stringify({ uniqueId: a.value.uniqueId, developerId: a.value.developerId, isUat: a.value.isUat })
|
449
451
|
}
|
450
452
|
};
|
451
|
-
r.value > -1 ? e.value.gateways[r.value] =
|
453
|
+
r.value > -1 ? e.value.gateways[r.value] = w : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push(w)), m.onUpdate(e.value);
|
452
454
|
})
|
453
455
|
}, {
|
454
|
-
default:
|
456
|
+
default: G(() => [
|
455
457
|
f(l, {
|
456
458
|
modelValue: a.value.packageId,
|
457
|
-
"onUpdate:modelValue":
|
459
|
+
"onUpdate:modelValue": t[0] || (t[0] = (w) => a.value.packageId = w),
|
458
460
|
label: "Package ID",
|
459
|
-
items:
|
461
|
+
items: g.value
|
460
462
|
}, null, 8, ["modelValue", "items"]),
|
461
463
|
f(u, {
|
462
464
|
modelValue: a.value.developerId,
|
463
|
-
"onUpdate:modelValue":
|
465
|
+
"onUpdate:modelValue": t[1] || (t[1] = (w) => a.value.developerId = w),
|
464
466
|
label: "Developer ID (MID)"
|
465
467
|
}, null, 8, ["modelValue"]),
|
466
468
|
f(u, {
|
467
469
|
modelValue: a.value.uniqueId,
|
468
|
-
"onUpdate:modelValue":
|
470
|
+
"onUpdate:modelValue": t[2] || (t[2] = (w) => a.value.uniqueId = w),
|
469
471
|
label: "Unique ID (TID)"
|
470
472
|
}, null, 8, ["modelValue"]),
|
471
|
-
f(
|
473
|
+
f(V, {
|
472
474
|
modelValue: a.value.isUat,
|
473
|
-
"onUpdate:modelValue":
|
475
|
+
"onUpdate:modelValue": t[3] || (t[3] = (w) => a.value.isUat = w),
|
474
476
|
label: "Is UAT (Test)",
|
475
477
|
value: "1"
|
476
478
|
}, null, 8, ["modelValue"]),
|
477
|
-
|
478
|
-
r.value > -1 ? (
|
479
|
+
I("div", ce, [
|
480
|
+
r.value > -1 ? (F(), _(k, {
|
479
481
|
key: 0,
|
480
482
|
class: "flex-1",
|
481
483
|
variant: "secondary",
|
482
484
|
label: "Delete",
|
483
485
|
onclick: () => s(r.value)
|
484
|
-
}, null, 8, ["onclick"])) :
|
485
|
-
f(
|
486
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
487
|
+
f(k, {
|
486
488
|
type: "submit",
|
487
489
|
class: "flex-1",
|
488
490
|
variant: "primary",
|
@@ -494,7 +496,7 @@ const Z = /* @__PURE__ */ V({
|
|
494
496
|
}, 512);
|
495
497
|
};
|
496
498
|
}
|
497
|
-
}), ke = /* @__PURE__ */
|
499
|
+
}), ke = /* @__PURE__ */ T({
|
498
500
|
__name: "TerminalSetting",
|
499
501
|
props: {
|
500
502
|
terminalId: {
|
@@ -503,21 +505,21 @@ const Z = /* @__PURE__ */ V({
|
|
503
505
|
}
|
504
506
|
},
|
505
507
|
setup(y) {
|
506
|
-
const
|
508
|
+
const m = y, { tab: n } = z({
|
507
509
|
tab: "information"
|
508
|
-
}), { isLoading: p, startAsyncCall: e } =
|
510
|
+
}), { isLoading: p, startAsyncCall: e } = P(!0), c = J(), r = h(), a = b();
|
509
511
|
async function o(l) {
|
510
512
|
e(async () => {
|
511
513
|
try {
|
512
|
-
await
|
513
|
-
|
514
|
+
await M.updateById(
|
515
|
+
m.terminalId,
|
514
516
|
{
|
515
517
|
name: l.name,
|
516
518
|
status: l.status,
|
517
519
|
ecrs: l.ecrs ?? [],
|
518
520
|
gateways: l.gateways ?? []
|
519
521
|
}
|
520
|
-
), a.value = await
|
522
|
+
), a.value = await M.readById(m.terminalId), r.open({
|
521
523
|
type: "success",
|
522
524
|
message: "Terminal updated successfully"
|
523
525
|
});
|
@@ -530,7 +532,7 @@ const Z = /* @__PURE__ */ V({
|
|
530
532
|
}
|
531
533
|
});
|
532
534
|
}
|
533
|
-
const
|
535
|
+
const d = [
|
534
536
|
{
|
535
537
|
label: "Information",
|
536
538
|
value: "information",
|
@@ -549,14 +551,14 @@ const Z = /* @__PURE__ */ V({
|
|
549
551
|
value: "fiuu",
|
550
552
|
icon: "payment",
|
551
553
|
render: le,
|
552
|
-
region: [
|
554
|
+
region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
|
553
555
|
},
|
554
556
|
{
|
555
557
|
label: "Softspace",
|
556
558
|
value: "softspace",
|
557
559
|
icon: "payment",
|
558
560
|
render: de,
|
559
|
-
region: [
|
561
|
+
region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
|
560
562
|
},
|
561
563
|
{
|
562
564
|
label: "FeedMe Terminal",
|
@@ -571,36 +573,40 @@ const Z = /* @__PURE__ */ V({
|
|
571
573
|
icon: "shopping_cart_checkout",
|
572
574
|
render: ue,
|
573
575
|
onlyFor: ["POS", "KIOSK"],
|
574
|
-
region: [
|
576
|
+
region: [x.F_COUNTRY.enum.MY]
|
575
577
|
}
|
576
|
-
], s =
|
578
|
+
], s = $().currentCountry, g = C(() => {
|
577
579
|
var l;
|
578
|
-
return (l =
|
580
|
+
return (l = d.find((u) => u.value === n.value)) == null ? void 0 : l.render;
|
579
581
|
});
|
580
|
-
async function
|
582
|
+
async function i() {
|
581
583
|
e(async () => {
|
582
|
-
a.value = await
|
584
|
+
a.value = await M.readById(m.terminalId);
|
583
585
|
});
|
584
586
|
}
|
585
|
-
|
586
|
-
var
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
587
|
+
const t = C(() => d.filter((l) => {
|
588
|
+
var u;
|
589
|
+
return !l.onlyFor || l.onlyFor.includes(((u = a.value) == null ? void 0 : u.deviceType) ?? "");
|
590
|
+
}).filter((l) => !l.region || l.region.includes(s.value ?? x.F_COUNTRY.enum.MY)));
|
591
|
+
return D(i), (l, u) => {
|
592
|
+
var k;
|
593
|
+
const V = v("FmTabs");
|
594
|
+
return F(), _(H, {
|
595
|
+
title: `Terminal (${(k = a.value) == null ? void 0 : k._id})`,
|
596
|
+
loading: S(p),
|
597
|
+
onBack: S(c).back
|
592
598
|
}, {
|
593
|
-
default:
|
594
|
-
f(
|
595
|
-
"model-value":
|
596
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
599
|
+
default: G(() => [
|
600
|
+
f(V, {
|
601
|
+
"model-value": S(n),
|
602
|
+
"onUpdate:modelValue": u[0] || (u[0] = (U) => j(n) ? n.value = U : null),
|
597
603
|
class: "mb-6",
|
598
|
-
items:
|
604
|
+
items: t.value
|
599
605
|
}, null, 8, ["model-value", "items"]),
|
600
|
-
|
606
|
+
S(n) ? (F(), _(A(g.value), L(E({ key: 0 }, {
|
601
607
|
terminal: a.value,
|
602
608
|
onUpdate: o
|
603
|
-
})), null, 16)) :
|
609
|
+
})), null, 16)) : q("", !0)
|
604
610
|
]),
|
605
611
|
_: 1
|
606
612
|
}, 8, ["title", "loading", "onBack"]);
|