@feedmepos/mf-order-setting 0.0.50 → 0.0.52

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 (42) hide show
  1. package/dist/{KioskDevicesView-u14hzPbE.js → KioskDevicesView-D_YT-CL0.js} +1 -1
  2. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DBgRDIoS.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-Bxv6oiFw.js} +2 -2
  3. package/dist/KioskSettingView-DS5vEQ07.js +573 -0
  4. package/dist/{KioskView-M8V91gD5.js → KioskView-B8NHcyGz.js} +111 -108
  5. package/dist/{OrderSettingsView-Bl3LshG3.js → OrderSettingsView-BhEN-2ZZ.js} +2940 -2941
  6. package/dist/{app-CLewMjcd.js → app-BWFBpJUR.js} +20 -12
  7. package/dist/app.js +1 -1
  8. package/dist/{dayjs.min-DCTYRWyD.js → dayjs.min-CD9R3x-Y.js} +1 -1
  9. package/dist/frontend/mf-order/src/app.d.ts +8 -0
  10. package/dist/frontend/mf-order/src/main.d.ts +8 -0
  11. package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +2 -0
  12. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +6 -0
  13. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  14. package/dist/{index-B7LtJeBJ.js → index-Bjwv8B4h.js} +2 -2
  15. package/dist/{menu.dto-Co7iXHNr.js → menu.dto-Wzm4Tz0i.js} +1577 -1572
  16. package/dist/package/entity/food-court/order.do.d.ts +26 -1
  17. package/dist/package/entity/food-court/order.dto.d.ts +0 -3
  18. package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +15 -0
  19. package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +18 -0
  20. package/dist/package/entity/order/order-item/order-item.dto.d.ts +30 -0
  21. package/dist/package/entity/order/order.do.d.ts +8 -0
  22. package/dist/package/entity/order/order.dto.d.ts +118 -0
  23. package/dist/package/entity/order-platform/external/menu/external-master-menu.do.d.ts +20 -0
  24. package/dist/package/entity/order-platform/external/menu/external-menu.do.d.ts +23 -0
  25. package/dist/package/entity/order-platform/menu.dto.d.ts +34 -0
  26. package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +3 -0
  27. package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +3 -0
  28. package/dist/package/entity/order-setting/order-setting.do.d.ts +5 -0
  29. package/dist/package/entity/order-setting/order-setting.dto.d.ts +10 -0
  30. package/dist/package/entity/queue/queue.dto.d.ts +25 -0
  31. package/dist/package/entity/restaurant/restaurant.dto.d.ts +5 -0
  32. package/dist/package/entity/websocket/websocket.dto.d.ts +12 -0
  33. package/package.json +1 -1
  34. package/src/locales/en-US.json +3 -1
  35. package/src/locales/ja-JP.json +11 -9
  36. package/src/locales/th-TH.json +3 -1
  37. package/src/locales/zh-CN.json +3 -1
  38. package/src/modules/order-setting/kiosk/interface.ts +15 -13
  39. package/src/stores/order-setting/mapper.ts +16 -13
  40. package/src/views/kiosk/settings/KioskSettingView.vue +43 -23
  41. package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +3 -1
  42. package/dist/KioskSettingView-DmvtZcV1.js +0 -553
