@feedmepos/mf-order-setting 0.0.49 → 0.0.51

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 (64) hide show
  1. package/dist/{KioskDevicesView-Ch_mWJz9.js → KioskDevicesView-TIls1ag1.js} +1 -1
  2. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-B2gjPfOJ.js +501 -0
  3. package/dist/KioskSettingView-UPE-q-Zd.js +573 -0
  4. package/dist/KioskView-B0Jj2sOl.js +477 -0
  5. package/dist/{OrderSettingsView-CRgoLOD2.js → OrderSettingsView-Ca4y2PNF.js} +4 -4
  6. package/dist/{app-CDTAjXj9.js → app-JqOEacuf.js} +75 -19
  7. package/dist/app.js +1 -1
  8. package/dist/{dayjs.min-dI_j30pv.js → dayjs.min-B42nUieJ.js} +1 -1
  9. package/dist/frontend/mf-order/src/app.d.ts +56 -0
  10. package/dist/frontend/mf-order/src/main.d.ts +56 -0
  11. package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +1 -0
  12. package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +2 -0
  13. package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +3 -0
  14. package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +6 -0
  15. package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +6 -3
  16. package/dist/frontend/mf-order/src/views/order-settings/servicecharge/ServiceChargeRule.vue.d.ts +2 -2
  17. package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
  18. package/dist/{index-B8U5Sawr.js → index-B0teNm7_.js} +2 -2
  19. package/dist/{menu.dto-qVeqpSdz.js → menu.dto-DFTxveX1.js} +6355 -6287
  20. package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +119 -12
  21. package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +124 -6
  22. package/dist/package/entity/kiosk/kiosk.do.d.ts +32 -0
  23. package/dist/package/entity/kiosk/kiosk.dto.d.ts +44 -0
  24. package/dist/package/entity/order/order-item/order-item.dto.d.ts +30 -0
  25. package/dist/package/entity/order/order.do.d.ts +8 -0
  26. package/dist/package/entity/order/order.dto.d.ts +118 -0
  27. package/dist/package/entity/order/order.enum.d.ts +2 -0
  28. package/dist/package/entity/order-platform/external/menu/external-master-menu.do.d.ts +20 -0
  29. package/dist/package/entity/order-platform/external/menu/external-menu.do.d.ts +23 -0
  30. package/dist/package/entity/order-platform/external/order/external-order.do.d.ts +62 -0
  31. package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +178 -0
  32. package/dist/package/entity/order-platform/grabfood/grabfood-menu.do.d.ts +15 -0
  33. package/dist/package/entity/order-platform/grabfood/grabfood-omni.do.d.ts +1834 -15
  34. package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +13 -13
  35. package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +3 -0
  36. package/dist/package/entity/order-platform/grabfood/grabfood-webhook.dto.d.ts +528 -805
  37. package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +8 -5
  38. package/dist/package/entity/order-platform/grabfood/grabfood.enum.d.ts +1 -1
  39. package/dist/package/entity/order-platform/menu.dto.d.ts +34 -0
  40. package/dist/package/entity/order-platform/order-platform.dto.d.ts +0 -20
  41. package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +3 -0
  42. package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +3 -0
  43. package/dist/package/entity/order-setting/order-setting.do.d.ts +5 -0
  44. package/dist/package/entity/order-setting/order-setting.dto.d.ts +10 -0
  45. package/dist/package/entity/queue/queue.dto.d.ts +45 -0
  46. package/dist/package/entity/restaurant/restaurant.dto.d.ts +5 -0
  47. package/dist/package/entity/websocket/websocket.dto.d.ts +12 -0
  48. package/package.json +1 -1
  49. package/src/locales/en-US.json +15 -1
  50. package/src/locales/ja-JP.json +23 -9
  51. package/src/locales/th-TH.json +15 -1
  52. package/src/locales/zh-CN.json +15 -1
  53. package/src/modules/kiosk/interface.ts +1 -0
  54. package/src/modules/order-setting/kiosk/interface.ts +15 -13
  55. package/src/stores/kiosk/mapper.ts +1 -0
  56. package/src/stores/order-setting/mapper.ts +16 -13
  57. package/src/views/kiosk/KioskSummary.vue +37 -31
  58. package/src/views/kiosk/KioskView.vue +4 -1
  59. package/src/views/kiosk/devices/KioskDeviceCard.vue +205 -89
  60. package/src/views/kiosk/devices/KioskDevicesView.vue +133 -17
  61. package/src/views/kiosk/settings/KioskSettingView.vue +43 -23
  62. package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-DV2HYd8u.js +0 -306
  63. package/dist/KioskSettingView-CaBhf48e.js +0 -553
  64. package/dist/KioskView-BGm-emCw.js +0 -452
