@feedmepos/mf-order-setting 0.0.56-dev.1 → 0.0.56-dev.2
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 -1
- package/dist/{KioskDevicesView-CccsAZqK.js → KioskDevicesView-Qv-xd_kZ.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-dF1jgi53.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-CCF1mKni.js} +2 -2
- package/dist/KioskSettingView-CvvrK6Bv.js +643 -0
- package/dist/{KioskView-DmaCjLcw.js → KioskView-CppTVBv-.js} +117 -117
- package/dist/OrderSettingsView-C38N61dM.js +36564 -0
- package/dist/{app-EGmxrjDM.js → app-Bss1GkKY.js} +4 -4
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-lCwCAXUZ.js → dayjs.min-DZfxGUk4.js} +1 -1
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +3 -0
- package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +1 -1
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPaymentTypeSection.vue.d.ts +13 -3
- package/dist/frontend/mf-order/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue.d.ts +12 -4
- package/dist/frontend/mf-order/src/views/order-settings/dine-in/OfflinePaymentTypeDialog.vue.d.ts +4 -4
- package/dist/frontend/mf-order/src/views/order-settings/dine-in/PaymentType.vue.d.ts +38 -4
- package/dist/frontend/mf-order/src/views/order-settings/pickup/PaymentSidesheet.vue.d.ts +1 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomTimePicker.vue.d.ts +1 -0
- package/dist/{index-CWrX79Jg.js → index-B6AGCsrw.js} +6 -6
- package/dist/index-BpKR-Cxd.js +19757 -0
- package/dist/{menu.dto-CgymySda.js → menu.dto-C_B3M2fs.js} +44222 -46755
- package/dist/package/entity/incoming-order/incoming-order.do.d.ts +22443 -3
- package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +3 -3
- package/dist/package/entity/incoming-order/incoming-order.enum.d.ts +1 -1
- package/dist/package/entity/index.d.ts +1 -0
- package/dist/package/entity/marketing/marketing.dto.d.ts +1 -1
- package/dist/package/entity/order/dine-in/qr.dto.d.ts +38 -0
- package/dist/package/entity/order/order.do.d.ts +6358 -2
- package/dist/package/entity/order/order.dto.d.ts +22 -0
- package/dist/package/entity/order-platform/deliveroo/deliveroo-dto.d.ts +3 -0
- package/dist/package/entity/order-platform/deliveroo/deliveroo-setting.do.d.ts +3 -0
- package/dist/package/entity/order-platform/external/order/external-order.do.d.ts +12 -12
- package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +32 -32
- package/dist/package/entity/order-platform/external/setting/external-setting.do.d.ts +21 -3
- package/dist/package/entity/order-platform/external/setting/external-setting.dto.d.ts +12 -2
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.do.d.ts +3 -0
- package/dist/package/entity/order-platform/foodpanda/foodpanda-settings.dto.d.ts +3 -0
- package/dist/package/entity/order-platform/grabfood/grabfood-edit-order.do.d.ts +9 -1
- package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +2 -2
- package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +3 -3
- package/dist/package/entity/order-platform/order-platform.dto.d.ts +2 -2
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.do.d.ts +3 -0
- package/dist/package/entity/order-platform/shopeefood/shopeefood-settings.dto.d.ts +3 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +3 -0
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +6 -0
- package/dist/package/entity/queue/queue.do.d.ts +3 -8
- package/dist/package/entity/queue/queue.dto.d.ts +10 -0
- package/dist/package/entity/reservation/reservation.do.d.ts +4 -0
- package/dist/package/entity/reservation/reservation.dto.d.ts +10 -0
- package/dist/package/entity/reservation/reservation.utils.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/views/kiosk/KioskSummary.vue +3 -0
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +99 -211
- package/src/views/kiosk/settings/KioskSettingView.vue +27 -11
- package/src/views/order-settings/dine-in/DineInSetting.vue +1 -0
- package/src/views/order-settings/dine-in/OfflinePaymentTypeDialog.vue +2 -3
- package/src/views/order-settings/dine-in/PaymentType.vue +151 -43
- package/src/views/order-settings/pickup/PaymentSidesheet.vue +33 -172
- package/src/views/order-settings/pickup/PickUpSettingDialogContent.vue +1 -0
- package/src/views/order-settings/reservation/CustomTimePicker.vue +129 -49
- package/src/views/order-settings/reservation/ReservationSetting.vue +547 -303
- package/dist/KioskSettingView-8GY7AT-N.js +0 -722
- package/dist/OrderSettingsView-BZcU4t9L.js +0 -56240
- package/dist/index-BXsnV_eO.js +0 -150
|
@@ -1,10 +1,10 @@
|
|
|
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
|
|
1
|
+
import { defineComponent as F, computed as h, createElementBlock as f, openBlock as p, normalizeClass as k, createCommentVNode as b, createElementVNode as l, toDisplayString as u, unref as c, Fragment as ee, renderList as te, ref as C, defineAsyncComponent as ae, onMounted as ne, watch as oe, resolveComponent as g, createVNode as I, withCtx as se, withDirectives as le, vShow as re, createBlock as E } from "vue";
|
|
2
|
+
import { u as ce, _ as de } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-CCF1mKni.js";
|
|
3
|
+
import { useI18n as O, useCoreStore as ue } from "@feedmepos/mf-common";
|
|
4
|
+
import { F as U, a as pe, b as ie } from "./menu.dto-C_B3M2fs.js";
|
|
5
5
|
import { useDialog as me, useSnackbar as ye, useBreakpoints as fe } from "@feedmepos/ui-library";
|
|
6
6
|
import { defineStore as ve } from "pinia";
|
|
7
|
-
import { O as L, c as S } from "./index-
|
|
7
|
+
import { O as L, c as S } from "./index-B6AGCsrw.js";
|
|
8
8
|
const _e = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "fm-typo-en-title-sm-600"
|
|
@@ -32,7 +32,7 @@ const _e = {
|
|
|
32
32
|
}, Re = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, De = { class: "fm-typo-en-body-lg-600" }, Be = {
|
|
33
33
|
key: 3,
|
|
34
34
|
class: "flex flex-col gap-1"
|
|
35
|
-
}, Ve = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ee = { class: "fm-typo-en-body-lg-600" }, Le = { key: 0 }, M = /* @__PURE__ */
|
|
35
|
+
}, Ve = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ee = { class: "fm-typo-en-body-lg-600" }, Le = { key: 0 }, M = /* @__PURE__ */ F({
|
|
36
36
|
__name: "KioskSummary",
|
|
37
37
|
props: {
|
|
38
38
|
restaurantId: {},
|
|
@@ -40,38 +40,38 @@ const _e = {
|
|
|
40
40
|
kioskOrderSetting: {},
|
|
41
41
|
dialogType: { type: Boolean }
|
|
42
42
|
},
|
|
43
|
-
setup(
|
|
44
|
-
const { t } =
|
|
43
|
+
setup(t) {
|
|
44
|
+
const { t: e } = O(), s = t, r = h(() => {
|
|
45
45
|
var a;
|
|
46
|
-
return (a = s.kioskOrderSetting) != null && a.dineIn.enabled ?
|
|
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 = s.kioskOrderSetting) != null && a.takeaway.enabled ?
|
|
49
|
+
return (a = s.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
|
|
50
50
|
}), o = h(() => {
|
|
51
51
|
var a, m;
|
|
52
|
-
return (a = s.kioskOrderSetting) != null && a.dineIn.displayStand ?
|
|
52
|
+
return (a = s.kioskOrderSetting) != null && a.dineIn.displayStand ? e("order.tableService") : (m = s.kioskOrderSetting) != null && m.dineIn && !s.kioskOrderSetting.dineIn.displayStand ? e("order.pickAtCounter") : e("order.unknown");
|
|
53
53
|
}), i = h(() => {
|
|
54
54
|
var a;
|
|
55
|
-
return ((a = s.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(
|
|
55
|
+
return ((a = s.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(U.enum.cash)) ?? !1;
|
|
56
56
|
}), d = h(() => {
|
|
57
57
|
var m, v;
|
|
58
58
|
const a = [];
|
|
59
59
|
if ((m = s.kioskOrderSetting) == null || m.paymentSetting.paymentTypes.forEach((_) => {
|
|
60
|
-
_ ===
|
|
60
|
+
_ === U.enum.ePayment && a.push(e("order.ePayment")), _ == U.enum.credit && a.push(e("order.credit"));
|
|
61
61
|
}), a.length > 0 && Object.keys(s.kioskOrderSetting.paymentSetting.ePaymentTypes).length !== 0) {
|
|
62
62
|
const _ = (v = s.kioskOrderSetting) == null ? void 0 : v.paymentSetting.ePaymentTypes;
|
|
63
|
-
(_.card.terminal || _.card.nfc) && a.push(
|
|
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, m) => (p(), f("div", {
|
|
68
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) : (p(), f("span", _e, u(c(
|
|
70
|
+
a.dialogType ? b("", !0) : (p(), f("span", _e, u(c(e)("order.kioskSummary")), 1)),
|
|
71
71
|
a.dialogType ? b("", !0) : (p(), f("hr", be)),
|
|
72
72
|
l("div", he, [
|
|
73
73
|
l("div", xe, [
|
|
74
|
-
l("span", Pe, u(c(
|
|
74
|
+
l("span", Pe, u(c(e)("order.kioskDisplay")), 1),
|
|
75
75
|
a.devices.length > 0 ? (p(), f("div", we, [
|
|
76
76
|
(p(!0), f(ee, null, te(a.devices, (v) => (p(), f("div", {
|
|
77
77
|
key: v.machineId,
|
|
@@ -86,37 +86,37 @@ const _e = {
|
|
|
86
86
|
]))), 128))
|
|
87
87
|
])) : (p(), f("div", Ce, "-"))
|
|
88
88
|
]),
|
|
89
|
-
r.value === c(
|
|
90
|
-
l("span", Ke, u(c(
|
|
89
|
+
r.value === c(e)("order.activated") ? (p(), f("div", Ae, [
|
|
90
|
+
l("span", Ke, u(c(e)("order.dineIn")), 1),
|
|
91
91
|
l("div", Ue, u(r.value), 1)
|
|
92
92
|
])) : b("", !0),
|
|
93
|
-
r.value === c(
|
|
94
|
-
l("span", Fe, u(c(
|
|
93
|
+
r.value === c(e)("order.activated") && o.value !== c(e)("order.unknown") ? (p(), f("div", $e, [
|
|
94
|
+
l("span", Fe, u(c(e)("order.dineInType")), 1),
|
|
95
95
|
l("div", Oe, u(o.value), 1)
|
|
96
96
|
])) : b("", !0),
|
|
97
|
-
n.value === c(
|
|
98
|
-
l("span", Re, u(c(
|
|
97
|
+
n.value === c(e)("order.activated") ? (p(), f("div", qe, [
|
|
98
|
+
l("span", Re, u(c(e)("order.takeaway")), 1),
|
|
99
99
|
l("div", De, u(n.value), 1)
|
|
100
100
|
])) : b("", !0),
|
|
101
101
|
d.value || i.value ? (p(), f("div", Be, [
|
|
102
|
-
l("span", Ve, u(c(
|
|
102
|
+
l("span", Ve, u(c(e)("order.acceptedPayment")), 1),
|
|
103
103
|
l("div", Ee, [
|
|
104
|
-
i.value ? (p(), f("div", Le, u(c(
|
|
104
|
+
i.value ? (p(), f("div", Le, u(c(e)("order.offlinePayment")), 1)) : b("", !0),
|
|
105
105
|
l("div", null, u(d.value), 1)
|
|
106
106
|
])
|
|
107
107
|
])) : b("", !0)
|
|
108
108
|
])
|
|
109
109
|
], 2));
|
|
110
110
|
}
|
|
111
|
-
}), Se = { class: "flex flex-col gap-5 pb-6" }, Me = { class: "fm-typo-en-body-md-400 block" }, Ne = { class: "fm-typo-en-title-md-600" }, We = /* @__PURE__ */
|
|
111
|
+
}), Se = { class: "flex flex-col gap-5 pb-6" }, Me = { class: "fm-typo-en-body-md-400 block" }, Ne = { class: "fm-typo-en-title-md-600" }, We = /* @__PURE__ */ F({
|
|
112
112
|
__name: "KioskOtpDialog",
|
|
113
113
|
props: {
|
|
114
114
|
otp: {}
|
|
115
115
|
},
|
|
116
|
-
setup(
|
|
117
|
-
const { t } =
|
|
116
|
+
setup(t) {
|
|
117
|
+
const { t: e } = O();
|
|
118
118
|
return (s, r) => (p(), f("div", Se, [
|
|
119
|
-
l("span", Me, u(c(
|
|
119
|
+
l("span", Me, u(c(e)("order.bindDeviceMessage")), 1),
|
|
120
120
|
l("div", Ne, u(s.otp), 1)
|
|
121
121
|
]));
|
|
122
122
|
}
|
|
@@ -176,35 +176,35 @@ const _e = {
|
|
|
176
176
|
},
|
|
177
177
|
coverImageLandscape: null,
|
|
178
178
|
coverImagePortrait: null
|
|
179
|
-
},
|
|
179
|
+
}, $ = {
|
|
180
180
|
payAtCounter: null,
|
|
181
181
|
paid: null
|
|
182
|
-
}, Ye = (
|
|
183
|
-
var
|
|
182
|
+
}, Ye = (t) => {
|
|
183
|
+
var e;
|
|
184
184
|
return {
|
|
185
|
-
kiosk: ze(
|
|
185
|
+
kiosk: ze(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
|
|
186
186
|
};
|
|
187
|
-
}, ze = (
|
|
187
|
+
}, ze = (t, e) => {
|
|
188
188
|
var s, r, n, o, i, d, a, m, v, _, P;
|
|
189
189
|
return {
|
|
190
190
|
dineIn: Qe(
|
|
191
|
-
|
|
191
|
+
e ?? {
|
|
192
192
|
current: 0,
|
|
193
193
|
prefix: "#K"
|
|
194
194
|
},
|
|
195
|
-
(
|
|
195
|
+
(t == null ? void 0 : t.dineIn) ?? void 0
|
|
196
196
|
),
|
|
197
197
|
takeaway: {
|
|
198
|
-
enabled: (
|
|
199
|
-
submitOrderInstruction: (s =
|
|
200
|
-
payAtCounter: ((o = (n = (r =
|
|
201
|
-
paid: ((a = (d = (i =
|
|
202
|
-
} :
|
|
198
|
+
enabled: (t == null ? void 0 : t.canTakeaway) ?? !1,
|
|
199
|
+
submitOrderInstruction: (s = t == null ? void 0 : t.takeaway) != null && s.submitOrderInstruction ? {
|
|
200
|
+
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,
|
|
201
|
+
paid: ((a = (d = (i = t == null ? void 0 : t.takeaway) == null ? void 0 : i.submitOrderInstruction) == null ? void 0 : d.paid) == null ? void 0 : a.en) ?? null
|
|
202
|
+
} : $
|
|
203
203
|
},
|
|
204
204
|
paymentSetting: {
|
|
205
|
-
paymentTypes: ((m =
|
|
206
|
-
offlinePaymentTypes: ((v =
|
|
207
|
-
ePaymentTypes: ((_ =
|
|
205
|
+
paymentTypes: ((m = t == null ? void 0 : t.paymentSetting) == null ? void 0 : m.paymentTypes) ?? [],
|
|
206
|
+
offlinePaymentTypes: ((v = t == null ? void 0 : t.paymentSetting) == null ? void 0 : v.offlinePaymentTypes) ?? [],
|
|
207
|
+
ePaymentTypes: ((_ = t == null ? void 0 : t.paymentSetting) == null ? void 0 : _.ePaymentTypes) ?? ie.parse({
|
|
208
208
|
card: {
|
|
209
209
|
terminal: !1,
|
|
210
210
|
nfc: !1
|
|
@@ -216,38 +216,38 @@ const _e = {
|
|
|
216
216
|
})
|
|
217
217
|
},
|
|
218
218
|
menuItem: {
|
|
219
|
-
showAllOnly: ((P =
|
|
219
|
+
showAllOnly: ((P = t == null ? void 0 : t.menuItem) == null ? void 0 : P.showAllOnly) ?? !1
|
|
220
220
|
},
|
|
221
|
-
coverImageLandscape: (
|
|
222
|
-
coverImagePortrait: (
|
|
221
|
+
coverImageLandscape: (t == null ? void 0 : t.coverImageLandscape) ?? null,
|
|
222
|
+
coverImagePortrait: (t == null ? void 0 : t.coverImagePortrait) ?? null
|
|
223
223
|
};
|
|
224
|
-
}, Qe = (
|
|
224
|
+
}, Qe = (t, e) => {
|
|
225
225
|
var s, r, n, o, i, d, a, m;
|
|
226
226
|
return {
|
|
227
|
-
enabled: !!
|
|
228
|
-
sequenceNumber:
|
|
229
|
-
pickUp:
|
|
230
|
-
...
|
|
231
|
-
submitOrderInstruction:
|
|
232
|
-
payAtCounter: ((r = (s =
|
|
233
|
-
paid: ((o = (n =
|
|
234
|
-
} :
|
|
235
|
-
enablePaxDialog:
|
|
227
|
+
enabled: !!e,
|
|
228
|
+
sequenceNumber: t,
|
|
229
|
+
pickUp: e != null && e.pickUp ? {
|
|
230
|
+
...e.pickUp,
|
|
231
|
+
submitOrderInstruction: e.pickUp.submitOrderInstruction ? {
|
|
232
|
+
payAtCounter: ((r = (s = e.pickUp.submitOrderInstruction) == null ? void 0 : s.payAtCounter) == null ? void 0 : r.en) ?? null,
|
|
233
|
+
paid: ((o = (n = e.pickUp.submitOrderInstruction) == null ? void 0 : n.paid) == null ? void 0 : o.en) ?? null
|
|
234
|
+
} : $,
|
|
235
|
+
enablePaxDialog: e.pickUp.enablePaxDialog ? e.pickUp.enablePaxDialog : !1
|
|
236
236
|
} : j,
|
|
237
|
-
displayStand:
|
|
238
|
-
enabled:
|
|
239
|
-
standSlotRange:
|
|
240
|
-
prefix:
|
|
241
|
-
padDigit:
|
|
242
|
-
enablePaxDialog:
|
|
243
|
-
submitOrderInstruction:
|
|
244
|
-
payAtCounter: ((d = (i =
|
|
245
|
-
paid: ((m = (a =
|
|
246
|
-
} :
|
|
237
|
+
displayStand: e != null && e.displayStand ? {
|
|
238
|
+
enabled: e.displayStand.enabled,
|
|
239
|
+
standSlotRange: e.displayStand.standSlotRange,
|
|
240
|
+
prefix: e.displayStand.prefix,
|
|
241
|
+
padDigit: e.displayStand.padDigit,
|
|
242
|
+
enablePaxDialog: e.displayStand.enablePaxDialog ?? !1,
|
|
243
|
+
submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
|
|
244
|
+
payAtCounter: ((d = (i = e.displayStand.submitOrderInstruction) == null ? void 0 : i.payAtCounter) == null ? void 0 : d.en) ?? null,
|
|
245
|
+
paid: ((m = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : m.en) ?? null
|
|
246
|
+
} : $
|
|
247
247
|
} : W
|
|
248
248
|
};
|
|
249
|
-
}, Ge = (
|
|
250
|
-
const
|
|
249
|
+
}, Ge = (t) => {
|
|
250
|
+
const e = (n) => {
|
|
251
251
|
var o, i, d, a;
|
|
252
252
|
return {
|
|
253
253
|
requiredSlot: !!n.displayStand,
|
|
@@ -275,19 +275,19 @@ const _e = {
|
|
|
275
275
|
}
|
|
276
276
|
};
|
|
277
277
|
}, s = (n) => ({
|
|
278
|
-
canTakeaway:
|
|
278
|
+
canTakeaway: t.takeaway.enabled,
|
|
279
279
|
dineIn: n,
|
|
280
|
-
menuItem:
|
|
281
|
-
coverImageLandscape:
|
|
282
|
-
coverImagePortrait:
|
|
283
|
-
paymentSetting: r(
|
|
284
|
-
takeaway:
|
|
280
|
+
menuItem: t.menuItem,
|
|
281
|
+
coverImageLandscape: t.coverImageLandscape,
|
|
282
|
+
coverImagePortrait: t.coverImagePortrait,
|
|
283
|
+
paymentSetting: r(t.paymentSetting),
|
|
284
|
+
takeaway: t.takeaway.submitOrderInstruction ? {
|
|
285
285
|
submitOrderInstruction: {
|
|
286
|
-
payAtCounter:
|
|
287
|
-
en:
|
|
286
|
+
payAtCounter: t.takeaway.submitOrderInstruction.payAtCounter ? {
|
|
287
|
+
en: t.takeaway.submitOrderInstruction.payAtCounter
|
|
288
288
|
} : null,
|
|
289
|
-
paid:
|
|
290
|
-
en:
|
|
289
|
+
paid: t.takeaway.submitOrderInstruction.paid ? {
|
|
290
|
+
en: t.takeaway.submitOrderInstruction.paid
|
|
291
291
|
} : null
|
|
292
292
|
}
|
|
293
293
|
} : void 0
|
|
@@ -296,9 +296,9 @@ const _e = {
|
|
|
296
296
|
offlinePaymentTypes: n.offlinePaymentTypes,
|
|
297
297
|
ePaymentTypes: n.ePaymentTypes
|
|
298
298
|
});
|
|
299
|
-
return
|
|
300
|
-
kioskSettings: s(t
|
|
301
|
-
kioskDineIn:
|
|
299
|
+
return t.dineIn.enabled ? {
|
|
300
|
+
kioskSettings: s(e(t.dineIn)),
|
|
301
|
+
kioskDineIn: t.dineIn.sequenceNumber
|
|
302
302
|
} : {
|
|
303
303
|
kioskSettings: s()
|
|
304
304
|
};
|
|
@@ -306,14 +306,14 @@ const _e = {
|
|
|
306
306
|
convertOrderSettingDto: Ye,
|
|
307
307
|
toOrderKioskSettingsDto: Ge
|
|
308
308
|
}, Je = ve("orderSetting", () => {
|
|
309
|
-
const
|
|
310
|
-
async function
|
|
309
|
+
const t = C({});
|
|
310
|
+
async function e() {
|
|
311
311
|
const o = await L.getOrderSetting();
|
|
312
312
|
r(o);
|
|
313
313
|
}
|
|
314
314
|
async function s() {
|
|
315
|
-
if (
|
|
316
|
-
const { _id: o, ...i } =
|
|
315
|
+
if (t.value.orderSetting && t.value.kiosk) {
|
|
316
|
+
const { _id: o, ...i } = t.value.orderSetting, d = N.toOrderKioskSettingsDto(t.value.kiosk), a = {
|
|
317
317
|
...i,
|
|
318
318
|
kioskSettings: d.kioskSettings
|
|
319
319
|
}, m = await L.updateOrderSetting(a);
|
|
@@ -321,34 +321,34 @@ const _e = {
|
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
function r(o) {
|
|
324
|
-
|
|
324
|
+
t.value.orderSetting = o, t.value.kiosk = N.convertOrderSettingDto(o).kiosk;
|
|
325
325
|
}
|
|
326
326
|
function n(o) {
|
|
327
|
-
|
|
327
|
+
t.value.kiosk = o;
|
|
328
328
|
}
|
|
329
329
|
return {
|
|
330
|
-
state:
|
|
331
|
-
getSetting:
|
|
330
|
+
state: t.value,
|
|
331
|
+
getSetting: e,
|
|
332
332
|
updateKioskSetting: s,
|
|
333
333
|
setKioskOrderSetting: n
|
|
334
334
|
};
|
|
335
335
|
}), 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 = {
|
|
336
336
|
key: 0,
|
|
337
337
|
class: "flex-[1_1_0%]"
|
|
338
|
-
}, mt = /* @__PURE__ */
|
|
338
|
+
}, mt = /* @__PURE__ */ F({
|
|
339
339
|
__name: "KioskView",
|
|
340
|
-
setup(
|
|
341
|
-
var
|
|
342
|
-
const { t } =
|
|
343
|
-
() => import("./KioskSettingView-
|
|
344
|
-
), r = C("device"), n = ce(), o = Je(), i = me(), { currentRestaurant: d, restaurants: a, changeRestaurant: m } = ue(), v = ye(), _ = fe(), P = h(() => _.breakpoints.value.xs), T = C(((
|
|
340
|
+
setup(t) {
|
|
341
|
+
var B, V;
|
|
342
|
+
const { t: e } = O(), s = ae(
|
|
343
|
+
() => import("./KioskSettingView-CvvrK6Bv.js")
|
|
344
|
+
), r = C("device"), n = ce(), o = Je(), i = me(), { currentRestaurant: d, restaurants: a, changeRestaurant: m } = ue(), v = ye(), _ = fe(), P = h(() => _.breakpoints.value.xs), T = C(((B = d.value) == null ? void 0 : B._id) ?? void 0), H = h(() => a.value.map((y) => ({
|
|
345
345
|
label: y.profile.name,
|
|
346
346
|
value: y._id
|
|
347
|
-
}))), w = C(((
|
|
347
|
+
}))), w = C(((V = d.value) == null ? void 0 : V._id) ?? "");
|
|
348
348
|
function Y() {
|
|
349
349
|
var y;
|
|
350
350
|
i.open({
|
|
351
|
-
title: S(
|
|
351
|
+
title: S(e("order.kioskSummary")),
|
|
352
352
|
contentComponent: M,
|
|
353
353
|
contentComponentProps: {
|
|
354
354
|
restaurantId: (y = d.value) == null ? void 0 : y._id,
|
|
@@ -358,26 +358,26 @@ const _e = {
|
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
}
|
|
361
|
-
async function
|
|
361
|
+
async function q(y) {
|
|
362
362
|
const x = a.value.find((A) => A._id == y);
|
|
363
|
-
await m(x), await
|
|
363
|
+
await m(x), await R(), T.value = y, w.value = y;
|
|
364
364
|
}
|
|
365
|
-
async function
|
|
365
|
+
async function R() {
|
|
366
366
|
await o.getSetting(), await n.getDevices();
|
|
367
367
|
}
|
|
368
368
|
const z = h(() => [
|
|
369
369
|
{
|
|
370
|
-
label:
|
|
370
|
+
label: e("order.deviceBinding"),
|
|
371
371
|
value: "device"
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
|
-
label:
|
|
374
|
+
label: e("order.settings"),
|
|
375
375
|
value: "setting"
|
|
376
376
|
}
|
|
377
|
-
]),
|
|
377
|
+
]), D = h(() => n.state.devices);
|
|
378
378
|
async function Q() {
|
|
379
379
|
await n.requestOtp(), i.open({
|
|
380
|
-
title: S(
|
|
380
|
+
title: S(e("order.bindDevice")),
|
|
381
381
|
contentComponent: We,
|
|
382
382
|
contentComponentProps: {
|
|
383
383
|
otp: n.state.otp
|
|
@@ -389,30 +389,30 @@ const _e = {
|
|
|
389
389
|
async function G(y) {
|
|
390
390
|
try {
|
|
391
391
|
o.setKioskOrderSetting(y), await o.updateKioskSetting(), v.open({
|
|
392
|
-
title:
|
|
392
|
+
title: e("order.kioskSettingSuccess"),
|
|
393
393
|
type: "success"
|
|
394
394
|
});
|
|
395
395
|
} catch {
|
|
396
396
|
v.open({
|
|
397
|
-
title:
|
|
397
|
+
title: e("order.kioskSettingFailed"),
|
|
398
398
|
type: "error"
|
|
399
399
|
});
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
return ne(async () => {
|
|
403
403
|
var y;
|
|
404
|
-
(y = d.value) != null && y._id && (w.value = d.value._id, await
|
|
404
|
+
(y = d.value) != null && y._id && (w.value = d.value._id, await R());
|
|
405
405
|
}), oe(
|
|
406
406
|
() => a.value.length,
|
|
407
407
|
async (y) => {
|
|
408
|
-
T.value === void 0 && a.value.length > 0 && await
|
|
408
|
+
T.value === void 0 && a.value.length > 0 && await q(a.value[0]._id);
|
|
409
409
|
},
|
|
410
410
|
{ immediate: !0 }
|
|
411
411
|
), (y, x) => {
|
|
412
412
|
const A = g("FmButton"), J = g("FmPageHead"), X = g("FmTabs"), Z = g("FmSelect");
|
|
413
413
|
return p(), f("div", Xe, [
|
|
414
414
|
I(J, {
|
|
415
|
-
title: c(
|
|
415
|
+
title: c(e)("order.kiosk")
|
|
416
416
|
}, {
|
|
417
417
|
append: se(() => [
|
|
418
418
|
le(I(A, {
|
|
@@ -435,25 +435,25 @@ const _e = {
|
|
|
435
435
|
l("div", et, [
|
|
436
436
|
l("div", tt, [
|
|
437
437
|
l("div", at, [
|
|
438
|
-
l("span", nt, u(c(
|
|
439
|
-
l("span", ot, u(c(
|
|
438
|
+
l("span", nt, u(c(e)("order.activateLocation")), 1),
|
|
439
|
+
l("span", ot, u(c(e)("order.selectRestaurant")) + ": ", 1),
|
|
440
440
|
I(Z, {
|
|
441
441
|
class: "w-1/2",
|
|
442
442
|
modelValue: T.value,
|
|
443
443
|
"onUpdate:modelValue": [
|
|
444
444
|
x[1] || (x[1] = (K) => T.value = K),
|
|
445
|
-
|
|
445
|
+
q
|
|
446
446
|
],
|
|
447
447
|
items: H.value,
|
|
448
|
-
placeholder: c(
|
|
448
|
+
placeholder: c(e)("order.selectItem")
|
|
449
449
|
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
450
450
|
]),
|
|
451
|
-
r.value == "device" ? (p(),
|
|
451
|
+
r.value == "device" ? (p(), E(de, {
|
|
452
452
|
key: 0,
|
|
453
|
-
devices:
|
|
453
|
+
devices: D.value,
|
|
454
454
|
onRequestOtp: Q
|
|
455
455
|
}, null, 8, ["devices"])) : b("", !0),
|
|
456
|
-
r.value == "setting" ? (p(),
|
|
456
|
+
r.value == "setting" ? (p(), E(c(s), {
|
|
457
457
|
key: `KioskSettingView-${w.value}`,
|
|
458
458
|
"restaurant-id": w.value,
|
|
459
459
|
onUpdateKioskOrderSetting: G,
|
|
@@ -465,7 +465,7 @@ const _e = {
|
|
|
465
465
|
P.value ? b("", !0) : (p(), f("div", st, [
|
|
466
466
|
I(M, {
|
|
467
467
|
"restaurant-id": w.value,
|
|
468
|
-
devices:
|
|
468
|
+
devices: D.value,
|
|
469
469
|
"kiosk-order-setting": c(o).state.kiosk,
|
|
470
470
|
dialogType: !1
|
|
471
471
|
}, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
|