@@ -1,11 +1,11 @@
1
- import { defineComponent as S, computed as h, createElementBlock as f, openBlock as i, normalizeClass as Z, createCommentVNode as b, createElementVNode as l, toDisplayString as u, unref as c, Fragment as ee, renderList as te, ref as I, defineAsyncComponent as ae, onMounted as ne, watch as se, resolveComponent as C, createVNode as g, withCtx as oe, withDirectives as le, vShow as re, createBlock as B } from "vue";
2
- import { u as ce, _ as de } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-DBgRDIoS.js";
3
- import { useI18n as U, useCoreStore as ue } from "@feedmepos/mf-common";
4
- import { F as V, a as ie, b as pe } from "./menu.dto-Co7iXHNr.js";
1
+ import { defineComponent as U, computed as h, createElementBlock as f, openBlock as i, normalizeClass as k, createCommentVNode as b, createElementVNode as l, toDisplayString as u, unref as c, Fragment as ee, renderList as te, ref as I, defineAsyncComponent as ae, onMounted as ne, watch as oe, resolveComponent as g, createVNode as C, withCtx as se, withDirectives as le, vShow as re, createBlock as B } from "vue";
2
+ import { u as ce, _ as de } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-Bxv6oiFw.js";
3
+ import { useI18n as $, useCoreStore as ue } from "@feedmepos/mf-common";
4
+ import { F as V, a as ie, b as pe } from "./menu.dto-Wzm4Tz0i.js";
5
5
  import { useDialog as ye, useSnackbar as me, useBreakpoints as fe } from "@feedmepos/ui-library";
