@feedmepos/mf-mdm 1.6.7-beta.231 → 1.6.7-beta.232
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as Ne, resolveComponent as I, openBlock as p, createElementBlock as g, createElementVNode as
|
|
2
|
-
import { b as An, C as Dn, r as Wt, h as nt, c as xn, w as zn, e as Nn, S as Pn, x as Un, F as Ln, u as an, y as
|
|
1
|
+
import { defineComponent as Ne, resolveComponent as I, openBlock as p, createElementBlock as g, createElementVNode as r, toDisplayString as h, unref as a, createVNode as f, computed as Q, ref as N, watch as je, onMounted as mt, createBlock as V, isRef as nn, createSlots as On, withCtx as k, createCommentVNode as C, Fragment as oe, renderList as me, normalizeClass as on, withModifiers as Rt, nextTick as sn, createTextVNode as Ct, Teleport as Sn, h as Z } from "vue";
|
|
2
|
+
import { b as An, C as Dn, r as Wt, h as nt, c as xn, w as zn, e as Nn, S as Pn, x as Un, F as Ln, u as an, y as X, z as Mn, A as J, B as Tt, D as we, G as pt, H as ln, I as lt, v as Bn } from "./index-b553bf22.js";
|
|
3
3
|
import { useI18n as Se, useCoreStore as ft } from "@feedmepos/mf-common";
|
|
4
4
|
import { useProxiedModel as dt, useSnackbar as qe, SnackbarPosition as W, useBreakpoints as Ot, useDialog as St, useDialogChild as rn, components as $e } from "@feedmepos/ui-library";
|
|
5
5
|
import { storeToRefs as $n } from "pinia";
|
|
@@ -23,7 +23,7 @@ const Vn = { class: "flex flex-col gap-16" }, jn = { class: "fm-typo-en-body-md-
|
|
|
23
23
|
},
|
|
24
24
|
setup(e) {
|
|
25
25
|
const { t } = Se(), o = dt(e, "otp"), s = qe(), c = async (d) => {
|
|
26
|
-
const
|
|
26
|
+
const i = "text/plain", v = new Blob([d], { type: i }), y = [new ClipboardItem({ [i]: v })];
|
|
27
27
|
await navigator.clipboard.write(y).then(() => {
|
|
28
28
|
s.open({
|
|
29
29
|
message: t("device.otp.otpCopiedMessage"),
|
|
@@ -32,17 +32,17 @@ const Vn = { class: "flex flex-col gap-16" }, jn = { class: "fm-typo-en-body-md-
|
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
|
-
return (d,
|
|
36
|
-
const
|
|
35
|
+
return (d, i) => {
|
|
36
|
+
const v = I("FmCircularProgress");
|
|
37
37
|
return p(), g("div", Vn, [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
r("div", jn, h(a(t)("device.otp.otpExpiryMessage")), 1),
|
|
39
|
+
a(o) ? (p(), g("div", qn, [
|
|
40
|
+
r("div", {
|
|
41
41
|
class: "fm-typo-en-title-md-800 tracking-[0.3rem] cursor-pointer hover:text-fm-color-neutral-gray-300",
|
|
42
|
-
onClick:
|
|
43
|
-
}, h(
|
|
42
|
+
onClick: i[0] || (i[0] = (y) => c(a(o)))
|
|
43
|
+
}, h(a(o)), 1)
|
|
44
44
|
])) : (p(), g("div", Hn, [
|
|
45
|
-
f(
|
|
45
|
+
f(v, { size: "lg" })
|
|
46
46
|
]))
|
|
47
47
|
]);
|
|
48
48
|
};
|
|
@@ -156,10 +156,10 @@ function oo(e) {
|
|
|
156
156
|
function so() {
|
|
157
157
|
return new H(q.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + un + "' property when initializing the app?");
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function ao() {
|
|
160
160
|
return new H(q.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function io() {
|
|
163
163
|
return new H(q.NO_DOWNLOAD_URL, "The given file does not have any download URLs.");
|
|
164
164
|
}
|
|
165
165
|
function lo(e) {
|
|
@@ -230,12 +230,12 @@ class le {
|
|
|
230
230
|
function c(E) {
|
|
231
231
|
E.path.charAt(E.path.length - 1) === "/" && (E.path_ = E.path_.slice(0, -1));
|
|
232
232
|
}
|
|
233
|
-
const d = "(/(.*))?$",
|
|
233
|
+
const d = "(/(.*))?$", i = new RegExp("^gs://" + s + d, "i"), v = { bucket: 1, path: 3 };
|
|
234
234
|
function y(E) {
|
|
235
235
|
E.path_ = decodeURIComponent(E.path);
|
|
236
236
|
}
|
|
237
237
|
const F = "v[A-Za-z0-9_]+", A = n.replace(/[.]/g, "\\."), x = "(/([^?#]*).*)?$", D = new RegExp(`^https?://${A}/${F}/b/${s}/o${x}`, "i"), S = { bucket: 1, path: 3 }, P = n === cn ? "(?:storage.googleapis.com|storage.cloud.google.com)" : n, L = "([^?#]*)", j = new RegExp(`^https?://${P}/${s}/${L}`, "i"), O = [
|
|
238
|
-
{ regex:
|
|
238
|
+
{ regex: i, indices: v, postModify: c },
|
|
239
239
|
{
|
|
240
240
|
regex: D,
|
|
241
241
|
indices: S,
|
|
@@ -251,8 +251,8 @@ class le {
|
|
|
251
251
|
const T = O[E], U = T.regex.exec(t);
|
|
252
252
|
if (U) {
|
|
253
253
|
const se = U[T.indices.bucket];
|
|
254
|
-
let
|
|
255
|
-
|
|
254
|
+
let $ = U[T.indices.path];
|
|
255
|
+
$ || ($ = ""), o = new le(se, $), T.postModify(o);
|
|
256
256
|
break;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
@@ -290,9 +290,9 @@ class co {
|
|
|
290
290
|
* limitations under the License.
|
|
291
291
|
*/
|
|
292
292
|
function uo(e, t, n) {
|
|
293
|
-
let o = 1, s = null, c = null, d = !1,
|
|
294
|
-
function
|
|
295
|
-
return
|
|
293
|
+
let o = 1, s = null, c = null, d = !1, i = 0;
|
|
294
|
+
function v() {
|
|
295
|
+
return i === 2;
|
|
296
296
|
}
|
|
297
297
|
let y = !1;
|
|
298
298
|
function F(...L) {
|
|
@@ -300,7 +300,7 @@ function uo(e, t, n) {
|
|
|
300
300
|
}
|
|
301
301
|
function A(L) {
|
|
302
302
|
s = setTimeout(() => {
|
|
303
|
-
s = null, e(D,
|
|
303
|
+
s = null, e(D, v());
|
|
304
304
|
}, L);
|
|
305
305
|
}
|
|
306
306
|
function x() {
|
|
@@ -315,17 +315,17 @@ function uo(e, t, n) {
|
|
|
315
315
|
x(), F.call(null, L, ...j);
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
|
-
if (
|
|
318
|
+
if (v() || d) {
|
|
319
319
|
x(), F.call(null, L, ...j);
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
322
|
o < 64 && (o *= 2);
|
|
323
323
|
let O;
|
|
324
|
-
|
|
324
|
+
i === 1 ? (i = 2, O = 0) : O = (o + Math.random()) * 1e3, A(O);
|
|
325
325
|
}
|
|
326
326
|
let S = !1;
|
|
327
327
|
function P(L) {
|
|
328
|
-
S || (S = !0, x(), !y && (s !== null ? (L || (
|
|
328
|
+
S || (S = !0, x(), !y && (s !== null ? (L || (i = 2), clearTimeout(s), A(0)) : L || (i = 1)));
|
|
329
329
|
}
|
|
330
330
|
return A(0), c = setTimeout(() => {
|
|
331
331
|
d = !0, P(!0);
|
|
@@ -462,9 +462,9 @@ function ho(e, t) {
|
|
|
462
462
|
* See the License for the specific language governing permissions and
|
|
463
463
|
* limitations under the License.
|
|
464
464
|
*/
|
|
465
|
-
class
|
|
466
|
-
constructor(t, n, o, s, c, d,
|
|
467
|
-
this.url_ = t, this.method_ = n, this.headers_ = o, this.body_ = s, this.successCodes_ = c, this.additionalRetryCodes_ = d, this.callback_ =
|
|
465
|
+
class vo {
|
|
466
|
+
constructor(t, n, o, s, c, d, i, v, y, F, A, x = !0) {
|
|
467
|
+
this.url_ = t, this.method_ = n, this.headers_ = o, this.body_ = s, this.successCodes_ = c, this.additionalRetryCodes_ = d, this.callback_ = i, this.errorCallback_ = v, this.timeout_ = y, this.progressCallback_ = F, this.connectionFactory_ = A, this.retry = x, this.pendingConnection_ = null, this.backoffId_ = null, this.canceled_ = !1, this.appDelete_ = !1, this.promise_ = new Promise((D, S) => {
|
|
468
468
|
this.resolve_ = D, this.reject_ = S, this.start_();
|
|
469
469
|
});
|
|
470
470
|
}
|
|
@@ -479,39 +479,39 @@ class _o {
|
|
|
479
479
|
}
|
|
480
480
|
const c = this.connectionFactory_();
|
|
481
481
|
this.pendingConnection_ = c;
|
|
482
|
-
const d = (
|
|
483
|
-
const
|
|
484
|
-
this.progressCallback_ !== null && this.progressCallback_(
|
|
482
|
+
const d = (i) => {
|
|
483
|
+
const v = i.loaded, y = i.lengthComputable ? i.total : -1;
|
|
484
|
+
this.progressCallback_ !== null && this.progressCallback_(v, y);
|
|
485
485
|
};
|
|
486
486
|
this.progressCallback_ !== null && c.addUploadProgressListener(d), c.send(this.url_, this.method_, this.body_, this.headers_).then(() => {
|
|
487
487
|
this.progressCallback_ !== null && c.removeUploadProgressListener(d), this.pendingConnection_ = null;
|
|
488
|
-
const
|
|
489
|
-
if (!
|
|
488
|
+
const i = c.getErrorCode() === xe.NO_ERROR, v = c.getStatus();
|
|
489
|
+
if (!i || ho(v, this.additionalRetryCodes_) && this.retry) {
|
|
490
490
|
const F = c.getErrorCode() === xe.ABORT;
|
|
491
491
|
o(!1, new rt(!1, null, F));
|
|
492
492
|
return;
|
|
493
493
|
}
|
|
494
|
-
const y = this.successCodes_.indexOf(
|
|
494
|
+
const y = this.successCodes_.indexOf(v) !== -1;
|
|
495
495
|
o(!0, new rt(y, c));
|
|
496
496
|
});
|
|
497
497
|
}, n = (o, s) => {
|
|
498
|
-
const c = this.resolve_, d = this.reject_,
|
|
498
|
+
const c = this.resolve_, d = this.reject_, i = s.connection;
|
|
499
499
|
if (s.wasSuccessCode)
|
|
500
500
|
try {
|
|
501
|
-
const
|
|
502
|
-
po(
|
|
503
|
-
} catch (
|
|
504
|
-
d(
|
|
501
|
+
const v = this.callback_(i, i.getResponse());
|
|
502
|
+
po(v) ? c(v) : c();
|
|
503
|
+
} catch (v) {
|
|
504
|
+
d(v);
|
|
505
505
|
}
|
|
506
|
-
else if (
|
|
507
|
-
const
|
|
508
|
-
|
|
506
|
+
else if (i !== null) {
|
|
507
|
+
const v = At();
|
|
508
|
+
v.serverResponse = i.getErrorText(), this.errorCallback_ ? d(this.errorCallback_(i, v)) : d(v);
|
|
509
509
|
} else if (s.canceled) {
|
|
510
|
-
const
|
|
511
|
-
d(
|
|
510
|
+
const v = this.appDelete_ ? dn() : to();
|
|
511
|
+
d(v);
|
|
512
512
|
} else {
|
|
513
|
-
const
|
|
514
|
-
d(
|
|
513
|
+
const v = eo();
|
|
514
|
+
d(v);
|
|
515
515
|
}
|
|
516
516
|
};
|
|
517
517
|
this.canceled_ ? n(!1, new rt(!1, null, !0)) : this.backoffId_ = uo(t, n, this.timeout_);
|
|
@@ -530,7 +530,7 @@ class rt {
|
|
|
530
530
|
this.wasSuccessCode = t, this.connection = n, this.canceled = !!o;
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function _o(e, t) {
|
|
534
534
|
t !== null && t.length > 0 && (e.Authorization = "Firebase " + t);
|
|
535
535
|
}
|
|
536
536
|
function go(e, t) {
|
|
@@ -543,8 +543,8 @@ function yo(e, t) {
|
|
|
543
543
|
t !== null && (e["X-Firebase-AppCheck"] = t);
|
|
544
544
|
}
|
|
545
545
|
function To(e, t, n, o, s, c, d = !0) {
|
|
546
|
-
const
|
|
547
|
-
return bo(y, t),
|
|
546
|
+
const i = mn(e.urlParams), v = e.url + i, y = Object.assign({}, e.headers);
|
|
547
|
+
return bo(y, t), _o(y, n), go(y, c), yo(y, o), new vo(v, e.method, y, e.body, e.successCodes, e.additionalRetryCodes, e.handler, e.errorHandler, e.timeout, e.progressCallback, s, d);
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
550
|
* @license
|
|
@@ -794,8 +794,8 @@ class Oe {
|
|
|
794
794
|
const s = new Uint8Array(o);
|
|
795
795
|
let c = 0;
|
|
796
796
|
return n.forEach((d) => {
|
|
797
|
-
for (let
|
|
798
|
-
s[c++] = d[
|
|
797
|
+
for (let i = 0; i < d.length; i++)
|
|
798
|
+
s[c++] = d[i];
|
|
799
799
|
}), new Oe(s, !0);
|
|
800
800
|
}
|
|
801
801
|
}
|
|
@@ -819,7 +819,7 @@ class Oe {
|
|
|
819
819
|
* See the License for the specific language governing permissions and
|
|
820
820
|
* limitations under the License.
|
|
821
821
|
*/
|
|
822
|
-
function
|
|
822
|
+
function vn(e) {
|
|
823
823
|
let t;
|
|
824
824
|
try {
|
|
825
825
|
t = JSON.parse(e);
|
|
@@ -854,7 +854,7 @@ function Do(e, t) {
|
|
|
854
854
|
const n = t.split("/").filter((o) => o.length > 0).join("/");
|
|
855
855
|
return e.length === 0 ? n : e + "/" + n;
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function _n(e) {
|
|
858
858
|
const t = e.lastIndexOf("/", e.length - 2);
|
|
859
859
|
return t === -1 ? e : e.slice(t + 1);
|
|
860
860
|
}
|
|
@@ -884,7 +884,7 @@ class ne {
|
|
|
884
884
|
}
|
|
885
885
|
let ct = null;
|
|
886
886
|
function zo(e) {
|
|
887
|
-
return !Dt(e) || e.length < 2 ? e :
|
|
887
|
+
return !Dt(e) || e.length < 2 ? e : _n(e);
|
|
888
888
|
}
|
|
889
889
|
function gn() {
|
|
890
890
|
if (ct)
|
|
@@ -920,11 +920,11 @@ function Po(e, t, n) {
|
|
|
920
920
|
return No(o, e), o;
|
|
921
921
|
}
|
|
922
922
|
function bn(e, t, n) {
|
|
923
|
-
const o =
|
|
923
|
+
const o = vn(t);
|
|
924
924
|
return o === null ? null : Po(e, o, n);
|
|
925
925
|
}
|
|
926
926
|
function Uo(e, t, n, o) {
|
|
927
|
-
const s =
|
|
927
|
+
const s = vn(t);
|
|
928
928
|
if (s === null || !Dt(s.downloadTokens))
|
|
929
929
|
return null;
|
|
930
930
|
const c = s.downloadTokens;
|
|
@@ -1002,15 +1002,15 @@ function In(e) {
|
|
|
1002
1002
|
return n;
|
|
1003
1003
|
}
|
|
1004
1004
|
function $o(e, t, n) {
|
|
1005
|
-
const o = t.fullServerUrl(), s = ht(o, e.host, e._protocol), c = "GET", d = e.maxOperationRetryTime,
|
|
1006
|
-
return
|
|
1005
|
+
const o = t.fullServerUrl(), s = ht(o, e.host, e._protocol), c = "GET", d = e.maxOperationRetryTime, i = new zt(s, c, Bo(e, n), d);
|
|
1006
|
+
return i.errorHandler = In(t), i;
|
|
1007
1007
|
}
|
|
1008
1008
|
function Vo(e, t) {
|
|
1009
1009
|
const n = t.fullServerUrl(), o = ht(n, e.host, e._protocol), s = "DELETE", c = e.maxOperationRetryTime;
|
|
1010
|
-
function d(
|
|
1010
|
+
function d(v, y) {
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1013
|
-
return
|
|
1012
|
+
const i = new zt(o, s, d, c);
|
|
1013
|
+
return i.successCodes = [200, 204], i.errorHandler = In(t), i;
|
|
1014
1014
|
}
|
|
1015
1015
|
function jo(e, t) {
|
|
1016
1016
|
return e && e.contentType || t && t.type() || "application/octet-stream";
|
|
@@ -1023,25 +1023,25 @@ function Ho(e, t, n, o, s) {
|
|
|
1023
1023
|
const c = t.bucketOnlyServerUrl(), d = {
|
|
1024
1024
|
"X-Goog-Upload-Protocol": "multipart"
|
|
1025
1025
|
};
|
|
1026
|
-
function
|
|
1026
|
+
function i() {
|
|
1027
1027
|
let O = "";
|
|
1028
1028
|
for (let E = 0; E < 2; E++)
|
|
1029
1029
|
O = O + Math.random().toString().slice(2);
|
|
1030
1030
|
return O;
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1033
|
-
d["Content-Type"] = "multipart/related; boundary=" +
|
|
1034
|
-
const y = qo(t, o, s), F = Lo(y, n), A = "--" +
|
|
1032
|
+
const v = i();
|
|
1033
|
+
d["Content-Type"] = "multipart/related; boundary=" + v;
|
|
1034
|
+
const y = qo(t, o, s), F = Lo(y, n), A = "--" + v + `\r
|
|
1035
1035
|
Content-Type: application/json; charset=utf-8\r
|
|
1036
1036
|
\r
|
|
1037
1037
|
` + F + `\r
|
|
1038
|
-
--` +
|
|
1038
|
+
--` + v + `\r
|
|
1039
1039
|
Content-Type: ` + y.contentType + `\r
|
|
1040
1040
|
\r
|
|
1041
1041
|
`, x = `\r
|
|
1042
|
-
--` +
|
|
1042
|
+
--` + v + "--", D = Oe.getBlob(A, o, x);
|
|
1043
1043
|
if (D === null)
|
|
1044
|
-
throw
|
|
1044
|
+
throw ao();
|
|
1045
1045
|
const S = { name: y.fullPath }, P = ht(c, e.host, e._protocol), L = "POST", j = e.maxUploadRetryTime, G = new zt(P, L, Mo(e, n), j);
|
|
1046
1046
|
return G.urlParams = S, G.headers = d, G.body = D.uploadData(), G.errorHandler = Tn(t), G;
|
|
1047
1047
|
}
|
|
@@ -1166,7 +1166,7 @@ class ze {
|
|
|
1166
1166
|
* For example, if fullPath is 'full/path/image.png', name is 'image.png'.
|
|
1167
1167
|
*/
|
|
1168
1168
|
get name() {
|
|
1169
|
-
return
|
|
1169
|
+
return _n(this._location.path);
|
|
1170
1170
|
}
|
|
1171
1171
|
/**
|
|
1172
1172
|
* The `StorageService` instance this `StorageReference` is associated with.
|
|
@@ -1206,7 +1206,7 @@ function Ko(e) {
|
|
|
1206
1206
|
const t = $o(e.storage, e._location, gn());
|
|
1207
1207
|
return e.storage.makeRequestWithTokens(t, Nt).then((n) => {
|
|
1208
1208
|
if (n === null)
|
|
1209
|
-
throw
|
|
1209
|
+
throw io();
|
|
1210
1210
|
return n;
|
|
1211
1211
|
});
|
|
1212
1212
|
}
|
|
@@ -1398,19 +1398,19 @@ function Jt(e = Nn(), t) {
|
|
|
1398
1398
|
const o = xn(e, wn).getImmediate({
|
|
1399
1399
|
identifier: t
|
|
1400
1400
|
}), s = zn("storage");
|
|
1401
|
-
return s &&
|
|
1401
|
+
return s && as(o, ...s), o;
|
|
1402
1402
|
}
|
|
1403
|
-
function
|
|
1403
|
+
function as(e, t, n, o = {}) {
|
|
1404
1404
|
ts(e, t, n, o);
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function is(e, { instanceIdentifier: t }) {
|
|
1407
1407
|
const n = e.getProvider("app").getImmediate(), o = e.getProvider("auth-internal"), s = e.getProvider("app-check-internal");
|
|
1408
1408
|
return new Pt(n, o, s, t, Pn);
|
|
1409
1409
|
}
|
|
1410
1410
|
function ls() {
|
|
1411
1411
|
An(new Dn(
|
|
1412
1412
|
wn,
|
|
1413
|
-
|
|
1413
|
+
is,
|
|
1414
1414
|
"PUBLIC"
|
|
1415
1415
|
/* ComponentType.PUBLIC */
|
|
1416
1416
|
).setMultipleInstances(!0)), Wt(Xt, Zt, ""), Wt(Xt, Zt, "esm2017");
|
|
@@ -1425,7 +1425,7 @@ const en = {
|
|
|
1425
1425
|
const t = Jt(), n = Qt(t, e);
|
|
1426
1426
|
await ss(n);
|
|
1427
1427
|
}
|
|
1428
|
-
}, rs = { class: "w-full flex flex-col gap-5" }, cs = { class: "flex flex-col gap-4" }, us = { class: "fm-typo-en-body-lg-400" }, ds = { class: "fm-typo-en-body-lg-600" }, ms = { class: "flex flex-col gap-4" }, ps = { class: "fm-typo-en-body-lg-400" }, fs = { class: "fm-typo-en-body-lg-600" }, hs = { class: "flex flex-col gap-4" },
|
|
1428
|
+
}, rs = { class: "w-full flex flex-col gap-5" }, cs = { class: "flex flex-col gap-4" }, us = { class: "fm-typo-en-body-lg-400" }, ds = { class: "fm-typo-en-body-lg-600" }, ms = { class: "flex flex-col gap-4" }, ps = { class: "fm-typo-en-body-lg-400" }, fs = { class: "fm-typo-en-body-lg-600" }, hs = { class: "flex flex-col gap-4" }, vs = { class: "fm-typo-en-body-lg-400" }, _s = { class: "fm-typo-en-body-lg-600" }, gs = { class: "flex flex-col gap-4" }, bs = { class: "fm-typo-en-body-lg-400" }, ys = { class: "fm-typo-en-body-lg-600" }, Ts = { class: "flex flex-col gap-4" }, Is = { class: "fm-typo-en-body-lg-400" }, Es = { class: "flex flex-row items-center gap-1" }, ws = { class: "fm-typo-en-body-lg-600" }, Fs = {
|
|
1429
1429
|
key: 0,
|
|
1430
1430
|
class: "flex flex-col gap-4"
|
|
1431
1431
|
}, Cs = { class: "fm-typo-en-body-lg-400" }, ks = { class: "fm-typo-en-body-lg-600" }, Rs = {
|
|
@@ -1455,40 +1455,40 @@ const en = {
|
|
|
1455
1455
|
}, Xs = { class: "fm-typo-en-body-lg-400" }, Zs = { class: "fm-typo-en-body-lg-600" }, Qs = {
|
|
1456
1456
|
key: 3,
|
|
1457
1457
|
class: "flex flex-col gap-4"
|
|
1458
|
-
}, Js = { class: "fm-typo-en-body-lg-400" },
|
|
1458
|
+
}, Js = { class: "fm-typo-en-body-lg-400" }, ea = { class: "fm-typo-en-body-lg-600" }, ta = {
|
|
1459
1459
|
key: 4,
|
|
1460
1460
|
class: "flex flex-col gap-4"
|
|
1461
|
-
},
|
|
1461
|
+
}, na = { class: "fm-typo-en-body-lg-400" }, oa = { class: "fm-typo-en-body-lg-600" }, sa = {
|
|
1462
1462
|
key: 0,
|
|
1463
1463
|
class: "flex flex-col gap-4"
|
|
1464
|
-
},
|
|
1464
|
+
}, aa = { class: "fm-typo-en-body-lg-400" }, ia = { class: "fm-typo-en-body-lg-600 break-words" }, la = {
|
|
1465
1465
|
key: 0,
|
|
1466
1466
|
class: "flex flex-col gap-4"
|
|
1467
|
-
},
|
|
1467
|
+
}, ra = { class: "fm-typo-en-body-lg-400" }, ca = { class: "fm-typo-en-body-lg-600 break-words" }, ua = {
|
|
1468
1468
|
key: 0,
|
|
1469
1469
|
class: "flex flex-col gap-4"
|
|
1470
|
-
},
|
|
1470
|
+
}, da = { class: "fm-typo-en-body-lg-400" }, ma = { class: "fm-typo-en-body-lg-600 break-words" }, pa = {
|
|
1471
1471
|
key: 0,
|
|
1472
1472
|
class: "flex flex-col gap-4"
|
|
1473
|
-
},
|
|
1473
|
+
}, fa = { class: "fm-typo-en-body-lg-400" }, ha = { class: "fm-typo-en-body-lg-600" }, va = {
|
|
1474
1474
|
key: 6,
|
|
1475
1475
|
class: "flex flex-col gap-8"
|
|
1476
|
-
},
|
|
1476
|
+
}, _a = { class: "fm-typo-en-title-sm-800" }, ga = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ba = {
|
|
1477
1477
|
key: 0,
|
|
1478
1478
|
class: "flex h-full justify-center items-center"
|
|
1479
|
-
},
|
|
1479
|
+
}, ya = {
|
|
1480
1480
|
key: 1,
|
|
1481
1481
|
class: "flex flex-col gap-3 flex-wrap"
|
|
1482
|
-
},
|
|
1482
|
+
}, Ta = {
|
|
1483
1483
|
key: 0,
|
|
1484
1484
|
class: "relative"
|
|
1485
|
-
},
|
|
1485
|
+
}, Ia = ["src"], Ea = { class: "absolute top-0 right-0 cursor-pointer mt-1 mr-1" }, wa = { class: "flex w-full overflow-x-hidden flex-col gap-24" }, Fa = {
|
|
1486
1486
|
key: 0,
|
|
1487
1487
|
class: "flex flex-wrap grow-0 w-auto gap-24"
|
|
1488
|
-
},
|
|
1488
|
+
}, Ca = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ka = {
|
|
1489
1489
|
key: 7,
|
|
1490
1490
|
class: "flex flex-col gap-8"
|
|
1491
|
-
},
|
|
1491
|
+
}, Ra = { class: "fm-typo-en-title-sm-600" }, Oa = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sa = { class: "flex flex-col gap-3" }, Aa = { class: "flex gap-8 items-center justify-start" }, Da = /* @__PURE__ */ Ne({
|
|
1492
1492
|
__name: "DeviceInformationSideSheet",
|
|
1493
1493
|
props: {
|
|
1494
1494
|
visible: { type: Boolean },
|
|
@@ -1497,9 +1497,9 @@ const en = {
|
|
|
1497
1497
|
formUpdated: { type: Boolean }
|
|
1498
1498
|
},
|
|
1499
1499
|
setup(e) {
|
|
1500
|
-
const { t } = Se(), { isAtMost: n } = Ot(), o = e, s = dt(o, "visible"), c = dt(o, "formUpdated"), d = ft(),
|
|
1500
|
+
const { t } = Se(), { isAtMost: n } = Ot(), o = e, s = dt(o, "visible"), c = dt(o, "formUpdated"), d = ft(), i = Q(() => d.restaurants.value), v = Q(() => d.currentBusiness.value), y = (m) => {
|
|
1501
1501
|
var z, Y;
|
|
1502
|
-
return m ? m.name ?? ((z =
|
|
1502
|
+
return m ? m.name ?? ((z = i.value.find((K) => K._id === m.restaurantId)) == null ? void 0 : z.profile.name) : o.device.name ?? ((Y = i.value.find((K) => K._id === o.device.restaurantId)) == null ? void 0 : Y.profile.name);
|
|
1503
1503
|
}, F = N({}), A = Q(() => Object.entries(F.value).filter(([, { deleted: m }]) => !m).map(([m]) => m)), x = an(), D = Q(() => x.getCustomerDisplayImages()), S = () => {
|
|
1504
1504
|
var m;
|
|
1505
1505
|
F.value = D.value.reduce((z, Y) => (z[Y.url] = {
|
|
@@ -1517,15 +1517,15 @@ const en = {
|
|
|
1517
1517
|
z >= 0 && (P.value = m[z - 1] || m[z + 1] || "");
|
|
1518
1518
|
}
|
|
1519
1519
|
const G = Q(
|
|
1520
|
-
() =>
|
|
1520
|
+
() => i.value.map((m) => m._id).every((m) => E.value.includes(m))
|
|
1521
1521
|
), O = (m) => {
|
|
1522
|
-
m ? F.value[P.value].restaurantIds =
|
|
1522
|
+
m ? F.value[P.value].restaurantIds = i.value.map((z) => z._id) : F.value[P.value].restaurantIds = [];
|
|
1523
1523
|
}, E = Q(() => F.value[P.value].restaurantIds), T = (m) => {
|
|
1524
1524
|
F.value[P.value].restaurantIds = m;
|
|
1525
1525
|
}, U = N(null), se = N(!1);
|
|
1526
|
-
async function
|
|
1526
|
+
async function $(m) {
|
|
1527
1527
|
var K;
|
|
1528
|
-
const z = `business/${(K =
|
|
1528
|
+
const z = `business/${(K = v.value) == null ? void 0 : K._id}/customer-display/${(/* @__PURE__ */ new Date()).toISOString()}`;
|
|
1529
1529
|
se.value = !0, await en.update(z, m).then((re) => {
|
|
1530
1530
|
F.value[re] = {
|
|
1531
1531
|
restaurantIds: [],
|
|
@@ -1533,9 +1533,9 @@ const en = {
|
|
|
1533
1533
|
}, P.value = re;
|
|
1534
1534
|
}), se.value = !1, await sn(), U.value.scrollIntoView(!1);
|
|
1535
1535
|
}
|
|
1536
|
-
const
|
|
1536
|
+
const ae = N(!1), ce = qe();
|
|
1537
1537
|
async function ee() {
|
|
1538
|
-
|
|
1538
|
+
ae.value = !0;
|
|
1539
1539
|
const m = Pe();
|
|
1540
1540
|
await x.updateCustomerDisplay(m).then(async () => {
|
|
1541
1541
|
ce.open({
|
|
@@ -1549,7 +1549,7 @@ const en = {
|
|
|
1549
1549
|
type: "error",
|
|
1550
1550
|
position: W.BOTTOM
|
|
1551
1551
|
});
|
|
1552
|
-
}), c.value = !0, s.value = !1, await Fe(),
|
|
1552
|
+
}), c.value = !0, s.value = !1, await Fe(), ae.value = !1;
|
|
1553
1553
|
}
|
|
1554
1554
|
function Pe() {
|
|
1555
1555
|
return {
|
|
@@ -1557,7 +1557,7 @@ const en = {
|
|
|
1557
1557
|
url: m,
|
|
1558
1558
|
restaurantIds: F.value[m].restaurantIds
|
|
1559
1559
|
})),
|
|
1560
|
-
publishRestaurants:
|
|
1560
|
+
publishRestaurants: i.value.map((m) => m._id)
|
|
1561
1561
|
};
|
|
1562
1562
|
}
|
|
1563
1563
|
async function Fe() {
|
|
@@ -1584,46 +1584,46 @@ const en = {
|
|
|
1584
1584
|
}), mt(() => {
|
|
1585
1585
|
S();
|
|
1586
1586
|
}), (m, z) => {
|
|
1587
|
-
const Y = I("FmCardHeader"), K = I("FmCardSection"), re = I("FmCard"), st = I("FmIcon"), Ue = I("FmCircularProgress"), Ce = I("FmButton"), ke = I("FmThumbnail"), he = I("FmDropField"),
|
|
1587
|
+
const Y = I("FmCardHeader"), K = I("FmCardSection"), re = I("FmCard"), st = I("FmIcon"), Ue = I("FmCircularProgress"), Ce = I("FmButton"), ke = I("FmThumbnail"), he = I("FmDropField"), at = I("FmCheckbox"), yt = I("FmForm"), Ae = I("FmSideSheet");
|
|
1588
1588
|
return p(), V(Ae, {
|
|
1589
|
-
header:
|
|
1589
|
+
header: a(t)("device.information.title"),
|
|
1590
1590
|
"max-width": 560,
|
|
1591
|
-
modelValue:
|
|
1592
|
-
"onUpdate:modelValue": z[2] || (z[2] = (
|
|
1593
|
-
"close-button": !
|
|
1591
|
+
modelValue: a(s),
|
|
1592
|
+
"onUpdate:modelValue": z[2] || (z[2] = (ve) => nn(s) ? s.value = ve : null),
|
|
1593
|
+
"close-button": !ae.value,
|
|
1594
1594
|
"dismiss-away": !0
|
|
1595
1595
|
}, On({
|
|
1596
1596
|
default: k(() => [
|
|
1597
1597
|
f(yt, null, {
|
|
1598
1598
|
default: k(() => {
|
|
1599
|
-
var
|
|
1599
|
+
var ve, l, u, _, B, _e, He, it, Le, Me, Be, Re;
|
|
1600
1600
|
return [
|
|
1601
|
-
|
|
1601
|
+
r("div", rs, [
|
|
1602
1602
|
f(re, { variant: "outlined" }, {
|
|
1603
1603
|
default: k(() => [
|
|
1604
1604
|
f(Y, {
|
|
1605
|
-
title:
|
|
1605
|
+
title: a(t)("device.information.sections.deviceInfo"),
|
|
1606
1606
|
class: "pb-8 px-16"
|
|
1607
1607
|
}, null, 8, ["title"]),
|
|
1608
1608
|
f(K, { class: "pt-0 flex flex-col gap-8" }, {
|
|
1609
1609
|
default: k(() => {
|
|
1610
1610
|
var R, M, ge, be;
|
|
1611
1611
|
return [
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1612
|
+
r("div", cs, [
|
|
1613
|
+
r("div", us, h(a(t)("device.information.main.id")), 1),
|
|
1614
|
+
r("div", ds, h(((R = m.device) == null ? void 0 : R.machineId) ?? "-"), 1)
|
|
1615
1615
|
]),
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1616
|
+
r("div", ms, [
|
|
1617
|
+
r("div", ps, h(a(t)("device.information.main.name")), 1),
|
|
1618
|
+
r("div", fs, h(y()), 1)
|
|
1619
1619
|
]),
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1620
|
+
r("div", hs, [
|
|
1621
|
+
r("div", vs, h(a(t)("device.information.main.type")), 1),
|
|
1622
|
+
r("div", _s, h((M = m.device) == null ? void 0 : M.type), 1)
|
|
1623
1623
|
]),
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1624
|
+
r("div", gs, [
|
|
1625
|
+
r("div", bs, h(a(t)("device.information.main.bindingAt")), 1),
|
|
1626
|
+
r("div", ys, h((ge = m.device) != null && ge.bindAt ? fe((be = m.device) == null ? void 0 : be.bindAt) : "-"), 1)
|
|
1627
1627
|
])
|
|
1628
1628
|
];
|
|
1629
1629
|
}),
|
|
@@ -1632,50 +1632,50 @@ const en = {
|
|
|
1632
1632
|
]),
|
|
1633
1633
|
_: 1
|
|
1634
1634
|
}),
|
|
1635
|
-
(
|
|
1635
|
+
(ve = m.device.heartbeatInfo) != null && ve.updatedAt ? (p(), V(re, {
|
|
1636
1636
|
key: 0,
|
|
1637
1637
|
variant: "outlined"
|
|
1638
1638
|
}, {
|
|
1639
1639
|
default: k(() => [
|
|
1640
1640
|
f(Y, {
|
|
1641
|
-
title:
|
|
1641
|
+
title: a(t)("device.information.sections.heartbeatStatus"),
|
|
1642
1642
|
class: "pb-8 px-16"
|
|
1643
1643
|
}, null, 8, ["title"]),
|
|
1644
1644
|
f(K, { class: "pt-0 flex flex-col gap-8" }, {
|
|
1645
1645
|
default: k(() => {
|
|
1646
1646
|
var R, M, ge, be, De, b, te, Te, We, Ge, Ye, Ke, Xe, Ze, Qe, Je;
|
|
1647
1647
|
return [
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1648
|
+
r("div", Ts, [
|
|
1649
|
+
r("div", Is, h(a(t)("device.information.heartbeat.lastSyncAt")), 1),
|
|
1650
|
+
r("div", Es, [
|
|
1651
1651
|
f(st, {
|
|
1652
1652
|
class: "motion-safe:animate-pulse",
|
|
1653
1653
|
name: "radio_button_unchecked",
|
|
1654
1654
|
size: "sm",
|
|
1655
1655
|
color: de((M = (R = m.device) == null ? void 0 : R.heartbeatInfo) == null ? void 0 : M.updatedAt) ? "system-success-300" : "system-error-300"
|
|
1656
1656
|
}, null, 8, ["color"]),
|
|
1657
|
-
|
|
1657
|
+
r("div", ws, h(fe((be = (ge = m.device) == null ? void 0 : ge.heartbeatInfo) == null ? void 0 : be.updatedAt)), 1)
|
|
1658
1658
|
])
|
|
1659
1659
|
]),
|
|
1660
1660
|
(b = (De = m.device) == null ? void 0 : De.heartbeatInfo) != null && b.freeMemory ? (p(), g("div", Fs, [
|
|
1661
|
-
|
|
1662
|
-
|
|
1661
|
+
r("div", Cs, h(a(t)("device.information.heartbeat.freeMemory")), 1),
|
|
1662
|
+
r("div", ks, h((Te = (te = m.device) == null ? void 0 : te.heartbeatInfo) == null ? void 0 : Te.freeMemory.toFixed(2)) + " MB", 1)
|
|
1663
1663
|
])) : C("", !0),
|
|
1664
1664
|
(We = m.device.heartbeatInfo) != null && We.appMemory ? (p(), g("div", Rs, [
|
|
1665
|
-
|
|
1666
|
-
|
|
1665
|
+
r("div", Os, h(a(t)("device.information.heartbeat.appMemory")), 1),
|
|
1666
|
+
r("div", Ss, h((Ge = m.device.heartbeatInfo) == null ? void 0 : Ge.appMemory.toFixed(2)) + " MB", 1)
|
|
1667
1667
|
])) : C("", !0),
|
|
1668
1668
|
(Ye = m.device.heartbeatInfo) != null && Ye.totalMemory ? (p(), g("div", As, [
|
|
1669
|
-
|
|
1670
|
-
|
|
1669
|
+
r("div", Ds, h(a(t)("device.information.heartbeat.totalMemory")), 1),
|
|
1670
|
+
r("div", xs, h((Ke = m.device.heartbeatInfo) == null ? void 0 : Ke.totalMemory.toFixed(2)) + " MB", 1)
|
|
1671
1671
|
])) : C("", !0),
|
|
1672
1672
|
(Xe = m.device.heartbeatInfo) != null && Xe.freeSpace ? (p(), g("div", zs, [
|
|
1673
|
-
|
|
1674
|
-
|
|
1673
|
+
r("div", Ns, h(a(t)("device.information.heartbeat.freeSpace")), 1),
|
|
1674
|
+
r("div", Ps, h((Ze = m.device.heartbeatInfo) == null ? void 0 : Ze.freeSpace.toFixed(2)) + " MB", 1)
|
|
1675
1675
|
])) : C("", !0),
|
|
1676
1676
|
(Qe = m.device.heartbeatInfo) != null && Qe.totalSpace ? (p(), g("div", Us, [
|
|
1677
|
-
|
|
1678
|
-
|
|
1677
|
+
r("div", Ls, h(a(t)("device.information.heartbeat.totalSpace")), 1),
|
|
1678
|
+
r("div", Ms, h((Je = m.device.heartbeatInfo) == null ? void 0 : Je.totalSpace.toFixed(2)) + " MB", 1)
|
|
1679
1679
|
])) : C("", !0)
|
|
1680
1680
|
];
|
|
1681
1681
|
}),
|
|
@@ -1684,42 +1684,42 @@ const en = {
|
|
|
1684
1684
|
]),
|
|
1685
1685
|
_: 1
|
|
1686
1686
|
})) : C("", !0),
|
|
1687
|
-
(
|
|
1687
|
+
(l = m.device) != null && l.appVersion && Object.values((u = m.device) == null ? void 0 : u.appVersion).some((R) => R) ? (p(), V(re, {
|
|
1688
1688
|
key: 1,
|
|
1689
1689
|
variant: "outlined"
|
|
1690
1690
|
}, {
|
|
1691
1691
|
default: k(() => [
|
|
1692
1692
|
f(Y, {
|
|
1693
|
-
title:
|
|
1693
|
+
title: a(t)("device.information.sections.applicationInfo"),
|
|
1694
1694
|
class: "pb-8 px-16"
|
|
1695
1695
|
}, null, 8, ["title"]),
|
|
1696
1696
|
f(K, { class: "pt-0 flex flex-col gap-8" }, {
|
|
1697
1697
|
default: k(() => {
|
|
1698
1698
|
var R, M, ge, be, De, b, te, Te, We, Ge, Ye, Ke, Xe, Ze, Qe, Je, Lt, Mt, Bt, $t, Vt, jt, qt, Ht;
|
|
1699
1699
|
return [
|
|
1700
|
-
|
|
1701
|
-
(M = (R = m.device) == null ? void 0 : R.appVersion) != null && M.appName ? (p(), g("div", $s, h(
|
|
1702
|
-
|
|
1700
|
+
r("div", Bs, [
|
|
1701
|
+
(M = (R = m.device) == null ? void 0 : R.appVersion) != null && M.appName ? (p(), g("div", $s, h(a(t)("device.information.app.name")), 1)) : C("", !0),
|
|
1702
|
+
r("div", Vs, h((be = (ge = m.device) == null ? void 0 : ge.appVersion) == null ? void 0 : be.appName), 1)
|
|
1703
1703
|
]),
|
|
1704
1704
|
(b = (De = m.device) == null ? void 0 : De.appVersion) != null && b.buildNumber ? (p(), g("div", js, [
|
|
1705
|
-
|
|
1706
|
-
|
|
1705
|
+
r("div", qs, h(a(t)("device.information.app.buildNumber")), 1),
|
|
1706
|
+
r("div", Hs, h((Te = (te = m.device) == null ? void 0 : te.appVersion) == null ? void 0 : Te.buildNumber), 1)
|
|
1707
1707
|
])) : C("", !0),
|
|
1708
1708
|
(Ge = (We = m.device) == null ? void 0 : We.appVersion) != null && Ge.buildSignature ? (p(), g("div", Ws, [
|
|
1709
|
-
|
|
1710
|
-
|
|
1709
|
+
r("div", Gs, h(a(t)("device.information.app.buildSignature")), 1),
|
|
1710
|
+
r("div", Ys, h((Ke = (Ye = m.device) == null ? void 0 : Ye.appVersion) == null ? void 0 : Ke.buildSignature), 1)
|
|
1711
1711
|
])) : C("", !0),
|
|
1712
1712
|
(Ze = (Xe = m.device) == null ? void 0 : Xe.appVersion) != null && Ze.installerStore ? (p(), g("div", Ks, [
|
|
1713
|
-
|
|
1714
|
-
|
|
1713
|
+
r("div", Xs, h(a(t)("device.information.app.installerStore")), 1),
|
|
1714
|
+
r("div", Zs, h((Je = (Qe = m.device) == null ? void 0 : Qe.appVersion) == null ? void 0 : Je.installerStore), 1)
|
|
1715
1715
|
])) : C("", !0),
|
|
1716
1716
|
(Mt = (Lt = m.device) == null ? void 0 : Lt.appVersion) != null && Mt.packageName ? (p(), g("div", Qs, [
|
|
1717
|
-
|
|
1718
|
-
|
|
1717
|
+
r("div", Js, h(a(t)("device.information.app.packageName")), 1),
|
|
1718
|
+
r("div", ea, h(($t = (Bt = m.device) == null ? void 0 : Bt.appVersion) == null ? void 0 : $t.packageName), 1)
|
|
1719
1719
|
])) : C("", !0),
|
|
1720
|
-
(jt = (Vt = m.device) == null ? void 0 : Vt.appVersion) != null && jt.version ? (p(), g("div",
|
|
1721
|
-
|
|
1722
|
-
|
|
1720
|
+
(jt = (Vt = m.device) == null ? void 0 : Vt.appVersion) != null && jt.version ? (p(), g("div", ta, [
|
|
1721
|
+
r("div", na, h(a(t)("device.information.app.version")), 1),
|
|
1722
|
+
r("div", oa, h((Ht = (qt = m.device) == null ? void 0 : qt.appVersion) == null ? void 0 : Ht.version), 1)
|
|
1723
1723
|
])) : C("", !0)
|
|
1724
1724
|
];
|
|
1725
1725
|
}),
|
|
@@ -1728,22 +1728,22 @@ const en = {
|
|
|
1728
1728
|
]),
|
|
1729
1729
|
_: 1
|
|
1730
1730
|
})) : C("", !0),
|
|
1731
|
-
(
|
|
1731
|
+
(_ = m.device.os) != null && _.system ? (p(), V(re, {
|
|
1732
1732
|
key: 2,
|
|
1733
1733
|
variant: "outlined"
|
|
1734
1734
|
}, {
|
|
1735
1735
|
default: k(() => [
|
|
1736
1736
|
f(Y, {
|
|
1737
|
-
title:
|
|
1737
|
+
title: a(t)("device.information.sections.systemInfo"),
|
|
1738
1738
|
class: "pb-8 px-16"
|
|
1739
1739
|
}, null, 8, ["title"]),
|
|
1740
1740
|
f(K, { class: "pt-0 flex flex-col gap-8" }, {
|
|
1741
1741
|
default: k(() => [
|
|
1742
1742
|
(p(!0), g(oe, null, me(m.device.os.system, (R, M) => (p(), g(oe, { key: M }, [
|
|
1743
|
-
R && !(R instanceof Object) ? (p(), g("div",
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1743
|
+
R && !(R instanceof Object) ? (p(), g("div", sa, [
|
|
1744
|
+
r("div", aa, h(a(t)(`device.information.system.${M}`) || ue(M)), 1),
|
|
1745
|
+
r("div", null, [
|
|
1746
|
+
r("div", ia, h(R), 1)
|
|
1747
1747
|
])
|
|
1748
1748
|
])) : C("", !0)
|
|
1749
1749
|
], 64))), 128))
|
|
@@ -1753,22 +1753,22 @@ const en = {
|
|
|
1753
1753
|
]),
|
|
1754
1754
|
_: 1
|
|
1755
1755
|
})) : C("", !0),
|
|
1756
|
-
(
|
|
1756
|
+
(_e = (B = m.device) == null ? void 0 : B.os) != null && _e.android ? (p(), V(re, {
|
|
1757
1757
|
key: 3,
|
|
1758
1758
|
variant: "outlined"
|
|
1759
1759
|
}, {
|
|
1760
1760
|
default: k(() => [
|
|
1761
1761
|
f(Y, {
|
|
1762
|
-
title:
|
|
1762
|
+
title: a(t)("device.information.sections.androidOS"),
|
|
1763
1763
|
class: "pb-8 px-16"
|
|
1764
1764
|
}, null, 8, ["title"]),
|
|
1765
1765
|
f(K, { class: "pt-0 flex flex-col gap-8" }, {
|
|
1766
1766
|
default: k(() => [
|
|
1767
1767
|
(p(!0), g(oe, null, me(m.device.os.android, (R, M) => (p(), g(oe, { key: M }, [
|
|
1768
|
-
R && !(R instanceof Object) ? (p(), g("div",
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1768
|
+
R && !(R instanceof Object) ? (p(), g("div", la, [
|
|
1769
|
+
r("div", ra, h(a(t)(`device.information.android.${M}`) || ue(M)), 1),
|
|
1770
|
+
r("div", null, [
|
|
1771
|
+
r("div", ca, h(R), 1)
|
|
1772
1772
|
])
|
|
1773
1773
|
])) : C("", !0)
|
|
1774
1774
|
], 64))), 128))
|
|
@@ -1784,16 +1784,16 @@ const en = {
|
|
|
1784
1784
|
}, {
|
|
1785
1785
|
default: k(() => [
|
|
1786
1786
|
f(Y, {
|
|
1787
|
-
title:
|
|
1787
|
+
title: a(t)("device.information.sections.iOSOS"),
|
|
1788
1788
|
class: "pb-8 px-16"
|
|
1789
1789
|
}, null, 8, ["title"]),
|
|
1790
1790
|
f(K, { class: "pt-0 flex flex-col gap-8" }, {
|
|
1791
1791
|
default: k(() => [
|
|
1792
1792
|
(p(!0), g(oe, null, me(m.device.os.iOS, (R, M) => (p(), g(oe, { key: M }, [
|
|
1793
|
-
R && !(R instanceof Object) ? (p(), g("div",
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1793
|
+
R && !(R instanceof Object) ? (p(), g("div", ua, [
|
|
1794
|
+
r("div", da, h(a(t)(`device.information.ios.${M}`) || ue(M)), 1),
|
|
1795
|
+
r("div", null, [
|
|
1796
|
+
r("div", ma, h(R), 1)
|
|
1797
1797
|
])
|
|
1798
1798
|
])) : C("", !0)
|
|
1799
1799
|
], 64))), 128))
|
|
@@ -1803,22 +1803,22 @@ const en = {
|
|
|
1803
1803
|
]),
|
|
1804
1804
|
_: 1
|
|
1805
1805
|
})) : C("", !0),
|
|
1806
|
-
(
|
|
1806
|
+
(it = m.device.os) != null && it.windows ? (p(), V(re, {
|
|
1807
1807
|
key: 5,
|
|
1808
1808
|
variant: "outlined"
|
|
1809
1809
|
}, {
|
|
1810
1810
|
default: k(() => [
|
|
1811
1811
|
f(Y, {
|
|
1812
|
-
title:
|
|
1812
|
+
title: a(t)("device.information.sections.windowsOS"),
|
|
1813
1813
|
class: "pb-8 px-16"
|
|
1814
1814
|
}, null, 8, ["title"]),
|
|
1815
1815
|
f(K, { class: "pt-0 flex flex-col gap-8" }, {
|
|
1816
1816
|
default: k(() => [
|
|
1817
1817
|
(p(!0), g(oe, null, me(m.device.os.windows, (R, M) => (p(), g(oe, { key: M }, [
|
|
1818
|
-
R && !(R instanceof Object) ? (p(), g("div",
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1818
|
+
R && !(R instanceof Object) ? (p(), g("div", pa, [
|
|
1819
|
+
r("div", fa, h(a(t)(`device.information.windows.${M}`) || ue(M)), 1),
|
|
1820
|
+
r("div", null, [
|
|
1821
|
+
r("div", ha, h(R), 1)
|
|
1822
1822
|
])
|
|
1823
1823
|
])) : C("", !0)
|
|
1824
1824
|
], 64))), 128))
|
|
@@ -1828,18 +1828,18 @@ const en = {
|
|
|
1828
1828
|
]),
|
|
1829
1829
|
_: 1
|
|
1830
1830
|
})) : C("", !0),
|
|
1831
|
-
m.device.type ===
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
se.value ? (p(), g("div",
|
|
1831
|
+
m.device.type === a(X).Enum.MAIN ? (p(), g("div", va, [
|
|
1832
|
+
r("div", _a, h(a(t)("device.customerDisplay.title")), 1),
|
|
1833
|
+
r("div", ga, h(a(t)("device.customerDisplay.description")), 1),
|
|
1834
|
+
se.value ? (p(), g("div", ba, [
|
|
1835
1835
|
f(Ue, { size: "lg" })
|
|
1836
|
-
])) : (p(), g("div",
|
|
1837
|
-
(Le = A.value) != null && Le.length ? (p(), g("div",
|
|
1838
|
-
|
|
1836
|
+
])) : (p(), g("div", ya, [
|
|
1837
|
+
(Le = A.value) != null && Le.length ? (p(), g("div", Ta, [
|
|
1838
|
+
r("img", {
|
|
1839
1839
|
class: "object-cover w-full h-[264px] xs:h-[175px]",
|
|
1840
1840
|
src: P.value
|
|
1841
|
-
}, null, 8,
|
|
1842
|
-
|
|
1841
|
+
}, null, 8, Ia),
|
|
1842
|
+
r("div", Ea, [
|
|
1843
1843
|
f(Ce, {
|
|
1844
1844
|
class: "h-[36px] w-[36px]",
|
|
1845
1845
|
icon: "close",
|
|
@@ -1849,28 +1849,28 @@ const en = {
|
|
|
1849
1849
|
})
|
|
1850
1850
|
])
|
|
1851
1851
|
])) : C("", !0),
|
|
1852
|
-
|
|
1853
|
-
(Me = A.value) != null && Me.length ? (p(), g("div",
|
|
1852
|
+
r("div", wa, [
|
|
1853
|
+
(Me = A.value) != null && Me.length ? (p(), g("div", Fa, [
|
|
1854
1854
|
(p(!0), g(oe, null, me(A.value, (R) => (p(), V(ke, {
|
|
1855
1855
|
key: R,
|
|
1856
1856
|
src: R,
|
|
1857
|
-
size:
|
|
1857
|
+
size: a(n)("xs") ? "lg" : "xl",
|
|
1858
1858
|
class: on(["cursor-pointer mr-1", P.value == R ? "border-fm-color-primary border-[2px]" : ""]),
|
|
1859
1859
|
onClick: (M) => L(R)
|
|
1860
1860
|
}, null, 8, ["src", "size", "class", "onClick"]))), 128))
|
|
1861
1861
|
])) : C("", !0),
|
|
1862
1862
|
f(he, {
|
|
1863
1863
|
class: "w-[200px] h-[170px]",
|
|
1864
|
-
onFileUpload: z[0] || (z[0] = (R) =>
|
|
1864
|
+
onFileUpload: z[0] || (z[0] = (R) => $(R)),
|
|
1865
1865
|
accept: "image/*"
|
|
1866
1866
|
}, {
|
|
1867
1867
|
"accept-text": k(() => z[3] || (z[3] = [
|
|
1868
|
-
|
|
1868
|
+
r("div", null, null, -1)
|
|
1869
1869
|
])),
|
|
1870
1870
|
"helper-text": k(() => [
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1871
|
+
r("div", Ca, [
|
|
1872
|
+
r("div", null, h(a(t)("device.customerDisplay.imageSize.recommendation")), 1),
|
|
1873
|
+
r("div", null, h(a(t)("device.customerDisplay.imageSize.dimensions")), 1)
|
|
1874
1874
|
])
|
|
1875
1875
|
]),
|
|
1876
1876
|
_: 1
|
|
@@ -1878,22 +1878,22 @@ const en = {
|
|
|
1878
1878
|
])
|
|
1879
1879
|
]))
|
|
1880
1880
|
])) : C("", !0),
|
|
1881
|
-
|
|
1881
|
+
r("div", {
|
|
1882
1882
|
ref_key: "bottomDiv",
|
|
1883
1883
|
ref: U
|
|
1884
1884
|
}, null, 512),
|
|
1885
|
-
(Be = A.value) != null && Be.length && m.device.type ===
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
f(
|
|
1885
|
+
(Be = A.value) != null && Be.length && m.device.type === a(X).Enum.MAIN ? (p(), g("div", ka, [
|
|
1886
|
+
r("div", Ra, h(a(t)("device.customerDisplay.selection.title")), 1),
|
|
1887
|
+
r("div", Oa, h(a(t)("device.customerDisplay.selection.description")), 1),
|
|
1888
|
+
r("div", Sa, [
|
|
1889
|
+
f(at, {
|
|
1890
1890
|
"model-value": G.value,
|
|
1891
|
-
label:
|
|
1891
|
+
label: a(t)("device.filters.all"),
|
|
1892
1892
|
value: "1",
|
|
1893
1893
|
indeterminate: ((Re = E.value) == null ? void 0 : Re.length) > 0,
|
|
1894
1894
|
"onUpdate:modelValue": O
|
|
1895
1895
|
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
1896
|
-
(p(!0), g(oe, null, me(m.devices.filter((R) => R.restaurantId && R.type ===
|
|
1896
|
+
(p(!0), g(oe, null, me(m.devices.filter((R) => R.restaurantId && R.type === a(X).Enum.MAIN), (R, M) => (p(), V(at, {
|
|
1897
1897
|
key: M,
|
|
1898
1898
|
"model-value": E.value,
|
|
1899
1899
|
label: y(R),
|
|
@@ -1910,22 +1910,22 @@ const en = {
|
|
|
1910
1910
|
]),
|
|
1911
1911
|
_: 2
|
|
1912
1912
|
}, [
|
|
1913
|
-
m.device.type ===
|
|
1913
|
+
m.device.type === a(X).Enum.MAIN ? {
|
|
1914
1914
|
name: "side-sheet-footer",
|
|
1915
1915
|
fn: k(() => [
|
|
1916
|
-
|
|
1916
|
+
r("div", Aa, [
|
|
1917
1917
|
f(Ce, {
|
|
1918
|
-
loading:
|
|
1919
|
-
disabled:
|
|
1918
|
+
loading: ae.value,
|
|
1919
|
+
disabled: ae.value,
|
|
1920
1920
|
variant: "primary",
|
|
1921
|
-
label:
|
|
1921
|
+
label: a(t)("device.actions.update"),
|
|
1922
1922
|
onClick: Rt(ee, ["prevent"])
|
|
1923
1923
|
}, null, 8, ["loading", "disabled", "label"]),
|
|
1924
1924
|
f(Ce, {
|
|
1925
|
-
disabled:
|
|
1925
|
+
disabled: ae.value,
|
|
1926
1926
|
variant: "secondary",
|
|
1927
|
-
label:
|
|
1928
|
-
onClick: z[1] || (z[1] = (
|
|
1927
|
+
label: a(t)("device.actions.cancel"),
|
|
1928
|
+
onClick: z[1] || (z[1] = (ve) => s.value = !1)
|
|
1929
1929
|
}, null, 8, ["disabled", "label"])
|
|
1930
1930
|
])
|
|
1931
1931
|
]),
|
|
@@ -1934,31 +1934,31 @@ const en = {
|
|
|
1934
1934
|
]), 1032, ["header", "modelValue", "close-button"]);
|
|
1935
1935
|
};
|
|
1936
1936
|
}
|
|
1937
|
-
}),
|
|
1937
|
+
}), xa = { class: "flex flex-col gap-24" }, za = { class: "flex flex-col gap-5 fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, Na = {
|
|
1938
1938
|
key: 0,
|
|
1939
1939
|
class: "flex flex-col gap-24"
|
|
1940
|
-
},
|
|
1940
|
+
}, Pa = { class: "flex flex-col gap-8" }, Ua = { class: "flex flex-col gap-4" }, La = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ma = { class: "fm-typo-en-body-lg-600" }, Ba = { class: "flex flex-col gap-4" }, $a = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Va = { class: "fm-typo-en-body-lg-600" }, ja = {
|
|
1941
1941
|
key: 0,
|
|
1942
1942
|
class: "flex flex-col gap-4"
|
|
1943
|
-
},
|
|
1943
|
+
}, qa = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ha = { class: "fm-typo-en-body-lg-600" }, Wa = {
|
|
1944
1944
|
key: 1,
|
|
1945
1945
|
class: "flex flex-col gap-4"
|
|
1946
|
-
},
|
|
1946
|
+
}, Ga = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ya = { class: "fm-typo-en-body-lg-600" }, Ka = {
|
|
1947
1947
|
key: 2,
|
|
1948
1948
|
class: "flex flex-col gap-4"
|
|
1949
|
-
},
|
|
1949
|
+
}, Xa = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Za = { class: "fm-typo-en-body-lg-600" }, Qa = {
|
|
1950
1950
|
key: 3,
|
|
1951
1951
|
class: "flex flex-col gap-4"
|
|
1952
|
-
},
|
|
1952
|
+
}, Ja = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ei = { class: "fm-typo-en-body-lg-600" }, ti = {
|
|
1953
1953
|
key: 4,
|
|
1954
1954
|
class: "flex flex-col gap-4"
|
|
1955
|
-
},
|
|
1955
|
+
}, ni = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, oi = { class: "fm-typo-en-body-lg-600" }, si = {
|
|
1956
1956
|
key: 0,
|
|
1957
1957
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary p-1"
|
|
1958
|
-
},
|
|
1958
|
+
}, ai = {
|
|
1959
1959
|
key: 1,
|
|
1960
1960
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary p-1"
|
|
1961
|
-
},
|
|
1961
|
+
}, ii = { class: "flex w-full mb-24 gap-4 justify-between" }, li = { class: "flex ml-[-10px]" }, ri = { class: "flex gap-8" }, ci = /* @__PURE__ */ Ne({
|
|
1962
1962
|
__name: "DownloadLogDialog",
|
|
1963
1963
|
props: {
|
|
1964
1964
|
machineId: {
|
|
@@ -1997,18 +1997,18 @@ const en = {
|
|
|
1997
1997
|
default:
|
|
1998
1998
|
return "#FF3B30";
|
|
1999
1999
|
}
|
|
2000
|
-
},
|
|
2001
|
-
var
|
|
2002
|
-
const U = (
|
|
2000
|
+
}, i = N(), v = N(!1), y = N(!1), F = N(!1), A = () => {
|
|
2001
|
+
var $;
|
|
2002
|
+
const U = ($ = ft().sessionUser.value) == null ? void 0 : $.id;
|
|
2003
2003
|
return {
|
|
2004
2004
|
machineId: t.machineId,
|
|
2005
2005
|
userId: U ?? ""
|
|
2006
2006
|
};
|
|
2007
2007
|
}, x = qe(), D = async () => {
|
|
2008
|
-
|
|
2008
|
+
v.value = !0, i.value = void 0;
|
|
2009
2009
|
try {
|
|
2010
2010
|
const T = A(), U = await J.getLogRequest(T);
|
|
2011
|
-
|
|
2011
|
+
i.value = U;
|
|
2012
2012
|
} catch (T) {
|
|
2013
2013
|
x.open({
|
|
2014
2014
|
message: s("device.status.logs.fetchError", { error: T }),
|
|
@@ -2016,14 +2016,14 @@ const en = {
|
|
|
2016
2016
|
position: W.BOTTOM
|
|
2017
2017
|
});
|
|
2018
2018
|
} finally {
|
|
2019
|
-
|
|
2019
|
+
v.value = !1;
|
|
2020
2020
|
}
|
|
2021
2021
|
}, S = async () => {
|
|
2022
2022
|
F.value = !0;
|
|
2023
2023
|
try {
|
|
2024
|
-
if (
|
|
2024
|
+
if (i.value) {
|
|
2025
2025
|
const T = A(), U = await J.getLogRequest(T);
|
|
2026
|
-
|
|
2026
|
+
i.value = U;
|
|
2027
2027
|
} else {
|
|
2028
2028
|
const T = await J.checkDeviceStatus(t.machineId);
|
|
2029
2029
|
n.value = T.status, o.value = T.message;
|
|
@@ -2038,10 +2038,10 @@ const en = {
|
|
|
2038
2038
|
F.value = !1;
|
|
2039
2039
|
}
|
|
2040
2040
|
}, P = async () => {
|
|
2041
|
-
|
|
2041
|
+
i.value && i.value.requestId && await J.deleteLogRequest(i.value.requestId), v.value = !0, i.value = void 0;
|
|
2042
2042
|
try {
|
|
2043
2043
|
const T = A(), U = await J.createLogRequest(T);
|
|
2044
|
-
|
|
2044
|
+
i.value = U;
|
|
2045
2045
|
} catch (T) {
|
|
2046
2046
|
x.open({
|
|
2047
2047
|
message: s("device.status.logs.createError", { error: T }),
|
|
@@ -2049,14 +2049,14 @@ const en = {
|
|
|
2049
2049
|
position: W.BOTTOM
|
|
2050
2050
|
});
|
|
2051
2051
|
} finally {
|
|
2052
|
-
|
|
2052
|
+
v.value = !1;
|
|
2053
2053
|
}
|
|
2054
2054
|
}, L = async () => {
|
|
2055
2055
|
var T;
|
|
2056
|
-
if ((T =
|
|
2056
|
+
if ((T = i.value) != null && T.requestId) {
|
|
2057
2057
|
y.value = !0;
|
|
2058
2058
|
try {
|
|
2059
|
-
await J.deleteLogRequest(
|
|
2059
|
+
await J.deleteLogRequest(i.value.requestId), await D();
|
|
2060
2060
|
} catch (U) {
|
|
2061
2061
|
x.open({
|
|
2062
2062
|
message: s("device.status.logs.deleteError", { error: U }),
|
|
@@ -2076,20 +2076,20 @@ const en = {
|
|
|
2076
2076
|
hour12: !0
|
|
2077
2077
|
}).toUpperCase(), G = () => {
|
|
2078
2078
|
var T, U;
|
|
2079
|
-
(T =
|
|
2079
|
+
(T = i.value) != null && T.downloadUrl && (window.open((U = i.value) == null ? void 0 : U.downloadUrl, "_blank"), setTimeout(() => L(), 1500));
|
|
2080
2080
|
}, O = () => {
|
|
2081
2081
|
var T, U;
|
|
2082
|
-
if ((T =
|
|
2083
|
-
return `${Math.max(0.01, Math.round(((U =
|
|
2082
|
+
if ((T = i.value) != null && T.fileSize)
|
|
2083
|
+
return `${Math.max(0.01, Math.round(((U = i.value) == null ? void 0 : U.fileSize) / 1024 / 1024 * 100) / 100)} MB`;
|
|
2084
2084
|
}, E = St();
|
|
2085
2085
|
return mt(async () => {
|
|
2086
2086
|
await D();
|
|
2087
2087
|
}), (T, U) => {
|
|
2088
|
-
const se = I("FmIcon"),
|
|
2089
|
-
return p(), g("div",
|
|
2090
|
-
|
|
2091
|
-
f(
|
|
2092
|
-
label:
|
|
2088
|
+
const se = I("FmIcon"), $ = I("FmButton"), ae = I("FmListItem"), ce = I("FmCardHeader"), ee = I("FmCardSection"), Pe = I("FmCard");
|
|
2089
|
+
return p(), g("div", xa, [
|
|
2090
|
+
r("div", za, [
|
|
2091
|
+
f(ae, {
|
|
2092
|
+
label: a(s)("device.logs.download.deviceStatus"),
|
|
2093
2093
|
sublabel: o.value,
|
|
2094
2094
|
clickable: !1
|
|
2095
2095
|
}, {
|
|
@@ -2100,7 +2100,7 @@ const en = {
|
|
|
2100
2100
|
}, null, 8, ["name", "color"])
|
|
2101
2101
|
]),
|
|
2102
2102
|
append: k(() => [
|
|
2103
|
-
|
|
2103
|
+
v.value ? C("", !0) : (p(), V($, {
|
|
2104
2104
|
key: 0,
|
|
2105
2105
|
variant: "tertiary",
|
|
2106
2106
|
size: "md",
|
|
@@ -2111,46 +2111,46 @@ const en = {
|
|
|
2111
2111
|
_: 1
|
|
2112
2112
|
}, 8, ["label", "sublabel"])
|
|
2113
2113
|
]),
|
|
2114
|
-
!
|
|
2114
|
+
!v.value && i.value ? (p(), g("div", Na, [
|
|
2115
2115
|
f(Pe, { variant: "outlined" }, {
|
|
2116
2116
|
default: k(() => {
|
|
2117
2117
|
var Fe;
|
|
2118
2118
|
return [
|
|
2119
2119
|
f(ce, {
|
|
2120
|
-
title: (Fe =
|
|
2120
|
+
title: (Fe = i.value) == null ? void 0 : Fe.status.replace(/\b\w/g, (fe) => fe.toUpperCase())
|
|
2121
2121
|
}, null, 8, ["title"]),
|
|
2122
2122
|
f(ee, { class: "gap-8 pt-0" }, {
|
|
2123
2123
|
default: k(() => {
|
|
2124
2124
|
var fe, ue, de, m;
|
|
2125
2125
|
return [
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2126
|
+
r("div", Pa, [
|
|
2127
|
+
r("div", Ua, [
|
|
2128
|
+
r("div", La, h(a(s)("device.logs.download.fields.requestId")), 1),
|
|
2129
|
+
r("div", Ma, h(i.value.requestId), 1)
|
|
2130
2130
|
]),
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2131
|
+
r("div", Ba, [
|
|
2132
|
+
r("div", $a, h(a(s)("device.logs.download.fields.requestAt")), 1),
|
|
2133
|
+
r("div", Va, h(j((fe = i.value) == null ? void 0 : fe.createdAt)), 1)
|
|
2134
2134
|
]),
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2135
|
+
i.value.fileName ? (p(), g("div", ja, [
|
|
2136
|
+
r("div", qa, h(a(s)("device.logs.download.fields.fileName")), 1),
|
|
2137
|
+
r("div", Ha, h(i.value.fileName), 1)
|
|
2138
2138
|
])) : C("", !0),
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2139
|
+
i.value.fileSize ? (p(), g("div", Wa, [
|
|
2140
|
+
r("div", Ga, h(a(s)("device.logs.download.fields.fileSize")), 1),
|
|
2141
|
+
r("div", Ya, h(i.value.fileSize ? O() : "Unknown"), 1)
|
|
2142
2142
|
])) : C("", !0),
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2143
|
+
i.value.completedAt ? (p(), g("div", Ka, [
|
|
2144
|
+
r("div", Xa, h(a(s)("device.logs.download.fields.completedAt")), 1),
|
|
2145
|
+
r("div", Za, h(j((ue = i.value) == null ? void 0 : ue.completedAt)), 1)
|
|
2146
2146
|
])) : C("", !0),
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2147
|
+
i.value.expiresAt ? (p(), g("div", Qa, [
|
|
2148
|
+
r("div", Ja, h(a(s)("device.logs.download.fields.expiredAt")), 1),
|
|
2149
|
+
r("div", ei, h(j((de = i.value) == null ? void 0 : de.expiresAt)), 1)
|
|
2150
2150
|
])) : C("", !0),
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2151
|
+
i.value.error ? (p(), g("div", ti, [
|
|
2152
|
+
r("div", ni, h(a(s)("device.logs.download.fields.error")), 1),
|
|
2153
|
+
r("div", oi, h((m = i.value) == null ? void 0 : m.error), 1)
|
|
2154
2154
|
])) : C("", !0)
|
|
2155
2155
|
])
|
|
2156
2156
|
];
|
|
@@ -2161,28 +2161,28 @@ const en = {
|
|
|
2161
2161
|
}),
|
|
2162
2162
|
_: 1
|
|
2163
2163
|
}),
|
|
2164
|
-
|
|
2164
|
+
i.value.status !== a(Mn).Enum.completed ? (p(), g("div", si, h(a(s)("device.logs.download.messages.pendingDownload")), 1)) : (p(), g("div", ai, h(a(s)("device.logs.download.messages.downloadExpiry")), 1))
|
|
2165
2165
|
])) : C("", !0),
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
f(
|
|
2169
|
-
disabled: !!
|
|
2170
|
-
label:
|
|
2166
|
+
r("div", ii, [
|
|
2167
|
+
r("div", li, [
|
|
2168
|
+
f($, {
|
|
2169
|
+
disabled: !!i.value && !i.value.error || n.value !== "online",
|
|
2170
|
+
label: a(s)("device.logs.download.requestButton"),
|
|
2171
2171
|
size: "md",
|
|
2172
2172
|
variant: "plain",
|
|
2173
2173
|
onClick: P
|
|
2174
2174
|
}, null, 8, ["disabled", "label"])
|
|
2175
2175
|
]),
|
|
2176
|
-
|
|
2177
|
-
f(
|
|
2178
|
-
label:
|
|
2176
|
+
r("div", ri, [
|
|
2177
|
+
f($, {
|
|
2178
|
+
label: a(s)("device.actions.cancel"),
|
|
2179
2179
|
size: "md",
|
|
2180
2180
|
variant: "tertiary",
|
|
2181
|
-
onClick: U[0] || (U[0] = (Fe) =>
|
|
2181
|
+
onClick: U[0] || (U[0] = (Fe) => a(E).close())
|
|
2182
2182
|
}, null, 8, ["label"]),
|
|
2183
|
-
f(
|
|
2184
|
-
disabled: !
|
|
2185
|
-
label:
|
|
2183
|
+
f($, {
|
|
2184
|
+
disabled: !i.value || !i.value.downloadUrl,
|
|
2185
|
+
label: a(s)("device.logs.download.downloadButton"),
|
|
2186
2186
|
size: "md",
|
|
2187
2187
|
variant: "primary",
|
|
2188
2188
|
onClick: G
|
|
@@ -2193,10 +2193,10 @@ const en = {
|
|
|
2193
2193
|
};
|
|
2194
2194
|
}
|
|
2195
2195
|
});
|
|
2196
|
-
function
|
|
2196
|
+
function ui(e) {
|
|
2197
2197
|
return e || {};
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function di(e) {
|
|
2200
2200
|
if (e == null || e === "" || typeof e == "boolean" || Array.isArray(e) || typeof e == "object")
|
|
2201
2201
|
return !1;
|
|
2202
2202
|
const t = Number(e);
|
|
@@ -2204,7 +2204,7 @@ function da(e) {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
function Ve(e, t, n) {
|
|
2206
2206
|
const { t: o } = Se();
|
|
2207
|
-
return (s) => e(s) || o(t,
|
|
2207
|
+
return (s) => e(s) || o(t, ui(n));
|
|
2208
2208
|
}
|
|
2209
2209
|
const Ie = {
|
|
2210
2210
|
required() {
|
|
@@ -2229,31 +2229,31 @@ const Ie = {
|
|
|
2229
2229
|
return Ve((t) => t <= e, "device.validation.max", { max: e });
|
|
2230
2230
|
},
|
|
2231
2231
|
number() {
|
|
2232
|
-
return Ve(
|
|
2232
|
+
return Ve(di, "device.validation.number", {});
|
|
2233
2233
|
}
|
|
2234
|
-
},
|
|
2234
|
+
}, mi = { class: "flex gap-8 items-center justify-start" }, pi = /* @__PURE__ */ Ne({
|
|
2235
2235
|
__name: "ManageConfigurationSideSheet",
|
|
2236
2236
|
props: {
|
|
2237
2237
|
device: {},
|
|
2238
2238
|
visible: { type: Boolean }
|
|
2239
2239
|
},
|
|
2240
2240
|
setup(e) {
|
|
2241
|
-
const { t } = Se(), { isAtMost: n } = Ot(), o = e, s = dt(o, "visible"), c = N(), d = N(),
|
|
2241
|
+
const { t } = Se(), { isAtMost: n } = Ot(), o = e, s = dt(o, "visible"), c = N(), d = N(), i = N(), v = N(), y = Q(
|
|
2242
2242
|
() => Object.values(Tt.enum).map((D) => ({
|
|
2243
2243
|
label: D,
|
|
2244
2244
|
value: D
|
|
2245
2245
|
}))
|
|
2246
2246
|
), F = qe(), A = async () => {
|
|
2247
|
-
if (!
|
|
2247
|
+
if (!i.value || i.value > 30 || i.value < 5)
|
|
2248
2248
|
return;
|
|
2249
2249
|
const D = {
|
|
2250
2250
|
logging: {
|
|
2251
2251
|
enable: c.value,
|
|
2252
2252
|
level: d.value,
|
|
2253
|
-
ttl:
|
|
2253
|
+
ttl: i.value
|
|
2254
2254
|
},
|
|
2255
2255
|
telemetry: {
|
|
2256
|
-
enable:
|
|
2256
|
+
enable: v.value
|
|
2257
2257
|
}
|
|
2258
2258
|
};
|
|
2259
2259
|
await J.updateDeviceConfig(o.device.deviceId, D).then(async () => {
|
|
@@ -2277,28 +2277,28 @@ const Ie = {
|
|
|
2277
2277
|
return mt(async () => {
|
|
2278
2278
|
await J.getDeviceConfig(o.device.deviceId).then((D) => {
|
|
2279
2279
|
var S, P, L, j;
|
|
2280
|
-
c.value = ((S = D.logging) == null ? void 0 : S.enable) ?? !0, d.value = ((P = D.logging) == null ? void 0 : P.level) ?? Tt.Enum.ALL,
|
|
2280
|
+
c.value = ((S = D.logging) == null ? void 0 : S.enable) ?? !0, d.value = ((P = D.logging) == null ? void 0 : P.level) ?? Tt.Enum.ALL, i.value = ((L = D.logging) == null ? void 0 : L.ttl) ?? 30, v.value = ((j = D.telemetry) == null ? void 0 : j.enable) ?? !1;
|
|
2281
2281
|
}).catch(() => {
|
|
2282
|
-
c.value = !0, d.value = Tt.Enum.ALL,
|
|
2282
|
+
c.value = !0, d.value = Tt.Enum.ALL, i.value = 30, v.value = !1;
|
|
2283
2283
|
});
|
|
2284
2284
|
}), (D, S) => {
|
|
2285
2285
|
const P = I("FmCardHeader"), L = I("FmSwitch"), j = I("FmSelect"), G = I("FmStepperField"), O = I("FmCardSection"), E = I("FmCard"), T = I("FmForm"), U = I("FmButton"), se = I("FmSideSheet");
|
|
2286
2286
|
return p(), V(se, {
|
|
2287
|
-
header:
|
|
2288
|
-
modelValue:
|
|
2289
|
-
"onUpdate:modelValue": S[4] || (S[4] = (
|
|
2290
|
-
"max-width":
|
|
2287
|
+
header: a(t)("device.config.title"),
|
|
2288
|
+
modelValue: a(s),
|
|
2289
|
+
"onUpdate:modelValue": S[4] || (S[4] = ($) => nn(s) ? s.value = $ : null),
|
|
2290
|
+
"max-width": a(n)("xs") ? 560 : 470
|
|
2291
2291
|
}, {
|
|
2292
2292
|
"side-sheet-footer": k(() => [
|
|
2293
|
-
|
|
2293
|
+
r("div", mi, [
|
|
2294
2294
|
f(U, {
|
|
2295
2295
|
variant: "primary",
|
|
2296
|
-
label:
|
|
2296
|
+
label: a(t)("device.actions.update"),
|
|
2297
2297
|
onClick: Rt(A, ["prevent"])
|
|
2298
2298
|
}, null, 8, ["label"]),
|
|
2299
2299
|
f(U, {
|
|
2300
2300
|
variant: "secondary",
|
|
2301
|
-
label:
|
|
2301
|
+
label: a(t)("device.actions.cancel"),
|
|
2302
2302
|
onClick: x
|
|
2303
2303
|
}, null, 8, ["label"])
|
|
2304
2304
|
])
|
|
@@ -2309,36 +2309,36 @@ const Ie = {
|
|
|
2309
2309
|
f(E, { variant: "flat" }, {
|
|
2310
2310
|
default: k(() => [
|
|
2311
2311
|
f(P, {
|
|
2312
|
-
title:
|
|
2312
|
+
title: a(t)("device.config.logging.title"),
|
|
2313
2313
|
class: "p-1"
|
|
2314
2314
|
}, null, 8, ["title"]),
|
|
2315
2315
|
f(O, { class: "p-1 flex gap-6 flex-col" }, {
|
|
2316
2316
|
default: k(() => [
|
|
2317
2317
|
f(L, {
|
|
2318
2318
|
modelValue: c.value,
|
|
2319
|
-
"onUpdate:modelValue": S[0] || (S[0] = (
|
|
2319
|
+
"onUpdate:modelValue": S[0] || (S[0] = ($) => c.value = $),
|
|
2320
2320
|
value: "first",
|
|
2321
|
-
label:
|
|
2322
|
-
sublabel:
|
|
2321
|
+
label: a(t)("device.config.logging.enable.label"),
|
|
2322
|
+
sublabel: a(t)("device.config.logging.enable.sublabel"),
|
|
2323
2323
|
"label-placement": "right"
|
|
2324
2324
|
}, null, 8, ["modelValue", "label", "sublabel"]),
|
|
2325
2325
|
f(j, {
|
|
2326
2326
|
width: 150,
|
|
2327
2327
|
modelValue: d.value,
|
|
2328
|
-
"onUpdate:modelValue": S[1] || (S[1] = (
|
|
2329
|
-
label:
|
|
2328
|
+
"onUpdate:modelValue": S[1] || (S[1] = ($) => d.value = $),
|
|
2329
|
+
label: a(t)("device.config.logging.logLevel"),
|
|
2330
2330
|
items: y.value
|
|
2331
2331
|
}, null, 8, ["modelValue", "label", "items"]),
|
|
2332
2332
|
f(G, {
|
|
2333
|
-
modelValue:
|
|
2334
|
-
"onUpdate:modelValue": S[2] || (S[2] = (
|
|
2335
|
-
label:
|
|
2333
|
+
modelValue: i.value,
|
|
2334
|
+
"onUpdate:modelValue": S[2] || (S[2] = ($) => i.value = $),
|
|
2335
|
+
label: a(t)("device.config.logging.ttl.label"),
|
|
2336
2336
|
placeholder: "5",
|
|
2337
2337
|
step: 1,
|
|
2338
2338
|
min: 5,
|
|
2339
2339
|
max: 30,
|
|
2340
|
-
rules: [
|
|
2341
|
-
"append-text":
|
|
2340
|
+
rules: [a(Ie).required(), a(Ie).number(), a(Ie).min(5), a(Ie).max(30)],
|
|
2341
|
+
"append-text": a(t)("device.config.logging.ttl.unit")
|
|
2342
2342
|
}, null, 8, ["modelValue", "label", "rules", "append-text"])
|
|
2343
2343
|
]),
|
|
2344
2344
|
_: 1
|
|
@@ -2349,17 +2349,17 @@ const Ie = {
|
|
|
2349
2349
|
f(E, { variant: "flat" }, {
|
|
2350
2350
|
default: k(() => [
|
|
2351
2351
|
f(P, {
|
|
2352
|
-
title:
|
|
2352
|
+
title: a(t)("device.config.telemetry.title"),
|
|
2353
2353
|
class: "p-1"
|
|
2354
2354
|
}, null, 8, ["title"]),
|
|
2355
2355
|
f(O, { class: "p-1 flex gap-6 flex-col" }, {
|
|
2356
2356
|
default: k(() => [
|
|
2357
2357
|
f(L, {
|
|
2358
|
-
modelValue:
|
|
2359
|
-
"onUpdate:modelValue": S[3] || (S[3] = (
|
|
2358
|
+
modelValue: v.value,
|
|
2359
|
+
"onUpdate:modelValue": S[3] || (S[3] = ($) => v.value = $),
|
|
2360
2360
|
value: "first",
|
|
2361
|
-
label:
|
|
2362
|
-
sublabel:
|
|
2361
|
+
label: a(t)("device.config.telemetry.enable.label"),
|
|
2362
|
+
sublabel: a(t)("device.config.telemetry.enable.sublabel"),
|
|
2363
2363
|
"label-placement": "right"
|
|
2364
2364
|
}, null, 8, ["modelValue", "label", "sublabel"])
|
|
2365
2365
|
]),
|
|
@@ -2376,7 +2376,7 @@ const Ie = {
|
|
|
2376
2376
|
}, 8, ["header", "modelValue", "max-width"]);
|
|
2377
2377
|
};
|
|
2378
2378
|
}
|
|
2379
|
-
}),
|
|
2379
|
+
}), fi = { class: "flex flex-col gap-24 fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hi = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, vi = /* @__PURE__ */ Ne({
|
|
2380
2380
|
__name: "UnbindDeviceDialog",
|
|
2381
2381
|
props: {
|
|
2382
2382
|
restaurantName: {
|
|
@@ -2394,20 +2394,20 @@ const Ie = {
|
|
|
2394
2394
|
}
|
|
2395
2395
|
});
|
|
2396
2396
|
return (c, d) => {
|
|
2397
|
-
const
|
|
2398
|
-
return p(), g("div",
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
Ct(h(
|
|
2402
|
-
|
|
2403
|
-
Ct(" " + h(
|
|
2397
|
+
const i = I("FmTextField"), v = I("FmForm");
|
|
2398
|
+
return p(), g("div", fi, [
|
|
2399
|
+
r("div", null, h(a(t)("device.unbindDevice.unbindConfirmationMessage")), 1),
|
|
2400
|
+
r("div", null, [
|
|
2401
|
+
Ct(h(a(t)("device.unbindDevice.confirmationInstructionPart1")) + " ", 1),
|
|
2402
|
+
r("span", hi, h(e.restaurantName), 1),
|
|
2403
|
+
Ct(" " + h(a(t)("device.unbindDevice.confirmationInstructionPart2")), 1)
|
|
2404
2404
|
]),
|
|
2405
|
-
f(
|
|
2405
|
+
f(v, null, {
|
|
2406
2406
|
default: k(() => [
|
|
2407
|
-
f(
|
|
2407
|
+
f(i, {
|
|
2408
2408
|
modelValue: s.value,
|
|
2409
2409
|
"onUpdate:modelValue": d[0] || (d[0] = (y) => s.value = y),
|
|
2410
|
-
rules: [
|
|
2410
|
+
rules: [a(Ie).required(), a(Ie).matches(e.restaurantName)],
|
|
2411
2411
|
required: ""
|
|
2412
2412
|
}, null, 8, ["modelValue", "rules"])
|
|
2413
2413
|
]),
|
|
@@ -2420,7 +2420,7 @@ const Ie = {
|
|
|
2420
2420
|
function wt(e) {
|
|
2421
2421
|
return e && (e = e.replace(/_/g, " ").toLowerCase(), e.split(" ").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(" "));
|
|
2422
2422
|
}
|
|
2423
|
-
var Fn = /* @__PURE__ */ ((e) => (e.licensePosCreateSubPos = "license_pos_create_subpos", e))(Fn || {}),
|
|
2423
|
+
var Fn = /* @__PURE__ */ ((e) => (e.licensePosCreateSubPos = "license_pos_create_subpos", e))(Fn || {}), _i = {}, Ee = {};
|
|
2424
2424
|
Object.defineProperty(Ee, "__esModule", { value: !0 });
|
|
2425
2425
|
Ee.F_DISPLAY_NOTIFICATION_TYPE = Ee.F_DISPLAY_ACTION_EVENT = Ee.F_DISPLAY_SYSTEM_EVENT = void 0;
|
|
2426
2426
|
const Ut = we;
|
|
@@ -2444,41 +2444,41 @@ Ee.F_DISPLAY_NOTIFICATION_TYPE = Ut.z.enum([
|
|
|
2444
2444
|
"Warning",
|
|
2445
2445
|
"Error"
|
|
2446
2446
|
]);
|
|
2447
|
-
var
|
|
2448
|
-
Object.defineProperty(
|
|
2449
|
-
|
|
2447
|
+
var vt = {}, ie = {};
|
|
2448
|
+
Object.defineProperty(ie, "__esModule", { value: !0 });
|
|
2449
|
+
ie.F_PRINTER_PRINT_CUSTOMIZE = ie.F_PAPER_DIRECTION = ie.F_PRINTER_TYPE = ie.F_PRINTER_CONNECTOR = ie.F_STAR_EMULATION_MODE = void 0;
|
|
2450
2450
|
const ot = we;
|
|
2451
|
-
|
|
2451
|
+
ie.F_STAR_EMULATION_MODE = ot.z.enum([
|
|
2452
2452
|
"StarPRNT",
|
|
2453
2453
|
"StarLine",
|
|
2454
2454
|
"StarGraphic"
|
|
2455
2455
|
]);
|
|
2456
|
-
|
|
2456
|
+
ie.F_PRINTER_CONNECTOR = ot.z.enum([
|
|
2457
2457
|
"IP",
|
|
2458
2458
|
"USB",
|
|
2459
2459
|
"BLUETOOTH",
|
|
2460
2460
|
"STAR"
|
|
2461
2461
|
]);
|
|
2462
|
-
|
|
2462
|
+
ie.F_PRINTER_TYPE = ot.z.enum([
|
|
2463
2463
|
"ESCPOS",
|
|
2464
2464
|
"TSPL",
|
|
2465
2465
|
"STAR",
|
|
2466
2466
|
"KITCHEN_KDS",
|
|
2467
2467
|
"WINDOW_KDS"
|
|
2468
2468
|
]);
|
|
2469
|
-
|
|
2469
|
+
ie.F_PAPER_DIRECTION = ot.z.nativeEnum({
|
|
2470
2470
|
NORMAL: "0",
|
|
2471
2471
|
REVERSE: "1"
|
|
2472
2472
|
});
|
|
2473
|
-
|
|
2473
|
+
ie.F_PRINTER_PRINT_CUSTOMIZE = ot.z.enum([
|
|
2474
2474
|
"ALL",
|
|
2475
2475
|
"ITEMS",
|
|
2476
2476
|
"DEPARTMENTS"
|
|
2477
2477
|
]);
|
|
2478
|
-
Object.defineProperty(
|
|
2479
|
-
|
|
2480
|
-
const w = we,
|
|
2481
|
-
|
|
2478
|
+
Object.defineProperty(vt, "__esModule", { value: !0 });
|
|
2479
|
+
vt.FdoPrinterInfo = void 0;
|
|
2480
|
+
const w = we, gi = pt, ut = ie;
|
|
2481
|
+
vt.FdoPrinterInfo = w.z.object({
|
|
2482
2482
|
_id: w.z.string(),
|
|
2483
2483
|
connector: ut.F_PRINTER_CONNECTOR,
|
|
2484
2484
|
type: ut.F_PRINTER_TYPE,
|
|
@@ -2526,12 +2526,12 @@ _t.FdoPrinterInfo = w.z.object({
|
|
|
2526
2526
|
waitForStatus: w.z.boolean().nullish(),
|
|
2527
2527
|
printFinishCook: w.z.boolean().nullish(),
|
|
2528
2528
|
isTextEncoding: w.z.boolean().nullish()
|
|
2529
|
-
}).describe(
|
|
2530
|
-
var
|
|
2531
|
-
Object.defineProperty(
|
|
2532
|
-
|
|
2529
|
+
}).describe(gi.ZodMeta.couch().repo("printerInfo").build());
|
|
2530
|
+
var _t = {};
|
|
2531
|
+
Object.defineProperty(_t, "__esModule", { value: !0 });
|
|
2532
|
+
_t.FdtoFlatItem = void 0;
|
|
2533
2533
|
const tn = ln, Ft = we;
|
|
2534
|
-
|
|
2534
|
+
_t.FdtoFlatItem = Ft.z.object({
|
|
2535
2535
|
itemKey: Ft.z.string(),
|
|
2536
2536
|
item: tn.FdoBillItem,
|
|
2537
2537
|
parentKey: Ft.z.string().nullish(),
|
|
@@ -2753,19 +2753,19 @@ var Rn = {};
|
|
|
2753
2753
|
(function(e) {
|
|
2754
2754
|
var t = lt && lt.__createBinding || (Object.create ? function(o, s, c, d) {
|
|
2755
2755
|
d === void 0 && (d = c);
|
|
2756
|
-
var
|
|
2757
|
-
(!
|
|
2756
|
+
var i = Object.getOwnPropertyDescriptor(s, c);
|
|
2757
|
+
(!i || ("get" in i ? !s.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
2758
2758
|
return s[c];
|
|
2759
|
-
} }), Object.defineProperty(o, d,
|
|
2759
|
+
} }), Object.defineProperty(o, d, i);
|
|
2760
2760
|
} : function(o, s, c, d) {
|
|
2761
2761
|
d === void 0 && (d = c), o[d] = s[c];
|
|
2762
2762
|
}), n = lt && lt.__exportStar || function(o, s) {
|
|
2763
2763
|
for (var c in o)
|
|
2764
2764
|
c !== "default" && !Object.prototype.hasOwnProperty.call(s, c) && t(s, o, c);
|
|
2765
2765
|
};
|
|
2766
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), n(Ee, e), n(
|
|
2767
|
-
})(
|
|
2768
|
-
const
|
|
2766
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), n(Ee, e), n(vt, e), n(_t, e), n(ie, e), n(pe, e), n(Cn, e), n(bt, e), n(kn, e), n(Rn, e);
|
|
2767
|
+
})(_i);
|
|
2768
|
+
const bi = { class: "fm-typo-en-body-md-400" }, yi = { class: "xs:flex-col-reverse flex items-center justify-end gap-8 sm:flex-col-reverse" }, Ti = /* @__PURE__ */ Ne({
|
|
2769
2769
|
__name: "CreateDeviceDialog",
|
|
2770
2770
|
setup(e) {
|
|
2771
2771
|
const { t } = Se(), n = ft(), o = Q(
|
|
@@ -2774,20 +2774,20 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
2774
2774
|
value: O._id
|
|
2775
2775
|
})).sort((O, E) => O.label.toLowerCase().localeCompare(E.label.toLowerCase()))
|
|
2776
2776
|
), s = N([]), c = async () => {
|
|
2777
|
-
|
|
2777
|
+
i.value && (s.value = await J.getPrinters(i.value), F.value = []);
|
|
2778
2778
|
}, d = Q(
|
|
2779
2779
|
() => s.value.map((O) => ({
|
|
2780
2780
|
label: O.name,
|
|
2781
2781
|
value: O._id
|
|
2782
2782
|
}))
|
|
2783
|
-
),
|
|
2784
|
-
restaurantId:
|
|
2785
|
-
name:
|
|
2783
|
+
), i = N(o.value.length === 1 ? o.value[0].value : ""), v = N(""), y = N(X.Enum.COUNTER), F = N([]), { emitData: A } = rn(), x = Q(() => ({
|
|
2784
|
+
restaurantId: i.value,
|
|
2785
|
+
name: v.value,
|
|
2786
2786
|
type: y.value,
|
|
2787
2787
|
printers: F.value
|
|
2788
2788
|
}));
|
|
2789
2789
|
je(
|
|
2790
|
-
[
|
|
2790
|
+
[i, v, y, F],
|
|
2791
2791
|
() => {
|
|
2792
2792
|
A(x.value);
|
|
2793
2793
|
},
|
|
@@ -2799,7 +2799,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
2799
2799
|
}
|
|
2800
2800
|
const P = qe(), L = St(), { getUserFlagValue: j } = Bn(), G = async () => {
|
|
2801
2801
|
try {
|
|
2802
|
-
const O = (await J.getDevices(
|
|
2802
|
+
const O = (await J.getDevices(i.value)).filter((T) => T.type != X.Enum.MAIN), E = await j(i.value, Fn.licensePosCreateSubPos, 3);
|
|
2803
2803
|
if (E && O.length >= E) {
|
|
2804
2804
|
P.open({
|
|
2805
2805
|
message: t("device.status.creation.limitError", { limit: E }),
|
|
@@ -2827,53 +2827,53 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
2827
2827
|
};
|
|
2828
2828
|
return je(F, (O) => {
|
|
2829
2829
|
D.value = O.length === d.value.length;
|
|
2830
|
-
}), je(
|
|
2831
|
-
const T = I("FmSelect"), U = I("FmTextField"), se = I("FmCheckbox"),
|
|
2830
|
+
}), je(i, c), (O, E) => {
|
|
2831
|
+
const T = I("FmSelect"), U = I("FmTextField"), se = I("FmCheckbox"), $ = I("FmSpacer"), ae = I("FmButton"), ce = I("FmForm");
|
|
2832
2832
|
return p(), V(ce, {
|
|
2833
2833
|
onValidationSuccess: G,
|
|
2834
2834
|
class: "flex flex-col gap-5 py-2"
|
|
2835
2835
|
}, {
|
|
2836
2836
|
default: k(() => [
|
|
2837
2837
|
f(T, {
|
|
2838
|
-
modelValue:
|
|
2839
|
-
"onUpdate:modelValue": E[0] || (E[0] = (ee) =>
|
|
2840
|
-
label:
|
|
2838
|
+
modelValue: i.value,
|
|
2839
|
+
"onUpdate:modelValue": E[0] || (E[0] = (ee) => i.value = ee),
|
|
2840
|
+
label: a(t)("device.creation.fields.restaurant.label"),
|
|
2841
2841
|
items: o.value,
|
|
2842
|
-
placeholder:
|
|
2843
|
-
rules: [
|
|
2842
|
+
placeholder: a(t)("device.creation.fields.restaurant.label"),
|
|
2843
|
+
rules: [a(Ie).required()]
|
|
2844
2844
|
}, null, 8, ["modelValue", "label", "items", "placeholder", "rules"]),
|
|
2845
2845
|
f(U, {
|
|
2846
|
-
modelValue:
|
|
2847
|
-
"onUpdate:modelValue": E[1] || (E[1] = (ee) =>
|
|
2848
|
-
label:
|
|
2849
|
-
placeholder:
|
|
2850
|
-
rules: [
|
|
2846
|
+
modelValue: v.value,
|
|
2847
|
+
"onUpdate:modelValue": E[1] || (E[1] = (ee) => v.value = ee),
|
|
2848
|
+
label: a(t)("device.creation.fields.name.label"),
|
|
2849
|
+
placeholder: a(t)("device.creation.fields.name.placeholder"),
|
|
2850
|
+
rules: [a(Ie).nonEmpty()]
|
|
2851
2851
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"]),
|
|
2852
2852
|
f(T, {
|
|
2853
2853
|
modelValue: y.value,
|
|
2854
2854
|
"onUpdate:modelValue": E[2] || (E[2] = (ee) => y.value = ee),
|
|
2855
2855
|
items: [
|
|
2856
2856
|
{
|
|
2857
|
-
label:
|
|
2858
|
-
value:
|
|
2857
|
+
label: a(t)("device.creation.fields.type.options.counter"),
|
|
2858
|
+
value: a(X).Enum.COUNTER
|
|
2859
2859
|
},
|
|
2860
2860
|
{
|
|
2861
|
-
label:
|
|
2862
|
-
value:
|
|
2861
|
+
label: a(t)("device.creation.fields.type.options.orderStation"),
|
|
2862
|
+
value: a(X).Enum.ORDER_STATION
|
|
2863
2863
|
}
|
|
2864
2864
|
],
|
|
2865
|
-
label:
|
|
2866
|
-
placeholder:
|
|
2867
|
-
rules: [
|
|
2865
|
+
label: a(t)("device.creation.fields.type.label"),
|
|
2866
|
+
placeholder: a(t)("device.creation.fields.type.placeholder"),
|
|
2867
|
+
rules: [a(Ie).required()]
|
|
2868
2868
|
}, null, 8, ["modelValue", "items", "label", "placeholder", "rules"]),
|
|
2869
|
-
|
|
2869
|
+
i.value && d.value.length ? (p(), V(T, {
|
|
2870
2870
|
key: 0,
|
|
2871
2871
|
multiselect: "",
|
|
2872
2872
|
modelValue: F.value,
|
|
2873
2873
|
"onUpdate:modelValue": E[4] || (E[4] = (ee) => F.value = ee),
|
|
2874
2874
|
items: d.value,
|
|
2875
|
-
label:
|
|
2876
|
-
placeholder:
|
|
2875
|
+
label: a(t)("device.creation.fields.printer.label"),
|
|
2876
|
+
placeholder: a(t)("device.creation.fields.printer.placeholder")
|
|
2877
2877
|
}, {
|
|
2878
2878
|
"prepend-menu": k(() => [
|
|
2879
2879
|
f(se, {
|
|
@@ -2885,26 +2885,26 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
2885
2885
|
value: !0
|
|
2886
2886
|
}, {
|
|
2887
2887
|
label: k(() => [
|
|
2888
|
-
|
|
2888
|
+
r("div", bi, h(a(t)("device.filters.all")), 1)
|
|
2889
2889
|
]),
|
|
2890
2890
|
_: 1
|
|
2891
2891
|
}, 8, ["indeterminate", "model-value"])
|
|
2892
2892
|
]),
|
|
2893
2893
|
_: 1
|
|
2894
2894
|
}, 8, ["modelValue", "items", "label", "placeholder"])) : C("", !0),
|
|
2895
|
-
|
|
2896
|
-
f(
|
|
2897
|
-
f(
|
|
2895
|
+
r("div", yi, [
|
|
2896
|
+
f($, { class: "xs:hidden sm:hidden" }),
|
|
2897
|
+
f(ae, {
|
|
2898
2898
|
class: "xs:w-full sm:w-full",
|
|
2899
2899
|
variant: "secondary",
|
|
2900
|
-
label:
|
|
2900
|
+
label: a(t)("device.actions.cancel"),
|
|
2901
2901
|
size: "md",
|
|
2902
|
-
onClick: E[5] || (E[5] = (ee) =>
|
|
2902
|
+
onClick: E[5] || (E[5] = (ee) => a(L).close())
|
|
2903
2903
|
}, null, 8, ["label"]),
|
|
2904
|
-
f(
|
|
2904
|
+
f(ae, {
|
|
2905
2905
|
class: "xs:w-full sm:w-full",
|
|
2906
2906
|
variant: "primary",
|
|
2907
|
-
label:
|
|
2907
|
+
label: a(t)("device.actions.create"),
|
|
2908
2908
|
size: "md",
|
|
2909
2909
|
type: "submit"
|
|
2910
2910
|
}, null, 8, ["label"])
|
|
@@ -2914,81 +2914,81 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
2914
2914
|
});
|
|
2915
2915
|
};
|
|
2916
2916
|
}
|
|
2917
|
-
}),
|
|
2917
|
+
}), Ii = { class: "flex flex-col p-5 bg-white gap-5" }, Ei = { class: "flex items-center" }, wi = { class: "fm-typo-en-title-md-600" }, Fi = {
|
|
2918
2918
|
key: 0,
|
|
2919
2919
|
class: "flex gap-8"
|
|
2920
|
-
},
|
|
2920
|
+
}, Ci = { class: "flex gap-4 pb-5" }, ki = { key: 0 }, Ri = { class: "flex flex-col gap-1 overflow-y-auto h-full" }, Oi = { class: "flex w-full justify-between" }, Si = { class: "w-full" }, Ai = { class: "max-w-[250px]" }, Di = { class: "max-h-[310px] overflow-y-auto" }, xi = { class: "w-full" }, zi = { class: "w-[200px]" }, Ni = { class: "grow flex flex-col gap-8" }, Pi = { class: "flex flex-row gap-4 flex-wrap items-center" }, Ui = { class: "fm-typo-en-body-lg-600" }, Li = { key: 0 }, Mi = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bi = {
|
|
2921
2921
|
key: 0,
|
|
2922
2922
|
class: "flex gap-8"
|
|
2923
|
-
}, $
|
|
2923
|
+
}, $i = {
|
|
2924
2924
|
key: 0,
|
|
2925
2925
|
class: "flex items-center"
|
|
2926
|
-
},
|
|
2926
|
+
}, Vi = { class: "flex flex-row gap-4" }, ji = {
|
|
2927
2927
|
key: 3,
|
|
2928
2928
|
class: "fixed bottom-72 right-16"
|
|
2929
|
-
},
|
|
2929
|
+
}, Ki = /* @__PURE__ */ Ne({
|
|
2930
2930
|
__name: "DeviceList",
|
|
2931
2931
|
setup(e) {
|
|
2932
|
-
const { t } = Se(), { isAtMost: n } = Ot(), o = ft(), s = an(), c = St(), d = qe(),
|
|
2933
|
-
var
|
|
2934
|
-
return (
|
|
2935
|
-
}),
|
|
2936
|
-
var
|
|
2932
|
+
const { t } = Se(), { isAtMost: n } = Ot(), o = ft(), s = an(), c = St(), d = qe(), i = Q(() => {
|
|
2933
|
+
var l;
|
|
2934
|
+
return (l = o.restaurants.value) == null ? void 0 : l.filter((u) => u.managable);
|
|
2935
|
+
}), v = Q(() => s.getCustomerDisplayImages()), y = N(!1), F = N([]), A = N([]), x = N([]), D = N(""), S = N(!0), P = async () => {
|
|
2936
|
+
var l;
|
|
2937
2937
|
try {
|
|
2938
2938
|
const u = await J.getDevicesFromRestaurants();
|
|
2939
|
-
F.value = u.map((
|
|
2940
|
-
...
|
|
2941
|
-
type:
|
|
2942
|
-
restaurantName: fe(
|
|
2943
|
-
images:
|
|
2944
|
-
})), A.value = (
|
|
2939
|
+
F.value = u.map((_) => ({
|
|
2940
|
+
..._,
|
|
2941
|
+
type: _.type ?? "UNASSIGNED",
|
|
2942
|
+
restaurantName: fe(_.restaurantId),
|
|
2943
|
+
images: _.type === X.Enum.MAIN ? de(_.restaurantId) : []
|
|
2944
|
+
})), A.value = (l = i.value) == null ? void 0 : l.map((_) => _._id), x.value = O.value.map((_) => _.value);
|
|
2945
2945
|
} catch (u) {
|
|
2946
2946
|
console.error("Failed to get restaurants devices:", u);
|
|
2947
2947
|
}
|
|
2948
|
-
}, L = (
|
|
2948
|
+
}, L = (l, u) => l.type === X.Enum.MAIN ? -1 : u.type === X.Enum.MAIN ? 1 : l.type.toLowerCase() !== u.type.toLowerCase() ? l.type.toLowerCase() > u.type.toLowerCase() ? 1 : -1 : l.createdAt && u.createdAt ? l.createdAt < u.createdAt ? 1 : -1 : 0, j = Q(() => {
|
|
2949
2949
|
if (S.value)
|
|
2950
2950
|
return [];
|
|
2951
|
-
const
|
|
2952
|
-
const
|
|
2953
|
-
return
|
|
2951
|
+
const l = D.value.toLowerCase(), u = F.value.filter((_) => {
|
|
2952
|
+
const B = A.value.includes(_.restaurantId), _e = x.value.includes(_.type);
|
|
2953
|
+
return B && _e;
|
|
2954
2954
|
});
|
|
2955
|
-
return
|
|
2956
|
-
(
|
|
2955
|
+
return l ? u.filter(
|
|
2956
|
+
(_) => JSON.stringify({ ..._ }).toLowerCase().includes(l)
|
|
2957
2957
|
).sort(L) : u.sort(L);
|
|
2958
2958
|
}), G = Q(
|
|
2959
|
-
() =>
|
|
2960
|
-
label:
|
|
2961
|
-
value:
|
|
2959
|
+
() => i.value.map((l) => ({
|
|
2960
|
+
label: l.profile.name,
|
|
2961
|
+
value: l._id
|
|
2962
2962
|
}))
|
|
2963
2963
|
), O = Q(
|
|
2964
|
-
() => F.value.map((
|
|
2965
|
-
label:
|
|
2966
|
-
value:
|
|
2967
|
-
})).filter((
|
|
2968
|
-
), E = (
|
|
2969
|
-
const
|
|
2970
|
-
|
|
2971
|
-
}, T = (
|
|
2972
|
-
|
|
2973
|
-
}, U = (
|
|
2974
|
-
var
|
|
2975
|
-
return
|
|
2976
|
-
}, se = (
|
|
2977
|
-
if (!
|
|
2964
|
+
() => F.value.map((l) => ({
|
|
2965
|
+
label: l.type ? wt(l.type) : l.type,
|
|
2966
|
+
value: l.type
|
|
2967
|
+
})).filter((l, u) => u === F.value.findIndex((_) => l.value === _.type))
|
|
2968
|
+
), E = (l, u) => {
|
|
2969
|
+
const _ = l.indexOf(u.value);
|
|
2970
|
+
_ === -1 ? l.push(u.value) : l.splice(_, 1);
|
|
2971
|
+
}, T = (l, u) => {
|
|
2972
|
+
l.splice(0, l.length, ...l.length ? [] : u.map((_) => _.value));
|
|
2973
|
+
}, U = (l, u, _) => {
|
|
2974
|
+
var B;
|
|
2975
|
+
return l.length === 0 ? "" : l.length === u.length ? `${_}: ${t("device.filters.all")}` : l.length === 1 && !n("sm") ? (B = u.find((_e) => _e.value === l[0])) == null ? void 0 : B.label : t("device.filters.selected", { count: l.length });
|
|
2976
|
+
}, se = (l) => {
|
|
2977
|
+
if (!l.restaurantId)
|
|
2978
2978
|
return;
|
|
2979
|
-
const
|
|
2979
|
+
const u = "dev", _ = `https://grafana.feedme.farm/d/ee5tjb68adwjkb/pos-dashboard-quickwit?orgId=1&var-maxRows=1000&var-severity=All&var-env=${u}&var-country=All&var-restaurantId=${l.restaurantId}`, B = `https://grafana.feedme.farm/d/b61ac933-5533-4e2f-b0b5-d600a51e5a3f/kds-dashboard?orgId=1&var-maxRows=1000&var-severity=All&var-env=${u}&var-country=All&var-type=$__all&var-restaurantId=${l.restaurantId}`;
|
|
2980
2980
|
d.open({
|
|
2981
|
-
message: t("device.logs.redirect", { name:
|
|
2981
|
+
message: t("device.logs.redirect", { name: l.name ?? fe(l.restaurantId) }),
|
|
2982
2982
|
type: "success",
|
|
2983
2983
|
position: W.BOTTOM
|
|
2984
|
-
}), setTimeout(() => window.open(
|
|
2985
|
-
},
|
|
2986
|
-
|
|
2984
|
+
}), setTimeout(() => window.open(l.type === X.Enum.KDS ? B : _, "_blank"), 500);
|
|
2985
|
+
}, $ = async (l) => {
|
|
2986
|
+
l.machineId && await J.checkDeviceStatus(l.machineId).then((u) => {
|
|
2987
2987
|
c.open({
|
|
2988
2988
|
title: t("device.logs.download.title"),
|
|
2989
|
-
contentComponent:
|
|
2989
|
+
contentComponent: ci,
|
|
2990
2990
|
contentComponentProps: {
|
|
2991
|
-
machineId:
|
|
2991
|
+
machineId: l.machineId,
|
|
2992
2992
|
deviceStatus: u.status,
|
|
2993
2993
|
statusMessage: u.message
|
|
2994
2994
|
}
|
|
@@ -3000,46 +3000,46 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3000
3000
|
position: W.BOTTOM
|
|
3001
3001
|
});
|
|
3002
3002
|
});
|
|
3003
|
-
},
|
|
3004
|
-
|
|
3003
|
+
}, ae = (l) => {
|
|
3004
|
+
l.restaurantId && c.open({
|
|
3005
3005
|
title: t("device.actions.unbindDevice"),
|
|
3006
|
-
contentComponent:
|
|
3006
|
+
contentComponent: vi,
|
|
3007
3007
|
contentComponentProps: {
|
|
3008
|
-
restaurantName:
|
|
3008
|
+
restaurantName: l.restaurantName
|
|
3009
3009
|
},
|
|
3010
3010
|
primaryActions: { text: t("device.actions.unbind"), close: !1, variant: "destructive" },
|
|
3011
3011
|
secondaryActions: { text: t("device.actions.cancel"), close: !0 }
|
|
3012
3012
|
}).onPrimary(async (u) => {
|
|
3013
|
-
u !=
|
|
3014
|
-
if (
|
|
3015
|
-
await J.mdmUnbindDevice(
|
|
3013
|
+
u != l.restaurantName || !l.restaurantId || (await J.unbindDevice(l.restaurantId).catch(async (_) => {
|
|
3014
|
+
if (_ === "Restaurant has no machine" && l.machineId)
|
|
3015
|
+
await J.mdmUnbindDevice(l.machineId);
|
|
3016
3016
|
else
|
|
3017
|
-
throw
|
|
3017
|
+
throw _;
|
|
3018
3018
|
}).then(async () => {
|
|
3019
3019
|
await he(), d.open({
|
|
3020
3020
|
message: t("device.status.unbind.success", { name: u }),
|
|
3021
3021
|
type: "success",
|
|
3022
3022
|
position: W.BOTTOM
|
|
3023
3023
|
});
|
|
3024
|
-
}).catch((
|
|
3024
|
+
}).catch((_) => {
|
|
3025
3025
|
d.open({
|
|
3026
|
-
message: t("device.error.general", { error:
|
|
3026
|
+
message: t("device.error.general", { error: _ }),
|
|
3027
3027
|
type: "error",
|
|
3028
3028
|
position: W.BOTTOM
|
|
3029
3029
|
});
|
|
3030
3030
|
}), c.close());
|
|
3031
3031
|
});
|
|
3032
|
-
}, ce = N(""), ee = async (
|
|
3032
|
+
}, ce = N(""), ee = async (l) => {
|
|
3033
3033
|
ce.value = "";
|
|
3034
|
-
const u = await J.generateDeviceOtp(
|
|
3034
|
+
const u = await J.generateDeviceOtp(l);
|
|
3035
3035
|
ce.value = u.machineOtp ?? "";
|
|
3036
|
-
}, Pe = async (
|
|
3037
|
-
|
|
3036
|
+
}, Pe = async (l) => {
|
|
3037
|
+
l.restaurantId && await ee(l.restaurantId).then(() => {
|
|
3038
3038
|
c.open({
|
|
3039
3039
|
title: t("device.actions.bindDevice"),
|
|
3040
3040
|
contentComponent: Wn,
|
|
3041
3041
|
contentComponentProps: {
|
|
3042
|
-
restaurantId:
|
|
3042
|
+
restaurantId: l.restaurantId,
|
|
3043
3043
|
get otp() {
|
|
3044
3044
|
return ce.value;
|
|
3045
3045
|
},
|
|
@@ -3050,14 +3050,14 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3050
3050
|
primaryActions: { text: t("device.actions.regenerate"), close: !1 },
|
|
3051
3051
|
secondaryActions: { text: t("device.actions.cancel"), close: !0 }
|
|
3052
3052
|
}).onPrimary(async () => {
|
|
3053
|
-
|
|
3053
|
+
l.restaurantId && await ee(l.restaurantId);
|
|
3054
3054
|
}).onClose(async () => {
|
|
3055
3055
|
await he();
|
|
3056
3056
|
let u = F.value.find(
|
|
3057
|
-
(
|
|
3057
|
+
(_) => _.restaurantId === l.restaurantId && _.type === X.Enum.MAIN && _.machineId
|
|
3058
3058
|
);
|
|
3059
3059
|
u && u.restaurantId && d.open({
|
|
3060
|
-
message: t("device.status.bind.success", { name:
|
|
3060
|
+
message: t("device.status.bind.success", { name: l.restaurantName }),
|
|
3061
3061
|
type: "success",
|
|
3062
3062
|
position: W.BOTTOM
|
|
3063
3063
|
});
|
|
@@ -3077,7 +3077,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3077
3077
|
secondaryActions: { text: t("device.actions.cancel"), close: !0 }
|
|
3078
3078
|
}).onPrimary(async () => {
|
|
3079
3079
|
c.close();
|
|
3080
|
-
const
|
|
3080
|
+
const l = d.open({
|
|
3081
3081
|
message: t("device.status.sync.inProgress"),
|
|
3082
3082
|
spinner: !0,
|
|
3083
3083
|
type: "info",
|
|
@@ -3085,7 +3085,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3085
3085
|
});
|
|
3086
3086
|
await J.forceSync().then(async () => {
|
|
3087
3087
|
await he(), setTimeout(() => {
|
|
3088
|
-
d.updateSnackbar(
|
|
3088
|
+
d.updateSnackbar(l, {
|
|
3089
3089
|
message: t("device.status.sync.success"),
|
|
3090
3090
|
spinner: !1,
|
|
3091
3091
|
type: "success",
|
|
@@ -3093,7 +3093,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3093
3093
|
});
|
|
3094
3094
|
}, 500);
|
|
3095
3095
|
}).catch((u) => {
|
|
3096
|
-
d.updateSnackbar(
|
|
3096
|
+
d.updateSnackbar(l, {
|
|
3097
3097
|
message: t("device.status.sync.error", { error: u }),
|
|
3098
3098
|
spinner: !1,
|
|
3099
3099
|
type: "error",
|
|
@@ -3101,23 +3101,23 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3101
3101
|
});
|
|
3102
3102
|
});
|
|
3103
3103
|
});
|
|
3104
|
-
}, fe = (
|
|
3105
|
-
var u,
|
|
3106
|
-
return (
|
|
3107
|
-
}, ue = (
|
|
3104
|
+
}, fe = (l) => {
|
|
3105
|
+
var u, _;
|
|
3106
|
+
return (_ = (u = i.value) == null ? void 0 : u.find((B) => B._id === l)) == null ? void 0 : _.profile.name;
|
|
3107
|
+
}, ue = (l) => new Date(l).toLocaleDateString("en-GB", {
|
|
3108
3108
|
day: "2-digit",
|
|
3109
3109
|
month: "short",
|
|
3110
3110
|
year: "numeric",
|
|
3111
3111
|
hour: "2-digit",
|
|
3112
3112
|
minute: "2-digit",
|
|
3113
3113
|
hour12: !0
|
|
3114
|
-
}).toUpperCase().split(","), de = (
|
|
3115
|
-
const u = [{ label: t("device.menu.logs"), value: "logs", onClick: () => se(
|
|
3116
|
-
return
|
|
3114
|
+
}).toUpperCase().split(","), de = (l) => v.value.filter((u) => u.restaurantIds.includes(l)).map((u) => u.url), m = (l) => l.slice(0, 3), z = (l) => {
|
|
3115
|
+
const u = [{ label: t("device.menu.logs"), value: "logs", onClick: () => se(l) }];
|
|
3116
|
+
return l.machineId && u.push({ label: t("device.menu.downloadLogs"), value: "download_logs", onClick: () => $(l) }), l.deviceId && u.push({
|
|
3117
3117
|
label: t("device.menu.configurations"),
|
|
3118
3118
|
value: "configurations",
|
|
3119
3119
|
onClick: () => {
|
|
3120
|
-
Ae.value =
|
|
3120
|
+
Ae.value = l, ve.value = !0;
|
|
3121
3121
|
}
|
|
3122
3122
|
}), u;
|
|
3123
3123
|
}, Y = [
|
|
@@ -3125,9 +3125,9 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3125
3125
|
id: "deviceName",
|
|
3126
3126
|
accessorKey: "name",
|
|
3127
3127
|
header: () => t("device.table.columns.deviceName"),
|
|
3128
|
-
cell: (
|
|
3129
|
-
let u =
|
|
3130
|
-
return
|
|
3128
|
+
cell: (l) => {
|
|
3129
|
+
let u = l.row.original, _ = u.name;
|
|
3130
|
+
return l.row.original.type === X.Enum.MAIN && (_ = u.restaurantName), Z("div", { class: "text-ellipsis overflow-hidden text-balance" }, _ ?? "-");
|
|
3131
3131
|
},
|
|
3132
3132
|
meta: {
|
|
3133
3133
|
width: "220px"
|
|
@@ -3137,18 +3137,18 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3137
3137
|
id: "displayImage",
|
|
3138
3138
|
accessorKey: "images",
|
|
3139
3139
|
header: () => t("device.table.columns.displayImage"),
|
|
3140
|
-
cell(
|
|
3141
|
-
const u = m(
|
|
3142
|
-
return u.length > 0 ?
|
|
3140
|
+
cell(l) {
|
|
3141
|
+
const u = m(l.getValue()), _ = l.getValue().length - u.length;
|
|
3142
|
+
return u.length > 0 ? Z("div", { class: "flex gap-8" }, [
|
|
3143
3143
|
...u.map(
|
|
3144
|
-
(
|
|
3145
|
-
src:
|
|
3144
|
+
(B) => Z($e.FmThumbnail, {
|
|
3145
|
+
src: B,
|
|
3146
3146
|
size: n("sm") ? "sm" : "md",
|
|
3147
|
-
key:
|
|
3147
|
+
key: B
|
|
3148
3148
|
})
|
|
3149
3149
|
),
|
|
3150
|
-
|
|
3151
|
-
]) :
|
|
3150
|
+
_ > 0 && Z("span", { class: "flex items-center" }, `+${_}`)
|
|
3151
|
+
]) : Z("div", "-");
|
|
3152
3152
|
},
|
|
3153
3153
|
meta: {
|
|
3154
3154
|
width: "220px"
|
|
@@ -3158,7 +3158,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3158
3158
|
id: "restaurantName",
|
|
3159
3159
|
accessorKey: "restaurantName",
|
|
3160
3160
|
header: () => t("device.table.columns.restaurantName"),
|
|
3161
|
-
cell: (
|
|
3161
|
+
cell: (l) => Z("div", { class: "text-ellipsis overflow-hidden text-balance" }, l.getValue()),
|
|
3162
3162
|
meta: {
|
|
3163
3163
|
width: "220px"
|
|
3164
3164
|
}
|
|
@@ -3166,12 +3166,12 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3166
3166
|
{
|
|
3167
3167
|
accessorKey: "type",
|
|
3168
3168
|
header: () => t("device.table.columns.deviceType"),
|
|
3169
|
-
cell(
|
|
3170
|
-
return
|
|
3169
|
+
cell(l) {
|
|
3170
|
+
return Z(
|
|
3171
3171
|
"div",
|
|
3172
|
-
|
|
3172
|
+
Z($e.FmChip, {
|
|
3173
3173
|
variant: "plain",
|
|
3174
|
-
label: wt(
|
|
3174
|
+
label: wt(l.getValue()),
|
|
3175
3175
|
compact: !0
|
|
3176
3176
|
})
|
|
3177
3177
|
);
|
|
@@ -3183,12 +3183,12 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3183
3183
|
{
|
|
3184
3184
|
accessorKey: "bindAt",
|
|
3185
3185
|
header: () => t("device.table.columns.bindingAt"),
|
|
3186
|
-
cell: (
|
|
3187
|
-
if (
|
|
3188
|
-
const [u,
|
|
3189
|
-
return
|
|
3186
|
+
cell: (l) => {
|
|
3187
|
+
if (l.getValue()) {
|
|
3188
|
+
const [u, _] = ue(l.getValue());
|
|
3189
|
+
return Z("div", [Z("div", u), Z("div", _)]);
|
|
3190
3190
|
}
|
|
3191
|
-
return
|
|
3191
|
+
return Z("div", "-");
|
|
3192
3192
|
},
|
|
3193
3193
|
meta: {
|
|
3194
3194
|
width: "140px"
|
|
@@ -3196,19 +3196,19 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3196
3196
|
},
|
|
3197
3197
|
{
|
|
3198
3198
|
id: "bind-device",
|
|
3199
|
-
cell(
|
|
3200
|
-
let u =
|
|
3201
|
-
const
|
|
3202
|
-
if (u.type ===
|
|
3203
|
-
return
|
|
3199
|
+
cell(l) {
|
|
3200
|
+
let u = l.row.original;
|
|
3201
|
+
const _ = !!u.machineId;
|
|
3202
|
+
if (u.type === X.Enum.MAIN)
|
|
3203
|
+
return Z(
|
|
3204
3204
|
"div",
|
|
3205
3205
|
{ class: "flex items-center justify-center" },
|
|
3206
|
-
|
|
3207
|
-
prependIcon:
|
|
3206
|
+
Z($e.FmButton, {
|
|
3207
|
+
prependIcon: _ ? "link_off" : "link",
|
|
3208
3208
|
variant: "secondary",
|
|
3209
|
-
label: n("sm") ? void 0 : t(
|
|
3210
|
-
onClick(
|
|
3211
|
-
|
|
3209
|
+
label: n("sm") ? void 0 : t(_ ? "device.actions.unbindDevice" : "device.actions.bindDevice"),
|
|
3210
|
+
onClick(B) {
|
|
3211
|
+
B.stopPropagation(), _ ? ae(u) : Pe(u);
|
|
3212
3212
|
}
|
|
3213
3213
|
})
|
|
3214
3214
|
);
|
|
@@ -3219,12 +3219,12 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3219
3219
|
},
|
|
3220
3220
|
{
|
|
3221
3221
|
id: "logs",
|
|
3222
|
-
cell(
|
|
3223
|
-
var
|
|
3224
|
-
let u =
|
|
3225
|
-
return (
|
|
3222
|
+
cell(l) {
|
|
3223
|
+
var _;
|
|
3224
|
+
let u = l.row.original;
|
|
3225
|
+
return (_ = o.sessionUser.value) != null && _.role.isAdmin ? Z(
|
|
3226
3226
|
"div",
|
|
3227
|
-
|
|
3227
|
+
Z(
|
|
3228
3228
|
$e.FmMenu,
|
|
3229
3229
|
{
|
|
3230
3230
|
stopClickPropagation: !0,
|
|
@@ -3235,13 +3235,13 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3235
3235
|
},
|
|
3236
3236
|
{
|
|
3237
3237
|
default: () => z(u).map(
|
|
3238
|
-
(
|
|
3239
|
-
key:
|
|
3240
|
-
label:
|
|
3241
|
-
onClick:
|
|
3238
|
+
(B) => Z($e.FmMenuItem, {
|
|
3239
|
+
key: B.value,
|
|
3240
|
+
label: B.label,
|
|
3241
|
+
onClick: B.onClick
|
|
3242
3242
|
})
|
|
3243
3243
|
),
|
|
3244
|
-
"menu-button": () =>
|
|
3244
|
+
"menu-button": () => Z($e.FmButton, {
|
|
3245
3245
|
variant: "tertiary",
|
|
3246
3246
|
prependIcon: "more_vert"
|
|
3247
3247
|
})
|
|
@@ -3255,62 +3255,62 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3255
3255
|
}
|
|
3256
3256
|
], K = N(""), re = Q(
|
|
3257
3257
|
() => G.value.filter(
|
|
3258
|
-
(
|
|
3258
|
+
(l) => K.value ? l.label.toLowerCase().includes(K.value.toLowerCase()) : !0
|
|
3259
3259
|
)
|
|
3260
3260
|
), st = () => {
|
|
3261
3261
|
c.open({
|
|
3262
3262
|
title: t("device.creation.title"),
|
|
3263
|
-
contentComponent:
|
|
3263
|
+
contentComponent: Ti
|
|
3264
3264
|
}).onClose(async () => {
|
|
3265
3265
|
await he();
|
|
3266
3266
|
});
|
|
3267
3267
|
}, Ue = N(!1), Ce = N(!1), ke = N(), he = async () => {
|
|
3268
3268
|
S.value = !0, await o.readRestaurants(), await P(), await sn(), S.value = !1;
|
|
3269
|
-
}, { currentBusinessWithDisplayImages:
|
|
3270
|
-
je(Ce, async (
|
|
3269
|
+
}, { currentBusinessWithDisplayImages: at } = $n(s), yt = Q(() => o.currentBusiness.value);
|
|
3270
|
+
je(Ce, async (l) => {
|
|
3271
3271
|
var u;
|
|
3272
|
-
|
|
3272
|
+
l && ((u = ke.value) == null ? void 0 : u.type) === X.Enum.MAIN && (ke.value = void 0, await he()), Ce.value = !1;
|
|
3273
3273
|
});
|
|
3274
|
-
const Ae = N(),
|
|
3275
|
-
return je(
|
|
3276
|
-
|
|
3274
|
+
const Ae = N(), ve = N(!1);
|
|
3275
|
+
return je(ve, (l) => {
|
|
3276
|
+
l || (Ae.value = void 0);
|
|
3277
3277
|
}), mt(async () => {
|
|
3278
|
-
|
|
3279
|
-
}), (
|
|
3280
|
-
const
|
|
3281
|
-
return p(), g("div",
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
f(
|
|
3285
|
-
|
|
3286
|
-
f(
|
|
3278
|
+
at.value = yt.value, await J.forceSync(), await he();
|
|
3279
|
+
}), (l, u) => {
|
|
3280
|
+
const _ = I("FmSpacer"), B = I("FmButton"), _e = I("FmListItem"), He = I("FmList"), it = I("FmBottomSheet"), Le = I("FmMenuDivider"), Me = I("FmSearch"), Be = I("FmChip"), Re = I("FmMenuItem"), R = I("FmMenu"), M = I("FmTableToolbar"), ge = I("FmTable"), be = I("FmThumbnail"), De = I("FmCircularProgress");
|
|
3281
|
+
return p(), g("div", Ii, [
|
|
3282
|
+
r("div", Ei, [
|
|
3283
|
+
r("div", wi, h(a(t)("device.title")), 1),
|
|
3284
|
+
f(_),
|
|
3285
|
+
a(n)("sm") ? C("", !0) : (p(), g("div", Fi, [
|
|
3286
|
+
f(B, {
|
|
3287
3287
|
bgColor: "neutral-gray-100",
|
|
3288
3288
|
textColor: "typo-secondary",
|
|
3289
|
-
label:
|
|
3289
|
+
label: a(t)("device.actions.refresh"),
|
|
3290
3290
|
variant: "tertiary",
|
|
3291
3291
|
onClick: he
|
|
3292
3292
|
}, null, 8, ["label"]),
|
|
3293
|
-
f(
|
|
3293
|
+
f(B, {
|
|
3294
3294
|
bgColor: "neutral-gray-100",
|
|
3295
3295
|
textColor: "typo-secondary",
|
|
3296
|
-
label:
|
|
3296
|
+
label: a(t)("device.actions.forceSync"),
|
|
3297
3297
|
variant: "tertiary",
|
|
3298
3298
|
onClick: Fe
|
|
3299
3299
|
}, null, 8, ["label"]),
|
|
3300
|
-
f(
|
|
3300
|
+
f(B, {
|
|
3301
3301
|
icon: "add",
|
|
3302
|
-
label:
|
|
3302
|
+
label: a(t)("device.actions.addDevice"),
|
|
3303
3303
|
variant: "primary",
|
|
3304
3304
|
onClick: st
|
|
3305
3305
|
}, null, 8, ["label"])
|
|
3306
3306
|
])),
|
|
3307
|
-
|
|
3307
|
+
a(n)("sm") ? (p(), V(B, {
|
|
3308
3308
|
key: 1,
|
|
3309
3309
|
"prepend-icon": "more_vert",
|
|
3310
3310
|
variant: "tertiary",
|
|
3311
3311
|
onClick: u[0] || (u[0] = (b) => y.value = !0)
|
|
3312
3312
|
})) : C("", !0),
|
|
3313
|
-
f(
|
|
3313
|
+
f(it, {
|
|
3314
3314
|
zIndex: 100,
|
|
3315
3315
|
modelValue: y.value,
|
|
3316
3316
|
"onUpdate:modelValue": u[1] || (u[1] = (b) => y.value = b),
|
|
@@ -3318,15 +3318,15 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3318
3318
|
"no-header": ""
|
|
3319
3319
|
}, {
|
|
3320
3320
|
default: k(() => [
|
|
3321
|
-
|
|
3321
|
+
r("div", Ci, [
|
|
3322
3322
|
f(He, { class: "w-full" }, {
|
|
3323
3323
|
default: k(() => [
|
|
3324
|
-
f(
|
|
3325
|
-
label:
|
|
3324
|
+
f(_e, {
|
|
3325
|
+
label: a(t)("device.actions.refresh"),
|
|
3326
3326
|
onClick: he
|
|
3327
3327
|
}, null, 8, ["label"]),
|
|
3328
|
-
f(
|
|
3329
|
-
label:
|
|
3328
|
+
f(_e, {
|
|
3329
|
+
label: a(t)("device.actions.forceSync"),
|
|
3330
3330
|
onClick: Fe
|
|
3331
3331
|
}, null, 8, ["label"])
|
|
3332
3332
|
]),
|
|
@@ -3337,45 +3337,45 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3337
3337
|
_: 1
|
|
3338
3338
|
}, 8, ["modelValue"])
|
|
3339
3339
|
]),
|
|
3340
|
-
|
|
3340
|
+
a(n)("sm") ? (p(), g("div", ki, [
|
|
3341
3341
|
f(Le),
|
|
3342
3342
|
f(Me, {
|
|
3343
3343
|
modelValue: D.value,
|
|
3344
3344
|
"onUpdate:modelValue": u[2] || (u[2] = (b) => D.value = b),
|
|
3345
|
-
placeholder:
|
|
3345
|
+
placeholder: a(t)("device.actions.search")
|
|
3346
3346
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
3347
3347
|
f(Le)
|
|
3348
3348
|
])) : C("", !0),
|
|
3349
|
-
|
|
3349
|
+
r("div", Ri, [
|
|
3350
3350
|
f(M, { class: "gap-x-0" }, {
|
|
3351
3351
|
chips: k(() => [
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
class: on(["flex flex-row gap-2 mb-4 items-end",
|
|
3352
|
+
r("div", Oi, [
|
|
3353
|
+
r("div", {
|
|
3354
|
+
class: on(["flex flex-row gap-2 mb-4 items-end", a(n)("sm") ? "w-full justify-between" : ""])
|
|
3355
3355
|
}, [
|
|
3356
|
-
|
|
3356
|
+
r("div", Si, [
|
|
3357
3357
|
f(R, { "close-on-click": !1 }, {
|
|
3358
3358
|
"menu-button": k(() => [
|
|
3359
3359
|
f(Be, {
|
|
3360
|
-
label: U(A.value, G.value,
|
|
3360
|
+
label: U(A.value, G.value, a(t)("device.filters.restaurant.label")),
|
|
3361
3361
|
icon: "storefront",
|
|
3362
3362
|
"right-icon": "keyboard_arrow_down",
|
|
3363
3363
|
class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400 w-full"
|
|
3364
3364
|
}, null, 8, ["label"])
|
|
3365
3365
|
]),
|
|
3366
3366
|
default: k(() => [
|
|
3367
|
-
|
|
3367
|
+
r("div", Ai, [
|
|
3368
3368
|
f(Me, {
|
|
3369
3369
|
"model-value": K.value,
|
|
3370
3370
|
"onUpdate:modelValue": u[3] || (u[3] = (b) => K.value = b),
|
|
3371
|
-
placeholder:
|
|
3371
|
+
placeholder: a(t)("device.filters.restaurant.search"),
|
|
3372
3372
|
collapsible: !1
|
|
3373
3373
|
}, null, 8, ["model-value", "placeholder"]),
|
|
3374
3374
|
f(Le),
|
|
3375
|
-
|
|
3375
|
+
r("div", Di, [
|
|
3376
3376
|
f(Re, {
|
|
3377
3377
|
"model-value": A.value.length === G.value.length,
|
|
3378
|
-
label:
|
|
3378
|
+
label: a(t)("device.filters.all"),
|
|
3379
3379
|
"has-checkbox": !0,
|
|
3380
3380
|
indeterminate: A.value.length > 0,
|
|
3381
3381
|
onClick: u[4] || (u[4] = () => T(A.value, G.value))
|
|
@@ -3393,21 +3393,21 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3393
3393
|
_: 1
|
|
3394
3394
|
})
|
|
3395
3395
|
]),
|
|
3396
|
-
|
|
3396
|
+
r("div", xi, [
|
|
3397
3397
|
f(R, { "close-on-click": !1 }, {
|
|
3398
3398
|
"menu-button": k(() => [
|
|
3399
3399
|
f(Be, {
|
|
3400
|
-
label: U(x.value, O.value,
|
|
3400
|
+
label: U(x.value, O.value, a(t)("device.filters.deviceType")),
|
|
3401
3401
|
icon: "monitor",
|
|
3402
3402
|
"right-icon": "keyboard_arrow_down",
|
|
3403
3403
|
class: "fm-typo-en-body-md-600 text-fm-color-neutral-gray-400 w-full"
|
|
3404
3404
|
}, null, 8, ["label"])
|
|
3405
3405
|
]),
|
|
3406
3406
|
default: k(() => [
|
|
3407
|
-
|
|
3407
|
+
r("div", zi, [
|
|
3408
3408
|
f(Re, {
|
|
3409
3409
|
"model-value": x.value.length === O.value.length,
|
|
3410
|
-
label:
|
|
3410
|
+
label: a(t)("device.filters.all"),
|
|
3411
3411
|
"has-checkbox": !0,
|
|
3412
3412
|
indeterminate: x.value.length > 0,
|
|
3413
3413
|
onClick: u[5] || (u[5] = () => T(x.value, O.value))
|
|
@@ -3425,11 +3425,11 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3425
3425
|
})
|
|
3426
3426
|
])
|
|
3427
3427
|
], 2),
|
|
3428
|
-
|
|
3428
|
+
a(n)("sm") ? C("", !0) : (p(), V(Me, {
|
|
3429
3429
|
key: 0,
|
|
3430
3430
|
"model-value": D.value,
|
|
3431
3431
|
"onUpdate:modelValue": u[6] || (u[6] = (b) => D.value = b),
|
|
3432
|
-
placeholder:
|
|
3432
|
+
placeholder: a(t)("device.actions.search"),
|
|
3433
3433
|
collapsible: !1,
|
|
3434
3434
|
class: "w-[343px]"
|
|
3435
3435
|
}, null, 8, ["model-value", "placeholder"]))
|
|
@@ -3437,7 +3437,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3437
3437
|
]),
|
|
3438
3438
|
_: 1
|
|
3439
3439
|
}),
|
|
3440
|
-
|
|
3440
|
+
a(n)("sm") ? C("", !0) : (p(), V(ge, {
|
|
3441
3441
|
key: 0,
|
|
3442
3442
|
"shrink-at": !1,
|
|
3443
3443
|
"auto-reset-page-index": !0,
|
|
@@ -3450,13 +3450,13 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3450
3450
|
ke.value = b.original, Ue.value = !0;
|
|
3451
3451
|
}
|
|
3452
3452
|
}, null, 8, ["row-data", "loading", "hide-footer", "on-row-click"])),
|
|
3453
|
-
|
|
3453
|
+
a(n)("sm") && !S.value ? (p(), V(He, {
|
|
3454
3454
|
key: 1,
|
|
3455
3455
|
class: "w-full",
|
|
3456
3456
|
separator: ""
|
|
3457
3457
|
}, {
|
|
3458
3458
|
default: k(() => [
|
|
3459
|
-
(p(!0), g(oe, null, me(j.value, (b) => (p(), V(
|
|
3459
|
+
(p(!0), g(oe, null, me(j.value, (b) => (p(), V(_e, {
|
|
3460
3460
|
key: b._id,
|
|
3461
3461
|
style: { padding: "12px 0 !important" },
|
|
3462
3462
|
onClick: () => {
|
|
@@ -3464,35 +3464,35 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3464
3464
|
}
|
|
3465
3465
|
}, {
|
|
3466
3466
|
default: k(() => [
|
|
3467
|
-
|
|
3468
|
-
|
|
3467
|
+
r("div", Ni, [
|
|
3468
|
+
r("div", Pi, [
|
|
3469
3469
|
f(Be, {
|
|
3470
|
-
label:
|
|
3470
|
+
label: a(wt)(b.type),
|
|
3471
3471
|
variant: "plain",
|
|
3472
3472
|
compact: ""
|
|
3473
3473
|
}, null, 8, ["label"])
|
|
3474
3474
|
]),
|
|
3475
|
-
|
|
3475
|
+
r("div", Ui, [
|
|
3476
3476
|
Ct(h(b.restaurantName) + " ", 1),
|
|
3477
|
-
b.type !=
|
|
3477
|
+
b.type != a(X).Enum.MAIN ? (p(), g("span", Li, " - " + h(b.name), 1)) : C("", !0)
|
|
3478
3478
|
]),
|
|
3479
|
-
|
|
3480
|
-
|
|
3479
|
+
r("div", Mi, h(ue(b.createdAt)[0]) + " " + h(ue(b.createdAt)[1]), 1),
|
|
3480
|
+
v.value.length && b.type === a(X).Enum.MAIN ? (p(), g("div", Bi, [
|
|
3481
3481
|
(p(!0), g(oe, null, me(m(de(b.restaurantId)), (te) => (p(), g("div", { key: te }, [
|
|
3482
3482
|
f(be, {
|
|
3483
3483
|
src: te,
|
|
3484
3484
|
size: "md"
|
|
3485
3485
|
}, null, 8, ["src"])
|
|
3486
3486
|
]))), 128)),
|
|
3487
|
-
de(b.restaurantId).length - m(de(b.restaurantId)).length > 0 ? (p(), g("span", $
|
|
3487
|
+
de(b.restaurantId).length - m(de(b.restaurantId)).length > 0 ? (p(), g("span", $i, "+" + h(de(b.restaurantId).length - m(de(b.restaurantId)).length), 1)) : C("", !0)
|
|
3488
3488
|
])) : C("", !0)
|
|
3489
3489
|
]),
|
|
3490
|
-
|
|
3491
|
-
b.type ===
|
|
3490
|
+
r("div", Vi, [
|
|
3491
|
+
b.type === a(X).Enum.MAIN ? (p(), V(B, {
|
|
3492
3492
|
key: 0,
|
|
3493
3493
|
"prepend-icon": b.machineId ? "link_off" : "link",
|
|
3494
3494
|
variant: "tertiary",
|
|
3495
|
-
onClick: Rt(() => b.machineId ?
|
|
3495
|
+
onClick: Rt(() => b.machineId ? ae(b) : Pe(b), ["stop"])
|
|
3496
3496
|
}, null, 8, ["prepend-icon", "onClick"])) : C("", !0),
|
|
3497
3497
|
f(R, {
|
|
3498
3498
|
stopClickPropagation: !0,
|
|
@@ -3502,7 +3502,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3502
3502
|
minHeight: 3e3
|
|
3503
3503
|
}, {
|
|
3504
3504
|
"menu-button": k(() => [
|
|
3505
|
-
f(
|
|
3505
|
+
f(B, {
|
|
3506
3506
|
variant: "tertiary",
|
|
3507
3507
|
prependIcon: "more_vert"
|
|
3508
3508
|
})
|
|
@@ -3526,17 +3526,17 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3526
3526
|
key: 2,
|
|
3527
3527
|
class: "hidden sm:block xs:block"
|
|
3528
3528
|
})),
|
|
3529
|
-
|
|
3530
|
-
f(
|
|
3529
|
+
a(n)("sm") ? (p(), g("div", ji, [
|
|
3530
|
+
f(B, {
|
|
3531
3531
|
icon: "add",
|
|
3532
|
-
label:
|
|
3532
|
+
label: a(t)("device.actions.addDevice"),
|
|
3533
3533
|
onClick: st,
|
|
3534
3534
|
size: "lg"
|
|
3535
3535
|
}, null, 8, ["label"])
|
|
3536
3536
|
])) : C("", !0)
|
|
3537
3537
|
]),
|
|
3538
3538
|
(p(), V(Sn, { to: "body" }, [
|
|
3539
|
-
ke.value ? (p(), V(
|
|
3539
|
+
ke.value ? (p(), V(Da, {
|
|
3540
3540
|
key: 0,
|
|
3541
3541
|
visible: Ue.value,
|
|
3542
3542
|
"onUpdate:visible": u[7] || (u[7] = (b) => Ue.value = b),
|
|
@@ -3545,10 +3545,10 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3545
3545
|
"form-updated": Ce.value,
|
|
3546
3546
|
"onUpdate:formUpdated": u[8] || (u[8] = (b) => Ce.value = b)
|
|
3547
3547
|
}, null, 8, ["visible", "device", "devices", "form-updated"])) : C("", !0),
|
|
3548
|
-
Ae.value && Ae.value.deviceId ? (p(), V(
|
|
3548
|
+
Ae.value && Ae.value.deviceId ? (p(), V(pi, {
|
|
3549
3549
|
key: 1,
|
|
3550
|
-
visible:
|
|
3551
|
-
"onUpdate:visible": u[9] || (u[9] = (b) =>
|
|
3550
|
+
visible: ve.value,
|
|
3551
|
+
"onUpdate:visible": u[9] || (u[9] = (b) => ve.value = b),
|
|
3552
3552
|
device: Ae.value
|
|
3553
3553
|
}, null, 8, ["visible", "device"])) : C("", !0)
|
|
3554
3554
|
]))
|
|
@@ -3557,5 +3557,5 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
3557
3557
|
}
|
|
3558
3558
|
});
|
|
3559
3559
|
export {
|
|
3560
|
-
|
|
3560
|
+
Ki as default
|
|
3561
3561
|
};
|