@@ -0,0 +1,477 @@
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";
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 = {
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-4" }, xe = { class: "flex flex-col gap-2" }, Pe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, we = {
15
+ key: 0,
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 = {
18
+ key: 0,
19
+ class: "fm-typo-en-body-sm-600"
20
+ }, ge = ["title"], Ie = {
21
+ key: 1,
22
+ class: "fm-typo-en-body-lg-600"
23
+ }, Ae = {
24
+ key: 0,
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 = {
27
+ key: 1,
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 = {
30
+ key: 2,
31
+ class: "flex flex-col gap-1"
32
+ }, qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Re = { class: "fm-typo-en-body-lg-600" }, De = {
33
+ key: 3,
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({
36
+ __name: "KioskSummary",
37
+ props: {
38
+ restaurantId: {},
39
+ devices: {},
40
+ kioskOrderSetting: {},
41
+ dialogType: { type: Boolean }
42
+ },
43
+ setup(t) {
44
+ const { t: e } = $(), s = t, r = h(() => {
45
+ var a;
46
+ return (a = s.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
47
+ }), n = h(() => {
48
+ var a;
49
+ return (a = s.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
50
+ }), o = h(() => {
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");
53
+ }), p = h(() => {
54
+ var a;
55
+ return ((a = s.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
56
+ }), d = h(() => {
57
+ var y, v;
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"));
64
+ }
65
+ return a.join(", ");
66
+ });
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]"])
69
+ }, [
70
+ a.dialogType ? b("", !0) : (i(), f("span", _e, u(c(e)("order.kioskSummary")), 1)),
71
+ a.dialogType ? b("", !0) : (i(), f("hr", be)),
72
+ l("div", he, [
73
+ l("div", xe, [
74
+ l("span", Pe, u(c(e)("order.kioskDisplay")), 1),
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,
78
+ class: "fm-typo-en-body-sm-400 flex items-center gap-2"
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),
82
+ l("span", {
83
+ class: "text-fm-color-typo-secondary truncate flex-1",
84
+ title: v.name
85
+ }, u(v.name), 9, ge)
86
+ ]))), 128))
87
+ ])) : (i(), f("div", Ie, "-"))
88
+ ]),
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)
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)
96
+ ])) : b("", !0),
97
+ n.value === c(e)("order.activated") ? (i(), f("div", Se, [
98
+ l("span", qe, u(c(e)("order.takeaway")), 1),
99
+ l("div", Re, u(n.value), 1)
100
+ ])) : b("", !0),
101
+ d.value || p.value ? (i(), f("div", De, [
102
+ l("span", Be, u(c(e)("order.acceptedPayment")), 1),
103
+ l("div", Ve, [
104
+ p.value ? (i(), f("div", Ee, u(c(e)("order.offlinePayment")), 1)) : b("", !0),
105
+ l("div", null, u(d.value), 1)
106
+ ])
107
+ ])) : b("", !0)
108
+ ])
109
+ ], 2));
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({
112
+ __name: "KioskOtpDialog",
113
+ props: {
114
+ otp: {}
115
+ },
116
+ setup(t) {
117
+ const { t: e } = $();
118
+ return (s, r) => (i(), f("div", Me, [
119
+ l("span", Ne, u(c(e)("order.bindDeviceMessage")), 1),
120
+ l("div", We, u(s.otp), 1)
121
+ ]));
122
+ }
123
+ }), L = {
124
+ enabled: !1,
125
+ prefix: null,
126
+ padDigit: 0,
127
+ standSlotRange: {
128
+ min: 1,
129
+ max: 10
130
+ },
131
+ enablePaxDialog: !1,
132
+ submitOrderInstruction: {
133
+ payAtCounter: null,
134
+ paid: null
135
+ }
136
+ }, je = {
137
+ enabled: !1,
138
+ submitOrderInstruction: {
139
+ payAtCounter: null,
140
+ paid: null
141
+ }
142
+ }, j = {
143
+ enabled: !1,
144
+ submitOrderInstruction: {
145
+ payAtCounter: null,
146
+ paid: null
147
+ },
148
+ enablePaxDialog: !1
149
+ }, He = {
150
+ dineIn: {
151
+ enabled: !1,
152
+ pickUp: j,
153
+ sequenceNumber: ie.parse({}),
154
+ displayStand: L
155
+ },
156
+ takeaway: je,
157
+ paymentSetting: {
158
+ paymentTypes: [],
159
+ offlinePaymentTypes: [],
160
+ ePaymentTypes: {
161
+ terminal: !1,
162
+ card: {
163
+ terminal: !1,
164
+ nfc: !1
165
+ },
166
+ eWallet: {
167
+ terminalQrPay: !1,
168
+ terminalScanPay: !1,
169
+ qrPay: !1,
170
+ scanPay: !1
171
+ }
172
+ }
173
+ },
174
+ menuItem: {
175
+ showAllOnly: !1
176
+ },
177
+ otaChannel: ""
178
+ }, O = {
179
+ payAtCounter: null,
180
+ paid: null
181
+ }, Ye = (t) => {
182
+ var e;
183
+ return {
184
+ kiosk: ze(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
185
+ };
186
+ }, ze = (t, e) => {
187
+ var s, r, n, o, p, d, a, y, v, _, P;
188
+ return {
189
+ dineIn: Qe(
190
+ e ?? {
191
+ current: 0,
192
+ prefix: "#K"
193
+ },
194
+ (t == null ? void 0 : t.dineIn) ?? void 0
195
+ ),
196
+ takeaway: {
197
+ 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,
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
201
+ } : O
202
+ },
203
+ paymentSetting: {
204
+ 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({
207
+ card: {
208
+ terminal: !1,
209
+ nfc: !1
210
+ },
211
+ eWallet: {
212
+ qrPay: !1,
213
+ scanPay: !1
214
+ }
215
+ })
216
+ },
217
+ menuItem: {
218
+ showAllOnly: ((P = t == null ? void 0 : t.menuItem) == null ? void 0 : P.showAllOnly) ?? !1
219
+ },
220
+ otaChannel: (t == null ? void 0 : t.otaChannel) ?? ""
221
+ };
222
+ }, Qe = (t, e) => {
223
+ var s, r, n, o, p, d, a, y;
224
+ return {
225
+ enabled: !!e,
226
+ sequenceNumber: t,
227
+ pickUp: e != null && e.pickUp ? {
228
+ ...e.pickUp,
229
+ 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,
233
+ enablePaxDialog: e.pickUp.enablePaxDialog ? e.pickUp.enablePaxDialog : !1
234
+ } : j,
235
+ displayStand: e != null && e.displayStand ? {
236
+ enabled: e.displayStand.enabled,
237
+ standSlotRange: e.displayStand.standSlotRange,
238
+ prefix: e.displayStand.prefix,
239
+ padDigit: e.displayStand.padDigit,
240
+ enablePaxDialog: e.displayStand.enablePaxDialog ?? !1,
241
+ submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
242
+ payAtCounter: ((d = (p = e.displayStand.submitOrderInstruction) == null ? void 0 : p.payAtCounter) == null ? void 0 : d.en) ?? null,
243
+ paid: ((y = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : y.en) ?? null
244
+ } : O
245
+ } : L
246
+ };
247
+ }, Ge = (t) => {
248
+ const e = (n) => {
249
+ var o, p, d, a;
250
+ return {
251
+ requiredSlot: !!n.displayStand,
252
+ displayStand: {
253
+ ...n.displayStand,
254
+ submitOrderInstruction: {
255
+ payAtCounter: (o = n.displayStand.submitOrderInstruction) != null && o.payAtCounter ? {
256
+ en: n.displayStand.submitOrderInstruction.payAtCounter
257
+ } : null,
258
+ paid: (p = n.displayStand.submitOrderInstruction) != null && p.paid ? {
259
+ en: n.displayStand.submitOrderInstruction.paid
260
+ } : null
261
+ }
262
+ },
263
+ pickUp: {
264
+ ...n.pickUp,
265
+ submitOrderInstruction: {
266
+ payAtCounter: (d = n.pickUp.submitOrderInstruction) != null && d.payAtCounter ? {
267
+ en: n.pickUp.submitOrderInstruction.payAtCounter
268
+ } : null,
269
+ paid: (a = n.pickUp.submitOrderInstruction) != null && a.paid ? {
270
+ en: n.pickUp.submitOrderInstruction.paid
271
+ } : null
272
+ }
273
+ }
274
+ };
275
+ }, s = (n) => ({
276
+ canTakeaway: t.takeaway.enabled,
277
+ dineIn: n,
278
+ menuItem: t.menuItem,
279
+ paymentSetting: r(t.paymentSetting),
280
+ otaChannel: t.otaChannel || void 0,
281
+ takeaway: t.takeaway.submitOrderInstruction ? {
282
+ submitOrderInstruction: {
283
+ payAtCounter: t.takeaway.submitOrderInstruction.payAtCounter ? {
284
+ en: t.takeaway.submitOrderInstruction.payAtCounter
285
+ } : null,
286
+ paid: t.takeaway.submitOrderInstruction.paid ? {
287
+ en: t.takeaway.submitOrderInstruction.paid
288
+ } : null
289
+ }
290
+ } : void 0
291
+ }), r = (n) => ({
292
+ paymentTypes: n.paymentTypes,
293
+ offlinePaymentTypes: n.offlinePaymentTypes,
294
+ ePaymentTypes: n.ePaymentTypes
295
+ });
296
+ return t.dineIn.enabled ? {
297
+ kioskSettings: s(e(t.dineIn)),
298
+ kioskDineIn: t.dineIn.sequenceNumber
299
+ } : {
300
+ kioskSettings: s()
301
+ };
302
+ }, W = {
303
+ convertOrderSettingDto: Ye,
304
+ toOrderKioskSettingsDto: Ge
305
+ }, Je = ve("orderSetting", () => {
306
+ const t = I({});
307
+ async function e() {
308
+ const o = await E.getOrderSetting();
309
+ r(o);
310
+ }
311
+ async function s() {
312
+ if (t.value.orderSetting && t.value.kiosk) {
313
+ const { _id: o, ...p } = t.value.orderSetting, d = W.toOrderKioskSettingsDto(t.value.kiosk), a = {
314
+ ...p,
315
+ kioskSettings: d.kioskSettings
316
+ }, y = await E.updateOrderSetting(a);
317
+ r(y);
318
+ }
319
+ }
320
+ function r(o) {
321
+ t.value.orderSetting = o, t.value.kiosk = W.convertOrderSettingDto(o).kiosk;
322
+ }
323
+ function n(o) {
324
+ t.value.kiosk = o;
325
+ }
326
+ return {
327
+ state: t.value,
328
+ getSetting: e,
329
+ updateKioskSetting: s,
330
+ setKioskOrderSetting: n
331
+ };
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 = {
333
+ key: 0,
334
+ class: "flex-[1_1_0%]"
335
+ }, yt = /* @__PURE__ */ U({
336
+ __name: "KioskView",
337
+ setup(t) {
338
+ 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) => ({
342
+ label: m.profile.name,
343
+ value: m._id
344
+ }))), w = I(((D = d.value) == null ? void 0 : D._id) ?? "");
345
+ function Y() {
346
+ var m;
347
+ p.open({
348
+ title: M(e("order.kioskSummary")),
349
+ contentComponent: N,
350
+ contentComponentProps: {
351
+ restaurantId: (m = d.value) == null ? void 0 : m._id,
352
+ devices: n.state.devices,
353
+ kioskOrderSetting: o.state.kiosk,
354
+ dialogType: !0
355
+ }
356
+ });
357
+ }
358
+ async function F(m) {
359
+ const x = a.value.find((A) => A._id == m);
360
+ await y(x), await S(), T.value = m, w.value = m;
361
+ }
362
+ async function S() {
363
+ await o.getSetting(), await n.getDevices();
364
+ }
365
+ const z = h(() => [
366
+ {
367
+ label: e("order.deviceBinding"),
368
+ value: "device"
369
+ },
370
+ {
371
+ label: e("order.settings"),
372
+ value: "setting"
373
+ }
374
+ ]), q = h(() => n.state.devices);
375
+ async function Q() {
376
+ await n.requestOtp(), p.open({
377
+ title: M(e("order.bindDevice")),
378
+ contentComponent: Le,
379
+ contentComponentProps: {
380
+ otp: n.state.otp
381
+ }
382
+ }).onClose(async () => {
383
+ await n.getDevices();
384
+ });
385
+ }
386
+ async function G(m) {
387
+ try {
388
+ o.setKioskOrderSetting(m), await o.updateKioskSetting(), v.open({
389
+ title: e("order.kioskSettingSuccess"),
390
+ type: "success"
391
+ });
392
+ } catch {
393
+ v.open({
394
+ title: e("order.kioskSettingFailed"),
395
+ type: "error"
396
+ });
397
+ }
398
+ }
399
+ return ne(async () => {
400
+ var m;
401
+ (m = d.value) != null && m._id && (w.value = d.value._id, await S());
402
+ }), oe(
403
+ () => a.value.length,
404
+ async (m) => {
405
+ T.value === void 0 && a.value.length > 0 && await F(a.value[0]._id);
406
+ },
407
+ { immediate: !0 }
408
+ ), (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, {
412
+ title: c(e)("order.kiosk")
413
+ }, {
414
+ append: se(() => [
415
+ le(C(A, {
416
+ icon: "info",
417
+ variant: "tertiary",
418
+ onClick: Y
419
+ }, null, 512), [
420
+ [re, P.value]
421
+ ])
422
+ ]),
423
+ _: 1
424
+ }, 8, ["title"]),
425
+ l("div", Ze, [
426
+ l("div", ke, [
427
+ C(X, {
428
+ "model-value": r.value,
429
+ "onUpdate:modelValue": x[0] || (x[0] = (K) => r.value = K),
430
+ items: z.value
431
+ }, null, 8, ["model-value", "items"]),
432
+ l("div", et, [
433
+ l("div", tt, [
434
+ l("div", at, [
435
+ l("span", nt, u(c(e)("order.activateLocation")), 1),
436
+ l("span", ot, u(c(e)("order.selectRestaurant")) + ": ", 1),
437
+ C(Z, {
438
+ class: "w-1/2",
439
+ modelValue: T.value,
440
+ "onUpdate:modelValue": [
441
+ x[1] || (x[1] = (K) => T.value = K),
442
+ F
443
+ ],
444
+ items: H.value,
445
+ placeholder: c(e)("order.selectItem")
446
+ }, null, 8, ["modelValue", "items", "placeholder"])
447
+ ]),
448
+ r.value == "device" ? (i(), B(de, {
449
+ key: 0,
450
+ devices: q.value,
451
+ onRequestOtp: Q
452
+ }, null, 8, ["devices"])) : b("", !0),
453
+ r.value == "setting" ? (i(), B(c(s), {
454
+ key: `KioskSettingView-${w.value}`,
455
+ "restaurant-id": w.value,
456
+ onUpdateKioskOrderSetting: G,
457
+ form: c(o).state.kiosk ?? c(He)
458
+ }, null, 8, ["restaurant-id", "form"])) : b("", !0)
459
+ ])
460
+ ])
461
+ ]),
462
+ P.value ? b("", !0) : (i(), f("div", st, [
463
+ C(N, {
464
+ "restaurant-id": w.value,
465
+ devices: q.value,
466
+ "kiosk-order-setting": c(o).state.kiosk,
467
+ dialogType: !1
468
+ }, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
469
+ ]))
470
+ ])
471
+ ]);
472
+ };
473
+ }
474
+ });
475
+ export {
476
+ yt as default
477
+ };
@@ -1,13 +1,13 @@
1
1
  import { ref as Oe, computed as qe, defineComponent as ut, onMounted as Yt, onUnmounted as Qo, resolveComponent as je, createBlock as vt, openBlock as me, withCtx as Ke, createElementVNode as ue, createElementBlock as Ce, createCommentVNode as Ye, createVNode as se, toDisplayString as Te, unref as ae, isRef as Si, Fragment as et, renderList as wt, watch as kt, renderSlot as ys, reactive as ir, createTextVNode as er, normalizeClass as ji, withModifiers as vs, toRaw as Hi, normalizeStyle as ws, createSlots as ks, h as Xo, withKeys as _s, resolveDynamicComponent as Es } from "vue";
