- Altri aggiornamenti della scheda
This commit is contained in:
@@ -27,7 +27,7 @@ import { useI18n } from "vue-i18n";
|
||||
|
||||
export default defineComponent({
|
||||
name: "CProductTable",
|
||||
emits: ["update:lista_prodotti", "update:optcatalogo"],
|
||||
emits: ["update:lista_prodotti", "update:optcatalogo", "rigenera"],
|
||||
components: {
|
||||
draggable, CSearchProduct, CMyDialog, CMyValueDb, CViewTable, CLabel,
|
||||
CSchedaProdotto,
|
||||
@@ -75,8 +75,8 @@ export default defineComponent({
|
||||
const sortAttribute = ref('')
|
||||
const sortDirection = ref(1)
|
||||
|
||||
const optionscatalogo = ref(<any>{ maxlength: 0 })
|
||||
|
||||
const optionscatalogo = ref(<any>{maxlength: 0})
|
||||
|
||||
const editOn = computed({
|
||||
get(): boolean {
|
||||
@@ -111,6 +111,7 @@ export default defineComponent({
|
||||
{ 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" },
|
||||
{ name: "isbn", label: "ISBN", field: "isbn", align: "left" },
|
||||
{ name: "trafiletto", label: "Trafiletto", field: "trafiletto", align: "left" },
|
||||
{ name: "catprods", label: "Argomento", field: "catprods", align: "left" },
|
||||
{ name: "idCollana", label: "Collana", field: "idCollana", align: "left" },
|
||||
@@ -128,7 +129,6 @@ export default defineComponent({
|
||||
{ name: "fatLast1Y", label: "Fat Anno", field: "fatLast1Y", align: "right" },
|
||||
{ name: "ult_ord", label: "Ult. Ordine", field: "ult_ord", align: "left" },
|
||||
{ name: "quantity", label: "Magazz.", field: "quantity", align: "right" },
|
||||
{ name: "isbn", label: "ISBN", field: "isbn", align: "left" },
|
||||
{ name: "actions", label: "Azioni", field: "", align: "center" },
|
||||
];
|
||||
|
||||
@@ -286,7 +286,9 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function rigenera() {
|
||||
emit('rigenera')
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="row justify-center q-mx-auto q-pt-sm text-italic">
|
||||
{{ internalProducts?.length }} elementi nella lista
|
||||
</div>
|
||||
|
||||
<!-- Tabella Prodotti -->
|
||||
<table>
|
||||
<!-- Intestazioni (Thead) -->
|
||||
@@ -29,7 +33,7 @@
|
||||
>
|
||||
{{ col.label }}
|
||||
<q-icon
|
||||
v-if="(sortAttribute === col.name) && optcatalogo.showListaArgomenti"
|
||||
v-if="sortAttribute === col.name && optcatalogo.showListaArgomenti"
|
||||
:name="sortDirection === 1 ? 'arrow_drop_up' : 'arrow_drop_down'"
|
||||
size="16px"
|
||||
class="q-ml-xs"
|
||||
@@ -56,11 +60,7 @@
|
||||
<tr
|
||||
:key="element._id"
|
||||
:class="{
|
||||
'text-white bg-purple': products.isProssimaUscita(element.productInfo),
|
||||
'bg-yellow': products.isPubblicato(element.productInfo) && products.isQtaLimitata(element),
|
||||
'bg-orange': products.isPubblicato(element.productInfo) && products.isInEsaurendo(element),
|
||||
'text-white bg-red-10': products.isPubblicato(element.productInfo) && products.isEsaurito(element),
|
||||
'bg-grey': products.isNonVendibile(element.productInfo),
|
||||
'bg-grey-2': internalProducts.indexOf(element) % 2 === 1,
|
||||
}"
|
||||
>
|
||||
<!-- Icona Drag Handle -->
|
||||
@@ -101,6 +101,9 @@
|
||||
<!-- Autore -->
|
||||
<td v-if="isColumnVisible('authors')">{{ formatAuthors(element.productInfo?.authors) }}</td>
|
||||
|
||||
<!-- ISBN -->
|
||||
<td v-if="isColumnVisible('isbn')">{{ element.isbn }}</td>
|
||||
|
||||
<td
|
||||
v-if="isColumnVisible('trafiletto')"
|
||||
style="text-align: center"
|
||||
@@ -113,7 +116,13 @@
|
||||
<td v-if="isColumnVisible('catprods')">{{ tools.formatCatProds(element.productInfo?.catprods) }}</td>
|
||||
<!-- Collana -->
|
||||
<td v-if="isColumnVisible('idCollana')">{{ tools.formatCollane(element.productInfo?.idCollana) }}</td>
|
||||
<td v-if="isColumnVisible('stato')">
|
||||
<td
|
||||
v-if="isColumnVisible('stato')"
|
||||
:class="{
|
||||
'bg-purple-3': products.isProssimaUscita(element.productInfo),
|
||||
'bg-grey': products.isNonVendibile(element.productInfo),
|
||||
}"
|
||||
>
|
||||
{{ products.getDescrStatiProdottoByIdStatoProdotto(element.productInfo.idStatoProdotto || '') }}
|
||||
</td>
|
||||
<td v-if="isColumnVisible('tipologia')">
|
||||
@@ -181,13 +190,15 @@
|
||||
<td
|
||||
v-if="isColumnVisible('quantity')"
|
||||
style="text-align: right"
|
||||
:class="{
|
||||
'bg-yellow': products.isPubblicato(element.productInfo) && products.isQtaLimitata(element),
|
||||
'bg-orange': products.isPubblicato(element.productInfo) && products.isInEsaurendo(element),
|
||||
'text-white bg-red-10': products.isPubblicato(element.productInfo) && products.isEsaurito(element),
|
||||
}"
|
||||
>
|
||||
{{ element.arrvariazioni[0].quantita }}
|
||||
</td>
|
||||
|
||||
<!-- ISBN -->
|
||||
<td v-if="isColumnVisible('isbn')">{{ element.isbn }}</td>
|
||||
|
||||
<!-- Azioni -->
|
||||
<td v-if="isColumnVisible('actions')">
|
||||
<q-btn-dropdown
|
||||
|
||||
Reference in New Issue
Block a user