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