0
0
Fork 0

revert: #7679 improve changes

This commit is contained in:
Javier Segarra 2024-11-11 09:56:03 +01:00
parent e5a0c42352
commit 669186a43a
1 changed files with 5 additions and 3 deletions

View File

@ -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,
}"