- miglioramenti ricerca titoli e modifica del trafiletto
- miglior visualizzazione delle liste
This commit is contained in:
@@ -106,8 +106,8 @@ export default defineComponent({
|
||||
|
||||
// Colonne della tabella
|
||||
const allColumns = [
|
||||
{ name: "pos", label: "Pos", field: "pos", align: "left", style: "width: 50px" },
|
||||
{ name: "drag", label: "Ordinam.", field: "", align: "left", style: "width: 50px", edit: true },
|
||||
{ name: "pos", label: "Ind", field: "pos", align: "left", style: "width: 50px" },
|
||||
{ name: "drag", label: "Ord", field: "", align: "left", style: "width: 50px", edit: true },
|
||||
{ name: "image", label: "Foto", field: "image", align: "center" },
|
||||
{ name: "name", label: "Titolo del Libro", field: "name", align: "left" },
|
||||
{ name: "authors", label: "Autore", field: "authors", align: "left" },
|
||||
@@ -125,11 +125,11 @@ export default defineComponent({
|
||||
//{ name: "rank6M", label: "Class. 6M", field: "rank6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
//{ name: "rank1Y", label: "Class. 1Y", field: "rank1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "pagine", label: "Pag.", field: "pagine", align: "right" },
|
||||
{ name: "totVen", label: "Venduti", field: "totVen", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "totFat", label: "Fattur.", field: "totFat", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "totVen", label: "Vend", field: "totVen", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "fatLast6M", label: "Fat 6M", field: "fatLast6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "fatLast1Y", label: "Fat Anno", field: "fatLast1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "fatLast1Y", label: "Fat 1A", field: "fatLast1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "fatLast2Y", label: "Fat 2A", field: "fatLast2Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "totFat", label: "Fat 5A", field: "totFat", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "ult_ord", label: "Ult. Ordine", field: "ult_ord", align: "left", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "quantity", label: "Magazz.", field: "quantity", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
{ name: "actions", label: "Azioni", field: "", align: "center", visu: costanti.VISUCAMPI.PER_EDITORE },
|
||||
@@ -202,6 +202,9 @@ export default defineComponent({
|
||||
case 'fatLast1Y':
|
||||
return element.productInfo?.fatLast1Y;
|
||||
|
||||
case 'fatLast2Y':
|
||||
return element.productInfo?.fatLast2Y;
|
||||
|
||||
case 'ult_ord':
|
||||
return tools.getstrDate(element.productInfo?.dataUltimoOrdine);
|
||||
|
||||
@@ -254,6 +257,7 @@ export default defineComponent({
|
||||
case 'totFat':
|
||||
case 'fatLast6M':
|
||||
case 'fatLast1Y':
|
||||
case 'fatLast2Y':
|
||||
|
||||
default:
|
||||
return '';
|
||||
@@ -268,14 +272,12 @@ export default defineComponent({
|
||||
height: '50px'
|
||||
};
|
||||
|
||||
case 'rank3M':
|
||||
case 'rank6M':
|
||||
case 'rank1Y':
|
||||
case 'pagine':
|
||||
case 'totVen':
|
||||
case 'totFat':
|
||||
case 'fatLast6M':
|
||||
case 'fatLast1Y':
|
||||
case 'fatLast2Y':
|
||||
case 'quantity':
|
||||
return {
|
||||
textAlign: 'right'
|
||||
@@ -308,7 +310,15 @@ export default defineComponent({
|
||||
|
||||
|
||||
// 3. Funzione per verificare se una colonna è visibile (isColumnVisible)
|
||||
const isColumnVisible = (column) => {
|
||||
const isColumnVisible = (column, real?: boolean) => {
|
||||
if (column === 'actions' && !real) {
|
||||
return false
|
||||
}
|
||||
if (internalProducts.value?.length > 1000) {
|
||||
if (column === 'image') {
|
||||
return false
|
||||
}
|
||||
}
|
||||
const ok = allColumns.some((col) => col.name === column) && (!props.optcatalogo.showListaArgomenti || (props.optcatalogo.showListaArgomenti && !column.edit))
|
||||
return selectedColumns.value.includes(column) && ok;
|
||||
}
|
||||
@@ -458,11 +468,6 @@ export default defineComponent({
|
||||
case 'image':
|
||||
return () => showProduct(element);
|
||||
|
||||
case 'name':
|
||||
case 'authors':
|
||||
case 'isbn':
|
||||
return () => showProduct(element);
|
||||
|
||||
case 'stato':
|
||||
return () => {
|
||||
// esempio: mostra dettagli dello stato
|
||||
|
||||
Reference in New Issue
Block a user