@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.
Files changed (28) hide show
  1. package/dist/{DisplaySystemView-D4I6fQwr.js → DisplaySystemView-ChGTO4v2.js} +4 -4
  2. package/dist/{FoodCourtInvitationsView-DODbUcup.js → FoodCourtInvitationsView-F1LiGOR8.js} +4 -4
  3. package/dist/{FoodCourtOrderSettingsView-BPb_clxQ.js → FoodCourtOrderSettingsView-D5M5kFAl.js} +1 -1
  4. package/dist/{FoodCourtOrdersView-B4jGHCvq.js → FoodCourtOrdersView-BQrESoTH.js} +4 -4
  5. package/dist/{FoodCourtStallsView-Yo5imZIL.js → FoodCourtStallsView-jz1xnZus.js} +2 -2
  6. package/dist/{FoodCourtStatusView-Qmg07OHi.js → FoodCourtStatusView-DC3qHL1L.js} +1 -1
  7. package/dist/{KioskDevicesView-gnKpLlRc.js → KioskDevicesView-B9w4izOk.js} +1 -1
  8. 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
  9. package/dist/{KioskSettingView-CarJ2tfl.js → KioskSettingView-Bmfvz0Kz.js} +3 -3
  10. package/dist/{KioskView-BQxmKeWX.js → KioskView-B0WlDEsG.js} +281 -327
  11. package/dist/{OrderSettingsView-DvThEQW-.js → OrderSettingsView-BF89-eSB.js} +10 -10
  12. package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-CiZeQGB6.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-BqPQnAVb.js} +1 -1
  13. package/dist/{app-BvIV73_P.js → app-B4ew9SMz.js} +11 -11
  14. package/dist/app.js +1 -1
  15. package/dist/{dayjs.min-B5uDRIkW.js → dayjs.min-BsZk4QHK.js} +1 -1
  16. package/dist/{featureFlag-BYngu4rF.js → featureFlag-CFlCo4uv.js} +1 -1
  17. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  18. package/dist/{index-BBXEB6tY.js → index-C6c28uBZ.js} +1 -1
  19. package/dist/{index-BWR9_xAj.js → index-D0vTvoQN.js} +1 -1
  20. package/dist/{index-Mnxpcwdy.js → index-D4_zVJPi.js} +4 -4
  21. package/dist/{index-CGf3YUfs.js → index-DLeX1p1o.js} +2 -2
  22. package/dist/{index-DWIzd_V1.js → index-Z1ZA897U.js} +1 -1
  23. package/dist/{order.dto-DBYyEQ7c.js → order.dto-DrlhCvYK.js} +2 -2
  24. package/dist/style.css +1 -1
  25. package/dist/{useInternalUser-DxmgUn4T.js → useInternalUser-BaSqwN4K.js} +1 -1
  26. package/package.json +1 -1
  27. package/src/views/kiosk/KioskView.spec.ts +169 -0
  28. package/src/views/kiosk/KioskView.vue +21 -75
