@feedmepos/mf-order-setting 0.0.51 → 0.0.52-dev.0

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 (67) hide show
  1. package/.tsbuildinfo +1 -0
  2. package/dist/{KioskDevicesView-TIls1ag1.js → KioskDevicesView-Vy9FLX1n.js} +1 -1
  3. package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B2gjPfOJ.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-DhZPOEEQ.js} +2 -2
  4. package/dist/KioskSettingView-cE-JdCBB.js +551 -0
  5. package/dist/{KioskView-B0Jj2sOl.js → KioskView-BYs5bem0.js} +108 -111
  6. package/dist/OrderSettingsView-C4aEpC1j.js +56063 -0
  7. package/dist/{app-JqOEacuf.js → app-CwYXsqxX.js} +182 -26
  8. package/dist/app.js +1 -1
  9. package/dist/{dayjs.min-B42nUieJ.js → dayjs.min-JEYIJz2D.js} +1 -1
  10. package/dist/frontend/mf-order/src/api/reservation/index.d.ts +8 -0
  11. package/dist/frontend/mf-order/src/app.d.ts +164 -8
  12. package/dist/frontend/mf-order/src/main.d.ts +164 -8
  13. package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +0 -2
  14. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +0 -6
  15. package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +3 -3
  16. package/dist/frontend/mf-order/src/views/all-orders/ReflowOrder.vue.d.ts +2 -2
  17. package/dist/frontend/mf-order/src/views/order-settings/delivery/inhouse/InHouseDelivery.vue.d.ts +2 -2
  18. package/dist/frontend/mf-order/src/views/order-settings/reservation/CopySettingsSheet.vue.d.ts +186 -0
  19. package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomSelect.vue.d.ts +15 -0
  20. package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomTimePicker.vue.d.ts +10 -0
  21. package/dist/frontend/mf-order/src/views/order-settings/reservation/ReservationSetting.vue.d.ts +2 -0
  22. package/dist/{index-B0teNm7_.js → index-DZCjODMx.js} +2 -2
  23. package/dist/{menu.dto-DFTxveX1.js → menu.dto-D9CDVLiP.js} +22865 -20037
  24. package/dist/package/entity/food-court/order.do.d.ts +47 -2
  25. package/dist/package/entity/food-court/order.dto.d.ts +0 -3
  26. package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +12341 -1
  27. package/dist/package/entity/incoming-order/incoming-order.do.d.ts +3 -22266
  28. package/dist/package/entity/index.d.ts +5 -0
  29. package/dist/package/entity/kiosk/marketing/marketing.dto.d.ts +1 -19864
  30. package/dist/package/entity/order/order-item/order-item.dto.d.ts +1 -3721
  31. package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +0 -3
  32. package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +0 -3
  33. package/dist/package/entity/order-setting/order-setting.do.d.ts +861 -5
  34. package/dist/package/entity/order-setting/order-setting.dto.d.ts +0 -10
  35. package/dist/package/entity/order-setting/reservationV2/reservation.do.d.ts +1269 -0
  36. package/dist/package/entity/queue/queue.do.d.ts +1 -11
  37. package/dist/package/entity/reservation/reservation.do.d.ts +101 -0
  38. package/dist/package/entity/reservation/reservation.dto.d.ts +325 -0
  39. package/dist/package/entity/reservation/reservation.enum.d.ts +3 -0
  40. package/dist/package/entity/reservation/reservation.utils.d.ts +152 -0
  41. package/dist/package/entity/restaurant/restaurant.dto.d.ts +0 -5
  42. package/dist/package/entity/websocket/websocket.dto.d.ts +0 -12
  43. package/dist/style.css +1 -0
  44. package/package.json +3 -3
  45. package/src/api/reservation/index.ts +28 -0
  46. package/src/assets/images/not-found.png +0 -0
  47. package/src/locales/en-US.json +57 -3
  48. package/src/locales/ja-JP.json +9 -11
  49. package/src/locales/th-TH.json +55 -3
  50. package/src/locales/zh-CN.json +55 -3
  51. package/src/main.ts +7 -5
  52. package/src/modules/order-setting/kiosk/interface.ts +13 -15
  53. package/src/stores/order-setting/mapper.ts +41 -44
  54. package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -19
  55. package/src/views/kiosk/settings/KioskSettingView.vue +23 -43
  56. package/src/views/order-settings/OrderSettingsView.vue +7 -2
  57. package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +3 -1
  58. package/src/views/order-settings/drive-thru/DriveThruSetting.vue +13 -28
  59. package/src/views/order-settings/reservation/CopySettingsSheet.vue +238 -0
  60. package/src/views/order-settings/reservation/CustomSelect.vue +99 -0
  61. package/src/views/order-settings/reservation/CustomTimePicker.vue +201 -0
  62. package/src/views/order-settings/reservation/ReservationSetting.vue +1246 -0
  63. package/src/views/order-settings/servicecharge/ServiceChargeRule.vue +5 -1
  64. package/tsconfig.app.json +8 -6
  65. package/dist/KioskSettingView-UPE-q-Zd.js +0 -573
  66. package/dist/OrderSettingsView-Ca4y2PNF.js +0 -51603
  67. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +0 -1
