@feedmepos/mf-order-setting 0.0.56 → 0.0.57
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-CMKNjgWx.js → KioskDevicesView-CVnUSyRk.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-B1sNvlUC.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-D-XcAx8n.js} +2 -2
- package/dist/KioskSettingView-CyAxzbP1.js +744 -0
- package/dist/{KioskView-Cl6eCUYX.js → KioskView-DYESsVun.js} +60 -57
- package/dist/{OrderSettingsView-Dj0Nd22Z.js → OrderSettingsView-BKkoSdAX.js} +4 -4
- package/dist/{app-DpOjaFJw.js → app-DaX8cX_Q.js} +126 -118
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-CuRr-wlf.js → dayjs.min-puCJYept.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-Bj0bCGTm.js → index-CtMw6yZU.js} +1 -1
- package/dist/{menu.dto-DAh1J2ES.js → menu.dto-Csu6ZBea.js} +2 -0
- package/dist/package/entity/food-court/order.do.d.ts +4 -24
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +1 -12341
- package/dist/package/entity/order/order.do.d.ts +1 -6357
- 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/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 +2 -0
- package/src/locales/ja-JP.json +11 -9
- package/src/locales/th-TH.json +2 -0
- package/src/locales/zh-CN.json +2 -0
- package/src/main.ts +5 -5
- package/src/modules/order-setting/kiosk/interface.ts +19 -17
- package/src/stores/order-setting/mapper.ts +66 -63
- package/src/views/kiosk/settings/KioskPaymentTypeSection.vue +19 -1
- package/src/views/kiosk/settings/KioskSettingView.vue +68 -48
- package/src/views/order-settings/OrderSettingsView.vue +1 -1
- package/src/views/order-settings/drive-thru/DriveThruSetting.vue +4 -4
- package/src/views/order-settings/servicecharge/ServiceChargeRule.vue +1 -5
- package/dist/KioskSettingView-D1tvuPDv.js +0 -722
|
@@ -0,0 +1,744 @@
|
|
|
1
|
+
import { defineComponent as ne, computed as F, ref as E, onMounted as pe, resolveComponent as k, createElementBlock as _, openBlock as I, Fragment as G, createVNode as i, createElementVNode as r, createCommentVNode as q, unref as l, withCtx as A, createTextVNode as ce, toDisplayString as b, renderList as J, withDirectives as L, vShow as D, createBlock as ee } from "vue";
|
|
2
|
+
import { F as M, e as p, f as oe, S as se } from "./menu.dto-Csu6ZBea.js";
|
|
3
|
+
import { _ as ye, u as fe } from "./index-BXsnV_eO.js";
|
|
4
|
+
import { useI18n as re, useCoreStore as ve } from "@feedmepos/mf-common";
|
|
5
|
+
import { useSnackbar as be } from "@feedmepos/ui-library";
|
|
6
|
+
import { g as ie, s as de, a as ge, r as ae, u as le, b as Pe } from "./app-DaX8cX_Q.js";
|
|
7
|
+
const Ie = { class: "flex flex-row items-center" }, he = { key: 0 }, Se = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "ml-7"
|
|
10
|
+
}, xe = { key: 0 }, _e = { class: "font-bold" }, Te = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "ml-7"
|
|
13
|
+
}, Ve = { class: "ml-7" }, ke = { class: "ml-7" }, we = { class: "flex flex-row gap-9" }, Ce = /* @__PURE__ */ ne({
|
|
14
|
+
__name: "KioskPaymentTypeSection",
|
|
15
|
+
props: {
|
|
16
|
+
paymentTypes: {
|
|
17
|
+
type: Array,
|
|
18
|
+
required: !0
|
|
19
|
+
},
|
|
20
|
+
offlinePaymentTypes: {
|
|
21
|
+
type: Array,
|
|
22
|
+
required: !0
|
|
23
|
+
},
|
|
24
|
+
allowEPayment: {
|
|
25
|
+
type: [Boolean, String],
|
|
26
|
+
required: !0
|
|
27
|
+
},
|
|
28
|
+
ePaymentTypes: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: !0
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ["update:paymentTypes", "update:offlinePaymentTypes", "update:ePaymentTypes"],
|
|
34
|
+
setup(u, { emit: c }) {
|
|
35
|
+
const { t: e } = re(), v = u, x = c;
|
|
36
|
+
async function V(d) {
|
|
37
|
+
x(
|
|
38
|
+
"update:offlinePaymentTypes",
|
|
39
|
+
v.offlinePaymentTypes.filter((o, n) => n !== d)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const N = F(() => (v.paymentTypes || []).includes(M.enum.ePayment)), H = F(() => {
|
|
43
|
+
const d = v.paymentTypes || [], o = v.offlinePaymentTypes || [];
|
|
44
|
+
return d.includes(M.enum.cash) || o.length > 0;
|
|
45
|
+
}), t = E(!1), g = E([]), w = E(), y = E([]), C = E(!1), O = E(!1), h = E(!1), T = [
|
|
46
|
+
{ label: e("order.offlinePayment"), value: "offline" },
|
|
47
|
+
{ label: e("order.ePayment"), value: "e-payment" }
|
|
48
|
+
], B = () => {
|
|
49
|
+
const d = [];
|
|
50
|
+
H.value && d.push("offline"), N.value && d.push("e-payment"), g.value = d, t.value = d.length === T.length, Object.keys(v.ePaymentTypes).length !== 0 && (v.ePaymentTypes.terminal && (O.value = !0), v.ePaymentTypes.card.terminal ? (w.value = p.enum.TERMINAL, C.value = !0) : v.ePaymentTypes.card.nfc && (w.value = p.enum.NFC, C.value = !0), v.ePaymentTypes.eWallet.qrPay && (y.value.push(p.enum.QRPAY), h.value = !0), v.ePaymentTypes.eWallet.scanPay && (y.value.push(p.enum.SCANPAY), h.value = !0), v.ePaymentTypes.eWallet.terminalScanPay && (y.value.push(p.enum.TERMINAL_SCAN_PAY), h.value = !0), v.ePaymentTypes.eWallet.terminalQrPay && (y.value.push(p.enum.TERMINAL_QR_PAY), h.value = !0));
|
|
51
|
+
};
|
|
52
|
+
B();
|
|
53
|
+
const K = (d) => {
|
|
54
|
+
g.value = d ? T.map((a) => a.value) : [], t.value = d;
|
|
55
|
+
const o = [], n = d ? v.offlinePaymentTypes || [] : [];
|
|
56
|
+
g.value.includes("e-payment") && (o.push(M.enum.ePayment), C.value = !0, h.value = !0), g.value.includes("offline") && o.push(M.enum.cash), x("update:paymentTypes", o), x("update:offlinePaymentTypes", n), $(C.value), Q(h.value);
|
|
57
|
+
}, Y = (d) => {
|
|
58
|
+
const o = g.value;
|
|
59
|
+
g.value = d, t.value = d.length === T.length;
|
|
60
|
+
const n = [], a = d.includes("offline") ? v.offlinePaymentTypes || [] : [];
|
|
61
|
+
d.includes("e-payment") && n.push(M.enum.ePayment), d.includes("offline") && n.push(M.enum.cash), o.includes("e-payment") || (C.value = !0, h.value = !0, $(C.value), Q(h.value)), x("update:paymentTypes", n), x("update:offlinePaymentTypes", a);
|
|
62
|
+
}, W = (d) => {
|
|
63
|
+
const o = {
|
|
64
|
+
terminal: !1,
|
|
65
|
+
card: {
|
|
66
|
+
terminal: !1,
|
|
67
|
+
nfc: !1
|
|
68
|
+
},
|
|
69
|
+
eWallet: {
|
|
70
|
+
qrPay: !1,
|
|
71
|
+
scanPay: !1,
|
|
72
|
+
terminalScanPay: !1,
|
|
73
|
+
terminalQrPay: !1
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
g.value.includes("e-payment") && (d == p.enum.TERMINAL && (o.card.terminal = !0), d == p.enum.NFC && (o.card.nfc = !0), y.value.length > 0 && (y.value.includes(p.enum.QRPAY) && (o.eWallet.qrPay = !0), y.value.includes(p.enum.SCANPAY) && (o.eWallet.scanPay = !0), y.value.includes(p.enum.TERMINAL_SCAN_PAY) && (o.eWallet.terminalScanPay = !0), y.value.includes(p.enum.TERMINAL_QR_PAY) && (o.eWallet.terminalQrPay = !0))), O.value && (o.terminal = !0), x("update:ePaymentTypes", o);
|
|
77
|
+
}, U = () => {
|
|
78
|
+
const d = {
|
|
79
|
+
terminal: !1,
|
|
80
|
+
card: {
|
|
81
|
+
terminal: !1,
|
|
82
|
+
nfc: !1
|
|
83
|
+
},
|
|
84
|
+
eWallet: {
|
|
85
|
+
qrPay: !1,
|
|
86
|
+
scanPay: !1,
|
|
87
|
+
terminalScanPay: !1,
|
|
88
|
+
terminalQrPay: !1
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
g.value.includes("e-payment") && (w.value && (w.value === p.enum.TERMINAL && (d.card.terminal = !0), w.value === p.enum.NFC && (d.card.nfc = !0)), O.value && (d.terminal = !0), y.value.includes(p.enum.QRPAY) && (d.eWallet.qrPay = !0), y.value.includes(p.enum.SCANPAY) && (d.eWallet.scanPay = !0), y.value.includes(p.enum.TERMINAL_SCAN_PAY) && (d.eWallet.terminalScanPay = !0), y.value.includes(p.enum.TERMINAL_QR_PAY) && (d.eWallet.terminalQrPay = !0)), x("update:ePaymentTypes", d);
|
|
92
|
+
}, $ = (d) => {
|
|
93
|
+
w.value = "", d && (w.value = p.enum.TERMINAL), U();
|
|
94
|
+
}, Q = (d) => {
|
|
95
|
+
y.value = [], d && (y.value = [
|
|
96
|
+
p.enum.QRPAY,
|
|
97
|
+
p.enum.SCANPAY
|
|
98
|
+
]), U();
|
|
99
|
+
};
|
|
100
|
+
return pe(() => {
|
|
101
|
+
B();
|
|
102
|
+
}), (d, o) => {
|
|
103
|
+
var s, X;
|
|
104
|
+
const n = k("FmCheckbox"), a = k("FmCardSection"), m = k("FmCard"), P = k("FmButton"), S = k("FmSwitch"), R = k("FmRadio"), j = k("FmRadioGroup");
|
|
105
|
+
return I(), _(G, null, [
|
|
106
|
+
i(n, {
|
|
107
|
+
value: "",
|
|
108
|
+
"model-value": t.value,
|
|
109
|
+
label: l(e)("order.all"),
|
|
110
|
+
indeterminate: g.value.length > 0 && g.value.length < T.length,
|
|
111
|
+
"onUpdate:modelValue": K
|
|
112
|
+
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
113
|
+
r("div", Ie, [
|
|
114
|
+
i(n, {
|
|
115
|
+
modelValue: g.value,
|
|
116
|
+
"onUpdate:modelValue": [
|
|
117
|
+
o[0] || (o[0] = (f) => g.value = f),
|
|
118
|
+
Y
|
|
119
|
+
],
|
|
120
|
+
label: T[0].label,
|
|
121
|
+
value: T[0].value
|
|
122
|
+
}, null, 8, ["modelValue", "label", "value"])
|
|
123
|
+
]),
|
|
124
|
+
g.value.includes(T[0].value) && ((s = u.offlinePaymentTypes) == null ? void 0 : s.length) === 0 ? (I(), _("div", he, [
|
|
125
|
+
i(ye, {
|
|
126
|
+
"onUpdate:offlinePaymentTypes": o[1] || (o[1] = (f) => x("update:offlinePaymentTypes", f))
|
|
127
|
+
})
|
|
128
|
+
])) : q("", !0),
|
|
129
|
+
g.value.includes("offline") ? (I(), _("div", Se, [
|
|
130
|
+
((X = u.offlinePaymentTypes) == null ? void 0 : X.length) === 0 ? (I(), _("div", xe, [
|
|
131
|
+
i(m, { variant: "outlined" }, {
|
|
132
|
+
default: A(() => [
|
|
133
|
+
i(a, null, {
|
|
134
|
+
default: A(() => [
|
|
135
|
+
ce(b(l(e)("order.payAtCounter")), 1)
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
})
|
|
142
|
+
])) : q("", !0),
|
|
143
|
+
(I(!0), _(G, null, J(u.offlinePaymentTypes, (f, me) => (I(), _("p", { key: me }, [
|
|
144
|
+
i(m, { variant: "outlined" }, {
|
|
145
|
+
default: A(() => [
|
|
146
|
+
i(a, { class: "flex items-center justify-between" }, {
|
|
147
|
+
default: A(() => [
|
|
148
|
+
r("div", null, [
|
|
149
|
+
r("span", _e, b(f.name), 1),
|
|
150
|
+
o[11] || (o[11] = r("br", null, null, -1)),
|
|
151
|
+
r("span", null, b(f.instruction), 1)
|
|
152
|
+
]),
|
|
153
|
+
(I(!0), _(G, null, J(u.offlinePaymentTypes, (wa, Z) => (I(), _("div", { key: Z }, [
|
|
154
|
+
i(P, {
|
|
155
|
+
"append-icon": "delete",
|
|
156
|
+
variant: "tertiary",
|
|
157
|
+
onClick: (Ca) => V(Z)
|
|
158
|
+
}, null, 8, ["onClick"])
|
|
159
|
+
]))), 128))
|
|
160
|
+
]),
|
|
161
|
+
_: 2
|
|
162
|
+
}, 1024)
|
|
163
|
+
]),
|
|
164
|
+
_: 2
|
|
165
|
+
}, 1024)
|
|
166
|
+
]))), 128))
|
|
167
|
+
])) : q("", !0),
|
|
168
|
+
i(n, {
|
|
169
|
+
modelValue: g.value,
|
|
170
|
+
"onUpdate:modelValue": [
|
|
171
|
+
o[2] || (o[2] = (f) => g.value = f),
|
|
172
|
+
Y
|
|
173
|
+
],
|
|
174
|
+
label: T[1].label,
|
|
175
|
+
value: T[1].value
|
|
176
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
177
|
+
g.value.includes(T[1].value) ? (I(), _("div", Te, [
|
|
178
|
+
i(m, { variant: "outlined" }, {
|
|
179
|
+
default: A(() => [
|
|
180
|
+
i(a, null, {
|
|
181
|
+
default: A(() => [
|
|
182
|
+
i(S, {
|
|
183
|
+
label: l(e)("order.bankCard"),
|
|
184
|
+
sublabel: l(e)("order.cardPaymentDescription"),
|
|
185
|
+
"label-placement": "right",
|
|
186
|
+
modelValue: C.value,
|
|
187
|
+
"onUpdate:modelValue": [
|
|
188
|
+
o[3] || (o[3] = (f) => C.value = f),
|
|
189
|
+
$
|
|
190
|
+
]
|
|
191
|
+
}, null, 8, ["label", "sublabel", "modelValue"]),
|
|
192
|
+
o[12] || (o[12] = r("br", null, null, -1)),
|
|
193
|
+
L(r("div", Ve, [
|
|
194
|
+
i(j, {
|
|
195
|
+
modelValue: w.value,
|
|
196
|
+
"onUpdate:modelValue": [
|
|
197
|
+
o[4] || (o[4] = (f) => w.value = f),
|
|
198
|
+
W
|
|
199
|
+
],
|
|
200
|
+
inline: ""
|
|
201
|
+
}, {
|
|
202
|
+
default: A(() => [
|
|
203
|
+
i(R, {
|
|
204
|
+
label: l(e)("order.terminal"),
|
|
205
|
+
value: l(p).enum.TERMINAL
|
|
206
|
+
}, null, 8, ["label", "value"]),
|
|
207
|
+
i(R, {
|
|
208
|
+
label: l(e)("order.nfc"),
|
|
209
|
+
value: l(p).enum.NFC
|
|
210
|
+
}, null, 8, ["label", "value"])
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
}, 8, ["modelValue"])
|
|
214
|
+
], 512), [
|
|
215
|
+
[D, C.value]
|
|
216
|
+
])
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
})
|
|
220
|
+
]),
|
|
221
|
+
_: 1
|
|
222
|
+
}),
|
|
223
|
+
i(m, {
|
|
224
|
+
variant: "outlined",
|
|
225
|
+
class: "mt-2"
|
|
226
|
+
}, {
|
|
227
|
+
default: A(() => [
|
|
228
|
+
i(a, null, {
|
|
229
|
+
default: A(() => [
|
|
230
|
+
i(S, {
|
|
231
|
+
label: l(e)("order.terminal"),
|
|
232
|
+
sublabel: l(e)("order.terminalPaymentDescription"),
|
|
233
|
+
"label-placement": "right",
|
|
234
|
+
modelValue: O.value,
|
|
235
|
+
"onUpdate:modelValue": [
|
|
236
|
+
o[5] || (o[5] = (f) => O.value = f),
|
|
237
|
+
$
|
|
238
|
+
]
|
|
239
|
+
}, null, 8, ["label", "sublabel", "modelValue"])
|
|
240
|
+
]),
|
|
241
|
+
_: 1
|
|
242
|
+
})
|
|
243
|
+
]),
|
|
244
|
+
_: 1
|
|
245
|
+
}),
|
|
246
|
+
i(m, {
|
|
247
|
+
variant: "outlined",
|
|
248
|
+
class: "mt-2"
|
|
249
|
+
}, {
|
|
250
|
+
default: A(() => [
|
|
251
|
+
i(a, null, {
|
|
252
|
+
default: A(() => [
|
|
253
|
+
i(S, {
|
|
254
|
+
label: l(e)("order.eWallet"),
|
|
255
|
+
sublabel: l(e)("order.eWalletDescription"),
|
|
256
|
+
"label-placement": "right",
|
|
257
|
+
modelValue: h.value,
|
|
258
|
+
"onUpdate:modelValue": [
|
|
259
|
+
o[6] || (o[6] = (f) => h.value = f),
|
|
260
|
+
Q
|
|
261
|
+
]
|
|
262
|
+
}, null, 8, ["label", "sublabel", "modelValue"]),
|
|
263
|
+
o[13] || (o[13] = r("br", null, null, -1)),
|
|
264
|
+
L(r("div", ke, [
|
|
265
|
+
r("div", we, [
|
|
266
|
+
i(n, {
|
|
267
|
+
modelValue: y.value,
|
|
268
|
+
"onUpdate:modelValue": [
|
|
269
|
+
o[7] || (o[7] = (f) => y.value = f),
|
|
270
|
+
U
|
|
271
|
+
],
|
|
272
|
+
label: l(e)("order.qrPay"),
|
|
273
|
+
value: l(p).enum.QRPAY
|
|
274
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
275
|
+
i(n, {
|
|
276
|
+
modelValue: y.value,
|
|
277
|
+
"onUpdate:modelValue": [
|
|
278
|
+
o[8] || (o[8] = (f) => y.value = f),
|
|
279
|
+
U
|
|
280
|
+
],
|
|
281
|
+
label: l(e)("order.scanPay"),
|
|
282
|
+
value: l(p).enum.SCANPAY
|
|
283
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
284
|
+
i(n, {
|
|
285
|
+
modelValue: y.value,
|
|
286
|
+
"onUpdate:modelValue": [
|
|
287
|
+
o[9] || (o[9] = (f) => y.value = f),
|
|
288
|
+
U
|
|
289
|
+
],
|
|
290
|
+
label: l(e)("order.terminalScanPay"),
|
|
291
|
+
value: l(p).enum.TERMINAL_SCAN_PAY
|
|
292
|
+
}, null, 8, ["modelValue", "label", "value"]),
|
|
293
|
+
i(n, {
|
|
294
|
+
modelValue: y.value,
|
|
295
|
+
"onUpdate:modelValue": [
|
|
296
|
+
o[10] || (o[10] = (f) => y.value = f),
|
|
297
|
+
U
|
|
298
|
+
],
|
|
299
|
+
label: l(e)("order.terminalQrPay"),
|
|
300
|
+
value: l(p).enum.TERMINAL_QR_PAY
|
|
301
|
+
}, null, 8, ["modelValue", "label", "value"])
|
|
302
|
+
])
|
|
303
|
+
], 512), [
|
|
304
|
+
[D, h.value]
|
|
305
|
+
])
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
})
|
|
309
|
+
]),
|
|
310
|
+
_: 1
|
|
311
|
+
})
|
|
312
|
+
])) : q("", !0)
|
|
313
|
+
], 64);
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
async function Ae(u) {
|
|
318
|
+
return (await oe({
|
|
319
|
+
customIdToken: u
|
|
320
|
+
}).post("/token", { token: u })).data;
|
|
321
|
+
}
|
|
322
|
+
async function Ue(u) {
|
|
323
|
+
return (await oe({
|
|
324
|
+
customIdToken: u
|
|
325
|
+
}).post("/token/idtoken", { customToken: u })).data;
|
|
326
|
+
}
|
|
327
|
+
const ue = {
|
|
328
|
+
getCustomToken: Ae,
|
|
329
|
+
getIdToken: Ue
|
|
330
|
+
};
|
|
331
|
+
var Re = { firebase: {} }, Fe = {};
|
|
332
|
+
let z = null;
|
|
333
|
+
function Ee(u) {
|
|
334
|
+
var v;
|
|
335
|
+
const c = (v = u.name.split(".").pop()) == null ? void 0 : v.toLowerCase();
|
|
336
|
+
return c && /^[a-z0-9]+$/.test(c) ? c : {
|
|
337
|
+
"image/jpeg": "jpg",
|
|
338
|
+
"image/png": "png",
|
|
339
|
+
"image/webp": "webp",
|
|
340
|
+
"image/gif": "gif"
|
|
341
|
+
}[u.type] ?? "bin";
|
|
342
|
+
}
|
|
343
|
+
function Ne() {
|
|
344
|
+
var e;
|
|
345
|
+
return (((e = Fe.firebase) == null ? void 0 : e.storageBucket) ?? Re.firebase.storageBucket ?? "image.feedmedev.cc").replace(/^https?:\/\//, "").replace(/\/+$/, "");
|
|
346
|
+
}
|
|
347
|
+
function Oe(u) {
|
|
348
|
+
const c = u.replace(/^\/+/, "");
|
|
349
|
+
return `https://${Ne()}/${c}`;
|
|
350
|
+
}
|
|
351
|
+
async function $e() {
|
|
352
|
+
const u = ie();
|
|
353
|
+
if (!u.currentUser && (await u.authStateReady(), !u.currentUser && (z || (z = (async () => {
|
|
354
|
+
const c = se.getIdToken();
|
|
355
|
+
if (!c)
|
|
356
|
+
throw new Error("Missing session token for Firebase authentication");
|
|
357
|
+
const e = await ue.getCustomToken(c);
|
|
358
|
+
await de(u, e);
|
|
359
|
+
})().finally(() => {
|
|
360
|
+
z = null;
|
|
361
|
+
})), await z, !u.currentUser)))
|
|
362
|
+
throw new Error("User not authenticated for image upload");
|
|
363
|
+
}
|
|
364
|
+
async function Me() {
|
|
365
|
+
const u = ie(), c = se.getIdToken();
|
|
366
|
+
if (!c)
|
|
367
|
+
throw new Error("Missing session token for Firebase authentication");
|
|
368
|
+
u.currentUser && await Pe(u);
|
|
369
|
+
const e = await ue.getCustomToken(c);
|
|
370
|
+
await de(u, e);
|
|
371
|
+
}
|
|
372
|
+
async function Le(u, c) {
|
|
373
|
+
const e = ge(), v = ae(e, u);
|
|
374
|
+
try {
|
|
375
|
+
await le(v, c, {
|
|
376
|
+
contentType: c.type || void 0
|
|
377
|
+
});
|
|
378
|
+
return;
|
|
379
|
+
} catch (V) {
|
|
380
|
+
if ((V == null ? void 0 : V.code) !== "storage/unauthorized")
|
|
381
|
+
throw V;
|
|
382
|
+
}
|
|
383
|
+
await Me();
|
|
384
|
+
const x = ae(e, u);
|
|
385
|
+
await le(x, c, {
|
|
386
|
+
contentType: c.type || void 0
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
async function De(u, c) {
|
|
390
|
+
await $e();
|
|
391
|
+
const e = u.replace(/^\/+/, "").replace(/\/+$/, ""), v = Ee(c), x = `${Date.now()}_${Math.random().toString(36).slice(2, 10)}.${v}`, V = `${e}/${x}`;
|
|
392
|
+
return await Le(V, c), Oe(V);
|
|
393
|
+
}
|
|
394
|
+
const We = {
|
|
395
|
+
key: 0,
|
|
396
|
+
class: "flex flex-col gap-32"
|
|
397
|
+
}, Ye = {
|
|
398
|
+
key: 0,
|
|
399
|
+
class: "flex flex-col gap-2"
|
|
400
|
+
}, Qe = { class: "fm-typo-en-title-sm-600" }, je = { class: "flex flex-col gap-1 w-full md:w-1/2" }, qe = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Be = { class: "flex flex-col gap-2" }, ze = { class: "fm-typo-en-title-sm-600" }, He = { class: "flex flex-col gap-5" }, Ke = { class: "flex flex-col gap-16" }, Ge = { 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" }, Ze = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, Je = { class: "fm-typo-en-title-sm-600" }, ea = { class: "flex flex-row gap-2" }, aa = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, la = { class: "fm-typo-en-title-sm-600" }, ta = { class: "flex flex-col gap-2" }, na = { class: "fm-typo-en-title-sm-600" }, oa = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-2 my-5 w-11/12" }, sa = { class: "fm-typo-en-title-sm-600" }, ra = { class: "flex flex-col gap-2" }, ia = { class: "fm-typo-en-title-sm-600" }, da = { class: "flex flex-col gap-2" }, ua = { class: "fm-typo-en-title-sm-600" }, ma = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, pa = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12" }, ca = { class: "fm-typo-en-body-md-600" }, ya = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, fa = {
|
|
401
|
+
key: 1,
|
|
402
|
+
class: "flex flex-col gap-2"
|
|
403
|
+
}, va = ["src", "alt"], ba = { class: "border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12" }, ga = { class: "fm-typo-en-body-md-600" }, Pa = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ia = {
|
|
404
|
+
key: 1,
|
|
405
|
+
class: "flex flex-col gap-2"
|
|
406
|
+
}, ha = ["src", "alt"], Sa = { class: "flex flex-col gap-2" }, xa = { class: "fm-typo-en-title-sm-600" }, _a = { class: "flex flex-col gap-2" }, Ta = { class: "fm-typo-en-title-sm-600" }, Va = { class: "fm-typo-en-title-sm-400 font-bold" }, ka = { key: 1 }, te = 10 * 1e3 * 1e3, Oa = /* @__PURE__ */ ne({
|
|
407
|
+
__name: "KioskSettingView",
|
|
408
|
+
props: {
|
|
409
|
+
restaurantId: {},
|
|
410
|
+
form: {}
|
|
411
|
+
},
|
|
412
|
+
emits: ["updateKioskOrderSetting"],
|
|
413
|
+
setup(u, { emit: c }) {
|
|
414
|
+
const { t: e } = re(), v = ve(), x = F(() => {
|
|
415
|
+
var n;
|
|
416
|
+
return ((n = v.sessionUser.value) == null ? void 0 : n.role.isAdmin) ?? !1;
|
|
417
|
+
}), V = u, N = be(), H = c, t = E(V.form), g = (n) => n < 0 ? e("order.nonNegativeRule") : !0, w = (n) => n <= (t.value.dineIn.displayStand.standSlotRange.min ?? 0) ? e("order.greaterThanMinRule") : !0, y = F(() => [g]), C = F(() => [g]), O = F(() => [g, w]), h = F(() => {
|
|
418
|
+
var m;
|
|
419
|
+
const n = t.value, a = (m = n.otaChannel) == null ? void 0 : m.trim();
|
|
420
|
+
if (n.dineIn.enabled && n.dineIn.displayStand.enabled) {
|
|
421
|
+
const { padDigit: P, standSlotRange: S } = n.dineIn.displayStand;
|
|
422
|
+
if (!(P != null && P >= 0 && S.min != null && S.max != null && S.min <= S.max)) return null;
|
|
423
|
+
}
|
|
424
|
+
return {
|
|
425
|
+
...n,
|
|
426
|
+
otaChannel: a || void 0,
|
|
427
|
+
dineIn: {
|
|
428
|
+
...n.dineIn,
|
|
429
|
+
displayStand: {
|
|
430
|
+
...n.dineIn.displayStand,
|
|
431
|
+
enabled: n.dineIn.enabled && n.dineIn.displayStand.enabled,
|
|
432
|
+
padDigit: n.dineIn.displayStand.padDigit ?? 0,
|
|
433
|
+
standSlotRange: {
|
|
434
|
+
min: n.dineIn.displayStand.standSlotRange.min ?? 0,
|
|
435
|
+
max: n.dineIn.displayStand.standSlotRange.max ?? 10
|
|
436
|
+
},
|
|
437
|
+
prefix: n.dineIn.displayStand.prefix ?? ""
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
}), { startAsyncCall: T } = fe();
|
|
442
|
+
function B(n) {
|
|
443
|
+
t.value.paymentSetting.paymentTypes = n;
|
|
444
|
+
}
|
|
445
|
+
function K(n) {
|
|
446
|
+
t.value.paymentSetting.ePaymentTypes = n;
|
|
447
|
+
}
|
|
448
|
+
function Y(n) {
|
|
449
|
+
t.value[n] = null;
|
|
450
|
+
}
|
|
451
|
+
function W(n) {
|
|
452
|
+
const a = t.value[n];
|
|
453
|
+
if (!a) return null;
|
|
454
|
+
const m = a.trim();
|
|
455
|
+
return m.length > 0 ? m : null;
|
|
456
|
+
}
|
|
457
|
+
async function U(n, a) {
|
|
458
|
+
try {
|
|
459
|
+
const m = await T(async () => {
|
|
460
|
+
const P = `/restaurant/${V.restaurantId}/kiosk/${n}`;
|
|
461
|
+
return await De(P, a);
|
|
462
|
+
});
|
|
463
|
+
t.value[n] = m, N.open({
|
|
464
|
+
title: e("order.imageUploadSuccess"),
|
|
465
|
+
type: "success"
|
|
466
|
+
});
|
|
467
|
+
} catch (m) {
|
|
468
|
+
console.error(m), N.open({
|
|
469
|
+
title: e("order.imageUploadFailed"),
|
|
470
|
+
type: "error"
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
function $(n, a) {
|
|
475
|
+
var S, R;
|
|
476
|
+
const m = e(n === "coverImageLandscape" ? "order.coverImageLandscape" : "order.coverImagePortrait"), P = (R = (S = a[0]) == null ? void 0 : S.reason) == null ? void 0 : R[0];
|
|
477
|
+
N.open({
|
|
478
|
+
title: P ? `${e("order.imageUploadRejected")}: ${m} (${P})` : `${e("order.imageUploadRejected")}: ${m}`,
|
|
479
|
+
type: "error"
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
const Q = F(() => (t.value.paymentSetting.paymentTypes || []).includes(M.enum.ePayment)), d = F({
|
|
483
|
+
get: () => (t.value.dineIn.displayStand.enabled && t.value.dineIn.displayStand.enablePaxDialog || t.value.dineIn.pickUp.enablePaxDialog) ?? !1,
|
|
484
|
+
set: (n) => {
|
|
485
|
+
t.value.dineIn.displayStand.enablePaxDialog = n, t.value.dineIn.pickUp.enablePaxDialog = n;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
async function o() {
|
|
489
|
+
if (h.value) {
|
|
490
|
+
const n = h.value;
|
|
491
|
+
T(async () => {
|
|
492
|
+
await H("updateKioskOrderSetting", n);
|
|
493
|
+
});
|
|
494
|
+
} else
|
|
495
|
+
N.open({
|
|
496
|
+
title: e("order.failedToUpdateSetting"),
|
|
497
|
+
type: "error"
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
return (n, a) => {
|
|
501
|
+
const m = k("FmTextField"), P = k("FmSwitch"), S = k("FmStepperField"), R = k("FmDropField"), j = k("FmButton");
|
|
502
|
+
return t.value ? (I(), _("div", We, [
|
|
503
|
+
x.value ? (I(), _("div", Ye, [
|
|
504
|
+
r("span", Qe, b(l(e)("order.otaChannel")), 1),
|
|
505
|
+
r("div", je, [
|
|
506
|
+
i(m, {
|
|
507
|
+
modelValue: t.value.otaChannel,
|
|
508
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => t.value.otaChannel = s),
|
|
509
|
+
label: l(e)("order.otaChannel"),
|
|
510
|
+
placeholder: l(e)("order.otaChannelHint")
|
|
511
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
512
|
+
r("span", qe, b(l(e)("order.otaChannelHint")), 1)
|
|
513
|
+
])
|
|
514
|
+
])) : q("", !0),
|
|
515
|
+
r("div", Be, [
|
|
516
|
+
r("span", ze, b(l(e)("order.dineIn")), 1),
|
|
517
|
+
r("div", He, [
|
|
518
|
+
i(P, {
|
|
519
|
+
modelValue: t.value.dineIn.enabled,
|
|
520
|
+
"onUpdate:modelValue": a[1] || (a[1] = (s) => t.value.dineIn.enabled = s),
|
|
521
|
+
label: l(e)("order.dineIn"),
|
|
522
|
+
"label-placement": "right"
|
|
523
|
+
}, null, 8, ["modelValue", "label"]),
|
|
524
|
+
L(r("div", Ke, [
|
|
525
|
+
r("div", null, [
|
|
526
|
+
i(P, {
|
|
527
|
+
modelValue: t.value.dineIn.pickUp.enabled,
|
|
528
|
+
"onUpdate:modelValue": a[2] || (a[2] = (s) => t.value.dineIn.pickUp.enabled = s),
|
|
529
|
+
label: l(e)("order.pickAtCounter"),
|
|
530
|
+
"label-placement": "right"
|
|
531
|
+
}, null, 8, ["modelValue", "label"]),
|
|
532
|
+
L(r("div", Ge, [
|
|
533
|
+
r("span", Xe, b(l(e)("order.submitOrderInstruction")), 1),
|
|
534
|
+
i(m, {
|
|
535
|
+
modelValue: t.value.dineIn.pickUp.submitOrderInstruction.payAtCounter,
|
|
536
|
+
"onUpdate:modelValue": a[3] || (a[3] = (s) => t.value.dineIn.pickUp.submitOrderInstruction.payAtCounter = s),
|
|
537
|
+
label: l(e)("order.payAtCounter"),
|
|
538
|
+
placeholder: "Collect your transaction slip below and present it to the cashier"
|
|
539
|
+
}, null, 8, ["modelValue", "label"]),
|
|
540
|
+
i(m, {
|
|
541
|
+
modelValue: t.value.dineIn.pickUp.submitOrderInstruction.paid,
|
|
542
|
+
"onUpdate:modelValue": a[4] || (a[4] = (s) => t.value.dineIn.pickUp.submitOrderInstruction.paid = s),
|
|
543
|
+
label: l(e)("order.paid"),
|
|
544
|
+
placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
|
|
545
|
+
}, null, 8, ["modelValue", "label"])
|
|
546
|
+
], 512), [
|
|
547
|
+
[D, t.value.dineIn.pickUp.enabled]
|
|
548
|
+
])
|
|
549
|
+
]),
|
|
550
|
+
r("div", null, [
|
|
551
|
+
i(P, {
|
|
552
|
+
modelValue: t.value.dineIn.displayStand.enabled,
|
|
553
|
+
"onUpdate:modelValue": a[5] || (a[5] = (s) => t.value.dineIn.displayStand.enabled = s),
|
|
554
|
+
label: l(e)("order.displayStand"),
|
|
555
|
+
"label-placement": "right"
|
|
556
|
+
}, null, 8, ["modelValue", "label"]),
|
|
557
|
+
L(r("div", Ze, [
|
|
558
|
+
r("span", Je, b(l(e)("order.tableServiceSetting")), 1),
|
|
559
|
+
i(m, {
|
|
560
|
+
modelValue: t.value.dineIn.displayStand.prefix,
|
|
561
|
+
"onUpdate:modelValue": a[6] || (a[6] = (s) => t.value.dineIn.displayStand.prefix = s),
|
|
562
|
+
label: l(e)("order.prefix"),
|
|
563
|
+
placeholder: l(e)("order.prefix")
|
|
564
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
565
|
+
r("div", ea, [
|
|
566
|
+
i(S, {
|
|
567
|
+
modelValue: t.value.dineIn.displayStand.standSlotRange.min,
|
|
568
|
+
"onUpdate:modelValue": a[7] || (a[7] = (s) => t.value.dineIn.displayStand.standSlotRange.min = s),
|
|
569
|
+
class: "w-1/2",
|
|
570
|
+
label: l(e)("order.start"),
|
|
571
|
+
labelMark: "required",
|
|
572
|
+
rules: C.value,
|
|
573
|
+
placeholder: l(e)("order.enterANumber")
|
|
574
|
+
}, null, 8, ["modelValue", "label", "rules", "placeholder"]),
|
|
575
|
+
i(S, {
|
|
576
|
+
modelValue: t.value.dineIn.displayStand.standSlotRange.max,
|
|
577
|
+
"onUpdate:modelValue": a[8] || (a[8] = (s) => t.value.dineIn.displayStand.standSlotRange.max = s),
|
|
578
|
+
class: "w-1/2",
|
|
579
|
+
label: l(e)("order.end"),
|
|
580
|
+
labelMark: "required",
|
|
581
|
+
rules: O.value,
|
|
582
|
+
placeholder: l(e)("order.enterANumber")
|
|
583
|
+
}, null, 8, ["modelValue", "label", "rules", "placeholder"])
|
|
584
|
+
]),
|
|
585
|
+
i(S, {
|
|
586
|
+
modelValue: t.value.dineIn.displayStand.padDigit,
|
|
587
|
+
"onUpdate:modelValue": a[9] || (a[9] = (s) => t.value.dineIn.displayStand.padDigit = s),
|
|
588
|
+
label: l(e)("order.padDigit"),
|
|
589
|
+
labelMark: "required",
|
|
590
|
+
rules: y.value,
|
|
591
|
+
placeholder: l(e)("order.padDigit")
|
|
592
|
+
}, null, 8, ["modelValue", "label", "rules", "placeholder"])
|
|
593
|
+
], 512), [
|
|
594
|
+
[D, t.value.dineIn.displayStand.enabled]
|
|
595
|
+
]),
|
|
596
|
+
L(r("div", aa, [
|
|
597
|
+
r("span", la, b(l(e)("order.submitOrderInstruction")), 1),
|
|
598
|
+
i(m, {
|
|
599
|
+
modelValue: t.value.dineIn.displayStand.submitOrderInstruction.payAtCounter,
|
|
600
|
+
"onUpdate:modelValue": a[10] || (a[10] = (s) => t.value.dineIn.displayStand.submitOrderInstruction.payAtCounter = s),
|
|
601
|
+
label: l(e)("order.payAtCounter"),
|
|
602
|
+
placeholder: "Collect your transaction slip below and present it to the cashier"
|
|
603
|
+
}, null, 8, ["modelValue", "label"]),
|
|
604
|
+
i(m, {
|
|
605
|
+
modelValue: t.value.dineIn.displayStand.submitOrderInstruction.paid,
|
|
606
|
+
"onUpdate:modelValue": a[11] || (a[11] = (s) => t.value.dineIn.displayStand.submitOrderInstruction.paid = s),
|
|
607
|
+
label: l(e)("order.paid"),
|
|
608
|
+
placeholder: "Please collect your receipt and we'll bring your food to your table once it's ready."
|
|
609
|
+
}, null, 8, ["modelValue", "label"])
|
|
610
|
+
], 512), [
|
|
611
|
+
[D, t.value.dineIn.displayStand.enabled]
|
|
612
|
+
])
|
|
613
|
+
])
|
|
614
|
+
], 512), [
|
|
615
|
+
[D, t.value.dineIn.enabled]
|
|
616
|
+
])
|
|
617
|
+
])
|
|
618
|
+
]),
|
|
619
|
+
r("div", ta, [
|
|
620
|
+
r("span", na, b(l(e)("order.takeawayTitle")), 1),
|
|
621
|
+
i(P, {
|
|
622
|
+
modelValue: t.value.takeaway.enabled,
|
|
623
|
+
"onUpdate:modelValue": a[12] || (a[12] = (s) => t.value.takeaway.enabled = s),
|
|
624
|
+
label: l(e)("order.takeaway"),
|
|
625
|
+
"label-placement": "right",
|
|
626
|
+
class: "mb-5"
|
|
627
|
+
}, null, 8, ["modelValue", "label"]),
|
|
628
|
+
L(r("div", oa, [
|
|
629
|
+
r("span", sa, b(l(e)("order.submitOrderInstruction")), 1),
|
|
630
|
+
i(m, {
|
|
631
|
+
modelValue: t.value.takeaway.submitOrderInstruction.payAtCounter,
|
|
632
|
+
"onUpdate:modelValue": a[13] || (a[13] = (s) => t.value.takeaway.submitOrderInstruction.payAtCounter = s),
|
|
633
|
+
label: l(e)("order.payAtCounter"),
|
|
634
|
+
placeholder: "Collect your transaction slip below and present it to the cashier"
|
|
635
|
+
}, null, 8, ["modelValue", "label"]),
|
|
636
|
+
i(m, {
|
|
637
|
+
modelValue: t.value.takeaway.submitOrderInstruction.paid,
|
|
638
|
+
"onUpdate:modelValue": a[14] || (a[14] = (s) => t.value.takeaway.submitOrderInstruction.paid = s),
|
|
639
|
+
label: l(e)("order.paid"),
|
|
640
|
+
placeholder: "Please wait as we prepare your food. We'll call your number when it's ready."
|
|
641
|
+
}, null, 8, ["modelValue", "label"])
|
|
642
|
+
], 512), [
|
|
643
|
+
[D, t.value.takeaway.enabled]
|
|
644
|
+
])
|
|
645
|
+
]),
|
|
646
|
+
r("div", ra, [
|
|
647
|
+
r("span", ia, b(l(e)("order.menuItem")), 1),
|
|
648
|
+
i(P, {
|
|
649
|
+
modelValue: t.value.menuItem.showAllOnly,
|
|
650
|
+
"onUpdate:modelValue": a[15] || (a[15] = (s) => t.value.menuItem.showAllOnly = s),
|
|
651
|
+
label: l(e)("order.showNotAvailableMenuItem"),
|
|
652
|
+
"label-placement": "right",
|
|
653
|
+
class: "mb-5"
|
|
654
|
+
}, null, 8, ["modelValue", "label"])
|
|
655
|
+
]),
|
|
656
|
+
r("div", da, [
|
|
657
|
+
r("span", ua, b(l(e)("order.coverImage")), 1),
|
|
658
|
+
r("span", ma, b(l(e)("order.coverImageFallbackHint")), 1),
|
|
659
|
+
r("div", pa, [
|
|
660
|
+
r("span", ca, b(l(e)("order.coverImageLandscape")), 1),
|
|
661
|
+
r("span", ya, b(l(e)("order.coverImageLandscapeHint")), 1),
|
|
662
|
+
W("coverImageLandscape") ? (I(), _("div", fa, [
|
|
663
|
+
r("img", {
|
|
664
|
+
src: W("coverImageLandscape"),
|
|
665
|
+
alt: l(e)("order.coverImageLandscape"),
|
|
666
|
+
class: "max-w-[400px] aspect-video object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
667
|
+
}, null, 8, va),
|
|
668
|
+
i(j, {
|
|
669
|
+
variant: "tertiary",
|
|
670
|
+
class: "mr-auto",
|
|
671
|
+
label: l(e)("common.delete"),
|
|
672
|
+
onClick: a[18] || (a[18] = (s) => Y("coverImageLandscape"))
|
|
673
|
+
}, null, 8, ["label"])
|
|
674
|
+
])) : (I(), ee(R, {
|
|
675
|
+
key: 0,
|
|
676
|
+
accept: "image/*",
|
|
677
|
+
"max-file-size": te,
|
|
678
|
+
"content-class": "w-full max-w-[400px] aspect-video",
|
|
679
|
+
onFileUpload: a[16] || (a[16] = (s) => U("coverImageLandscape", s)),
|
|
680
|
+
onFileRejected: a[17] || (a[17] = (s) => $("coverImageLandscape", s))
|
|
681
|
+
}))
|
|
682
|
+
]),
|
|
683
|
+
r("div", ba, [
|
|
684
|
+
r("span", ga, b(l(e)("order.coverImagePortrait")), 1),
|
|
685
|
+
r("span", Pa, b(l(e)("order.coverImagePortraitHint")), 1),
|
|
686
|
+
W("coverImagePortrait") ? (I(), _("div", Ia, [
|
|
687
|
+
r("img", {
|
|
688
|
+
src: W("coverImagePortrait"),
|
|
689
|
+
alt: l(e)("order.coverImagePortrait"),
|
|
690
|
+
class: "max-w-[200px] aspect-[9/16] object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
691
|
+
}, null, 8, ha),
|
|
692
|
+
i(j, {
|
|
693
|
+
variant: "tertiary",
|
|
694
|
+
class: "mr-auto",
|
|
695
|
+
label: l(e)("common.delete"),
|
|
696
|
+
onClick: a[21] || (a[21] = (s) => Y("coverImagePortrait"))
|
|
697
|
+
}, null, 8, ["label"])
|
|
698
|
+
])) : (I(), ee(R, {
|
|
699
|
+
key: 0,
|
|
700
|
+
accept: "image/*",
|
|
701
|
+
"max-file-size": te,
|
|
702
|
+
"content-class": "w-[240px] aspect-[9/16]",
|
|
703
|
+
onFileUpload: a[19] || (a[19] = (s) => U("coverImagePortrait", s)),
|
|
704
|
+
onFileRejected: a[20] || (a[20] = (s) => $("coverImagePortrait", s))
|
|
705
|
+
}))
|
|
706
|
+
])
|
|
707
|
+
]),
|
|
708
|
+
r("div", Sa, [
|
|
709
|
+
r("span", xa, b(l(e)("order.displayPaxDialogTitle")), 1),
|
|
710
|
+
i(P, {
|
|
711
|
+
modelValue: d.value,
|
|
712
|
+
"onUpdate:modelValue": a[22] || (a[22] = (s) => d.value = s),
|
|
713
|
+
label: l(e)("order.displayPaxDialogDescription"),
|
|
714
|
+
"label-placement": "right",
|
|
715
|
+
class: "mb-5"
|
|
716
|
+
}, null, 8, ["modelValue", "label"])
|
|
717
|
+
]),
|
|
718
|
+
r("div", _a, [
|
|
719
|
+
r("span", Ta, b(l(e)("order.acceptedPayment")), 1),
|
|
720
|
+
r("span", Va, b(l(e)("order.configuration")), 1),
|
|
721
|
+
i(Ce, {
|
|
722
|
+
"payment-types": t.value.paymentSetting.paymentTypes ?? [],
|
|
723
|
+
"allow-e-payment": Q.value,
|
|
724
|
+
"offline-payment-types": t.value.paymentSetting.offlinePaymentTypes ?? [],
|
|
725
|
+
ePaymentTypes: t.value.paymentSetting.ePaymentTypes ?? {},
|
|
726
|
+
"onUpdate:paymentTypes": B,
|
|
727
|
+
"onUpdate:offlinePaymentTypes": a[23] || (a[23] = (s) => t.value.paymentSetting.offlinePaymentTypes = s),
|
|
728
|
+
"onUpdate:ePaymentTypes": K
|
|
729
|
+
}, null, 8, ["payment-types", "allow-e-payment", "offline-payment-types", "ePaymentTypes"])
|
|
730
|
+
]),
|
|
731
|
+
i(j, {
|
|
732
|
+
class: "w-1/4 mb-10",
|
|
733
|
+
variant: "primary",
|
|
734
|
+
label: l(e)("order.updateSetting"),
|
|
735
|
+
disabled: !h.value,
|
|
736
|
+
onClick: o
|
|
737
|
+
}, null, 8, ["label", "disabled"])
|
|
738
|
+
])) : (I(), _("div", ka, b(l(e)("order.pleaseSelectRestaurant")), 1));
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
export {
|
|
743
|
+
Oa as default
|
|
744
|
+
};
|