@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.
- package/.tsbuildinfo +1 -0
- package/dist/{KioskDevicesView-TIls1ag1.js → KioskDevicesView-Vy9FLX1n.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B2gjPfOJ.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-DhZPOEEQ.js} +2 -2
- package/dist/KioskSettingView-cE-JdCBB.js +551 -0
- package/dist/{KioskView-B0Jj2sOl.js → KioskView-BYs5bem0.js} +108 -111
- package/dist/OrderSettingsView-C4aEpC1j.js +56063 -0
- package/dist/{app-JqOEacuf.js → app-CwYXsqxX.js} +182 -26
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-B42nUieJ.js → dayjs.min-JEYIJz2D.js} +1 -1
- package/dist/frontend/mf-order/src/api/reservation/index.d.ts +8 -0
- package/dist/frontend/mf-order/src/app.d.ts +164 -8
- package/dist/frontend/mf-order/src/main.d.ts +164 -8
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +0 -2
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +0 -6
- package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +3 -3
- package/dist/frontend/mf-order/src/views/all-orders/ReflowOrder.vue.d.ts +2 -2
- package/dist/frontend/mf-order/src/views/order-settings/delivery/inhouse/InHouseDelivery.vue.d.ts +2 -2
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CopySettingsSheet.vue.d.ts +186 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomSelect.vue.d.ts +15 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomTimePicker.vue.d.ts +10 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/ReservationSetting.vue.d.ts +2 -0
- package/dist/{index-B0teNm7_.js → index-DZCjODMx.js} +2 -2
- package/dist/{menu.dto-DFTxveX1.js → menu.dto-D9CDVLiP.js} +22865 -20037
- package/dist/package/entity/food-court/order.do.d.ts +47 -2
- 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 +12341 -1
- package/dist/package/entity/incoming-order/incoming-order.do.d.ts +3 -22266
- package/dist/package/entity/index.d.ts +5 -0
- package/dist/package/entity/kiosk/marketing/marketing.dto.d.ts +1 -19864
- package/dist/package/entity/order/order-item/order-item.dto.d.ts +1 -3721
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +0 -3
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +0 -3
- package/dist/package/entity/order-setting/order-setting.do.d.ts +861 -5
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +0 -10
- package/dist/package/entity/order-setting/reservationV2/reservation.do.d.ts +1269 -0
- package/dist/package/entity/queue/queue.do.d.ts +1 -11
- package/dist/package/entity/reservation/reservation.do.d.ts +101 -0
- package/dist/package/entity/reservation/reservation.dto.d.ts +325 -0
- package/dist/package/entity/reservation/reservation.enum.d.ts +3 -0
- package/dist/package/entity/reservation/reservation.utils.d.ts +152 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +0 -5
- package/dist/package/entity/websocket/websocket.dto.d.ts +0 -12
- package/dist/style.css +1 -0
- package/package.json +3 -3
- package/src/api/reservation/index.ts +28 -0
- package/src/assets/images/not-found.png +0 -0
- package/src/locales/en-US.json +57 -3
- package/src/locales/ja-JP.json +9 -11
- package/src/locales/th-TH.json +55 -3
- package/src/locales/zh-CN.json +55 -3
- package/src/main.ts +7 -5
- package/src/modules/order-setting/kiosk/interface.ts +13 -15
- package/src/stores/order-setting/mapper.ts +41 -44
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -19
- package/src/views/kiosk/settings/KioskSettingView.vue +23 -43
- package/src/views/order-settings/OrderSettingsView.vue +7 -2
- package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +3 -1
- package/src/views/order-settings/drive-thru/DriveThruSetting.vue +13 -28
- package/src/views/order-settings/reservation/CopySettingsSheet.vue +238 -0
- package/src/views/order-settings/reservation/CustomSelect.vue +99 -0
- package/src/views/order-settings/reservation/CustomTimePicker.vue +201 -0
- package/src/views/order-settings/reservation/ReservationSetting.vue +1246 -0
- package/src/views/order-settings/servicecharge/ServiceChargeRule.vue +5 -1
- package/tsconfig.app.json +8 -6
- package/dist/KioskSettingView-UPE-q-Zd.js +0 -573
- package/dist/OrderSettingsView-Ca4y2PNF.js +0 -51603
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +0 -1
|
@@ -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 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
|
|
7
|
-
import { O as E, c as M } from "./index-
|
|
8
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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__ */
|
|
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 } =
|
|
44
|
+
const { t: e } = U(), o = t, r = h(() => {
|
|
45
45
|
var a;
|
|
46
|
-
return (a =
|
|
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 =
|
|
50
|
-
}),
|
|
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 =
|
|
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 =
|
|
55
|
+
return ((a = o.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
|
|
56
56
|
}), d = h(() => {
|
|
57
|
-
var y,
|
|
57
|
+
var y, _;
|
|
58
58
|
const a = [];
|
|
59
|
-
if ((y =
|
|
60
|
-
|
|
61
|
-
}), a.length > 0 && Object.keys(
|
|
62
|
-
const
|
|
63
|
-
(
|
|
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:
|
|
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",
|
|
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, (
|
|
77
|
-
key:
|
|
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",
|
|
81
|
-
|
|
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:
|
|
85
|
-
}, u(
|
|
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",
|
|
91
|
-
l("div",
|
|
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") &&
|
|
94
|
-
l("span",
|
|
95
|
-
l("div",
|
|
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",
|
|
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__ */
|
|
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 (
|
|
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(
|
|
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
|
-
|
|
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
|
|
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: (
|
|
199
|
-
payAtCounter: ((
|
|
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
|
-
} :
|
|
200
|
+
} : K
|
|
202
201
|
},
|
|
203
202
|
paymentSetting: {
|
|
204
203
|
paymentTypes: ((y = t == null ? void 0 : t.paymentSetting) == null ? void 0 : y.paymentTypes) ?? [],
|
|
205
|
-
offlinePaymentTypes: ((
|
|
206
|
-
ePaymentTypes: ((
|
|
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
|
|
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 = (
|
|
231
|
-
paid: ((
|
|
232
|
-
} :
|
|
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
|
-
} :
|
|
242
|
+
} : K
|
|
245
243
|
} : L
|
|
246
244
|
};
|
|
247
|
-
},
|
|
245
|
+
}, ke = (t) => {
|
|
248
246
|
const e = (n) => {
|
|
249
|
-
var
|
|
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: (
|
|
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
|
-
},
|
|
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:
|
|
294
|
+
kioskSettings: o(e(t.dineIn)),
|
|
298
295
|
kioskDineIn: t.dineIn.sequenceNumber
|
|
299
296
|
} : {
|
|
300
|
-
kioskSettings:
|
|
297
|
+
kioskSettings: o()
|
|
301
298
|
};
|
|
302
299
|
}, W = {
|
|
303
300
|
convertOrderSettingDto: Ye,
|
|
304
|
-
toOrderKioskSettingsDto:
|
|
305
|
-
},
|
|
301
|
+
toOrderKioskSettingsDto: ke
|
|
302
|
+
}, Ge = _e("orderSetting", () => {
|
|
306
303
|
const t = I({});
|
|
307
304
|
async function e() {
|
|
308
|
-
const
|
|
309
|
-
r(
|
|
305
|
+
const s = await E.getOrderSetting();
|
|
306
|
+
r(s);
|
|
310
307
|
}
|
|
311
|
-
async function
|
|
308
|
+
async function o() {
|
|
312
309
|
if (t.value.orderSetting && t.value.kiosk) {
|
|
313
|
-
const { _id:
|
|
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(
|
|
321
|
-
t.value.orderSetting =
|
|
317
|
+
function r(s) {
|
|
318
|
+
t.value.orderSetting = s, t.value.kiosk = W.convertOrderSettingDto(s).kiosk;
|
|
322
319
|
}
|
|
323
|
-
function n(
|
|
324
|
-
t.value.kiosk =
|
|
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:
|
|
326
|
+
updateKioskSetting: o,
|
|
330
327
|
setKioskOrderSetting: n
|
|
331
328
|
};
|
|
332
|
-
}),
|
|
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__ */
|
|
332
|
+
}, yt = /* @__PURE__ */ S({
|
|
336
333
|
__name: "KioskView",
|
|
337
334
|
setup(t) {
|
|
338
335
|
var R, D;
|
|
339
|
-
const { t: e } =
|
|
340
|
-
() => import("./KioskSettingView-
|
|
341
|
-
), r = I("device"), n = ce(),
|
|
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:
|
|
350
|
+
kioskOrderSetting: s.state.kiosk,
|
|
354
351
|
dialogType: !0
|
|
355
352
|
}
|
|
356
353
|
});
|
|
357
354
|
}
|
|
358
|
-
async function
|
|
355
|
+
async function $(m) {
|
|
359
356
|
const x = a.value.find((A) => A._id == m);
|
|
360
|
-
await y(x), await
|
|
357
|
+
await y(x), await F(), T.value = m, w.value = m;
|
|
361
358
|
}
|
|
362
|
-
async function
|
|
363
|
-
await
|
|
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
|
|
383
|
+
async function k(m) {
|
|
387
384
|
try {
|
|
388
|
-
|
|
385
|
+
s.setKioskOrderSetting(m), await s.updateKioskSetting(), _.open({
|
|
389
386
|
title: e("order.kioskSettingSuccess"),
|
|
390
387
|
type: "success"
|
|
391
388
|
});
|
|
392
389
|
} catch {
|
|
393
|
-
|
|
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
|
|
402
|
-
}),
|
|
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
|
|
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 =
|
|
410
|
-
return i(), f("div",
|
|
411
|
-
|
|
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:
|
|
415
|
-
le(
|
|
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",
|
|
426
|
-
l("div",
|
|
427
|
-
|
|
422
|
+
l("div", Xe, [
|
|
423
|
+
l("div", Ze, [
|
|
424
|
+
g(J, {
|
|
428
425
|
"model-value": r.value,
|
|
429
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
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",
|
|
437
|
-
|
|
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] = (
|
|
442
|
-
|
|
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(
|
|
450
|
+
r.value == "setting" ? (i(), B(c(o), {
|
|
454
451
|
key: `KioskSettingView-${w.value}`,
|
|
455
452
|
"restaurant-id": w.value,
|
|
456
|
-
onUpdateKioskOrderSetting:
|
|
457
|
-
form: c(
|
|
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",
|
|
463
|
-
|
|
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(
|
|
463
|
+
"kiosk-order-setting": c(s).state.kiosk,
|
|
467
464
|
dialogType: !1
|
|
468
465
|
}, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
|
|
469
466
|
]))
|