@feedmepos/mf-payment 1.1.18-beta.1 → 1.1.19
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/{PayoutAccount-D2NcNg91.js → PayoutAccount-BrMo_bdc.js} +6 -6
- package/dist/{PayoutAccount-CYUar8zQ.js → PayoutAccount-ClQ35qju.js} +5 -5
- package/dist/{PayoutAccountSetting-B8Ft-hoB.js → PayoutAccountSetting-DBMWIQ6u.js} +3 -3
- package/dist/{Restaurant-CMMKMrnT.js → Restaurant-DudOcIKg.js} +4 -4
- package/dist/{RestaurantSetting-BLwmLgOR.js → RestaurantSetting-BJo_ixHt.js} +3 -3
- package/dist/{Settlement-CUSjuu8C.js → Settlement-CAKn73UQ.js} +3 -3
- package/dist/{Settlement-bCEYFWso.js → Settlement-CJdBUfbZ.js} +3 -3
- package/dist/{SettlementTransactions-nPXutj2k.js → SettlementTransactions-BCzKxoIi.js} +3 -3
- package/dist/{SettlementTransactions-9XyCio40.js → SettlementTransactions-pgo_qyD-.js} +3 -3
- package/dist/{Terminal-DxCsGi1_.js → Terminal-BGLOmnl_.js} +6 -6
- package/dist/{TerminalSetting-BQ91QNdH.js → TerminalSetting-CiyAJdLj.js} +211 -203
- package/dist/{Transaction-Jrjmd8fl.js → Transaction-DwxmCKcG.js} +7 -7
- package/dist/{Transaction-DfGd5rN5.js → Transaction-qyJAJekb.js} +5 -5
- package/dist/{TransactionOld-CWSGrz6z.js → TransactionOld-LES765mv.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BFPE-UNi.js → TransactionTable.vue_vue_type_script_setup_true_lang-BEHZCoq6.js} +3 -3
- package/dist/{app-BiGh687U.js → app-YY9yj-vq.js} +325 -325
- package/dist/app.js +1 -1
- package/dist/{assets-DiROg_K1.js → assets-Bka69roC.js} +2 -2
- package/dist/{grafana-lpqL2dP6.js → grafana-CZhYcWzi.js} +2 -2
- package/dist/{index-DcLKzByC.js → index-BkOR4M1w.js} +1 -1
- package/dist/{index-DrRMYnvp.js → index-CGg0eJIr.js} +1489 -1489
- package/dist/{index-CzWea4hZ.js → index-CtbszYV4.js} +1 -1
- package/dist/{index-iE5dQPjZ.js → index-DIG1I3Ka.js} +1 -1
- package/dist/{index-DKDnCFKf.js → index-DSsEAgyG.js} +1 -1
- package/dist/{index-dX5YU5Km.js → index-F2ifB2oW.js} +1 -1
- package/dist/{index-CR7ZBkKW.js → index-ZXI0wUjr.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-D6gVt-7r.js → index.vue_vue_type_script_setup_true_lang-DMZricqL.js} +1 -1
- package/dist/package.json +1 -1
- package/dist/{payout-account-CxOH7cEO.js → payout-account-9HPKjwEG.js} +3 -3
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +2 -2
- package/package.json +1 -1
@@ -1,14 +1,14 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import { u as
|
1
|
+
import { defineComponent as U, openBlock as b, createElementBlock as O, Fragment as B, createElementVNode as F, createTextVNode as q, toDisplayString as D, toRef as G, ref as w, watch as R, onMounted as M, computed as Y, resolveComponent as v, unref as k, createVNode as f, createBlock as x, withCtx as N, createCommentVNode as T, isRef as $, resolveDynamicComponent as j, normalizeProps as A, mergeProps as L } from "vue";
|
2
|
+
import { u as K, e as S } from "./index-CGg0eJIr.js";
|
3
3
|
import { useRouter as J } from "vue-router";
|
4
|
-
import { t as
|
4
|
+
import { t as C } from "./index-CtbszYV4.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 E } from "./index-DIG1I3Ka.js";
|
7
|
+
import { useSnackbar as z } 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 P } from "@feedmepos/mf-common";
|
11
|
+
const Z = /* @__PURE__ */ U({
|
12
12
|
__name: "Information",
|
13
13
|
props: {
|
14
14
|
terminal: {
|
@@ -16,26 +16,26 @@ const Z = /* @__PURE__ */ V({
|
|
16
16
|
required: !0
|
17
17
|
}
|
18
18
|
},
|
19
|
-
setup(
|
20
|
-
return (
|
19
|
+
setup(y) {
|
20
|
+
return (i, t) => (b(), O(B, null, [
|
21
21
|
t[0] || (t[0] = F("b", null, "Name", -1)),
|
22
|
-
|
22
|
+
q(": " + D(y.terminal.name), 1),
|
23
23
|
t[1] || (t[1] = F("br", null, null, -1)),
|
24
24
|
t[2] || (t[2] = F("b", null, "Status", -1)),
|
25
|
-
|
25
|
+
q(": " + D(y.terminal.status), 1),
|
26
26
|
t[3] || (t[3] = F("br", null, null, -1)),
|
27
27
|
t[4] || (t[4] = F("b", null, "Device ID", -1)),
|
28
|
-
|
28
|
+
q(": " + D(y.terminal.deviceId ?? "-"), 1),
|
29
29
|
t[5] || (t[5] = F("br", null, null, -1)),
|
30
30
|
t[6] || (t[6] = F("b", null, "Device Type", -1)),
|
31
|
-
|
31
|
+
q(": " + D(y.terminal.deviceType ?? "-"), 1),
|
32
32
|
t[7] || (t[7] = F("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__ */ U({
|
39
39
|
__name: "TerminalGateway",
|
40
40
|
props: {
|
41
41
|
terminal: {
|
@@ -47,63 +47,63 @@ const Z = /* @__PURE__ */ V({
|
|
47
47
|
required: !0
|
48
48
|
}
|
49
49
|
},
|
50
|
-
setup(
|
51
|
-
const { isLoading:
|
50
|
+
setup(y) {
|
51
|
+
const { isLoading: i, startAsyncCall: t } = K(), p = y, e = G(() => p.terminal), m = w(), r = w(), a = w(-1), o = w({
|
52
52
|
terminalId: ""
|
53
|
-
}),
|
53
|
+
}), c = () => {
|
54
54
|
o.value.terminalId = "", a.value = -1;
|
55
55
|
}, s = () => {
|
56
56
|
if (t(async () => {
|
57
|
-
|
58
|
-
}), !
|
59
|
-
return
|
60
|
-
const l =
|
57
|
+
m.value = await C.getRestaurantTerminals(p.terminal.referenceId);
|
58
|
+
}), !p.terminal.ecrs)
|
59
|
+
return c();
|
60
|
+
const l = p.terminal.ecrs.findIndex((g) => g && g.gateway && g.gateway === "FeedMe");
|
61
61
|
if (l === -1)
|
62
|
-
return
|
62
|
+
return c();
|
63
63
|
a.value = l;
|
64
|
-
const
|
65
|
-
|
66
|
-
terminalId:
|
64
|
+
const u = p.terminal.ecrs.at(l);
|
65
|
+
u.gateway === "FeedMe" && u.config && (o.value = {
|
66
|
+
terminalId: u.config.terminalId
|
67
67
|
});
|
68
68
|
};
|
69
|
-
|
70
|
-
const
|
69
|
+
R(e, s), M(s);
|
70
|
+
const d = Y(() => (m.value ?? []).map((l) => ({
|
71
71
|
label: l.name ?? l._id,
|
72
72
|
value: l._id
|
73
73
|
})));
|
74
74
|
async function n(l) {
|
75
|
-
var
|
76
|
-
(
|
75
|
+
var u;
|
76
|
+
(u = p.terminal.ecrs) == null || u.splice(l, 1), p.onUpdate(p.terminal);
|
77
77
|
}
|
78
|
-
return (l,
|
79
|
-
const
|
80
|
-
return
|
81
|
-
g
|
82
|
-
])) : (
|
78
|
+
return (l, u) => {
|
79
|
+
const g = v("FmCircularProgress"), V = v("FmSelect"), I = v("FmButton"), _ = v("FmForm");
|
80
|
+
return k(i) ? (b(), O("div", ee, [
|
81
|
+
f(g, { size: "xxl" })
|
82
|
+
])) : (b(), x(_, {
|
83
83
|
key: 1,
|
84
|
-
ref:
|
84
|
+
ref: r.value,
|
85
85
|
class: "flex flex-col gap-16 w-[500px]",
|
86
|
-
onValidationSuccess:
|
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 })),
|
86
|
+
onValidationSuccess: u[1] || (u[1] = () => {
|
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
|
-
|
90
|
+
default: N(() => [
|
91
|
+
f(V, {
|
92
92
|
modelValue: o.value.terminalId,
|
93
|
-
"onUpdate:modelValue":
|
93
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => o.value.terminalId = h),
|
94
94
|
label: "Terminal ID",
|
95
|
-
items:
|
96
|
-
rules:
|
95
|
+
items: d.value,
|
96
|
+
rules: k(W)(k(X).string())
|
97
97
|
}, null, 8, ["modelValue", "items", "rules"]),
|
98
98
|
F("div", ae, [
|
99
|
-
a.value > -1 ? (
|
99
|
+
a.value > -1 ? (b(), x(I, {
|
100
100
|
key: 0,
|
101
101
|
class: "flex-1",
|
102
102
|
variant: "secondary",
|
103
103
|
label: "Delete",
|
104
104
|
onclick: () => n(a.value)
|
105
105
|
}, null, 8, ["onclick"])) : T("", !0),
|
106
|
-
|
106
|
+
f(I, {
|
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__ */ U({
|
119
119
|
__name: "FiuuGateway",
|
120
120
|
props: {
|
121
121
|
terminal: {
|
@@ -127,76 +127,76 @@ const Z = /* @__PURE__ */ V({
|
|
127
127
|
required: !0
|
128
128
|
}
|
129
129
|
},
|
130
|
-
setup(
|
131
|
-
const
|
130
|
+
setup(y) {
|
131
|
+
const i = y, t = P().currentCountry, p = [
|
132
132
|
{
|
133
133
|
label: "Fiuu Malaysia",
|
134
134
|
value: "cc.feedme.payment.rms",
|
135
|
-
region:
|
135
|
+
region: S.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: S.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: S.F_COUNTRY.enum.SG
|
146
146
|
}
|
147
|
-
], e =
|
147
|
+
], e = G(() => i.terminal), m = w(), r = w(-1), a = w({
|
148
148
|
packageId: "",
|
149
149
|
uniqueId: ""
|
150
150
|
}), o = () => {
|
151
|
-
a.value.uniqueId = "", a.value.packageId = "",
|
152
|
-
},
|
151
|
+
a.value.uniqueId = "", a.value.packageId = "", r.value = -1;
|
152
|
+
}, c = () => {
|
153
153
|
if (!e.value.gateways)
|
154
154
|
return o();
|
155
|
-
const
|
156
|
-
if (
|
155
|
+
const d = e.value.gateways.findIndex((l) => l && l.gateway && l.gateway === "Fiuu");
|
156
|
+
if (d === -1)
|
157
157
|
return o();
|
158
|
-
|
159
|
-
const n = e.value.gateways.at(
|
158
|
+
r.value = d;
|
159
|
+
const n = e.value.gateways.at(d);
|
160
160
|
n.gateway === "Fiuu" && n.config && (a.value = {
|
161
161
|
packageId: n.config.packageId,
|
162
162
|
uniqueId: n.config.uniqueId
|
163
163
|
});
|
164
164
|
};
|
165
|
-
|
166
|
-
async function s(
|
165
|
+
R(e, c), M(c);
|
166
|
+
async function s(d) {
|
167
167
|
var n;
|
168
|
-
(n = e.value.gateways) == null || n.splice(
|
168
|
+
(n = e.value.gateways) == null || n.splice(d, 1), i.onUpdate(e.value);
|
169
169
|
}
|
170
|
-
return (
|
171
|
-
const l =
|
172
|
-
return
|
173
|
-
ref:
|
170
|
+
return (d, n) => {
|
171
|
+
const l = v("FmSelect"), u = v("FmTextField"), g = v("FmButton"), V = v("FmForm");
|
172
|
+
return b(), x(V, {
|
173
|
+
ref: m.value,
|
174
174
|
class: "flex flex-col gap-16 w-[500px]",
|
175
175
|
onValidationSuccess: n[2] || (n[2] = () => {
|
176
|
-
|
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 })), i.onUpdate(e.value);
|
177
177
|
})
|
178
178
|
}, {
|
179
|
-
default:
|
180
|
-
|
179
|
+
default: N(() => [
|
180
|
+
f(l, {
|
181
181
|
modelValue: a.value.packageId,
|
182
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
182
|
+
"onUpdate:modelValue": n[0] || (n[0] = (I) => a.value.packageId = I),
|
183
183
|
label: "Package ID",
|
184
|
-
items:
|
184
|
+
items: p.filter((I) => I.region === k(t))
|
185
185
|
}, null, 8, ["modelValue", "items"]),
|
186
|
-
|
186
|
+
f(u, {
|
187
187
|
modelValue: a.value.uniqueId,
|
188
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
188
|
+
"onUpdate:modelValue": n[1] || (n[1] = (I) => a.value.uniqueId = I),
|
189
189
|
label: "Unique ID"
|
190
190
|
}, null, 8, ["modelValue"]),
|
191
191
|
F("div", ne, [
|
192
|
-
|
192
|
+
r.value > -1 ? (b(), x(g, {
|
193
193
|
key: 0,
|
194
194
|
class: "flex-1",
|
195
195
|
variant: "secondary",
|
196
196
|
label: "Delete",
|
197
|
-
onclick: () => s(
|
197
|
+
onclick: () => s(r.value)
|
198
198
|
}, null, 8, ["onclick"])) : T("", !0),
|
199
|
-
g
|
199
|
+
f(g, {
|
200
200
|
type: "submit",
|
201
201
|
class: "flex-1",
|
202
202
|
variant: "primary",
|
@@ -208,7 +208,7 @@ const Z = /* @__PURE__ */ V({
|
|
208
208
|
}, 512);
|
209
209
|
};
|
210
210
|
}
|
211
|
-
}), oe = { class: "flex mt-6 space-x-6" },
|
211
|
+
}), oe = { class: "flex mt-6 space-x-6" }, ue = /* @__PURE__ */ U({
|
212
212
|
__name: "GhlGateway",
|
213
213
|
props: {
|
214
214
|
terminal: {
|
@@ -220,66 +220,66 @@ const Z = /* @__PURE__ */ V({
|
|
220
220
|
required: !0
|
221
221
|
}
|
222
222
|
},
|
223
|
-
setup(
|
224
|
-
const
|
223
|
+
setup(y) {
|
224
|
+
const i = y, t = G(() => i.terminal), p = w(), e = w(-1), m = w({
|
225
225
|
merchantId: "",
|
226
226
|
terminalId: "",
|
227
227
|
privateKey: ""
|
228
|
-
}),
|
229
|
-
|
228
|
+
}), r = () => {
|
229
|
+
m.value.merchantId = "", m.value.terminalId = "", m.value.privateKey = "", e.value = -1;
|
230
230
|
}, a = () => {
|
231
231
|
if (!t.value.ecrs)
|
232
|
-
return
|
233
|
-
const
|
234
|
-
if (
|
235
|
-
return
|
236
|
-
e.value =
|
237
|
-
const s = t.value.ecrs.at(
|
238
|
-
s.gateway === "Ghl" && s.config && (
|
232
|
+
return r();
|
233
|
+
const c = t.value.ecrs.findIndex((d) => d && d.gateway && d.gateway === "Ghl");
|
234
|
+
if (c === -1)
|
235
|
+
return r();
|
236
|
+
e.value = c;
|
237
|
+
const s = t.value.ecrs.at(c);
|
238
|
+
s.gateway === "Ghl" && s.config && (m.value = {
|
239
239
|
merchantId: s.config.merchantId,
|
240
240
|
terminalId: s.config.terminalId,
|
241
241
|
privateKey: s.config.privateKey
|
242
242
|
});
|
243
243
|
};
|
244
|
-
|
245
|
-
async function o(
|
244
|
+
R(t, a), M(a);
|
245
|
+
async function o(c) {
|
246
246
|
var s;
|
247
|
-
(s = t.value.ecrs) == null || s.splice(
|
247
|
+
(s = t.value.ecrs) == null || s.splice(c, 1), i.onUpdate(t.value);
|
248
248
|
}
|
249
|
-
return (
|
250
|
-
const
|
251
|
-
return
|
252
|
-
ref:
|
249
|
+
return (c, s) => {
|
250
|
+
const d = v("FmTextField"), n = v("FmTextarea"), l = v("FmButton"), u = v("FmForm");
|
251
|
+
return b(), x(u, {
|
252
|
+
ref: p.value,
|
253
253
|
class: "flex flex-col gap-16 w-[500px]",
|
254
254
|
onValidationSuccess: s[3] || (s[3] = () => {
|
255
|
-
e.value > -1 ? t.value.ecrs[e.value] = { gateway: "Ghl", config:
|
255
|
+
e.value > -1 ? t.value.ecrs[e.value] = { gateway: "Ghl", config: m.value } : (t.value.ecrs || (t.value.ecrs = []), t.value.ecrs.push({ gateway: "Ghl", config: m.value })), i.onUpdate(t.value);
|
256
256
|
})
|
257
257
|
}, {
|
258
|
-
default:
|
259
|
-
|
260
|
-
modelValue:
|
261
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
258
|
+
default: N(() => [
|
259
|
+
f(d, {
|
260
|
+
modelValue: m.value.merchantId,
|
261
|
+
"onUpdate:modelValue": s[0] || (s[0] = (g) => m.value.merchantId = g),
|
262
262
|
label: "Merchant ID"
|
263
263
|
}, null, 8, ["modelValue"]),
|
264
|
-
|
265
|
-
modelValue:
|
266
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
264
|
+
f(d, {
|
265
|
+
modelValue: m.value.terminalId,
|
266
|
+
"onUpdate:modelValue": s[1] || (s[1] = (g) => m.value.terminalId = g),
|
267
267
|
label: "Terminal ID"
|
268
268
|
}, null, 8, ["modelValue"]),
|
269
|
-
|
270
|
-
modelValue:
|
271
|
-
"onUpdate:modelValue": s[2] || (s[2] = (
|
269
|
+
f(n, {
|
270
|
+
modelValue: m.value.privateKey,
|
271
|
+
"onUpdate:modelValue": s[2] || (s[2] = (g) => m.value.privateKey = g),
|
272
272
|
label: "Private Key"
|
273
273
|
}, null, 8, ["modelValue"]),
|
274
274
|
F("div", oe, [
|
275
|
-
e.value > -1 ? (
|
275
|
+
e.value > -1 ? (b(), x(l, {
|
276
276
|
key: 0,
|
277
277
|
class: "flex-1",
|
278
278
|
variant: "secondary",
|
279
279
|
label: "Delete",
|
280
280
|
onclick: () => o(e.value)
|
281
281
|
}, null, 8, ["onclick"])) : T("", !0),
|
282
|
-
|
282
|
+
f(l, {
|
283
283
|
type: "submit",
|
284
284
|
class: "flex-1",
|
285
285
|
variant: "primary",
|
@@ -291,7 +291,7 @@ const Z = /* @__PURE__ */ V({
|
|
291
291
|
}, 512);
|
292
292
|
};
|
293
293
|
}
|
294
|
-
}),
|
294
|
+
}), re = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ U({
|
295
295
|
__name: "KioskMode",
|
296
296
|
props: {
|
297
297
|
terminal: {
|
@@ -299,13 +299,13 @@ const Z = /* @__PURE__ */ V({
|
|
299
299
|
required: !0
|
300
300
|
}
|
301
301
|
},
|
302
|
-
setup(
|
303
|
-
const { isLoading:
|
302
|
+
setup(y) {
|
303
|
+
const { isLoading: i, startAsyncCall: t } = K(!1), p = z(), e = w({
|
304
304
|
enable: !1,
|
305
305
|
password: []
|
306
|
-
}),
|
307
|
-
function
|
308
|
-
return e.value.enable && e.value.password.filter((a) => !!a).length !== 6 ?
|
306
|
+
}), m = y;
|
307
|
+
function r() {
|
308
|
+
return e.value.enable && e.value.password.filter((a) => !!a).length !== 6 ? p.open({
|
309
309
|
type: "error",
|
310
310
|
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
311
311
|
}) : t(async () => {
|
@@ -313,44 +313,44 @@ const Z = /* @__PURE__ */ V({
|
|
313
313
|
a.enable && Object.assign(a, {
|
314
314
|
password: e.value.password.join("")
|
315
315
|
});
|
316
|
-
const o = await
|
316
|
+
const o = await C.kioskModeRequest(m.terminal._id, a);
|
317
317
|
if (o === "OK")
|
318
|
-
return
|
319
|
-
let
|
320
|
-
return o === "client_not_connected" && (
|
318
|
+
return p.open({ type: "info", message: "Kiosk mode applied successfully." });
|
319
|
+
let c = o;
|
320
|
+
return o === "client_not_connected" && (c = "Terminal not connected to the websocket server."), o.startsWith("terminal: ") && (c = o.replaceAll("terminal: ", "")), p.open({
|
321
321
|
type: "error",
|
322
|
-
message:
|
322
|
+
message: c
|
323
323
|
});
|
324
324
|
});
|
325
325
|
}
|
326
326
|
return (a, o) => {
|
327
|
-
const
|
328
|
-
return
|
329
|
-
|
327
|
+
const c = v("FmSwitch"), s = v("FmPinField"), d = v("FmButton");
|
328
|
+
return b(), O(B, null, [
|
329
|
+
f(c, {
|
330
330
|
modelValue: e.value.enable,
|
331
331
|
"onUpdate:modelValue": o[0] || (o[0] = (n) => e.value.enable = n),
|
332
332
|
label: "Enable Kiosk Mode?"
|
333
333
|
}, null, 8, ["modelValue"]),
|
334
|
-
e.value.enable ? (
|
334
|
+
e.value.enable ? (b(), O("div", re, [
|
335
335
|
o[2] || (o[2] = F("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
336
|
-
|
336
|
+
f(s, {
|
337
337
|
modelValue: e.value.password,
|
338
338
|
"onUpdate:modelValue": o[1] || (o[1] = (n) => e.value.password = n)
|
339
339
|
}, null, 8, ["modelValue"])
|
340
340
|
])) : T("", !0),
|
341
341
|
F("div", se, [
|
342
|
-
|
342
|
+
f(d, {
|
343
343
|
variant: "primary",
|
344
344
|
label: "Send",
|
345
345
|
icon: "send",
|
346
|
-
loading:
|
347
|
-
onclick:
|
346
|
+
loading: k(i),
|
347
|
+
onclick: r
|
348
348
|
}, null, 8, ["loading"])
|
349
349
|
])
|
350
350
|
], 64);
|
351
351
|
};
|
352
352
|
}
|
353
|
-
}), me = /* @__PURE__ */
|
353
|
+
}), me = /* @__PURE__ */ U({
|
354
354
|
__name: "SettingRequest",
|
355
355
|
props: {
|
356
356
|
terminal: {
|
@@ -358,8 +358,8 @@ const Z = /* @__PURE__ */ V({
|
|
358
358
|
required: !0
|
359
359
|
}
|
360
360
|
},
|
361
|
-
setup(
|
362
|
-
const { settingTab:
|
361
|
+
setup(y) {
|
362
|
+
const { settingTab: i } = E({
|
363
363
|
settingTab: "kiosk_mode"
|
364
364
|
}), t = [
|
365
365
|
{
|
@@ -367,26 +367,26 @@ const Z = /* @__PURE__ */ V({
|
|
367
367
|
value: "kiosk_mode",
|
368
368
|
render: ie
|
369
369
|
}
|
370
|
-
],
|
371
|
-
return (
|
370
|
+
], p = y, e = Y(() => t.find((m) => m.value === i.value));
|
371
|
+
return (m, r) => {
|
372
372
|
var o;
|
373
|
-
const a =
|
374
|
-
return
|
375
|
-
|
373
|
+
const a = v("FmTabs");
|
374
|
+
return b(), O(B, null, [
|
375
|
+
r[1] || (r[1] = F("p", { className: "mt-1 my-6 text-gray-600" }, [
|
376
376
|
F("b", null, "Note: "),
|
377
|
-
|
377
|
+
q(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
378
378
|
], -1)),
|
379
|
-
|
380
|
-
"model-value":
|
381
|
-
"onUpdate:modelValue":
|
379
|
+
f(a, {
|
380
|
+
"model-value": k(i),
|
381
|
+
"onUpdate:modelValue": r[0] || (r[0] = (c) => $(i) ? i.value = c : null),
|
382
382
|
class: "mb-6",
|
383
383
|
items: t
|
384
384
|
}, null, 8, ["model-value"]),
|
385
|
-
|
385
|
+
k(i) ? (b(), x(j((o = e.value) == null ? void 0 : o.render), A(L({ key: 0 }, { terminal: p.terminal })), null, 16)) : T("", !0)
|
386
386
|
], 64);
|
387
387
|
};
|
388
388
|
}
|
389
|
-
}), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */
|
389
|
+
}), ce = { class: "flex mt-6 space-x-6" }, de = /* @__PURE__ */ U({
|
390
390
|
__name: "SoftspaceGateway",
|
391
391
|
props: {
|
392
392
|
terminal: {
|
@@ -398,77 +398,85 @@ const Z = /* @__PURE__ */ V({
|
|
398
398
|
required: !0
|
399
399
|
}
|
400
400
|
},
|
401
|
-
setup(
|
402
|
-
const
|
401
|
+
setup(y) {
|
402
|
+
const i = y, t = P().currentCountry, p = [
|
403
403
|
{
|
404
404
|
label: "Softspace Malaysia",
|
405
405
|
value: "cc.feedme.payment.softspace_my",
|
406
|
-
region:
|
406
|
+
region: S.F_COUNTRY.enum.MY
|
407
407
|
}
|
408
|
-
], e =
|
408
|
+
], e = G(() => i.terminal), m = w(), r = w(-1), a = w({
|
409
409
|
packageId: "",
|
410
410
|
uniqueId: "",
|
411
|
-
developerId: ""
|
411
|
+
developerId: "",
|
412
|
+
isUat: !1
|
412
413
|
}), o = () => {
|
413
|
-
a.value.uniqueId = "", a.value.packageId = "", a.value.developerId = "",
|
414
|
-
},
|
414
|
+
a.value.uniqueId = "", a.value.packageId = "", a.value.developerId = "", r.value = -1;
|
415
|
+
}, c = () => {
|
415
416
|
if (!e.value.gateways)
|
416
417
|
return o();
|
417
|
-
const
|
418
|
-
if (
|
418
|
+
const d = e.value.gateways.findIndex((u) => u && u.gateway && u.gateway === "Softspace");
|
419
|
+
if (d === -1)
|
419
420
|
return o();
|
420
|
-
|
421
|
-
const n = e.value.gateways.at(
|
421
|
+
r.value = d;
|
422
|
+
const n = e.value.gateways.at(d);
|
422
423
|
if (n.gateway !== "Softspace" || !n.config)
|
423
424
|
return;
|
424
425
|
const l = JSON.parse(n.config.uniqueId);
|
425
426
|
a.value = {
|
426
427
|
packageId: n.config.packageId,
|
427
428
|
uniqueId: l.uniqueId,
|
428
|
-
developerId: l.developerId
|
429
|
+
developerId: l.developerId,
|
430
|
+
isUat: l.isUat
|
429
431
|
};
|
430
432
|
};
|
431
|
-
|
432
|
-
async function s(
|
433
|
+
R(e, c), M(c);
|
434
|
+
async function s(d) {
|
433
435
|
var n;
|
434
|
-
(n = e.value.gateways) == null || n.splice(
|
436
|
+
(n = e.value.gateways) == null || n.splice(d, 1), i.onUpdate(e.value);
|
435
437
|
}
|
436
|
-
return (
|
437
|
-
const l =
|
438
|
-
return
|
439
|
-
ref:
|
438
|
+
return (d, n) => {
|
439
|
+
const l = v("FmSelect"), u = v("FmTextField"), g = v("FmCheckbox"), V = v("FmButton"), I = v("FmForm");
|
440
|
+
return b(), x(I, {
|
441
|
+
ref: m.value,
|
440
442
|
class: "flex flex-col gap-16 w-[500px]",
|
441
|
-
onValidationSuccess: n[
|
442
|
-
const
|
443
|
-
|
443
|
+
onValidationSuccess: n[4] || (n[4] = () => {
|
444
|
+
const _ = { gateway: "Softspace", config: { packageId: a.value.packageId, uniqueId: JSON.stringify({ uniqueId: a.value.uniqueId, developerId: a.value.developerId }) } };
|
445
|
+
r.value > -1 ? e.value.gateways[r.value] = _ : (e.value.gateways || (e.value.gateways = []), e.value.gateways.push(_)), i.onUpdate(e.value);
|
444
446
|
})
|
445
447
|
}, {
|
446
|
-
default:
|
447
|
-
|
448
|
+
default: N(() => [
|
449
|
+
f(l, {
|
448
450
|
modelValue: a.value.packageId,
|
449
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
451
|
+
"onUpdate:modelValue": n[0] || (n[0] = (_) => a.value.packageId = _),
|
450
452
|
label: "Package ID",
|
451
|
-
items:
|
453
|
+
items: p.filter((_) => _.region === k(t))
|
452
454
|
}, null, 8, ["modelValue", "items"]),
|
453
|
-
|
455
|
+
f(u, {
|
454
456
|
modelValue: a.value.developerId,
|
455
|
-
"onUpdate:modelValue": n[1] || (n[1] = (
|
457
|
+
"onUpdate:modelValue": n[1] || (n[1] = (_) => a.value.developerId = _),
|
456
458
|
label: "Developer ID (MID)"
|
457
459
|
}, null, 8, ["modelValue"]),
|
458
|
-
|
460
|
+
f(u, {
|
459
461
|
modelValue: a.value.uniqueId,
|
460
|
-
"onUpdate:modelValue": n[2] || (n[2] = (
|
462
|
+
"onUpdate:modelValue": n[2] || (n[2] = (_) => a.value.uniqueId = _),
|
461
463
|
label: "Unique ID (TID)"
|
462
464
|
}, null, 8, ["modelValue"]),
|
465
|
+
f(g, {
|
466
|
+
modelValue: a.value.isUat,
|
467
|
+
"onUpdate:modelValue": n[3] || (n[3] = (_) => a.value.isUat = _),
|
468
|
+
label: "Is UAT (Test)",
|
469
|
+
value: "1"
|
470
|
+
}, null, 8, ["modelValue"]),
|
463
471
|
F("div", ce, [
|
464
|
-
|
472
|
+
r.value > -1 ? (b(), x(V, {
|
465
473
|
key: 0,
|
466
474
|
class: "flex-1",
|
467
475
|
variant: "secondary",
|
468
476
|
label: "Delete",
|
469
|
-
onclick: () => s(
|
477
|
+
onclick: () => s(r.value)
|
470
478
|
}, null, 8, ["onclick"])) : T("", !0),
|
471
|
-
|
479
|
+
f(V, {
|
472
480
|
type: "submit",
|
473
481
|
class: "flex-1",
|
474
482
|
variant: "primary",
|
@@ -480,7 +488,7 @@ const Z = /* @__PURE__ */ V({
|
|
480
488
|
}, 512);
|
481
489
|
};
|
482
490
|
}
|
483
|
-
}), ke = /* @__PURE__ */
|
491
|
+
}), ke = /* @__PURE__ */ U({
|
484
492
|
__name: "TerminalSetting",
|
485
493
|
props: {
|
486
494
|
terminalId: {
|
@@ -488,35 +496,35 @@ const Z = /* @__PURE__ */ V({
|
|
488
496
|
required: !0
|
489
497
|
}
|
490
498
|
},
|
491
|
-
setup(
|
492
|
-
const
|
499
|
+
setup(y) {
|
500
|
+
const i = y, { tab: t } = E({
|
493
501
|
tab: "information"
|
494
|
-
}), { isLoading:
|
502
|
+
}), { isLoading: p, startAsyncCall: e } = K(!0), m = J(), r = z(), a = w();
|
495
503
|
async function o(l) {
|
496
504
|
e(async () => {
|
497
505
|
try {
|
498
|
-
await
|
499
|
-
|
506
|
+
await C.updateById(
|
507
|
+
i.terminalId,
|
500
508
|
{
|
501
509
|
name: l.name,
|
502
510
|
status: l.status,
|
503
511
|
ecrs: l.ecrs ?? [],
|
504
512
|
gateways: l.gateways ?? []
|
505
513
|
}
|
506
|
-
), a.value = await
|
514
|
+
), a.value = await C.readById(i.terminalId), r.open({
|
507
515
|
type: "success",
|
508
516
|
message: "Terminal updated successfully"
|
509
517
|
});
|
510
|
-
} catch (
|
511
|
-
|
518
|
+
} catch (u) {
|
519
|
+
r.open({
|
512
520
|
type: "error",
|
513
521
|
title: "Error occurs when update terminal",
|
514
|
-
message: Q(
|
522
|
+
message: Q(u)
|
515
523
|
});
|
516
524
|
}
|
517
525
|
});
|
518
526
|
}
|
519
|
-
const
|
527
|
+
const c = [
|
520
528
|
{
|
521
529
|
label: "Information",
|
522
530
|
value: "information",
|
@@ -535,14 +543,14 @@ const Z = /* @__PURE__ */ V({
|
|
535
543
|
value: "fiuu",
|
536
544
|
icon: "payment",
|
537
545
|
render: le,
|
538
|
-
region: [
|
546
|
+
region: [S.F_COUNTRY.enum.MY, S.F_COUNTRY.enum.SG]
|
539
547
|
},
|
540
548
|
{
|
541
549
|
label: "Softspace",
|
542
550
|
value: "softspace",
|
543
551
|
icon: "payment",
|
544
552
|
render: de,
|
545
|
-
region: [
|
553
|
+
region: [S.F_COUNTRY.enum.MY, S.F_COUNTRY.enum.SG]
|
546
554
|
},
|
547
555
|
{
|
548
556
|
label: "FeedMe Terminal",
|
@@ -555,35 +563,35 @@ const Z = /* @__PURE__ */ V({
|
|
555
563
|
label: "GHL Terminal (V2)",
|
556
564
|
value: "ghl",
|
557
565
|
icon: "shopping_cart_checkout",
|
558
|
-
render:
|
566
|
+
render: ue,
|
559
567
|
onlyFor: ["POS", "KIOSK"],
|
560
|
-
region: [
|
568
|
+
region: [S.F_COUNTRY.enum.MY]
|
561
569
|
}
|
562
|
-
], s =
|
570
|
+
], s = P().currentCountry, d = Y(() => {
|
563
571
|
var l;
|
564
|
-
return (l =
|
572
|
+
return (l = c.find((u) => u.value === t.value)) == null ? void 0 : l.render;
|
565
573
|
});
|
566
574
|
async function n() {
|
567
575
|
e(async () => {
|
568
|
-
a.value = await
|
576
|
+
a.value = await C.readById(i.terminalId);
|
569
577
|
});
|
570
578
|
}
|
571
|
-
return
|
572
|
-
var
|
573
|
-
const
|
574
|
-
return
|
575
|
-
title: `Terminal (${(
|
576
|
-
loading:
|
577
|
-
onBack:
|
579
|
+
return M(n), (l, u) => {
|
580
|
+
var V;
|
581
|
+
const g = v("FmTabs");
|
582
|
+
return b(), x(H, {
|
583
|
+
title: `Terminal (${(V = a.value) == null ? void 0 : V._id})`,
|
584
|
+
loading: k(p),
|
585
|
+
onBack: k(m).back
|
578
586
|
}, {
|
579
|
-
default:
|
580
|
-
g
|
581
|
-
"model-value":
|
582
|
-
"onUpdate:modelValue":
|
587
|
+
default: N(() => [
|
588
|
+
f(g, {
|
589
|
+
"model-value": k(t),
|
590
|
+
"onUpdate:modelValue": u[0] || (u[0] = (I) => $(t) ? t.value = I : null),
|
583
591
|
class: "mb-6",
|
584
|
-
items:
|
592
|
+
items: c.filter((I) => !I.onlyFor || I.onlyFor.includes(a.value.deviceType)).filter((I) => !I.region || I.region.includes(k(s) ?? k(S.F_COUNTRY).enum.MY))
|
585
593
|
}, null, 8, ["model-value", "items"]),
|
586
|
-
|
594
|
+
k(t) ? (b(), x(j(d.value), A(L({ key: 0 }, {
|
587
595
|
terminal: a.value,
|
588
596
|
onUpdate: o
|
589
597
|
})), null, 16)) : T("", !0)
|