@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.
- package/dist/{KioskDevicesView-u14hzPbE.js → KioskDevicesView-D_YT-CL0.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DBgRDIoS.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-Bxv6oiFw.js} +2 -2
- package/dist/KioskSettingView-DS5vEQ07.js +573 -0
- package/dist/{KioskView-M8V91gD5.js → KioskView-B8NHcyGz.js} +111 -108
- package/dist/{OrderSettingsView-Bl3LshG3.js → OrderSettingsView-BhEN-2ZZ.js} +2940 -2941
- package/dist/{app-CLewMjcd.js → app-BWFBpJUR.js} +20 -12
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-DCTYRWyD.js → dayjs.min-CD9R3x-Y.js} +1 -1
- package/dist/frontend/mf-order/src/app.d.ts +8 -0
- package/dist/frontend/mf-order/src/main.d.ts +8 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +2 -0
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +6 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-B7LtJeBJ.js → index-Bjwv8B4h.js} +2 -2
- package/dist/{menu.dto-Co7iXHNr.js → menu.dto-Wzm4Tz0i.js} +1577 -1572
- package/dist/package/entity/food-court/order.do.d.ts +26 -1
- package/dist/package/entity/food-court/order.dto.d.ts +0 -3
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +15 -0
- package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +18 -0
- package/dist/package/entity/order/order-item/order-item.dto.d.ts +30 -0
- package/dist/package/entity/order/order.do.d.ts +8 -0
- package/dist/package/entity/order/order.dto.d.ts +118 -0
- package/dist/package/entity/order-platform/external/menu/external-master-menu.do.d.ts +20 -0
- package/dist/package/entity/order-platform/external/menu/external-menu.do.d.ts +23 -0
- package/dist/package/entity/order-platform/menu.dto.d.ts +34 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +3 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +3 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +5 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +10 -0
- package/dist/package/entity/queue/queue.dto.d.ts +25 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +5 -0
- package/dist/package/entity/websocket/websocket.dto.d.ts +12 -0
- package/package.json +1 -1
- package/src/locales/en-US.json +3 -1
- package/src/locales/ja-JP.json +11 -9
- package/src/locales/th-TH.json +3 -1
- package/src/locales/zh-CN.json +3 -1
- package/src/modules/order-setting/kiosk/interface.ts +15 -13
- package/src/stores/order-setting/mapper.ts +16 -13
- package/src/views/kiosk/settings/KioskSettingView.vue +43 -23
- package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +3 -1
- package/dist/KioskSettingView-DmvtZcV1.js +0 -553
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as ce, _ as de } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { F as V, a as ie, b as pe } from "./menu.dto-
|
|
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
|
|
7
|
-
import { O as E, c as M } from "./index-
|
|
8
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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__ */
|
|
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 } =
|
|
44
|
+
const { t: e } = $(), s = t, r = h(() => {
|
|
45
45
|
var a;
|
|
46
|
-
return (a =
|
|
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 =
|
|
50
|
-
}),
|
|
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 =
|
|
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 =
|
|
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 =
|
|
60
|
-
|
|
61
|
-
}), a.length > 0 && Object.keys(
|
|
62
|
-
const
|
|
63
|
-
(
|
|
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:
|
|
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",
|
|
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, (
|
|
77
|
-
key:
|
|
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",
|
|
81
|
-
|
|
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:
|
|
85
|
-
}, u(
|
|
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",
|
|
91
|
-
l("div",
|
|
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") &&
|
|
94
|
-
l("span",
|
|
95
|
-
l("div",
|
|
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",
|
|
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__ */
|
|
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 } =
|
|
118
|
-
return (
|
|
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(
|
|
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
|
-
|
|
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
|
|
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: (
|
|
198
|
-
payAtCounter: ((
|
|
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
|
-
} :
|
|
201
|
+
} : O
|
|
201
202
|
},
|
|
202
203
|
paymentSetting: {
|
|
203
204
|
paymentTypes: ((y = t == null ? void 0 : t.paymentSetting) == null ? void 0 : y.paymentTypes) ?? [],
|
|
204
|
-
offlinePaymentTypes: ((
|
|
205
|
-
ePaymentTypes: ((
|
|
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
|
|
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 = (
|
|
229
|
-
paid: ((
|
|
230
|
-
} :
|
|
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
|
-
} :
|
|
244
|
+
} : O
|
|
243
245
|
} : L
|
|
244
246
|
};
|
|
245
|
-
},
|
|
247
|
+
}, Ge = (t) => {
|
|
246
248
|
const e = (n) => {
|
|
247
|
-
var
|
|
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: (
|
|
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
|
-
},
|
|
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:
|
|
297
|
+
kioskSettings: s(e(t.dineIn)),
|
|
295
298
|
kioskDineIn: t.dineIn.sequenceNumber
|
|
296
299
|
} : {
|
|
297
|
-
kioskSettings:
|
|
300
|
+
kioskSettings: s()
|
|
298
301
|
};
|
|
299
302
|
}, W = {
|
|
300
303
|
convertOrderSettingDto: Ye,
|
|
301
|
-
toOrderKioskSettingsDto:
|
|
302
|
-
},
|
|
304
|
+
toOrderKioskSettingsDto: Ge
|
|
305
|
+
}, Je = ve("orderSetting", () => {
|
|
303
306
|
const t = I({});
|
|
304
307
|
async function e() {
|
|
305
|
-
const
|
|
306
|
-
r(
|
|
308
|
+
const o = await E.getOrderSetting();
|
|
309
|
+
r(o);
|
|
307
310
|
}
|
|
308
|
-
async function
|
|
311
|
+
async function s() {
|
|
309
312
|
if (t.value.orderSetting && t.value.kiosk) {
|
|
310
|
-
const { _id:
|
|
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(
|
|
318
|
-
t.value.orderSetting =
|
|
320
|
+
function r(o) {
|
|
321
|
+
t.value.orderSetting = o, t.value.kiosk = W.convertOrderSettingDto(o).kiosk;
|
|
319
322
|
}
|
|
320
|
-
function n(
|
|
321
|
-
t.value.kiosk =
|
|
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:
|
|
329
|
+
updateKioskSetting: s,
|
|
327
330
|
setKioskOrderSetting: n
|
|
328
331
|
};
|
|
329
|
-
}),
|
|
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__ */
|
|
335
|
+
}, yt = /* @__PURE__ */ U({
|
|
333
336
|
__name: "KioskView",
|
|
334
337
|
setup(t) {
|
|
335
338
|
var R, D;
|
|
336
|
-
const { t: e } =
|
|
337
|
-
() => import("./KioskSettingView-
|
|
338
|
-
), r = I("device"), n = ce(),
|
|
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:
|
|
353
|
+
kioskOrderSetting: o.state.kiosk,
|
|
351
354
|
dialogType: !0
|
|
352
355
|
}
|
|
353
356
|
});
|
|
354
357
|
}
|
|
355
|
-
async function
|
|
358
|
+
async function F(m) {
|
|
356
359
|
const x = a.value.find((A) => A._id == m);
|
|
357
|
-
await y(x), await
|
|
360
|
+
await y(x), await S(), T.value = m, w.value = m;
|
|
358
361
|
}
|
|
359
|
-
async function
|
|
360
|
-
await
|
|
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
|
|
386
|
+
async function G(m) {
|
|
384
387
|
try {
|
|
385
|
-
|
|
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
|
-
|
|
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
|
|
399
|
-
}),
|
|
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
|
|
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 =
|
|
407
|
-
return i(), f("div",
|
|
408
|
-
|
|
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:
|
|
412
|
-
le(
|
|
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",
|
|
423
|
-
l("div",
|
|
424
|
-
|
|
425
|
+
l("div", Ze, [
|
|
426
|
+
l("div", ke, [
|
|
427
|
+
C(X, {
|
|
425
428
|
"model-value": r.value,
|
|
426
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
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",
|
|
434
|
-
|
|
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] = (
|
|
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(
|
|
453
|
+
r.value == "setting" ? (i(), B(c(s), {
|
|
451
454
|
key: `KioskSettingView-${w.value}`,
|
|
452
455
|
"restaurant-id": w.value,
|
|
453
|
-
onUpdateKioskOrderSetting:
|
|
454
|
-
form: c(
|
|
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",
|
|
460
|
-
|
|
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(
|
|
466
|
+
"kiosk-order-setting": c(o).state.kiosk,
|
|
464
467
|
dialogType: !1
|
|
465
468
|
}, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
|
|
466
469
|
]))
|