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