6
- import { defineStore as _e } from "pinia";
7
- import { O as E, c as M } from "./index-B7LtJeBJ.js";
8
- const ve = {
6
+ import { defineStore as ve } from "pinia";
7
+ import { O as E, c as M } from "./index-Bjwv8B4h.js";
8
+ const _e = {
9
9
  key: 0,
10
10
  class: "fm-typo-en-title-sm-600"
11
11
  }, be = {
@@ -14,25 +14,25 @@ const ve = {
14
14
  }, he = { class: "flex flex-col gap-4" }, xe = { class: "flex flex-col gap-2" }, Pe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, we = {
15
15
  key: 0,
16
16
  class: "flex flex-col gap-1"
17
- }, ge = { class: "px-1.5 py-0.5 fm-corner-radius-sm bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary fm-typo-en-body-xs-600 uppercase" }, Te = {
17
+ }, Ce = { class: "px-1.5 py-0.5 fm-corner-radius-sm bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary fm-typo-en-body-xs-600 uppercase" }, Te = {
18
18
  key: 0,
19
19
  class: "fm-typo-en-body-sm-600"
20
- }, Ce = ["title"], Ie = {
20
+ }, ge = ["title"], Ie = {
21
21
  key: 1,
22
22
  class: "fm-typo-en-body-lg-600"
23
23
  }, Ae = {
24
24
  key: 0,
25
25
  class: "flex flex-col gap-1"
26
- }, Oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ke = { class: "fm-typo-en-body-lg-600" }, Se = {
26
+ }, Ke = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Oe = { class: "fm-typo-en-body-lg-600" }, Ue = {
27
27
  key: 1,
28
28
  class: "flex flex-col gap-1"
29
- }, Ue = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, $e = { class: "fm-typo-en-body-lg-600" }, Fe = {
29
+ }, $e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Fe = { class: "fm-typo-en-body-lg-600" }, Se = {
30
30
  key: 2,
31
31
  class: "flex flex-col gap-1"
32
32
  }, qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Re = { class: "fm-typo-en-body-lg-600" }, De = {
33
33
  key: 3,
34
34
  class: "flex flex-col gap-1"
35
- }, Be = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ve = { class: "fm-typo-en-body-lg-600" }, Ee = { key: 0 }, N = /* @__PURE__ */ S({
35
+ }, Be = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ve = { class: "fm-typo-en-body-lg-600" }, Ee = { key: 0 }, N = /* @__PURE__ */ U({
36
36
  __name: "KioskSummary",
37
37
  props: {
38
38
  restaurantId: {},
@@ -41,60 +41,60 @@ const ve = {
41
41
  dialogType: { type: Boolean }
42
42
  },
43
43
  setup(t) {
44
- const { t: e } = U(), o = t, r = h(() => {
44
+ const { t: e } = $(), s = t, r = h(() => {
45
45
  var a;
46
- return (a = o.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
46
+ return (a = s.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
47
47
  }), n = h(() => {
48
48
  var a;
49
- return (a = o.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
50
- }), s = h(() => {
49
+ return (a = s.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
50
+ }), o = h(() => {
51
51
  var a, y;
52
- return (a = o.kioskOrderSetting) != null && a.dineIn.displayStand ? e("order.tableService") : (y = o.kioskOrderSetting) != null && y.dineIn && !o.kioskOrderSetting.dineIn.displayStand ? e("order.pickAtCounter") : e("order.unknown");
52
+ return (a = s.kioskOrderSetting) != null && a.dineIn.displayStand ? e("order.tableService") : (y = s.kioskOrderSetting) != null && y.dineIn && !s.kioskOrderSetting.dineIn.displayStand ? e("order.pickAtCounter") : e("order.unknown");
53
53
  }), p = h(() => {
54
54
  var a;
55
- return ((a = o.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
55
+ return ((a = s.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
56
56
  }), d = h(() => {
57
- var y, _;
57
+ var y, v;
58
58
  const a = [];
59
- if ((y = o.kioskOrderSetting) == null || y.paymentSetting.paymentTypes.forEach((v) => {
60
- v === V.enum.ePayment && a.push(e("order.ePayment"));
61
- }), a.length > 0 && Object.keys(o.kioskOrderSetting.paymentSetting.ePaymentTypes).length !== 0) {
62
- const v = (_ = o.kioskOrderSetting) == null ? void 0 : _.paymentSetting.ePaymentTypes;
63
- (v.card.terminal || v.card.nfc) && a.push(e("order.bankCard")), (v.eWallet.scanPay || v.eWallet.qrPay) && a.push(e("order.eWallet"));
59
+ if ((y = s.kioskOrderSetting) == null || y.paymentSetting.paymentTypes.forEach((_) => {
60
+ _ === V.enum.ePayment && a.push(e("order.ePayment"));
61
+ }), a.length > 0 && Object.keys(s.kioskOrderSetting.paymentSetting.ePaymentTypes).length !== 0) {
62
+ const _ = (v = s.kioskOrderSetting) == null ? void 0 : v.paymentSetting.ePaymentTypes;
63
+ (_.card.terminal || _.card.nfc) && a.push(e("order.bankCard")), (_.eWallet.scanPay || _.eWallet.qrPay) && a.push(e("order.eWallet"));
64
64
  }
65
65
  return a.join(", ");
66
66
  });
67
67
  return (a, y) => (i(), f("div", {
68
- class: Z(a.dialogType ? "" : ["p-[1.5rem] border fm-corner-radius-lg flex flex-col gap-5 fixed ml-40 w-[320px]"])
68
+ class: k(a.dialogType ? "" : ["p-[1.5rem] border fm-corner-radius-lg flex flex-col gap-5 fixed ml-40 w-[320px]"])
69
69
  }, [
70
- a.dialogType ? b("", !0) : (i(), f("span", ve, u(c(e)("order.kioskSummary")), 1)),
70
+ a.dialogType ? b("", !0) : (i(), f("span", _e, u(c(e)("order.kioskSummary")), 1)),
71
71
  a.dialogType ? b("", !0) : (i(), f("hr", be)),
72
72
  l("div", he, [
73
73
  l("div", xe, [
74
74
  l("span", Pe, u(c(e)("order.kioskDisplay")), 1),
75
75
  a.devices.length > 0 ? (i(), f("div", we, [
76
- (i(!0), f(ee, null, te(a.devices, (_) => (i(), f("div", {
77
- key: _.machineId,
76
+ (i(!0), f(ee, null, te(a.devices, (v) => (i(), f("div", {
77
+ key: v.machineId,
78
78
  class: "fm-typo-en-body-sm-400 flex items-center gap-2"
79
79
  }, [
80
- l("span", ge, u(_.deviceAppType === "TABLET_APP" ? "T" : "K"), 1),
81
- _.slotInfo ? (i(), f("span", Te, u(_.slotInfo), 1)) : b("", !0),
80
+ l("span", Ce, u(v.deviceAppType === "TABLET_APP" ? "T" : "K"), 1),
81
+ v.slotInfo ? (i(), f("span", Te, u(v.slotInfo), 1)) : b("", !0),
82
82
  l("span", {
83
83
  class: "text-fm-color-typo-secondary truncate flex-1",
84
- title: _.name
85
- }, u(_.name), 9, Ce)
84
+ title: v.name
85
+ }, u(v.name), 9, ge)
86
86
  ]))), 128))
87
87
  ])) : (i(), f("div", Ie, "-"))
88
88
  ]),
89
89
  r.value === c(e)("order.activated") ? (i(), f("div", Ae, [
90
- l("span", Oe, u(c(e)("order.dineIn")), 1),
91
- l("div", Ke, u(r.value), 1)
90
+ l("span", Ke, u(c(e)("order.dineIn")), 1),
91
+ l("div", Oe, u(r.value), 1)
92
92
  ])) : b("", !0),
93
- r.value === c(e)("order.activated") && s.value !== c(e)("order.unknown") ? (i(), f("div", Se, [
94
- l("span", Ue, u(c(e)("order.dineInType")), 1),
95
- l("div", $e, u(s.value), 1)
93
+ r.value === c(e)("order.activated") && o.value !== c(e)("order.unknown") ? (i(), f("div", Ue, [
94
+ l("span", $e, u(c(e)("order.dineInType")), 1),
95
+ l("div", Fe, u(o.value), 1)
96
96
  ])) : b("", !0),
97
- n.value === c(e)("order.activated") ? (i(), f("div", Fe, [
97
+ n.value === c(e)("order.activated") ? (i(), f("div", Se, [
98
98
  l("span", qe, u(c(e)("order.takeaway")), 1),
99
99
  l("div", Re, u(n.value), 1)
100
100
  ])) : b("", !0),
@@ -108,16 +108,16 @@ const ve = {
108
108
  ])
109
109
  ], 2));
110
110
  }
111
- }), Me = { class: "flex flex-col gap-5 pb-6" }, Ne = { class: "fm-typo-en-body-md-400 block" }, We = { class: "fm-typo-en-title-md-600" }, Le = /* @__PURE__ */ S({
111
+ }), Me = { class: "flex flex-col gap-5 pb-6" }, Ne = { class: "fm-typo-en-body-md-400 block" }, We = { class: "fm-typo-en-title-md-600" }, Le = /* @__PURE__ */ U({
112
112
  __name: "KioskOtpDialog",
113
113
  props: {
114
114
  otp: {}
115
115
  },
116
116
  setup(t) {
117
- const { t: e } = U();
118
- return (o, r) => (i(), f("div", Me, [
117
+ const { t: e } = $();
118
+ return (s, r) => (i(), f("div", Me, [
119
119
  l("span", Ne, u(c(e)("order.bindDeviceMessage")), 1),
120
- l("div", We, u(o.otp), 1)
120
+ l("div", We, u(s.otp), 1)
121
121
  ]));
122
122
  }
123
123
  }), L = {
@@ -173,8 +173,9 @@ const ve = {
173
173
  },
174
174
  menuItem: {
175
175
  showAllOnly: !1
176
- }
177
- }, K = {
176
+ },
177
+ otaChannel: ""
178
+ }, O = {
178
179
  payAtCounter: null,
179
180
  paid: null
180
181
  }, Ye = (t) => {
@@ -183,7 +184,7 @@ const ve = {
183
184
  kiosk: ze(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
184
185
  };
185
186
  }, ze = (t, e) => {
186
- var o, r, n, s, p, d, a, y, _, v, P;
187
+ var s, r, n, o, p, d, a, y, v, _, P;
187
188
  return {
188
189
  dineIn: Qe(
189
190
  e ?? {
@@ -194,15 +195,15 @@ const ve = {
194
195
  ),
195
196
  takeaway: {
196
197
  enabled: (t == null ? void 0 : t.canTakeaway) ?? !1,
197
- submitOrderInstruction: (o = t == null ? void 0 : t.takeaway) != null && o.submitOrderInstruction ? {
198
- payAtCounter: ((s = (n = (r = t == null ? void 0 : t.takeaway) == null ? void 0 : r.submitOrderInstruction) == null ? void 0 : n.payAtCounter) == null ? void 0 : s.en) ?? null,
198
+ submitOrderInstruction: (s = t == null ? void 0 : t.takeaway) != null && s.submitOrderInstruction ? {
199
+ 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,
199
200
  paid: ((a = (d = (p = t == null ? void 0 : t.takeaway) == null ? void 0 : p.submitOrderInstruction) == null ? void 0 : d.paid) == null ? void 0 : a.en) ?? null
200
- } : K
201
+ } : O
201
202
  },
202
203
  paymentSetting: {
203
204
  paymentTypes: ((y = t == null ? void 0 : t.paymentSetting) == null ? void 0 : y.paymentTypes) ?? [],
204
- offlinePaymentTypes: ((_ = t == null ? void 0 : t.paymentSetting) == null ? void 0 : _.offlinePaymentTypes) ?? [],
205
- ePaymentTypes: ((v = t == null ? void 0 : t.paymentSetting) == null ? void 0 : v.ePaymentTypes) ?? pe.parse({
205
+ offlinePaymentTypes: ((v = t == null ? void 0 : t.paymentSetting) == null ? void 0 : v.offlinePaymentTypes) ?? [],
206
+ ePaymentTypes: ((_ = t == null ? void 0 : t.paymentSetting) == null ? void 0 : _.ePaymentTypes) ?? pe.parse({
206
207
  card: {
207
208
  terminal: !1,
208
209
  nfc: !1
@@ -215,19 +216,20 @@ const ve = {
215
216
  },
216
217
  menuItem: {
217
218
  showAllOnly: ((P = t == null ? void 0 : t.menuItem) == null ? void 0 : P.showAllOnly) ?? !1
218
- }
219
+ },
220
+ otaChannel: (t == null ? void 0 : t.otaChannel) ?? ""
219
221
  };
220
222
  }, Qe = (t, e) => {
221
- var o, r, n, s, p, d, a, y;
223
+ var s, r, n, o, p, d, a, y;
222
224
  return {
223
225
  enabled: !!e,
224
226
  sequenceNumber: t,
225
227
  pickUp: e != null && e.pickUp ? {
226
228
  ...e.pickUp,
227
229
  submitOrderInstruction: e.pickUp.submitOrderInstruction ? {
228
- payAtCounter: ((r = (o = e.pickUp.submitOrderInstruction) == null ? void 0 : o.payAtCounter) == null ? void 0 : r.en) ?? null,
229
- paid: ((s = (n = e.pickUp.submitOrderInstruction) == null ? void 0 : n.paid) == null ? void 0 : s.en) ?? null
230
- } : K,
230
+ payAtCounter: ((r = (s = e.pickUp.submitOrderInstruction) == null ? void 0 : s.payAtCounter) == null ? void 0 : r.en) ?? null,
231
+ paid: ((o = (n = e.pickUp.submitOrderInstruction) == null ? void 0 : n.paid) == null ? void 0 : o.en) ?? null
232
+ } : O,
231
233
  enablePaxDialog: e.pickUp.enablePaxDialog ? e.pickUp.enablePaxDialog : !1
232
234
  } : j,
233
235
  displayStand: e != null && e.displayStand ? {
@@ -239,18 +241,18 @@ const ve = {
239
241
  submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
240
242
  payAtCounter: ((d = (p = e.displayStand.submitOrderInstruction) == null ? void 0 : p.payAtCounter) == null ? void 0 : d.en) ?? null,
241
243
  paid: ((y = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : y.en) ?? null
242
- } : K
244
+ } : O
243
245
  } : L
244
246
  };
245
- }, ke = (t) => {
247
+ }, Ge = (t) => {
246
248
  const e = (n) => {
247
- var s, p, d, a;
249
+ var o, p, d, a;
248
250
  return {
249
251
  requiredSlot: !!n.displayStand,
250
252
  displayStand: {
251
253
  ...n.displayStand,
252
254
  submitOrderInstruction: {
253
- payAtCounter: (s = n.displayStand.submitOrderInstruction) != null && s.payAtCounter ? {
255
+ payAtCounter: (o = n.displayStand.submitOrderInstruction) != null && o.payAtCounter ? {
254
256
  en: n.displayStand.submitOrderInstruction.payAtCounter
255
257
  } : null,
256
258
  paid: (p = n.displayStand.submitOrderInstruction) != null && p.paid ? {
@@ -270,11 +272,12 @@ const ve = {
270
272
  }
271
273
  }
272
274
  };
273
- }, o = (n) => ({
275
+ }, s = (n) => ({
274
276
  canTakeaway: t.takeaway.enabled,
275
277
  dineIn: n,
276
278
  menuItem: t.menuItem,
277
279
  paymentSetting: r(t.paymentSetting),
280
+ otaChannel: t.otaChannel || void 0,
278
281
  takeaway: t.takeaway.submitOrderInstruction ? {
279
282
  submitOrderInstruction: {
280
283
  payAtCounter: t.takeaway.submitOrderInstruction.payAtCounter ? {
@@ -291,51 +294,51 @@ const ve = {
291
294
  ePaymentTypes: n.ePaymentTypes
292
295
  });
293
296
  return t.dineIn.enabled ? {
294
- kioskSettings: o(e(t.dineIn)),
297
+ kioskSettings: s(e(t.dineIn)),
295
298
  kioskDineIn: t.dineIn.sequenceNumber
296
299
  } : {
297
- kioskSettings: o()
300
+ kioskSettings: s()
298
301
  };
299
302
  }, W = {
300
303
  convertOrderSettingDto: Ye,
301
- toOrderKioskSettingsDto: ke
302
- }, Ge = _e("orderSetting", () => {
304
+ toOrderKioskSettingsDto: Ge
305
+ }, Je = ve("orderSetting", () => {
303
306
  const t = I({});
304
307
  async function e() {
305
- const s = await E.getOrderSetting();
306
- r(s);
308
+ const o = await E.getOrderSetting();
309
+ r(o);
307
310
  }
308
- async function o() {
311
+ async function s() {
309
312
  if (t.value.orderSetting && t.value.kiosk) {
310
- const { _id: s, ...p } = t.value.orderSetting, d = W.toOrderKioskSettingsDto(t.value.kiosk), a = {
313
+ const { _id: o, ...p } = t.value.orderSetting, d = W.toOrderKioskSettingsDto(t.value.kiosk), a = {
311
314
  ...p,
312
315
  kioskSettings: d.kioskSettings
313
316
  }, y = await E.updateOrderSetting(a);
314
317
  r(y);
315
318
  }
316
319
  }
317
- function r(s) {
318
- t.value.orderSetting = s, t.value.kiosk = W.convertOrderSettingDto(s).kiosk;
320
+ function r(o) {
321
+ t.value.orderSetting = o, t.value.kiosk = W.convertOrderSettingDto(o).kiosk;
319
322
  }
320
- function n(s) {
321
- t.value.kiosk = s;
323
+ function n(o) {
324
+ t.value.kiosk = o;
322
325
  }
323
326
  return {
324
327
  state: t.value,
325
328
  getSetting: e,
326
- updateKioskSetting: o,
329
+ updateKioskSetting: s,
327
330
  setKioskOrderSetting: n
328
331
  };
329
- }), Je = { class: "py-[1.5rem]" }, Xe = { class: "flex px-[1.5rem]" }, Ze = { class: "flex-[2_2_0%]" }, et = { class: "pt-[1.5rem]" }, tt = { class: "flex flex-col gap-10" }, at = { class: "flex flex-col gap-2" }, nt = { class: "fm-typo-en-title-sm-600" }, st = { class: "fm-typo-en-title-sm-400" }, ot = {
332
+ }), Xe = { class: "py-[1.5rem]" }, Ze = { class: "flex px-[1.5rem]" }, ke = { class: "flex-[2_2_0%]" }, et = { class: "pt-[1.5rem]" }, tt = { class: "flex flex-col gap-10" }, at = { class: "flex flex-col gap-2" }, nt = { class: "fm-typo-en-title-sm-600" }, ot = { class: "fm-typo-en-title-sm-400" }, st = {
330
333
  key: 0,
331
334
  class: "flex-[1_1_0%]"
332
- }, yt = /* @__PURE__ */ S({
335
+ }, yt = /* @__PURE__ */ U({
333
336
  __name: "KioskView",
334
337
  setup(t) {
335
338
  var R, D;
336
- const { t: e } = U(), o = ae(
337
- () => import("./KioskSettingView-DmvtZcV1.js")
338
- ), r = I("device"), n = ce(), s = Ge(), p = ye(), { currentRestaurant: d, restaurants: a, changeRestaurant: y } = ue(), _ = me(), v = fe(), P = h(() => v.breakpoints.value.xs), T = I(((R = d.value) == null ? void 0 : R._id) ?? void 0), H = h(() => a.value.map((m) => ({
339
+ const { t: e } = $(), s = ae(
340
+ () => import("./KioskSettingView-DS5vEQ07.js")
341
+ ), r = I("device"), n = ce(), o = Je(), p = ye(), { currentRestaurant: d, restaurants: a, changeRestaurant: y } = ue(), v = me(), _ = fe(), P = h(() => _.breakpoints.value.xs), T = I(((R = d.value) == null ? void 0 : R._id) ?? void 0), H = h(() => a.value.map((m) => ({
339
342
  label: m.profile.name,
340
343
  value: m._id
341
344
  }))), w = I(((D = d.value) == null ? void 0 : D._id) ?? "");
@@ -347,17 +350,17 @@ const ve = {
347
350
  contentComponentProps: {
348
351
  restaurantId: (m = d.value) == null ? void 0 : m._id,
349
352
  devices: n.state.devices,
350
- kioskOrderSetting: s.state.kiosk,
353
+ kioskOrderSetting: o.state.kiosk,
351
354
  dialogType: !0
352
355
  }
353
356
  });
354
357
  }
355
- async function $(m) {
358
+ async function F(m) {
356
359
  const x = a.value.find((A) => A._id == m);
357
- await y(x), await F(), T.value = m, w.value = m;
360
+ await y(x), await S(), T.value = m, w.value = m;
358
361
  }
359
- async function F() {
360
- await s.getSetting(), await n.getDevices();
362
+ async function S() {
363
+ await o.getSetting(), await n.getDevices();
361
364
  }
362
365
  const z = h(() => [
363
366
  {
@@ -380,14 +383,14 @@ const ve = {
380
383
  await n.getDevices();
381
384
  });
382
385
  }
383
- async function k(m) {
386
+ async function G(m) {
384
387
  try {
385
- s.setKioskOrderSetting(m), await s.updateKioskSetting(), _.open({
388
+ o.setKioskOrderSetting(m), await o.updateKioskSetting(), v.open({
386
389
  title: e("order.kioskSettingSuccess"),
387
390
  type: "success"
388
391
  });
389
392
  } catch {
390
- _.open({
393
+ v.open({
391
394
  title: e("order.kioskSettingFailed"),
392
395
  type: "error"
393
396
  });
@@ -395,21 +398,21 @@ const ve = {
395
398
  }
396
399
  return ne(async () => {
397
400
  var m;
398
- (m = d.value) != null && m._id && (w.value = d.value._id, await F());
399
- }), se(
401
+ (m = d.value) != null && m._id && (w.value = d.value._id, await S());
402
+ }), oe(
400
403
  () => a.value.length,
401
404
  async (m) => {
402
- T.value === void 0 && a.value.length > 0 && await $(a.value[0]._id);
405
+ T.value === void 0 && a.value.length > 0 && await F(a.value[0]._id);
403
406
  },
404
407
  { immediate: !0 }
405
408
  ), (m, x) => {
406
- const A = C("FmButton"), G = C("FmPageHead"), J = C("FmTabs"), X = C("FmSelect");
407
- return i(), f("div", Je, [
408
- g(G, {
409
+ const A = g("FmButton"), J = g("FmPageHead"), X = g("FmTabs"), Z = g("FmSelect");
410
+ return i(), f("div", Xe, [
411
+ C(J, {
409
412
  title: c(e)("order.kiosk")
410
413
  }, {
411
- append: oe(() => [
412
- le(g(A, {
414
+ append: se(() => [
415
+ le(C(A, {
413
416
  icon: "info",
414
417
  variant: "tertiary",
415
418
  onClick: Y
@@ -419,24 +422,24 @@ const ve = {
419
422
  ]),
420
423
  _: 1
421
424
  }, 8, ["title"]),
422
- l("div", Xe, [
423
- l("div", Ze, [
424
- g(J, {
425
+ l("div", Ze, [
426
+ l("div", ke, [
427
+ C(X, {
425
428
  "model-value": r.value,
426
- "onUpdate:modelValue": x[0] || (x[0] = (O) => r.value = O),
429
+ "onUpdate:modelValue": x[0] || (x[0] = (K) => r.value = K),
427
430
  items: z.value
428
431
  }, null, 8, ["model-value", "items"]),
429
432
  l("div", et, [
430
433
  l("div", tt, [
431
434
  l("div", at, [
432
435
  l("span", nt, u(c(e)("order.activateLocation")), 1),
433
- l("span", st, u(c(e)("order.selectRestaurant")) + ": ", 1),
434
- g(X, {
436
+ l("span", ot, u(c(e)("order.selectRestaurant")) + ": ", 1),
437
+ C(Z, {
435
438
  class: "w-1/2",
436
439
  modelValue: T.value,
437
440
  "onUpdate:modelValue": [
438
- x[1] || (x[1] = (O) => T.value = O),
439
- $
441
+ x[1] || (x[1] = (K) => T.value = K),
442
+ F
440
443
  ],
441
444
  items: H.value,
442
445
  placeholder: c(e)("order.selectItem")
@@ -447,20 +450,20 @@ const ve = {
447
450
  devices: q.value,
448
451
  onRequestOtp: Q
449
452
  }, null, 8, ["devices"])) : b("", !0),
450
- r.value == "setting" ? (i(), B(c(o), {
453
+ r.value == "setting" ? (i(), B(c(s), {
451
454
  key: `KioskSettingView-${w.value}`,
452
455
  "restaurant-id": w.value,
453
- onUpdateKioskOrderSetting: k,
454
- form: c(s).state.kiosk ?? c(He)
456
+ onUpdateKioskOrderSetting: G,
457
+ form: c(o).state.kiosk ?? c(He)
455
458
  }, null, 8, ["restaurant-id", "form"])) : b("", !0)
456
459
  ])
457
460
  ])
458
461
  ]),
459
- P.value ? b("", !0) : (i(), f("div", ot, [
460
- g(N, {
462
+ P.value ? b("", !0) : (i(), f("div", st, [
463
+ C(N, {
461
464
  "restaurant-id": w.value,
462
465
  devices: q.value,
463
- "kiosk-order-setting": c(s).state.kiosk,
466
+ "kiosk-order-setting": c(o).state.kiosk,
464
467
  dialogType: !1
465
468
  }, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
466
469
  ]))