@feedmepos/mf-order-setting 0.0.51 → 0.0.52-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.tsbuildinfo +1 -0
- package/dist/{KioskDevicesView-TIls1ag1.js → KioskDevicesView-Vy9FLX1n.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B2gjPfOJ.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-DhZPOEEQ.js} +2 -2
- package/dist/KioskSettingView-cE-JdCBB.js +551 -0
- package/dist/{KioskView-B0Jj2sOl.js → KioskView-BYs5bem0.js} +108 -111
- package/dist/OrderSettingsView-C4aEpC1j.js +56063 -0
- package/dist/{app-JqOEacuf.js → app-CwYXsqxX.js} +182 -26
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-B42nUieJ.js → dayjs.min-JEYIJz2D.js} +1 -1
- package/dist/frontend/mf-order/src/api/reservation/index.d.ts +8 -0
- package/dist/frontend/mf-order/src/app.d.ts +164 -8
- package/dist/frontend/mf-order/src/main.d.ts +164 -8
- package/dist/frontend/mf-order/src/modules/order-setting/kiosk/interface.d.ts +0 -2
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +0 -6
- package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +3 -3
- package/dist/frontend/mf-order/src/views/all-orders/ReflowOrder.vue.d.ts +2 -2
- package/dist/frontend/mf-order/src/views/order-settings/delivery/inhouse/InHouseDelivery.vue.d.ts +2 -2
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CopySettingsSheet.vue.d.ts +186 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomSelect.vue.d.ts +15 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomTimePicker.vue.d.ts +10 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/ReservationSetting.vue.d.ts +2 -0
- package/dist/{index-B0teNm7_.js → index-DZCjODMx.js} +2 -2
- package/dist/{menu.dto-DFTxveX1.js → menu.dto-D9CDVLiP.js} +22865 -20037
- package/dist/package/entity/food-court/order.do.d.ts +47 -2
- package/dist/package/entity/food-court/order.dto.d.ts +0 -3
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +12341 -1
- package/dist/package/entity/incoming-order/incoming-order.do.d.ts +3 -22266
- package/dist/package/entity/index.d.ts +5 -0
- package/dist/package/entity/kiosk/marketing/marketing.dto.d.ts +1 -19864
- package/dist/package/entity/order/order-item/order-item.dto.d.ts +1 -3721
- package/dist/package/entity/order-setting/kiosk/kiosk.do.d.ts +0 -3
- package/dist/package/entity/order-setting/kiosk/kiosk.dto.d.ts +0 -3
- package/dist/package/entity/order-setting/order-setting.do.d.ts +861 -5
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +0 -10
- package/dist/package/entity/order-setting/reservationV2/reservation.do.d.ts +1269 -0
- package/dist/package/entity/queue/queue.do.d.ts +1 -11
- package/dist/package/entity/reservation/reservation.do.d.ts +101 -0
- package/dist/package/entity/reservation/reservation.dto.d.ts +325 -0
- package/dist/package/entity/reservation/reservation.enum.d.ts +3 -0
- package/dist/package/entity/reservation/reservation.utils.d.ts +152 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +0 -5
- package/dist/package/entity/websocket/websocket.dto.d.ts +0 -12
- package/dist/style.css +1 -0
- package/package.json +3 -3
- package/src/api/reservation/index.ts +28 -0
- package/src/assets/images/not-found.png +0 -0
- package/src/locales/en-US.json +57 -3
- package/src/locales/ja-JP.json +9 -11
- package/src/locales/th-TH.json +55 -3
- package/src/locales/zh-CN.json +55 -3
- package/src/main.ts +7 -5
- package/src/modules/order-setting/kiosk/interface.ts +13 -15
- package/src/stores/order-setting/mapper.ts +41 -44
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +1 -19
- package/src/views/kiosk/settings/KioskSettingView.vue +23 -43
- package/src/views/order-settings/OrderSettingsView.vue +7 -2
- package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +3 -1
- package/src/views/order-settings/drive-thru/DriveThruSetting.vue +13 -28
- package/src/views/order-settings/reservation/CopySettingsSheet.vue +238 -0
- package/src/views/order-settings/reservation/CustomSelect.vue +99 -0
- package/src/views/order-settings/reservation/CustomTimePicker.vue +201 -0
- package/src/views/order-settings/reservation/ReservationSetting.vue +1246 -0
- package/src/views/order-settings/servicecharge/ServiceChargeRule.vue +5 -1
- package/tsconfig.app.json +8 -6
- package/dist/KioskSettingView-UPE-q-Zd.js +0 -573
- package/dist/OrderSettingsView-Ca4y2PNF.js +0 -51603
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as C, defineComponent as G, resolveComponent as F, createElementBlock as b, openBlock as u, createElementVNode as e, createVNode as v, toDisplayString as a, unref as _, computed as $, createCommentVNode as D, withCtx as q, Fragment as W, renderList as H, createBlock as z, createTextVNode as U } from "vue";
|
|
2
2
|
import { useI18n as Q } from "@feedmepos/mf-common";
|
|
3
3
|
import { defineStore as se } from "pinia";
|
|
4
|
-
import { r as Y, g as Z, d as R } from "./dayjs.min-
|
|
5
|
-
import { g as ie, c as ae } from "./menu.dto-
|
|
4
|
+
import { r as Y, g as Z, d as R } from "./dayjs.min-JEYIJz2D.js";
|
|
5
|
+
import { g as ie, c as ae } from "./menu.dto-D9CDVLiP.js";
|
|
6
6
|
import { useDialog as le, useSnackbar as re } from "@feedmepos/ui-library";
|
|
7
7
|
async function ce() {
|
|
8
8
|
const o = await Y().get("/kiosk/otp");
|
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import { defineComponent as J, computed as A, ref as w, onMounted as ae, resolveComponent as _, createElementBlock as T, openBlock as x, Fragment as B, createVNode as d, createElementVNode as i, createCommentVNode as q, unref as a, withCtx as I, createTextVNode as ne, toDisplayString as v, renderList as H, withDirectives as F, vShow as O } from "vue";
|
|
2
|
+
import { F as R, d as m } from "./menu.dto-D9CDVLiP.js";
|
|
3
|
+
import { _ as te, u as oe } from "./index-BXsnV_eO.js";
|
|
4
|
+
import { useI18n as X } from "@feedmepos/mf-common";
|
|
5
|
+
import { useSnackbar as de } from "@feedmepos/ui-library";
|
|
6
|
+
const ue = { class: "flex flex-row items-center" }, ie = { key: 0 }, se = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "ml-7"
|
|
9
|
+
}, re = { key: 0 }, me = { class: "font-bold" }, pe = {
|
|
10
|
+
key: 2,
|
|
11
|
+
class: "ml-7"
|
|
12
|
+
}, ye = { class: "ml-7" }, ce = { class: "ml-7" }, fe = { class: "flex flex-row gap-9" }, ve = /* @__PURE__ */ J({
|
|
13
|
+
__name: "KioskPaymentTypeSection",
|
|
14
|
+
props: {
|
|
15
|
+
paymentTypes: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: !0
|
|
18
|
+
},
|
|
19
|
+
offlinePaymentTypes: {
|
|
20
|
+
type: Array,
|
|
21
|
+
required: !0
|
|
22
|
+
},
|
|
23
|
+
allowEPayment: {
|
|
24
|
+
type: [Boolean, String],
|
|
25
|
+
required: !0
|
|
26
|
+
},
|
|
27
|
+
ePaymentTypes: {
|
|
28
|
+
type: Object,
|
|
29
|
+
required: !0
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:paymentTypes", "update:offlinePaymentTypes", "update:ePaymentTypes"],
|
|
33
|
+
setup(C, { emit: $ }) {
|
|
34
|
+
const { t: e } = X(), f = C, k = $;
|
|
35
|
+
async function L(u) {
|
|
36
|
+
k(
|
|
37
|
+
"update:offlinePaymentTypes",
|
|
38
|
+
f.offlinePaymentTypes.filter((t, n) => n !== u)
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
const l = A(() => (f.paymentTypes || []).includes(R.enum.ePayment)), E = A(() => {
|
|
42
|
+
const u = f.paymentTypes || [], t = f.offlinePaymentTypes || [];
|
|
43
|
+
return u.includes(R.enum.cash) || t.length > 0;
|
|
44
|
+
}), N = w(!1), y = w([]), V = w(), p = w([]), b = w(!1), U = w(!1), S = w(!1), P = [
|
|
45
|
+
{ label: e("order.offlinePayment"), value: "offline" },
|
|
46
|
+
{ label: e("order.ePayment"), value: "e-payment" }
|
|
47
|
+
], M = () => {
|
|
48
|
+
const u = [];
|
|
49
|
+
E.value && u.push("offline"), l.value && u.push("e-payment"), y.value = u, N.value = u.length === P.length, Object.keys(f.ePaymentTypes).length !== 0 && (f.ePaymentTypes.terminal && (U.value = !0), f.ePaymentTypes.card.terminal ? (V.value = m.enum.TERMINAL, b.value = !0) : f.ePaymentTypes.card.nfc && (V.value = m.enum.NFC, b.value = !0), f.ePaymentTypes.eWallet.qrPay && (p.value.push(m.enum.QRPAY), S.value = !0), f.ePaymentTypes.eWallet.scanPay && (p.value.push(m.enum.SCANPAY), S.value = !0));
|
|
50
|
+
};
|
|
51
|
+
M();
|
|
52
|
+
const Y = (u) => {
|
|
53
|
+
y.value = u ? P.map((h) => h.value) : [], N.value = u;
|
|
54
|
+
const t = [], n = u ? f.offlinePaymentTypes || [] : [];
|
|
55
|
+
y.value.includes("e-payment") && (t.push(R.enum.ePayment), b.value = !0, S.value = !0), y.value.includes("offline") && t.push(R.enum.cash), k("update:paymentTypes", t), k("update:offlinePaymentTypes", n), c(b.value), g(S.value);
|
|
56
|
+
}, W = (u) => {
|
|
57
|
+
const t = y.value;
|
|
58
|
+
y.value = u, N.value = u.length === P.length;
|
|
59
|
+
const n = [], h = u.includes("offline") ? f.offlinePaymentTypes || [] : [];
|
|
60
|
+
u.includes("e-payment") && n.push(R.enum.ePayment), u.includes("offline") && n.push(R.enum.cash), t.includes("e-payment") || (b.value = !0, S.value = !0, c(b.value), g(S.value)), k("update:paymentTypes", n), k("update:offlinePaymentTypes", h);
|
|
61
|
+
}, s = (u) => {
|
|
62
|
+
const t = {
|
|
63
|
+
terminal: !1,
|
|
64
|
+
card: {
|
|
65
|
+
terminal: !1,
|
|
66
|
+
nfc: !1
|
|
67
|
+
},
|
|
68
|
+
eWallet: {
|
|
69
|
+
qrPay: !1,
|
|
70
|
+
scanPay: !1
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
y.value.includes("e-payment") && (u == m.enum.TERMINAL && (t.card.terminal = !0), u == m.enum.NFC && (t.card.nfc = !0), p.value.length > 0 && (p.value.includes(m.enum.QRPAY) && (t.eWallet.qrPay = !0), p.value.includes(m.enum.SCANPAY) && (t.eWallet.scanPay = !0))), U.value && (t.terminal = !0), k("update:ePaymentTypes", t);
|
|
74
|
+
}, o = () => {
|
|
75
|
+
const u = {
|
|
76
|
+
terminal: !1,
|
|
77
|
+
card: {
|
|
78
|
+
terminal: !1,
|
|
79
|
+
nfc: !1
|
|
80
|
+
},
|
|
81
|
+
eWallet: {
|
|
82
|
+
qrPay: !1,
|
|
83
|
+
scanPay: !1,
|
|
84
|
+
terminalScanPay: !1,
|
|
85
|
+
terminalQrPay: !1
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
y.value.includes("e-payment") && (V.value && (V.value === m.enum.TERMINAL && (u.card.terminal = !0), V.value === m.enum.NFC && (u.card.nfc = !0)), U.value && (u.terminal = !0), p.value.includes(m.enum.QRPAY) && (u.eWallet.qrPay = !0), p.value.includes(m.enum.SCANPAY) && (u.eWallet.scanPay = !0), p.value.includes(m.enum.TERMINAL_SCAN_PAY) && (u.eWallet.terminalScanPay = !0), p.value.includes(m.enum.TERMINAL_QR_PAY) && (u.eWallet.terminalQrPay = !0)), k("update:ePaymentTypes", u);
|
|
89
|
+
}, c = (u) => {
|
|
90
|
+
V.value = "", u && (V.value = m.enum.TERMINAL), o();
|
|
91
|
+
}, g = (u) => {
|
|
92
|
+
p.value = [], u && (p.value = [
|
|
93
|
+
m.enum.QRPAY,
|
|
94
|
+
m.enum.SCANPAY
|
|
95
|
+
]), o();
|
|
96
|
+
};
|
|
97
|
+
return ae(() => {
|
|
98
|
+
M();
|
|
99
|
+
}), (u, t) => {
|
|
100
|
+
var K, G;
|
|
101
|
+
const n = _("FmCheckbox"), h = _("FmCardSection"), D = _("FmCard"), Z = _("FmButton"), Q = _("FmSwitch"), j = _("FmRadio"), ee = _("FmRadioGroup");
|
|
102
|
+
return x(), T(B, null, [
|
|
103
|
+
d(n, {
|
|
104
|
+
value: "",
|
|
105
|
+
"model-value": N.value,
|
|
106
|
+
label: a(e)("order.all"),
|
|
107
|
+
indeterminate: y.value.length > 0 && y.value.length < P.length,
|
|
108
|
+
"onUpdate:modelValue": Y
|
|
109
|
+
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
110
|
+
i("div", ue, [
|
|
111
|
+
d(n, {
|
|
112
|
+
modelValue: y.value,
|
|
113
|
+
"onUpdate:modelValue": [
|
|
114
|
+
t[0] || (t[0] = (r) => y.value = r),
|
|
115
|
+
W
|
|
116
|
+
],
|
|
117
|
+
label: P[0].label,
|
|
118
|
+
value: P[0].value
|
|
119
|
+
}, null, 8, ["modelValue", "label", "value"])
|
|
120
|
+
]),
|
|
121
|
+
y.value.includes(P[0].value) && ((K = C.offlinePaymentTypes) == null ? void 0 : K.length) === 0 ? (x(), T("div", ie, [
|
|
122
|
+
d(te, {
|
|
123
|
+
"onUpdate:offlinePaymentTypes": t[1] || (t[1] = (r) => k("update:offlinePaymentTypes", r))
|
|
124
|
+
})
|
|
125
|
+
])) : q("", !0),
|
|
126
|
+
y.value.includes("offline") ? (x(), T("div", se, [
|
|
127
|
+
((G = C.offlinePaymentTypes) == null ? void 0 : G.length) === 0 ? (x(), T("div", re, [
|
|
128
|
+
d(D, { variant: "outlined" }, {
|
|
129
|
+
default: I(() => [
|
|
130
|
+
d(h, null, {
|
|
131
|
+
default: I(() => [
|
|
132
|
+
ne(v(a(e)("order.payAtCounter")), 1)
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})
|
|
139
|
+
])) : q("", !0),
|
|
140
|
+
(x(!0), T(B, null, H(C.offlinePaymentTypes, (r, le) => (x(), T("p", { key: le }, [
|
|
141
|
+
d(D, { variant: "outlined" }, {
|
|
142
|
+
default: I(() => [
|
|
143
|
+
d(h, { class: "flex items-center justify-between" }, {
|
|
144
|
+
default: I(() => [
|
|
145
|
+
i("div", null, [
|
|
146
|
+
i("span", me, v(r.name), 1),
|
|
147
|
+
t[11] || (t[11] = i("br", null, null, -1)),
|
|
148
|
+
i("span", null, v(r.instruction), 1)
|
|
149
|
+
]),
|
|
150
|
+
(x(!0), T(B, null, H(C.offlinePaymentTypes, (qe, z) => (x(), T("div", { key: z }, [
|
|
151
|
+
d(Z, {
|
|
152
|
+
"append-icon": "delete",
|
|
153
|
+
variant: "tertiary",
|
|
154
|
+
onClick: ($e) => L(z)
|
|
155
|
+
}, null, 8, ["onClick"])
|
|
156
|
+
]))), 128))
|
|
157
|
+
]),
|
|
158
|
+
_: 2
|
|
159
|
+
}, 1024)
|
|
160
|
+
]),
|
|
161
|
+
_: 2
|
|
162
|
+
}, 1024)
|
|
163
|
+
]))), 128))
|
|
164
|
+
])) : q("", !0),
|
|
165
|
+
d(n, {
|
|
166
|
+
modelValue: y.value,
|
|
167
|
+
"onUpdate:modelValue": [
|
|
168
|
+
t[2] || (t[2] = (r) => y.value = r),
|
|
169
|
+
W
|
|
170
|
+
],
|
|
171
|
+
label: P[1].label,
|
|
172
|
+
value: P[1].value
|
|
173
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
174
|
+
y.value.includes(P[1].value) ? (x(), T("div", pe, [
|
|
175
|
+
d(D, { variant: "outlined" }, {
|
|
176
|
+
default: I(() => [
|
|
177
|
+
d(h, null, {
|
|
178
|
+
default: I(() => [
|
|
179
|
+
d(Q, {
|
|
180
|
+
label: a(e)("order.bankCard"),
|
|
181
|
+
sublabel: a(e)("order.cardPaymentDescription"),
|
|
182
|
+
"label-placement": "right",
|
|
183
|
+
modelValue: b.value,
|
|
184
|
+
"onUpdate:modelValue": [
|
|
185
|
+
t[3] || (t[3] = (r) => b.value = r),
|
|
186
|
+
c
|
|
187
|
+
]
|
|
188
|
+
}, null, 8, ["label", "sublabel", "modelValue"]),
|
|
189
|
+
t[12] || (t[12] = i("br", null, null, -1)),
|
|
190
|
+
F(i("div", ye, [
|
|
191
|
+
d(ee, {
|
|
192
|
+
modelValue: V.value,
|
|
193
|
+
"onUpdate:modelValue": [
|
|
194
|
+
t[4] || (t[4] = (r) => V.value = r),
|
|
195
|
+
s
|
|
196
|
+
],
|
|
197
|
+
inline: ""
|
|
198
|
+
}, {
|
|
199
|
+
default: I(() => [
|
|
200
|
+
d(j, {
|
|
201
|
+
label: a(e)("order.terminal"),
|
|
202
|
+
value: a(m).enum.TERMINAL
|
|
203
|
+
}, null, 8, ["label", "value"]),
|
|
204
|
+
d(j, {
|
|
205
|
+
label: a(e)("order.nfc"),
|
|
206
|
+
value: a(m).enum.NFC
|
|
207
|
+
}, null, 8, ["label", "value"])
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["modelValue"])
|
|
211
|
+
], 512), [
|
|
212
|
+
[O, b.value]
|
|
213
|
+
])
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
})
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}),
|
|
220
|
+
d(D, {
|
|
221
|
+
variant: "outlined",
|
|
222
|
+
class: "mt-2"
|
|
223
|
+
}, {
|
|
224
|
+
default: I(() => [
|
|
225
|
+
d(h, null, {
|
|
226
|
+
default: I(() => [
|
|
227
|
+
d(Q, {
|
|
228
|
+
label: a(e)("order.terminal"),
|
|
229
|
+
sublabel: a(e)("order.terminalPaymentDescription"),
|
|
230
|
+
"label-placement": "right",
|
|
231
|
+
modelValue: U.value,
|
|
232
|
+
"onUpdate:modelValue": [
|
|
233
|
+
t[5] || (t[5] = (r) => U.value = r),
|
|
234
|
+
c
|
|
235
|
+
]
|
|
236
|
+
}, null, 8, ["label", "sublabel", "modelValue"])
|
|
237
|
+
]),
|
|
238
|
+
_: 1
|
|
239
|
+
})
|
|
240
|
+
]),
|
|
241
|
+
_: 1
|
|
242
|
+
}),
|
|
243
|
+
d(D, {
|
|
244
|
+
variant: "outlined",
|
|
245
|
+
class: "mt-2"
|
|
246
|
+
}, {
|
|
247
|
+
default: I(() => [
|
|
248
|
+
d(h, null, {
|
|
249
|
+
default: I(() => [
|
|
250
|
+
d(Q, {
|
|
251
|
+
label: a(e)("order.eWallet"),
|
|
252
|
+
sublabel: a(e)("order.eWalletDescription"),
|
|
253
|
+
"label-placement": "right",
|
|
254
|
+
modelValue: S.value,
|
|
255
|
+
"onUpdate:modelValue": [
|
|
256
|
+
t[6] || (t[6] = (r) => S.value = r),
|
|
257
|
+
g
|
|
258
|
+
]
|
|
259
|
+
}, null, 8, ["label", "sublabel", "modelValue"]),
|
|
260
|
+
t[13] || (t[13] = i("br", null, null, -1)),
|
|
261
|
+
F(i("div", ce, [
|
|
262
|
+
i("div", fe, [
|
|
263
|
+
d(n, {
|
|
264
|
+
modelValue: p.value,
|
|
265
|
+
"onUpdate:modelValue": [
|
|
266
|
+
t[7] || (t[7] = (r) => p.value = r),
|
|
267
|
+
o
|
|
268
|
+
],
|
|
269
|
+
label: a(e)("order.qrPay"),
|
|
270
|
+
value: a(m).enum.QRPAY
|
|
271
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
272
|
+
d(n, {
|
|
273
|
+
modelValue: p.value,
|
|
274
|
+
"onUpdate:modelValue": [
|
|
275
|
+
t[8] || (t[8] = (r) => p.value = r),
|
|
276
|
+
o
|
|
277
|
+
],
|
|
278
|
+
label: a(e)("order.scanPay"),
|
|
279
|
+
value: a(m).enum.SCANPAY
|
|
280
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
281
|
+
d(n, {
|
|
282
|
+
modelValue: p.value,
|
|
283
|
+
"onUpdate:modelValue": [
|
|
284
|
+
t[9] || (t[9] = (r) => p.value = r),
|
|
285
|
+
o
|
|
286
|
+
],
|
|
287
|
+
label: a(e)("order.terminalScanPay"),
|
|
288
|
+
value: a(m).enum.TERMINAL_SCAN_PAY
|
|
289
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
290
|
+
d(n, {
|
|
291
|
+
modelValue: p.value,
|
|
292
|
+
"onUpdate:modelValue": [
|
|
293
|
+
t[10] || (t[10] = (r) => p.value = r),
|
|
294
|
+
o
|
|
295
|
+
],
|
|
296
|
+
label: a(e)("order.terminalQrPay"),
|
|
297
|
+
value: a(m).enum.TERMINAL_QR_PAY
|
|
298
|
+
}, null, 8, ["modelValue", "label", "value"])
|
|
299
|
+
])
|
|
300
|
+
], 512), [
|
|
301
|
+
[O, S.value]
|
|
302
|
+
])
|
|
303
|
+
]),
|
|
304
|
+
_: 1
|
|
305
|
+
})
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
})
|
|
309
|
+
])) : q("", !0)
|
|
310
|
+
], 64);
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
}), be = {
|
|
314
|
+
key: 0,
|
|
315
|
+
class: "flex flex-col gap-32"
|
|
316
|
+
}, Pe = { class: "flex flex-col gap-2" }, ge = { class: "fm-typo-en-title-sm-600" }, Ve = { class: "flex flex-col gap-5" }, Se = { class: "flex flex-col gap-16" }, Ie = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, Te = { class: "fm-typo-en-title-sm-600" }, xe = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, _e = { class: "fm-typo-en-title-sm-600" }, ke = { class: "flex flex-row gap-2" }, he = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, we = { class: "fm-typo-en-title-sm-600" }, Ae = { class: "flex flex-col gap-2" }, Ce = { class: "fm-typo-en-title-sm-600" }, Ue = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, Re = { class: "fm-typo-en-title-sm-600" }, Fe = { class: "flex flex-col gap-2" }, Oe = { class: "fm-typo-en-title-sm-600" }, Ne = { class: "flex flex-col gap-2" }, Ee = { class: "fm-typo-en-title-sm-600" }, De = { class: "flex flex-col gap-2" }, Me = { class: "fm-typo-en-title-sm-600" }, Ye = { class: "fm-typo-en-title-sm-400 font-bold" }, We = { key: 1 }, Ge = /* @__PURE__ */ J({
|
|
317
|
+
__name: "KioskSettingView",
|
|
318
|
+
props: {
|
|
319
|
+
restaurantId: {},
|
|
320
|
+
form: {}
|
|
321
|
+
},
|
|
322
|
+
emits: ["updateKioskOrderSetting"],
|
|
323
|
+
setup(C, { emit: $ }) {
|
|
324
|
+
const { t: e } = X(), f = C, k = de(), L = $, l = w(f.form), E = (s) => s < 0 ? e("order.nonNegativeRule") : !0, N = (s) => s <= (l.value.dineIn.displayStand.standSlotRange.min ?? 0) ? e("order.greaterThanMinRule") : !0, y = A(() => [E]), V = A(() => [E]), p = A(() => [E, N]), b = A(() => {
|
|
325
|
+
const s = l.value;
|
|
326
|
+
if (s.dineIn.enabled && s.dineIn.displayStand.enabled) {
|
|
327
|
+
const { padDigit: o, standSlotRange: c } = s.dineIn.displayStand;
|
|
328
|
+
if (!(o != null && o >= 0 && c.min != null && c.max != null && c.min <= c.max)) return null;
|
|
329
|
+
}
|
|
330
|
+
return {
|
|
331
|
+
...s,
|
|
332
|
+
dineIn: {
|
|
333
|
+
...s.dineIn,
|
|
334
|
+
displayStand: {
|
|
335
|
+
...s.dineIn.displayStand,
|
|
336
|
+
enabled: s.dineIn.enabled && s.dineIn.displayStand.enabled,
|
|
337
|
+
padDigit: s.dineIn.displayStand.padDigit ?? 0,
|
|
338
|
+
standSlotRange: {
|
|
339
|
+
min: s.dineIn.displayStand.standSlotRange.min ?? 0,
|
|
340
|
+
max: s.dineIn.displayStand.standSlotRange.max ?? 10
|
|
341
|
+
},
|
|
342
|
+
prefix: s.dineIn.displayStand.prefix ?? ""
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
}), { startAsyncCall: U } = oe();
|
|
347
|
+
function S(s) {
|
|
348
|
+
l.value.paymentSetting.paymentTypes = s;
|
|
349
|
+
}
|
|
350
|
+
function P(s) {
|
|
351
|
+
l.value.paymentSetting.ePaymentTypes = s;
|
|
352
|
+
}
|
|
353
|
+
const M = A(() => (l.value.paymentSetting.paymentTypes || []).includes(R.enum.ePayment)), Y = A({
|
|
354
|
+
get: () => (l.value.dineIn.displayStand.enabled && l.value.dineIn.displayStand.enablePaxDialog || l.value.dineIn.pickUp.enablePaxDialog) ?? !1,
|
|
355
|
+
set: (s) => {
|
|
356
|
+
l.value.dineIn.displayStand.enablePaxDialog = s, l.value.dineIn.pickUp.enablePaxDialog = s;
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
async function W() {
|
|
360
|
+
if (b.value) {
|
|
361
|
+
const s = b.value;
|
|
362
|
+
U(async () => {
|
|
363
|
+
await L("updateKioskOrderSetting", s);
|
|
364
|
+
});
|
|
365
|
+
} else
|
|
366
|
+
k.open({
|
|
367
|
+
title: e("order.failedToUpdateSetting"),
|
|
368
|
+
type: "error"
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
return (s, o) => {
|
|
372
|
+
const c = _("FmSwitch"), g = _("FmTextField"), u = _("FmStepperField"), t = _("FmButton");
|
|
373
|
+
return l.value ? (x(), T("div", be, [
|
|
374
|
+
i("div", Pe, [
|
|
375
|
+
i("span", ge, v(a(e)("order.dineIn")), 1),
|
|
376
|
+
i("div", Ve, [
|
|
377
|
+
d(c, {
|
|
378
|
+
modelValue: l.value.dineIn.enabled,
|
|
379
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => l.value.dineIn.enabled = n),
|
|
380
|
+
label: a(e)("order.dineIn"),
|
|
381
|
+
"label-placement": "right"
|
|
382
|
+
}, null, 8, ["modelValue", "label"]),
|
|
383
|
+
F(i("div", Se, [
|
|
384
|
+
i("div", null, [
|
|
385
|
+
d(c, {
|
|
386
|
+
modelValue: l.value.dineIn.pickUp.enabled,
|
|
387
|
+
"onUpdate:modelValue": o[1] || (o[1] = (n) => l.value.dineIn.pickUp.enabled = n),
|
|
388
|
+
label: a(e)("order.pickAtCounter"),
|
|
389
|
+
"label-placement": "right"
|
|
390
|
+
}, null, 8, ["modelValue", "label"]),
|
|
391
|
+
F(i("div", Ie, [
|
|
392
|
+
i("span", Te, v(a(e)("order.submitOrderInstruction")), 1),
|
|
393
|
+
d(g, {
|
|
394
|
+
modelValue: l.value.dineIn.pickUp.submitOrderInstruction.payAtCounter,
|
|
395
|
+
"onUpdate:modelValue": o[2] || (o[2] = (n) => l.value.dineIn.pickUp.submitOrderInstruction.payAtCounter = n),
|
|
396
|
+
label: a(e)("order.payAtCounter"),
|
|
397
|
+
placeholder: "Collect your transaction slip below and present it to the cashier"
|
|
398
|
+
}, null, 8, ["modelValue", "label"]),
|
|
399
|
+
d(g, {
|
|
400
|
+
modelValue: l.value.dineIn.pickUp.submitOrderInstruction.paid,
|
|
401
|
+
"onUpdate:modelValue": o[3] || (o[3] = (n) => l.value.dineIn.pickUp.submitOrderInstruction.paid = n),
|
|
402
|
+
label: a(e)("order.paid"),
|
|
403
|
+
placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
|
|
404
|
+
}, null, 8, ["modelValue", "label"])
|
|
405
|
+
], 512), [
|
|
406
|
+
[O, l.value.dineIn.pickUp.enabled]
|
|
407
|
+
])
|
|
408
|
+
]),
|
|
409
|
+
i("div", null, [
|
|
410
|
+
d(c, {
|
|
411
|
+
modelValue: l.value.dineIn.displayStand.enabled,
|
|
412
|
+
"onUpdate:modelValue": o[4] || (o[4] = (n) => l.value.dineIn.displayStand.enabled = n),
|
|
413
|
+
label: a(e)("order.displayStand"),
|
|
414
|
+
"label-placement": "right"
|
|
415
|
+
}, null, 8, ["modelValue", "label"]),
|
|
416
|
+
F(i("div", xe, [
|
|
417
|
+
i("span", _e, v(a(e)("order.tableServiceSetting")), 1),
|
|
418
|
+
d(g, {
|
|
419
|
+
modelValue: l.value.dineIn.displayStand.prefix,
|
|
420
|
+
"onUpdate:modelValue": o[5] || (o[5] = (n) => l.value.dineIn.displayStand.prefix = n),
|
|
421
|
+
label: a(e)("order.prefix"),
|
|
422
|
+
placeholder: a(e)("order.prefix")
|
|
423
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
424
|
+
i("div", ke, [
|
|
425
|
+
d(u, {
|
|
426
|
+
modelValue: l.value.dineIn.displayStand.standSlotRange.min,
|
|
427
|
+
"onUpdate:modelValue": o[6] || (o[6] = (n) => l.value.dineIn.displayStand.standSlotRange.min = n),
|
|
428
|
+
class: "w-1/2",
|
|
429
|
+
label: a(e)("order.start"),
|
|
430
|
+
labelMark: "required",
|
|
431
|
+
rules: V.value,
|
|
432
|
+
placeholder: a(e)("order.enterANumber")
|
|
433
|
+
}, null, 8, ["modelValue", "label", "rules", "placeholder"]),
|
|
434
|
+
d(u, {
|
|
435
|
+
modelValue: l.value.dineIn.displayStand.standSlotRange.max,
|
|
436
|
+
"onUpdate:modelValue": o[7] || (o[7] = (n) => l.value.dineIn.displayStand.standSlotRange.max = n),
|
|
437
|
+
class: "w-1/2",
|
|
438
|
+
label: a(e)("order.end"),
|
|
439
|
+
labelMark: "required",
|
|
440
|
+
rules: p.value,
|
|
441
|
+
placeholder: a(e)("order.enterANumber")
|
|
442
|
+
}, null, 8, ["modelValue", "label", "rules", "placeholder"])
|
|
443
|
+
]),
|
|
444
|
+
d(u, {
|
|
445
|
+
modelValue: l.value.dineIn.displayStand.padDigit,
|
|
446
|
+
"onUpdate:modelValue": o[8] || (o[8] = (n) => l.value.dineIn.displayStand.padDigit = n),
|
|
447
|
+
label: a(e)("order.padDigit"),
|
|
448
|
+
labelMark: "required",
|
|
449
|
+
rules: y.value,
|
|
450
|
+
placeholder: a(e)("order.padDigit")
|
|
451
|
+
}, null, 8, ["modelValue", "label", "rules", "placeholder"])
|
|
452
|
+
], 512), [
|
|
453
|
+
[O, l.value.dineIn.displayStand.enabled]
|
|
454
|
+
]),
|
|
455
|
+
F(i("div", he, [
|
|
456
|
+
i("span", we, v(a(e)("order.submitOrderInstruction")), 1),
|
|
457
|
+
d(g, {
|
|
458
|
+
modelValue: l.value.dineIn.displayStand.submitOrderInstruction.payAtCounter,
|
|
459
|
+
"onUpdate:modelValue": o[9] || (o[9] = (n) => l.value.dineIn.displayStand.submitOrderInstruction.payAtCounter = n),
|
|
460
|
+
label: a(e)("order.payAtCounter"),
|
|
461
|
+
placeholder: "Collect your transaction slip below and present it to the cashier"
|
|
462
|
+
}, null, 8, ["modelValue", "label"]),
|
|
463
|
+
d(g, {
|
|
464
|
+
modelValue: l.value.dineIn.displayStand.submitOrderInstruction.paid,
|
|
465
|
+
"onUpdate:modelValue": o[10] || (o[10] = (n) => l.value.dineIn.displayStand.submitOrderInstruction.paid = n),
|
|
466
|
+
label: a(e)("order.paid"),
|
|
467
|
+
placeholder: "Please collect your receipt and we'll bring your food to your table once it's ready."
|
|
468
|
+
}, null, 8, ["modelValue", "label"])
|
|
469
|
+
], 512), [
|
|
470
|
+
[O, l.value.dineIn.displayStand.enabled]
|
|
471
|
+
])
|
|
472
|
+
])
|
|
473
|
+
], 512), [
|
|
474
|
+
[O, l.value.dineIn.enabled]
|
|
475
|
+
])
|
|
476
|
+
])
|
|
477
|
+
]),
|
|
478
|
+
i("div", Ae, [
|
|
479
|
+
i("span", Ce, v(a(e)("order.takeawayTitle")), 1),
|
|
480
|
+
d(c, {
|
|
481
|
+
modelValue: l.value.takeaway.enabled,
|
|
482
|
+
"onUpdate:modelValue": o[11] || (o[11] = (n) => l.value.takeaway.enabled = n),
|
|
483
|
+
label: a(e)("order.takeaway"),
|
|
484
|
+
"label-placement": "right",
|
|
485
|
+
class: "mb-5"
|
|
486
|
+
}, null, 8, ["modelValue", "label"]),
|
|
487
|
+
F(i("div", Ue, [
|
|
488
|
+
i("span", Re, v(a(e)("order.submitOrderInstruction")), 1),
|
|
489
|
+
d(g, {
|
|
490
|
+
modelValue: l.value.takeaway.submitOrderInstruction.payAtCounter,
|
|
491
|
+
"onUpdate:modelValue": o[12] || (o[12] = (n) => l.value.takeaway.submitOrderInstruction.payAtCounter = n),
|
|
492
|
+
label: a(e)("order.payAtCounter"),
|
|
493
|
+
placeholder: "Collect your transaction slip below and present it to the cashier"
|
|
494
|
+
}, null, 8, ["modelValue", "label"]),
|
|
495
|
+
d(g, {
|
|
496
|
+
modelValue: l.value.takeaway.submitOrderInstruction.paid,
|
|
497
|
+
"onUpdate:modelValue": o[13] || (o[13] = (n) => l.value.takeaway.submitOrderInstruction.paid = n),
|
|
498
|
+
label: a(e)("order.paid"),
|
|
499
|
+
placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
|
|
500
|
+
}, null, 8, ["modelValue", "label"])
|
|
501
|
+
], 512), [
|
|
502
|
+
[O, l.value.takeaway.enabled]
|
|
503
|
+
])
|
|
504
|
+
]),
|
|
505
|
+
i("div", Fe, [
|
|
506
|
+
i("span", Oe, v(a(e)("order.menuItem")), 1),
|
|
507
|
+
d(c, {
|
|
508
|
+
modelValue: l.value.menuItem.showAllOnly,
|
|
509
|
+
"onUpdate:modelValue": o[14] || (o[14] = (n) => l.value.menuItem.showAllOnly = n),
|
|
510
|
+
label: a(e)("order.showNotAvailableMenuItem"),
|
|
511
|
+
"label-placement": "right",
|
|
512
|
+
class: "mb-5"
|
|
513
|
+
}, null, 8, ["modelValue", "label"])
|
|
514
|
+
]),
|
|
515
|
+
i("div", Ne, [
|
|
516
|
+
i("span", Ee, v(a(e)("order.displayPaxDialogTitle")), 1),
|
|
517
|
+
d(c, {
|
|
518
|
+
modelValue: Y.value,
|
|
519
|
+
"onUpdate:modelValue": o[15] || (o[15] = (n) => Y.value = n),
|
|
520
|
+
label: a(e)("order.displayPaxDialogDescription"),
|
|
521
|
+
"label-placement": "right",
|
|
522
|
+
class: "mb-5"
|
|
523
|
+
}, null, 8, ["modelValue", "label"])
|
|
524
|
+
]),
|
|
525
|
+
i("div", De, [
|
|
526
|
+
i("span", Me, v(a(e)("order.acceptedPayment")), 1),
|
|
527
|
+
i("span", Ye, v(a(e)("order.configuration")), 1),
|
|
528
|
+
d(ve, {
|
|
529
|
+
"payment-types": l.value.paymentSetting.paymentTypes ?? [],
|
|
530
|
+
"allow-e-payment": M.value,
|
|
531
|
+
"offline-payment-types": l.value.paymentSetting.offlinePaymentTypes ?? [],
|
|
532
|
+
ePaymentTypes: l.value.paymentSetting.ePaymentTypes ?? {},
|
|
533
|
+
"onUpdate:paymentTypes": S,
|
|
534
|
+
"onUpdate:offlinePaymentTypes": o[16] || (o[16] = (n) => l.value.paymentSetting.offlinePaymentTypes = n),
|
|
535
|
+
"onUpdate:ePaymentTypes": P
|
|
536
|
+
}, null, 8, ["payment-types", "allow-e-payment", "offline-payment-types", "ePaymentTypes"])
|
|
537
|
+
]),
|
|
538
|
+
d(t, {
|
|
539
|
+
class: "w-1/4 mb-10",
|
|
540
|
+
variant: "primary",
|
|
541
|
+
label: a(e)("order.updateSetting"),
|
|
542
|
+
disabled: !b.value,
|
|
543
|
+
onClick: W
|
|
544
|
+
}, null, 8, ["label", "disabled"])
|
|
545
|
+
])) : (x(), T("div", We, v(a(e)("order.pleaseSelectRestaurant")), 1));
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
export {
|
|
550
|
+
Ge as default
|
|
551
|
+
};
|