@feedmepos/mf-order-setting 0.0.105 → 0.0.106
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-aLqc6lz9.js +9068 -0
- package/dist/{FoodCourtInvitationsView-Bo174yfB.js → FoodCourtInvitationsView-B30qld2i.js} +4 -4
- package/dist/{FoodCourtOrderSettingsView-uUe53O0Z.js → FoodCourtOrderSettingsView-CWmaKgbe.js} +1 -1
- package/dist/{FoodCourtOrdersView-CxC5oGp2.js → FoodCourtOrdersView-FfrganVo.js} +4 -4
- package/dist/{FoodCourtStallsView-BEpRBmSL.js → FoodCourtStallsView-CpGZNP6p.js} +2 -2
- package/dist/{FoodCourtStatusView-DA7mdsuf.js → FoodCourtStatusView-ljQUwIwk.js} +1 -1
- package/dist/{KioskDevicesView-BY9Egk75.js → KioskDevicesView-BwDAYIhX.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-CxroxD-b.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-VidDJfGG.js} +487 -473
- package/dist/KioskSettingView-mfhi9vuf.js +1240 -0
- package/dist/{KioskView-BYL0u6kj.js → KioskView-6p5h92fk.js} +173 -167
- package/dist/{OrderSettingsView-BBHAhgE9.js → OrderSettingsView-Cf_Ye9U_.js} +11 -11
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang--9bdtLE1.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-TJJ3PBlq.js} +1 -1
- package/dist/{app-BV2USn83.js → app-BorqCaJT.js} +6965 -6415
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-Bp4Kgnt_.js → dayjs.min-CTTY2vkL.js} +1 -1
- package/dist/display-preview/assets/{BandBoard-DIcfXsNV.js → BandBoard-BLwgs3WX.js} +1 -1
- package/dist/display-preview/assets/{CarouselBlock-XAhTyEWB.js → CarouselBlock-CUrVSbQp.js} +1 -1
- package/dist/display-preview/assets/{CategoryBoard-DBKe18hv.js → CategoryBoard-BkvpcxHR.js} +1 -1
- package/dist/display-preview/assets/{ImageBlock-BCbnYSHq.js → ImageBlock-0UYDHTm0.js} +1 -1
- package/dist/display-preview/assets/{PickupMode-Df_TPCh8.js → PickupMode-BY4iL0BH.js} +1 -1
- package/dist/display-preview/assets/{StatusBoard-28z3bPOf.js → StatusBoard-DGEZ6hvH.js} +1 -1
- package/dist/display-preview/assets/{TextBlock-CvJKITtx.js → TextBlock-CxKwtqoO.js} +1 -1
- package/dist/display-preview/assets/{VideoBlock-Dop43wDv.js → VideoBlock-BKkxdLAd.js} +1 -1
- package/dist/display-preview/assets/{index-cqMoOpSN.js → index-B1olKQmQ.js} +2 -2
- package/dist/display-preview/assets/{pickupView-DRMVXqrc.js → pickupView-CB9fV5jD.js} +1 -1
- package/dist/display-preview/images/feedme-bg-left-image.png +0 -0
- package/dist/display-preview/index.html +1 -1
- package/dist/{featureFlag-C1uGG7u6.js → featureFlag-DFenoxmg.js} +1 -1
- package/dist/frontend/mf-order/src/api/display-system/index.d.ts +2 -2
- package/dist/frontend/mf-order/src/app.d.ts +118 -12
- package/dist/frontend/mf-order/src/composables/useDisplaySystemPermission.d.ts +5 -0
- package/dist/frontend/mf-order/src/main.d.ts +118 -12
- package/dist/frontend/mf-order/src/modules/display-system/interface.d.ts +9 -11
- package/dist/frontend/mf-order/src/modules/display-system/legacy-ods/convert.d.ts +10 -0
- package/dist/frontend/mf-order/src/modules/kiosk/deviceCount.d.ts +18 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +12 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/tableNumberHint.d.ts +33 -0
- package/dist/frontend/mf-order/src/stores/display-system/index.d.ts +10 -70
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +51 -0
- package/dist/frontend/mf-order/src/views/display-system/DisplayTemplateEditor.vue.d.ts +2 -0
- package/dist/frontend/mf-order/src/views/display-system/legacy-ods/LegacyOdsTemplateList.vue.d.ts +11 -2
- package/dist/frontend/mf-order/src/views/display-system/view-selection.d.ts +1 -2
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-0GuybwuA.js → index-BZkJr7iu.js} +1 -1
- package/dist/{index-HF3qh9qG.js → index-C4Isv-r7.js} +1 -1
- package/dist/{index-CRNutZC_.js → index-DuJOWWP8.js} +4 -4
- package/dist/{index-D0ZIByef.js → index-nUvyt9Wm.js} +1 -1
- package/dist/{index-KWOCCun9.js → index-tLkJL436.js} +2 -2
- package/dist/{order.dto-GQaBESZq.js → order.dto-nVwtcdX2.js} +6049 -5992
- package/dist/package/entity/display/mediaHosts.d.ts +4 -0
- package/dist/package/entity/food-court/order-v2.do.d.ts +667 -0
- package/dist/package/entity/food-court/order-v2.dto.d.ts +262 -0
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +16 -0
- package/dist/package/entity/order-platform/menu.dto.d.ts +44 -44
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +52 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +293 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +42 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +174 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +42 -0
- package/dist/package/entity/websocket/websocket.dto.d.ts +92 -0
- package/dist/style.css +1 -1
- package/dist/{useInternalUser-C39xpsBU.js → useInternalUser-HhxjbzGl.js} +1 -1
- package/package.json +3 -3
- package/src/api/display-system/index.ts +2 -2
- package/src/composables/useDisplaySystemPermission.spec.ts +27 -0
- package/src/composables/useDisplaySystemPermission.ts +16 -0
- package/src/locales/en-US.json +51 -17
- package/src/locales/ja-JP.json +26 -11
- package/src/locales/th-TH.json +32 -17
- package/src/locales/zh-CN.json +51 -17
- package/src/modules/display-system/interface.spec.ts +1 -32
- package/src/modules/display-system/interface.ts +7 -24
- package/src/modules/display-system/legacy-ods/convert.spec.ts +65 -0
- package/src/modules/display-system/legacy-ods/convert.ts +95 -0
- package/src/modules/display-system/legacy-ods/media.spec.ts +16 -0
- package/src/modules/kiosk/deviceCount.spec.ts +23 -0
- package/src/modules/kiosk/deviceCount.ts +21 -0
- package/src/modules/order-setting/kiosk/interface.ts +13 -0
- package/src/modules/order-setting/kiosk/tableNumberHint.spec.ts +68 -0
- package/src/modules/order-setting/kiosk/tableNumberHint.ts +71 -0
- package/src/router/display-system-permission.spec.ts +13 -0
- package/src/router/routes.ts +2 -1
- package/src/stores/display-system/index.spec.ts +104 -0
- package/src/stores/display-system/index.ts +18 -7
- package/src/stores/order-setting/mapper.ts +11 -2
- package/src/views/display-system/DisplayInspector.vue +3 -0
- package/src/views/display-system/DisplayModulePickerDialog.vue +8 -0
- package/src/views/display-system/DisplaySystemView.conversion.spec.ts +164 -0
- package/src/views/display-system/DisplaySystemView.vue +72 -26
- package/src/views/display-system/DisplayTemplateEditor.spec.ts +18 -0
- package/src/views/display-system/DisplayTemplateEditor.vue +8 -2
- package/src/views/display-system/legacy-ods/LegacyOdsTemplateList.spec.ts +44 -4
- package/src/views/display-system/legacy-ods/LegacyOdsTemplateList.vue +12 -4
- package/src/views/display-system/view-selection.spec.ts +4 -17
- package/src/views/display-system/view-selection.ts +3 -4
- package/src/views/kiosk/devices/KioskDevicesView.vue +6 -2
- package/src/views/kiosk/devices/KioskLicenseSummary.spec.ts +45 -0
- package/src/views/kiosk/devices/KioskLicenseSummary.vue +9 -2
- package/src/views/kiosk/settings/KioskSettingView.vue +140 -6
- package/vitest.config.ts +1 -0
- package/dist/DisplaySystemView-CFr9DnaD.js +0 -8926
- package/dist/KioskSettingView-DPaQ7YFV.js +0 -1124
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as z, computed as I, h as L, resolveComponent as C, openBlock as
|
|
2
|
-
import { s as
|
|
3
|
-
import { d as qe } from "./dayjs.min-
|
|
1
|
+
import { defineComponent as z, computed as I, h as L, resolveComponent as C, openBlock as b, createElementBlock as h, createElementVNode as y, toDisplayString as _, unref as i, createVNode as P, Fragment as g, renderList as de, createBlock as A, resolveDynamicComponent as Le, createCommentVNode as F, normalizeClass as Ae, ref as x, defineAsyncComponent as Ee, watch as j, withDirectives as Re, withCtx as X, vShow as Ke } from "vue";
|
|
2
|
+
import { s as re, l as N, _ as Fe, a as De, b as Ue, u as ge, c as Ne, d as $e, e as oe } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-VidDJfGG.js";
|
|
3
|
+
import { d as qe } from "./dayjs.min-CTTY2vkL.js";
|
|
4
4
|
import { useI18n as Q, useCoreStore as Be } from "@feedmepos/mf-common";
|
|
5
5
|
import { components as Me, useDialog as Ve, useSnackbar as je } from "@feedmepos/ui-library";
|
|
6
6
|
import { onBeforeRouteLeave as Xe } from "vue-router";
|
|
7
|
-
import { S as H, a as se } from "./index-
|
|
7
|
+
import { S as H, a as se } from "./index-C4Isv-r7.js";
|
|
8
8
|
import { defineStore as We } from "pinia";
|
|
9
|
-
import { O as W } from "./index-
|
|
10
|
-
import { F as Ge, a as He } from "./order.dto-
|
|
11
|
-
import { u as Ye } from "./app-
|
|
12
|
-
import { u as ze } from "./useInternalUser-
|
|
9
|
+
import { O as W } from "./index-tLkJL436.js";
|
|
10
|
+
import { F as Ge, a as He } from "./order.dto-nVwtcdX2.js";
|
|
11
|
+
import { u as Ye } from "./app-BorqCaJT.js";
|
|
12
|
+
import { u as ze } from "./useInternalUser-HhxjbzGl.js";
|
|
13
13
|
import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
14
|
const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-600 block" }, Se = {
|
|
15
15
|
class: "hidden xs:flex flex-col gap-8",
|
|
16
16
|
"data-testid": "license-list"
|
|
17
|
-
}, Oe = { class: "flex items-center justify-between gap-8" }, ke = { class: "flex flex-col min-w-0" }, ea = { class: "fm-typo-en-body-md-600" }, aa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary font-mono" }, ta = { class: "grid grid-cols-[auto_1fr] gap-x-12 gap-y-4 fm-typo-en-body-sm-400" }, na = { class: "text-fm-color-typo-secondary" }, la = { key: 1 },
|
|
17
|
+
}, Oe = { class: "flex items-center justify-between gap-8" }, ke = { class: "flex flex-col min-w-0" }, ea = { class: "fm-typo-en-body-md-600" }, aa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary font-mono" }, ta = { class: "grid grid-cols-[auto_1fr] gap-x-12 gap-y-4 fm-typo-en-body-sm-400" }, na = { class: "text-fm-color-typo-secondary" }, la = { key: 1 }, ra = { class: "text-fm-color-typo-secondary" }, oa = { class: "min-w-0 break-words" }, sa = { class: "text-fm-color-typo-secondary" }, ca = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "text-center py-32 text-fm-color-typo-secondary fm-typo-en-body-md-400"
|
|
20
20
|
}, ua = /* @__PURE__ */ z({
|
|
@@ -23,42 +23,42 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
23
23
|
licenses: {}
|
|
24
24
|
},
|
|
25
25
|
setup(e) {
|
|
26
|
-
const { t: a } = Q(), l = e,
|
|
26
|
+
const { t: a } = Q(), l = e, o = { IN_USE: 0, FREE: 1, EXPIRED: 2 }, t = I(
|
|
27
27
|
() => {
|
|
28
28
|
var s;
|
|
29
29
|
return [...((s = l.licenses) == null ? void 0 : s.licenses) ?? []].sort(
|
|
30
|
-
(
|
|
30
|
+
(d, f) => o[d.status] - o[f.status] || d.expiredAt.localeCompare(f.expiredAt)
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
function n(s) {
|
|
35
35
|
return qe(s).format("DD MMM YYYY");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function r(s) {
|
|
38
38
|
return a(s === "TABLET" ? "order.licenseTypeTablet" : "order.licenseTypeKiosk");
|
|
39
39
|
}
|
|
40
40
|
function u(s) {
|
|
41
41
|
if (!s.device) return "-";
|
|
42
|
-
const
|
|
42
|
+
const d = De(s.device.deviceAppType, s.type), f = s.device.deviceAppType === "TABLET_APP" ? "licenseTypeTablet" : "licenseTypeKiosk";
|
|
43
43
|
return L("div", { class: "flex flex-col min-w-0" }, [
|
|
44
44
|
L("span", s.device.name || s.device.machineId),
|
|
45
45
|
L(
|
|
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}`)
|
|
49
49
|
)
|
|
50
50
|
]);
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const p = I(() => [
|
|
53
53
|
{
|
|
54
54
|
id: "type",
|
|
55
55
|
header: () => a("order.licenseColumnType"),
|
|
56
56
|
cell: ({ row: s }) => L("div", { class: "flex flex-col" }, [
|
|
57
|
-
L("span",
|
|
57
|
+
L("span", r(s.original.type)),
|
|
58
58
|
L(
|
|
59
59
|
"span",
|
|
60
60
|
{ class: "fm-typo-en-body-sm-400 text-fm-color-typo-tertiary font-mono" },
|
|
61
|
-
|
|
61
|
+
re(s.original.id)
|
|
62
62
|
)
|
|
63
63
|
]),
|
|
64
64
|
enableSorting: !1
|
|
@@ -67,8 +67,8 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
67
67
|
id: "status",
|
|
68
68
|
header: () => a("order.licenseColumnStatus"),
|
|
69
69
|
cell: ({ row: s }) => {
|
|
70
|
-
const
|
|
71
|
-
return L(Me.FmChip, { variant:
|
|
70
|
+
const d = N(s.original);
|
|
71
|
+
return L(Me.FmChip, { variant: d.variant, label: a(d.labelKey, d.params) });
|
|
72
72
|
},
|
|
73
73
|
enableSorting: !1
|
|
74
74
|
},
|
|
@@ -82,8 +82,8 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
82
82
|
id: "outlet",
|
|
83
83
|
header: () => a("order.licenseColumnOutlet"),
|
|
84
84
|
cell: ({ row: s }) => {
|
|
85
|
-
var
|
|
86
|
-
return ((
|
|
85
|
+
var d;
|
|
86
|
+
return ((d = s.original.device) == null ? void 0 : d.restaurantName) || "-";
|
|
87
87
|
},
|
|
88
88
|
enableSorting: !1
|
|
89
89
|
},
|
|
@@ -94,54 +94,54 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
94
94
|
enableSorting: !1
|
|
95
95
|
}
|
|
96
96
|
]);
|
|
97
|
-
return (s,
|
|
97
|
+
return (s, d) => {
|
|
98
98
|
var w;
|
|
99
|
-
const
|
|
100
|
-
return
|
|
101
|
-
|
|
99
|
+
const f = C("FmTable"), T = C("FmChip");
|
|
100
|
+
return b(), h("div", Je, [
|
|
101
|
+
y("span", Ze, _(i(a)("order.licensesTab")), 1),
|
|
102
102
|
P(Fe, { licenses: e.licenses }, null, 8, ["licenses"]),
|
|
103
|
-
(w = e.licenses) != null && w.verified ? (
|
|
104
|
-
t.value.length ? (
|
|
105
|
-
P(
|
|
103
|
+
(w = e.licenses) != null && w.verified ? (b(), h(g, { key: 0 }, [
|
|
104
|
+
t.value.length ? (b(), h(g, { key: 0 }, [
|
|
105
|
+
P(f, {
|
|
106
106
|
"row-data": t.value,
|
|
107
|
-
"column-defs":
|
|
107
|
+
"column-defs": p.value,
|
|
108
108
|
"hide-footer": !0,
|
|
109
109
|
"page-size": 1e3,
|
|
110
110
|
class: "w-full xs:hidden",
|
|
111
111
|
"data-testid": "license-table"
|
|
112
112
|
}, null, 8, ["row-data", "column-defs"]),
|
|
113
|
-
|
|
114
|
-
(
|
|
113
|
+
y("div", Se, [
|
|
114
|
+
(b(!0), h(g, null, de(t.value, (v) => {
|
|
115
115
|
var E;
|
|
116
|
-
return
|
|
116
|
+
return b(), h("div", {
|
|
117
117
|
key: v.id,
|
|
118
118
|
class: "border fm-corner-radius-lg p-12 flex flex-col gap-8"
|
|
119
119
|
}, [
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
y("div", Oe, [
|
|
121
|
+
y("div", ke, [
|
|
122
|
+
y("span", ea, _(r(v.type)), 1),
|
|
123
|
+
y("span", aa, _(i(re)(v.id)), 1)
|
|
124
124
|
]),
|
|
125
125
|
P(T, {
|
|
126
126
|
variant: i(N)(v).variant,
|
|
127
127
|
label: i(a)(i(N)(v).labelKey, i(N)(v).params)
|
|
128
128
|
}, null, 8, ["variant", "label"])
|
|
129
129
|
]),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
v.device ? (
|
|
130
|
+
y("div", ta, [
|
|
131
|
+
y("span", na, _(i(a)("order.licenseColumnDevice")), 1),
|
|
132
|
+
v.device ? (b(), A(Le(u(v)), {
|
|
133
133
|
key: 0,
|
|
134
134
|
class: "min-w-0 break-words"
|
|
135
|
-
})) : (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
})) : (b(), h("span", la, "-")),
|
|
136
|
+
y("span", ra, _(i(a)("order.licenseColumnOutlet")), 1),
|
|
137
|
+
y("span", oa, _(((E = v.device) == null ? void 0 : E.restaurantName) || "-"), 1),
|
|
138
|
+
y("span", sa, _(i(a)("order.licenseColumnExpires")), 1),
|
|
139
|
+
y("span", null, _(n(v.expiredAt)), 1)
|
|
140
140
|
])
|
|
141
141
|
]);
|
|
142
142
|
}), 128))
|
|
143
143
|
])
|
|
144
|
-
], 64)) : (
|
|
144
|
+
], 64)) : (b(), h("div", ca, _(i(a)("order.licensesEmpty")), 1))
|
|
145
145
|
], 64)) : F("", !0)
|
|
146
146
|
]);
|
|
147
147
|
};
|
|
@@ -150,14 +150,14 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
150
150
|
key: 0,
|
|
151
151
|
class: "flex flex-col gap-2 border-t pt-4",
|
|
152
152
|
"data-testid": "bind-license-plan"
|
|
153
|
-
}, fa = { class: "fm-typo-en-body-md-600" },
|
|
153
|
+
}, fa = { class: "fm-typo-en-body-md-600" }, ya = /* @__PURE__ */ z({
|
|
154
154
|
__name: "KioskOtpDialog",
|
|
155
155
|
props: {
|
|
156
156
|
otp: {},
|
|
157
157
|
licenses: {}
|
|
158
158
|
},
|
|
159
159
|
setup(e) {
|
|
160
|
-
const { t: a } = Q(), l = e,
|
|
160
|
+
const { t: a } = Q(), l = e, o = I(() => {
|
|
161
161
|
const t = l.licenses;
|
|
162
162
|
if (!(t != null && t.verified)) return [];
|
|
163
163
|
if (t.unlimited)
|
|
@@ -169,28 +169,28 @@ const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-
|
|
|
169
169
|
];
|
|
170
170
|
});
|
|
171
171
|
return (t, n) => {
|
|
172
|
-
const
|
|
173
|
-
return
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
(
|
|
172
|
+
const r = C("FmIcon");
|
|
173
|
+
return b(), h("div", ia, [
|
|
174
|
+
y("span", da, _(i(a)("order.bindDeviceMessage")), 1),
|
|
175
|
+
y("div", pa, _(e.otp), 1),
|
|
176
|
+
o.value.length ? (b(), h("div", ma, [
|
|
177
|
+
y("span", fa, _(i(a)("order.bindLicenseTitle")), 1),
|
|
178
|
+
(b(!0), h(g, null, de(o.value, (u) => (b(), h("div", {
|
|
179
179
|
key: u.key,
|
|
180
180
|
class: Ae(["flex items-start gap-2 fm-typo-en-body-md-400", u.warn ? "text-fm-color-system-warning-400" : "text-fm-color-typo-secondary"])
|
|
181
181
|
}, [
|
|
182
|
-
P(
|
|
182
|
+
P(r, {
|
|
183
183
|
name: u.icon
|
|
184
184
|
}, null, 8, ["name"]),
|
|
185
|
-
|
|
185
|
+
y("span", null, _(i(a)(u.key)), 1)
|
|
186
186
|
], 2))), 128))
|
|
187
187
|
])) : F("", !0)
|
|
188
188
|
]);
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
}),
|
|
191
|
+
}), va = "KIOSK_LICENSE_QUOTA_EXHAUSTED";
|
|
192
192
|
function ba(e) {
|
|
193
|
-
return e ? e.status === 403 ? "order.bindDevicePermissionDenied" : e.code ===
|
|
193
|
+
return e ? e.status === 403 ? "order.bindDevicePermissionDenied" : e.code === va || /no quota available/i.test(e.message ?? "") ? "order.bindDeviceNoQuota" : e.status === void 0 ? "order.bindDeviceNetworkError" : "order.bindDeviceFailed" : "order.bindDeviceFailed";
|
|
194
194
|
}
|
|
195
195
|
const _a = {
|
|
196
196
|
enabled: !1,
|
|
@@ -204,7 +204,8 @@ const _a = {
|
|
|
204
204
|
submitOrderInstruction: {
|
|
205
205
|
payAtCounter: null,
|
|
206
206
|
paid: null
|
|
207
|
-
}
|
|
207
|
+
},
|
|
208
|
+
hint: { show: !0, messages: null }
|
|
208
209
|
}, ha = {
|
|
209
210
|
enabled: !1,
|
|
210
211
|
submitOrderInstruction: {
|
|
@@ -223,7 +224,7 @@ const Y = {
|
|
|
223
224
|
kiosk: xa(e.kioskSettings, (a = e.sequenceSettings) == null ? void 0 : a.kioskDineIn, (l = e.sequenceSettings) == null ? void 0 : l.kioskShareNumber)
|
|
224
225
|
};
|
|
225
226
|
}, xa = (e, a, l) => {
|
|
226
|
-
var
|
|
227
|
+
var o, t, n, r, u, p, s, d, f, T, w, v;
|
|
227
228
|
return {
|
|
228
229
|
dineIn: Ia(
|
|
229
230
|
a ?? {
|
|
@@ -234,14 +235,14 @@ const Y = {
|
|
|
234
235
|
),
|
|
235
236
|
takeaway: {
|
|
236
237
|
enabled: (e == null ? void 0 : e.canTakeaway) ?? !1,
|
|
237
|
-
submitOrderInstruction: (
|
|
238
|
-
payAtCounter: ((
|
|
239
|
-
paid: ((s = (
|
|
238
|
+
submitOrderInstruction: (o = e == null ? void 0 : e.takeaway) != null && o.submitOrderInstruction ? {
|
|
239
|
+
payAtCounter: ((r = (n = (t = e == null ? void 0 : e.takeaway) == null ? void 0 : t.submitOrderInstruction) == null ? void 0 : n.payAtCounter) == null ? void 0 : r.en) ?? null,
|
|
240
|
+
paid: ((s = (p = (u = e == null ? void 0 : e.takeaway) == null ? void 0 : u.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : s.en) ?? null
|
|
240
241
|
} : Y
|
|
241
242
|
},
|
|
242
243
|
paymentSetting: {
|
|
243
|
-
paymentTypes: ((
|
|
244
|
-
offlinePaymentTypes: ((
|
|
244
|
+
paymentTypes: ((d = e == null ? void 0 : e.paymentSetting) == null ? void 0 : d.paymentTypes) ?? [],
|
|
245
|
+
offlinePaymentTypes: ((f = e == null ? void 0 : e.paymentSetting) == null ? void 0 : f.offlinePaymentTypes) ?? [],
|
|
245
246
|
ePaymentTypes: ((T = e == null ? void 0 : e.paymentSetting) == null ? void 0 : T.ePaymentTypes) ?? Ge.parse({
|
|
246
247
|
card: {
|
|
247
248
|
terminal: !1,
|
|
@@ -283,20 +284,20 @@ const Y = {
|
|
|
283
284
|
};
|
|
284
285
|
}, ce = "#K", Ca = (e, a) => {
|
|
285
286
|
var t;
|
|
286
|
-
const l = { ...a ?? {} },
|
|
287
|
-
return (a != null && a.kioskDineIn ||
|
|
287
|
+
const l = { ...a ?? {} }, o = ((t = e.dineIn.sequenceNumber.prefix) == null ? void 0 : t.trim()) || ce;
|
|
288
|
+
return (a != null && a.kioskDineIn || o !== ce) && (l.kioskDineIn = {
|
|
288
289
|
...(a == null ? void 0 : a.kioskDineIn) ?? { current: 0 },
|
|
289
|
-
prefix:
|
|
290
|
+
prefix: o
|
|
290
291
|
}), (e.shareNumber || (a == null ? void 0 : a.kioskShareNumber) != null) && (l.kioskShareNumber = e.shareNumber), l;
|
|
291
292
|
}, Ia = (e, a) => {
|
|
292
|
-
var l,
|
|
293
|
+
var l, o, t, n, r, u, p, s, d, f;
|
|
293
294
|
return {
|
|
294
295
|
enabled: !!a,
|
|
295
296
|
sequenceNumber: e,
|
|
296
297
|
pickUp: a != null && a.pickUp ? {
|
|
297
298
|
...a.pickUp,
|
|
298
299
|
submitOrderInstruction: a.pickUp.submitOrderInstruction ? {
|
|
299
|
-
payAtCounter: ((
|
|
300
|
+
payAtCounter: ((o = (l = a.pickUp.submitOrderInstruction) == null ? void 0 : l.payAtCounter) == null ? void 0 : o.en) ?? null,
|
|
300
301
|
paid: ((n = (t = a.pickUp.submitOrderInstruction) == null ? void 0 : t.paid) == null ? void 0 : n.en) ?? null
|
|
301
302
|
} : Y,
|
|
302
303
|
enablePaxDialog: a.pickUp.enablePaxDialog ? a.pickUp.enablePaxDialog : !1
|
|
@@ -308,14 +309,19 @@ const Y = {
|
|
|
308
309
|
padDigit: a.displayStand.padDigit,
|
|
309
310
|
enablePaxDialog: a.displayStand.enablePaxDialog ?? !1,
|
|
310
311
|
submitOrderInstruction: a.displayStand.submitOrderInstruction ? {
|
|
311
|
-
payAtCounter: ((u = (
|
|
312
|
-
paid: ((s = (
|
|
313
|
-
} : Y
|
|
312
|
+
payAtCounter: ((u = (r = a.displayStand.submitOrderInstruction) == null ? void 0 : r.payAtCounter) == null ? void 0 : u.en) ?? null,
|
|
313
|
+
paid: ((s = (p = a.displayStand.submitOrderInstruction) == null ? void 0 : p.paid) == null ? void 0 : s.en) ?? null
|
|
314
|
+
} : Y,
|
|
315
|
+
// Absent (older documents) = the hint shows, with the kiosk's own text.
|
|
316
|
+
hint: {
|
|
317
|
+
show: ((d = a.displayStand.hint) == null ? void 0 : d.show) ?? !0,
|
|
318
|
+
messages: ((f = a.displayStand.hint) == null ? void 0 : f.messages) ?? null
|
|
319
|
+
}
|
|
314
320
|
} : _a
|
|
315
321
|
};
|
|
316
322
|
}, Pa = (e) => {
|
|
317
323
|
const a = (t) => {
|
|
318
|
-
var n,
|
|
324
|
+
var n, r, u, p;
|
|
319
325
|
return {
|
|
320
326
|
requiredSlot: !!t.displayStand,
|
|
321
327
|
displayStand: {
|
|
@@ -324,7 +330,7 @@ const Y = {
|
|
|
324
330
|
payAtCounter: (n = t.displayStand.submitOrderInstruction) != null && n.payAtCounter ? {
|
|
325
331
|
en: t.displayStand.submitOrderInstruction.payAtCounter
|
|
326
332
|
} : null,
|
|
327
|
-
paid: (
|
|
333
|
+
paid: (r = t.displayStand.submitOrderInstruction) != null && r.paid ? {
|
|
328
334
|
en: t.displayStand.submitOrderInstruction.paid
|
|
329
335
|
} : null
|
|
330
336
|
}
|
|
@@ -335,7 +341,7 @@ const Y = {
|
|
|
335
341
|
payAtCounter: (u = t.pickUp.submitOrderInstruction) != null && u.payAtCounter ? {
|
|
336
342
|
en: t.pickUp.submitOrderInstruction.payAtCounter
|
|
337
343
|
} : null,
|
|
338
|
-
paid: (
|
|
344
|
+
paid: (p = t.pickUp.submitOrderInstruction) != null && p.paid ? {
|
|
339
345
|
en: t.pickUp.submitOrderInstruction.paid
|
|
340
346
|
} : null
|
|
341
347
|
}
|
|
@@ -364,7 +370,7 @@ const Y = {
|
|
|
364
370
|
// Omitted when unset: the backend $sets the whole kiosk subdocument, so a
|
|
365
371
|
// cleared minimum is removed instead of being stored as null.
|
|
366
372
|
minWeighGrams: e.minWeighGrams ?? void 0,
|
|
367
|
-
paymentSetting:
|
|
373
|
+
paymentSetting: o(e.paymentSetting),
|
|
368
374
|
takeaway: e.takeaway.submitOrderInstruction ? {
|
|
369
375
|
submitOrderInstruction: {
|
|
370
376
|
payAtCounter: e.takeaway.submitOrderInstruction.payAtCounter ? {
|
|
@@ -376,7 +382,7 @@ const Y = {
|
|
|
376
382
|
}
|
|
377
383
|
} : void 0
|
|
378
384
|
};
|
|
379
|
-
},
|
|
385
|
+
}, o = (t) => ({
|
|
380
386
|
paymentTypes: t.paymentTypes,
|
|
381
387
|
offlinePaymentTypes: t.offlinePaymentTypes,
|
|
382
388
|
ePaymentTypes: t.ePaymentTypes
|
|
@@ -394,34 +400,34 @@ const Y = {
|
|
|
394
400
|
}, Ta = We("orderSetting", () => {
|
|
395
401
|
const e = x({});
|
|
396
402
|
async function a(n = () => !0) {
|
|
397
|
-
const
|
|
398
|
-
n() && t(u,
|
|
403
|
+
const r = H.getRestaurantId() ?? void 0, u = await W.getOrderSetting();
|
|
404
|
+
n() && t(u, r);
|
|
399
405
|
}
|
|
400
406
|
function l() {
|
|
401
407
|
e.value.orderSetting = void 0, e.value.kiosk = void 0, e.value.restaurantId = void 0;
|
|
402
408
|
}
|
|
403
|
-
async function
|
|
404
|
-
const
|
|
405
|
-
if (!
|
|
409
|
+
async function o(n) {
|
|
410
|
+
const r = e.value.orderSetting, u = H.getRestaurantId() ?? void 0;
|
|
411
|
+
if (!r || !u || e.value.restaurantId !== u)
|
|
406
412
|
throw new Error("Order settings are not loaded for this outlet");
|
|
407
|
-
const { _id:
|
|
413
|
+
const { _id: p, ...s } = r, d = G.toOrderKioskSettingsDto(n), f = await W.getOrderSetting(), T = {
|
|
408
414
|
...s,
|
|
409
|
-
kioskSettings:
|
|
415
|
+
kioskSettings: d.kioskSettings,
|
|
410
416
|
sequenceSettings: G.toKioskSequenceSettings(
|
|
411
417
|
n,
|
|
412
|
-
|
|
418
|
+
f.sequenceSettings
|
|
413
419
|
)
|
|
414
420
|
}, w = await W.updateOrderSetting(T);
|
|
415
421
|
t(w, u);
|
|
416
422
|
}
|
|
417
|
-
function t(n,
|
|
418
|
-
e.value.orderSetting = n, e.value.kiosk = G.convertOrderSettingDto(n).kiosk, e.value.restaurantId =
|
|
423
|
+
function t(n, r) {
|
|
424
|
+
e.value.orderSetting = n, e.value.kiosk = G.convertOrderSettingDto(n).kiosk, e.value.restaurantId = r;
|
|
419
425
|
}
|
|
420
426
|
return {
|
|
421
427
|
state: e.value,
|
|
422
428
|
getSetting: a,
|
|
423
429
|
reset: l,
|
|
424
|
-
updateKioskSetting:
|
|
430
|
+
updateKioskSetting: o
|
|
425
431
|
};
|
|
426
432
|
});
|
|
427
433
|
function La(e, a) {
|
|
@@ -429,58 +435,58 @@ function La(e, a) {
|
|
|
429
435
|
}
|
|
430
436
|
function Aa(e, a) {
|
|
431
437
|
const l = x("idle");
|
|
432
|
-
let
|
|
438
|
+
let o = 0;
|
|
433
439
|
async function t() {
|
|
434
|
-
const u = ++
|
|
440
|
+
const u = ++o, p = () => u === o;
|
|
435
441
|
e.reset(), l.value = "loading";
|
|
436
442
|
try {
|
|
437
|
-
await e.getSetting(
|
|
443
|
+
await e.getSetting(p), p() && (l.value = "ready");
|
|
438
444
|
} catch {
|
|
439
|
-
|
|
445
|
+
p() && (l.value = "error");
|
|
440
446
|
}
|
|
441
447
|
}
|
|
442
448
|
const n = I(
|
|
443
449
|
() => l.value === "ready" ? e.state.kiosk ?? null : null
|
|
444
450
|
);
|
|
445
|
-
async function
|
|
451
|
+
async function r(u) {
|
|
446
452
|
try {
|
|
447
453
|
if (l.value !== "ready")
|
|
448
454
|
throw new Error("Kiosk settings are not loaded for this outlet");
|
|
449
455
|
await e.updateKioskSetting(u);
|
|
450
|
-
} catch (
|
|
451
|
-
throw a.onFailed(),
|
|
456
|
+
} catch (p) {
|
|
457
|
+
throw a.onFailed(), p;
|
|
452
458
|
}
|
|
453
459
|
a.onSaved();
|
|
454
460
|
}
|
|
455
|
-
return { status: l, form: n, load: t, save:
|
|
461
|
+
return { status: l, form: n, load: t, save: r };
|
|
456
462
|
}
|
|
457
463
|
const Ea = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), Ra = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), Ka = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), Fa = /[^\p{L}\d]+/giu, ue = "$1\0$2", ie = "";
|
|
458
464
|
function pe(e) {
|
|
459
465
|
let a = e.trim();
|
|
460
466
|
a = a.replace(Ea, ue).replace(Ra, ue), a = a.replace(Fa, "\0");
|
|
461
|
-
let l = 0,
|
|
467
|
+
let l = 0, o = a.length;
|
|
462
468
|
for (; a.charAt(l) === "\0"; )
|
|
463
469
|
l++;
|
|
464
|
-
if (l ===
|
|
470
|
+
if (l === o)
|
|
465
471
|
return [];
|
|
466
|
-
for (; a.charAt(
|
|
467
|
-
|
|
468
|
-
return a.slice(l,
|
|
472
|
+
for (; a.charAt(o - 1) === "\0"; )
|
|
473
|
+
o--;
|
|
474
|
+
return a.slice(l, o).split(/\0/g);
|
|
469
475
|
}
|
|
470
476
|
function Da(e) {
|
|
471
477
|
const a = pe(e);
|
|
472
478
|
for (let l = 0; l < a.length; l++) {
|
|
473
|
-
const
|
|
479
|
+
const o = a[l], t = Ka.exec(o);
|
|
474
480
|
if (t) {
|
|
475
481
|
const n = t.index + (t[1] ?? t[2]).length;
|
|
476
|
-
a.splice(l, 1,
|
|
482
|
+
a.splice(l, 1, o.slice(0, n), o.slice(n));
|
|
477
483
|
}
|
|
478
484
|
}
|
|
479
485
|
return a;
|
|
480
486
|
}
|
|
481
487
|
function Ua(e, a) {
|
|
482
|
-
const [l,
|
|
483
|
-
return l +
|
|
488
|
+
const [l, o, t] = qa(e, a), n = ga(a == null ? void 0 : a.locale), r = Na(a == null ? void 0 : a.locale);
|
|
489
|
+
return l + o.map($a(n, r)).join(" ") + t;
|
|
484
490
|
}
|
|
485
491
|
function ga(e) {
|
|
486
492
|
return (a) => a.toLocaleLowerCase(e);
|
|
@@ -492,57 +498,57 @@ function $a(e, a) {
|
|
|
492
498
|
return (l) => `${a(l[0])}${e(l.slice(1))}`;
|
|
493
499
|
}
|
|
494
500
|
function qa(e, a = {}) {
|
|
495
|
-
const l = a.split ?? (a.separateNumbers ? Da : pe),
|
|
496
|
-
let n = 0,
|
|
501
|
+
const l = a.split ?? (a.separateNumbers ? Da : pe), o = a.prefixCharacters ?? ie, t = a.suffixCharacters ?? ie;
|
|
502
|
+
let n = 0, r = e.length;
|
|
497
503
|
for (; n < e.length; ) {
|
|
498
504
|
const u = e.charAt(n);
|
|
499
|
-
if (!
|
|
505
|
+
if (!o.includes(u))
|
|
500
506
|
break;
|
|
501
507
|
n++;
|
|
502
508
|
}
|
|
503
|
-
for (;
|
|
504
|
-
const u =
|
|
505
|
-
if (!t.includes(
|
|
509
|
+
for (; r > n; ) {
|
|
510
|
+
const u = r - 1, p = e.charAt(u);
|
|
511
|
+
if (!t.includes(p))
|
|
506
512
|
break;
|
|
507
|
-
|
|
513
|
+
r = u;
|
|
508
514
|
}
|
|
509
515
|
return [
|
|
510
516
|
e.slice(0, n),
|
|
511
|
-
l(e.slice(n,
|
|
512
|
-
e.slice(
|
|
517
|
+
l(e.slice(n, r)),
|
|
518
|
+
e.slice(r)
|
|
513
519
|
];
|
|
514
520
|
}
|
|
515
521
|
const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class: "flex flex-wrap items-center justify-between gap-x-24 gap-y-8 xs:flex-col xs:items-stretch" }, ja = ["title"], Xa = { class: "pt-[1.5rem]" }, Wa = { class: "flex flex-col gap-10" }, Ga = /* @__PURE__ */ z({
|
|
516
522
|
__name: "KioskView",
|
|
517
523
|
setup(e) {
|
|
518
524
|
var ne;
|
|
519
|
-
const { t: a } = Q(), { canManageOrderSetting: l } = Ye(), { isInternal:
|
|
520
|
-
() => import("./KioskSettingView-
|
|
521
|
-
), n = x("device"),
|
|
525
|
+
const { t: a } = Q(), { canManageOrderSetting: l } = Ye(), { isInternal: o } = ze(), t = Ee(
|
|
526
|
+
() => import("./KioskSettingView-mfhi9vuf.js")
|
|
527
|
+
), n = x("device"), r = ge(), u = Ta(), p = Ne(), s = Ve(), { currentRestaurant: d, restaurants: f, changeRestaurant: T } = Be(), w = je(), v = x(((ne = d.value) == null ? void 0 : ne._id) ?? void 0), E = x(null), $ = x(""), J = x(null), Z = I(() => {
|
|
522
528
|
const c = $.value.trim().toLowerCase();
|
|
523
|
-
return
|
|
524
|
-
(
|
|
525
|
-
).map((
|
|
526
|
-
label:
|
|
527
|
-
value:
|
|
529
|
+
return f.value.filter(
|
|
530
|
+
(m) => !c || m.profile.name.toLowerCase().includes(c) || m._id.toLowerCase().includes(c)
|
|
531
|
+
).map((m) => ({
|
|
532
|
+
label: m.profile.name,
|
|
533
|
+
value: m._id
|
|
528
534
|
}));
|
|
529
535
|
});
|
|
530
536
|
async function me(c) {
|
|
531
537
|
$.value = c;
|
|
532
538
|
}
|
|
533
539
|
function fe(c) {
|
|
534
|
-
var
|
|
540
|
+
var m, K;
|
|
535
541
|
if (!c) {
|
|
536
542
|
$.value = "";
|
|
537
543
|
return;
|
|
538
544
|
}
|
|
539
|
-
(K = (
|
|
545
|
+
(K = (m = J.value) == null ? void 0 : m.querySelector("input")) == null || K.select();
|
|
540
546
|
}
|
|
541
547
|
const D = x(""), q = x(null), B = x(!1), {
|
|
542
|
-
status:
|
|
548
|
+
status: ye,
|
|
543
549
|
form: S,
|
|
544
550
|
load: O,
|
|
545
|
-
save:
|
|
551
|
+
save: ve
|
|
546
552
|
} = Aa(u, {
|
|
547
553
|
onSaved: () => w.open({ title: a("order.kioskSettingSuccess"), type: "success" }),
|
|
548
554
|
onFailed: () => w.open({ title: a("order.kioskSettingFailed"), type: "error" })
|
|
@@ -554,45 +560,45 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
554
560
|
return;
|
|
555
561
|
}
|
|
556
562
|
R.value = !1;
|
|
557
|
-
const
|
|
558
|
-
v.value = c, await T(
|
|
563
|
+
const m = f.value.find((K) => K._id == c);
|
|
564
|
+
v.value = c, await T(m);
|
|
559
565
|
}
|
|
560
566
|
j(
|
|
561
567
|
() => {
|
|
562
568
|
var c;
|
|
563
569
|
return {
|
|
564
570
|
hasToken: !!H.getIdToken(),
|
|
565
|
-
restaurantId: (c =
|
|
571
|
+
restaurantId: (c = d.value) == null ? void 0 : c._id
|
|
566
572
|
};
|
|
567
573
|
},
|
|
568
574
|
(c) => {
|
|
569
|
-
const
|
|
570
|
-
|
|
575
|
+
const m = La(c, q.value);
|
|
576
|
+
m && (q.value = m, D.value = m, v.value = m, be());
|
|
571
577
|
},
|
|
572
578
|
{ immediate: !0 }
|
|
573
579
|
);
|
|
574
580
|
async function be() {
|
|
575
|
-
|
|
581
|
+
r.state.devices = [], r.state.licenses = null, await Promise.all([
|
|
576
582
|
l.value ? O() : Promise.resolve(),
|
|
577
|
-
|
|
583
|
+
p.loadCheckouts(),
|
|
578
584
|
ee(),
|
|
579
585
|
M()
|
|
580
586
|
]);
|
|
581
587
|
}
|
|
582
588
|
function ee() {
|
|
583
|
-
return
|
|
589
|
+
return o.value ? p.loadPaymentDevices() : (p.clearPaymentDevices(), Promise.resolve());
|
|
584
590
|
}
|
|
585
|
-
j(
|
|
586
|
-
q.value ? ee() : c ||
|
|
591
|
+
j(o, (c) => {
|
|
592
|
+
q.value ? ee() : c || p.clearPaymentDevices();
|
|
587
593
|
});
|
|
588
594
|
async function M() {
|
|
589
595
|
E.value = null, B.value = !0, await Promise.all([
|
|
590
|
-
|
|
596
|
+
r.getDevices().catch((c) => {
|
|
591
597
|
E.value = c instanceof se && c.status === 403 ? "forbidden" : "error";
|
|
592
598
|
}),
|
|
593
599
|
// Licences are extra information on top of the devices: a failure only shows
|
|
594
600
|
// a note in the summary (the store leaves `licenses` null).
|
|
595
|
-
|
|
601
|
+
r.getLicenses().catch(() => {
|
|
596
602
|
})
|
|
597
603
|
]), B.value = !1;
|
|
598
604
|
}
|
|
@@ -601,8 +607,8 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
601
607
|
set: (c) => {
|
|
602
608
|
if (c !== n.value) {
|
|
603
609
|
if (n.value === "setting" && R.value) {
|
|
604
|
-
V().then((
|
|
605
|
-
|
|
610
|
+
V().then((m) => {
|
|
611
|
+
m && (R.value = !1, n.value = c);
|
|
606
612
|
});
|
|
607
613
|
return;
|
|
608
614
|
}
|
|
@@ -627,10 +633,10 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
627
633
|
{ label: a("order.licensesTab"), value: "licenses" }
|
|
628
634
|
];
|
|
629
635
|
return l.value && c.push({ label: a("order.settings"), value: "setting" }), c;
|
|
630
|
-
}), he = I(() =>
|
|
636
|
+
}), he = I(() => r.state.devices), te = I(() => r.state.licenses);
|
|
631
637
|
async function we() {
|
|
632
638
|
try {
|
|
633
|
-
await
|
|
639
|
+
await r.requestOtp();
|
|
634
640
|
} catch (c) {
|
|
635
641
|
w.open({
|
|
636
642
|
title: a(ba(c instanceof se ? c : null)),
|
|
@@ -640,45 +646,45 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
640
646
|
}
|
|
641
647
|
s.open({
|
|
642
648
|
title: Ua(a("order.bindDevice")),
|
|
643
|
-
contentComponent:
|
|
649
|
+
contentComponent: ya,
|
|
644
650
|
contentComponentProps: {
|
|
645
|
-
otp:
|
|
646
|
-
licenses:
|
|
651
|
+
otp: r.state.otp,
|
|
652
|
+
licenses: r.state.licenses
|
|
647
653
|
}
|
|
648
654
|
}).onClose(async () => {
|
|
649
655
|
await M();
|
|
650
656
|
});
|
|
651
657
|
}
|
|
652
658
|
return j(
|
|
653
|
-
() =>
|
|
659
|
+
() => f.value.length,
|
|
654
660
|
async (c) => {
|
|
655
|
-
!
|
|
661
|
+
!d.value && v.value === void 0 && f.value.length > 0 && await k(f.value[0]._id);
|
|
656
662
|
},
|
|
657
663
|
{ immediate: !0 }
|
|
658
|
-
), (c,
|
|
664
|
+
), (c, m) => {
|
|
659
665
|
var le;
|
|
660
666
|
const K = C("FmPageHead"), xe = C("FmTabs"), Ce = C("FmIcon"), Ie = C("FmMenuItem"), Pe = C("FmSelect"), Te = C("FmButton");
|
|
661
|
-
return
|
|
667
|
+
return b(), h("div", Ba, [
|
|
662
668
|
P(K, {
|
|
663
669
|
title: i(a)("order.kiosk")
|
|
664
670
|
}, null, 8, ["title"]),
|
|
665
|
-
|
|
666
|
-
|
|
671
|
+
y("div", Ma, [
|
|
672
|
+
y("div", Va, [
|
|
667
673
|
P(xe, {
|
|
668
674
|
"model-value": ae.value,
|
|
669
|
-
"onUpdate:modelValue":
|
|
675
|
+
"onUpdate:modelValue": m[0] || (m[0] = (U) => ae.value = U),
|
|
670
676
|
items: _e.value
|
|
671
677
|
}, null, 8, ["model-value", "items"]),
|
|
672
|
-
Re(
|
|
678
|
+
Re(y("div", {
|
|
673
679
|
class: "kiosk-outlet-picker w-[360px] max-w-full xs:w-full",
|
|
674
680
|
ref_key: "restaurantPicker",
|
|
675
681
|
ref: J,
|
|
676
|
-
title: (le = i(
|
|
682
|
+
title: (le = i(d)) == null ? void 0 : le.profile.name
|
|
677
683
|
}, [
|
|
678
684
|
P(Pe, {
|
|
679
685
|
modelValue: v.value,
|
|
680
686
|
"onUpdate:modelValue": [
|
|
681
|
-
|
|
687
|
+
m[1] || (m[1] = (U) => v.value = U),
|
|
682
688
|
k
|
|
683
689
|
],
|
|
684
690
|
items: Z.value,
|
|
@@ -697,7 +703,7 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
697
703
|
})
|
|
698
704
|
]),
|
|
699
705
|
"append-menu": X(() => [
|
|
700
|
-
Z.value.length ? F("", !0) : (
|
|
706
|
+
Z.value.length ? F("", !0) : (b(), A(Ie, {
|
|
701
707
|
key: 0,
|
|
702
708
|
disabled: "",
|
|
703
709
|
label: i(a)("order.noRestaurantFound")
|
|
@@ -709,9 +715,9 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
709
715
|
[Ke, n.value != "licenses"]
|
|
710
716
|
])
|
|
711
717
|
]),
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
n.value == "device" ? (
|
|
718
|
+
y("div", Xa, [
|
|
719
|
+
y("div", Wa, [
|
|
720
|
+
n.value == "device" ? (b(), A($e, {
|
|
715
721
|
key: 0,
|
|
716
722
|
devices: he.value,
|
|
717
723
|
licenses: te.value,
|
|
@@ -720,12 +726,12 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
720
726
|
onRequestOtp: we,
|
|
721
727
|
onRetry: M
|
|
722
728
|
}, null, 8, ["devices", "licenses", "load-error", "loading"])) : F("", !0),
|
|
723
|
-
n.value == "licenses" ? (
|
|
729
|
+
n.value == "licenses" ? (b(), A(ua, {
|
|
724
730
|
key: 1,
|
|
725
731
|
licenses: te.value
|
|
726
732
|
}, null, 8, ["licenses"])) : F("", !0),
|
|
727
|
-
n.value == "setting" && i(l) ? (
|
|
728
|
-
i(
|
|
733
|
+
n.value == "setting" && i(l) ? (b(), h(g, { key: 2 }, [
|
|
734
|
+
i(ye) === "error" ? (b(), A(oe, {
|
|
729
735
|
key: 0,
|
|
730
736
|
icon: "error",
|
|
731
737
|
title: i(a)("order.settingsLoadErrorTitle"),
|
|
@@ -740,13 +746,13 @@ const Ba = { class: "py-[1.5rem]" }, Ma = { class: "px-[1.5rem]" }, Va = { class
|
|
|
740
746
|
}, null, 8, ["label", "onClick"])
|
|
741
747
|
]),
|
|
742
748
|
_: 1
|
|
743
|
-
}, 8, ["title", "message"])) : i(S) ? (
|
|
749
|
+
}, 8, ["title", "message"])) : i(S) ? (b(), A(i(t), {
|
|
744
750
|
key: `KioskSettingView-${D.value}`,
|
|
745
751
|
"restaurant-id": D.value,
|
|
746
752
|
form: i(S),
|
|
747
|
-
save: i(
|
|
748
|
-
onDirtyChange:
|
|
749
|
-
}, null, 8, ["restaurant-id", "form", "save"])) : (
|
|
753
|
+
save: i(ve),
|
|
754
|
+
onDirtyChange: m[2] || (m[2] = (U) => R.value = U)
|
|
755
|
+
}, null, 8, ["restaurant-id", "form", "save"])) : (b(), A(oe, {
|
|
750
756
|
key: 1,
|
|
751
757
|
icon: "hourglass_empty",
|
|
752
758
|
title: i(a)("order.settingsLoading"),
|