2
2
  import { useDialog as Zn, useSnackbar as Zo } from "@feedmepos/ui-library";
3
3
  import { useI18n as dt, useCoreStore as St } from "@feedmepos/mf-common";
4
- import { e as fr, d as Ut, f as Cs, h as Ha, g as Ge, i as Nr, l as at, j as qt, k as or, m as Ss, n as jn, o as Ka, O as Ki, p as Yi, q as Ji, r as Wi, s as js, t as Ya, u as As } from "./menu.dto-qVeqpSdz.js";
4
+ import { e as fr, f as Ut, h as Cs, i as Ha, j as Ge, k as Nr, l as at, c as qt, m as or, n as Ss, o as jn, p as Ka, O as Ki, q as Yi, r as Ji, s as Wi, t as js, u as Ya, v as As } from "./menu.dto-DFTxveX1.js";
5
5
  import { u as Lt, a as Jt, b as xs, _ as Fs } from "./index-BXsnV_eO.js";
6
- import { g as We, b as $r, S as bi, a as Ts, m as Qi, c as Ps, d as Vt, r as qr } from "./dayjs.min-dI_j30pv.js";
6
+ import { g as We, b as $r, S as bi, a as Ts, m as Qi, c as Ps, d as Vt, r as qr } from "./dayjs.min-B42nUieJ.js";
7
7
  import { defineStore as Ai } from "pinia";
8
8
  import { useRouter as qs } from "vue-router";
9
- import { c as xi, g as cr, a as Fi, b as Ds, d as yi, e as Ms } from "./app-CDTAjXj9.js";
10
- import { O as pr, s as Ja, a as Os } from "./index-B8U5Sawr.js";
9
+ import { c as xi, g as cr, a as Fi, b as Ds, d as yi, e as Ms } from "./app-JqOEacuf.js";
10
+ import { O as pr, s as Ja, a as Os } from "./index-B0teNm7_.js";
11
11
  const Is = {
12
12
  "Bill Receipt Number": (m) => m.seqNumber ?? "*8888",
13
13
  "Bill Receipt Total Amount (Net)": (m) => Cs.Dinero.fromFdoDinero(m.nettTotal).toFormat(!0),