feature/EntriesCorrections #177

Merged
alexm merged 24 commits from :feature/EntriesCorrections into dev 2024-02-07 06:44:33 +00:00
1 changed files with 19 additions and 18 deletions
Showing only changes of commit 5da5bb2047 - Show all commits

View File

@ -29,6 +29,16 @@ const rowsSelected = ref([]);
const entryBuysPaginateRef = ref(null);
const packagingsOptions = ref(null);
const originalRowDataCopy = ref(null);
jsegarra marked this conversation as resolved Outdated

Intuyo que esta es la configuración de la columna Articulo de la tabla para entry/:id/buys
Falta itemDescriptor

Intuyo que esta es la configuración de la columna Articulo de la tabla para entry/:id/buys Falta itemDescriptor

Aplicado.

Commit: 0525f5fdd8

Aplicado. Commit: https://gitea.verdnatura.es/verdnatura/salix-front/commit/0525f5fdd80c41bb44b63969b229e4137d324ce6
const getInputEvents = (colField, props) => {
return colField === 'packagingFk'
? { 'update:modelValue': () => saveChange(colField, props) }
: {
'keyup.enter': () => saveChange(colField, props),
blur: () => saveChange(colField, props),
};
};
const tableColumnComponents = {
item: {
component: QBtn,
@ -46,7 +56,7 @@ const tableColumnComponents = {
label: col.label,
class: 'input-number',
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
packagingFk: {
component: VnSelectFilter,
@ -59,7 +69,7 @@ const tableColumnComponents = {
'hide-selected': true,
options: packagingsOptions.value,
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
stickers: {
component: VnInput,
@ -69,7 +79,7 @@ const tableColumnComponents = {
label: col.label,
class: 'input-number',
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
weight: {
component: VnInput,
@ -78,7 +88,7 @@ const tableColumnComponents = {
min: 0,
label: col.label,
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
packing: {
component: VnInput,
@ -87,7 +97,7 @@ const tableColumnComponents = {
min: 0,
label: col.label,
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
grouping: {
component: VnInput,
@ -96,7 +106,7 @@ const tableColumnComponents = {
min: 0,
label: col.label,
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
buyingValue: {
component: VnInput,
@ -105,7 +115,7 @@ const tableColumnComponents = {
min: 0,
label: col.label,
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
price2: {
component: VnInput,
@ -114,7 +124,7 @@ const tableColumnComponents = {
min: 0,
label: col.label,
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
price3: {
component: VnInput,
@ -123,7 +133,7 @@ const tableColumnComponents = {
min: 0,
label: col.label,
}),
event: (colField, props) => getInputEvents(colField, props),
event: getInputEvents,
},
import: {
component: 'span',
@ -209,15 +219,6 @@ const copyOriginalRowsData = (rows) => {
originalRowDataCopy.value = JSON.parse(JSON.stringify(rows));
};
const getInputEvents = (colField, props) => {
return colField === 'packagingFk'
? { 'update:modelValue': () => saveChange(colField, props) }
: {
'keyup.enter': () => saveChange(colField, props),
blur: () => saveChange(colField, props),
};
};
const saveChange = async (field, { rowIndex, row }) => {
try {
if (originalRowDataCopy.value[rowIndex][field] == row[field]) return;