Aggiornamento cataloghi...
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -82,11 +82,10 @@
|
||||
</td>
|
||||
|
||||
<!-- Argomento -->
|
||||
<td v-if="isColumnVisible('catprods')">{{ formatCatProds(element.productInfo?.catprods) }}</td>
|
||||
<td v-if="isColumnVisible('catprods')">{{ tools.formatCatProds(element.productInfo?.catprods) }}</td>
|
||||
|
||||
<td v-if="isColumnVisible('date_pub')">{{ tools.getstrDate(element.productInfo?.date_pub) }}</td>
|
||||
|
||||
<td v-if="isColumnVisible('ranking')">{{ element.indiceRanking }}</td>
|
||||
<td
|
||||
v-if="isColumnVisible('rank3M')"
|
||||
style="text-align: right"
|
||||
@@ -189,13 +188,18 @@
|
||||
maximized
|
||||
>
|
||||
<q-spinner
|
||||
v-if="!endload"
|
||||
v-if="loading"
|
||||
color="primary"
|
||||
size="3em"
|
||||
:thickness="2"
|
||||
/>
|
||||
|
||||
<div v-if="!!selProd && !!selProd.productInfo">
|
||||
<CSchedaProdotto
|
||||
v-model="selProd"
|
||||
@updateproductmodif="updateproductmodif"
|
||||
>
|
||||
</CSchedaProdotto>
|
||||
</div>
|
||||
</q-dialog>
|
||||
<q-dialog
|
||||
@@ -216,7 +220,7 @@
|
||||
</q-toolbar>
|
||||
<q-card-section class="q-pa-xs inset-shadow">
|
||||
<q-spinner
|
||||
v-if="!endload"
|
||||
v-if="loading"
|
||||
color="primary"
|
||||
size="3em"
|
||||
:thickness="2"
|
||||
|
||||
Reference in New Issue
Block a user