@feedmepos/mf-order-setting 0.0.46 → 0.0.47
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/{OrderSettingsView-DNuKMNFe.js → OrderSettingsView-DPYYH1zL.js} +1998 -1972
- package/dist/{app-DGT9bC4M.js → app-CAt1JfN3.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/views/order-settings/delivery/integrated-delivery/ExternalSetting.vue +13 -0
- package/src/views/order-settings/delivery/integrated-delivery/IntegratedDelivery.vue +25 -2
package/package.json
CHANGED
|
@@ -7,6 +7,14 @@
|
|
|
7
7
|
@update:model-value="updateEnable"
|
|
8
8
|
/>
|
|
9
9
|
<div class="mt-6">
|
|
10
|
+
<div>
|
|
11
|
+
<FmCheckbox
|
|
12
|
+
:model-value="data.config.autoSend"
|
|
13
|
+
:label="t('order.autoSendKitchen')"
|
|
14
|
+
@update:model-value="updateAutoSend"
|
|
15
|
+
value=""
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
10
18
|
<div>
|
|
11
19
|
<FmCheckbox
|
|
12
20
|
:model-value="data.config.autoCloseBill"
|
|
@@ -101,6 +109,11 @@ function emitUpdatedValue() {
|
|
|
101
109
|
emits('update:model-value', { ...data })
|
|
102
110
|
}
|
|
103
111
|
|
|
112
|
+
function updateAutoSend(value: boolean) {
|
|
113
|
+
data.config.autoSend = value
|
|
114
|
+
emitUpdatedValue()
|
|
115
|
+
}
|
|
116
|
+
|
|
104
117
|
function updateAutoCloseBill(value: boolean) {
|
|
105
118
|
data.config.autoCloseBill = value
|
|
106
119
|
emitUpdatedValue()
|
|
@@ -188,6 +188,29 @@ function convertStatusI18n(status: string) {
|
|
|
188
188
|
return t('order.failed')
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
+
|
|
192
|
+
const formattedMenuSyncError = computed(() => {
|
|
193
|
+
const error = props.modelValue.auto.menuSyncError
|
|
194
|
+
if (!error) return null
|
|
195
|
+
|
|
196
|
+
let formatted = error
|
|
197
|
+
|
|
198
|
+
// Find all item_ or product_ IDs in the error message
|
|
199
|
+
const itemIdPattern = /(item_[^\s,]+|product_[^\s,]+)/g
|
|
200
|
+
const matches = error.match(itemIdPattern)
|
|
201
|
+
|
|
202
|
+
if (matches) {
|
|
203
|
+
for (const itemId of matches) {
|
|
204
|
+
const item = menuStore.items.find((i) => i._id === itemId)
|
|
205
|
+
if (item) {
|
|
206
|
+
const itemName = item.code ? `${item.code} - ${item.name}` : item.name
|
|
207
|
+
formatted = formatted.replace(itemId, `"${itemName}" (${itemId})`)
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return formatted
|
|
213
|
+
})
|
|
191
214
|
</script>
|
|
192
215
|
|
|
193
216
|
<template>
|
|
@@ -259,8 +282,8 @@ function convertStatusI18n(status: string) {
|
|
|
259
282
|
{{ t('order.status') }}: {{ convertStatusI18n(modelValue.auto.status) }}
|
|
260
283
|
</div>
|
|
261
284
|
<FmTooltip
|
|
262
|
-
v-if="modelValue.auto.status === 'FAILED' &&
|
|
263
|
-
:content="
|
|
285
|
+
v-if="modelValue.auto.status === 'FAILED' && formattedMenuSyncError !== null"
|
|
286
|
+
:content="formattedMenuSyncError"
|
|
264
287
|
:zIndex="1000"
|
|
265
288
|
>
|
|
266
289
|
<FmIcon name="info" size="sm" />
|