@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
|
@@ -92,6 +92,16 @@ const initializeCheckboxes = () => {
|
|
|
92
92
|
eWalletPaymentCheckboxVal.value.push(F_ORDER_E_PAYMENT_TYPE.enum.SCANPAY)
|
|
93
93
|
useEwallet.value = true
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
if (props.ePaymentTypes.eWallet.terminalScanPay) {
|
|
97
|
+
eWalletPaymentCheckboxVal.value.push(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_SCAN_PAY)
|
|
98
|
+
useEwallet.value = true
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (props.ePaymentTypes.eWallet.terminalQrPay) {
|
|
102
|
+
eWalletPaymentCheckboxVal.value.push(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_QR_PAY)
|
|
103
|
+
useEwallet.value = true
|
|
104
|
+
}
|
|
95
105
|
}
|
|
96
106
|
}
|
|
97
107
|
|
|
@@ -154,7 +164,9 @@ const handleEPaymentCardUpdate = (ev: string) => {
|
|
|
154
164
|
},
|
|
155
165
|
eWallet: {
|
|
156
166
|
qrPay: false,
|
|
157
|
-
scanPay: false
|
|
167
|
+
scanPay: false,
|
|
168
|
+
terminalScanPay: false,
|
|
169
|
+
terminalQrPay: false,
|
|
158
170
|
}
|
|
159
171
|
} as FdoEPaymentMethod
|
|
160
172
|
|
|
@@ -175,6 +187,12 @@ const handleEPaymentCardUpdate = (ev: string) => {
|
|
|
175
187
|
if (eWalletPaymentCheckboxVal.value.includes(F_ORDER_E_PAYMENT_TYPE.enum.SCANPAY)) {
|
|
176
188
|
ePaymentObj.eWallet.scanPay = true
|
|
177
189
|
}
|
|
190
|
+
if (eWalletPaymentCheckboxVal.value.includes(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_SCAN_PAY)) {
|
|
191
|
+
ePaymentObj.eWallet.terminalScanPay = true
|
|
192
|
+
}
|
|
193
|
+
if (eWalletPaymentCheckboxVal.value.includes(F_ORDER_E_PAYMENT_TYPE.enum.TERMINAL_QR_PAY)) {
|
|
194
|
+
ePaymentObj.eWallet.terminalQrPay = true
|
|
195
|
+
}
|
|
178
196
|
}
|
|
179
197
|
}
|
|
180
198
|
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="!!kioskOrderSettingForm" class="flex flex-col gap-32">
|
|
3
|
+
<!-- OTA Channel Section -->
|
|
4
|
+
<div v-if="isAdmin" class="flex flex-col gap-2">
|
|
5
|
+
<span class="fm-typo-en-title-sm-600">{{ t('order.otaChannel') }}</span>
|
|
6
|
+
<div class="flex flex-col gap-1 w-full md:w-1/2">
|
|
7
|
+
<FmTextField
|
|
8
|
+
v-model="kioskOrderSettingForm.otaChannel"
|
|
9
|
+
:label="t('order.otaChannel')"
|
|
10
|
+
:placeholder="t('order.otaChannelHint')"
|
|
11
|
+
/>
|
|
12
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">
|
|
13
|
+
{{ t('order.otaChannelHint') }}
|
|
14
|
+
</span>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
3
18
|
<!-- Dine In Section -->
|
|
4
19
|
<div class="flex flex-col gap-2">
|
|
5
20
|
<span class="fm-typo-en-title-sm-600">{{ t('order.dineIn') }}</span>
|
|
@@ -140,65 +155,65 @@
|
|
|
140
155
|
/>
|
|
141
156
|
</div>
|
|
142
157
|
|
|
143
|
-
<!-- Cover Image Section -->
|
|
144
|
-
<div class="flex flex-col gap-2">
|
|
145
|
-
<span class="fm-typo-en-title-sm-600">{{ t('order.coverImage') }}</span>
|
|
146
|
-
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
147
|
-
t('order.coverImageFallbackHint')
|
|
148
|
-
}}</span>
|
|
149
|
-
|
|
150
|
-
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
151
|
-
<span class="fm-typo-en-body-md-600">{{ t('order.coverImageLandscape') }}</span>
|
|
152
|
-
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
153
|
-
t('order.coverImageLandscapeHint')
|
|
154
|
-
}}</span>
|
|
155
|
-
<FmDropField
|
|
156
|
-
v-if="!getCoverImagePreview('coverImageLandscape')"
|
|
157
|
-
accept="image/*"
|
|
158
|
-
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
159
|
-
content-class="w-full max-w-[400px] aspect-video"
|
|
160
|
-
@file-upload="uploadCoverImage('coverImageLandscape', $event)"
|
|
161
|
-
@file-rejected="handleCoverImageRejected('coverImageLandscape', $event)"
|
|
162
|
-
/>
|
|
158
|
+
<!-- Cover Image Section -->
|
|
159
|
+
<div class="flex flex-col gap-2">
|
|
160
|
+
<span class="fm-typo-en-title-sm-600">{{ t('order.coverImage') }}</span>
|
|
161
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
162
|
+
t('order.coverImageFallbackHint')
|
|
163
|
+
}}</span>
|
|
164
|
+
|
|
165
|
+
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
166
|
+
<span class="fm-typo-en-body-md-600">{{ t('order.coverImageLandscape') }}</span>
|
|
167
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
168
|
+
t('order.coverImageLandscapeHint')
|
|
169
|
+
}}</span>
|
|
170
|
+
<FmDropField
|
|
171
|
+
v-if="!getCoverImagePreview('coverImageLandscape')"
|
|
172
|
+
accept="image/*"
|
|
173
|
+
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
174
|
+
content-class="w-full max-w-[400px] aspect-video"
|
|
175
|
+
@file-upload="uploadCoverImage('coverImageLandscape', $event)"
|
|
176
|
+
@file-rejected="handleCoverImageRejected('coverImageLandscape', $event)"
|
|
177
|
+
/>
|
|
163
178
|
<div v-else class="flex flex-col gap-2">
|
|
164
179
|
<img
|
|
165
180
|
:src="getCoverImagePreview('coverImageLandscape')!"
|
|
166
181
|
:alt="t('order.coverImageLandscape')"
|
|
167
|
-
class="max-w-[400px] aspect-video object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
168
|
-
/>
|
|
169
|
-
<FmButton
|
|
170
|
-
variant="tertiary"
|
|
171
|
-
class="mr-auto"
|
|
172
|
-
:label="t('common.delete')"
|
|
173
|
-
@click="clearCoverImage('coverImageLandscape')"
|
|
182
|
+
class="max-w-[400px] aspect-video object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
183
|
+
/>
|
|
184
|
+
<FmButton
|
|
185
|
+
variant="tertiary"
|
|
186
|
+
class="mr-auto"
|
|
187
|
+
:label="t('common.delete')"
|
|
188
|
+
@click="clearCoverImage('coverImageLandscape')"
|
|
174
189
|
/>
|
|
175
190
|
</div>
|
|
176
191
|
</div>
|
|
177
192
|
|
|
178
|
-
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
179
|
-
<span class="fm-typo-en-body-md-600">{{ t('order.coverImagePortrait') }}</span>
|
|
180
|
-
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
181
|
-
t('order.coverImagePortraitHint')
|
|
182
|
-
}}</span>
|
|
183
|
-
<FmDropField
|
|
184
|
-
v-if="!getCoverImagePreview('coverImagePortrait')"
|
|
185
|
-
accept="image/*"
|
|
186
|
-
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
187
|
-
content-class="w-[240px] aspect-[9/16]"
|
|
188
|
-
@file-upload="uploadCoverImage('coverImagePortrait', $event)"
|
|
189
|
-
@file-rejected="handleCoverImageRejected('coverImagePortrait', $event)"
|
|
193
|
+
<div class="border p-[1.5rem] fm-corner-radius-lg flex flex-col gap-4 my-5 w-11/12">
|
|
194
|
+
<span class="fm-typo-en-body-md-600">{{ t('order.coverImagePortrait') }}</span>
|
|
195
|
+
<span class="fm-typo-en-body-sm-400 text-fm-color-typo-secondary">{{
|
|
196
|
+
t('order.coverImagePortraitHint')
|
|
197
|
+
}}</span>
|
|
198
|
+
<FmDropField
|
|
199
|
+
v-if="!getCoverImagePreview('coverImagePortrait')"
|
|
200
|
+
accept="image/*"
|
|
201
|
+
:max-file-size="MAX_IMAGE_FILE_SIZE"
|
|
202
|
+
content-class="w-[240px] aspect-[9/16]"
|
|
203
|
+
@file-upload="uploadCoverImage('coverImagePortrait', $event)"
|
|
204
|
+
@file-rejected="handleCoverImageRejected('coverImagePortrait', $event)"
|
|
190
205
|
/>
|
|
191
206
|
<div v-else class="flex flex-col gap-2">
|
|
192
207
|
<img
|
|
193
208
|
:src="getCoverImagePreview('coverImagePortrait')!"
|
|
194
209
|
:alt="t('order.coverImagePortrait')"
|
|
195
|
-
class="max-w-[200px] aspect-[9/16] object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
196
|
-
/>
|
|
197
|
-
<FmButton
|
|
198
|
-
variant="tertiary"
|
|
199
|
-
class="mr-auto"
|
|
200
|
-
:label="t('common.delete')"
|
|
201
|
-
@click="clearCoverImage('coverImagePortrait')"
|
|
210
|
+
class="max-w-[200px] aspect-[9/16] object-cover rounded-md border border-fm-color-neutral-gray-200"
|
|
211
|
+
/>
|
|
212
|
+
<FmButton
|
|
213
|
+
variant="tertiary"
|
|
214
|
+
class="mr-auto"
|
|
215
|
+
:label="t('common.delete')"
|
|
216
|
+
@click="clearCoverImage('coverImagePortrait')"
|
|
202
217
|
/>
|
|
203
218
|
</div>
|
|
204
219
|
</div>
|
|
@@ -258,9 +273,12 @@ import type {
|
|
|
258
273
|
import { useLoading } from '@/composables/loading'
|
|
259
274
|
import { useSnackbar } from '@feedmepos/ui-library'
|
|
260
275
|
import { useI18n } from '@feedmepos/mf-common'
|
|
276
|
+
import { useCoreStore } from '@feedmepos/mf-common'
|
|
261
277
|
import { uploadImageFile } from '@/utils/firebase-storage'
|
|
262
278
|
|
|
263
279
|
const { t } = useI18n()
|
|
280
|
+
const CoreStore = useCoreStore()
|
|
281
|
+
const isAdmin = computed(() => CoreStore.sessionUser.value?.role.isAdmin ?? false)
|
|
264
282
|
|
|
265
283
|
interface Props {
|
|
266
284
|
restaurantId: string
|
|
@@ -298,6 +316,7 @@ const maxRules = computed(() => [nonNegativeRule, greaterThanMinRule])
|
|
|
298
316
|
|
|
299
317
|
const validKioskOrderSetting = computed<MfKioskOrderSetting | null>(() => {
|
|
300
318
|
const f = kioskOrderSettingForm.value
|
|
319
|
+
const otaChannel = f.otaChannel?.trim()
|
|
301
320
|
|
|
302
321
|
// Validate display stand settings if both dineIn and displayStand are enabled
|
|
303
322
|
if (f.dineIn.enabled && f.dineIn.displayStand.enabled) {
|
|
@@ -315,6 +334,7 @@ const validKioskOrderSetting = computed<MfKioskOrderSetting | null>(() => {
|
|
|
315
334
|
// Return the form as-is if valid, with display stand disabled when dineIn is disabled
|
|
316
335
|
return {
|
|
317
336
|
...f,
|
|
337
|
+
otaChannel: otaChannel || undefined,
|
|
318
338
|
dineIn: {
|
|
319
339
|
...f.dineIn,
|
|
320
340
|
displayStand: {
|
|
@@ -341,8 +361,8 @@ function updateEPaymentSetting(form: FdoEPaymentMethod) {
|
|
|
341
361
|
kioskOrderSettingForm.value.paymentSetting.ePaymentTypes = form
|
|
342
362
|
}
|
|
343
363
|
|
|
344
|
-
type CoverImageField = 'coverImageLandscape' | 'coverImagePortrait'
|
|
345
|
-
const MAX_IMAGE_FILE_SIZE = 10 * 1000 * 1000
|
|
364
|
+
type CoverImageField = 'coverImageLandscape' | 'coverImagePortrait'
|
|
365
|
+
const MAX_IMAGE_FILE_SIZE = 10 * 1000 * 1000
|
|
346
366
|
|
|
347
367
|
function clearCoverImage(field: CoverImageField) {
|
|
348
368
|
kioskOrderSettingForm.value[field] = null
|
|
@@ -74,7 +74,7 @@ async function updateDriveThruSetting() {
|
|
|
74
74
|
if (newDriveThruSetting) {
|
|
75
75
|
await restaurantStore.updateDriveThruSetting(newDriveThruSetting)
|
|
76
76
|
if (currentRestaurant.value) {
|
|
77
|
-
currentRestaurant.value.driveThru = newDriveThruSetting
|
|
77
|
+
;(currentRestaurant.value as any).driveThru = newDriveThruSetting
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
})
|
|
@@ -84,8 +84,8 @@ async function updateDriveThruSetting() {
|
|
|
84
84
|
watch(
|
|
85
85
|
() => currentRestaurant.value,
|
|
86
86
|
async (newRestaurant) => {
|
|
87
|
-
if (newRestaurant?.driveThru) {
|
|
88
|
-
driveThruSetting.value = utils.clone(newRestaurant.driveThru)
|
|
87
|
+
if ((newRestaurant as any)?.driveThru) {
|
|
88
|
+
driveThruSetting.value = utils.clone((newRestaurant as any).driveThru)
|
|
89
89
|
} else {
|
|
90
90
|
driveThruSetting.value = initDriveThruSetting()
|
|
91
91
|
}
|
|
@@ -94,7 +94,7 @@ watch(
|
|
|
94
94
|
)
|
|
95
95
|
|
|
96
96
|
onMounted(async () => {
|
|
97
|
-
const newRestaurant = currentRestaurant.value
|
|
97
|
+
const newRestaurant = currentRestaurant.value as any
|
|
98
98
|
if (newRestaurant?.driveThru) {
|
|
99
99
|
driveThruSetting.value = utils.clone(newRestaurant.driveThru)
|
|
100
100
|
}
|
|
@@ -480,11 +480,7 @@ watch(
|
|
|
480
480
|
/>
|
|
481
481
|
</div>
|
|
482
482
|
<div class="fm-corner-radius-lg flex flex-col" v-if="showTable">
|
|
483
|
-
<div
|
|
484
|
-
v-for="(item, index) in filteredTable"
|
|
485
|
-
:key="index"
|
|
486
|
-
class="flex flex-col pl-6"
|
|
487
|
-
>
|
|
483
|
+
<div v-for="(item, index) in filteredTable" :key="index" class="flex flex-col pl-6">
|
|
488
484
|
<FmCheckbox
|
|
489
485
|
:value="item.name"
|
|
490
486
|
:model-value="selectedTables[item.name].isSelected"
|