@@ -1,11 +1,11 @@
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-B2gjPfOJ.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-DFTxveX1.js";
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-DhZPOEEQ.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-D9CDVLiP.js";
5
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-B0teNm7_.js";
8
- const _e = {
6
+ import { defineStore as _e } from "pinia";
7
+ import { O as E, c as M } from "./index-DZCjODMx.js";
8
+ const ve = {
9
9
  key: 0,
10
10
  class: "fm-typo-en-title-sm-600"
11
11
  }, be = {
@@ -14,25 +14,25 @@ const _e = {
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
- }, 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 = {
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 = {
18
18
  key: 0,
19
19
  class: "fm-typo-en-body-sm-600"
20
- }, ge = ["title"], Ie = {
20
+ }, Ce = ["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
- }, Ke = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Oe = { class: "fm-typo-en-body-lg-600" }, Ue = {
26
+ }, Oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ke = { class: "fm-typo-en-body-lg-600" }, Se = {
27
27
  key: 1,
28
28
  class: "flex flex-col gap-1"
29
- }, $e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Fe = { class: "fm-typo-en-body-lg-600" }, Se = {
29
+ }, Ue = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, $e = { class: "fm-typo-en-body-lg-600" }, Fe = {
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__ */ U({
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({
36
36
  __name: "KioskSummary",
37
37
  props: {
38
38
  restaurantId: {},
@@ -41,60 +41,60 @@ const _e = {
41
41
  dialogType: { type: Boolean }
42
42
  },
43
43
  setup(t) {
44
- const { t: e } = $(), s = t, r = h(() => {
44
+ const { t: e } = U(), o = t, r = h(() => {
45
45
  var a;
46
- return (a = s.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
46
+ return (a = o.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
47
47
  }), n = h(() => {
48
48
  var a;
49
- return (a = s.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
50
- }), o = h(() => {
49
+ return (a = o.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
50
+ }), s = h(() => {
51
51
  var a, y;
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");
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");
53
53
  }), p = h(() => {
54
54
  var a;
55
- return ((a = s.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
55
+ return ((a = o.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
56
56
  }), d = h(() => {
57
- var y, v;
57
+ var y, _;
58
58
  const a = [];
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"));
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"));
64
64
  }
65
65
  return a.join(", ");
66
66
  });
67
67
  return (a, y) => (i(), f("div", {
68
- class: k(a.dialogType ? "" : ["p-[1.5rem] border fm-corner-radius-lg flex flex-col gap-5 fixed ml-40 w-[320px]"])
68
+ class: Z(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", _e, u(c(e)("order.kioskSummary")), 1)),
70
+ a.dialogType ? b("", !0) : (i(), f("span", ve, 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, (v) => (i(), f("div", {
77
- key: v.machineId,
76
+ (i(!0), f(ee, null, te(a.devices, (_) => (i(), f("div", {
77
+ key: _.machineId,
78
78
  class: "fm-typo-en-body-sm-400 flex items-center gap-2"
79
79
  }, [
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),
80
+ l("span", ge, u(_.deviceAppType === "TABLET_APP" ? "T" : "K"), 1),
81
+ _.slotInfo ? (i(), f("span", Te, u(_.slotInfo), 1)) : b("", !0),
82
82
  l("span", {
83
83
  class: "text-fm-color-typo-secondary truncate flex-1",
84
- title: v.name
85
- }, u(v.name), 9, ge)
84
+ title: _.name
85
+ }, u(_.name), 9, Ce)
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", Ke, u(c(e)("order.dineIn")), 1),
91
- l("div", Oe, u(r.value), 1)
90
+ l("span", Oe, u(c(e)("order.dineIn")), 1),
91
+ l("div", Ke, u(r.value), 1)
92
92
  ])) : b("", !0),
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)
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)
96
96
  ])) : b("", !0),
97
- n.value === c(e)("order.activated") ? (i(), f("div", Se, [
97
+ n.value === c(e)("order.activated") ? (i(), f("div", Fe, [
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 _e = {
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__ */ U({
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({
112
112
  __name: "KioskOtpDialog",
113
113
  props: {
114
114
  otp: {}
115
115
  },
116
116
  setup(t) {
117
- const { t: e } = $();
118
- return (s, r) => (i(), f("div", Me, [
117
+ const { t: e } = U();
118
+ return (o, r) => (i(), f("div", Me, [
119
119
  l("span", Ne, u(c(e)("order.bindDeviceMessage")), 1),
120
- l("div", We, u(s.otp), 1)
120
+ l("div", We, u(o.otp), 1)
121
121
  ]));
122
122
  }
123
123
  }), L = {
@@ -173,9 +173,8 @@ const _e = {
173
173
  },
174
174
  menuItem: {
175
175
  showAllOnly: !1
176
- },
177
- otaChannel: ""
178
- }, O = {
176
+ }
177
+ }, K = {
179
178
  payAtCounter: null,
180
179
  paid: null
181
180
  }, Ye = (t) => {
@@ -184,7 +183,7 @@ const _e = {
184
183
  kiosk: ze(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
185
184
  };
186
185
  }, ze = (t, e) => {
187
- var s, r, n, o, p, d, a, y, v, _, P;
186
+ var o, r, n, s, p, d, a, y, _, v, P;
188
187
  return {
189
188
  dineIn: Qe(
190
189
  e ?? {
@@ -195,15 +194,15 @@ const _e = {
195
194
  ),
196
195
  takeaway: {
197
196
  enabled: (t == null ? void 0 : t.canTakeaway) ?? !1,
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,
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,
200
199
  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
201
- } : O
200
+ } : K
202
201
  },
203
202
  paymentSetting: {
204
203
  paymentTypes: ((y = t == null ? void 0 : t.paymentSetting) == null ? void 0 : y.paymentTypes) ?? [],
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({
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({
207
206
  card: {
208
207
  terminal: !1,
209
208
  nfc: !1
@@ -216,20 +215,19 @@ const _e = {
216
215
  },
217
216
  menuItem: {
218
217
  showAllOnly: ((P = t == null ? void 0 : t.menuItem) == null ? void 0 : P.showAllOnly) ?? !1
219
- },
220
- otaChannel: (t == null ? void 0 : t.otaChannel) ?? ""
218
+ }
221
219
  };
222
220
  }, Qe = (t, e) => {
223
- var s, r, n, o, p, d, a, y;
221
+ var o, r, n, s, p, d, a, y;
224
222
  return {
225
223
  enabled: !!e,
226
224
  sequenceNumber: t,
227
225
  pickUp: e != null && e.pickUp ? {
228
226
  ...e.pickUp,
229
227
  submitOrderInstruction: e.pickUp.submitOrderInstruction ? {
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,
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,
233
231
  enablePaxDialog: e.pickUp.enablePaxDialog ? e.pickUp.enablePaxDialog : !1
234
232
  } : j,
235
233
  displayStand: e != null && e.displayStand ? {
@@ -241,18 +239,18 @@ const _e = {
241
239
  submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
242
240
  payAtCounter: ((d = (p = e.displayStand.submitOrderInstruction) == null ? void 0 : p.payAtCounter) == null ? void 0 : d.en) ?? null,
243
241
  paid: ((y = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : y.en) ?? null
244
- } : O
242
+ } : K
245
243
  } : L
246
244
  };
247
- }, Ge = (t) => {
245
+ }, ke = (t) => {
248
246
  const e = (n) => {
249
- var o, p, d, a;
247
+ var s, p, d, a;
250
248
  return {
251
249
  requiredSlot: !!n.displayStand,
252
250
  displayStand: {
253
251
  ...n.displayStand,
254
252
  submitOrderInstruction: {
255
- payAtCounter: (o = n.displayStand.submitOrderInstruction) != null && o.payAtCounter ? {
253
+ payAtCounter: (s = n.displayStand.submitOrderInstruction) != null && s.payAtCounter ? {
256
254
  en: n.displayStand.submitOrderInstruction.payAtCounter
257
255
  } : null,
258
256
  paid: (p = n.displayStand.submitOrderInstruction) != null && p.paid ? {
@@ -272,12 +270,11 @@ const _e = {
272
270
  }
273
271
  }
274
272
  };
275
- }, s = (n) => ({
273
+ }, o = (n) => ({
276
274
  canTakeaway: t.takeaway.enabled,
277
275
  dineIn: n,
278
276
  menuItem: t.menuItem,
279
277
  paymentSetting: r(t.paymentSetting),
280
- otaChannel: t.otaChannel || void 0,
281
278
  takeaway: t.takeaway.submitOrderInstruction ? {
282
279
  submitOrderInstruction: {
283
280
  payAtCounter: t.takeaway.submitOrderInstruction.payAtCounter ? {
@@ -294,51 +291,51 @@ const _e = {
294
291
  ePaymentTypes: n.ePaymentTypes
295
292
  });
296
293
  return t.dineIn.enabled ? {
297
- kioskSettings: s(e(t.dineIn)),
294
+ kioskSettings: o(e(t.dineIn)),
298
295
  kioskDineIn: t.dineIn.sequenceNumber
299
296
  } : {
300
- kioskSettings: s()
297
+ kioskSettings: o()
301
298
  };
302
299
  }, W = {
303
300
  convertOrderSettingDto: Ye,
304
- toOrderKioskSettingsDto: Ge
305
- }, Je = ve("orderSetting", () => {
301
+ toOrderKioskSettingsDto: ke
302
+ }, Ge = _e("orderSetting", () => {
306
303
  const t = I({});
307
304
  async function e() {
308
- const o = await E.getOrderSetting();
309
- r(o);
305
+ const s = await E.getOrderSetting();
306
+ r(s);
310
307
  }
311
- async function s() {
308
+ async function o() {
312
309
  if (t.value.orderSetting && t.value.kiosk) {
313
- const { _id: o, ...p } = t.value.orderSetting, d = W.toOrderKioskSettingsDto(t.value.kiosk), a = {
310
+ const { _id: s, ...p } = t.value.orderSetting, d = W.toOrderKioskSettingsDto(t.value.kiosk), a = {
314
311
  ...p,
315
312
  kioskSettings: d.kioskSettings
316
313
  }, y = await E.updateOrderSetting(a);
317
314
  r(y);
318
315
  }
319
316
  }
320
- function r(o) {
321
- t.value.orderSetting = o, t.value.kiosk = W.convertOrderSettingDto(o).kiosk;
317
+ function r(s) {
318
+ t.value.orderSetting = s, t.value.kiosk = W.convertOrderSettingDto(s).kiosk;
322
319
  }
323
- function n(o) {
324
- t.value.kiosk = o;
320
+ function n(s) {
321
+ t.value.kiosk = s;
325
322
  }
326
323
  return {
327
324
  state: t.value,
328
325
  getSetting: e,
329
- updateKioskSetting: s,
326
+ updateKioskSetting: o,
330
327
  setKioskOrderSetting: n
331
328
  };
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 = {
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 = {
333
330
  key: 0,
334
331
  class: "flex-[1_1_0%]"
335
- }, yt = /* @__PURE__ */ U({
332
+ }, yt = /* @__PURE__ */ S({
336
333
  __name: "KioskView",
337
334
  setup(t) {
338
335
  var R, D;
339
- const { t: e } = $(), s = ae(
340
- () => import("./KioskSettingView-UPE-q-Zd.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) => ({
336
+ const { t: e } = U(), o = ae(
337
+ () => import("./KioskSettingView-cE-JdCBB.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) => ({
342
339
  label: m.profile.name,
343
340
  value: m._id
344
341
  }))), w = I(((D = d.value) == null ? void 0 : D._id) ?? "");
@@ -350,17 +347,17 @@ const _e = {
350
347
  contentComponentProps: {
351
348
  restaurantId: (m = d.value) == null ? void 0 : m._id,
352
349
  devices: n.state.devices,
353
- kioskOrderSetting: o.state.kiosk,
350
+ kioskOrderSetting: s.state.kiosk,
354
351
  dialogType: !0
355
352
  }
356
353
  });
357
354
  }
358
- async function F(m) {
355
+ async function $(m) {
359
356
  const x = a.value.find((A) => A._id == m);
360
- await y(x), await S(), T.value = m, w.value = m;
357
+ await y(x), await F(), T.value = m, w.value = m;
361
358
  }
362
- async function S() {
363
- await o.getSetting(), await n.getDevices();
359
+ async function F() {
360
+ await s.getSetting(), await n.getDevices();
364
361
  }
365
362
  const z = h(() => [
366
363
  {
@@ -383,14 +380,14 @@ const _e = {
383
380
  await n.getDevices();
384
381
  });
385
382
  }
386
- async function G(m) {
383
+ async function k(m) {
387
384
  try {
388
- o.setKioskOrderSetting(m), await o.updateKioskSetting(), v.open({
385
+ s.setKioskOrderSetting(m), await s.updateKioskSetting(), _.open({
389
386
  title: e("order.kioskSettingSuccess"),
390
387
  type: "success"
391
388
  });
392
389
  } catch {
393
- v.open({
390
+ _.open({
394
391
  title: e("order.kioskSettingFailed"),
395
392
  type: "error"
396
393
  });
@@ -398,21 +395,21 @@ const _e = {
398
395
  }
399
396
  return ne(async () => {
400
397
  var m;
401
- (m = d.value) != null && m._id && (w.value = d.value._id, await S());
402
- }), oe(
398
+ (m = d.value) != null && m._id && (w.value = d.value._id, await F());
399
+ }), se(
403
400
  () => a.value.length,
404
401
  async (m) => {
405
- T.value === void 0 && a.value.length > 0 && await F(a.value[0]._id);
402
+ T.value === void 0 && a.value.length > 0 && await $(a.value[0]._id);
406
403
  },
407
404
  { immediate: !0 }
408
405
  ), (m, x) => {
409
- const A = g("FmButton"), J = g("FmPageHead"), X = g("FmTabs"), Z = g("FmSelect");
410
- return i(), f("div", Xe, [
411
- C(J, {
406
+ const A = C("FmButton"), G = C("FmPageHead"), J = C("FmTabs"), X = C("FmSelect");
407
+ return i(), f("div", Je, [
408
+ g(G, {
412
409
  title: c(e)("order.kiosk")
413
410
  }, {
414
- append: se(() => [
415
- le(C(A, {
411
+ append: oe(() => [
412
+ le(g(A, {
416
413
  icon: "info",
417
414
  variant: "tertiary",
418
415
  onClick: Y
@@ -422,24 +419,24 @@ const _e = {
422
419
  ]),
423
420
  _: 1
424
421
  }, 8, ["title"]),
425
- l("div", Ze, [
426
- l("div", ke, [
427
- C(X, {
422
+ l("div", Xe, [
423
+ l("div", Ze, [
424
+ g(J, {
428
425
  "model-value": r.value,
429
- "onUpdate:modelValue": x[0] || (x[0] = (K) => r.value = K),
426
+ "onUpdate:modelValue": x[0] || (x[0] = (O) => r.value = O),
430
427
  items: z.value
431
428
  }, null, 8, ["model-value", "items"]),
432
429
  l("div", et, [
433
430
  l("div", tt, [
434
431
  l("div", at, [
435
432
  l("span", nt, u(c(e)("order.activateLocation")), 1),
436
- l("span", ot, u(c(e)("order.selectRestaurant")) + ": ", 1),
437
- C(Z, {
433
+ l("span", st, u(c(e)("order.selectRestaurant")) + ": ", 1),
434
+ g(X, {
438
435
  class: "w-1/2",
439
436
  modelValue: T.value,
440
437
  "onUpdate:modelValue": [
441
- x[1] || (x[1] = (K) => T.value = K),
442
- F
438
+ x[1] || (x[1] = (O) => T.value = O),
439
+ $
443
440
  ],
444
441
  items: H.value,
445
442
  placeholder: c(e)("order.selectItem")
@@ -450,20 +447,20 @@ const _e = {
450
447
  devices: q.value,
451
448
  onRequestOtp: Q
452
449
  }, null, 8, ["devices"])) : b("", !0),
453
- r.value == "setting" ? (i(), B(c(s), {
450
+ r.value == "setting" ? (i(), B(c(o), {
454
451
  key: `KioskSettingView-${w.value}`,
455
452
  "restaurant-id": w.value,
456
- onUpdateKioskOrderSetting: G,
457
- form: c(o).state.kiosk ?? c(He)
453
+ onUpdateKioskOrderSetting: k,
454
+ form: c(s).state.kiosk ?? c(He)
458
455
  }, null, 8, ["restaurant-id", "form"])) : b("", !0)
459
456
  ])
460
457
  ])
461
458
  ]),
462
- P.value ? b("", !0) : (i(), f("div", st, [
463
- C(N, {
459
+ P.value ? b("", !0) : (i(), f("div", ot, [
460
+ g(N, {
464
461
  "restaurant-id": w.value,
465
462
  devices: q.value,
466
- "kiosk-order-setting": c(o).state.kiosk,
463
+ "kiosk-order-setting": c(s).state.kiosk,
467
464
  dialogType: !1
468
465
  }, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
469
466
  ]))