From 669186a43add081af38ac820383bf3f462626b8c Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 11 Nov 2024 09:56:03 +0100 Subject: [PATCH] revert: #7679 improve changes --- src/pages/Item/ItemFixedPrice.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index d46bd5c3e..3e4b1513f 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -220,9 +220,6 @@ const updateMinPrice = async (value, props) => { }; const validations = ({ row }) => { - const isNew = !row.id; - if (!isNew) return false; - const requiredFields = [ 'itemFk', 'started', @@ -247,6 +244,7 @@ const upsertPrice = async (props, resetMinPrice = false) => { if (changes?.updates?.length > 0) { if (resetMinPrice) row.hasMinPrice = 0; } + if (!changes.updates && !changes.creates) return; const data = await upsertFixedPrice(row); tableRef.value.CrudModelRef.formData[props.rowIndex] = data; } catch (err) { @@ -429,6 +427,10 @@ function handleOnDataSave({ CrudModelRef }) { auto-load :is-editable="true" :right-search="false" + :table="{ + 'row-key': 'id', + selection: 'multiple', + }" :crud-model="{ paginate: false, }"