forked from verdnatura/salix-front
revert: #7679 improve changes
This commit is contained in:
parent
e5a0c42352
commit
669186a43a
|
@ -220,9 +220,6 @@ const updateMinPrice = async (value, props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const validations = ({ row }) => {
|
const validations = ({ row }) => {
|
||||||
const isNew = !row.id;
|
|
||||||
if (!isNew) return false;
|
|
||||||
|
|
||||||
const requiredFields = [
|
const requiredFields = [
|
||||||
'itemFk',
|
'itemFk',
|
||||||
'started',
|
'started',
|
||||||
|
@ -247,6 +244,7 @@ const upsertPrice = async (props, resetMinPrice = false) => {
|
||||||
if (changes?.updates?.length > 0) {
|
if (changes?.updates?.length > 0) {
|
||||||
if (resetMinPrice) row.hasMinPrice = 0;
|
if (resetMinPrice) row.hasMinPrice = 0;
|
||||||
}
|
}
|
||||||
|
if (!changes.updates && !changes.creates) return;
|
||||||
const data = await upsertFixedPrice(row);
|
const data = await upsertFixedPrice(row);
|
||||||
tableRef.value.CrudModelRef.formData[props.rowIndex] = data;
|
tableRef.value.CrudModelRef.formData[props.rowIndex] = data;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -429,6 +427,10 @@ function handleOnDataSave({ CrudModelRef }) {
|
||||||
auto-load
|
auto-load
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:right-search="false"
|
:right-search="false"
|
||||||
|
:table="{
|
||||||
|
'row-key': 'id',
|
||||||
|
selection: 'multiple',
|
||||||
|
}"
|
||||||
:crud-model="{
|
:crud-model="{
|
||||||
paginate: false,
|
paginate: false,
|
||||||
}"
|
}"
|
||||||
|
|
Loading…
Reference in New Issue