@feedmepos/mf-order-setting 0.0.48 → 0.0.50

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 (71) hide show
  1. package/dist/{KioskDevicesView-iZTQ--DO.js → KioskDevicesView-u14hzPbE.js} +1 -1
  2. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-DBgRDIoS.js +501 -0
  3. package/dist/{KioskSettingView-mN7UPNYu.js → KioskSettingView-DmvtZcV1.js} +34 -33
  4. package/dist/KioskView-M8V91gD5.js +474 -0
  5. package/dist/{OrderSettingsView-B5Nq_u9Z.js → OrderSettingsView-Bl3LshG3.js} +15016 -14688
  6. package/dist/{app-B3KtJhiw.js → app-CLewMjcd.js} +89 -25
  7. package/dist/app.js +1 -1
  8. package/dist/{dayjs.min-GjkM9dM2.js → dayjs.min-DCTYRWyD.js} +1 -1
  9. package/dist/frontend/mf-order/src/api/restaurant-setting/index.d.ts +2 -1
  10. package/dist/frontend/mf-order/src/app.d.ts +64 -0
  11. package/dist/frontend/mf-order/src/main.d.ts +64 -0
  12. package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +1 -0
  13. package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +3 -0
  14. package/dist/frontend/mf-order/src/stores/menu/menu.d.ts +1 -0
  15. package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +5 -2
  16. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +6 -3
  17. package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue.d.ts +8 -0
  18. package/dist/frontend/mf-order/src/views/order-settings/drive-thru/DriveThruSetting.vue.d.ts +2 -0
  19. package/dist/frontend/mf-order/src/views/order-settings/servicecharge/ServiceChargeRule.vue.d.ts +2 -2
  20. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  21. package/dist/{index-Dwzta1U-.js → index-B7LtJeBJ.js} +2 -2
  22. package/dist/{menu.dto-DgPhiIVk.js → menu.dto-Co7iXHNr.js} +25558 -25019
  23. package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +108 -16
  24. package/dist/package/entity/incoming-order/incoming-order.do.d.ts +63 -18
  25. package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +118 -18
  26. package/dist/package/entity/kiosk/kiosk.do.d.ts +32 -0
  27. package/dist/package/entity/kiosk/kiosk.dto.d.ts +44 -0
  28. package/dist/package/entity/kiosk/marketing/marketing.dto.d.ts +1071 -0
  29. package/dist/package/entity/order/order-item/order-item.dto.d.ts +8 -0
  30. package/dist/package/entity/order/order.dto.d.ts +16 -8
  31. package/dist/package/entity/order/order.enum.d.ts +2 -0
  32. package/dist/package/entity/order-platform/deliveroo/deliveroo-dto.d.ts +2 -2
  33. package/dist/package/entity/order-platform/deliveroo/deliveroo-setting.do.d.ts +2 -2
  34. package/dist/package/entity/order-platform/external/order/external-order.do.d.ts +62 -0
  35. package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +178 -0
  36. package/dist/package/entity/order-platform/external/setting/external-setting.do.d.ts +6 -0
  37. package/dist/package/entity/order-platform/external/setting/external-setting.dto.d.ts +6 -0
  38. package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.do.d.ts +4 -4
  39. package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.dto.d.ts +5 -5
  40. package/dist/package/entity/order-platform/grabfood/grabfood-menu.do.d.ts +15 -0
  41. package/dist/package/entity/order-platform/grabfood/grabfood-omni.do.d.ts +1834 -15
  42. package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +13 -13
  43. package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +5 -2
  44. package/dist/package/entity/order-platform/grabfood/grabfood-webhook.dto.d.ts +528 -805
  45. package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +14 -11
  46. package/dist/package/entity/order-platform/grabfood/grabfood.enum.d.ts +1 -1
  47. package/dist/package/entity/order-platform/order-platform.dto.d.ts +0 -20
  48. package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.do.d.ts +2 -2
  49. package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.dto.d.ts +2 -2
  50. package/dist/package/entity/queue/queue.do.d.ts +12 -0
  51. package/dist/package/entity/queue/queue.dto.d.ts +26 -6
  52. package/package.json +4 -4
  53. package/src/api/restaurant-setting/index.ts +6 -0
  54. package/src/locales/en-US.json +16 -0
  55. package/src/locales/ja-JP.json +16 -0
  56. package/src/locales/th-TH.json +16 -0
  57. package/src/locales/zh-CN.json +16 -0
  58. package/src/main.ts +2 -2
  59. package/src/modules/kiosk/interface.ts +1 -0
  60. package/src/stores/kiosk/mapper.ts +1 -0
  61. package/src/stores/restaurant/index.ts +6 -0
  62. package/src/views/kiosk/KioskSummary.vue +37 -31
  63. package/src/views/kiosk/KioskView.vue +4 -1
  64. package/src/views/kiosk/devices/KioskDeviceCard.vue +205 -89
  65. package/src/views/kiosk/devices/KioskDevicesView.vue +133 -17
  66. package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +8 -3
  67. package/src/views/order-settings/OrderSettingsView.vue +6 -1
  68. package/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue +22 -1
  69. package/src/views/order-settings/drive-thru/DriveThruSetting.vue +101 -0
  70. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-CPDemTBj.js +0 -306
  71. package/dist/KioskView-NEpc7Ivb.js +0 -452
