@feedmepos/mf-order-setting 0.0.107 → 0.0.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DisplaySystemView-D4I6fQwr.js → DisplaySystemView-ChGTO4v2.js} +4 -4
- package/dist/{FoodCourtInvitationsView-DODbUcup.js → FoodCourtInvitationsView-F1LiGOR8.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-BPb_clxQ.js → FoodCourtOrderSettingsView-D5M5kFAl.js} +1 -1
- package/dist/{FoodCourtOrdersView-B4jGHCvq.js → FoodCourtOrdersView-BQrESoTH.js} +4 -4
- package/dist/{FoodCourtStallsView-Yo5imZIL.js → FoodCourtStallsView-jz1xnZus.js} +2 -2
- package/dist/{FoodCourtStatusView-Qmg07OHi.js → FoodCourtStatusView-DC3qHL1L.js} +1 -1
- package/dist/{KioskDevicesView-gnKpLlRc.js → KioskDevicesView-B9w4izOk.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-BvLOXC6b.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-XJm-f2JF.js} +5 -5
- package/dist/{KioskSettingView-CarJ2tfl.js → KioskSettingView-Bmfvz0Kz.js} +3 -3
- package/dist/{KioskView-BQxmKeWX.js → KioskView-B0WlDEsG.js} +281 -327
- package/dist/{OrderSettingsView-DvThEQW-.js → OrderSettingsView-BF89-eSB.js} +10 -10
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-CiZeQGB6.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-BqPQnAVb.js} +1 -1
- package/dist/{app-BvIV73_P.js → app-B4ew9SMz.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-B5uDRIkW.js → dayjs.min-BsZk4QHK.js} +1 -1
- package/dist/{featureFlag-BYngu4rF.js → featureFlag-CFlCo4uv.js} +1 -1
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-BBXEB6tY.js → index-C6c28uBZ.js} +1 -1
- package/dist/{index-BWR9_xAj.js → index-D0vTvoQN.js} +1 -1
- package/dist/{index-Mnxpcwdy.js → index-D4_zVJPi.js} +4 -4
- package/dist/{index-CGf3YUfs.js → index-DLeX1p1o.js} +2 -2
- package/dist/{index-DWIzd_V1.js → index-Z1ZA897U.js} +1 -1
- package/dist/{order.dto-DBYyEQ7c.js → order.dto-DrlhCvYK.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{useInternalUser-DxmgUn4T.js → useInternalUser-BaSqwN4K.js} +1 -1
- package/package.json +1 -1
- package/src/views/kiosk/KioskView.spec.ts +169 -0
- package/src/views/kiosk/KioskView.vue +21 -75
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { s as
|
|
3
|
-
import { d as
|
|
4
|
-
import { useI18n as
|
|
5
|
-
import { components as
|
|
6
|
-
import { onBeforeRouteLeave as
|
|
7
|
-
import { S as
|
|
8
|
-
import { defineStore as
|
|
9
|
-
import { O as
|
|
10
|
-
import { F as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { _ as
|
|
14
|
-
const
|
|
1
|
+
import { defineComponent as H, computed as I, h as P, resolveComponent as K, openBlock as v, createElementBlock as h, createElementVNode as m, toDisplayString as _, unref as i, createVNode as T, Fragment as F, renderList as re, createBlock as E, resolveDynamicComponent as be, createCommentVNode as D, normalizeClass as _e, ref as x, defineAsyncComponent as he, watch as V, withDirectives as we, vShow as xe, withCtx as Ce } from "vue";
|
|
2
|
+
import { s as ae, l as U, _ as Ie, a as Te, b as Pe, u as Ae, c as Le, d as Ee, e as te } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-XJm-f2JF.js";
|
|
3
|
+
import { d as Ke } from "./dayjs.min-BsZk4QHK.js";
|
|
4
|
+
import { useI18n as Y, useCoreStore as Re, RestaurantSelector as Fe } from "@feedmepos/mf-common";
|
|
5
|
+
import { components as De, useDialog as Ue, useSnackbar as ge } from "@feedmepos/ui-library";
|
|
6
|
+
import { onBeforeRouteLeave as Ne } from "vue-router";
|
|
7
|
+
import { S as W, a as ne } from "./index-D0vTvoQN.js";
|
|
8
|
+
import { defineStore as $e } from "pinia";
|
|
9
|
+
import { O as j } from "./index-DLeX1p1o.js";
|
|
10
|
+
import { F as qe, a as Be } from "./order.dto-DrlhCvYK.js";
|
|
11
|
+
import { u as Me } from "./app-B4ew9SMz.js";
|
|
12
|
+
import { u as Ve } from "./useInternalUser-BaSqwN4K.js";
|
|
13
|
+
import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const Xe = { class: "flex flex-col gap-4" }, We = { class: "fm-typo-en-title-sm-600 block" }, Ge = {
|
|
15
15
|
class: "hidden xs:flex flex-col gap-8",
|
|
16
16
|
"data-testid": "license-list"
|
|
17
|
-
},
|
|
17
|
+
}, He = { class: "flex items-center justify-between gap-8" }, Ye = { class: "flex flex-col min-w-0" }, Qe = { class: "fm-typo-en-body-md-600" }, ze = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary font-mono" }, Je = { class: "grid grid-cols-[auto_1fr] gap-x-12 gap-y-4 fm-typo-en-body-sm-400" }, Ze = { class: "text-fm-color-typo-secondary" }, Se = { key: 1 }, Oe = { class: "text-fm-color-typo-secondary" }, ke = { class: "min-w-0 break-words" }, ea = { class: "text-fm-color-typo-secondary" }, aa = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "text-center py-32 text-fm-color-typo-secondary fm-typo-en-body-md-400"
|
|
20
|
-
},
|
|
20
|
+
}, ta = /* @__PURE__ */ H({
|
|
21
21
|
__name: "KioskLicensesView",
|
|
22
22
|
props: {
|
|
23
23
|
licenses: {}
|
|
24
24
|
},
|
|
25
25
|
setup(e) {
|
|
26
|
-
const { t: a } =
|
|
26
|
+
const { t: a } = Y(), l = e, o = { IN_USE: 0, FREE: 1, EXPIRED: 2 }, t = I(
|
|
27
27
|
() => {
|
|
28
|
-
var
|
|
29
|
-
return [...((
|
|
28
|
+
var r;
|
|
29
|
+
return [...((r = l.licenses) == null ? void 0 : r.licenses) ?? []].sort(
|
|
30
30
|
(d, f) => o[d.status] - o[f.status] || d.expiredAt.localeCompare(f.expiredAt)
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
|
-
function n(
|
|
35
|
-
return
|
|
34
|
+
function n(r) {
|
|
35
|
+
return Ke(r).format("DD MMM YYYY");
|
|
36
36
|
}
|
|
37
|
-
function r
|
|
38
|
-
return a(
|
|
37
|
+
function s(r) {
|
|
38
|
+
return a(r === "TABLET" ? "order.licenseTypeTablet" : "order.licenseTypeKiosk");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
if (!
|
|
42
|
-
const d =
|
|
43
|
-
return
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
function c(r) {
|
|
41
|
+
if (!r.device) return "-";
|
|
42
|
+
const d = Te(r.device.deviceAppType, r.type), f = r.device.deviceAppType === "TABLET_APP" ? "licenseTypeTablet" : "licenseTypeKiosk";
|
|
43
|
+
return P("div", { class: "flex flex-col min-w-0" }, [
|
|
44
|
+
P("span", r.device.name || r.device.machineId),
|
|
45
|
+
P(
|
|
46
46
|
"span",
|
|
47
47
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary" },
|
|
48
48
|
d ? `${a(`order.${f}`)} · ${a(d)}` : a(`order.${f}`)
|
|
@@ -53,12 +53,12 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
53
53
|
{
|
|
54
54
|
id: "type",
|
|
55
55
|
header: () => a("order.licenseColumnType"),
|
|
56
|
-
cell: ({ row:
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
cell: ({ row: r }) => P("div", { class: "flex flex-col" }, [
|
|
57
|
+
P("span", s(r.original.type)),
|
|
58
|
+
P(
|
|
59
59
|
"span",
|
|
60
60
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary font-mono" },
|
|
61
|
-
|
|
61
|
+
ae(r.original.id)
|
|
62
62
|
)
|
|
63
63
|
]),
|
|
64
64
|
enableSorting: !1
|
|
@@ -66,43 +66,43 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
66
66
|
{
|
|
67
67
|
id: "status",
|
|
68
68
|
header: () => a("order.licenseColumnStatus"),
|
|
69
|
-
cell: ({ row:
|
|
70
|
-
const d =
|
|
71
|
-
return
|
|
69
|
+
cell: ({ row: r }) => {
|
|
70
|
+
const d = U(r.original);
|
|
71
|
+
return P(De.FmChip, { variant: d.variant, label: a(d.labelKey, d.params) });
|
|
72
72
|
},
|
|
73
73
|
enableSorting: !1
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
id: "device",
|
|
77
77
|
header: () => a("order.licenseColumnDevice"),
|
|
78
|
-
cell: ({ row:
|
|
78
|
+
cell: ({ row: r }) => c(r.original),
|
|
79
79
|
enableSorting: !1
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
id: "outlet",
|
|
83
83
|
header: () => a("order.licenseColumnOutlet"),
|
|
84
|
-
cell: ({ row:
|
|
84
|
+
cell: ({ row: r }) => {
|
|
85
85
|
var d;
|
|
86
|
-
return ((d =
|
|
86
|
+
return ((d = r.original.device) == null ? void 0 : d.restaurantName) || "-";
|
|
87
87
|
},
|
|
88
88
|
enableSorting: !1
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
id: "expires",
|
|
92
92
|
header: () => a("order.licenseColumnExpires"),
|
|
93
|
-
cell: ({ row:
|
|
93
|
+
cell: ({ row: r }) => n(r.original.expiredAt),
|
|
94
94
|
enableSorting: !1
|
|
95
95
|
}
|
|
96
96
|
]);
|
|
97
|
-
return (
|
|
97
|
+
return (r, d) => {
|
|
98
98
|
var w;
|
|
99
|
-
const f =
|
|
100
|
-
return
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
(w = e.licenses) != null && w.verified ? (
|
|
104
|
-
t.value.length ? (
|
|
105
|
-
|
|
99
|
+
const f = K("FmTable"), C = K("FmChip");
|
|
100
|
+
return v(), h("div", Xe, [
|
|
101
|
+
m("span", We, _(i(a)("order.licensesTab")), 1),
|
|
102
|
+
T(Ie, { licenses: e.licenses }, null, 8, ["licenses"]),
|
|
103
|
+
(w = e.licenses) != null && w.verified ? (v(), h(F, { key: 0 }, [
|
|
104
|
+
t.value.length ? (v(), h(F, { key: 0 }, [
|
|
105
|
+
T(f, {
|
|
106
106
|
"row-data": t.value,
|
|
107
107
|
"column-defs": p.value,
|
|
108
108
|
"hide-footer": !0,
|
|
@@ -110,89 +110,89 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
110
110
|
class: "w-full xs:hidden",
|
|
111
111
|
"data-testid": "license-table"
|
|
112
112
|
}, null, 8, ["row-data", "column-defs"]),
|
|
113
|
-
|
|
114
|
-
(
|
|
115
|
-
var
|
|
116
|
-
return
|
|
117
|
-
key:
|
|
113
|
+
m("div", Ge, [
|
|
114
|
+
(v(!0), h(F, null, re(t.value, (y) => {
|
|
115
|
+
var A;
|
|
116
|
+
return v(), h("div", {
|
|
117
|
+
key: y.id,
|
|
118
118
|
class: "border fm-corner-radius-lg p-12 flex flex-col gap-8"
|
|
119
119
|
}, [
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
m("div", He, [
|
|
121
|
+
m("div", Ye, [
|
|
122
|
+
m("span", Qe, _(s(y.type)), 1),
|
|
123
|
+
m("span", ze, _(i(ae)(y.id)), 1)
|
|
124
124
|
]),
|
|
125
|
-
|
|
126
|
-
variant: i(
|
|
127
|
-
label: i(a)(i(
|
|
125
|
+
T(C, {
|
|
126
|
+
variant: i(U)(y).variant,
|
|
127
|
+
label: i(a)(i(U)(y).labelKey, i(U)(y).params)
|
|
128
128
|
}, null, 8, ["variant", "label"])
|
|
129
129
|
]),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
130
|
+
m("div", Je, [
|
|
131
|
+
m("span", Ze, _(i(a)("order.licenseColumnDevice")), 1),
|
|
132
|
+
y.device ? (v(), E(be(c(y)), {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "min-w-0 break-words"
|
|
135
|
-
})) : (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
})) : (v(), h("span", Se, "-")),
|
|
136
|
+
m("span", Oe, _(i(a)("order.licenseColumnOutlet")), 1),
|
|
137
|
+
m("span", ke, _(((A = y.device) == null ? void 0 : A.restaurantName) || "-"), 1),
|
|
138
|
+
m("span", ea, _(i(a)("order.licenseColumnExpires")), 1),
|
|
139
|
+
m("span", null, _(n(y.expiredAt)), 1)
|
|
140
140
|
])
|
|
141
141
|
]);
|
|
142
142
|
}), 128))
|
|
143
143
|
])
|
|
144
|
-
], 64)) : (
|
|
145
|
-
], 64)) :
|
|
144
|
+
], 64)) : (v(), h("div", aa, _(i(a)("order.licensesEmpty")), 1))
|
|
145
|
+
], 64)) : D("", !0)
|
|
146
146
|
]);
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
}),
|
|
149
|
+
}), na = { class: "flex flex-col gap-5 pb-6" }, la = { class: "fm-typo-en-body-md-400 block" }, sa = { class: "fm-typo-en-title-md-600" }, oa = {
|
|
150
150
|
key: 0,
|
|
151
151
|
class: "flex flex-col gap-2 border-t pt-4",
|
|
152
152
|
"data-testid": "bind-license-plan"
|
|
153
|
-
},
|
|
153
|
+
}, ra = { class: "fm-typo-en-body-md-600" }, ca = /* @__PURE__ */ H({
|
|
154
154
|
__name: "KioskOtpDialog",
|
|
155
155
|
props: {
|
|
156
156
|
otp: {},
|
|
157
157
|
licenses: {}
|
|
158
158
|
},
|
|
159
159
|
setup(e) {
|
|
160
|
-
const { t: a } =
|
|
160
|
+
const { t: a } = Y(), l = e, o = I(() => {
|
|
161
161
|
const t = l.licenses;
|
|
162
162
|
if (!(t != null && t.verified)) return [];
|
|
163
163
|
if (t.unlimited)
|
|
164
164
|
return [{ key: "order.bindLicenseUnlimited", icon: "all_inclusive", warn: !1 }];
|
|
165
|
-
const n =
|
|
165
|
+
const n = Pe(t);
|
|
166
166
|
return [
|
|
167
167
|
n.kiosk === "KIOSK" ? { key: "order.bindLicenseKiosk", icon: "point_of_sale", warn: !1 } : { key: "order.bindLicenseNoKiosk", icon: "warning", warn: !0 },
|
|
168
168
|
n.tablet === "TABLET" ? { key: "order.bindLicenseTablet", icon: "tablet", warn: !1 } : n.tablet === "KIOSK" ? { key: "order.bindLicenseTabletFallback", icon: "tablet", warn: !0 } : { key: "order.bindLicenseNoTablet", icon: "warning", warn: !0 }
|
|
169
169
|
];
|
|
170
170
|
});
|
|
171
171
|
return (t, n) => {
|
|
172
|
-
const
|
|
173
|
-
return
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
o.value.length ? (
|
|
177
|
-
|
|
178
|
-
(
|
|
179
|
-
key:
|
|
180
|
-
class:
|
|
172
|
+
const s = K("FmIcon");
|
|
173
|
+
return v(), h("div", na, [
|
|
174
|
+
m("span", la, _(i(a)("order.bindDeviceMessage")), 1),
|
|
175
|
+
m("div", sa, _(e.otp), 1),
|
|
176
|
+
o.value.length ? (v(), h("div", oa, [
|
|
177
|
+
m("span", ra, _(i(a)("order.bindLicenseTitle")), 1),
|
|
178
|
+
(v(!0), h(F, null, re(o.value, (c) => (v(), h("div", {
|
|
179
|
+
key: c.key,
|
|
180
|
+
class: _e(["flex items-start gap-2 fm-typo-en-body-md-400", c.warn ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary"])
|
|
181
181
|
}, [
|
|
182
|
-
|
|
183
|
-
name:
|
|
182
|
+
T(s, {
|
|
183
|
+
name: c.icon
|
|
184
184
|
}, null, 8, ["name"]),
|
|
185
|
-
|
|
185
|
+
m("span", null, _(i(a)(c.key)), 1)
|
|
186
186
|
], 2))), 128))
|
|
187
|
-
])) :
|
|
187
|
+
])) : D("", !0)
|
|
188
188
|
]);
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
192
|
-
function
|
|
193
|
-
return e ? e.status === 403 ? "order.bindDevicePermissionDenied" : e.code ===
|
|
191
|
+
}), ua = "KIOSK_LICENSE_QUOTA_EXHAUSTED";
|
|
192
|
+
function ia(e) {
|
|
193
|
+
return e ? e.status === 403 ? "order.bindDevicePermissionDenied" : e.code === ua || /no quota available/i.test(e.message ?? "") ? "order.bindDeviceNoQuota" : e.status === void 0 ? "order.bindDeviceNetworkError" : "order.bindDeviceFailed" : "order.bindDeviceFailed";
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const da = {
|
|
196
196
|
enabled: !1,
|
|
197
197
|
prefix: null,
|
|
198
198
|
padDigit: 0,
|
|
@@ -206,7 +206,7 @@ const _a = {
|
|
|
206
206
|
paid: null
|
|
207
207
|
},
|
|
208
208
|
hint: { show: !0, messages: null }
|
|
209
|
-
},
|
|
209
|
+
}, pa = {
|
|
210
210
|
enabled: !1,
|
|
211
211
|
submitOrderInstruction: {
|
|
212
212
|
payAtCounter: null,
|
|
@@ -214,19 +214,19 @@ const _a = {
|
|
|
214
214
|
},
|
|
215
215
|
enablePaxDialog: !1
|
|
216
216
|
};
|
|
217
|
-
|
|
218
|
-
const
|
|
217
|
+
Be.parse({});
|
|
218
|
+
const G = {
|
|
219
219
|
payAtCounter: null,
|
|
220
220
|
paid: null
|
|
221
|
-
},
|
|
221
|
+
}, ma = (e) => {
|
|
222
222
|
var a, l;
|
|
223
223
|
return {
|
|
224
|
-
kiosk:
|
|
224
|
+
kiosk: fa(e.kioskSettings, (a = e.sequenceSettings) == null ? void 0 : a.kioskDineIn, (l = e.sequenceSettings) == null ? void 0 : l.kioskShareNumber)
|
|
225
225
|
};
|
|
226
|
-
},
|
|
227
|
-
var o, t, n,
|
|
226
|
+
}, fa = (e, a, l) => {
|
|
227
|
+
var o, t, n, s, c, p, r, d, f, C, w, y;
|
|
228
228
|
return {
|
|
229
|
-
dineIn:
|
|
229
|
+
dineIn: va(
|
|
230
230
|
a ?? {
|
|
231
231
|
current: 0,
|
|
232
232
|
prefix: "#K"
|
|
@@ -236,14 +236,14 @@ const Y = {
|
|
|
236
236
|
takeaway: {
|
|
237
237
|
enabled: (e == null ? void 0 : e.canTakeaway) ?? !1,
|
|
238
238
|
submitOrderInstruction: (o = e == null ? void 0 : e.takeaway) != null && o.submitOrderInstruction ? {
|
|
239
|
-
payAtCounter: ((
|
|
240
|
-
paid: ((
|
|
241
|
-
} :
|
|
239
|
+
payAtCounter: ((s = (n = (t = e == null ? void 0 : e.takeaway) == null ? void 0 : t.submitOrderInstruction) == null ? void 0 : n.payAtCounter) == null ? void 0 : s.en) ?? null,
|
|
240
|
+
paid: ((r = (p = (c = e == null ? void 0 : e.takeaway) == null ? void 0 : c.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : r.en) ?? null
|
|
241
|
+
} : G
|
|
242
242
|
},
|
|
243
243
|
paymentSetting: {
|
|
244
244
|
paymentTypes: ((d = e == null ? void 0 : e.paymentSetting) == null ? void 0 : d.paymentTypes) ?? [],
|
|
245
245
|
offlinePaymentTypes: ((f = e == null ? void 0 : e.paymentSetting) == null ? void 0 : f.offlinePaymentTypes) ?? [],
|
|
246
|
-
ePaymentTypes: ((
|
|
246
|
+
ePaymentTypes: ((C = e == null ? void 0 : e.paymentSetting) == null ? void 0 : C.ePaymentTypes) ?? qe.parse({
|
|
247
247
|
card: {
|
|
248
248
|
terminal: !1,
|
|
249
249
|
nfc: !1
|
|
@@ -277,20 +277,20 @@ const Y = {
|
|
|
277
277
|
allowReject: (e == null ? void 0 : e.allowReject) ?? null,
|
|
278
278
|
// Stored [] means the same thing as unset ("all languages"), so collapse it
|
|
279
279
|
// to null here — the form only ever has to reason about null vs a real set.
|
|
280
|
-
languages: (
|
|
280
|
+
languages: (y = e == null ? void 0 : e.languages) != null && y.length ? [...e.languages] : null,
|
|
281
281
|
// KDI-5138. Read back so a save of any other kiosk field keeps it.
|
|
282
282
|
minWeighGrams: (e == null ? void 0 : e.minWeighGrams) ?? null,
|
|
283
283
|
shareNumber: l === !0
|
|
284
284
|
};
|
|
285
|
-
},
|
|
285
|
+
}, le = "#K", ya = (e, a) => {
|
|
286
286
|
var t;
|
|
287
|
-
const l = { ...a ?? {} }, o = ((t = e.dineIn.sequenceNumber.prefix) == null ? void 0 : t.trim()) ||
|
|
288
|
-
return (a != null && a.kioskDineIn || o !==
|
|
287
|
+
const l = { ...a ?? {} }, o = ((t = e.dineIn.sequenceNumber.prefix) == null ? void 0 : t.trim()) || le;
|
|
288
|
+
return (a != null && a.kioskDineIn || o !== le) && (l.kioskDineIn = {
|
|
289
289
|
...(a == null ? void 0 : a.kioskDineIn) ?? { current: 0 },
|
|
290
290
|
prefix: o
|
|
291
291
|
}), (e.shareNumber || (a == null ? void 0 : a.kioskShareNumber) != null) && (l.kioskShareNumber = e.shareNumber), l;
|
|
292
|
-
},
|
|
293
|
-
var l, o, t, n,
|
|
292
|
+
}, va = (e, a) => {
|
|
293
|
+
var l, o, t, n, s, c, p, r, d, f;
|
|
294
294
|
return {
|
|
295
295
|
enabled: !!a,
|
|
296
296
|
sequenceNumber: e,
|
|
@@ -299,9 +299,9 @@ const Y = {
|
|
|
299
299
|
submitOrderInstruction: a.pickUp.submitOrderInstruction ? {
|
|
300
300
|
payAtCounter: ((o = (l = a.pickUp.submitOrderInstruction) == null ? void 0 : l.payAtCounter) == null ? void 0 : o.en) ?? null,
|
|
301
301
|
paid: ((n = (t = a.pickUp.submitOrderInstruction) == null ? void 0 : t.paid) == null ? void 0 : n.en) ?? null
|
|
302
|
-
} :
|
|
302
|
+
} : G,
|
|
303
303
|
enablePaxDialog: a.pickUp.enablePaxDialog ? a.pickUp.enablePaxDialog : !1
|
|
304
|
-
} :
|
|
304
|
+
} : pa,
|
|
305
305
|
displayStand: a != null && a.displayStand ? {
|
|
306
306
|
enabled: a.displayStand.enabled,
|
|
307
307
|
standSlotRange: a.displayStand.standSlotRange,
|
|
@@ -309,19 +309,19 @@ const Y = {
|
|
|
309
309
|
padDigit: a.displayStand.padDigit,
|
|
310
310
|
enablePaxDialog: a.displayStand.enablePaxDialog ?? !1,
|
|
311
311
|
submitOrderInstruction: a.displayStand.submitOrderInstruction ? {
|
|
312
|
-
payAtCounter: ((
|
|
313
|
-
paid: ((
|
|
314
|
-
} :
|
|
312
|
+
payAtCounter: ((c = (s = a.displayStand.submitOrderInstruction) == null ? void 0 : s.payAtCounter) == null ? void 0 : c.en) ?? null,
|
|
313
|
+
paid: ((r = (p = a.displayStand.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : r.en) ?? null
|
|
314
|
+
} : G,
|
|
315
315
|
// Absent (older documents) = the hint shows, with the kiosk's own text.
|
|
316
316
|
hint: {
|
|
317
317
|
show: ((d = a.displayStand.hint) == null ? void 0 : d.show) ?? !0,
|
|
318
318
|
messages: ((f = a.displayStand.hint) == null ? void 0 : f.messages) ?? null
|
|
319
319
|
}
|
|
320
|
-
} :
|
|
320
|
+
} : da
|
|
321
321
|
};
|
|
322
|
-
},
|
|
322
|
+
}, ba = (e) => {
|
|
323
323
|
const a = (t) => {
|
|
324
|
-
var n,
|
|
324
|
+
var n, s, c, p;
|
|
325
325
|
return {
|
|
326
326
|
requiredSlot: !!t.displayStand,
|
|
327
327
|
displayStand: {
|
|
@@ -330,7 +330,7 @@ const Y = {
|
|
|
330
330
|
payAtCounter: (n = t.displayStand.submitOrderInstruction) != null && n.payAtCounter ? {
|
|
331
331
|
en: t.displayStand.submitOrderInstruction.payAtCounter
|
|
332
332
|
} : null,
|
|
333
|
-
paid: (
|
|
333
|
+
paid: (s = t.displayStand.submitOrderInstruction) != null && s.paid ? {
|
|
334
334
|
en: t.displayStand.submitOrderInstruction.paid
|
|
335
335
|
} : null
|
|
336
336
|
}
|
|
@@ -338,7 +338,7 @@ const Y = {
|
|
|
338
338
|
pickUp: {
|
|
339
339
|
...t.pickUp,
|
|
340
340
|
submitOrderInstruction: {
|
|
341
|
-
payAtCounter: (
|
|
341
|
+
payAtCounter: (c = t.pickUp.submitOrderInstruction) != null && c.payAtCounter ? {
|
|
342
342
|
en: t.pickUp.submitOrderInstruction.payAtCounter
|
|
343
343
|
} : null,
|
|
344
344
|
paid: (p = t.pickUp.submitOrderInstruction) != null && p.paid ? {
|
|
@@ -393,35 +393,35 @@ const Y = {
|
|
|
393
393
|
} : {
|
|
394
394
|
kioskSettings: l()
|
|
395
395
|
};
|
|
396
|
-
},
|
|
397
|
-
convertOrderSettingDto:
|
|
398
|
-
toOrderKioskSettingsDto:
|
|
399
|
-
toKioskSequenceSettings:
|
|
400
|
-
},
|
|
396
|
+
}, X = {
|
|
397
|
+
convertOrderSettingDto: ma,
|
|
398
|
+
toOrderKioskSettingsDto: ba,
|
|
399
|
+
toKioskSequenceSettings: ya
|
|
400
|
+
}, _a = $e("orderSetting", () => {
|
|
401
401
|
const e = x({});
|
|
402
402
|
async function a(n = () => !0) {
|
|
403
|
-
const
|
|
404
|
-
n() && t(
|
|
403
|
+
const s = W.getRestaurantId() ?? void 0, c = await j.getOrderSetting();
|
|
404
|
+
n() && t(c, s);
|
|
405
405
|
}
|
|
406
406
|
function l() {
|
|
407
407
|
e.value.orderSetting = void 0, e.value.kiosk = void 0, e.value.restaurantId = void 0;
|
|
408
408
|
}
|
|
409
409
|
async function o(n) {
|
|
410
|
-
const
|
|
411
|
-
if (!
|
|
410
|
+
const s = e.value.orderSetting, c = W.getRestaurantId() ?? void 0;
|
|
411
|
+
if (!s || !c || e.value.restaurantId !== c)
|
|
412
412
|
throw new Error("Order settings are not loaded for this outlet");
|
|
413
|
-
const { _id: p, ...
|
|
414
|
-
...
|
|
413
|
+
const { _id: p, ...r } = s, d = X.toOrderKioskSettingsDto(n), f = await j.getOrderSetting(), C = {
|
|
414
|
+
...r,
|
|
415
415
|
kioskSettings: d.kioskSettings,
|
|
416
|
-
sequenceSettings:
|
|
416
|
+
sequenceSettings: X.toKioskSequenceSettings(
|
|
417
417
|
n,
|
|
418
418
|
f.sequenceSettings
|
|
419
419
|
)
|
|
420
|
-
}, w = await
|
|
421
|
-
t(w,
|
|
420
|
+
}, w = await j.updateOrderSetting(C);
|
|
421
|
+
t(w, c);
|
|
422
422
|
}
|
|
423
|
-
function t(n,
|
|
424
|
-
e.value.orderSetting = n, e.value.kiosk =
|
|
423
|
+
function t(n, s) {
|
|
424
|
+
e.value.orderSetting = n, e.value.kiosk = X.convertOrderSettingDto(n).kiosk, e.value.restaurantId = s;
|
|
425
425
|
}
|
|
426
426
|
return {
|
|
427
427
|
state: e.value,
|
|
@@ -430,14 +430,14 @@ const Y = {
|
|
|
430
430
|
updateKioskSetting: o
|
|
431
431
|
};
|
|
432
432
|
});
|
|
433
|
-
function
|
|
433
|
+
function ha(e, a) {
|
|
434
434
|
return !e.hasToken || !e.restaurantId || e.restaurantId === a ? null : e.restaurantId;
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function wa(e, a) {
|
|
437
437
|
const l = x("idle");
|
|
438
438
|
let o = 0;
|
|
439
439
|
async function t() {
|
|
440
|
-
const
|
|
440
|
+
const c = ++o, p = () => c === o;
|
|
441
441
|
e.reset(), l.value = "loading";
|
|
442
442
|
try {
|
|
443
443
|
await e.getSetting(p), p() && (l.value = "ready");
|
|
@@ -448,22 +448,22 @@ function Aa(e, a) {
|
|
|
448
448
|
const n = I(
|
|
449
449
|
() => l.value === "ready" ? e.state.kiosk ?? null : null
|
|
450
450
|
);
|
|
451
|
-
async function
|
|
451
|
+
async function s(c) {
|
|
452
452
|
try {
|
|
453
453
|
if (l.value !== "ready")
|
|
454
454
|
throw new Error("Kiosk settings are not loaded for this outlet");
|
|
455
|
-
await e.updateKioskSetting(
|
|
455
|
+
await e.updateKioskSetting(c);
|
|
456
456
|
} catch (p) {
|
|
457
457
|
throw a.onFailed(), p;
|
|
458
458
|
}
|
|
459
459
|
a.onSaved();
|
|
460
460
|
}
|
|
461
|
-
return { status: l, form: n, load: t, save:
|
|
461
|
+
return { status: l, form: n, load: t, save: s };
|
|
462
462
|
}
|
|
463
|
-
const
|
|
464
|
-
function
|
|
463
|
+
const xa = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), Ca = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), Ia = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), Ta = /[^\p{L}\d]+/giu, se = "$1\0$2", oe = "";
|
|
464
|
+
function ce(e) {
|
|
465
465
|
let a = e.trim();
|
|
466
|
-
a = a.replace(
|
|
466
|
+
a = a.replace(xa, se).replace(Ca, se), a = a.replace(Ta, "\0");
|
|
467
467
|
let l = 0, o = a.length;
|
|
468
468
|
for (; a.charAt(l) === "\0"; )
|
|
469
469
|
l++;
|
|
@@ -473,10 +473,10 @@ function pe(e) {
|
|
|
473
473
|
o--;
|
|
474
474
|
return a.slice(l, o).split(/\0/g);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
const a =
|
|
476
|
+
function Pa(e) {
|
|
477
|
+
const a = ce(e);
|
|
478
478
|
for (let l = 0; l < a.length; l++) {
|
|
479
|
-
const o = a[l], t =
|
|
479
|
+
const o = a[l], t = Ia.exec(o);
|
|
480
480
|
if (t) {
|
|
481
481
|
const n = t.index + (t[1] ?? t[2]).length;
|
|
482
482
|
a.splice(l, 1, o.slice(0, n), o.slice(n));
|
|
@@ -484,288 +484,242 @@ function Da(e) {
|
|
|
484
484
|
}
|
|
485
485
|
return a;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
const [l, o, t] =
|
|
489
|
-
return l + o.map(
|
|
487
|
+
function Aa(e, a) {
|
|
488
|
+
const [l, o, t] = Ra(e, a), n = La(a == null ? void 0 : a.locale), s = Ea(a == null ? void 0 : a.locale);
|
|
489
|
+
return l + o.map(Ka(n, s)).join(" ") + t;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function La(e) {
|
|
492
492
|
return (a) => a.toLocaleLowerCase(e);
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Ea(e) {
|
|
495
495
|
return (a) => a.toLocaleUpperCase(e);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Ka(e, a) {
|
|
498
498
|
return (l) => `${a(l[0])}${e(l.slice(1))}`;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
501
|
-
const l = a.split ?? (a.separateNumbers ?
|
|
502
|
-
let n = 0,
|
|
500
|
+
function Ra(e, a = {}) {
|
|
501
|
+
const l = a.split ?? (a.separateNumbers ? Pa : ce), o = a.prefixCharacters ?? oe, t = a.suffixCharacters ?? oe;
|
|
502
|
+
let n = 0, s = e.length;
|
|
503
503
|
for (; n < e.length; ) {
|
|
504
|
-
const
|
|
505
|
-
if (!o.includes(
|
|
504
|
+
const c = e.charAt(n);
|
|
505
|
+
if (!o.includes(c))
|
|
506
506
|
break;
|
|
507
507
|
n++;
|
|
508
508
|
}
|
|
509
|
-
for (;
|
|
510
|
-
const
|
|
509
|
+
for (; s > n; ) {
|
|
510
|
+
const c = s - 1, p = e.charAt(c);
|
|
511
511
|
if (!t.includes(p))
|
|
512
512
|
break;
|
|
513
|
-
|
|
513
|
+
s = c;
|
|
514
514
|
}
|
|
515
515
|
return [
|
|
516
516
|
e.slice(0, n),
|
|
517
|
-
l(e.slice(n,
|
|
518
|
-
e.slice(
|
|
517
|
+
l(e.slice(n, s)),
|
|
518
|
+
e.slice(s)
|
|
519
519
|
];
|
|
520
520
|
}
|
|
521
|
-
const
|
|
521
|
+
const Fa = { class: "py-[1.5rem]" }, Da = { class: "px-[1.5rem]" }, Ua = { class: "flex flex-wrap items-center justify-between gap-x-24 gap-y-8 xs:flex-col xs:items-stretch" }, ga = ["title"], Na = { class: "pt-[1.5rem]" }, $a = { class: "flex flex-col gap-10" }, qa = /* @__PURE__ */ H({
|
|
522
522
|
__name: "KioskView",
|
|
523
523
|
setup(e) {
|
|
524
|
-
var
|
|
525
|
-
const { t: a } =
|
|
526
|
-
() => import("./KioskSettingView-
|
|
527
|
-
), n = x("device"),
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
value: m._id
|
|
534
|
-
}));
|
|
535
|
-
});
|
|
536
|
-
async function me(c) {
|
|
537
|
-
$.value = c;
|
|
538
|
-
}
|
|
539
|
-
function fe(c) {
|
|
540
|
-
var m, K;
|
|
541
|
-
if (!c) {
|
|
542
|
-
$.value = "";
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
(K = (m = J.value) == null ? void 0 : m.querySelector("input")) == null || K.select();
|
|
546
|
-
}
|
|
547
|
-
const D = x(""), q = x(null), B = x(!1), {
|
|
548
|
-
status: ye,
|
|
549
|
-
form: S,
|
|
550
|
-
load: O,
|
|
551
|
-
save: ve
|
|
552
|
-
} = Aa(u, {
|
|
524
|
+
var k;
|
|
525
|
+
const { t: a } = Y(), { canManageOrderSetting: l } = Me(), { isInternal: o } = Ve(), t = he(
|
|
526
|
+
() => import("./KioskSettingView-Bmfvz0Kz.js")
|
|
527
|
+
), n = x("device"), s = Ae(), c = _a(), p = Le(), r = Ue(), { currentRestaurant: d, restaurants: f, changeRestaurant: C } = Re(), w = ge(), y = x(((k = d.value) == null ? void 0 : k._id) ?? void 0), A = x(null), R = x(""), g = x(null), N = x(!1), {
|
|
528
|
+
status: ue,
|
|
529
|
+
form: Q,
|
|
530
|
+
load: z,
|
|
531
|
+
save: ie
|
|
532
|
+
} = wa(c, {
|
|
553
533
|
onSaved: () => w.open({ title: a("order.kioskSettingSuccess"), type: "success" }),
|
|
554
534
|
onFailed: () => w.open({ title: a("order.kioskSettingFailed"), type: "error" })
|
|
555
|
-
}),
|
|
556
|
-
async function
|
|
557
|
-
if (
|
|
558
|
-
if (
|
|
559
|
-
|
|
535
|
+
}), L = x(!1);
|
|
536
|
+
async function J(u) {
|
|
537
|
+
if (typeof u != "string" || u === R.value) return;
|
|
538
|
+
if (L.value && !await q()) {
|
|
539
|
+
y.value = R.value || void 0;
|
|
560
540
|
return;
|
|
561
541
|
}
|
|
562
|
-
|
|
563
|
-
const
|
|
564
|
-
|
|
542
|
+
L.value = !1;
|
|
543
|
+
const b = f.value.find((B) => B._id == u);
|
|
544
|
+
y.value = u, await C(b);
|
|
565
545
|
}
|
|
566
|
-
|
|
546
|
+
V(
|
|
567
547
|
() => {
|
|
568
|
-
var
|
|
548
|
+
var u;
|
|
569
549
|
return {
|
|
570
|
-
hasToken: !!
|
|
571
|
-
restaurantId: (
|
|
550
|
+
hasToken: !!W.getIdToken(),
|
|
551
|
+
restaurantId: (u = d.value) == null ? void 0 : u._id
|
|
572
552
|
};
|
|
573
553
|
},
|
|
574
|
-
(
|
|
575
|
-
const
|
|
576
|
-
|
|
554
|
+
(u) => {
|
|
555
|
+
const b = ha(u, g.value);
|
|
556
|
+
b && (g.value = b, R.value = b, y.value = b, de());
|
|
577
557
|
},
|
|
578
558
|
{ immediate: !0 }
|
|
579
559
|
);
|
|
580
|
-
async function
|
|
581
|
-
|
|
582
|
-
l.value ?
|
|
560
|
+
async function de() {
|
|
561
|
+
s.state.devices = [], s.state.licenses = null, await Promise.all([
|
|
562
|
+
l.value ? z() : Promise.resolve(),
|
|
583
563
|
p.loadCheckouts(),
|
|
584
|
-
|
|
585
|
-
|
|
564
|
+
Z(),
|
|
565
|
+
$()
|
|
586
566
|
]);
|
|
587
567
|
}
|
|
588
|
-
function
|
|
568
|
+
function Z() {
|
|
589
569
|
return o.value ? p.loadPaymentDevices() : (p.clearPaymentDevices(), Promise.resolve());
|
|
590
570
|
}
|
|
591
|
-
|
|
592
|
-
|
|
571
|
+
V(o, (u) => {
|
|
572
|
+
g.value ? Z() : u || p.clearPaymentDevices();
|
|
593
573
|
});
|
|
594
|
-
async function
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
574
|
+
async function $() {
|
|
575
|
+
A.value = null, N.value = !0, await Promise.all([
|
|
576
|
+
s.getDevices().catch((u) => {
|
|
577
|
+
A.value = u instanceof ne && u.status === 403 ? "forbidden" : "error";
|
|
598
578
|
}),
|
|
599
579
|
// Licences are extra information on top of the devices: a failure only shows
|
|
600
580
|
// a note in the summary (the store leaves `licenses` null).
|
|
601
|
-
|
|
581
|
+
s.getLicenses().catch(() => {
|
|
602
582
|
})
|
|
603
|
-
]),
|
|
583
|
+
]), N.value = !1;
|
|
604
584
|
}
|
|
605
|
-
const
|
|
585
|
+
const S = I({
|
|
606
586
|
get: () => n.value,
|
|
607
|
-
set: (
|
|
608
|
-
if (
|
|
609
|
-
if (n.value === "setting" &&
|
|
610
|
-
|
|
611
|
-
|
|
587
|
+
set: (u) => {
|
|
588
|
+
if (u !== n.value) {
|
|
589
|
+
if (n.value === "setting" && L.value) {
|
|
590
|
+
q().then((b) => {
|
|
591
|
+
b && (L.value = !1, n.value = u);
|
|
612
592
|
});
|
|
613
593
|
return;
|
|
614
594
|
}
|
|
615
|
-
n.value =
|
|
595
|
+
n.value = u;
|
|
616
596
|
}
|
|
617
597
|
}
|
|
618
598
|
});
|
|
619
|
-
function
|
|
620
|
-
return new Promise((
|
|
621
|
-
|
|
599
|
+
function q() {
|
|
600
|
+
return new Promise((u) => {
|
|
601
|
+
r.open({
|
|
622
602
|
title: a("order.unsavedLeaveTitle"),
|
|
623
603
|
message: a("order.unsavedLeaveMessage"),
|
|
624
604
|
primaryActions: { text: a("order.unsavedLeaveConfirm"), variant: "destructive", close: !0 },
|
|
625
605
|
secondaryActions: { text: a("order.keepEditing"), variant: "tertiary", close: !0 }
|
|
626
|
-
}).onPrimary(() =>
|
|
606
|
+
}).onPrimary(() => u(!0)).onClose(() => setTimeout(() => u(!1), 0));
|
|
627
607
|
});
|
|
628
608
|
}
|
|
629
|
-
|
|
630
|
-
const
|
|
631
|
-
const
|
|
609
|
+
Ne(async () => L.value ? await q() : !0);
|
|
610
|
+
const pe = I(() => {
|
|
611
|
+
const u = [
|
|
632
612
|
{ label: a("order.deviceBinding"), value: "device" },
|
|
633
613
|
{ label: a("order.licensesTab"), value: "licenses" }
|
|
634
614
|
];
|
|
635
|
-
return l.value &&
|
|
636
|
-
}),
|
|
637
|
-
async function
|
|
615
|
+
return l.value && u.push({ label: a("order.settings"), value: "setting" }), u;
|
|
616
|
+
}), me = I(() => s.state.devices), O = I(() => s.state.licenses);
|
|
617
|
+
async function fe() {
|
|
638
618
|
try {
|
|
639
|
-
await
|
|
640
|
-
} catch (
|
|
619
|
+
await s.requestOtp();
|
|
620
|
+
} catch (u) {
|
|
641
621
|
w.open({
|
|
642
|
-
title: a(
|
|
622
|
+
title: a(ia(u instanceof ne ? u : null)),
|
|
643
623
|
type: "error"
|
|
644
624
|
});
|
|
645
625
|
return;
|
|
646
626
|
}
|
|
647
|
-
|
|
648
|
-
title:
|
|
649
|
-
contentComponent:
|
|
627
|
+
r.open({
|
|
628
|
+
title: Aa(a("order.bindDevice")),
|
|
629
|
+
contentComponent: ca,
|
|
650
630
|
contentComponentProps: {
|
|
651
|
-
otp:
|
|
652
|
-
licenses:
|
|
631
|
+
otp: s.state.otp,
|
|
632
|
+
licenses: s.state.licenses
|
|
653
633
|
}
|
|
654
634
|
}).onClose(async () => {
|
|
655
|
-
await
|
|
635
|
+
await $();
|
|
656
636
|
});
|
|
657
637
|
}
|
|
658
|
-
return
|
|
638
|
+
return V(
|
|
659
639
|
() => f.value.length,
|
|
660
|
-
async (
|
|
661
|
-
!d.value &&
|
|
640
|
+
async (u) => {
|
|
641
|
+
!d.value && y.value === void 0 && f.value.length > 0 && await J(f.value[0]._id);
|
|
662
642
|
},
|
|
663
643
|
{ immediate: !0 }
|
|
664
|
-
), (
|
|
665
|
-
var
|
|
666
|
-
const
|
|
667
|
-
return
|
|
668
|
-
|
|
644
|
+
), (u, b) => {
|
|
645
|
+
var ee;
|
|
646
|
+
const B = K("FmPageHead"), ye = K("FmTabs"), ve = K("FmButton");
|
|
647
|
+
return v(), h("div", Fa, [
|
|
648
|
+
T(B, {
|
|
669
649
|
title: i(a)("order.kiosk")
|
|
670
650
|
}, null, 8, ["title"]),
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
"model-value":
|
|
675
|
-
"onUpdate:modelValue":
|
|
676
|
-
items:
|
|
651
|
+
m("div", Da, [
|
|
652
|
+
m("div", Ua, [
|
|
653
|
+
T(ye, {
|
|
654
|
+
"model-value": S.value,
|
|
655
|
+
"onUpdate:modelValue": b[0] || (b[0] = (M) => S.value = M),
|
|
656
|
+
items: pe.value
|
|
677
657
|
}, null, 8, ["model-value", "items"]),
|
|
678
|
-
|
|
679
|
-
class: "kiosk-outlet-picker
|
|
680
|
-
|
|
681
|
-
ref: J,
|
|
682
|
-
title: (le = i(d)) == null ? void 0 : le.profile.name
|
|
658
|
+
we(m("div", {
|
|
659
|
+
class: "kiosk-outlet-picker max-w-full xs:w-full",
|
|
660
|
+
title: (ee = i(d)) == null ? void 0 : ee.profile.name
|
|
683
661
|
}, [
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
"
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
"aria-label": i(a)("order.activateLocation"),
|
|
693
|
-
searchable: "",
|
|
694
|
-
"search-debounce": 150,
|
|
695
|
-
"on-search": me,
|
|
696
|
-
onDropdownChanged: fe
|
|
697
|
-
}, {
|
|
698
|
-
prepend: X(() => [
|
|
699
|
-
P(Ce, {
|
|
700
|
-
name: "storefront",
|
|
701
|
-
size: "md",
|
|
702
|
-
color: "#7d7d7d"
|
|
703
|
-
})
|
|
704
|
-
]),
|
|
705
|
-
"append-menu": X(() => [
|
|
706
|
-
Z.value.length ? F("", !0) : (b(), A(Ie, {
|
|
707
|
-
key: 0,
|
|
708
|
-
disabled: "",
|
|
709
|
-
label: i(a)("order.noRestaurantFound")
|
|
710
|
-
}, null, 8, ["label"]))
|
|
711
|
-
]),
|
|
712
|
-
_: 1
|
|
713
|
-
}, 8, ["modelValue", "items", "placeholder", "aria-label"])
|
|
714
|
-
], 8, ja), [
|
|
715
|
-
[Ke, n.value != "licenses"]
|
|
662
|
+
T(i(Fe), {
|
|
663
|
+
"model-value": y.value,
|
|
664
|
+
"managable-only": !1,
|
|
665
|
+
variant: "dark",
|
|
666
|
+
"onUpdate:modelValue": J
|
|
667
|
+
}, null, 8, ["model-value"])
|
|
668
|
+
], 8, ga), [
|
|
669
|
+
[xe, n.value != "licenses"]
|
|
716
670
|
])
|
|
717
671
|
]),
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
n.value == "device" ? (
|
|
672
|
+
m("div", Na, [
|
|
673
|
+
m("div", $a, [
|
|
674
|
+
n.value == "device" ? (v(), E(Ee, {
|
|
721
675
|
key: 0,
|
|
722
|
-
devices:
|
|
723
|
-
licenses:
|
|
724
|
-
"load-error":
|
|
725
|
-
loading:
|
|
726
|
-
onRequestOtp:
|
|
727
|
-
onRetry:
|
|
728
|
-
}, null, 8, ["devices", "licenses", "load-error", "loading"])) :
|
|
729
|
-
n.value == "licenses" ? (
|
|
676
|
+
devices: me.value,
|
|
677
|
+
licenses: O.value,
|
|
678
|
+
"load-error": A.value,
|
|
679
|
+
loading: N.value,
|
|
680
|
+
onRequestOtp: fe,
|
|
681
|
+
onRetry: $
|
|
682
|
+
}, null, 8, ["devices", "licenses", "load-error", "loading"])) : D("", !0),
|
|
683
|
+
n.value == "licenses" ? (v(), E(ta, {
|
|
730
684
|
key: 1,
|
|
731
|
-
licenses:
|
|
732
|
-
}, null, 8, ["licenses"])) :
|
|
733
|
-
n.value == "setting" && i(l) ? (
|
|
734
|
-
i(
|
|
685
|
+
licenses: O.value
|
|
686
|
+
}, null, 8, ["licenses"])) : D("", !0),
|
|
687
|
+
n.value == "setting" && i(l) ? (v(), h(F, { key: 2 }, [
|
|
688
|
+
i(ue) === "error" ? (v(), E(te, {
|
|
735
689
|
key: 0,
|
|
736
690
|
icon: "error",
|
|
737
691
|
title: i(a)("order.settingsLoadErrorTitle"),
|
|
738
692
|
message: i(a)("order.settingsLoadErrorMessage")
|
|
739
693
|
}, {
|
|
740
|
-
default:
|
|
741
|
-
|
|
694
|
+
default: Ce(() => [
|
|
695
|
+
T(ve, {
|
|
742
696
|
variant: "secondary",
|
|
743
697
|
label: i(a)("order.retry"),
|
|
744
698
|
"prepend-icon": "refresh",
|
|
745
|
-
onClick: i(
|
|
699
|
+
onClick: i(z)
|
|
746
700
|
}, null, 8, ["label", "onClick"])
|
|
747
701
|
]),
|
|
748
702
|
_: 1
|
|
749
|
-
}, 8, ["title", "message"])) : i(
|
|
750
|
-
key: `KioskSettingView-${
|
|
751
|
-
"restaurant-id":
|
|
752
|
-
form: i(
|
|
753
|
-
save: i(
|
|
754
|
-
onDirtyChange:
|
|
755
|
-
}, null, 8, ["restaurant-id", "form", "save"])) : (
|
|
703
|
+
}, 8, ["title", "message"])) : i(Q) ? (v(), E(i(t), {
|
|
704
|
+
key: `KioskSettingView-${R.value}`,
|
|
705
|
+
"restaurant-id": R.value,
|
|
706
|
+
form: i(Q),
|
|
707
|
+
save: i(ie),
|
|
708
|
+
onDirtyChange: b[1] || (b[1] = (M) => L.value = M)
|
|
709
|
+
}, null, 8, ["restaurant-id", "form", "save"])) : (v(), E(te, {
|
|
756
710
|
key: 1,
|
|
757
711
|
icon: "hourglass_empty",
|
|
758
712
|
title: i(a)("order.settingsLoading"),
|
|
759
713
|
message: ""
|
|
760
714
|
}, null, 8, ["title"]))
|
|
761
|
-
], 64)) :
|
|
715
|
+
], 64)) : D("", !0)
|
|
762
716
|
])
|
|
763
717
|
])
|
|
764
718
|
])
|
|
765
719
|
]);
|
|
766
720
|
};
|
|
767
721
|
}
|
|
768
|
-
}),
|
|
722
|
+
}), Sa = /* @__PURE__ */ je(qa, [["__scopeId", "data-v-1003ccba"]]);
|
|
769
723
|
export {
|
|
770
|
-
|
|
724
|
+
Sa as default
|
|
771
725
|
};
|