aggiornamento cataloghi, search

This commit is contained in:
Surya Paolo
2025-04-22 18:30:42 +02:00
parent 6d0efaadb9
commit ae4efab0f3
18 changed files with 117 additions and 27 deletions

View File

@@ -34,6 +34,7 @@ import {
import { fieldsTable } from '@store/Modules/fieldsTable'
import { useCatalogStore } from '@src/store/CatalogStore'
import { Catalogo } from '.';
import Products from 'app/src/rootgen/admin/products/products.vue';
export default defineComponent({
name: 'Catalogo',
@@ -471,6 +472,10 @@ export default defineComponent({
return false;
}
// il prodotto dev'essere disponibile
if (!productStore.isPubblicato(product))
return false
const lowerName = (product.productInfo.name || '').toLowerCase();
const lowerCode = (product.productInfo.code || '').toLowerCase();
@@ -613,7 +618,7 @@ export default defineComponent({
title: 'Rigenera lista',
message: 'Sicuri di rigenerare questa lista di libri, perdendo l\'ordinamento attuale ?',
cancel: true,
persistent: true
persistent: false
}).onOk(() => {
calcArrProducts(true)
})
@@ -790,8 +795,10 @@ export default defineComponent({
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
indprod = 0
} else {
if (recscheda.scheda.sort_field!) {
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, recscheda.scheda.sort_field, recscheda.scheda.sort_dir);
let sort_field = recscheda.scheda.sort_field! || optcatalogo.value.sort_field
let sort_dir = recscheda.scheda.sort_dir || optcatalogo.value.sort_dir
if (sort_field) {
arrProdFiltrati = getProductsSorted(arrGeneraleProdotti, sort_field, sort_dir);
indprod = 0
} else {
indprod = indprodGenerale