@feedmepos/mf-order-setting 0.0.22 → 0.0.24
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-C6YmdLKc.js → KioskDevicesView-DGkvW2mH.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DiLHpWbm.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-BGZLd8T_.js} +2 -2
- package/dist/KioskSettingView-DLb5nnCu.js +821 -0
- package/dist/KioskView-kZZYSfUh.js +430 -0
- package/dist/{OrderSettingsView-D_bGK-3J.js → OrderSettingsView-Cil4j9G5.js} +14 -11
- package/dist/{app-C5qwExhL.js → app-D47VRl5B.js} +47 -39
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-kEC9G7bx.js → dayjs.min-R4180ukF.js} +1 -1
- package/dist/frontend/mf-order/src/app.d.ts +8 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +17 -0
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +192 -12
- package/dist/frontend/mf-order/src/stores/order-setting/mapper.d.ts +4 -2
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskEnablePaxDialogSection.vue.d.ts +9 -0
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskInstructionSection.vue.d.ts +15 -0
- package/dist/frontend/mf-order/src/views/kiosk/settings/KioskPickAtCounterSection.vue.d.ts +4 -3
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-C_53CwBa.js → index-DgLlDwJK.js} +2 -2
- package/dist/package/entity/order-platform/foodpanda/foodpanda-order.do.d.ts +16 -16
- package/dist/package/entity/order-platform/foodpanda/foodpanda-order.dto.d.ts +6 -6
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +129 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +255 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.enum.d.ts +3 -0
- package/dist/package/entity/order-setting/order-setting.do.d.ts +156 -8
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +312 -16
- package/dist/package/entity/order-setting/sequence/sequence.do.d.ts +4 -4
- package/dist/package/entity/order-setting/sequence/sequence.dto.d.ts +4 -4
- package/dist/package/entity/payment/payment.enum.d.ts +2 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +154 -6
- package/dist/package/entity/websocket/websocket.dto.d.ts +328 -0
- package/dist/{queue.do-Vog69wnQ.js → queue.do-CNMuossU.js} +4540 -4517
- package/package.json +1 -1
- package/src/locales/en-US.json +5 -2
- package/src/locales/zh-CN.json +4 -0
- package/src/modules/order-setting/kiosk/interface.ts +20 -0
- package/src/stores/order-setting/mapper.ts +68 -11
- package/src/views/kiosk/settings/KioskDineInSection.vue +4 -5
- package/src/views/kiosk/settings/KioskDisplayStandSection.vue +36 -0
- package/src/views/kiosk/settings/KioskEnablePaxDialogSection.vue +33 -0
- package/src/views/kiosk/settings/KioskInstructionSection.vue +40 -0
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +30 -19
- package/src/views/kiosk/settings/KioskPickAtCounterSection.vue +45 -7
- package/src/views/kiosk/settings/KioskSettingView.vue +41 -3
- package/src/views/kiosk/settings/KioskTakeawaySection.vue +38 -4
- package/src/views/order-settings/servicecharge/ServiceChargeRule.vue +3 -8
- package/dist/KioskSettingView-D-muNxlb.js +0 -649
- package/dist/KioskView-kcjjk4fF.js +0 -371
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import { defineComponent as I, computed as b, openBlock as c, createElementBlock as y, normalizeClass as X, toDisplayString as m, unref as d, createCommentVNode as _, createElementVNode as o, Fragment as Z, renderList as ee, ref as T, defineAsyncComponent as te, watch as ae, resolveComponent as x, createVNode as P, withCtx as ne, withDirectives as se, vShow as oe, createBlock as R } from "vue";
|
|
2
|
+
import { u as re, _ as le } from "./KioskDevicesView.vue_vue_type_script_setup_true_lang-BGZLd8T_.js";
|
|
3
|
+
import { useI18n as A, useCoreStore as de } from "@feedmepos/mf-common";
|
|
4
|
+
import { F as V, a as ie, b as ce } from "./queue.do-CNMuossU.js";
|
|
5
|
+
import { useDialog as ue, useSnackbar as pe, useBreakpoints as me } from "@feedmepos/ui-library";
|
|
6
|
+
import { defineStore as ye } from "pinia";
|
|
7
|
+
import { O as B, c as D } from "./index-DgLlDwJK.js";
|
|
8
|
+
const fe = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "fm-typo-en-title-sm-600"
|
|
11
|
+
}, ve = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "my-[0.25rem]"
|
|
14
|
+
}, _e = { class: "flex flex-col gap-1" }, be = { class: "flex flex-col gap-1" }, he = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, ge = { class: "fm-typo-en-body-lg-600" }, Pe = { key: 0 }, ke = { key: 1 }, Se = { key: 0 }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Te = { class: "fm-typo-en-body-lg-600 block" }, we = { key: 1 }, Oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ce = { class: "fm-typo-en-body-lg-600 block" }, Ie = { key: 2 }, Ae = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ke = { class: "fm-typo-en-body-lg-600 block" }, Ue = { key: 3 }, $e = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Fe = { class: "fm-typo-en-body-lg-600 block" }, qe = { key: 0 }, E = /* @__PURE__ */ I({
|
|
15
|
+
__name: "KioskSummary",
|
|
16
|
+
props: {
|
|
17
|
+
restaurantId: {},
|
|
18
|
+
devices: {},
|
|
19
|
+
kioskOrderSetting: {},
|
|
20
|
+
dialogType: { type: Boolean }
|
|
21
|
+
},
|
|
22
|
+
setup(t) {
|
|
23
|
+
const { t: e } = A(), r = t, l = b(() => {
|
|
24
|
+
var a;
|
|
25
|
+
return (a = r.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
|
|
26
|
+
}), n = b(() => {
|
|
27
|
+
var a;
|
|
28
|
+
return (a = r.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
|
|
29
|
+
}), s = b(() => {
|
|
30
|
+
var a, p;
|
|
31
|
+
return (a = r.kioskOrderSetting) != null && a.dineIn.displayStand ? e("order.tableService") : (p = r.kioskOrderSetting) != null && p.dineIn && !r.kioskOrderSetting.dineIn.displayStand ? e("order.pickAtCounter") : e("order.unknown");
|
|
32
|
+
}), u = b(() => {
|
|
33
|
+
var a;
|
|
34
|
+
return ((a = r.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
|
|
35
|
+
}), i = b(() => {
|
|
36
|
+
var p, v;
|
|
37
|
+
const a = [];
|
|
38
|
+
if ((p = r.kioskOrderSetting) == null || p.paymentSetting.paymentTypes.forEach((h) => {
|
|
39
|
+
h === V.enum.ePayment && a.push(e("order.ePayment"));
|
|
40
|
+
}), a.length > 0 && Object.keys(r.kioskOrderSetting.paymentSetting.ePaymentTypes).length !== 0) {
|
|
41
|
+
const h = (v = r.kioskOrderSetting) == null ? void 0 : v.paymentSetting.ePaymentTypes;
|
|
42
|
+
(h.card.terminal || h.card.nfc) && a.push(e("order.bankCard")), (h.eWallet.scanPay || h.eWallet.qrPay) && a.push(e("order.eWallet"));
|
|
43
|
+
}
|
|
44
|
+
return a.join(", ");
|
|
45
|
+
});
|
|
46
|
+
return (a, p) => (c(), y("div", {
|
|
47
|
+
class: X(a.dialogType ? "" : ["p-[1.5rem] border fm-corner-radius-lg flex flex-col gap-5 fixed ml-40 w-[320px]"])
|
|
48
|
+
}, [
|
|
49
|
+
a.dialogType ? _("", !0) : (c(), y("span", fe, m(d(e)("order.kioskSummary")), 1)),
|
|
50
|
+
a.dialogType ? _("", !0) : (c(), y("hr", ve)),
|
|
51
|
+
o("div", _e, [
|
|
52
|
+
o("div", be, [
|
|
53
|
+
o("span", he, m(d(e)("order.kioskDisplay")), 1),
|
|
54
|
+
o("div", ge, [
|
|
55
|
+
a.devices.length > 0 ? (c(), y("div", Pe, [
|
|
56
|
+
(c(!0), y(Z, null, ee(a.devices, (v) => (c(), y("li", {
|
|
57
|
+
class: "block",
|
|
58
|
+
key: v.machineId
|
|
59
|
+
}, m(v.name), 1))), 128))
|
|
60
|
+
])) : (c(), y("div", ke, "-"))
|
|
61
|
+
]),
|
|
62
|
+
l.value === d(e)("order.activated") ? (c(), y("div", Se, [
|
|
63
|
+
o("span", xe, m(d(e)("order.dineIn")), 1),
|
|
64
|
+
o("div", Te, [
|
|
65
|
+
o("div", null, m(l.value), 1)
|
|
66
|
+
])
|
|
67
|
+
])) : _("", !0),
|
|
68
|
+
l.value === d(e)("order.activated") && s.value !== d(e)("order.unknown") ? (c(), y("div", we, [
|
|
69
|
+
o("span", Oe, m(d(e)("order.dineInType")), 1),
|
|
70
|
+
o("div", Ce, [
|
|
71
|
+
o("div", null, m(s.value), 1)
|
|
72
|
+
])
|
|
73
|
+
])) : _("", !0),
|
|
74
|
+
n.value === d(e)("order.activated") ? (c(), y("div", Ie, [
|
|
75
|
+
o("span", Ae, m(d(e)("order.takeaway")), 1),
|
|
76
|
+
o("div", Ke, [
|
|
77
|
+
o("div", null, m(n.value), 1)
|
|
78
|
+
])
|
|
79
|
+
])) : _("", !0),
|
|
80
|
+
i.value || u.value ? (c(), y("div", Ue, [
|
|
81
|
+
o("span", $e, m(d(e)("order.acceptedPayment")), 1),
|
|
82
|
+
o("div", Fe, [
|
|
83
|
+
u.value ? (c(), y("div", qe, m(d(e)("order.offlinePayment")), 1)) : _("", !0),
|
|
84
|
+
o("div", null, m(i.value), 1)
|
|
85
|
+
])
|
|
86
|
+
])) : _("", !0)
|
|
87
|
+
])
|
|
88
|
+
])
|
|
89
|
+
], 2));
|
|
90
|
+
}
|
|
91
|
+
}), Re = { class: "flex flex-col gap-5 pb-6" }, Ve = { class: "fm-typo-en-body-md-400 block" }, Be = { class: "fm-typo-en-title-md-600" }, De = /* @__PURE__ */ I({
|
|
92
|
+
__name: "KioskOtpDialog",
|
|
93
|
+
props: {
|
|
94
|
+
otp: {}
|
|
95
|
+
},
|
|
96
|
+
setup(t) {
|
|
97
|
+
const { t: e } = A();
|
|
98
|
+
return (r, l) => (c(), y("div", Re, [
|
|
99
|
+
o("span", Ve, m(d(e)("order.bindDeviceMessage")), 1),
|
|
100
|
+
o("div", Be, m(r.otp), 1)
|
|
101
|
+
]));
|
|
102
|
+
}
|
|
103
|
+
}), M = {
|
|
104
|
+
enabled: !1,
|
|
105
|
+
prefix: null,
|
|
106
|
+
padDigit: 0,
|
|
107
|
+
standSlotRange: {
|
|
108
|
+
min: 1,
|
|
109
|
+
max: 10
|
|
110
|
+
},
|
|
111
|
+
enablePaxDialog: !1,
|
|
112
|
+
submitOrderInstruction: {
|
|
113
|
+
payAtCounter: null,
|
|
114
|
+
paid: null
|
|
115
|
+
}
|
|
116
|
+
}, Ee = {
|
|
117
|
+
enabled: !1,
|
|
118
|
+
submitOrderInstruction: {
|
|
119
|
+
payAtCounter: null,
|
|
120
|
+
paid: null
|
|
121
|
+
}
|
|
122
|
+
}, W = {
|
|
123
|
+
enabled: !1,
|
|
124
|
+
submitOrderInstruction: {
|
|
125
|
+
payAtCounter: null,
|
|
126
|
+
paid: null
|
|
127
|
+
},
|
|
128
|
+
enablePaxDialog: !1
|
|
129
|
+
}, Ne = {
|
|
130
|
+
dineIn: {
|
|
131
|
+
enabled: !1,
|
|
132
|
+
pickUp: W,
|
|
133
|
+
sequenceNumber: ie.parse({}),
|
|
134
|
+
displayStand: M
|
|
135
|
+
},
|
|
136
|
+
takeaway: Ee,
|
|
137
|
+
paymentSetting: {
|
|
138
|
+
paymentTypes: [],
|
|
139
|
+
offlinePaymentTypes: [],
|
|
140
|
+
ePaymentTypes: {
|
|
141
|
+
card: {
|
|
142
|
+
terminal: !1,
|
|
143
|
+
nfc: !1
|
|
144
|
+
},
|
|
145
|
+
eWallet: {
|
|
146
|
+
qrPay: !1,
|
|
147
|
+
scanPay: !1
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
menuItem: {
|
|
152
|
+
showAllOnly: !1
|
|
153
|
+
}
|
|
154
|
+
}, C = {
|
|
155
|
+
payAtCounter: null,
|
|
156
|
+
paid: null
|
|
157
|
+
}, Me = (t) => {
|
|
158
|
+
var e;
|
|
159
|
+
return {
|
|
160
|
+
kiosk: We(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
|
|
161
|
+
};
|
|
162
|
+
}, We = (t, e) => {
|
|
163
|
+
var r, l, n, s, u, i, a, p, v;
|
|
164
|
+
return {
|
|
165
|
+
dineIn: je(e ?? {
|
|
166
|
+
current: 0,
|
|
167
|
+
prefix: "#K"
|
|
168
|
+
}, t.dineIn ?? void 0),
|
|
169
|
+
takeaway: {
|
|
170
|
+
enabled: (t == null ? void 0 : t.canTakeaway) ?? !1,
|
|
171
|
+
submitOrderInstruction: (r = t == null ? void 0 : t.takeaway) != null && r.submitOrderInstruction ? {
|
|
172
|
+
payAtCounter: ((n = (l = t.takeaway.submitOrderInstruction) == null ? void 0 : l.payAtCounter) == null ? void 0 : n.en) ?? null,
|
|
173
|
+
paid: ((u = (s = t.takeaway.submitOrderInstruction) == null ? void 0 : s.paid) == null ? void 0 : u.en) ?? null
|
|
174
|
+
} : C
|
|
175
|
+
},
|
|
176
|
+
paymentSetting: {
|
|
177
|
+
paymentTypes: ((i = t == null ? void 0 : t.paymentSetting) == null ? void 0 : i.paymentTypes) ?? [],
|
|
178
|
+
offlinePaymentTypes: ((a = t == null ? void 0 : t.paymentSetting) == null ? void 0 : a.offlinePaymentTypes) ?? [],
|
|
179
|
+
ePaymentTypes: ((p = t == null ? void 0 : t.paymentSetting) == null ? void 0 : p.ePaymentTypes) ?? ce.parse({
|
|
180
|
+
card: {
|
|
181
|
+
terminal: !1,
|
|
182
|
+
nfc: !1
|
|
183
|
+
},
|
|
184
|
+
eWallet: {
|
|
185
|
+
qrPay: !1,
|
|
186
|
+
scanPay: !1
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
},
|
|
190
|
+
menuItem: {
|
|
191
|
+
showAllOnly: ((v = t.menuItem) == null ? void 0 : v.showAllOnly) ?? !1
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}, je = (t, e) => {
|
|
195
|
+
var r, l, n, s, u, i, a, p;
|
|
196
|
+
return {
|
|
197
|
+
enabled: !!e,
|
|
198
|
+
sequenceNumber: t,
|
|
199
|
+
pickUp: e != null && e.pickUp ? {
|
|
200
|
+
...e.pickUp,
|
|
201
|
+
submitOrderInstruction: e.pickUp.submitOrderInstruction ? {
|
|
202
|
+
payAtCounter: ((l = (r = e.pickUp.submitOrderInstruction) == null ? void 0 : r.payAtCounter) == null ? void 0 : l.en) ?? null,
|
|
203
|
+
paid: ((s = (n = e.pickUp.submitOrderInstruction) == null ? void 0 : n.paid) == null ? void 0 : s.en) ?? null
|
|
204
|
+
} : C,
|
|
205
|
+
enablePaxDialog: e.pickUp.enablePaxDialog ? e.pickUp.enablePaxDialog : !1
|
|
206
|
+
} : W,
|
|
207
|
+
displayStand: e != null && e.displayStand ? {
|
|
208
|
+
enabled: e.displayStand.enabled,
|
|
209
|
+
standSlotRange: e.displayStand.standSlotRange,
|
|
210
|
+
prefix: e.displayStand.prefix,
|
|
211
|
+
padDigit: e.displayStand.padDigit,
|
|
212
|
+
enablePaxDialog: e.displayStand.enablePaxDialog ?? !1,
|
|
213
|
+
submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
|
|
214
|
+
payAtCounter: ((i = (u = e.displayStand.submitOrderInstruction) == null ? void 0 : u.payAtCounter) == null ? void 0 : i.en) ?? null,
|
|
215
|
+
paid: ((p = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : p.en) ?? null
|
|
216
|
+
} : C
|
|
217
|
+
} : M
|
|
218
|
+
};
|
|
219
|
+
}, He = (t) => {
|
|
220
|
+
const e = (n) => {
|
|
221
|
+
var s, u, i, a;
|
|
222
|
+
return {
|
|
223
|
+
requiredSlot: !!n.displayStand,
|
|
224
|
+
displayStand: {
|
|
225
|
+
...n.displayStand,
|
|
226
|
+
submitOrderInstruction: {
|
|
227
|
+
payAtCounter: (s = n.displayStand.submitOrderInstruction) != null && s.payAtCounter ? {
|
|
228
|
+
en: n.displayStand.submitOrderInstruction.payAtCounter
|
|
229
|
+
} : null,
|
|
230
|
+
paid: (u = n.displayStand.submitOrderInstruction) != null && u.paid ? {
|
|
231
|
+
en: n.displayStand.submitOrderInstruction.paid
|
|
232
|
+
} : null
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
pickUp: {
|
|
236
|
+
...n.pickUp,
|
|
237
|
+
submitOrderInstruction: {
|
|
238
|
+
payAtCounter: (i = n.pickUp.submitOrderInstruction) != null && i.payAtCounter ? {
|
|
239
|
+
en: n.pickUp.submitOrderInstruction.payAtCounter
|
|
240
|
+
} : null,
|
|
241
|
+
paid: (a = n.pickUp.submitOrderInstruction) != null && a.paid ? {
|
|
242
|
+
en: n.pickUp.submitOrderInstruction.paid
|
|
243
|
+
} : null
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}, r = (n) => ({
|
|
248
|
+
canTakeaway: t.takeaway.enabled,
|
|
249
|
+
dineIn: n,
|
|
250
|
+
menuItem: t.menuItem,
|
|
251
|
+
paymentSetting: l(t.paymentSetting)
|
|
252
|
+
}), l = (n) => ({
|
|
253
|
+
paymentTypes: n.paymentTypes,
|
|
254
|
+
offlinePaymentTypes: n.offlinePaymentTypes,
|
|
255
|
+
ePaymentTypes: n.ePaymentTypes
|
|
256
|
+
});
|
|
257
|
+
return t.dineIn.enabled ? {
|
|
258
|
+
kioskSettings: r(e(t.dineIn)),
|
|
259
|
+
kioskDineIn: t.dineIn.sequenceNumber
|
|
260
|
+
} : {
|
|
261
|
+
kioskSettings: r()
|
|
262
|
+
};
|
|
263
|
+
}, N = {
|
|
264
|
+
convertOrderSettingDto: Me,
|
|
265
|
+
toOrderKioskSettingsDto: He
|
|
266
|
+
}, Le = ye("orderSetting", () => {
|
|
267
|
+
const t = T({});
|
|
268
|
+
async function e() {
|
|
269
|
+
const s = await B.getOrderSetting();
|
|
270
|
+
l(s);
|
|
271
|
+
}
|
|
272
|
+
async function r() {
|
|
273
|
+
if (t.value.orderSetting && t.value.kiosk) {
|
|
274
|
+
const { _id: s, ...u } = t.value.orderSetting, i = N.toOrderKioskSettingsDto(t.value.kiosk), a = {
|
|
275
|
+
...u,
|
|
276
|
+
kioskSettings: i.kioskSettings
|
|
277
|
+
}, p = await B.updateOrderSetting(a);
|
|
278
|
+
l(p);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function l(s) {
|
|
282
|
+
t.value.orderSetting = s, t.value.kiosk = N.convertOrderSettingDto(s).kiosk;
|
|
283
|
+
}
|
|
284
|
+
function n(s) {
|
|
285
|
+
t.value.kiosk = s;
|
|
286
|
+
}
|
|
287
|
+
return {
|
|
288
|
+
state: t,
|
|
289
|
+
getSetting: e,
|
|
290
|
+
updateKioskSetting: r,
|
|
291
|
+
setKioskOrderSetting: n
|
|
292
|
+
};
|
|
293
|
+
}), Ye = { class: "py-[1.5rem]" }, ze = { class: "flex px-[1.5rem]" }, Ge = { class: "flex-[2_2_0%]" }, Je = { class: "pt-[1.5rem]" }, Qe = { class: "flex flex-col gap-10" }, Xe = { class: "flex flex-col gap-2" }, Ze = { class: "fm-typo-en-title-sm-600" }, et = { class: "fm-typo-en-title-sm-400" }, tt = {
|
|
294
|
+
key: 0,
|
|
295
|
+
class: "flex-[1_1_0%]"
|
|
296
|
+
}, it = /* @__PURE__ */ I({
|
|
297
|
+
__name: "KioskView",
|
|
298
|
+
setup(t) {
|
|
299
|
+
var F, q;
|
|
300
|
+
const { t: e } = A(), r = te(
|
|
301
|
+
() => import("./KioskSettingView-DLb5nnCu.js")
|
|
302
|
+
), l = T("device"), n = re(), s = Le(), u = ue(), { currentRestaurant: i, restaurants: a, changeRestaurant: p } = de(), v = pe(), h = me(), K = b(() => h.breakpoints.value.xs), k = T(((F = i.value) == null ? void 0 : F._id) ?? void 0), j = b(() => a.value.map((f) => ({
|
|
303
|
+
label: f.profile.name,
|
|
304
|
+
value: f._id
|
|
305
|
+
}))), S = T(((q = i.value) == null ? void 0 : q._id) ?? "");
|
|
306
|
+
function H() {
|
|
307
|
+
var f;
|
|
308
|
+
u.open({
|
|
309
|
+
title: D(e("order.kioskSummary")),
|
|
310
|
+
contentComponent: E,
|
|
311
|
+
contentComponentProps: {
|
|
312
|
+
restaurantId: (f = i.value) == null ? void 0 : f._id,
|
|
313
|
+
devices: n.state.devices,
|
|
314
|
+
kioskOrderSetting: s.state.kiosk,
|
|
315
|
+
dialogType: !0
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
async function U(f) {
|
|
320
|
+
const g = a.value.find((w) => w._id == f);
|
|
321
|
+
await p(g), await s.getSetting(), await n.getDevices(), k.value = f, S.value = f;
|
|
322
|
+
}
|
|
323
|
+
const L = b(() => [
|
|
324
|
+
{
|
|
325
|
+
label: e("order.deviceBinding"),
|
|
326
|
+
value: "device"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
label: e("order.settings"),
|
|
330
|
+
value: "setting"
|
|
331
|
+
}
|
|
332
|
+
]), $ = b(() => n.state.devices);
|
|
333
|
+
async function Y() {
|
|
334
|
+
await n.requestOtp(), u.open({
|
|
335
|
+
title: D(e("order.bindDevice")),
|
|
336
|
+
contentComponent: De,
|
|
337
|
+
contentComponentProps: {
|
|
338
|
+
otp: n.state.otp
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
async function z(f) {
|
|
343
|
+
try {
|
|
344
|
+
s.setKioskOrderSetting(f), await s.updateKioskSetting(), v.open({
|
|
345
|
+
title: e("order.kioskSettingSuccess"),
|
|
346
|
+
type: "success"
|
|
347
|
+
});
|
|
348
|
+
} catch {
|
|
349
|
+
v.open({
|
|
350
|
+
title: e("order.kioskSettingFailed"),
|
|
351
|
+
type: "error"
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return ae(
|
|
356
|
+
() => a.value.length,
|
|
357
|
+
async (f) => {
|
|
358
|
+
k.value === void 0 && a.value.length > 0 && await U(a.value[0]._id);
|
|
359
|
+
},
|
|
360
|
+
{ immediate: !0 }
|
|
361
|
+
), (f, g) => {
|
|
362
|
+
const w = x("FmButton"), G = x("FmPageHead"), J = x("FmTabs"), Q = x("FmSelect");
|
|
363
|
+
return c(), y("div", Ye, [
|
|
364
|
+
P(G, {
|
|
365
|
+
title: d(e)("order.kiosk")
|
|
366
|
+
}, {
|
|
367
|
+
append: ne(() => [
|
|
368
|
+
se(P(w, {
|
|
369
|
+
icon: "info",
|
|
370
|
+
variant: "tertiary",
|
|
371
|
+
onClick: H
|
|
372
|
+
}, null, 512), [
|
|
373
|
+
[oe, K.value]
|
|
374
|
+
])
|
|
375
|
+
]),
|
|
376
|
+
_: 1
|
|
377
|
+
}, 8, ["title"]),
|
|
378
|
+
o("div", ze, [
|
|
379
|
+
o("div", Ge, [
|
|
380
|
+
P(J, {
|
|
381
|
+
"model-value": l.value,
|
|
382
|
+
"onUpdate:modelValue": g[0] || (g[0] = (O) => l.value = O),
|
|
383
|
+
items: L.value
|
|
384
|
+
}, null, 8, ["model-value", "items"]),
|
|
385
|
+
o("div", Je, [
|
|
386
|
+
o("div", Qe, [
|
|
387
|
+
o("div", Xe, [
|
|
388
|
+
o("span", Ze, m(d(e)("order.activateLocation")), 1),
|
|
389
|
+
o("span", et, m(d(e)("order.selectRestaurant")) + ": ", 1),
|
|
390
|
+
P(Q, {
|
|
391
|
+
class: "w-1/2",
|
|
392
|
+
modelValue: k.value,
|
|
393
|
+
"onUpdate:modelValue": [
|
|
394
|
+
g[1] || (g[1] = (O) => k.value = O),
|
|
395
|
+
U
|
|
396
|
+
],
|
|
397
|
+
items: j.value,
|
|
398
|
+
placeholder: d(e)("order.selectItem")
|
|
399
|
+
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
400
|
+
]),
|
|
401
|
+
l.value == "device" ? (c(), R(le, {
|
|
402
|
+
key: 0,
|
|
403
|
+
devices: $.value,
|
|
404
|
+
"request-otp": Y
|
|
405
|
+
}, null, 8, ["devices"])) : _("", !0),
|
|
406
|
+
l.value == "setting" ? (c(), R(d(r), {
|
|
407
|
+
key: `KioskSettingView-${S.value}`,
|
|
408
|
+
"restaurant-id": S.value,
|
|
409
|
+
onUpdateKioskOrderSetting: z,
|
|
410
|
+
form: d(s).state.kiosk ?? d(Ne)
|
|
411
|
+
}, null, 8, ["restaurant-id", "form"])) : _("", !0)
|
|
412
|
+
])
|
|
413
|
+
])
|
|
414
|
+
]),
|
|
415
|
+
K.value ? _("", !0) : (c(), y("div", tt, [
|
|
416
|
+
P(E, {
|
|
417
|
+
"restaurant-id": S.value,
|
|
418
|
+
devices: $.value,
|
|
419
|
+
"kiosk-order-setting": d(s).state.kiosk,
|
|
420
|
+
dialogType: !1
|
|
421
|
+
}, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
|
|
422
|
+
]))
|
|
423
|
+
])
|
|
424
|
+
]);
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
});
|
|
428
|
+
export {
|
|
429
|
+
it as default
|
|
430
|
+
};
|
|
@@ -4,13 +4,13 @@ var Cl = (f, m, c) => vf(f, typeof m != "symbol" ? m + "" : m, c);
|
|
|
4
4
|
import { ref as Ue, computed as De, defineComponent as st, onMounted as $n, onUnmounted as Vd, resolveComponent as Oe, openBlock as _e, createBlock as gt, withCtx as He, createElementVNode as ye, createVNode as pe, toDisplayString as Ne, unref as le, createElementBlock as Ae, isRef as Ro, Fragment as at, renderList as kt, createCommentVNode as tt, watch as Ct, createTextVNode as Sn, renderSlot as wf, reactive as Wn, withModifiers as _f, toRaw as Il, normalizeStyle as Ef, normalizeClass as Gd, createSlots as Ff, h as Hd, resolveDynamicComponent as kf } from "vue";
|
|
5
5
|
import { useDialog as Kd, useSnackbar as Yd } from "@feedmepos/ui-library";
|
|
6
6
|
import { useI18n as ft, useCoreStore as Dt } from "@feedmepos/mf-common";
|
|
7
|
-
import { e as or, d as Zt, f as Sf, h as ns, g as rt, i as Un, l as de, j as Be, k as Wd, m as pt, n as zf, o as rs, p as so } from "./queue.do-
|
|
7
|
+
import { e as or, d as Zt, f as Sf, h as ns, g as rt, i as Un, l as de, j as Be, k as Wd, m as pt, n as zf, o as rs, p as so } from "./queue.do-CNMuossU.js";
|
|
8
8
|
import { u as hn, a as In, b as jf, _ as Tf } from "./index-DSCb3ndM.js";
|
|
9
|
-
import { g as et, b as sr, S as Ds, m as Af, d as Cf, D as Bt, r as ri } from "./dayjs.min-
|
|
9
|
+
import { g as et, b as sr, S as Ds, m as Af, d as Cf, D as Bt, r as ri } from "./dayjs.min-R4180ukF.js";
|
|
10
10
|
import { defineStore as xo } from "pinia";
|
|
11
11
|
import { useRouter as If } from "vue-router";
|
|
12
|
-
import { c as Vs, g as ir, a as Gs, b as Pf, d as Ms, e as Of } from "./app-
|
|
13
|
-
import { s as as, a as Df, O as qo } from "./index-
|
|
12
|
+
import { c as Vs, g as ir, a as Gs, b as Pf, d as Ms, e as Of } from "./app-D47VRl5B.js";
|
|
13
|
+
import { s as as, a as Df, O as qo } from "./index-DgLlDwJK.js";
|
|
14
14
|
const Mf = {
|
|
15
15
|
"Bill Receipt Number": (f) => f.seqNumber ?? "*8888",
|
|
16
16
|
"Bill Receipt Total Amount (Net)": (f) => Sf.Dinero.fromFdoDinero(f.nettTotal).toFormat(!0),
|
|
@@ -71259,7 +71259,10 @@ const $v = xo("tableSetting", {
|
|
|
71259
71259
|
}), hv = { class: "flex items-center gap-7 mb-3" }, pv = { class: "flex items-center justify-between" }, mv = { class: "font-semibold mb-3" }, gv = { class: "text-fm-color-typo-secondary mt-5 mb-5 flex flex-row" }, bv = { class: "fm-corner-radius-lg flex flex-col" }, yv = { class: "flex flex-row" }, vv = { class: "flex flex-row" }, wv = { class: "font-bold ml-2" }, _v = {
|
|
71260
71260
|
key: 0,
|
|
71261
71261
|
class: "flex flex-col pl-6"
|
|
71262
|
-
}, Ev = { class: "flex gap-8 items-center justify-start" }, Fv = { class: "flex items-center justify-between" }, kv = { class: "font-semibold mb-3" }, Sv = { class: "text-fm-color-typo-secondary mt-5 mb-5 flex flex-row" }, zv = { class: "flex flex-row" }, jv = {
|
|
71262
|
+
}, Ev = { class: "flex gap-8 items-center justify-start" }, Fv = { class: "flex items-center justify-between" }, kv = { class: "font-semibold mb-3" }, Sv = { class: "text-fm-color-typo-secondary mt-5 mb-5 flex flex-row" }, zv = { class: "flex flex-row" }, jv = {
|
|
71263
|
+
key: 0,
|
|
71264
|
+
class: "fm-corner-radius-lg flex flex-col"
|
|
71265
|
+
}, Tv = { class: "flex gap-8 items-center justify-start" }, Av = { class: "flex flex-col" };
|
|
71263
71266
|
var bf = /* @__PURE__ */ ((f) => (f.dineIn = "DINE_IN", f.takeaway = "TAKEAWAY", f.inHouseDelivery = "IN_HOUSE_DELIVERY", f.deliveryCompany = "DELIVERY_COMPANY", f.pickup = "PICKUP", f))(bf || {});
|
|
71264
71267
|
const Cv = /* @__PURE__ */ st({
|
|
71265
71268
|
__name: "ServiceChargeRule",
|
|
@@ -71649,19 +71652,19 @@ const Cv = /* @__PURE__ */ st({
|
|
|
71649
71652
|
class: "ml-auto"
|
|
71650
71653
|
}))
|
|
71651
71654
|
]),
|
|
71652
|
-
|
|
71653
|
-
|
|
71655
|
+
ae.value ? (_e(), Ae("div", jv, [
|
|
71656
|
+
(_e(!0), Ae(at, null, kt(ie.value, (E, F) => (_e(), Ae("div", {
|
|
71654
71657
|
key: F,
|
|
71655
71658
|
class: "flex flex-col pl-6"
|
|
71656
71659
|
}, [
|
|
71657
71660
|
pe(b, {
|
|
71661
|
+
value: E.name,
|
|
71658
71662
|
"model-value": V.value[E.name].isSelected,
|
|
71659
71663
|
label: E.name,
|
|
71660
|
-
value: "",
|
|
71661
71664
|
"onUpdate:modelValue": (S) => G(S, E.name)
|
|
71662
|
-
}, null, 8, ["model-value", "label", "onUpdate:modelValue"])
|
|
71663
|
-
]))), 128))
|
|
71664
|
-
])
|
|
71665
|
+
}, null, 8, ["value", "model-value", "label", "onUpdate:modelValue"])
|
|
71666
|
+
]))), 128))
|
|
71667
|
+
])) : tt("", !0)
|
|
71665
71668
|
]),
|
|
71666
71669
|
_: 1
|
|
71667
71670
|
})
|