Aggiornamento cataloghi...

This commit is contained in:
Surya Paolo
2025-04-11 18:49:42 +02:00
parent cea3bcfa0e
commit 3616e2ca0f
44 changed files with 593 additions and 206 deletions

View File

@@ -6,6 +6,7 @@ import { tools } from '@tools'
import { useGlobalStore } from '@src/store/globalStore'
import { CMyValueDb } from '@src/components/CMyValueDb'
import { CSchedaProdotto } from '@src/components/CSchedaProdotto'
import { CSearchProduct } from '@src/components/CSearchProduct'
import { CMyDialog } from '@src/components/CMyDialog'
@@ -29,6 +30,7 @@ export default defineComponent({
emits: ["update:lista_prodotti", "update:optcatalogo"],
components: {
draggable, CSearchProduct, CMyDialog, CMyValueDb, CViewTable, CLabel,
CSchedaProdotto,
},
props: {
lista_prodotti: {
@@ -69,7 +71,6 @@ export default defineComponent({
const field_updated_fromGM = ref('')
const modifOn = ref(false)
const endload = ref(false)
const optionscatalogo = ref(<any>{maxlength: 0})
@@ -173,18 +174,6 @@ export default defineComponent({
.join(", ");
}
function formatCatProds(catprods: ICatProd[] | undefined | null): string {
if (!catprods || !Array.isArray(catprods)) {
return "";
}
// Estrai il nome e il cognome di ogni autore e uniscili con ', '
return catprods
.map((catprod) => `${catprod.name ?? ""}`.trim())
.filter((name) => name.length > 0) // Filtra eventuali nomi vuoti
.join(", ");
}
// Caricamento delle preferenze al mount del componente
onMounted(() => {
const savedColumns = tools.getCookie("selColCat");
@@ -269,7 +258,6 @@ export default defineComponent({
isColumnVisible,
internalProducts,
formatAuthors,
formatCatProds,
removeProduct,
modifyProduct,
tools,
@@ -290,7 +278,6 @@ export default defineComponent({
loading,
showQtaDisponibile,
modifOn,
endload,
updateproductmodif,
optionscatalogo,
t,