@feedmepos/mf-order-setting 0.0.49 → 0.0.50
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-Ch_mWJz9.js → KioskDevicesView-u14hzPbE.js} +1 -1
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-DBgRDIoS.js +501 -0
- package/dist/{KioskSettingView-CaBhf48e.js → KioskSettingView-DmvtZcV1.js} +1 -1
- package/dist/KioskView-M8V91gD5.js +474 -0
- package/dist/{OrderSettingsView-CRgoLOD2.js → OrderSettingsView-Bl3LshG3.js} +4 -4
- package/dist/{app-CDTAjXj9.js → app-CLewMjcd.js} +67 -19
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-dI_j30pv.js → dayjs.min-DCTYRWyD.js} +1 -1
- package/dist/frontend/mf-order/src/app.d.ts +48 -0
- package/dist/frontend/mf-order/src/main.d.ts +48 -0
- package/dist/frontend/mf-order/src/modules/kiosk/interface.d.ts +1 -0
- package/dist/frontend/mf-order/src/stores/kiosk/index.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/kiosk/devices/KioskDevicesView.vue.d.ts +6 -3
- package/dist/frontend/mf-order/src/views/order-settings/servicecharge/ServiceChargeRule.vue.d.ts +2 -2
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-B8U5Sawr.js → index-B7LtJeBJ.js} +2 -2
- package/dist/{menu.dto-qVeqpSdz.js → menu.dto-Co7iXHNr.js} +6345 -6286
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +104 -12
- package/dist/package/entity/incoming-order/incoming-order.dto.d.ts +106 -6
- package/dist/package/entity/kiosk/kiosk.do.d.ts +32 -0
- package/dist/package/entity/kiosk/kiosk.dto.d.ts +44 -0
- package/dist/package/entity/order/order.enum.d.ts +2 -0
- package/dist/package/entity/order-platform/external/order/external-order.do.d.ts +62 -0
- package/dist/package/entity/order-platform/external/order/external-order.dto.d.ts +178 -0
- package/dist/package/entity/order-platform/grabfood/grabfood-menu.do.d.ts +15 -0
- package/dist/package/entity/order-platform/grabfood/grabfood-omni.do.d.ts +1834 -15
- package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +13 -13
- package/dist/package/entity/order-platform/grabfood/grabfood-settings.do.d.ts +3 -0
- package/dist/package/entity/order-platform/grabfood/grabfood-webhook.dto.d.ts +528 -805
- package/dist/package/entity/order-platform/grabfood/grabfood.dto.d.ts +8 -5
- package/dist/package/entity/order-platform/grabfood/grabfood.enum.d.ts +1 -1
- package/dist/package/entity/order-platform/order-platform.dto.d.ts +0 -20
- package/dist/package/entity/queue/queue.dto.d.ts +20 -0
- package/package.json +1 -1
- package/src/locales/en-US.json +12 -0
- package/src/locales/ja-JP.json +12 -0
- package/src/locales/th-TH.json +12 -0
- package/src/locales/zh-CN.json +12 -0
- package/src/modules/kiosk/interface.ts +1 -0
- package/src/stores/kiosk/mapper.ts +1 -0
- package/src/views/kiosk/KioskSummary.vue +37 -31
- package/src/views/kiosk/KioskView.vue +4 -1
- package/src/views/kiosk/devices/KioskDeviceCard.vue +205 -89
- package/src/views/kiosk/devices/KioskDevicesView.vue +133 -17
- package/dist/KioskDevicesView.vue_vue_type_script_setup_true_lang-DV2HYd8u.js +0 -306
- package/dist/KioskView-BGm-emCw.js +0 -452
|
@@ -0,0 +1,474 @@
|
|
|
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-DBgRDIoS.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-Co7iXHNr.js";
|
|
5
|
+
import { useDialog as ye, useSnackbar as me, useBreakpoints as fe } from "@feedmepos/ui-library";
|
|
6
|
+
import { defineStore as _e } from "pinia";
|
|
7
|
+
import { O as E, c as M } from "./index-B7LtJeBJ.js";
|
|
8
|
+
const ve = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "fm-typo-en-title-sm-600"
|
|
11
|
+
}, be = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "my-[0.25rem]"
|
|
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
|
+
key: 0,
|
|
16
|
+
class: "flex flex-col gap-1"
|
|
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
|
+
key: 0,
|
|
19
|
+
class: "fm-typo-en-body-sm-600"
|
|
20
|
+
}, Ce = ["title"], Ie = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "fm-typo-en-body-lg-600"
|
|
23
|
+
}, Ae = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "flex flex-col gap-1"
|
|
26
|
+
}, Oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ke = { class: "fm-typo-en-body-lg-600" }, Se = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "flex flex-col gap-1"
|
|
29
|
+
}, Ue = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, $e = { class: "fm-typo-en-body-lg-600" }, Fe = {
|
|
30
|
+
key: 2,
|
|
31
|
+
class: "flex flex-col gap-1"
|
|
32
|
+
}, qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Re = { class: "fm-typo-en-body-lg-600" }, De = {
|
|
33
|
+
key: 3,
|
|
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__ */ S({
|
|
36
|
+
__name: "KioskSummary",
|
|
37
|
+
props: {
|
|
38
|
+
restaurantId: {},
|
|
39
|
+
devices: {},
|
|
40
|
+
kioskOrderSetting: {},
|
|
41
|
+
dialogType: { type: Boolean }
|
|
42
|
+
},
|
|
43
|
+
setup(t) {
|
|
44
|
+
const { t: e } = U(), o = t, r = h(() => {
|
|
45
|
+
var a;
|
|
46
|
+
return (a = o.kioskOrderSetting) != null && a.dineIn.enabled ? e("order.activated") : e("order.deactivated");
|
|
47
|
+
}), n = h(() => {
|
|
48
|
+
var a;
|
|
49
|
+
return (a = o.kioskOrderSetting) != null && a.takeaway.enabled ? e("order.activated") : e("order.deactivated");
|
|
50
|
+
}), s = h(() => {
|
|
51
|
+
var a, y;
|
|
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
|
+
}), p = h(() => {
|
|
54
|
+
var a;
|
|
55
|
+
return ((a = o.kioskOrderSetting) == null ? void 0 : a.paymentSetting.paymentTypes.includes(V.enum.cash)) ?? !1;
|
|
56
|
+
}), d = h(() => {
|
|
57
|
+
var y, _;
|
|
58
|
+
const a = [];
|
|
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
|
+
}
|
|
65
|
+
return a.join(", ");
|
|
66
|
+
});
|
|
67
|
+
return (a, y) => (i(), f("div", {
|
|
68
|
+
class: Z(a.dialogType ? "" : ["p-[1.5rem] border fm-corner-radius-lg flex flex-col gap-5 fixed ml-40 w-[320px]"])
|
|
69
|
+
}, [
|
|
70
|
+
a.dialogType ? b("", !0) : (i(), f("span", ve, u(c(e)("order.kioskSummary")), 1)),
|
|
71
|
+
a.dialogType ? b("", !0) : (i(), f("hr", be)),
|
|
72
|
+
l("div", he, [
|
|
73
|
+
l("div", xe, [
|
|
74
|
+
l("span", Pe, u(c(e)("order.kioskDisplay")), 1),
|
|
75
|
+
a.devices.length > 0 ? (i(), f("div", we, [
|
|
76
|
+
(i(!0), f(ee, null, te(a.devices, (_) => (i(), f("div", {
|
|
77
|
+
key: _.machineId,
|
|
78
|
+
class: "fm-typo-en-body-sm-400 flex items-center gap-2"
|
|
79
|
+
}, [
|
|
80
|
+
l("span", ge, u(_.deviceAppType === "TABLET_APP" ? "T" : "K"), 1),
|
|
81
|
+
_.slotInfo ? (i(), f("span", Te, u(_.slotInfo), 1)) : b("", !0),
|
|
82
|
+
l("span", {
|
|
83
|
+
class: "text-fm-color-typo-secondary truncate flex-1",
|
|
84
|
+
title: _.name
|
|
85
|
+
}, u(_.name), 9, Ce)
|
|
86
|
+
]))), 128))
|
|
87
|
+
])) : (i(), f("div", Ie, "-"))
|
|
88
|
+
]),
|
|
89
|
+
r.value === c(e)("order.activated") ? (i(), f("div", Ae, [
|
|
90
|
+
l("span", Oe, u(c(e)("order.dineIn")), 1),
|
|
91
|
+
l("div", Ke, u(r.value), 1)
|
|
92
|
+
])) : b("", !0),
|
|
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
|
+
])) : b("", !0),
|
|
97
|
+
n.value === c(e)("order.activated") ? (i(), f("div", Fe, [
|
|
98
|
+
l("span", qe, u(c(e)("order.takeaway")), 1),
|
|
99
|
+
l("div", Re, u(n.value), 1)
|
|
100
|
+
])) : b("", !0),
|
|
101
|
+
d.value || p.value ? (i(), f("div", De, [
|
|
102
|
+
l("span", Be, u(c(e)("order.acceptedPayment")), 1),
|
|
103
|
+
l("div", Ve, [
|
|
104
|
+
p.value ? (i(), f("div", Ee, u(c(e)("order.offlinePayment")), 1)) : b("", !0),
|
|
105
|
+
l("div", null, u(d.value), 1)
|
|
106
|
+
])
|
|
107
|
+
])) : b("", !0)
|
|
108
|
+
])
|
|
109
|
+
], 2));
|
|
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__ */ S({
|
|
112
|
+
__name: "KioskOtpDialog",
|
|
113
|
+
props: {
|
|
114
|
+
otp: {}
|
|
115
|
+
},
|
|
116
|
+
setup(t) {
|
|
117
|
+
const { t: e } = U();
|
|
118
|
+
return (o, r) => (i(), f("div", Me, [
|
|
119
|
+
l("span", Ne, u(c(e)("order.bindDeviceMessage")), 1),
|
|
120
|
+
l("div", We, u(o.otp), 1)
|
|
121
|
+
]));
|
|
122
|
+
}
|
|
123
|
+
}), L = {
|
|
124
|
+
enabled: !1,
|
|
125
|
+
prefix: null,
|
|
126
|
+
padDigit: 0,
|
|
127
|
+
standSlotRange: {
|
|
128
|
+
min: 1,
|
|
129
|
+
max: 10
|
|
130
|
+
},
|
|
131
|
+
enablePaxDialog: !1,
|
|
132
|
+
submitOrderInstruction: {
|
|
133
|
+
payAtCounter: null,
|
|
134
|
+
paid: null
|
|
135
|
+
}
|
|
136
|
+
}, je = {
|
|
137
|
+
enabled: !1,
|
|
138
|
+
submitOrderInstruction: {
|
|
139
|
+
payAtCounter: null,
|
|
140
|
+
paid: null
|
|
141
|
+
}
|
|
142
|
+
}, j = {
|
|
143
|
+
enabled: !1,
|
|
144
|
+
submitOrderInstruction: {
|
|
145
|
+
payAtCounter: null,
|
|
146
|
+
paid: null
|
|
147
|
+
},
|
|
148
|
+
enablePaxDialog: !1
|
|
149
|
+
}, He = {
|
|
150
|
+
dineIn: {
|
|
151
|
+
enabled: !1,
|
|
152
|
+
pickUp: j,
|
|
153
|
+
sequenceNumber: ie.parse({}),
|
|
154
|
+
displayStand: L
|
|
155
|
+
},
|
|
156
|
+
takeaway: je,
|
|
157
|
+
paymentSetting: {
|
|
158
|
+
paymentTypes: [],
|
|
159
|
+
offlinePaymentTypes: [],
|
|
160
|
+
ePaymentTypes: {
|
|
161
|
+
terminal: !1,
|
|
162
|
+
card: {
|
|
163
|
+
terminal: !1,
|
|
164
|
+
nfc: !1
|
|
165
|
+
},
|
|
166
|
+
eWallet: {
|
|
167
|
+
terminalQrPay: !1,
|
|
168
|
+
terminalScanPay: !1,
|
|
169
|
+
qrPay: !1,
|
|
170
|
+
scanPay: !1
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
menuItem: {
|
|
175
|
+
showAllOnly: !1
|
|
176
|
+
}
|
|
177
|
+
}, K = {
|
|
178
|
+
payAtCounter: null,
|
|
179
|
+
paid: null
|
|
180
|
+
}, Ye = (t) => {
|
|
181
|
+
var e;
|
|
182
|
+
return {
|
|
183
|
+
kiosk: ze(t.kioskSettings, (e = t.sequenceSettings) == null ? void 0 : e.kioskDineIn)
|
|
184
|
+
};
|
|
185
|
+
}, ze = (t, e) => {
|
|
186
|
+
var o, r, n, s, p, d, a, y, _, v, P;
|
|
187
|
+
return {
|
|
188
|
+
dineIn: Qe(
|
|
189
|
+
e ?? {
|
|
190
|
+
current: 0,
|
|
191
|
+
prefix: "#K"
|
|
192
|
+
},
|
|
193
|
+
(t == null ? void 0 : t.dineIn) ?? void 0
|
|
194
|
+
),
|
|
195
|
+
takeaway: {
|
|
196
|
+
enabled: (t == null ? void 0 : t.canTakeaway) ?? !1,
|
|
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,
|
|
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
|
|
200
|
+
} : K
|
|
201
|
+
},
|
|
202
|
+
paymentSetting: {
|
|
203
|
+
paymentTypes: ((y = t == null ? void 0 : t.paymentSetting) == null ? void 0 : y.paymentTypes) ?? [],
|
|
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({
|
|
206
|
+
card: {
|
|
207
|
+
terminal: !1,
|
|
208
|
+
nfc: !1
|
|
209
|
+
},
|
|
210
|
+
eWallet: {
|
|
211
|
+
qrPay: !1,
|
|
212
|
+
scanPay: !1
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
},
|
|
216
|
+
menuItem: {
|
|
217
|
+
showAllOnly: ((P = t == null ? void 0 : t.menuItem) == null ? void 0 : P.showAllOnly) ?? !1
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}, Qe = (t, e) => {
|
|
221
|
+
var o, r, n, s, p, d, a, y;
|
|
222
|
+
return {
|
|
223
|
+
enabled: !!e,
|
|
224
|
+
sequenceNumber: t,
|
|
225
|
+
pickUp: e != null && e.pickUp ? {
|
|
226
|
+
...e.pickUp,
|
|
227
|
+
submitOrderInstruction: e.pickUp.submitOrderInstruction ? {
|
|
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,
|
|
231
|
+
enablePaxDialog: e.pickUp.enablePaxDialog ? e.pickUp.enablePaxDialog : !1
|
|
232
|
+
} : j,
|
|
233
|
+
displayStand: e != null && e.displayStand ? {
|
|
234
|
+
enabled: e.displayStand.enabled,
|
|
235
|
+
standSlotRange: e.displayStand.standSlotRange,
|
|
236
|
+
prefix: e.displayStand.prefix,
|
|
237
|
+
padDigit: e.displayStand.padDigit,
|
|
238
|
+
enablePaxDialog: e.displayStand.enablePaxDialog ?? !1,
|
|
239
|
+
submitOrderInstruction: e.displayStand.submitOrderInstruction ? {
|
|
240
|
+
payAtCounter: ((d = (p = e.displayStand.submitOrderInstruction) == null ? void 0 : p.payAtCounter) == null ? void 0 : d.en) ?? null,
|
|
241
|
+
paid: ((y = (a = e.displayStand.submitOrderInstruction) == null ? void 0 : a.paid) == null ? void 0 : y.en) ?? null
|
|
242
|
+
} : K
|
|
243
|
+
} : L
|
|
244
|
+
};
|
|
245
|
+
}, ke = (t) => {
|
|
246
|
+
const e = (n) => {
|
|
247
|
+
var s, p, d, a;
|
|
248
|
+
return {
|
|
249
|
+
requiredSlot: !!n.displayStand,
|
|
250
|
+
displayStand: {
|
|
251
|
+
...n.displayStand,
|
|
252
|
+
submitOrderInstruction: {
|
|
253
|
+
payAtCounter: (s = n.displayStand.submitOrderInstruction) != null && s.payAtCounter ? {
|
|
254
|
+
en: n.displayStand.submitOrderInstruction.payAtCounter
|
|
255
|
+
} : null,
|
|
256
|
+
paid: (p = n.displayStand.submitOrderInstruction) != null && p.paid ? {
|
|
257
|
+
en: n.displayStand.submitOrderInstruction.paid
|
|
258
|
+
} : null
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
pickUp: {
|
|
262
|
+
...n.pickUp,
|
|
263
|
+
submitOrderInstruction: {
|
|
264
|
+
payAtCounter: (d = n.pickUp.submitOrderInstruction) != null && d.payAtCounter ? {
|
|
265
|
+
en: n.pickUp.submitOrderInstruction.payAtCounter
|
|
266
|
+
} : null,
|
|
267
|
+
paid: (a = n.pickUp.submitOrderInstruction) != null && a.paid ? {
|
|
268
|
+
en: n.pickUp.submitOrderInstruction.paid
|
|
269
|
+
} : null
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
}, o = (n) => ({
|
|
274
|
+
canTakeaway: t.takeaway.enabled,
|
|
275
|
+
dineIn: n,
|
|
276
|
+
menuItem: t.menuItem,
|
|
277
|
+
paymentSetting: r(t.paymentSetting),
|
|
278
|
+
takeaway: t.takeaway.submitOrderInstruction ? {
|
|
279
|
+
submitOrderInstruction: {
|
|
280
|
+
payAtCounter: t.takeaway.submitOrderInstruction.payAtCounter ? {
|
|
281
|
+
en: t.takeaway.submitOrderInstruction.payAtCounter
|
|
282
|
+
} : null,
|
|
283
|
+
paid: t.takeaway.submitOrderInstruction.paid ? {
|
|
284
|
+
en: t.takeaway.submitOrderInstruction.paid
|
|
285
|
+
} : null
|
|
286
|
+
}
|
|
287
|
+
} : void 0
|
|
288
|
+
}), r = (n) => ({
|
|
289
|
+
paymentTypes: n.paymentTypes,
|
|
290
|
+
offlinePaymentTypes: n.offlinePaymentTypes,
|
|
291
|
+
ePaymentTypes: n.ePaymentTypes
|
|
292
|
+
});
|
|
293
|
+
return t.dineIn.enabled ? {
|
|
294
|
+
kioskSettings: o(e(t.dineIn)),
|
|
295
|
+
kioskDineIn: t.dineIn.sequenceNumber
|
|
296
|
+
} : {
|
|
297
|
+
kioskSettings: o()
|
|
298
|
+
};
|
|
299
|
+
}, W = {
|
|
300
|
+
convertOrderSettingDto: Ye,
|
|
301
|
+
toOrderKioskSettingsDto: ke
|
|
302
|
+
}, Ge = _e("orderSetting", () => {
|
|
303
|
+
const t = I({});
|
|
304
|
+
async function e() {
|
|
305
|
+
const s = await E.getOrderSetting();
|
|
306
|
+
r(s);
|
|
307
|
+
}
|
|
308
|
+
async function o() {
|
|
309
|
+
if (t.value.orderSetting && t.value.kiosk) {
|
|
310
|
+
const { _id: s, ...p } = t.value.orderSetting, d = W.toOrderKioskSettingsDto(t.value.kiosk), a = {
|
|
311
|
+
...p,
|
|
312
|
+
kioskSettings: d.kioskSettings
|
|
313
|
+
}, y = await E.updateOrderSetting(a);
|
|
314
|
+
r(y);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function r(s) {
|
|
318
|
+
t.value.orderSetting = s, t.value.kiosk = W.convertOrderSettingDto(s).kiosk;
|
|
319
|
+
}
|
|
320
|
+
function n(s) {
|
|
321
|
+
t.value.kiosk = s;
|
|
322
|
+
}
|
|
323
|
+
return {
|
|
324
|
+
state: t.value,
|
|
325
|
+
getSetting: e,
|
|
326
|
+
updateKioskSetting: o,
|
|
327
|
+
setKioskOrderSetting: n
|
|
328
|
+
};
|
|
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 = {
|
|
330
|
+
key: 0,
|
|
331
|
+
class: "flex-[1_1_0%]"
|
|
332
|
+
}, yt = /* @__PURE__ */ S({
|
|
333
|
+
__name: "KioskView",
|
|
334
|
+
setup(t) {
|
|
335
|
+
var R, D;
|
|
336
|
+
const { t: e } = U(), o = ae(
|
|
337
|
+
() => import("./KioskSettingView-DmvtZcV1.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) => ({
|
|
339
|
+
label: m.profile.name,
|
|
340
|
+
value: m._id
|
|
341
|
+
}))), w = I(((D = d.value) == null ? void 0 : D._id) ?? "");
|
|
342
|
+
function Y() {
|
|
343
|
+
var m;
|
|
344
|
+
p.open({
|
|
345
|
+
title: M(e("order.kioskSummary")),
|
|
346
|
+
contentComponent: N,
|
|
347
|
+
contentComponentProps: {
|
|
348
|
+
restaurantId: (m = d.value) == null ? void 0 : m._id,
|
|
349
|
+
devices: n.state.devices,
|
|
350
|
+
kioskOrderSetting: s.state.kiosk,
|
|
351
|
+
dialogType: !0
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
async function $(m) {
|
|
356
|
+
const x = a.value.find((A) => A._id == m);
|
|
357
|
+
await y(x), await F(), T.value = m, w.value = m;
|
|
358
|
+
}
|
|
359
|
+
async function F() {
|
|
360
|
+
await s.getSetting(), await n.getDevices();
|
|
361
|
+
}
|
|
362
|
+
const z = h(() => [
|
|
363
|
+
{
|
|
364
|
+
label: e("order.deviceBinding"),
|
|
365
|
+
value: "device"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
label: e("order.settings"),
|
|
369
|
+
value: "setting"
|
|
370
|
+
}
|
|
371
|
+
]), q = h(() => n.state.devices);
|
|
372
|
+
async function Q() {
|
|
373
|
+
await n.requestOtp(), p.open({
|
|
374
|
+
title: M(e("order.bindDevice")),
|
|
375
|
+
contentComponent: Le,
|
|
376
|
+
contentComponentProps: {
|
|
377
|
+
otp: n.state.otp
|
|
378
|
+
}
|
|
379
|
+
}).onClose(async () => {
|
|
380
|
+
await n.getDevices();
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
async function k(m) {
|
|
384
|
+
try {
|
|
385
|
+
s.setKioskOrderSetting(m), await s.updateKioskSetting(), _.open({
|
|
386
|
+
title: e("order.kioskSettingSuccess"),
|
|
387
|
+
type: "success"
|
|
388
|
+
});
|
|
389
|
+
} catch {
|
|
390
|
+
_.open({
|
|
391
|
+
title: e("order.kioskSettingFailed"),
|
|
392
|
+
type: "error"
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
return ne(async () => {
|
|
397
|
+
var m;
|
|
398
|
+
(m = d.value) != null && m._id && (w.value = d.value._id, await F());
|
|
399
|
+
}), se(
|
|
400
|
+
() => a.value.length,
|
|
401
|
+
async (m) => {
|
|
402
|
+
T.value === void 0 && a.value.length > 0 && await $(a.value[0]._id);
|
|
403
|
+
},
|
|
404
|
+
{ immediate: !0 }
|
|
405
|
+
), (m, x) => {
|
|
406
|
+
const A = C("FmButton"), G = C("FmPageHead"), J = C("FmTabs"), X = C("FmSelect");
|
|
407
|
+
return i(), f("div", Je, [
|
|
408
|
+
g(G, {
|
|
409
|
+
title: c(e)("order.kiosk")
|
|
410
|
+
}, {
|
|
411
|
+
append: oe(() => [
|
|
412
|
+
le(g(A, {
|
|
413
|
+
icon: "info",
|
|
414
|
+
variant: "tertiary",
|
|
415
|
+
onClick: Y
|
|
416
|
+
}, null, 512), [
|
|
417
|
+
[re, P.value]
|
|
418
|
+
])
|
|
419
|
+
]),
|
|
420
|
+
_: 1
|
|
421
|
+
}, 8, ["title"]),
|
|
422
|
+
l("div", Xe, [
|
|
423
|
+
l("div", Ze, [
|
|
424
|
+
g(J, {
|
|
425
|
+
"model-value": r.value,
|
|
426
|
+
"onUpdate:modelValue": x[0] || (x[0] = (O) => r.value = O),
|
|
427
|
+
items: z.value
|
|
428
|
+
}, null, 8, ["model-value", "items"]),
|
|
429
|
+
l("div", et, [
|
|
430
|
+
l("div", tt, [
|
|
431
|
+
l("div", at, [
|
|
432
|
+
l("span", nt, u(c(e)("order.activateLocation")), 1),
|
|
433
|
+
l("span", st, u(c(e)("order.selectRestaurant")) + ": ", 1),
|
|
434
|
+
g(X, {
|
|
435
|
+
class: "w-1/2",
|
|
436
|
+
modelValue: T.value,
|
|
437
|
+
"onUpdate:modelValue": [
|
|
438
|
+
x[1] || (x[1] = (O) => T.value = O),
|
|
439
|
+
$
|
|
440
|
+
],
|
|
441
|
+
items: H.value,
|
|
442
|
+
placeholder: c(e)("order.selectItem")
|
|
443
|
+
}, null, 8, ["modelValue", "items", "placeholder"])
|
|
444
|
+
]),
|
|
445
|
+
r.value == "device" ? (i(), B(de, {
|
|
446
|
+
key: 0,
|
|
447
|
+
devices: q.value,
|
|
448
|
+
onRequestOtp: Q
|
|
449
|
+
}, null, 8, ["devices"])) : b("", !0),
|
|
450
|
+
r.value == "setting" ? (i(), B(c(o), {
|
|
451
|
+
key: `KioskSettingView-${w.value}`,
|
|
452
|
+
"restaurant-id": w.value,
|
|
453
|
+
onUpdateKioskOrderSetting: k,
|
|
454
|
+
form: c(s).state.kiosk ?? c(He)
|
|
455
|
+
}, null, 8, ["restaurant-id", "form"])) : b("", !0)
|
|
456
|
+
])
|
|
457
|
+
])
|
|
458
|
+
]),
|
|
459
|
+
P.value ? b("", !0) : (i(), f("div", ot, [
|
|
460
|
+
g(N, {
|
|
461
|
+
"restaurant-id": w.value,
|
|
462
|
+
devices: q.value,
|
|
463
|
+
"kiosk-order-setting": c(s).state.kiosk,
|
|
464
|
+
dialogType: !1
|
|
465
|
+
}, null, 8, ["restaurant-id", "devices", "kiosk-order-setting"])
|
|
466
|
+
]))
|
|
467
|
+
])
|
|
468
|
+
]);
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
});
|
|
472
|
+
export {
|
|
473
|
+
yt as default
|
|
474
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ref as Oe, computed as qe, defineComponent as ut, onMounted as Yt, onUnmounted as Qo, resolveComponent as je, createBlock as vt, openBlock as me, withCtx as Ke, createElementVNode as ue, createElementBlock as Ce, createCommentVNode as Ye, createVNode as se, toDisplayString as Te, unref as ae, isRef as Si, Fragment as et, renderList as wt, watch as kt, renderSlot as ys, reactive as ir, createTextVNode as er, normalizeClass as ji, withModifiers as vs, toRaw as Hi, normalizeStyle as ws, createSlots as ks, h as Xo, withKeys as _s, resolveDynamicComponent as Es } from "vue";
|
|
2
2
|
import { useDialog as Zn, useSnackbar as Zo } from "@feedmepos/ui-library";
|
|
3
3
|
import { useI18n as dt, useCoreStore as St } from "@feedmepos/mf-common";
|
|
4
|
-
import { e as fr,
|
|
4
|
+
import { e as fr, f as Ut, h as Cs, i as Ha, j as Ge, k as Nr, l as at, c as qt, m as or, n as Ss, o as jn, p as Ka, O as Ki, q as Yi, r as Ji, s as Wi, t as js, u as Ya, v as As } from "./menu.dto-Co7iXHNr.js";
|
|
5
5
|
import { u as Lt, a as Jt, b as xs, _ as Fs } from "./index-BXsnV_eO.js";
|
|
6
|
-
import { g as We, b as $r, S as bi, a as Ts, m as Qi, c as Ps, d as Vt, r as qr } from "./dayjs.min-
|
|
6
|
+
import { g as We, b as $r, S as bi, a as Ts, m as Qi, c as Ps, d as Vt, r as qr } from "./dayjs.min-DCTYRWyD.js";
|
|
7
7
|
import { defineStore as Ai } from "pinia";
|
|
8
8
|
import { useRouter as qs } from "vue-router";
|
|
9
|
-
import { c as xi, g as cr, a as Fi, b as Ds, d as yi, e as Ms } from "./app-
|
|
10
|
-
import { O as pr, s as Ja, a as Os } from "./index-
|
|
9
|
+
import { c as xi, g as cr, a as Fi, b as Ds, d as yi, e as Ms } from "./app-CLewMjcd.js";
|
|
10
|
+
import { O as pr, s as Ja, a as Os } from "./index-B7LtJeBJ.js";
|
|
11
11
|
const Is = {
|
|
12
12
|
"Bill Receipt Number": (m) => m.seqNumber ?? "*8888",
|
|
13
13
|
"Bill Receipt Total Amount (Net)": (m) => Cs.Dinero.fromFdoDinero(m.nettTotal).toFormat(!0),
|
|
@@ -299,6 +299,18 @@ const D = {
|
|
|
299
299
|
unbindKioskDeviceWarning: "Are you sure want to unbind device? If yes, please enter {machineId} inside the textfield",
|
|
300
300
|
unbindSuccess: "Kiosk display successfully unbinded.",
|
|
301
301
|
unbindWarning: "Please enter the machine ID to confirm unbind.",
|
|
302
|
+
searchDevices: "Search by slot, machine ID, or name...",
|
|
303
|
+
allTypes: "All Types",
|
|
304
|
+
tabletOnly: "Tablet Only",
|
|
305
|
+
kioskOnly: "Kiosk Only",
|
|
306
|
+
showingDevices: "Showing {count} of {total}",
|
|
307
|
+
noDevicesMatch: "No devices match your search criteria.",
|
|
308
|
+
noDevicesBound: 'No devices bound yet. Click "Bind device" to add one.',
|
|
309
|
+
clickToCopy: "Click to copy",
|
|
310
|
+
machineIdCopied: "Machine ID copied to clipboard",
|
|
311
|
+
copyFailed: "Failed to copy to clipboard",
|
|
312
|
+
pinSet: "PIN Set",
|
|
313
|
+
noPin: "No PIN",
|
|
302
314
|
unknown: "Unknown",
|
|
303
315
|
update: "Update",
|
|
304
316
|
updatedAt: "Updated at",
|
|
@@ -342,9 +354,9 @@ const D = {
|
|
|
342
354
|
promotion: "Promotion",
|
|
343
355
|
voucher: "Voucher"
|
|
344
356
|
}
|
|
345
|
-
}, x = {
|
|
346
|
-
order: D
|
|
347
357
|
}, C = {
|
|
358
|
+
order: D
|
|
359
|
+
}, x = {
|
|
348
360
|
accept: "接受",
|
|
349
361
|
acceptedPayment: "可接受付款方式",
|
|
350
362
|
acceptQueue: "接受队列",
|
|
@@ -645,6 +657,18 @@ const D = {
|
|
|
645
657
|
unbindKioskDeviceWarning: "你确定要解除绑定设备吗?如果是,请在文本框中输入{machineId}",
|
|
646
658
|
unbindSuccess: "自助点餐设备成功解除绑定",
|
|
647
659
|
unbindWarning: "请输入设备ID以确认解除绑定",
|
|
660
|
+
searchDevices: "按槽位、设备ID或名称搜索...",
|
|
661
|
+
allTypes: "全部类型",
|
|
662
|
+
tabletOnly: "仅平板",
|
|
663
|
+
kioskOnly: "仅自助终端",
|
|
664
|
+
showingDevices: "显示 {count} / {total}",
|
|
665
|
+
noDevicesMatch: "没有设备符合您的搜索条件",
|
|
666
|
+
noDevicesBound: '尚未绑定任何设备。点击"绑定设备"添加。',
|
|
667
|
+
clickToCopy: "点击复制",
|
|
668
|
+
machineIdCopied: "设备ID已复制到剪贴板",
|
|
669
|
+
copyFailed: "复制到剪贴板失败",
|
|
670
|
+
pinSet: "已设置PIN",
|
|
671
|
+
noPin: "无PIN",
|
|
648
672
|
unknown: "未知",
|
|
649
673
|
update: "更新",
|
|
650
674
|
updatedAt: "更新于",
|
|
@@ -690,7 +714,7 @@ const D = {
|
|
|
690
714
|
voucher: "代金券"
|
|
691
715
|
}
|
|
692
716
|
}, _ = {
|
|
693
|
-
order:
|
|
717
|
+
order: x
|
|
694
718
|
}, T = {
|
|
695
719
|
accept: "ยอมรับ",
|
|
696
720
|
acceptedPayment: "ยอมรับการชำระเงิน",
|
|
@@ -985,6 +1009,18 @@ const D = {
|
|
|
985
1009
|
unbindKioskDeviceWarning: "คุณแน่ใจว่าต้องการยกเลิกการเชื่อมโยงอุปกรณ์หรือไม่ หากใช่ โปรดป้อน {machineId} ในช่องข้อความ",
|
|
986
1010
|
unbindSuccess: "ยกเลิกการเชื่อมโยงจอแสดงผล Kiosk สำเร็จแล้ว",
|
|
987
1011
|
unbindWarning: "โปรดป้อน ID เครื่องเพื่อยืนยันการยกเลิกการเชื่อมโยง",
|
|
1012
|
+
searchDevices: "ค้นหาตามสล็อต, ID เครื่อง หรือชื่อ...",
|
|
1013
|
+
allTypes: "ทุกประเภท",
|
|
1014
|
+
tabletOnly: "แท็บเล็ตเท่านั้น",
|
|
1015
|
+
kioskOnly: "คีออสก์เท่านั้น",
|
|
1016
|
+
showingDevices: "แสดง {count} จาก {total}",
|
|
1017
|
+
noDevicesMatch: "ไม่มีอุปกรณ์ตรงกับเกณฑ์การค้นหาของคุณ",
|
|
1018
|
+
noDevicesBound: 'ยังไม่มีอุปกรณ์ที่ผูกไว้ คลิก "ผูกอุปกรณ์" เพื่อเพิ่ม',
|
|
1019
|
+
clickToCopy: "คลิกเพื่อคัดลอก",
|
|
1020
|
+
machineIdCopied: "คัดลอก ID เครื่องไปยังคลิปบอร์ดแล้ว",
|
|
1021
|
+
copyFailed: "ไม่สามารถคัดลอกไปยังคลิปบอร์ด",
|
|
1022
|
+
pinSet: "ตั้ง PIN แล้ว",
|
|
1023
|
+
noPin: "ไม่มี PIN",
|
|
988
1024
|
unknown: "ไม่ทราบ",
|
|
989
1025
|
update: "อัปเดต",
|
|
990
1026
|
updatedAt: "อัปเดตเมื่อ",
|
|
@@ -1028,9 +1064,9 @@ const D = {
|
|
|
1028
1064
|
promotion: "โปรโมชั่น",
|
|
1029
1065
|
voucher: "บัตรกำนัล"
|
|
1030
1066
|
}
|
|
1031
|
-
},
|
|
1067
|
+
}, I = {
|
|
1032
1068
|
order: T
|
|
1033
|
-
},
|
|
1069
|
+
}, A = {
|
|
1034
1070
|
accept: "受け入れる",
|
|
1035
1071
|
acceptedPayment: "受け付けた支払い",
|
|
1036
1072
|
acceptQueue: "待ち行列を受け付ける",
|
|
@@ -1324,6 +1360,18 @@ const D = {
|
|
|
1324
1360
|
unbindKioskDeviceWarning: "デバイスの紐付けを解除してもよろしいですか?解除する場合は、テキストフィールドに{machineId}を入力してください",
|
|
1325
1361
|
unbindSuccess: "キオスクディスプレイの紐付けが正常に解除されました。",
|
|
1326
1362
|
unbindWarning: "紐付け解除を確認するには、マシンIDを入力してください。",
|
|
1363
|
+
searchDevices: "スロット、マシンID、名前で検索...",
|
|
1364
|
+
allTypes: "すべてのタイプ",
|
|
1365
|
+
tabletOnly: "タブレットのみ",
|
|
1366
|
+
kioskOnly: "キオスクのみ",
|
|
1367
|
+
showingDevices: "{count} / {total} 件表示",
|
|
1368
|
+
noDevicesMatch: "検索条件に一致するデバイスはありません",
|
|
1369
|
+
noDevicesBound: "まだデバイスがバインドされていません。「デバイスをバインド」をクリックして追加してください。",
|
|
1370
|
+
clickToCopy: "クリックしてコピー",
|
|
1371
|
+
machineIdCopied: "マシンIDをクリップボードにコピーしました",
|
|
1372
|
+
copyFailed: "クリップボードへのコピーに失敗しました",
|
|
1373
|
+
pinSet: "PIN設定済み",
|
|
1374
|
+
noPin: "PINなし",
|
|
1327
1375
|
unknown: "不明",
|
|
1328
1376
|
update: "更新",
|
|
1329
1377
|
updatedAt: "更新日時",
|
|
@@ -2781,11 +2829,11 @@ const D = {
|
|
|
2781
2829
|
tax_setting: {
|
|
2782
2830
|
title: "税金設定"
|
|
2783
2831
|
}
|
|
2784
|
-
},
|
|
2785
|
-
order:
|
|
2832
|
+
}, O = {
|
|
2833
|
+
order: A,
|
|
2786
2834
|
menu: w
|
|
2787
2835
|
}, m = v(null), g = () => m.value;
|
|
2788
|
-
function
|
|
2836
|
+
function R(t) {
|
|
2789
2837
|
m.value || (m.value = t);
|
|
2790
2838
|
}
|
|
2791
2839
|
const U = Object.freeze({
|
|
@@ -2874,7 +2922,7 @@ const E = { class: "flex-1 overflow-auto" }, H = /* @__PURE__ */ b({
|
|
|
2874
2922
|
const a = await new c(M.googleMap, {
|
|
2875
2923
|
libraries: ["places"]
|
|
2876
2924
|
}).load();
|
|
2877
|
-
|
|
2925
|
+
R(a);
|
|
2878
2926
|
}
|
|
2879
2927
|
return S(async () => {
|
|
2880
2928
|
await i();
|
|
@@ -2885,37 +2933,37 @@ const E = { class: "flex-1 overflow-auto" }, H = /* @__PURE__ */ b({
|
|
|
2885
2933
|
]);
|
|
2886
2934
|
};
|
|
2887
2935
|
}
|
|
2888
|
-
}),
|
|
2889
|
-
KioskRoute:
|
|
2890
|
-
KioskDeviceRoute:
|
|
2936
|
+
}), N = "/kiosk", F = "/kiosk/device", L = "/kiosk/order-setting", q = "/order-settings", u = {
|
|
2937
|
+
KioskRoute: N,
|
|
2938
|
+
KioskDeviceRoute: F,
|
|
2891
2939
|
KioskOrderSettingRoute: L,
|
|
2892
2940
|
OrderSettingView: q
|
|
2893
2941
|
}, G = [
|
|
2894
2942
|
{
|
|
2895
2943
|
path: u.KioskRoute,
|
|
2896
2944
|
name: "Kiosk",
|
|
2897
|
-
component: () => import("./KioskView-
|
|
2945
|
+
component: () => import("./KioskView-M8V91gD5.js")
|
|
2898
2946
|
},
|
|
2899
2947
|
{
|
|
2900
2948
|
path: u.KioskDeviceRoute,
|
|
2901
2949
|
name: "Kiosk Device",
|
|
2902
|
-
component: () => import("./KioskDevicesView-
|
|
2950
|
+
component: () => import("./KioskDevicesView-u14hzPbE.js")
|
|
2903
2951
|
},
|
|
2904
2952
|
{
|
|
2905
2953
|
path: u.KioskOrderSettingRoute,
|
|
2906
2954
|
name: "Kiosk Order Setting",
|
|
2907
|
-
component: () => import("./KioskSettingView-
|
|
2955
|
+
component: () => import("./KioskSettingView-DmvtZcV1.js")
|
|
2908
2956
|
},
|
|
2909
2957
|
{
|
|
2910
2958
|
path: u.OrderSettingView,
|
|
2911
2959
|
name: "Order Setting View",
|
|
2912
|
-
component: () => import("./OrderSettingsView-
|
|
2960
|
+
component: () => import("./OrderSettingsView-Bl3LshG3.js")
|
|
2913
2961
|
}
|
|
2914
2962
|
], j = {
|
|
2915
|
-
"en-US":
|
|
2963
|
+
"en-US": C,
|
|
2916
2964
|
"zh-CN": _,
|
|
2917
|
-
"th-TH":
|
|
2918
|
-
"ja-JP":
|
|
2965
|
+
"th-TH": I,
|
|
2966
|
+
"ja-JP": O
|
|
2919
2967
|
};
|
|
2920
2968
|
export {
|
|
2921
2969
|
H as _,
|
package/dist/app.js
CHANGED