@feedmepos/mf-payment 0.0.0-beta.36 → 0.0.0-beta.38
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{PayoutAccount-DlS2OPwj.js → PayoutAccount-B2RkqaQ9.js} +1 -1
- package/dist/{PayoutAccount-IhMg0cdL.js → PayoutAccount-BGbBteeq.js} +1 -1
- package/dist/Terminal-CP380u7w.js +372 -0
- package/dist/{TerminalSetting-3CRuMj8l.js → TerminalSetting-DOdZk5cq.js} +103 -100
- package/dist/api/terminal/index.d.ts +2 -1
- package/dist/app.js +57 -51
- package/dist/package.json +1 -1
- package/dist/{payout-account-B8jXnkVN.js → payout-account-CfYFecy1.js} +268 -268
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/Terminal-BDDP5VT8.js +0 -339
@@ -1,12 +1,12 @@
|
|
1
|
-
import { defineComponent as b, openBlock as
|
2
|
-
import { u as
|
1
|
+
import { defineComponent as b, openBlock as F, createElementBlock as D, Fragment as _, createElementVNode as p, createTextVNode as V, toDisplayString as T, ref as y, onMounted as S, computed as M, resolveComponent as f, unref as w, createVNode as g, createBlock as I, withCtx as G, createCommentVNode as q, isRef as $, resolveDynamicComponent as P, normalizeProps as K, mergeProps as L } from "vue";
|
2
|
+
import { u as C } from "./index-Cnxt2xmc.js";
|
3
3
|
import { useRouter as N } from "vue-router";
|
4
|
-
import { t as
|
4
|
+
import { t as U } from "./index-CBFVJirn.js";
|
5
5
|
import { _ as O } from "./Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js";
|
6
6
|
import { u as j } from "./index-BgnU5ezY.js";
|
7
7
|
import { useSnackbar as E } from "@feedmepos/ui-library";
|
8
|
-
import { u as
|
9
|
-
const
|
8
|
+
import { u as A } from "./error-K1CakhA9.js";
|
9
|
+
const R = /* @__PURE__ */ b({
|
10
10
|
__name: "Information",
|
11
11
|
props: {
|
12
12
|
terminal: {
|
@@ -14,23 +14,26 @@ const A = /* @__PURE__ */ b({
|
|
14
14
|
required: !0
|
15
15
|
}
|
16
16
|
},
|
17
|
-
setup(
|
18
|
-
return (l,
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
17
|
+
setup(t) {
|
18
|
+
return (l, a) => (F(), D(_, null, [
|
19
|
+
a[0] || (a[0] = p("b", null, "Name", -1)),
|
20
|
+
V(": " + T(t.terminal.name), 1),
|
21
|
+
a[1] || (a[1] = p("br", null, null, -1)),
|
22
|
+
a[2] || (a[2] = p("b", null, "Status", -1)),
|
23
|
+
V(": " + T(t.terminal.status), 1),
|
24
|
+
a[3] || (a[3] = p("br", null, null, -1)),
|
25
|
+
a[4] || (a[4] = p("b", null, "Device ID", -1)),
|
26
|
+
V(": " + T(t.terminal.deviceId ?? "-"), 1),
|
27
|
+
a[5] || (a[5] = p("br", null, null, -1)),
|
28
|
+
a[6] || (a[6] = p("b", null, "Device Type", -1)),
|
29
|
+
V(": " + T(t.terminal.deviceType ?? "-"), 1),
|
30
|
+
a[7] || (a[7] = p("br", null, null, -1))
|
28
31
|
], 64));
|
29
32
|
}
|
30
|
-
}),
|
33
|
+
}), z = {
|
31
34
|
key: 0,
|
32
35
|
class: "flex items-center justify-center min-h-[80vh]"
|
33
|
-
},
|
36
|
+
}, H = { class: "flex mt-6 space-x-6" }, Q = /* @__PURE__ */ b({
|
34
37
|
__name: "TerminalGateway",
|
35
38
|
props: {
|
36
39
|
terminal: {
|
@@ -42,13 +45,13 @@ const A = /* @__PURE__ */ b({
|
|
42
45
|
required: !0
|
43
46
|
}
|
44
47
|
},
|
45
|
-
setup(
|
46
|
-
const { isLoading: l, startAsyncCall:
|
48
|
+
setup(t) {
|
49
|
+
const { isLoading: l, startAsyncCall: a } = C(), o = t, i = y(), c = y(), m = y(-1), e = y({
|
47
50
|
terminalId: ""
|
48
51
|
});
|
49
|
-
|
50
|
-
if (
|
51
|
-
i.value = await
|
52
|
+
S(() => {
|
53
|
+
if (a(async () => {
|
54
|
+
i.value = await U.getTerminals(o.terminal.referenceId);
|
52
55
|
}), !o.terminal.ecrs)
|
53
56
|
return;
|
54
57
|
const s = o.terminal.ecrs.findIndex((r) => r && r.gateway && r.gateway === "FeedMe");
|
@@ -60,7 +63,7 @@ const A = /* @__PURE__ */ b({
|
|
60
63
|
terminalId: u.config.terminalId
|
61
64
|
});
|
62
65
|
});
|
63
|
-
const
|
66
|
+
const n = M(() => (i.value ?? []).map((s) => ({
|
64
67
|
label: s.name ?? s._id,
|
65
68
|
value: s._id
|
66
69
|
})));
|
@@ -69,33 +72,33 @@ const A = /* @__PURE__ */ b({
|
|
69
72
|
(u = o.terminal.ecrs) == null || u.splice(s, 1), o.onUpdate(o.terminal);
|
70
73
|
}
|
71
74
|
return (s, u) => {
|
72
|
-
const r = f("FmCircularProgress"),
|
73
|
-
return w(l) ? (
|
74
|
-
|
75
|
-
])) : (
|
75
|
+
const r = f("FmCircularProgress"), v = f("FmSelect"), x = f("FmButton"), k = f("FmForm");
|
76
|
+
return w(l) ? (F(), D("div", z, [
|
77
|
+
g(r, { size: "xxl" })
|
78
|
+
])) : (F(), I(k, {
|
76
79
|
key: 1,
|
77
80
|
ref: c.value,
|
78
81
|
class: "flex flex-col gap-16 w-[500px]",
|
79
82
|
onValidationSuccess: u[1] || (u[1] = () => {
|
80
|
-
m.value > -1 ?
|
83
|
+
m.value > -1 ? t.terminal.ecrs[m.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);
|
81
84
|
})
|
82
85
|
}, {
|
83
|
-
default:
|
84
|
-
|
86
|
+
default: G(() => [
|
87
|
+
g(v, {
|
85
88
|
modelValue: e.value.terminalId,
|
86
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
89
|
+
"onUpdate:modelValue": u[0] || (u[0] = (B) => e.value.terminalId = B),
|
87
90
|
label: "Terminal ID",
|
88
|
-
items:
|
91
|
+
items: n.value
|
89
92
|
}, null, 8, ["modelValue", "items"]),
|
90
|
-
|
91
|
-
m.value > -1 ? (
|
93
|
+
p("div", H, [
|
94
|
+
m.value > -1 ? (F(), I(x, {
|
92
95
|
key: 0,
|
93
96
|
class: "flex-1",
|
94
97
|
variant: "secondary",
|
95
98
|
label: "Delete",
|
96
99
|
onclick: () => d(m.value)
|
97
|
-
}, null, 8, ["onclick"])) :
|
98
|
-
|
100
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
101
|
+
g(x, {
|
99
102
|
type: "submit",
|
100
103
|
class: "flex-1",
|
101
104
|
variant: "primary",
|
@@ -107,7 +110,7 @@ const A = /* @__PURE__ */ b({
|
|
107
110
|
}, 512));
|
108
111
|
};
|
109
112
|
}
|
110
|
-
}),
|
113
|
+
}), h = { class: "flex mt-6 space-x-6" }, J = /* @__PURE__ */ b({
|
111
114
|
__name: "FiuuGateway",
|
112
115
|
props: {
|
113
116
|
terminal: {
|
@@ -119,8 +122,8 @@ const A = /* @__PURE__ */ b({
|
|
119
122
|
required: !0
|
120
123
|
}
|
121
124
|
},
|
122
|
-
setup(
|
123
|
-
const l =
|
125
|
+
setup(t) {
|
126
|
+
const l = t, a = [
|
124
127
|
{
|
125
128
|
label: "Fiuu Malaysia",
|
126
129
|
value: "cc.feedme.payment.rms"
|
@@ -133,57 +136,57 @@ const A = /* @__PURE__ */ b({
|
|
133
136
|
label: "Fiuu Singapore",
|
134
137
|
value: "cc.feedme.payment.fiuu_sg"
|
135
138
|
}
|
136
|
-
], o =
|
139
|
+
], o = y(), i = y(-1), c = y({
|
137
140
|
packageId: "",
|
138
141
|
uniqueId: ""
|
139
142
|
});
|
140
|
-
|
143
|
+
S(() => {
|
141
144
|
if (!l.terminal.gateways)
|
142
145
|
return;
|
143
146
|
const e = l.terminal.gateways.findIndex((d) => d && d.gateway && d.gateway === "Fiuu");
|
144
147
|
if (e === -1)
|
145
148
|
return;
|
146
149
|
i.value = e;
|
147
|
-
const
|
148
|
-
|
149
|
-
packageId:
|
150
|
-
uniqueId:
|
150
|
+
const n = l.terminal.gateways.at(e);
|
151
|
+
n.gateway === "Fiuu" && n.config && (c.value = {
|
152
|
+
packageId: n.config.packageId,
|
153
|
+
uniqueId: n.config.uniqueId
|
151
154
|
});
|
152
155
|
});
|
153
156
|
async function m(e) {
|
154
|
-
var
|
155
|
-
(
|
157
|
+
var n;
|
158
|
+
(n = l.terminal.gateways) == null || n.splice(e, 1), l.onUpdate(l.terminal);
|
156
159
|
}
|
157
|
-
return (e,
|
160
|
+
return (e, n) => {
|
158
161
|
const d = f("FmSelect"), s = f("FmTextField"), u = f("FmButton"), r = f("FmForm");
|
159
|
-
return
|
162
|
+
return F(), I(r, {
|
160
163
|
ref: o.value,
|
161
164
|
class: "flex flex-col gap-16 w-[500px]",
|
162
|
-
onValidationSuccess:
|
163
|
-
i.value > -1 ?
|
165
|
+
onValidationSuccess: n[2] || (n[2] = () => {
|
166
|
+
i.value > -1 ? t.terminal.gateways[i.value] = { gateway: "Fiuu", config: c.value } : (t.terminal.gateways || (t.terminal.gateways = []), t.terminal.gateways.push({ gateway: "Fiuu", config: c.value })), l.onUpdate(t.terminal);
|
164
167
|
})
|
165
168
|
}, {
|
166
|
-
default:
|
167
|
-
|
169
|
+
default: G(() => [
|
170
|
+
g(d, {
|
168
171
|
modelValue: c.value.packageId,
|
169
|
-
"onUpdate:modelValue":
|
172
|
+
"onUpdate:modelValue": n[0] || (n[0] = (v) => c.value.packageId = v),
|
170
173
|
label: "Package ID",
|
171
|
-
items:
|
174
|
+
items: a
|
172
175
|
}, null, 8, ["modelValue"]),
|
173
|
-
|
176
|
+
g(s, {
|
174
177
|
modelValue: c.value.uniqueId,
|
175
|
-
"onUpdate:modelValue":
|
178
|
+
"onUpdate:modelValue": n[1] || (n[1] = (v) => c.value.uniqueId = v),
|
176
179
|
label: "Unique ID"
|
177
180
|
}, null, 8, ["modelValue"]),
|
178
|
-
|
179
|
-
i.value > -1 ? (
|
181
|
+
p("div", h, [
|
182
|
+
i.value > -1 ? (F(), I(u, {
|
180
183
|
key: 0,
|
181
184
|
class: "flex-1",
|
182
185
|
variant: "secondary",
|
183
186
|
label: "Delete",
|
184
187
|
onclick: () => m(i.value)
|
185
|
-
}, null, 8, ["onclick"])) :
|
186
|
-
|
188
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
189
|
+
g(u, {
|
187
190
|
type: "submit",
|
188
191
|
class: "flex-1",
|
189
192
|
variant: "primary",
|
@@ -207,16 +210,16 @@ const A = /* @__PURE__ */ b({
|
|
207
210
|
required: !0
|
208
211
|
}
|
209
212
|
},
|
210
|
-
setup(
|
211
|
-
const l =
|
213
|
+
setup(t) {
|
214
|
+
const l = t, a = y(), o = y(-1), i = y({
|
212
215
|
merchantId: "",
|
213
216
|
terminalId: "",
|
214
217
|
privateKey: ""
|
215
218
|
});
|
216
|
-
|
219
|
+
S(() => {
|
217
220
|
if (!l.terminal.ecrs)
|
218
221
|
return;
|
219
|
-
const m = l.terminal.ecrs.findIndex((
|
222
|
+
const m = l.terminal.ecrs.findIndex((n) => n && n.gateway && n.gateway === "Ghl");
|
220
223
|
if (m === -1)
|
221
224
|
return;
|
222
225
|
o.value = m;
|
@@ -232,39 +235,39 @@ const A = /* @__PURE__ */ b({
|
|
232
235
|
(e = l.terminal.ecrs) == null || e.splice(m, 1), l.onUpdate(l.terminal);
|
233
236
|
}
|
234
237
|
return (m, e) => {
|
235
|
-
const
|
236
|
-
return
|
237
|
-
ref:
|
238
|
+
const n = f("FmTextField"), d = f("FmTextarea"), s = f("FmButton"), u = f("FmForm");
|
239
|
+
return F(), I(u, {
|
240
|
+
ref: a.value,
|
238
241
|
class: "flex flex-col gap-16 w-[500px]",
|
239
242
|
onValidationSuccess: e[3] || (e[3] = () => {
|
240
|
-
o.value > -1 ?
|
243
|
+
o.value > -1 ? t.terminal.ecrs[o.value] = { gateway: "Ghl", config: i.value } : (t.terminal.ecrs || (t.terminal.ecrs = []), t.terminal.ecrs.push({ gateway: "Ghl", config: i.value })), l.onUpdate(t.terminal);
|
241
244
|
})
|
242
245
|
}, {
|
243
|
-
default:
|
244
|
-
|
246
|
+
default: G(() => [
|
247
|
+
g(n, {
|
245
248
|
modelValue: i.value.merchantId,
|
246
249
|
"onUpdate:modelValue": e[0] || (e[0] = (r) => i.value.merchantId = r),
|
247
250
|
label: "Merchant ID"
|
248
251
|
}, null, 8, ["modelValue"]),
|
249
|
-
|
252
|
+
g(n, {
|
250
253
|
modelValue: i.value.terminalId,
|
251
254
|
"onUpdate:modelValue": e[1] || (e[1] = (r) => i.value.terminalId = r),
|
252
255
|
label: "Terminal ID"
|
253
256
|
}, null, 8, ["modelValue"]),
|
254
|
-
|
257
|
+
g(d, {
|
255
258
|
modelValue: i.value.privateKey,
|
256
259
|
"onUpdate:modelValue": e[2] || (e[2] = (r) => i.value.privateKey = r),
|
257
260
|
label: "Private Key"
|
258
261
|
}, null, 8, ["modelValue"]),
|
259
|
-
|
260
|
-
o.value > -1 ? (
|
262
|
+
p("div", W, [
|
263
|
+
o.value > -1 ? (F(), I(s, {
|
261
264
|
key: 0,
|
262
265
|
class: "flex-1",
|
263
266
|
variant: "secondary",
|
264
267
|
label: "Delete",
|
265
268
|
onclick: () => c(o.value)
|
266
|
-
}, null, 8, ["onclick"])) :
|
267
|
-
|
269
|
+
}, null, 8, ["onclick"])) : q("", !0),
|
270
|
+
g(s, {
|
268
271
|
type: "submit",
|
269
272
|
class: "flex-1",
|
270
273
|
variant: "primary",
|
@@ -284,13 +287,13 @@ const A = /* @__PURE__ */ b({
|
|
284
287
|
required: !0
|
285
288
|
}
|
286
289
|
},
|
287
|
-
setup(
|
288
|
-
const l =
|
290
|
+
setup(t) {
|
291
|
+
const l = t, { tab: a } = j({
|
289
292
|
tab: "information"
|
290
|
-
}), { isLoading: o, startAsyncCall: i } =
|
291
|
-
async function
|
293
|
+
}), { isLoading: o, startAsyncCall: i } = C(!0), c = N(), m = E(), e = y();
|
294
|
+
async function n(r) {
|
292
295
|
try {
|
293
|
-
await
|
296
|
+
await U.updateById(
|
294
297
|
l.terminalId,
|
295
298
|
{
|
296
299
|
name: r.name,
|
@@ -298,15 +301,15 @@ const A = /* @__PURE__ */ b({
|
|
298
301
|
ecrs: r.ecrs ?? [],
|
299
302
|
gateways: r.gateways ?? []
|
300
303
|
}
|
301
|
-
), e.value = await
|
304
|
+
), e.value = await U.readById(l.terminalId), m.open({
|
302
305
|
type: "success",
|
303
306
|
message: "Terminal updated successfully"
|
304
307
|
});
|
305
|
-
} catch (
|
308
|
+
} catch (v) {
|
306
309
|
m.open({
|
307
310
|
type: "error",
|
308
311
|
title: "Error occurs when update terminal",
|
309
|
-
message:
|
312
|
+
message: A(v)
|
310
313
|
});
|
311
314
|
}
|
312
315
|
}
|
@@ -315,7 +318,7 @@ const A = /* @__PURE__ */ b({
|
|
315
318
|
label: "Information",
|
316
319
|
value: "information",
|
317
320
|
icon: "overview",
|
318
|
-
render:
|
321
|
+
render: R
|
319
322
|
},
|
320
323
|
{
|
321
324
|
label: "Fiuu",
|
@@ -323,18 +326,18 @@ const A = /* @__PURE__ */ b({
|
|
323
326
|
icon: "payment",
|
324
327
|
render: J
|
325
328
|
}
|
326
|
-
], s =
|
329
|
+
], s = M(() => {
|
327
330
|
var r;
|
328
|
-
return (r = d.find((
|
331
|
+
return (r = d.find((v) => v.value === a.value)) == null ? void 0 : r.render;
|
329
332
|
});
|
330
333
|
async function u() {
|
331
334
|
i(async () => {
|
332
|
-
e.value = await
|
335
|
+
e.value = await U.readById(l.terminalId), e.value.deviceType !== "TERMINAL" && d.push(
|
333
336
|
{
|
334
337
|
label: "FeedMe Terminal",
|
335
338
|
value: "terminal",
|
336
339
|
icon: "shopping_cart_checkout",
|
337
|
-
render:
|
340
|
+
render: Q
|
338
341
|
},
|
339
342
|
{
|
340
343
|
label: "GHL Terminal (V2)",
|
@@ -345,25 +348,25 @@ const A = /* @__PURE__ */ b({
|
|
345
348
|
);
|
346
349
|
});
|
347
350
|
}
|
348
|
-
return
|
351
|
+
return S(u), (r, v) => {
|
349
352
|
var k;
|
350
353
|
const x = f("FmTabs");
|
351
|
-
return
|
354
|
+
return F(), I(O, {
|
352
355
|
title: `Terminal (${(k = e.value) == null ? void 0 : k._id})`,
|
353
356
|
loading: w(o),
|
354
357
|
onBack: w(c).back
|
355
358
|
}, {
|
356
|
-
default:
|
357
|
-
|
358
|
-
"model-value": w(
|
359
|
-
"onUpdate:modelValue":
|
359
|
+
default: G(() => [
|
360
|
+
g(x, {
|
361
|
+
"model-value": w(a),
|
362
|
+
"onUpdate:modelValue": v[0] || (v[0] = (B) => $(a) ? a.value = B : null),
|
360
363
|
class: "mb-6",
|
361
364
|
items: d
|
362
365
|
}, null, 8, ["model-value"]),
|
363
|
-
w(
|
366
|
+
w(a) ? (F(), I(P(s.value), K(L({ key: 0 }, {
|
364
367
|
terminal: e.value,
|
365
|
-
onUpdate:
|
366
|
-
})), null, 16)) :
|
368
|
+
onUpdate: n
|
369
|
+
})), null, 16)) : q("", !0)
|
367
370
|
]),
|
368
371
|
_: 1
|
369
372
|
}, 8, ["title", "loading", "onBack"]);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { UpdateTerminalByIdDto, type PaginatedResult } from "@feedmepos/payment-entity";
|
1
|
+
import { FdoTerminalDeviceType, UpdateTerminalByIdDto, type PaginatedResult } from "@feedmepos/payment-entity";
|
2
2
|
import { FdoTerminal } from "@feedmepos/payment-entity";
|
3
3
|
export declare const temrinalApi: {
|
4
4
|
create(payload: {
|
@@ -7,6 +7,7 @@ export declare const temrinalApi: {
|
|
7
7
|
}): Promise<PaginatedResult<FdoTerminal>>;
|
8
8
|
read(payload: {
|
9
9
|
searchKey: string;
|
10
|
+
deviceType: FdoTerminalDeviceType | undefined;
|
10
11
|
limit: number;
|
11
12
|
cursor: string;
|
12
13
|
}): Promise<PaginatedResult<FdoTerminal>>;
|
package/dist/app.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { createRouter as
|
2
|
-
import { computed as
|
1
|
+
import { createRouter as I, createWebHistory as P, useRouter as S } from "vue-router";
|
2
|
+
import { computed as h, watch as c, defineComponent as b, ref as w, resolveComponent as v, openBlock as _, createBlock as R, onMounted as T, onBeforeMount as g } from "vue";
|
3
3
|
import { useCoreStore as d } from "@feedmepos/mf-common";
|
4
|
-
import { defineStore as
|
4
|
+
import { defineStore as A } from "pinia";
|
5
5
|
const f = [
|
6
6
|
{
|
7
7
|
path: "/admin/payout-accounts",
|
@@ -9,7 +9,7 @@ const f = [
|
|
9
9
|
meta: {
|
10
10
|
sidebarDisplay: "Payout Accounts"
|
11
11
|
},
|
12
|
-
component: () => import("./PayoutAccount-
|
12
|
+
component: () => import("./PayoutAccount-B2RkqaQ9.js")
|
13
13
|
},
|
14
14
|
{
|
15
15
|
path: "/admin/payout-accounts/:accountId",
|
@@ -23,13 +23,13 @@ const f = [
|
|
23
23
|
meta: {
|
24
24
|
sidebarDisplay: "Terminals"
|
25
25
|
},
|
26
|
-
component: () => import("./Terminal-
|
26
|
+
component: () => import("./Terminal-CP380u7w.js")
|
27
27
|
},
|
28
28
|
{
|
29
29
|
path: "/admin/terminal/:terminalId",
|
30
30
|
name: "mf-payment-admin.terminal-setting",
|
31
31
|
props: !0,
|
32
|
-
component: () => import("./TerminalSetting-
|
32
|
+
component: () => import("./TerminalSetting-DOdZk5cq.js")
|
33
33
|
},
|
34
34
|
{
|
35
35
|
path: "/admin/terminal-transaction",
|
@@ -69,7 +69,7 @@ const f = [
|
|
69
69
|
{
|
70
70
|
path: "/payout-account",
|
71
71
|
name: "mf-payment-payout-account",
|
72
|
-
component: () => import("./PayoutAccount-
|
72
|
+
component: () => import("./PayoutAccount-BGbBteeq.js"),
|
73
73
|
meta: {
|
74
74
|
sidebarDisplay: "Payout Accounts"
|
75
75
|
}
|
@@ -104,51 +104,57 @@ const f = [
|
|
104
104
|
props: !0,
|
105
105
|
component: () => import("./SettlementTransactions-Co4ziq3a.js")
|
106
106
|
}
|
107
|
-
],
|
108
|
-
const
|
107
|
+
], C = A("iframe", () => {
|
108
|
+
const m = {
|
109
109
|
isIframe: !1
|
110
|
-
}, a =
|
110
|
+
}, a = h(() => m);
|
111
111
|
function n(r) {
|
112
|
-
|
112
|
+
m.isIframe = r;
|
113
113
|
}
|
114
114
|
return {
|
115
115
|
state: a,
|
116
116
|
init: n
|
117
117
|
};
|
118
|
-
}),
|
119
|
-
history:
|
118
|
+
}), B = I({
|
119
|
+
history: P(),
|
120
120
|
routes: [...y, ...f]
|
121
121
|
});
|
122
|
-
|
122
|
+
let u, l;
|
123
|
+
B.beforeEach(async (m) => {
|
123
124
|
const {
|
124
125
|
sessionUser: a,
|
125
126
|
currentRestaurant: n,
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
readRestaurants: u,
|
130
|
-
changeRestaurant: e
|
127
|
+
currentBusiness: r,
|
128
|
+
readRestaurants: p,
|
129
|
+
changeRestaurant: i
|
131
130
|
} = d();
|
132
|
-
return
|
133
|
-
const
|
134
|
-
var
|
135
|
-
|
131
|
+
return m.name.startsWith("mf-payment-admin") ? a.value ? !0 : (u || (u = new Promise((o) => {
|
132
|
+
const e = c(a, (t) => {
|
133
|
+
var s;
|
134
|
+
t && (e(), o(((s = a.value) == null ? void 0 : s.isInternal) ?? !1));
|
136
135
|
});
|
137
|
-
}) : !
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
136
|
+
})), u) : !r.value || !n.value ? (l || (l = Promise.all([
|
137
|
+
new Promise(async (o) => {
|
138
|
+
const e = c(r, (t) => {
|
139
|
+
t && (e(), o(!0));
|
140
|
+
});
|
141
|
+
}),
|
142
|
+
new Promise(async (o) => {
|
143
|
+
const e = c(n, (s) => {
|
144
|
+
s && (e(), o(!0));
|
145
|
+
}), t = await p();
|
146
|
+
await i(t == null ? void 0 : t.at(0));
|
147
|
+
})
|
148
|
+
]).then((o) => !0)), l) : !0;
|
143
149
|
});
|
144
|
-
const
|
150
|
+
const V = /* @__PURE__ */ b({
|
145
151
|
__name: "AppSidebar",
|
146
|
-
setup(
|
147
|
-
const a = d(), n = S(), r =
|
148
|
-
|
152
|
+
setup(m) {
|
153
|
+
const a = d(), n = S(), r = w(n.currentRoute.value.name);
|
154
|
+
c(n.currentRoute, () => {
|
149
155
|
r.value = n.currentRoute.value.name;
|
150
156
|
});
|
151
|
-
const
|
157
|
+
const p = y.map((e) => {
|
152
158
|
var t;
|
153
159
|
if ((t = e.meta) != null && t.sidebarDisplay)
|
154
160
|
return {
|
@@ -159,7 +165,7 @@ const B = /* @__PURE__ */ h({
|
|
159
165
|
return n.push({ name: e.name });
|
160
166
|
}
|
161
167
|
};
|
162
|
-
}).filter((e) => !!e),
|
168
|
+
}).filter((e) => !!e), i = f.map((e) => {
|
163
169
|
var t;
|
164
170
|
if ((t = e.meta) != null && t.sidebarDisplay)
|
165
171
|
return {
|
@@ -170,9 +176,9 @@ const B = /* @__PURE__ */ h({
|
|
170
176
|
return n.push({ name: e.name });
|
171
177
|
}
|
172
178
|
};
|
173
|
-
}).filter((e) => !!e),
|
179
|
+
}).filter((e) => !!e), o = h(() => {
|
174
180
|
var t;
|
175
|
-
const e = [...
|
181
|
+
const e = [...p];
|
176
182
|
return (t = a.sessionUser.value) != null && t.isInternal && (e.push({
|
177
183
|
label: "",
|
178
184
|
value: "divider",
|
@@ -182,29 +188,29 @@ const B = /* @__PURE__ */ h({
|
|
182
188
|
icon: "admin_panel_settings",
|
183
189
|
value: "divider",
|
184
190
|
disabled: !0
|
185
|
-
}), e.push(...
|
191
|
+
}), e.push(...i)), e;
|
186
192
|
});
|
187
193
|
return (e, t) => {
|
188
|
-
const
|
189
|
-
return _(), R(
|
194
|
+
const s = v("FmCollapsibleTabs");
|
195
|
+
return _(), R(s, {
|
190
196
|
modelValue: r.value,
|
191
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
192
|
-
items:
|
197
|
+
"onUpdate:modelValue": t[0] || (t[0] = (D) => r.value = D),
|
198
|
+
items: o.value,
|
193
199
|
class: "py-16 px-8"
|
194
200
|
}, null, 8, ["modelValue", "items"]);
|
195
201
|
};
|
196
202
|
}
|
197
|
-
}), F = /* @__PURE__ */
|
203
|
+
}), F = /* @__PURE__ */ b({
|
198
204
|
__name: "App",
|
199
|
-
setup(
|
200
|
-
const { state: a } =
|
201
|
-
return
|
205
|
+
setup(m) {
|
206
|
+
const { state: a } = C(), n = d();
|
207
|
+
return T(() => {
|
202
208
|
a.isIframe && parent.postMessage({ event: "ready" }, "*");
|
203
|
-
}),
|
204
|
-
n.registerSidebarComponent(
|
205
|
-
}), (r,
|
206
|
-
const
|
207
|
-
return _(), R(
|
209
|
+
}), g(() => {
|
210
|
+
n.registerSidebarComponent(V);
|
211
|
+
}), (r, p) => {
|
212
|
+
const i = v("RouterView");
|
213
|
+
return _(), R(i);
|
208
214
|
};
|
209
215
|
}
|
210
216
|
}), M = [
|