@@ -1,48 +1,48 @@
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-BvLOXC6b.js";
3
- import { d as qe } from "./dayjs.min-B5uDRIkW.js";
4
- import { useI18n as Q, useCoreStore as Be } from "@feedmepos/mf-common";
5
- import { components as Me, useDialog as Ve, useSnackbar as je } from "@feedmepos/ui-library";
6
- import { onBeforeRouteLeave as Xe } from "vue-router";
7
- import { S as H, a as se } from "./index-BWR9_xAj.js";
8
- import { defineStore as We } from "pinia";
9
- import { O as W } from "./index-CGf3YUfs.js";
10
- import { F as Ge, a as He } from "./order.dto-DBYyEQ7c.js";
11
- import { u as Ye } from "./app-BvIV73_P.js";
12
- import { u as ze } from "./useInternalUser-DxmgUn4T.js";
13
- import { _ as Qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- const Je = { class: "flex flex-col gap-4" }, Ze = { class: "fm-typo-en-title-sm-600 block" }, Se = {
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
- }, 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 = {
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
- }, ua = /* @__PURE__ */ z({
20
+ }, ta = /* @__PURE__ */ H({
21
21
  __name: "KioskLicensesView",
22
22
  props: {
23
23
  licenses: {}
24
24
  },
25
25
  setup(e) {
26
- const { t: a } = Q(), l = e, o = { IN_USE: 0, FREE: 1, EXPIRED: 2 }, t = I(
26
+ const { t: a } = Y(), l = e, o = { IN_USE: 0, FREE: 1, EXPIRED: 2 }, t = I(
27
27
  () => {
28
- var s;
29
- return [...((s = l.licenses) == null ? void 0 : s.licenses) ?? []].sort(
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(s) {
35
- return qe(s).format("DD MMM YYYY");
34
+ function n(r) {
35
+ return Ke(r).format("DD MMM YYYY");
36
36
  }
37
- function r(s) {
38
- return a(s === "TABLET" ? "order.licenseTypeTablet" : "order.licenseTypeKiosk");
37
+ function s(r) {
38
+ return a(r === "TABLET" ? "order.licenseTypeTablet" : "order.licenseTypeKiosk");
39
39
  }
40
- function u(s) {
41
- if (!s.device) return "-";
42
- const d = De(s.device.deviceAppType, s.type), f = s.device.deviceAppType === "TABLET_APP" ? "licenseTypeTablet" : "licenseTypeKiosk";
43
- return L("div", { class: "flex flex-col min-w-0" }, [
44
- L("span", s.device.name || s.device.machineId),
45
- L(
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: s }) => L("div", { class: "flex flex-col" }, [
57
- L("span", r(s.original.type)),
58
- L(
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
- re(s.original.id)
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: s }) => {
70
- const d = N(s.original);
71
- return L(Me.FmChip, { variant: d.variant, label: a(d.labelKey, d.params) });
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: s }) => u(s.original),
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: s }) => {
84
+ cell: ({ row: r }) => {
85
85
  var d;
86
- return ((d = s.original.device) == null ? void 0 : d.restaurantName) || "-";
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: s }) => n(s.original.expiredAt),
93
+ cell: ({ row: r }) => n(r.original.expiredAt),
94
94
  enableSorting: !1
95
95
  }
96
96
  ]);
97
- return (s, d) => {
97
+ return (r, d) => {
98
98
  var w;
99
- const f = C("FmTable"), T = C("FmChip");
100
- return b(), h("div", Je, [
101
- y("span", Ze, _(i(a)("order.licensesTab")), 1),
102
- P(Fe, { licenses: e.licenses }, null, 8, ["licenses"]),
103
- (w = e.licenses) != null && w.verified ? (b(), h(g, { key: 0 }, [
104
- t.value.length ? (b(), h(g, { key: 0 }, [
105
- P(f, {
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
- y("div", Se, [
114
- (b(!0), h(g, null, de(t.value, (v) => {
115
- var E;
116
- return b(), h("div", {
117
- key: v.id,
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
- y("div", Oe, [
121
- y("div", ke, [
122
- y("span", ea, _(r(v.type)), 1),
123
- y("span", aa, _(i(re)(v.id)), 1)
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
- P(T, {
126
- variant: i(N)(v).variant,
127
- label: i(a)(i(N)(v).labelKey, i(N)(v).params)
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
- y("div", ta, [
131
- y("span", na, _(i(a)("order.licenseColumnDevice")), 1),
132
- v.device ? (b(), A(Le(u(v)), {
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
- })) : (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)
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)) : (b(), h("div", ca, _(i(a)("order.licensesEmpty")), 1))
145
- ], 64)) : F("", !0)
144
+ ], 64)) : (v(), h("div", aa, _(i(a)("order.licensesEmpty")), 1))
145
+ ], 64)) : D("", !0)
146
146
  ]);
147
147
  };
148
148
  }
149
- }), ia = { class: "flex flex-col gap-5 pb-6" }, da = { class: "fm-typo-en-body-md-400 block" }, pa = { class: "fm-typo-en-title-md-600" }, ma = {
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
- }, fa = { class: "fm-typo-en-body-md-600" }, ya = /* @__PURE__ */ z({
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 } = Q(), l = e, o = I(() => {
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 = Ue(t);
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 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
- key: u.key,
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"])
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
- P(r, {
183
- name: u.icon
182
+ T(s, {
183
+ name: c.icon
184
184
  }, null, 8, ["name"]),
185
- y("span", null, _(i(a)(u.key)), 1)
185
+ m("span", null, _(i(a)(c.key)), 1)
186
186
  ], 2))), 128))
187
- ])) : F("", !0)
187
+ ])) : D("", !0)
188
188
  ]);
189
189
  };
190
190
  }
191
- }), va = "KIOSK_LICENSE_QUOTA_EXHAUSTED";
192
- function ba(e) {
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";
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 _a = {
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
- }, ha = {
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
- He.parse({});
218
- const Y = {
217
+ Be.parse({});
218
+ const G = {
219
219
  payAtCounter: null,
220
220
  paid: null
221
- }, wa = (e) => {
221
+ }, ma = (e) => {
222
222
  var a, l;
223
223
  return {
224
- kiosk: xa(e.kioskSettings, (a = e.sequenceSettings) == null ? void 0 : a.kioskDineIn, (l = e.sequenceSettings) == null ? void 0 : l.kioskShareNumber)
224
+ kiosk: fa(e.kioskSettings, (a = e.sequenceSettings) == null ? void 0 : a.kioskDineIn, (l = e.sequenceSettings) == null ? void 0 : l.kioskShareNumber)
225
225
  };
226
- }, xa = (e, a, l) => {
227
- var o, t, n, r, u, p, s, d, f, T, w, v;
226
+ }, fa = (e, a, l) => {
227
+ var o, t, n, s, c, p, r, d, f, C, w, y;
228
228
  return {
229
- dineIn: Ia(
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: ((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
241
- } : Y
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: ((T = e == null ? void 0 : e.paymentSetting) == null ? void 0 : T.ePaymentTypes) ?? Ge.parse({
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: (v = e == null ? void 0 : e.languages) != null && v.length ? [...e.languages] : null,
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
- }, ce = "#K", Ca = (e, a) => {
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()) || ce;
288
- return (a != null && a.kioskDineIn || o !== ce) && (l.kioskDineIn = {
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
- }, Ia = (e, a) => {
293
- var l, o, t, n, r, u, p, s, d, f;
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
- } : Y,
302
+ } : G,
303
303
  enablePaxDialog: a.pickUp.enablePaxDialog ? a.pickUp.enablePaxDialog : !1
304
- } : ha,
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: ((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,
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
- } : _a
320
+ } : da
321
321
  };
322
- }, Pa = (e) => {
322
+ }, ba = (e) => {
323
323
  const a = (t) => {
324
- var n, r, u, p;
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: (r = t.displayStand.submitOrderInstruction) != null && r.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: (u = t.pickUp.submitOrderInstruction) != null && u.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
- }, G = {
397
- convertOrderSettingDto: wa,
398
- toOrderKioskSettingsDto: Pa,
399
- toKioskSequenceSettings: Ca
400
- }, Ta = We("orderSetting", () => {
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 r = H.getRestaurantId() ?? void 0, u = await W.getOrderSetting();
404
- n() && t(u, r);
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 r = e.value.orderSetting, u = H.getRestaurantId() ?? void 0;
411
- if (!r || !u || e.value.restaurantId !== u)
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, ...s } = r, d = G.toOrderKioskSettingsDto(n), f = await W.getOrderSetting(), T = {
414
- ...s,
413
+ const { _id: p, ...r } = s, d = X.toOrderKioskSettingsDto(n), f = await j.getOrderSetting(), C = {
414
+ ...r,
415
415
  kioskSettings: d.kioskSettings,
416
- sequenceSettings: G.toKioskSequenceSettings(
416
+ sequenceSettings: X.toKioskSequenceSettings(
417
417
  n,
418
418
  f.sequenceSettings
419
419
  )
420
- }, w = await W.updateOrderSetting(T);
421
- t(w, u);
420
+ }, w = await j.updateOrderSetting(C);
421
+ t(w, c);
422
422
  }
423
- function t(n, r) {
424
- e.value.orderSetting = n, e.value.kiosk = G.convertOrderSettingDto(n).kiosk, e.value.restaurantId = r;
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 La(e, a) {
433
+ function ha(e, a) {
434
434
  return !e.hasToken || !e.restaurantId || e.restaurantId === a ? null : e.restaurantId;
435
435
  }
436
- function Aa(e, a) {
436
+ function wa(e, a) {
437
437
  const l = x("idle");
438
438
  let o = 0;
439
439
  async function t() {
440
- const u = ++o, p = () => u === o;
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 r(u) {
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(u);
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: r };
461
+ return { status: l, form: n, load: t, save: s };
462
462
  }
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 = "";
464
- function pe(e) {
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(Ea, ue).replace(Ra, ue), a = a.replace(Fa, "\0");
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 Da(e) {
477
- const a = pe(e);
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 = Ka.exec(o);
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 Ua(e, a) {
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;
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 ga(e) {
491
+ function La(e) {
492
492
  return (a) => a.toLocaleLowerCase(e);
493
493
  }
494
- function Na(e) {
494
+ function Ea(e) {
495
495
  return (a) => a.toLocaleUpperCase(e);
496
496
  }
497
- function $a(e, a) {
497
+ function Ka(e, a) {
498
498
  return (l) => `${a(l[0])}${e(l.slice(1))}`;
499
499
  }
500
- function qa(e, a = {}) {
501
- const l = a.split ?? (a.separateNumbers ? Da : pe), o = a.prefixCharacters ?? ie, t = a.suffixCharacters ?? ie;
502
- let n = 0, r = e.length;
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 u = e.charAt(n);
505
- if (!o.includes(u))
504
+ const c = e.charAt(n);
505
+ if (!o.includes(c))
506
506
  break;
507
507
  n++;
508
508
  }
509
- for (; r > n; ) {
510
- const u = r - 1, p = e.charAt(u);
509
+ for (; s > n; ) {
510
+ const c = s - 1, p = e.charAt(c);
511
511
  if (!t.includes(p))
512
512
  break;
513
- r = u;
513
+ s = c;
514
514
  }
515
515
  return [
516
516
  e.slice(0, n),
517
- l(e.slice(n, r)),
518
- e.slice(r)
517
+ l(e.slice(n, s)),
518
+ e.slice(s)
519
519
  ];
520
520
  }
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({
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 ne;
525
- const { t: a } = Q(), { canManageOrderSetting: l } = Ye(), { isInternal: o } = ze(), t = Ee(
526
- () => import("./KioskSettingView-CarJ2tfl.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(() => {
528
- const c = $.value.trim().toLowerCase();
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
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
- }), R = x(!1);
556
- async function k(c) {
557
- if (c === D.value) return;
558
- if (R.value && !await V()) {
559
- v.value = D.value || void 0;
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
- R.value = !1;
563
- const m = f.value.find((K) => K._id == c);
564
- v.value = c, await T(m);
542
+ L.value = !1;
543
+ const b = f.value.find((B) => B._id == u);
544
+ y.value = u, await C(b);
565
545
  }
566
- j(
546
+ V(
567
547
  () => {
568
- var c;
548
+ var u;
569
549
  return {
570
- hasToken: !!H.getIdToken(),
571
- restaurantId: (c = d.value) == null ? void 0 : c._id
550
+ hasToken: !!W.getIdToken(),
551
+ restaurantId: (u = d.value) == null ? void 0 : u._id
572
552
  };
573
553
  },
574
- (c) => {
575
- const m = La(c, q.value);
576
- m && (q.value = m, D.value = m, v.value = m, be());
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 be() {
581
- r.state.devices = [], r.state.licenses = null, await Promise.all([
582
- l.value ? O() : Promise.resolve(),
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
- ee(),
585
- M()
564
+ Z(),
565
+ $()
586
566
  ]);
587
567
  }
588
- function ee() {
568
+ function Z() {
589
569
  return o.value ? p.loadPaymentDevices() : (p.clearPaymentDevices(), Promise.resolve());
590
570
  }
591
- j(o, (c) => {
592
- q.value ? ee() : c || p.clearPaymentDevices();
571
+ V(o, (u) => {
572
+ g.value ? Z() : u || p.clearPaymentDevices();
593
573
  });
594
- async function M() {
595
- E.value = null, B.value = !0, await Promise.all([
596
- r.getDevices().catch((c) => {
597
- E.value = c instanceof se && c.status === 403 ? "forbidden" : "error";
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
- r.getLicenses().catch(() => {
581
+ s.getLicenses().catch(() => {
602
582
  })
603
- ]), B.value = !1;
583
+ ]), N.value = !1;
604
584
  }
605
- const ae = I({
585
+ const S = I({
606
586
  get: () => n.value,
607
- set: (c) => {
608
- if (c !== n.value) {
609
- if (n.value === "setting" && R.value) {
610
- V().then((m) => {
611
- m && (R.value = !1, n.value = c);
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 = c;
595
+ n.value = u;
616
596
  }
617
597
  }
618
598
  });
619
- function V() {
620
- return new Promise((c) => {
621
- s.open({
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(() => c(!0)).onClose(() => setTimeout(() => c(!1), 0));
606
+ }).onPrimary(() => u(!0)).onClose(() => setTimeout(() => u(!1), 0));
627
607
  });
628
608
  }
629
- Xe(async () => R.value ? await V() : !0);
630
- const _e = I(() => {
631
- const c = [
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 && c.push({ label: a("order.settings"), value: "setting" }), c;
636
- }), he = I(() => r.state.devices), te = I(() => r.state.licenses);
637
- async function we() {
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 r.requestOtp();
640
- } catch (c) {
619
+ await s.requestOtp();
620
+ } catch (u) {
641
621
  w.open({
642
- title: a(ba(c instanceof se ? c : null)),
622
+ title: a(ia(u instanceof ne ? u : null)),
643
623
  type: "error"
644
624
  });
645
625
  return;
646
626
  }
647
- s.open({
648
- title: Ua(a("order.bindDevice")),
649
- contentComponent: ya,
627
+ r.open({
628
+ title: Aa(a("order.bindDevice")),
629
+ contentComponent: ca,
650
630
  contentComponentProps: {
651
- otp: r.state.otp,
652
- licenses: r.state.licenses
631
+ otp: s.state.otp,
632
+ licenses: s.state.licenses
653
633
  }
654
634
  }).onClose(async () => {
655
- await M();
635
+ await $();
656
636
  });
657
637
  }
658
- return j(
638
+ return V(
659
639
  () => f.value.length,
660
- async (c) => {
661
- !d.value && v.value === void 0 && f.value.length > 0 && await k(f.value[0]._id);
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
- ), (c, m) => {
665
- var le;
666
- const K = C("FmPageHead"), xe = C("FmTabs"), Ce = C("FmIcon"), Ie = C("FmMenuItem"), Pe = C("FmSelect"), Te = C("FmButton");
667
- return b(), h("div", Ba, [
668
- P(K, {
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
- y("div", Ma, [
672
- y("div", Va, [
673
- P(xe, {
674
- "model-value": ae.value,
675
- "onUpdate:modelValue": m[0] || (m[0] = (U) => ae.value = U),
676
- items: _e.value
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
- Re(y("div", {
679
- class: "kiosk-outlet-picker w-[360px] max-w-full xs:w-full",
680
- ref_key: "restaurantPicker",
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
- P(Pe, {
685
- modelValue: v.value,
686
- "onUpdate:modelValue": [
687
- m[1] || (m[1] = (U) => v.value = U),
688
- k
689
- ],
690
- items: Z.value,
691
- placeholder: i(a)("order.searchRestaurant"),
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
- y("div", Xa, [
719
- y("div", Wa, [
720
- n.value == "device" ? (b(), A($e, {
672
+ m("div", Na, [
673
+ m("div", $a, [
674
+ n.value == "device" ? (v(), E(Ee, {
721
675
  key: 0,
722
- devices: he.value,
723
- licenses: te.value,
724
- "load-error": E.value,
725
- loading: B.value,
726
- onRequestOtp: we,
727
- onRetry: M
728
- }, null, 8, ["devices", "licenses", "load-error", "loading"])) : F("", !0),
729
- n.value == "licenses" ? (b(), A(ua, {
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: te.value
732
- }, null, 8, ["licenses"])) : F("", !0),
733
- n.value == "setting" && i(l) ? (b(), h(g, { key: 2 }, [
734
- i(ye) === "error" ? (b(), A(oe, {
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: X(() => [
741
- P(Te, {
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(O)
699
+ onClick: i(z)
746
700
  }, null, 8, ["label", "onClick"])
747
701
  ]),
748
702
  _: 1
749
- }, 8, ["title", "message"])) : i(S) ? (b(), A(i(t), {
750
- key: `KioskSettingView-${D.value}`,
751
- "restaurant-id": D.value,
752
- form: i(S),
753
- save: i(ve),
754
- onDirtyChange: m[2] || (m[2] = (U) => R.value = U)
755
- }, null, 8, ["restaurant-id", "form", "save"])) : (b(), A(oe, {
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)) : F("", !0)
715
+ ], 64)) : D("", !0)
762
716
  ])
763
717
  ])
764
718
  ])
765
719
  ]);
766
720
  };
767
721
  }
768
- }), lt = /* @__PURE__ */ Qe(Ga, [["__scopeId", "data-v-3ae3981d"]]);
722
+ }), Sa = /* @__PURE__ */ je(qa, [["__scopeId", "data-v-1003ccba"]]);
769
723
  export {
770
- lt as default
724
+ Sa as default
771
725
  };