@feedmepos/mf-payment 1.1.6 → 1.1.7-beta.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/{PayoutAccount-CBGLfBag.js → PayoutAccount-CTGMi_PX.js} +5 -5
- package/dist/{PayoutAccount-Bl2-Th-5.js → PayoutAccount-CmdOJR3H.js} +3 -3
- package/dist/{PayoutAccountSetting-DiMwWLwY.js → PayoutAccountSetting-CjrCD_d1.js} +3 -3
- package/dist/{Restaurant-CdB7D9zA.js → Restaurant-OdusOWQW.js} +4 -4
- package/dist/{RestaurantSetting-CQyXjYux.js → RestaurantSetting-Ex1C9Sm0.js} +3 -3
- package/dist/{Settlement-7WRCiiQ4.js → Settlement-B7HpwvU5.js} +3 -3
- package/dist/Settlement-BzqXBGs7.js +194 -0
- package/dist/{SettlementTransactions-CymvVBh8.js → SettlementTransactions--0nVkfix.js} +3 -3
- package/dist/{SettlementTransactions-B1dUvxhz.js → SettlementTransactions-Can9YWKo.js} +3 -3
- package/dist/{Terminal-DRKD8BO1.js → Terminal-Bk9PaUWE.js} +6 -6
- package/dist/TerminalSetting-DY91cG8K.js +489 -0
- package/dist/{Transaction-DcQQ_4ku.js → Transaction-4VcaNM-I.js} +6 -6
- package/dist/{Transaction-DQQI8kOT.js → Transaction-B0mm21J6.js} +52 -47
- package/dist/{TransactionOld-DJJIQo-i.js → TransactionOld-BBjyfmEP.js} +5 -5
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-C_3J1G8_.js → TransactionTable.vue_vue_type_script_setup_true_lang-CFxM2Kdo.js} +7 -3
- package/dist/api/terminal/index.d.ts +4 -0
- package/dist/api/transaction/index.d.ts +1 -1
- package/dist/{app-B1ZoKtpx.js → app-BqfjZZ5M.js} +382 -380
- package/dist/app.d.ts +2 -0
- package/dist/app.js +1 -1
- package/dist/{assets-ZXvnCE72.js → assets-Dt65qI3E.js} +80 -73
- package/dist/{grafana-tSaEG-rZ.js → grafana-DYfiInW0.js} +7 -7
- package/dist/{index-D1dXyrdm.js → index-BLk57IkI.js} +1 -1
- package/dist/{index-DQcz6kdU.js → index-CLm4m9aq.js} +2 -2
- package/dist/{index-kEMG4SWc.js → index-Cg9oAjSw.js} +1 -1
- package/dist/{index-DEEbas1_.js → index-CqPoOkrc.js} +1 -1
- package/dist/{index-DlvE9K3G.js → index-DUS0JnIE.js} +9 -1
- package/dist/{index-CGBOgV3E.js → index-OxQY2Y3u.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CwHVO04q.js → index.vue_vue_type_script_setup_true_lang-Bp8Y1T2v.js} +1 -1
- package/dist/model/transaction.d.ts +3 -0
- package/dist/package.json +1 -1
- package/dist/{payout-account-BtTgqm7Q.js → payout-account-7HSkCqOD.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +87 -0
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +87 -0
- package/package.json +1 -1
- package/dist/Settlement-BA09mDyG.js +0 -218
- package/dist/TerminalSetting-DUVbknAn.js +0 -389
@@ -0,0 +1,489 @@
|
|
1
|
+
import { defineComponent as S, openBlock as w, createElementBlock as C, Fragment as N, createElementVNode as F, createTextVNode as U, toDisplayString as M, toRef as R, ref as _, watch as B, onMounted as O, computed as K, resolveComponent as v, unref as I, createVNode as b, createBlock as k, withCtx as G, createCommentVNode as V, isRef as P, resolveDynamicComponent as Y, normalizeProps as $, mergeProps as j } from "vue";
|
2
|
+
import { u as D, e as x } from "./index-CLm4m9aq.js";
|
3
|
+
import { useRouter as H } from "vue-router";
|
4
|
+
import { t as q } from "./index-DUS0JnIE.js";
|
5
|
+
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
+
import { u as L } from "./index-CqPoOkrc.js";
|
7
|
+
import { useSnackbar as E } from "@feedmepos/ui-library";
|
8
|
+
import { u as J } from "./error-K1CakhA9.js";
|
9
|
+
import { z as W, a as X } from "./validator-D5jtpt9A.js";
|
10
|
+
import { useCoreStore as h } from "@feedmepos/mf-common";
|
11
|
+
const Z = /* @__PURE__ */ S({
|
12
|
+
__name: "Information",
|
13
|
+
props: {
|
14
|
+
terminal: {
|
15
|
+
type: Object,
|
16
|
+
required: !0
|
17
|
+
}
|
18
|
+
},
|
19
|
+
setup(f) {
|
20
|
+
return (s, e) => (w(), C(N, null, [
|
21
|
+
e[0] || (e[0] = F("b", null, "Name", -1)),
|
22
|
+
U(": " + M(f.terminal.name), 1),
|
23
|
+
e[1] || (e[1] = F("br", null, null, -1)),
|
24
|
+
e[2] || (e[2] = F("b", null, "Status", -1)),
|
25
|
+
U(": " + M(f.terminal.status), 1),
|
26
|
+
e[3] || (e[3] = F("br", null, null, -1)),
|
27
|
+
e[4] || (e[4] = F("b", null, "Device ID", -1)),
|
28
|
+
U(": " + M(f.terminal.deviceId ?? "-"), 1),
|
29
|
+
e[5] || (e[5] = F("br", null, null, -1)),
|
30
|
+
e[6] || (e[6] = F("b", null, "Device Type", -1)),
|
31
|
+
U(": " + M(f.terminal.deviceType ?? "-"), 1),
|
32
|
+
e[7] || (e[7] = F("br", null, null, -1))
|
33
|
+
], 64));
|
34
|
+
}
|
35
|
+
}), ee = {
|
36
|
+
key: 0,
|
37
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
38
|
+
}, ae = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ S({
|
39
|
+
__name: "TerminalGateway",
|
40
|
+
props: {
|
41
|
+
terminal: {
|
42
|
+
type: Object,
|
43
|
+
required: !0
|
44
|
+
},
|
45
|
+
onUpdate: {
|
46
|
+
type: Function,
|
47
|
+
required: !0
|
48
|
+
}
|
49
|
+
},
|
50
|
+
setup(f) {
|
51
|
+
const { isLoading: s, startAsyncCall: e } = D(), c = f, a = R(() => c.terminal), o = _(), m = _(), t = _(-1), u = _({
|
52
|
+
terminalId: ""
|
53
|
+
}), d = () => {
|
54
|
+
u.value.terminalId = "", t.value = -1;
|
55
|
+
}, l = () => {
|
56
|
+
if (e(async () => {
|
57
|
+
o.value = await q.getRestaurantTerminals(c.terminal.referenceId);
|
58
|
+
}), !c.terminal.ecrs)
|
59
|
+
return d();
|
60
|
+
const n = c.terminal.ecrs.findIndex((y) => y && y.gateway && y.gateway === "FeedMe");
|
61
|
+
if (n === -1)
|
62
|
+
return d();
|
63
|
+
t.value = n;
|
64
|
+
const i = c.terminal.ecrs.at(n);
|
65
|
+
i.gateway === "FeedMe" && i.config && (u.value = {
|
66
|
+
terminalId: i.config.terminalId
|
67
|
+
});
|
68
|
+
};
|
69
|
+
B(a, l), O(l);
|
70
|
+
const p = K(() => (o.value ?? []).map((n) => ({
|
71
|
+
label: n.name ?? n._id,
|
72
|
+
value: n._id
|
73
|
+
})));
|
74
|
+
async function r(n) {
|
75
|
+
var i;
|
76
|
+
(i = c.terminal.ecrs) == null || i.splice(n, 1), c.onUpdate(c.terminal);
|
77
|
+
}
|
78
|
+
return (n, i) => {
|
79
|
+
const y = v("FmCircularProgress"), T = v("FmSelect"), g = v("FmButton"), z = v("FmForm");
|
80
|
+
return I(s) ? (w(), C("div", ee, [
|
81
|
+
b(y, { size: "xxl" })
|
82
|
+
])) : (w(), k(z, {
|
83
|
+
key: 1,
|
84
|
+
ref: m.value,
|
85
|
+
class: "flex flex-col gap-16 w-[500px]",
|
86
|
+
onValidationSuccess: i[1] || (i[1] = () => {
|
87
|
+
t.value > -1 ? a.value.ecrs[t.value] = { gateway: "FeedMe", config: u.value } : (a.value.ecrs || (a.value.ecrs = []), a.value.ecrs.push({ gateway: "FeedMe", config: u.value })), c.onUpdate(a.value);
|
88
|
+
})
|
89
|
+
}, {
|
90
|
+
default: G(() => [
|
91
|
+
b(T, {
|
92
|
+
modelValue: u.value.terminalId,
|
93
|
+
"onUpdate:modelValue": i[0] || (i[0] = (A) => u.value.terminalId = A),
|
94
|
+
label: "Terminal ID",
|
95
|
+
items: p.value,
|
96
|
+
rules: I(W)(I(X).string())
|
97
|
+
}, null, 8, ["modelValue", "items", "rules"]),
|
98
|
+
F("div", ae, [
|
99
|
+
t.value > -1 ? (w(), k(g, {
|
100
|
+
key: 0,
|
101
|
+
class: "flex-1",
|
102
|
+
variant: "secondary",
|
103
|
+
label: "Delete",
|
104
|
+
onclick: () => r(t.value)
|
105
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
106
|
+
b(g, {
|
107
|
+
type: "submit",
|
108
|
+
class: "flex-1",
|
109
|
+
variant: "primary",
|
110
|
+
label: "Save"
|
111
|
+
})
|
112
|
+
])
|
113
|
+
]),
|
114
|
+
_: 1
|
115
|
+
}, 512));
|
116
|
+
};
|
117
|
+
}
|
118
|
+
}), ne = { class: "flex mt-6 space-x-6" }, le = /* @__PURE__ */ S({
|
119
|
+
__name: "FiuuGateway",
|
120
|
+
props: {
|
121
|
+
terminal: {
|
122
|
+
type: Object,
|
123
|
+
required: !0
|
124
|
+
},
|
125
|
+
onUpdate: {
|
126
|
+
type: Function,
|
127
|
+
required: !0
|
128
|
+
}
|
129
|
+
},
|
130
|
+
setup(f) {
|
131
|
+
const s = f, e = h().currentCountry, c = [
|
132
|
+
{
|
133
|
+
label: "Fiuu Malaysia",
|
134
|
+
value: "cc.feedme.payment.rms",
|
135
|
+
region: x.F_COUNTRY.enum.MY
|
136
|
+
},
|
137
|
+
{
|
138
|
+
label: "Fiuu Malaysia V2",
|
139
|
+
value: "cc.feedme.payment.fiuu_my",
|
140
|
+
region: x.F_COUNTRY.enum.MY
|
141
|
+
},
|
142
|
+
{
|
143
|
+
label: "Fiuu Singapore",
|
144
|
+
value: "cc.feedme.payment.fiuu_sg",
|
145
|
+
region: x.F_COUNTRY.enum.SG
|
146
|
+
}
|
147
|
+
], a = R(() => s.terminal), o = _(), m = _(-1), t = _({
|
148
|
+
packageId: "",
|
149
|
+
uniqueId: ""
|
150
|
+
}), u = () => {
|
151
|
+
t.value.uniqueId = "", t.value.packageId = "", m.value = -1;
|
152
|
+
}, d = () => {
|
153
|
+
if (!a.value.gateways)
|
154
|
+
return u();
|
155
|
+
const p = a.value.gateways.findIndex((n) => n && n.gateway && n.gateway === "Fiuu");
|
156
|
+
if (p === -1)
|
157
|
+
return u();
|
158
|
+
m.value = p;
|
159
|
+
const r = a.value.gateways.at(p);
|
160
|
+
r.gateway === "Fiuu" && r.config && (t.value = {
|
161
|
+
packageId: r.config.packageId,
|
162
|
+
uniqueId: r.config.uniqueId
|
163
|
+
});
|
164
|
+
};
|
165
|
+
B(a, d), O(d);
|
166
|
+
async function l(p) {
|
167
|
+
var r;
|
168
|
+
(r = a.value.gateways) == null || r.splice(p, 1), s.onUpdate(a.value);
|
169
|
+
}
|
170
|
+
return (p, r) => {
|
171
|
+
const n = v("FmSelect"), i = v("FmTextField"), y = v("FmButton"), T = v("FmForm");
|
172
|
+
return w(), k(T, {
|
173
|
+
ref: o.value,
|
174
|
+
class: "flex flex-col gap-16 w-[500px]",
|
175
|
+
onValidationSuccess: r[2] || (r[2] = () => {
|
176
|
+
m.value > -1 ? a.value.gateways[m.value] = { gateway: "Fiuu", config: t.value } : (a.value.gateways || (a.value.gateways = []), a.value.gateways.push({ gateway: "Fiuu", config: t.value })), s.onUpdate(a.value);
|
177
|
+
})
|
178
|
+
}, {
|
179
|
+
default: G(() => [
|
180
|
+
b(n, {
|
181
|
+
modelValue: t.value.packageId,
|
182
|
+
"onUpdate:modelValue": r[0] || (r[0] = (g) => t.value.packageId = g),
|
183
|
+
label: "Package ID",
|
184
|
+
items: c.filter((g) => g.region === I(e))
|
185
|
+
}, null, 8, ["modelValue", "items"]),
|
186
|
+
b(i, {
|
187
|
+
modelValue: t.value.uniqueId,
|
188
|
+
"onUpdate:modelValue": r[1] || (r[1] = (g) => t.value.uniqueId = g),
|
189
|
+
label: "Unique ID"
|
190
|
+
}, null, 8, ["modelValue"]),
|
191
|
+
F("div", ne, [
|
192
|
+
m.value > -1 ? (w(), k(y, {
|
193
|
+
key: 0,
|
194
|
+
class: "flex-1",
|
195
|
+
variant: "secondary",
|
196
|
+
label: "Delete",
|
197
|
+
onclick: () => l(m.value)
|
198
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
199
|
+
b(y, {
|
200
|
+
type: "submit",
|
201
|
+
class: "flex-1",
|
202
|
+
variant: "primary",
|
203
|
+
label: "Save"
|
204
|
+
})
|
205
|
+
])
|
206
|
+
]),
|
207
|
+
_: 1
|
208
|
+
}, 512);
|
209
|
+
};
|
210
|
+
}
|
211
|
+
}), oe = { class: "flex mt-6 space-x-6" }, re = /* @__PURE__ */ S({
|
212
|
+
__name: "GhlGateway",
|
213
|
+
props: {
|
214
|
+
terminal: {
|
215
|
+
type: Object,
|
216
|
+
required: !0
|
217
|
+
},
|
218
|
+
onUpdate: {
|
219
|
+
type: Function,
|
220
|
+
required: !0
|
221
|
+
}
|
222
|
+
},
|
223
|
+
setup(f) {
|
224
|
+
const s = f, e = R(() => s.terminal), c = _(), a = _(-1), o = _({
|
225
|
+
merchantId: "",
|
226
|
+
terminalId: "",
|
227
|
+
privateKey: ""
|
228
|
+
}), m = () => {
|
229
|
+
o.value.merchantId = "", o.value.terminalId = "", o.value.privateKey = "", a.value = -1;
|
230
|
+
}, t = () => {
|
231
|
+
if (!e.value.ecrs)
|
232
|
+
return m();
|
233
|
+
const d = e.value.ecrs.findIndex((p) => p && p.gateway && p.gateway === "Ghl");
|
234
|
+
if (d === -1)
|
235
|
+
return m();
|
236
|
+
a.value = d;
|
237
|
+
const l = e.value.ecrs.at(d);
|
238
|
+
l.gateway === "Ghl" && l.config && (o.value = {
|
239
|
+
merchantId: l.config.merchantId,
|
240
|
+
terminalId: l.config.terminalId,
|
241
|
+
privateKey: l.config.privateKey
|
242
|
+
});
|
243
|
+
};
|
244
|
+
B(e, t), O(t);
|
245
|
+
async function u(d) {
|
246
|
+
var l;
|
247
|
+
(l = e.value.ecrs) == null || l.splice(d, 1), s.onUpdate(e.value);
|
248
|
+
}
|
249
|
+
return (d, l) => {
|
250
|
+
const p = v("FmTextField"), r = v("FmTextarea"), n = v("FmButton"), i = v("FmForm");
|
251
|
+
return w(), k(i, {
|
252
|
+
ref: c.value,
|
253
|
+
class: "flex flex-col gap-16 w-[500px]",
|
254
|
+
onValidationSuccess: l[3] || (l[3] = () => {
|
255
|
+
a.value > -1 ? e.value.ecrs[a.value] = { gateway: "Ghl", config: o.value } : (e.value.ecrs || (e.value.ecrs = []), e.value.ecrs.push({ gateway: "Ghl", config: o.value })), s.onUpdate(e.value);
|
256
|
+
})
|
257
|
+
}, {
|
258
|
+
default: G(() => [
|
259
|
+
b(p, {
|
260
|
+
modelValue: o.value.merchantId,
|
261
|
+
"onUpdate:modelValue": l[0] || (l[0] = (y) => o.value.merchantId = y),
|
262
|
+
label: "Merchant ID"
|
263
|
+
}, null, 8, ["modelValue"]),
|
264
|
+
b(p, {
|
265
|
+
modelValue: o.value.terminalId,
|
266
|
+
"onUpdate:modelValue": l[1] || (l[1] = (y) => o.value.terminalId = y),
|
267
|
+
label: "Terminal ID"
|
268
|
+
}, null, 8, ["modelValue"]),
|
269
|
+
b(r, {
|
270
|
+
modelValue: o.value.privateKey,
|
271
|
+
"onUpdate:modelValue": l[2] || (l[2] = (y) => o.value.privateKey = y),
|
272
|
+
label: "Private Key"
|
273
|
+
}, null, 8, ["modelValue"]),
|
274
|
+
F("div", oe, [
|
275
|
+
a.value > -1 ? (w(), k(n, {
|
276
|
+
key: 0,
|
277
|
+
class: "flex-1",
|
278
|
+
variant: "secondary",
|
279
|
+
label: "Delete",
|
280
|
+
onclick: () => u(a.value)
|
281
|
+
}, null, 8, ["onclick"])) : V("", !0),
|
282
|
+
b(n, {
|
283
|
+
type: "submit",
|
284
|
+
class: "flex-1",
|
285
|
+
variant: "primary",
|
286
|
+
label: "Save"
|
287
|
+
})
|
288
|
+
])
|
289
|
+
]),
|
290
|
+
_: 1
|
291
|
+
}, 512);
|
292
|
+
};
|
293
|
+
}
|
294
|
+
}), ue = { key: 0 }, se = { class: "mt-6 space-x-6" }, ie = /* @__PURE__ */ S({
|
295
|
+
__name: "KioskMode",
|
296
|
+
props: {
|
297
|
+
terminal: {
|
298
|
+
type: Object,
|
299
|
+
required: !0
|
300
|
+
}
|
301
|
+
},
|
302
|
+
setup(f) {
|
303
|
+
const { isLoading: s, startAsyncCall: e } = D(!1), c = E(), a = _({
|
304
|
+
enable: !1,
|
305
|
+
password: []
|
306
|
+
}), o = f;
|
307
|
+
function m() {
|
308
|
+
return a.value.enable && a.value.password.filter((t) => !!t).length !== 6 ? c.open({
|
309
|
+
type: "error",
|
310
|
+
message: "Unlock PIN is required when setting up kiosk mode for terminal."
|
311
|
+
}) : e(() => {
|
312
|
+
const t = { enable: a.value.enable };
|
313
|
+
return t.enable && Object.assign(t, {
|
314
|
+
password: a.value.password.join("")
|
315
|
+
}), q.kioskModeRequest(o.terminal._id, t);
|
316
|
+
});
|
317
|
+
}
|
318
|
+
return (t, u) => {
|
319
|
+
const d = v("FmSwitch"), l = v("FmPinField"), p = v("FmButton");
|
320
|
+
return w(), C(N, null, [
|
321
|
+
b(d, {
|
322
|
+
modelValue: a.value.enable,
|
323
|
+
"onUpdate:modelValue": u[0] || (u[0] = (r) => a.value.enable = r),
|
324
|
+
label: "Enable Kiosk Mode?"
|
325
|
+
}, null, 8, ["modelValue"]),
|
326
|
+
a.value.enable ? (w(), C("div", ue, [
|
327
|
+
u[2] || (u[2] = F("p", { class: "mt-6" }, "Unlock PIN: ", -1)),
|
328
|
+
b(l, {
|
329
|
+
modelValue: a.value.password,
|
330
|
+
"onUpdate:modelValue": u[1] || (u[1] = (r) => a.value.password = r)
|
331
|
+
}, null, 8, ["modelValue"])
|
332
|
+
])) : V("", !0),
|
333
|
+
F("div", se, [
|
334
|
+
b(p, {
|
335
|
+
variant: "primary",
|
336
|
+
label: "Send",
|
337
|
+
icon: "send",
|
338
|
+
loading: I(s),
|
339
|
+
onclick: m
|
340
|
+
}, null, 8, ["loading"])
|
341
|
+
])
|
342
|
+
], 64);
|
343
|
+
};
|
344
|
+
}
|
345
|
+
}), me = /* @__PURE__ */ S({
|
346
|
+
__name: "SettingRequest",
|
347
|
+
props: {
|
348
|
+
terminal: {
|
349
|
+
type: Object,
|
350
|
+
required: !0
|
351
|
+
}
|
352
|
+
},
|
353
|
+
setup(f) {
|
354
|
+
const { settingTab: s } = L({
|
355
|
+
settingTab: "kiosk_mode"
|
356
|
+
}), e = [
|
357
|
+
{
|
358
|
+
label: "Kiosk Mode",
|
359
|
+
value: "kiosk_mode",
|
360
|
+
render: ie
|
361
|
+
}
|
362
|
+
], c = f, a = K(() => e.find((o) => o.value === s.value));
|
363
|
+
return (o, m) => {
|
364
|
+
var u;
|
365
|
+
const t = v("FmTabs");
|
366
|
+
return w(), C(N, null, [
|
367
|
+
m[1] || (m[1] = F("p", { className: "mt-1 my-6 text-gray-600" }, [
|
368
|
+
F("b", null, "Note: "),
|
369
|
+
U(" Setting request will perform remotely without caching so make sure terminal is connected to the network also to our websocket as well. ")
|
370
|
+
], -1)),
|
371
|
+
b(t, {
|
372
|
+
"model-value": I(s),
|
373
|
+
"onUpdate:modelValue": m[0] || (m[0] = (d) => P(s) ? s.value = d : null),
|
374
|
+
class: "mb-6",
|
375
|
+
items: e
|
376
|
+
}, null, 8, ["model-value"]),
|
377
|
+
I(s) ? (w(), k(Y((u = a.value) == null ? void 0 : u.render), $(j({ key: 0 }, { terminal: c.terminal })), null, 16)) : V("", !0)
|
378
|
+
], 64);
|
379
|
+
};
|
380
|
+
}
|
381
|
+
}), Ie = /* @__PURE__ */ S({
|
382
|
+
__name: "TerminalSetting",
|
383
|
+
props: {
|
384
|
+
terminalId: {
|
385
|
+
type: String,
|
386
|
+
required: !0
|
387
|
+
}
|
388
|
+
},
|
389
|
+
setup(f) {
|
390
|
+
const s = f, { tab: e } = L({
|
391
|
+
tab: "information"
|
392
|
+
}), { isLoading: c, startAsyncCall: a } = D(!0), o = H(), m = E(), t = _();
|
393
|
+
async function u(n) {
|
394
|
+
a(async () => {
|
395
|
+
try {
|
396
|
+
await q.updateById(
|
397
|
+
s.terminalId,
|
398
|
+
{
|
399
|
+
name: n.name,
|
400
|
+
status: n.status,
|
401
|
+
ecrs: n.ecrs ?? [],
|
402
|
+
gateways: n.gateways ?? []
|
403
|
+
}
|
404
|
+
), t.value = await q.readById(s.terminalId), m.open({
|
405
|
+
type: "success",
|
406
|
+
message: "Terminal updated successfully"
|
407
|
+
});
|
408
|
+
} catch (i) {
|
409
|
+
m.open({
|
410
|
+
type: "error",
|
411
|
+
title: "Error occurs when update terminal",
|
412
|
+
message: J(i)
|
413
|
+
});
|
414
|
+
}
|
415
|
+
});
|
416
|
+
}
|
417
|
+
const d = [
|
418
|
+
{
|
419
|
+
label: "Information",
|
420
|
+
value: "information",
|
421
|
+
icon: "overview",
|
422
|
+
render: Z
|
423
|
+
},
|
424
|
+
{
|
425
|
+
label: "Setting Request",
|
426
|
+
value: "settings",
|
427
|
+
icon: "settings",
|
428
|
+
render: me,
|
429
|
+
onlyFor: ["TERMINAL"]
|
430
|
+
},
|
431
|
+
{
|
432
|
+
label: "Fiuu",
|
433
|
+
value: "fiuu",
|
434
|
+
icon: "payment",
|
435
|
+
render: le,
|
436
|
+
region: [x.F_COUNTRY.enum.MY, x.F_COUNTRY.enum.SG]
|
437
|
+
},
|
438
|
+
{
|
439
|
+
label: "FeedMe Terminal",
|
440
|
+
value: "terminal",
|
441
|
+
icon: "shopping_cart_checkout",
|
442
|
+
render: te,
|
443
|
+
onlyFor: ["POS", "KIOSK"]
|
444
|
+
},
|
445
|
+
{
|
446
|
+
label: "GHL Terminal (V2)",
|
447
|
+
value: "ghl",
|
448
|
+
icon: "shopping_cart_checkout",
|
449
|
+
render: re,
|
450
|
+
onlyFor: ["POS", "KIOSK"],
|
451
|
+
region: [x.F_COUNTRY.enum.MY]
|
452
|
+
}
|
453
|
+
], l = h().currentCountry, p = K(() => {
|
454
|
+
var n;
|
455
|
+
return (n = d.find((i) => i.value === e.value)) == null ? void 0 : n.render;
|
456
|
+
});
|
457
|
+
async function r() {
|
458
|
+
a(async () => {
|
459
|
+
t.value = await q.readById(s.terminalId);
|
460
|
+
});
|
461
|
+
}
|
462
|
+
return O(r), (n, i) => {
|
463
|
+
var T;
|
464
|
+
const y = v("FmTabs");
|
465
|
+
return w(), k(Q, {
|
466
|
+
title: `Terminal (${(T = t.value) == null ? void 0 : T._id})`,
|
467
|
+
loading: I(c),
|
468
|
+
onBack: I(o).back
|
469
|
+
}, {
|
470
|
+
default: G(() => [
|
471
|
+
b(y, {
|
472
|
+
"model-value": I(e),
|
473
|
+
"onUpdate:modelValue": i[0] || (i[0] = (g) => P(e) ? e.value = g : null),
|
474
|
+
class: "mb-6",
|
475
|
+
items: d.filter((g) => !g.onlyFor || g.onlyFor.includes(t.value.deviceType)).filter((g) => !g.region || g.region.includes(I(l) ?? I(x.F_COUNTRY).enum.MY))
|
476
|
+
}, null, 8, ["model-value", "items"]),
|
477
|
+
I(e) ? (w(), k(Y(p.value), $(j({ key: 0 }, {
|
478
|
+
terminal: t.value,
|
479
|
+
onUpdate: u
|
480
|
+
})), null, 16)) : V("", !0)
|
481
|
+
]),
|
482
|
+
_: 1
|
483
|
+
}, 8, ["title", "loading", "onBack"]);
|
484
|
+
};
|
485
|
+
}
|
486
|
+
});
|
487
|
+
export {
|
488
|
+
Ie as default
|
489
|
+
};
|
@@ -1,16 +1,16 @@
|
|
1
1
|
import { defineComponent as B, ref as g, watch as E, computed as I, onMounted as J, resolveComponent as y, openBlock as v, createElementBlock as P, Fragment as Y, unref as t, createBlock as N, createCommentVNode as O, withCtx as T, createVNode as i, renderList as k, createElementVNode as V, isRef as b } from "vue";
|
2
|
-
import { t as L, b as G } from "./assets-
|
3
|
-
import { u as K, _ as C } from "./index-
|
4
|
-
import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-
|
2
|
+
import { t as L, b as G } from "./assets-Dt65qI3E.js";
|
3
|
+
import { u as K, _ as C } from "./index-CLm4m9aq.js";
|
4
|
+
import { _ as Q } from "./TransactionTable.vue_vue_type_script_setup_true_lang-CFxM2Kdo.js";
|
5
5
|
import { h as $ } from "./moment-h96o7c8I.js";
|
6
6
|
import { useI18n as j, useCoreStore as q } from "@feedmepos/mf-common";
|
7
7
|
import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
|
-
import { u as W } from "./index-
|
8
|
+
import { u as W } from "./index-CqPoOkrc.js";
|
9
9
|
import { _ as X } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
10
10
|
import { _ as Z } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
|
11
11
|
import { _ as ee } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
12
|
-
import { p as te } from "./index-
|
13
|
-
import { t as ae } from "./index-
|
12
|
+
import { p as te } from "./index-Cg9oAjSw.js";
|
13
|
+
import { t as ae } from "./index-DUS0JnIE.js";
|
14
14
|
const ne = /* @__PURE__ */ B({
|
15
15
|
__name: "SourceSelector",
|
16
16
|
props: {
|