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