@feedmepos/mf-order-setting 0.0.22 → 0.0.23
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-BdJCcotz.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-DiLHpWbm.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-DUPfN7ti.js} +2 -2
- package/dist/KioskSettingView-BChhriPk.js +782 -0
- package/dist/KioskView-DPU-oQ1H.js +426 -0
- package/dist/{OrderSettingsView-D_bGK-3J.js → OrderSettingsView-BOiflwB_.js} +14 -11
- package/dist/{app-C5qwExhL.js → app-CaYWSLe1.js} +17 -13
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-kEC9G7bx.js → dayjs.min-8NyoNely.js} +1 -1
- package/dist/frontend/mf-order/src/app.d.ts +4 -0
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +13 -0
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +168 -12
- package/dist/frontend/mf-order/src/stores/order-setting/mapper.d.ts +2 -1
- 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-B7GFhkAE.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 +115 -0
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +225 -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 +138 -8
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +276 -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 +136 -6
- package/dist/package/entity/websocket/websocket.dto.d.ts +288 -0
- package/dist/{queue.do-Vog69wnQ.js → queue.do-CIyIpp22.js} +4536 -4517
- package/package.json +1 -1
- package/src/locales/en-US.json +3 -2
- package/src/locales/zh-CN.json +2 -0
- package/src/modules/order-setting/kiosk/interface.ts +16 -0
- package/src/stores/order-setting/mapper.ts +58 -7
- package/src/views/kiosk/settings/KioskDineInSection.vue +4 -5
- package/src/views/kiosk/settings/KioskDisplayStandSection.vue +36 -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 +15 -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,426 @@
|
|
|
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 O, createVNode as k, 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-DUPfN7ti.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-CIyIpp22.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 E } from "./index-B7GFhkAE.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" }, ke = { key: 0 }, Se = { key: 1 }, Pe = { key: 0 }, Oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Te = { class: "fm-typo-en-body-lg-600 block" }, we = { key: 1 }, Ce = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, xe = { 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 }, N = /* @__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", ke, [
|
|
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", Se, "-"))
|
|
61
|
+
]),
|
|
62
|
+
l.value === d(e)("order.activated") ? (c(), y("div", Pe, [
|
|
63
|
+
o("span", Oe, 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", Ce, m(d(e)("order.dineInType")), 1),
|
|
70
|
+
o("div", xe, [
|
|
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" }, Ee = /* @__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
|
+
}), D = {
|
|
104
|
+
enabled: !1,
|
|
105
|
+
prefix: null,
|
|
106
|
+
padDigit: 0,
|
|
107
|
+
standSlotRange: {
|
|
108
|
+
min: 1,
|
|
109
|
+
max: 10
|
|
110
|
+
},
|
|
111
|
+
submitOrderInstruction: {
|
|
112
|
+
payAtCounter: null,
|
|
113
|
+
paid: null
|
|
114
|
+
}
|
|
115
|
+
}, W = {
|
|
116
|
+
enabled: !1,
|
|
117
|
+
submitOrderInstruction: {
|
|
118
|
+
payAtCounter: null,
|
|
119
|
+
paid: null
|
|
120
|
+
}
|
|
121
|
+
}, Ne = {
|
|
122
|
+
dineIn: {
|
|
123
|
+
enabled: !1,
|
|
124
|
+
pickUp: W,
|
|
125
|
+
sequenceNumber: ie.parse({}),
|
|
126
|
+
displayStand: D
|
|
127
|
+
},
|
|
128
|
+
takeaway: {
|
|
129
|
+
enabled: !1,
|
|
130
|
+
submitOrderInstruction: {
|
|
131
|
+
payAtCounter: null,
|
|
132
|
+
paid: null
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
paymentSetting: {
|
|
136
|
+
paymentTypes: [],
|
|
137
|
+
offlinePaymentTypes: [],
|
|
138
|
+
ePaymentTypes: {
|
|
139
|
+
card: {
|
|
140
|
+
terminal: !1,
|
|
141
|
+
nfc: !1
|
|
142
|
+
},
|
|
143
|
+
eWallet: {
|
|
144
|
+
qrPay: !1,
|
|
145
|
+
scanPay: !1
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
menuItem: {
|
|
150
|
+
showAllOnly: !1
|
|
151
|
+
}
|
|
152
|
+
}, x = {
|
|
153
|
+
payAtCounter: null,
|
|
154
|
+
paid: null
|
|
155
|
+
}, Me = (t) => {
|
|
156
|
+
var e;
|
|
157
|
+
return {
|
|
158
|
+
kiosk: De(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
|
|
159
|
+
};
|
|
160
|
+
}, De = (t, e) => {
|
|
161
|
+
var r, l, n, s, u, i, a, p, v;
|
|
162
|
+
return {
|
|
163
|
+
dineIn: We(e ?? {
|
|
164
|
+
current: 0,
|
|
165
|
+
prefix: "#K"
|
|
166
|
+
}, t.dineIn ?? void 0),
|
|
167
|
+
takeaway: {
|
|
168
|
+
enabled: (t == null ? void 0 : t.canTakeaway) ?? !1,
|
|
169
|
+
submitOrderInstruction: (r = t == null ? void 0 : t.takeaway) != null && r.submitOrderInstruction ? {
|
|
170
|
+
payAtCounter: ((n = (l = t.takeaway.submitOrderInstruction) == null ? void 0 : l.payAtCounter) == null ? void 0 : n.en) ?? null,
|
|
171
|
+
paid: ((u = (s = t.takeaway.submitOrderInstruction) == null ? void 0 : s.paid) == null ? void 0 : u.en) ?? null
|
|
172
|
+
} : x
|
|
173
|
+
},
|
|
174
|
+
paymentSetting: {
|
|
175
|
+
paymentTypes: ((i = t == null ? void 0 : t.paymentSetting) == null ? void 0 : i.paymentTypes) ?? [],
|
|
176
|
+
offlinePaymentTypes: ((a = t == null ? void 0 : t.paymentSetting) == null ? void 0 : a.offlinePaymentTypes) ?? [],
|
|
177
|
+
ePaymentTypes: ((p = t == null ? void 0 : t.paymentSetting) == null ? void 0 : p.ePaymentTypes) ?? ce.parse({
|
|
178
|
+
card: {
|
|
179
|
+
terminal: !1,
|
|
180
|
+
nfc: !1
|
|
181
|
+
},
|
|
182
|
+
eWallet: {
|
|
183
|
+
qrPay: !1,
|
|
184
|
+
scanPay: !1
|
|
185
|
+
}
|
|
186
|
+
})
|
|
187
|
+
},
|
|
188
|
+
menuItem: {
|
|
189
|
+
showAllOnly: ((v = t.menuItem) == null ? void 0 : v.showAllOnly) ?? !1
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}, We = (t, e) => {
|
|
193
|
+
var r, l, n, s, u, i, a, p;
|
|
194
|
+
return {
|
|
195
|
+
enabled: !!e,
|
|
196
|
+
sequenceNumber: t,
|
|
197
|
+
pickUp: e != null && e.pickUp ? {
|
|
198
|
+
...e.pickUp,
|
|
199
|
+
submitOrderInstruction: e.pickUp.submitOrderInstruction ? {
|
|
200
|
+
payAtCounter: ((l = (r = e.pickUp.submitOrderInstruction) == null ? void 0 : r.payAtCounter) == null ? void 0 : l.en) ?? null,
|
|
201
|
+
paid: ((s = (n = e.pickUp.submitOrderInstruction) == null ? void 0 : n.paid) == null ? void 0 : s.en) ?? null
|
|
202
|
+
} : x
|
|
203
|
+
} : W,
|
|
204
|
+
displayStand: e != null && e.displayStand ? {
|
|
205
|
+
enabled: e.displayStand.enabled,
|
|
206
|
+
standSlotRange: e.displayStand.standSlotRange,
|
|
207
|
+
prefix: e.displayStand.prefix,
|
|
208
|
+
padDigit: e.displayStand.padDigit,
|
|
209
|
+
submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
|
|
210
|
+
payAtCounter: ((i = (u = e.displayStand.submitOrderInstruction) == null ? void 0 : u.payAtCounter) == null ? void 0 : i.en) ?? null,
|
|
211
|
+
paid: ((p = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : p.en) ?? null
|
|
212
|
+
} : x
|
|
213
|
+
} : D
|
|
214
|
+
};
|
|
215
|
+
}, je = (t) => {
|
|
216
|
+
const e = (n) => {
|
|
217
|
+
var s, u, i, a;
|
|
218
|
+
return {
|
|
219
|
+
requiredSlot: !!n.displayStand,
|
|
220
|
+
displayStand: {
|
|
221
|
+
...n.displayStand,
|
|
222
|
+
submitOrderInstruction: {
|
|
223
|
+
payAtCounter: (s = n.displayStand.submitOrderInstruction) != null && s.payAtCounter ? {
|
|
224
|
+
en: n.displayStand.submitOrderInstruction.payAtCounter
|
|
225
|
+
} : null,
|
|
226
|
+
paid: (u = n.displayStand.submitOrderInstruction) != null && u.paid ? {
|
|
227
|
+
en: n.displayStand.submitOrderInstruction.paid
|
|
228
|
+
} : null
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
pickUp: {
|
|
232
|
+
...n.pickUp,
|
|
233
|
+
submitOrderInstruction: {
|
|
234
|
+
payAtCounter: (i = n.pickUp.submitOrderInstruction) != null && i.payAtCounter ? {
|
|
235
|
+
en: n.pickUp.submitOrderInstruction.payAtCounter
|
|
236
|
+
} : null,
|
|
237
|
+
paid: (a = n.pickUp.submitOrderInstruction) != null && a.paid ? {
|
|
238
|
+
en: n.pickUp.submitOrderInstruction.paid
|
|
239
|
+
} : null
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
}, r = (n) => ({
|
|
244
|
+
canTakeaway: t.takeaway.enabled,
|
|
245
|
+
dineIn: n,
|
|
246
|
+
menuItem: t.menuItem,
|
|
247
|
+
paymentSetting: l(t.paymentSetting)
|
|
248
|
+
}), l = (n) => ({
|
|
249
|
+
paymentTypes: n.paymentTypes,
|
|
250
|
+
offlinePaymentTypes: n.offlinePaymentTypes,
|
|
251
|
+
ePaymentTypes: n.ePaymentTypes
|
|
252
|
+
});
|
|
253
|
+
return t.dineIn.enabled ? {
|
|
254
|
+
kioskSettings: r(e(t.dineIn)),
|
|
255
|
+
kioskDineIn: t.dineIn.sequenceNumber
|
|
256
|
+
} : {
|
|
257
|
+
kioskSettings: r()
|
|
258
|
+
};
|
|
259
|
+
}, M = {
|
|
260
|
+
convertOrderSettingDto: Me,
|
|
261
|
+
toOrderKioskSettingsDto: je
|
|
262
|
+
}, He = ye("orderSetting", () => {
|
|
263
|
+
const t = T({});
|
|
264
|
+
async function e() {
|
|
265
|
+
const s = await B.getOrderSetting();
|
|
266
|
+
l(s);
|
|
267
|
+
}
|
|
268
|
+
async function r() {
|
|
269
|
+
if (t.value.orderSetting && t.value.kiosk) {
|
|
270
|
+
const { _id: s, ...u } = t.value.orderSetting, i = M.toOrderKioskSettingsDto(t.value.kiosk), a = {
|
|
271
|
+
...u,
|
|
272
|
+
kioskSettings: i.kioskSettings
|
|
273
|
+
}, p = await B.updateOrderSetting(a);
|
|
274
|
+
l(p);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function l(s) {
|
|
278
|
+
t.value.orderSetting = s, t.value.kiosk = M.convertOrderSettingDto(s).kiosk;
|
|
279
|
+
}
|
|
280
|
+
function n(s) {
|
|
281
|
+
t.value.kiosk = s;
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
state: t,
|
|
285
|
+
getSetting: e,
|
|
286
|
+
updateKioskSetting: r,
|
|
287
|
+
setKioskOrderSetting: n
|
|
288
|
+
};
|
|
289
|
+
}), Le = { class: "py-[1.5rem]" }, Ye = { class: "flex px-[1.5rem]" }, ze = { class: "flex-[2_2_0%]" }, Ge = { class: "pt-[1.5rem]" }, Je = { class: "flex flex-col gap-10" }, Qe = { class: "flex flex-col gap-2" }, Xe = { class: "fm-typo-en-title-sm-600" }, Ze = { class: "fm-typo-en-title-sm-400" }, et = {
|
|
290
|
+
key: 0,
|
|
291
|
+
class: "flex-[1_1_0%]"
|
|
292
|
+
}, dt = /* @__PURE__ */ I({
|
|
293
|
+
__name: "KioskView",
|
|
294
|
+
setup(t) {
|
|
295
|
+
var F, q;
|
|
296
|
+
const { t: e } = A(), r = te(
|
|
297
|
+
() => import("./KioskSettingView-BChhriPk.js")
|
|
298
|
+
), l = T("device"), n = re(), s = He(), u = ue(), { currentRestaurant: i, restaurants: a, changeRestaurant: p } = de(), v = pe(), h = me(), K = b(() => h.breakpoints.value.xs), S = T(((F = i.value) == null ? void 0 : F._id) ?? void 0), j = b(() => a.value.map((f) => ({
|
|
299
|
+
label: f.profile.name,
|
|
300
|
+
value: f._id
|
|
301
|
+
}))), P = T(((q = i.value) == null ? void 0 : q._id) ?? "");
|
|
302
|
+
function H() {
|
|
303
|
+
var f;
|
|
304
|
+
u.open({
|
|
305
|
+
title: E(e("order.kioskSummary")),
|
|
306
|
+
contentComponent: N,
|
|
307
|
+
contentComponentProps: {
|
|
308
|
+
restaurantId: (f = i.value) == null ? void 0 : f._id,
|
|
309
|
+
devices: n.state.devices,
|
|
310
|
+
kioskOrderSetting: s.state.kiosk,
|
|
311
|
+
dialogType: !0
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
async function U(f) {
|
|
316
|
+
const g = a.value.find((w) => w._id == f);
|
|
317
|
+
await p(g), await s.getSetting(), await n.getDevices(), S.value = f, P.value = f;
|
|
318
|
+
}
|
|
319
|
+
const L = b(() => [
|
|
320
|
+
{
|
|
321
|
+
label: e("order.deviceBinding"),
|
|
322
|
+
value: "device"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
label: e("order.settings"),
|
|
326
|
+
value: "setting"
|
|
327
|
+
}
|
|
328
|
+
]), $ = b(() => n.state.devices);
|
|
329
|
+
async function Y() {
|
|
330
|
+
await n.requestOtp(), u.open({
|
|
331
|
+
title: E(e("order.bindDevice")),
|
|
332
|
+
contentComponent: Ee,
|
|
333
|
+
contentComponentProps: {
|
|
334
|
+
otp: n.state.otp
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
async function z(f) {
|
|
339
|
+
try {
|
|
340
|
+
s.setKioskOrderSetting(f), await s.updateKioskSetting(), v.open({
|
|
341
|
+
title: e("order.kioskSettingSuccess"),
|
|
342
|
+
type: "success"
|
|
343
|
+
});
|
|
344
|
+
} catch {
|
|
345
|
+
v.open({
|
|
346
|
+
title: e("order.kioskSettingFailed"),
|
|
347
|
+
type: "error"
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
return ae(
|
|
352
|
+
() => a.value.length,
|
|
353
|
+
async (f) => {
|
|
354
|
+
S.value === void 0 && a.value.length > 0 && await U(a.value[0]._id);
|
|
355
|
+
},
|
|
356
|
+
{ immediate: !0 }
|
|
357
|
+
), (f, g) => {
|
|
358
|
+
const w = O("FmButton"), G = O("FmPageHead"), J = O("FmTabs"), Q = O("FmSelect");
|
|
359
|
+
return c(), y("div", Le, [
|
|
360
|
+
k(G, {
|
|
361
|
+
title: d(e)("order.kiosk")
|
|
362
|
+
}, {
|
|
363
|
+
append: ne(() => [
|
|
364
|
+
se(k(w, {
|
|
365
|
+
icon: "info",
|
|
366
|
+
variant: "tertiary",
|
|
367
|
+
onClick: H
|
|
368
|
+
}, null, 512), [
|
|
369
|
+
[oe, K.value]
|
|
370
|
+
])
|
|
371
|
+
]),
|
|
372
|
+
_: 1
|
|
373
|
+
}, 8, ["title"]),
|
|
374
|
+
o("div", Ye, [
|
|
375
|
+
o("div", ze, [
|
|
376
|
+
k(J, {
|
|
377
|
+
"model-value": l.value,
|
|
378
|
+
"onUpdate:modelValue": g[0] || (g[0] = (C) => l.value = C),
|
|
379
|
+
items: L.value
|
|
380
|
+
}, null, 8, ["model-value", "items"]),
|
|
381
|
+
o("div", Ge, [
|
|
382
|
+
o("div", Je, [
|
|
383
|
+
o("div", Qe, [
|
|
384
|
+
o("span", Xe, m(d(e)("order.activateLocation")), 1),
|
|
385
|
+
o("span", Ze, m(d(e)("order.selectRestaurant")) + ": ", 1),
|
|
386
|
+
k(Q, {
|
|
387
|
+
class: "w-1/2",
|
|
388
|
+
modelValue: S.value,
|
|
389
|
+
"onUpdate:modelValue": [
|
|
390
|
+
g[1] || (g[1] = (C) => S.value = C),
|
|
391
|
+
U
|
|
392
|
+
],
|
|
393
|
+
items: j.value,
|
|
394
|
+
placeholder: d(e)("order.selectItem")
|
|
395
|
+
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
396
|
+
]),
|
|
397
|
+
l.value == "device" ? (c(), R(le, {
|
|
398
|
+
key: 0,
|
|
399
|
+
devices: $.value,
|
|
400
|
+
"request-otp": Y
|
|
401
|
+
}, null, 8, ["devices"])) : _("", !0),
|
|
402
|
+
l.value == "setting" ? (c(), R(d(r), {
|
|
403
|
+
key: `KioskSettingView-${P.value}`,
|
|
404
|
+
"restaurant-id": P.value,
|
|
405
|
+
onUpdateKioskOrderSetting: z,
|
|
406
|
+
form: d(s).state.kiosk ?? d(Ne)
|
|
407
|
+
}, null, 8, ["restaurant-id", "form"])) : _("", !0)
|
|
408
|
+
])
|
|
409
|
+
])
|
|
410
|
+
]),
|
|
411
|
+
K.value ? _("", !0) : (c(), y("div", et, [
|
|
412
|
+
k(N, {
|
|
413
|
+
"restaurant-id": P.value,
|
|
414
|
+
devices: $.value,
|
|
415
|
+
"kiosk-order-setting": d(s).state.kiosk,
|
|
416
|
+
dialogType: !1
|
|
417
|
+
}, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
|
|
418
|
+
]))
|
|
419
|
+
])
|
|
420
|
+
]);
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
});
|
|
424
|
+
export {
|
|
425
|
+
dt as default
|
|
426
|
+
};
|
|
@@ -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-CIyIpp22.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-8NyoNely.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-CaYWSLe1.js";
|
|
13
|
+
import { s as as, a as Df, O as qo } from "./index-B7GFhkAE.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
|
})
|
|
@@ -61,7 +61,7 @@ const D = {
|
|
|
61
61
|
customerItemRemarkSublabel: "Customer can attach remark to item",
|
|
62
62
|
customOfflinePayment: "Custom Offline Payment",
|
|
63
63
|
customOfflinePaymentHeader: "Custom offline payments",
|
|
64
|
-
customServiceCharge: "Custom
|
|
64
|
+
customServiceCharge: "Custom Service Charge",
|
|
65
65
|
customTime: "Custom time",
|
|
66
66
|
day: "Day",
|
|
67
67
|
days: "days",
|
|
@@ -165,6 +165,7 @@ const D = {
|
|
|
165
165
|
orderSetting: "Order Setting",
|
|
166
166
|
orderType: "Order Type",
|
|
167
167
|
padDigit: "Pad Digit",
|
|
168
|
+
paid: "Paid",
|
|
168
169
|
payAtCounter: "Pay at Counter",
|
|
169
170
|
paymentMethod: "Payment Method",
|
|
170
171
|
paymentType: "Payment Type",
|
|
@@ -213,6 +214,7 @@ const D = {
|
|
|
213
214
|
staticQRcode: "Static QR code",
|
|
214
215
|
staticQRcodeSublabel: "Customer can order with static QR code",
|
|
215
216
|
status: "Status",
|
|
217
|
+
submitOrderInstruction: "Submit order instruction",
|
|
216
218
|
success: "SUCCESS",
|
|
217
219
|
sunday: "Sunday",
|
|
218
220
|
syncMenu: "Sync Menu",
|
|
@@ -424,6 +426,7 @@ const D = {
|
|
|
424
426
|
orderSetting: "订单设置",
|
|
425
427
|
orderType: "订单类型",
|
|
426
428
|
padDigit: "位数",
|
|
429
|
+
paid: "已付款",
|
|
427
430
|
payAtCounter: "在柜台付款",
|
|
428
431
|
paymentMethod: "付款方式",
|
|
429
432
|
paymentType: "交易类型",
|
|
@@ -471,6 +474,7 @@ const D = {
|
|
|
471
474
|
staticQRcode: "静态二维码",
|
|
472
475
|
staticQRcodeSublabel: "客户可以通过静态二维码下单",
|
|
473
476
|
status: "状态",
|
|
477
|
+
submitOrderInstruction: "提交订单文本",
|
|
474
478
|
success: "成功",
|
|
475
479
|
sunday: "星期日",
|
|
476
480
|
syncMenu: "同步菜单",
|
|
@@ -542,14 +546,14 @@ function U({
|
|
|
542
546
|
}) {
|
|
543
547
|
const e = [], a = n / 6371 * (180 / Math.PI), r = a / Math.cos(t.lat * (Math.PI / 180));
|
|
544
548
|
for (let o = 0; o < 361; o += 45) {
|
|
545
|
-
const
|
|
549
|
+
const d = o * (Math.PI / 180), i = t.lng + r * Math.cos(d), p = t.lat + a * Math.sin(d), s = v(), l = new s.maps.LatLng(p, i, !0);
|
|
546
550
|
e.push(l);
|
|
547
551
|
}
|
|
548
552
|
return e.map((o) => ({ lat: o.lat(), lng: o.lng() }));
|
|
549
553
|
}
|
|
550
554
|
function V(t) {
|
|
551
555
|
if (!t.length) return;
|
|
552
|
-
const { lat: n, lng: e } = y(t[0]), { maxLng: a, minLng: r, maxLat: o, minLat:
|
|
556
|
+
const { lat: n, lng: e } = y(t[0]), { maxLng: a, minLng: r, maxLat: o, minLat: d } = t.reduce((i, p) => {
|
|
553
557
|
const { lng: s, lat: l } = y(p);
|
|
554
558
|
return s > i.maxLng && (i.maxLng = s), s < i.minLng && (i.minLng = s), l > i.maxLat && (i.maxLat = l), l < i.minLat && (i.minLat = l), i;
|
|
555
559
|
}, {
|
|
@@ -560,16 +564,16 @@ function V(t) {
|
|
|
560
564
|
});
|
|
561
565
|
return {
|
|
562
566
|
lng: r + (a - r) / 2,
|
|
563
|
-
lat:
|
|
567
|
+
lat: d + (o - d) / 2
|
|
564
568
|
};
|
|
565
569
|
}
|
|
566
|
-
class
|
|
570
|
+
class c {
|
|
567
571
|
constructor(n = null, e = {}) {
|
|
568
572
|
if (this.apiKey = n, this.options = e, typeof window > "u")
|
|
569
573
|
throw new Error("google-maps is supported only in browser environment");
|
|
570
574
|
}
|
|
571
575
|
load() {
|
|
572
|
-
return typeof this.api < "u" ? Promise.resolve(this.api) : typeof this.loader < "u" ? this.loader : (window[
|
|
576
|
+
return typeof this.api < "u" ? Promise.resolve(this.api) : typeof this.loader < "u" ? this.loader : (window[c.CALLBACK_NAME] = () => {
|
|
573
577
|
if (this.api = window.google, typeof this.resolve > "u")
|
|
574
578
|
throw new Error("Should not happen");
|
|
575
579
|
this.resolve(this.api);
|
|
@@ -585,7 +589,7 @@ class d {
|
|
|
585
589
|
}
|
|
586
590
|
createUrl() {
|
|
587
591
|
const n = [
|
|
588
|
-
`callback=${
|
|
592
|
+
`callback=${c.CALLBACK_NAME}`
|
|
589
593
|
];
|
|
590
594
|
this.apiKey && n.push(`key=${this.apiKey}`);
|
|
591
595
|
for (let e in this.options)
|
|
@@ -596,14 +600,14 @@ class d {
|
|
|
596
600
|
return `https://maps.googleapis.com/maps/api/js?${n.join("&")}`;
|
|
597
601
|
}
|
|
598
602
|
}
|
|
599
|
-
|
|
603
|
+
c.CALLBACK_NAME = "_dk_google_maps_loader_cb";
|
|
600
604
|
var x = { googleMap: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", firebase: {}, gtm: { debug: !1 }, r2: null };
|
|
601
605
|
const M = { class: "flex-1 overflow-auto" }, W = /* @__PURE__ */ S({
|
|
602
606
|
__name: "App",
|
|
603
607
|
setup(t) {
|
|
604
608
|
async function n() {
|
|
605
609
|
if (v()) return;
|
|
606
|
-
const a = await new
|
|
610
|
+
const a = await new c(x.googleMap, {
|
|
607
611
|
libraries: ["places"]
|
|
608
612
|
}).load();
|
|
609
613
|
w(a);
|
|
@@ -628,22 +632,22 @@ const M = { class: "flex-1 overflow-auto" }, W = /* @__PURE__ */ S({
|
|
|
628
632
|
{
|
|
629
633
|
path: u.KioskRoute,
|
|
630
634
|
name: "Kiosk",
|
|
631
|
-
component: () => import("./KioskView-
|
|
635
|
+
component: () => import("./KioskView-DPU-oQ1H.js")
|
|
632
636
|
},
|
|
633
637
|
{
|
|
634
638
|
path: u.KioskDeviceRoute,
|
|
635
639
|
name: "Kiosk Device",
|
|
636
|
-
component: () => import("./KioskDevicesView-
|
|
640
|
+
component: () => import("./KioskDevicesView-BdJCcotz.js")
|
|
637
641
|
},
|
|
638
642
|
{
|
|
639
643
|
path: u.KioskOrderSettingRoute,
|
|
640
644
|
name: "Kiosk Order Setting",
|
|
641
|
-
component: () => import("./KioskSettingView-
|
|
645
|
+
component: () => import("./KioskSettingView-BChhriPk.js")
|
|
642
646
|
},
|
|
643
647
|
{
|
|
644
648
|
path: u.OrderSettingView,
|
|
645
649
|
name: "Order Setting View",
|
|
646
|
-
component: () => import("./OrderSettingsView-
|
|
650
|
+
component: () => import("./OrderSettingsView-BOiflwB_.js")
|
|
647
651
|
}
|
|
648
652
|
], q = {
|
|
649
653
|
"en-US": C,
|
package/dist/app.js
CHANGED
|
@@ -167,6 +167,7 @@ export declare const i18nMessages: {
|
|
|
167
167
|
orderSetting: string;
|
|
168
168
|
orderType: string;
|
|
169
169
|
padDigit: string;
|
|
170
|
+
paid: string;
|
|
170
171
|
payAtCounter: string;
|
|
171
172
|
paymentMethod: string;
|
|
172
173
|
paymentType: string;
|
|
@@ -215,6 +216,7 @@ export declare const i18nMessages: {
|
|
|
215
216
|
staticQRcode: string;
|
|
216
217
|
staticQRcodeSublabel: string;
|
|
217
218
|
status: string;
|
|
219
|
+
submitOrderInstruction: string;
|
|
218
220
|
success: string;
|
|
219
221
|
sunday: string;
|
|
220
222
|
syncMenu: string;
|
|
@@ -427,6 +429,7 @@ export declare const i18nMessages: {
|
|
|
427
429
|
orderSetting: string;
|
|
428
430
|
orderType: string;
|
|
429
431
|
padDigit: string;
|
|
432
|
+
paid: string;
|
|
430
433
|
payAtCounter: string;
|
|
431
434
|
paymentMethod: string;
|
|
432
435
|
paymentType: string;
|
|
@@ -474,6 +477,7 @@ export declare const i18nMessages: {
|
|
|
474
477
|
staticQRcode: string;
|
|
475
478
|
staticQRcodeSublabel: string;
|
|
476
479
|
status: string;
|
|
480
|
+
submitOrderInstruction: string;
|
|
477
481
|
success: string;
|
|
478
482
|
sunday: string;
|
|
479
483
|
syncMenu: string;
|