@@ -1,452 +0,0 @@
1
- import { defineComponent as S, computed as h, createElementBlock as f, openBlock as u, normalizeClass as Z, createCommentVNode as b, createElementVNode as s, toDisplayString as m, unref as d, Fragment as ee, renderList as te, ref as g, defineAsyncComponent as ae, onMounted as ne, watch as oe, resolveComponent as I, createVNode as T, withCtx as se, withDirectives as le, vShow as re, createBlock as V } from "vue";
2
- import { u as de, _ as ce } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-CPDemTBj.js";
3
- import { useI18n as U, useCoreStore as ue } from "@feedmepos/mf-common";
4
- import { F as B, a as ie, b as pe } from "./menu.dto-DgPhiIVk.js";
5
- import { useDialog as ye, useSnackbar as me, useBreakpoints as fe } from "@feedmepos/ui-library";
6
- import { defineStore as ve } from "pinia";
7
- import { O as E, c as M } from "./index-Dwzta1U-.js";
8
- const _e = {
9
- key: 0,
10
- class: "fm-typo-en-title-sm-600"
11
- }, be = {
12
- key: 1,
13
- class: "my-[0.25rem]"
14
- }, he = { class: "flex flex-col gap-1" }, Pe = { class: "flex flex-col gap-1" }, we = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, xe = { class: "fm-typo-en-body-lg-600" }, Te = { key: 0 }, Ce = { key: 1 }, Ie = { key: 0 }, ge = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ae = { class: "fm-typo-en-body-lg-600 block" }, Oe = { key: 1 }, Ke = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Se = { class: "fm-typo-en-body-lg-600 block" }, Ue = { key: 2 }, $e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Fe = { class: "fm-typo-en-body-lg-600 block" }, qe = { key: 3 }, Re = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, De = { class: "fm-typo-en-body-lg-600 block" }, Ve = { key: 0 }, N = /* @__PURE__ */ S({
15
- __name: "KioskSummary",
16
- props: {
17
- restaurantId: {},
18
- devices: {},
19
- kioskOrderSetting: {},
20
- dialogType: { type: Boolean }
21
- },
22
- setup(t) {
23
- const { t: e } = U(), l = t, r = h(() => {
24
- var a;
25
- return (a = l.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
26
- }), n = h(() => {
27
- var a;
28
- return (a = l.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
29
- }), o = h(() => {
30
- var a, p;
31
- return (a = l.kioskOrderSetting) != null && a.dineIn.displayStand ? e("order.tableService") : (p = l.kioskOrderSetting) != null && p.dineIn && !l.kioskOrderSetting.dineIn.displayStand ? e("order.pickAtCounter") : e("order.unknown");
32
- }), i = h(() => {
33
- var a;
34
- return ((a = l.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(B.enum.cash)) ?? !1;
35
- }), c = h(() => {
36
- var p, v;
37
- const a = [];
38
- if ((p = l.kioskOrderSetting) == null || p.paymentSetting.paymentTypes.forEach((_) => {
39
- _ === B.enum.ePayment && a.push(e("order.ePayment"));
40
- }), a.length > 0 && Object.keys(l.kioskOrderSetting.paymentSetting.ePaymentTypes).length !== 0) {
41
- const _ = (v = l.kioskOrderSetting) == null ? void 0 : v.paymentSetting.ePaymentTypes;
42
- (_.card.terminal || _.card.nfc) && a.push(e("order.bankCard")), (_.eWallet.scanPay || _.eWallet.qrPay) && a.push(e("order.eWallet"));
43
- }
44
- return a.join(", ");
45
- });
46
- return (a, p) => (u(), f("div", {
47
- class: Z(a.dialogType ? "" : ["p-[1.5rem] border fm-corner-radius-lg flex flex-col gap-5 fixed ml-40 w-[320px]"])
48
- }, [
49
- a.dialogType ? b("", !0) : (u(), f("span", _e, m(d(e)("order.kioskSummary")), 1)),
50
- a.dialogType ? b("", !0) : (u(), f("hr", be)),
51
- s("div", he, [
52
- s("div", Pe, [
53
- s("span", we, m(d(e)("order.kioskDisplay")), 1),
54
- s("div", xe, [
55
- a.devices.length > 0 ? (u(), f("div", Te, [
56
- (u(!0), f(ee, null, te(a.devices, (v) => (u(), f("li", {
57
- class: "block",
58
- key: v.machineId
59
- }, m(v.name), 1))), 128))
60
- ])) : (u(), f("div", Ce, "-"))
61
- ]),
62
- r.value === d(e)("order.activated") ? (u(), f("div", Ie, [
63
- s("span", ge, m(d(e)("order.dineIn")), 1),
64
- s("div", Ae, [
65
- s("div", null, m(r.value), 1)
66
- ])
67
- ])) : b("", !0),
68
- r.value === d(e)("order.activated") && o.value !== d(e)("order.unknown") ? (u(), f("div", Oe, [
69
- s("span", Ke, m(d(e)("order.dineInType")), 1),
70
- s("div", Se, [
71
- s("div", null, m(o.value), 1)
72
- ])
73
- ])) : b("", !0),
74
- n.value === d(e)("order.activated") ? (u(), f("div", Ue, [
75
- s("span", $e, m(d(e)("order.takeaway")), 1),
76
- s("div", Fe, [
77
- s("div", null, m(n.value), 1)
78
- ])
79
- ])) : b("", !0),
80
- c.value || i.value ? (u(), f("div", qe, [
81
- s("span", Re, m(d(e)("order.acceptedPayment")), 1),
82
- s("div", De, [
83
- i.value ? (u(), f("div", Ve, m(d(e)("order.offlinePayment")), 1)) : b("", !0),
84
- s("div", null, m(c.value), 1)
85
- ])
86
- ])) : b("", !0)
87
- ])
88
- ])
89
- ], 2));
90
- }
91
- }), Be = { class: "flex flex-col gap-5 pb-6" }, Ee = { class: "fm-typo-en-body-md-400 block" }, Me = { class: "fm-typo-en-title-md-600" }, Ne = /* @__PURE__ */ S({
92
- __name: "KioskOtpDialog",
93
- props: {
94
- otp: {}
95
- },
96
- setup(t) {
97
- const { t: e } = U();
98
- return (l, r) => (u(), f("div", Be, [
99
- s("span", Ee, m(d(e)("order.bindDeviceMessage")), 1),
100
- s("div", Me, m(l.otp), 1)
101
- ]));
102
- }
103
- }), k = {
104
- enabled: !1,
105
- prefix: null,
106
- padDigit: 0,
107
- standSlotRange: {
108
- min: 1,
109
- max: 10
110
- },
111
- enablePaxDialog: !1,
112
- submitOrderInstruction: {
113
- payAtCounter: null,
114
- paid: null
115
- }
116
- }, We = {
117
- enabled: !1,
118
- submitOrderInstruction: {
119
- payAtCounter: null,
120
- paid: null
121
- }
122
- }, j = {
123
- enabled: !1,
124
- submitOrderInstruction: {
125
- payAtCounter: null,
126
- paid: null
127
- },
128
- enablePaxDialog: !1
129
- }, ke = {
130
- dineIn: {
131
- enabled: !1,
132
- pickUp: j,
133
- sequenceNumber: ie.parse({}),
134
- displayStand: k
135
- },
136
- takeaway: We,
137
- paymentSetting: {
138
- paymentTypes: [],
139
- offlinePaymentTypes: [],
140
- ePaymentTypes: {
141
- terminal: !1,
142
- card: {
143
- terminal: !1,
144
- nfc: !1
145
- },
146
- eWallet: {
147
- terminalQrPay: !1,
148
- terminalScanPay: !1,
149
- qrPay: !1,
150
- scanPay: !1
151
- }
152
- }
153
- },
154
- menuItem: {
155
- showAllOnly: !1
156
- }
157
- }, K = {
158
- payAtCounter: null,
159
- paid: null
160
- }, je = (t) => {
161
- var e;
162
- return {
163
- kiosk: He(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
164
- };
165
- }, He = (t, e) => {
166
- var l, r, n, o, i, c, a, p, v, _, w;
167
- return {
168
- dineIn: Le(
169
- e ?? {
170
- current: 0,
171
- prefix: "#K"
172
- },
173
- (t == null ? void 0 : t.dineIn) ?? void 0
174
- ),
175
- takeaway: {
176
- enabled: (t == null ? void 0 : t.canTakeaway) ?? !1,
177
- submitOrderInstruction: (l = t == null ? void 0 : t.takeaway) != null && l.submitOrderInstruction ? {
178
- payAtCounter: ((o = (n = (r = t == null ? void 0 : t.takeaway) == null ? void 0 : r.submitOrderInstruction) == null ? void 0 : n.payAtCounter) == null ? void 0 : o.en) ?? null,
179
- paid: ((a = (c = (i = t == null ? void 0 : t.takeaway) == null ? void 0 : i.submitOrderInstruction) == null ? void 0 : c.paid) == null ? void 0 : a.en) ?? null
180
- } : K
181
- },
182
- paymentSetting: {
183
- paymentTypes: ((p = t == null ? void 0 : t.paymentSetting) == null ? void 0 : p.paymentTypes) ?? [],
184
- offlinePaymentTypes: ((v = t == null ? void 0 : t.paymentSetting) == null ? void 0 : v.offlinePaymentTypes) ?? [],
185
- ePaymentTypes: ((_ = t == null ? void 0 : t.paymentSetting) == null ? void 0 : _.ePaymentTypes) ?? pe.parse({
186
- card: {
187
- terminal: !1,
188
- nfc: !1
189
- },
190
- eWallet: {
191
- qrPay: !1,
192
- scanPay: !1
193
- }
194
- })
195
- },
196
- menuItem: {
197
- showAllOnly: ((w = t == null ? void 0 : t.menuItem) == null ? void 0 : w.showAllOnly) ?? !1
198
- }
199
- };
200
- }, Le = (t, e) => {
201
- var l, r, n, o, i, c, a, p;
202
- return {
203
- enabled: !!e,
204
- sequenceNumber: t,
205
- pickUp: e != null && e.pickUp ? {
206
- ...e.pickUp,
207
- submitOrderInstruction: e.pickUp.submitOrderInstruction ? {
208
- payAtCounter: ((r = (l = e.pickUp.submitOrderInstruction) == null ? void 0 : l.payAtCounter) == null ? void 0 : r.en) ?? null,
209
- paid: ((o = (n = e.pickUp.submitOrderInstruction) == null ? void 0 : n.paid) == null ? void 0 : o.en) ?? null
210
- } : K,
211
- enablePaxDialog: e.pickUp.enablePaxDialog ? e.pickUp.enablePaxDialog : !1
212
- } : j,
213
- displayStand: e != null && e.displayStand ? {
214
- enabled: e.displayStand.enabled,
215
- standSlotRange: e.displayStand.standSlotRange,
216
- prefix: e.displayStand.prefix,
217
- padDigit: e.displayStand.padDigit,
218
- enablePaxDialog: e.displayStand.enablePaxDialog ?? !1,
219
- submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
220
- payAtCounter: ((c = (i = e.displayStand.submitOrderInstruction) == null ? void 0 : i.payAtCounter) == null ? void 0 : c.en) ?? null,
221
- paid: ((p = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : p.en) ?? null
222
- } : K
223
- } : k
224
- };
225
- }, Ye = (t) => {
226
- const e = (n) => {
227
- var o, i, c, a;
228
- return {
229
- requiredSlot: !!n.displayStand,
230
- displayStand: {
231
- ...n.displayStand,
232
- submitOrderInstruction: {
233
- payAtCounter: (o = n.displayStand.submitOrderInstruction) != null && o.payAtCounter ? {
234
- en: n.displayStand.submitOrderInstruction.payAtCounter
235
- } : null,
236
- paid: (i = n.displayStand.submitOrderInstruction) != null && i.paid ? {
237
- en: n.displayStand.submitOrderInstruction.paid
238
- } : null
239
- }
240
- },
241
- pickUp: {
242
- ...n.pickUp,
243
- submitOrderInstruction: {
244
- payAtCounter: (c = n.pickUp.submitOrderInstruction) != null && c.payAtCounter ? {
245
- en: n.pickUp.submitOrderInstruction.payAtCounter
246
- } : null,
247
- paid: (a = n.pickUp.submitOrderInstruction) != null && a.paid ? {
248
- en: n.pickUp.submitOrderInstruction.paid
249
- } : null
250
- }
251
- }
252
- };
253
- }, l = (n) => ({
254
- canTakeaway: t.takeaway.enabled,
255
- dineIn: n,
256
- menuItem: t.menuItem,
257
- paymentSetting: r(t.paymentSetting),
258
- takeaway: t.takeaway.submitOrderInstruction ? {
259
- submitOrderInstruction: {
260
- payAtCounter: t.takeaway.submitOrderInstruction.payAtCounter ? {
261
- en: t.takeaway.submitOrderInstruction.payAtCounter
262
- } : null,
263
- paid: t.takeaway.submitOrderInstruction.paid ? {
264
- en: t.takeaway.submitOrderInstruction.paid
265
- } : null
266
- }
267
- } : void 0
268
- }), r = (n) => ({
269
- paymentTypes: n.paymentTypes,
270
- offlinePaymentTypes: n.offlinePaymentTypes,
271
- ePaymentTypes: n.ePaymentTypes
272
- });
273
- return t.dineIn.enabled ? {
274
- kioskSettings: l(e(t.dineIn)),
275
- kioskDineIn: t.dineIn.sequenceNumber
276
- } : {
277
- kioskSettings: l()
278
- };
279
- }, W = {
280
- convertOrderSettingDto: je,
281
- toOrderKioskSettingsDto: Ye
282
- }, ze = ve("orderSetting", () => {
283
- const t = g({});
284
- async function e() {
285
- const o = await E.getOrderSetting();
286
- r(o);
287
- }
288
- async function l() {
289
- if (t.value.orderSetting && t.value.kiosk) {
290
- const { _id: o, ...i } = t.value.orderSetting, c = W.toOrderKioskSettingsDto(t.value.kiosk), a = {
291
- ...i,
292
- kioskSettings: c.kioskSettings
293
- }, p = await E.updateOrderSetting(a);
294
- r(p);
295
- }
296
- }
297
- function r(o) {
298
- t.value.orderSetting = o, t.value.kiosk = W.convertOrderSettingDto(o).kiosk;
299
- }
300
- function n(o) {
301
- t.value.kiosk = o;
302
- }
303
- return {
304
- state: t.value,
305
- getSetting: e,
306
- updateKioskSetting: l,
307
- setKioskOrderSetting: n
308
- };
309
- }), Qe = { class: "py-[1.5rem]" }, Ge = { class: "flex px-[1.5rem]" }, Je = { class: "flex-[2_2_0%]" }, Xe = { class: "pt-[1.5rem]" }, Ze = { class: "flex flex-col gap-10" }, et = { class: "flex flex-col gap-2" }, tt = { class: "fm-typo-en-title-sm-600" }, at = { class: "fm-typo-en-title-sm-400" }, nt = {
310
- key: 0,
311
- class: "flex-[1_1_0%]"
312
- }, it = /* @__PURE__ */ S({
313
- __name: "KioskView",
314
- setup(t) {
315
- var R, D;
316
- const { t: e } = U(), l = ae(
317
- () => import("./KioskSettingView-mN7UPNYu.js")
318
- ), r = g("device"), n = de(), o = ze(), i = ye(), { currentRestaurant: c, restaurants: a, changeRestaurant: p } = ue(), v = me(), _ = fe(), w = h(() => _.breakpoints.value.xs), C = g(((R = c.value) == null ? void 0 : R._id) ?? void 0), H = h(() => a.value.map((y) => ({
319
- label: y.profile.name,
320
- value: y._id
321
- }))), x = g(((D = c.value) == null ? void 0 : D._id) ?? "");
322
- function L() {
323
- var y;
324
- i.open({
325
- title: M(e("order.kioskSummary")),
326
- contentComponent: N,
327
- contentComponentProps: {
328
- restaurantId: (y = c.value) == null ? void 0 : y._id,
329
- devices: n.state.devices,
330
- kioskOrderSetting: o.state.kiosk,
331
- dialogType: !0
332
- }
333
- });
334
- }
335
- async function $(y) {
336
- const P = a.value.find((A) => A._id == y);
337
- await p(P), await F(), C.value = y, x.value = y;
338
- }
339
- async function F() {
340
- await o.getSetting(), await n.getDevices();
341
- }
342
- const Y = h(() => [
343
- {
344
- label: e("order.deviceBinding"),
345
- value: "device"
346
- },
347
- {
348
- label: e("order.settings"),
349
- value: "setting"
350
- }
351
- ]), q = h(() => n.state.devices);
352
- async function z() {
353
- await n.requestOtp(), i.open({
354
- title: M(e("order.bindDevice")),
355
- contentComponent: Ne,
356
- contentComponentProps: {
357
- otp: n.state.otp
358
- }
359
- });
360
- }
361
- async function Q(y) {
362
- try {
363
- o.setKioskOrderSetting(y), await o.updateKioskSetting(), v.open({
364
- title: e("order.kioskSettingSuccess"),
365
- type: "success"
366
- });
367
- } catch {
368
- v.open({
369
- title: e("order.kioskSettingFailed"),
370
- type: "error"
371
- });
372
- }
373
- }
374
- return ne(async () => {
375
- var y;
376
- (y = c.value) != null && y._id && (x.value = c.value._id, await F());
377
- }), oe(
378
- () => a.value.length,
379
- async (y) => {
380
- C.value === void 0 && a.value.length > 0 && await $(a.value[0]._id);
381
- },
382
- { immediate: !0 }
383
- ), (y, P) => {
384
- const A = I("FmButton"), G = I("FmPageHead"), J = I("FmTabs"), X = I("FmSelect");
385
- return u(), f("div", Qe, [
386
- T(G, {
387
- title: d(e)("order.kiosk")
388
- }, {
389
- append: se(() => [
390
- le(T(A, {
391
- icon: "info",
392
- variant: "tertiary",
393
- onClick: L
394
- }, null, 512), [
395
- [re, w.value]
396
- ])
397
- ]),
398
- _: 1
399
- }, 8, ["title"]),
400
- s("div", Ge, [
401
- s("div", Je, [
402
- T(J, {
403
- "model-value": r.value,
404
- "onUpdate:modelValue": P[0] || (P[0] = (O) => r.value = O),
405
- items: Y.value
406
- }, null, 8, ["model-value", "items"]),
407
- s("div", Xe, [
408
- s("div", Ze, [
409
- s("div", et, [
410
- s("span", tt, m(d(e)("order.activateLocation")), 1),
411
- s("span", at, m(d(e)("order.selectRestaurant")) + ": ", 1),
412
- T(X, {
413
- class: "w-1/2",
414
- modelValue: C.value,
415
- "onUpdate:modelValue": [
416
- P[1] || (P[1] = (O) => C.value = O),
417
- $
418
- ],
419
- items: H.value,
420
- placeholder: d(e)("order.selectItem")
421
- }, null, 8, ["modelValue", "items", "placeholder"])
422
- ]),
423
- r.value == "device" ? (u(), V(ce, {
424
- key: 0,
425
- devices: q.value,
426
- "request-otp": z
427
- }, null, 8, ["devices"])) : b("", !0),
428
- r.value == "setting" ? (u(), V(d(l), {
429
- key: `KioskSettingView-${x.value}`,
430
- "restaurant-id": x.value,
431
- onUpdateKioskOrderSetting: Q,
432
- form: d(o).state.kiosk ?? d(ke)
433
- }, null, 8, ["restaurant-id", "form"])) : b("", !0)
434
- ])
435
- ])
436
- ]),
437
- w.value ? b("", !0) : (u(), f("div", nt, [
438
- T(N, {
439
- "restaurant-id": x.value,
440
- devices: q.value,
441
- "kiosk-order-setting": d(o).state.kiosk,
442
- dialogType: !1
443
- }, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
444
- ]))
445
- ])
446
- ]);
447
- };
448
- }
449
- });
450
- export {
451
- it as default
452
- };