diff --git a/src/pages/Item/Card/ItemDiary.vue b/src/pages/Item/Card/ItemDiary.vue index b94ff9255..96a003a09 100644 --- a/src/pages/Item/Card/ItemDiary.vue +++ b/src/pages/Item/Card/ItemDiary.vue @@ -233,7 +233,7 @@ async function updateWarehouse(warehouseFk) { - + [ name: 'itemFk', ...defaultColumnAttrs, isId: true, - cardVisible: true, columnField: { component: 'input', type: 'number', @@ -65,14 +64,12 @@ const columns = computed(() => [ name: 'name', ...defaultColumnAttrs, create: true, - cardVisible: true, }, { label: t('item.fixedPrice.groupingPrice'), field: 'rate2', name: 'rate2', ...defaultColumnAttrs, - cardVisible: true, component: 'input', type: 'number', }, @@ -81,7 +78,6 @@ const columns = computed(() => [ field: 'rate3', name: 'rate3', ...defaultColumnAttrs, - cardVisible: true, component: 'input', type: 'number', }, @@ -91,7 +87,6 @@ const columns = computed(() => [ field: 'minPrice', name: 'minPrice', ...defaultColumnAttrs, - cardVisible: true, component: 'input', type: 'number', }, @@ -100,7 +95,6 @@ const columns = computed(() => [ field: 'started', name: 'started', format: ({ started }) => toDate(started), - cardVisible: true, ...defaultColumnAttrs, columnField: { component: 'date', @@ -116,7 +110,6 @@ const columns = computed(() => [ field: 'ended', name: 'ended', ...defaultColumnAttrs, - cardVisible: true, columnField: { component: 'date', class: 'shrink', @@ -251,11 +244,14 @@ const upsertPrice = async (props, resetMinPrice = false) => { } if (!changes.updates && !changes.creates) return; const data = await upsertFixedPrice(row); - tableRef.value.CrudModelRef.formData[props.rowIndex] = data; + Object.assign(tableRef.value.CrudModelRef.formData[props.rowIndex], data); + notify(t('globals.dataSaved'), 'positive'); + tableRef.value.reload(); }; async function upsertFixedPrice(row) { const { data } = await axios.patch('FixedPrices/upsertFixedPrice', row); + data.hasMinPrice = data.hasMinPrice ? 1 : 0; return data; } @@ -395,18 +391,11 @@ function handleOnDataSave({ CrudModelRef }) {