- Altri aggiornamenti della scheda
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<q-select
|
||||
v-if="queryList"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
outline
|
||||
v-model="querySel"
|
||||
:options="queryList"
|
||||
:label="t('queryai.selectquery') + `:`"
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
outline
|
||||
v-model="model"
|
||||
:options="modelList"
|
||||
style="min-width: 200px"
|
||||
@@ -33,7 +33,7 @@
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
outline
|
||||
v-model="contestsystem"
|
||||
:options="contestSysteList"
|
||||
style="min-width: 200px"
|
||||
@@ -46,7 +46,7 @@
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
outline
|
||||
v-model="max_tokens"
|
||||
style="min-width: 200px"
|
||||
:options="tokenList"
|
||||
@@ -59,7 +59,7 @@
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
outline
|
||||
v-model="temperatura"
|
||||
style="min-width: 200px"
|
||||
:options="tempList"
|
||||
@@ -72,7 +72,7 @@
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
outlined
|
||||
outline
|
||||
v-model="outputType"
|
||||
style="min-width: 200px"
|
||||
:options="outputTypeList"
|
||||
|
||||
@@ -46,7 +46,7 @@ export default defineComponent({
|
||||
console.log('updateCatalogoEmit')
|
||||
localCatalogo.value = updatedCatalogo; // Aggiorna la copia locale
|
||||
updateCatalogoPadre()
|
||||
|
||||
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -1644,7 +1644,7 @@
|
||||
>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
<!--<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.productTypes"
|
||||
rounded
|
||||
@@ -1658,19 +1658,20 @@
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
</q-select>-->
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.excludeproductTypes"
|
||||
:options="shared_consts.VERSIONI_PRODOTTO"
|
||||
v-model="myel.catalogo.idTipologie"
|
||||
:options="Products.tipologie"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
label="Escludi Stato Prodotto"
|
||||
label="Tipologia"
|
||||
style="width: 300px"
|
||||
option-value="IdTipologia"
|
||||
option-label="Descrizione"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
@@ -1956,20 +1957,21 @@
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.productTypes"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda.scheda.productTypes"
|
||||
:options="shared_consts.VERSIONI_PRODOTTO"
|
||||
v-model="recscheda.scheda.idTipologie"
|
||||
:options="Products.tipologie"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
option-value="IdTipologia"
|
||||
option-label="Descrizione"
|
||||
label="Includi"
|
||||
style="width: 300px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
<!--<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes"
|
||||
rounded
|
||||
@@ -1983,7 +1985,7 @@
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
</q-select>-->
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
v-if="editorestr"
|
||||
class="text-caption text-h7 text-grey q-pb-xs"
|
||||
>
|
||||
<q-icon name="fas fa-book-open" /> {{ $t('cataloglist.referenti') }}:
|
||||
<q-icon name="fas fa-book-open" /> {{ $t('cataloglist.casaeditrice') }}:
|
||||
<span class="text-blue">{{ editorestr }}</span>
|
||||
</div>
|
||||
<div
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -321,6 +321,17 @@ export default defineComponent({
|
||||
type: costanti.FieldType.string,
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: true,
|
||||
label: "Edizione",
|
||||
table: "arrvariazioni",
|
||||
id: myproduct.value._id,
|
||||
rec: myproduct.value,
|
||||
mykey: "edizione",
|
||||
debounce: "1000",
|
||||
type: costanti.FieldType.string,
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: false,
|
||||
label: "Tipologia",
|
||||
@@ -334,7 +345,7 @@ export default defineComponent({
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: false,
|
||||
editOn: true,
|
||||
label: "Formato",
|
||||
table: "arrvariazioni",
|
||||
id: myproduct.value._id,
|
||||
@@ -345,17 +356,6 @@ export default defineComponent({
|
||||
jointable: 't_web_tipiformatos',
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: true,
|
||||
label: "Formato",
|
||||
table: "arrvariazioni",
|
||||
id: myproduct.value._id,
|
||||
rec: myproduct.value,
|
||||
mykey: "formato",
|
||||
debounce: "1000",
|
||||
type: costanti.FieldType.string,
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: true,
|
||||
label: "Prezzo",
|
||||
@@ -392,6 +392,17 @@ export default defineComponent({
|
||||
type: costanti.FieldType.number,
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: false,
|
||||
label: "Aggiornato (da GM) il",
|
||||
table: "productinfos",
|
||||
id: myproduct.value.productInfo._id,
|
||||
rec: myproduct.value.productInfo,
|
||||
mykey: "date_updated_fromGM",
|
||||
debounce: "1000",
|
||||
type: costanti.FieldType.onlydate,
|
||||
dense: true,
|
||||
},
|
||||
]
|
||||
|
||||
return arrlist
|
||||
|
||||
@@ -808,6 +808,7 @@ export interface IMyScheda {
|
||||
|
||||
productTypes?: number[]
|
||||
excludeproductTypes?: number[]
|
||||
idTipologie?: number[]
|
||||
editore?: string[]
|
||||
argomenti?: string[]
|
||||
idCollane?: number[]
|
||||
@@ -845,11 +846,17 @@ export interface ISchedaSingola {
|
||||
arrProdToShow?: IProduct[][][]
|
||||
}
|
||||
|
||||
export interface IOptRigenera {
|
||||
visibilitaDisp?: string
|
||||
stato?: string
|
||||
}
|
||||
|
||||
export interface IOptCatalogo {
|
||||
//++AddCATALOGO_FIELDS
|
||||
productTypes?: number[]
|
||||
excludeproductTypes?: number[]
|
||||
formato?: string[]
|
||||
idTipologie?: number[]
|
||||
Categoria?: string[]
|
||||
editore?: string[]
|
||||
argomenti?: string[]
|
||||
|
||||
@@ -45,6 +45,7 @@ export interface IProductInfo {
|
||||
ListaArgomenti?: string
|
||||
publisher?: IPublisher
|
||||
date_pub?: Date
|
||||
date_updated_fromGM?: Date
|
||||
date_pub_ts?: number
|
||||
pagine?: number
|
||||
productTypes?: number[]
|
||||
@@ -82,6 +83,8 @@ export interface IVariazione {
|
||||
availability?: number
|
||||
formato?: string
|
||||
misure?: string
|
||||
edizione?: string
|
||||
ristampa?: string
|
||||
pagine?: number
|
||||
tipologia?: string
|
||||
idTipologia?: number
|
||||
@@ -196,6 +199,7 @@ export interface IProductsState {
|
||||
|
||||
isPubblicatoById?: (idStatoProdotto: number) => boolean;
|
||||
isProssimaUscitaById?: (idStatoProdotto: number) => boolean;
|
||||
isPrevenditaById?: (idStatoProdotto: number) => boolean;
|
||||
}
|
||||
|
||||
export interface IProducer {
|
||||
|
||||
@@ -2002,6 +2002,7 @@ const msg_it = {
|
||||
pagine: '{pagine}',
|
||||
misure: '{misure}',
|
||||
date_pub: '{date_pub}',
|
||||
date_updated_fromGM: '{date_updated_fromGM}',
|
||||
ranking_globale: '{ranking_globale}',
|
||||
ranking: '{ranking}',
|
||||
venduti: '{venduti}',
|
||||
@@ -2023,6 +2024,7 @@ const msg_it = {
|
||||
},
|
||||
|
||||
cataloglist: {
|
||||
casaeditrice: 'Casa Editrice',
|
||||
numprodotti: 'Libri presenti',
|
||||
foto_collana: 'Foto Catalogo',
|
||||
referenti: 'Editori',
|
||||
|
||||
@@ -519,6 +519,20 @@ export const costanti = {
|
||||
CATALOGHI: {
|
||||
PAG_INTRO_DEFAULT: 'introduttiva_default.png',
|
||||
PAG_SFONDO_DEFAULT: 'sfondo_default.png',
|
||||
},
|
||||
|
||||
DISP: {
|
||||
TUTTI: '0',
|
||||
DISPONIBILI: '1',
|
||||
ESAURITI: '2',
|
||||
},
|
||||
|
||||
STATO: {
|
||||
TUTTI: '0',
|
||||
IN_COMMERCIO: '1',
|
||||
SOLO_PROSSIMA_USCITA: '2',
|
||||
PREVENDITA: '3',
|
||||
NON_VENDIBILE: '4',
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -310,6 +310,7 @@ export const colmyScheda = [
|
||||
|
||||
AddCol({ name: 'productTypes', label_trans: 'productTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'excludeproductTypes', label_trans: 'excludeproductTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'idTipologie', label_trans: 'idTipologie', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'editore', label_trans: 'editore' }),
|
||||
AddCol({ name: 'author', label_trans: 'scheda.author' }),
|
||||
AddCol({ name: 'argomenti', label_trans: 'scheda.argomenti' }),
|
||||
@@ -327,6 +328,7 @@ export const colmyScheda = [
|
||||
export const colmyelCatalogo = [
|
||||
AddCol({ name: 'productTypes', label_trans: 'productTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'excludeproductTypes', label_trans: 'excludeproductTypes', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'idTipologie', label_trans: 'idTipologie', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'pdf', label_trans: 'pdf' }),
|
||||
AddCol({ name: 'pdf_filename', label_trans: 'pdf_filename' }),
|
||||
AddCol({ name: 'editore', label_trans: 'editore' }),
|
||||
@@ -659,7 +661,7 @@ export const colTableTipoFormato = [
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
export const colTableTipologie = [
|
||||
AddCol({ name: 'IdStatoProdotto', label_trans: 'statoprod.IdStatoProdotto' }),
|
||||
AddCol({ name: 'IdTipologia', label_trans: 'statoprod.IdTipologia' }),
|
||||
AddCol({ name: 'Descrizione', label_trans: 'statoprod.Descrizione' }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
@@ -2531,6 +2533,8 @@ export const colTableVariazioni = [
|
||||
AddCol({ name: 'availability', label_trans: 'catalogo.availability', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'formato', label_trans: 'catalogo.formato', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'misure', label_trans: 'catalogo.misure', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'ristampa', label_trans: 'catalogo.ristampa', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'edizione', label_trans: 'catalogo.edizione', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'tipologia', label_trans: 'catalogo.tipologia', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'edizione', label_trans: 'catalogo.edizione', fieldtype: costanti.FieldType.string }),
|
||||
AddCol({ name: 'preOrderDate', label_trans: 'catalogo.preOrderDate', fieldtype: costanti.FieldType.date }),
|
||||
@@ -4408,7 +4412,7 @@ export const fieldsTable = {
|
||||
value: 't_web_tipologies',
|
||||
label: 'Tipologie',
|
||||
columns: colTableTipologie,
|
||||
colkey: 'IdStatoProdotto',
|
||||
colkey: 'IdTipologia',
|
||||
collabel: 'Descrizione',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -145,14 +145,43 @@ export const useProducts = defineStore('Products', {
|
||||
return product?.arrvariazioni?.[0]?.quantita > 0 && product.arrvariazioni?.[0]?.quantita < 50
|
||||
},
|
||||
isEsaurito: (state: IProductsState) => (product: IProduct): boolean => {
|
||||
return product?.arrvariazioni?.[0]?.quantita <= 0
|
||||
return product?.arrvariazioni?.[0]?.quantita <= 0 && !state.isProssimaUscitaById(product.productInfo.idStatoProdotto) && !state.isPrevenditaById(product.productInfo.idStatoProdotto)
|
||||
},
|
||||
|
||||
isPubblicatoById: (state: IProductsState) => (idStatoProdotto: number): boolean => {
|
||||
/*
|
||||
1 In commercio
|
||||
3 Ristampa
|
||||
4 Prossima uscita/pubblicazione
|
||||
6 In promozione
|
||||
7 In fase di valutazione
|
||||
8 Titolo in esaurimento (in attesa Nuova Edizione)
|
||||
9 Titolo in esaurimento
|
||||
20 Titolo in esaurimento (in att N.E Ricopertinata)
|
||||
26 Titolo in Esaurimento (disponibile N.E.)
|
||||
33 In commercio (digitale)
|
||||
34 In prevendita
|
||||
45 Vendita sito
|
||||
46 2023 in commercio
|
||||
47 Assoluto NO Reso
|
||||
48 Titolo esaurito
|
||||
|
||||
*/
|
||||
|
||||
switch (idStatoProdotto) {
|
||||
case 1: // In Commercio
|
||||
case 45: // In Commercio
|
||||
case 3: // Ristampa
|
||||
case 4: // Prossima uscita/pubblicazione
|
||||
case 6: // In promozione
|
||||
case 7: // In fase di valutazione
|
||||
case 8: // 8 Titolo in esaurimento (in attesa Nuova Edizione)
|
||||
case 9: // In Commercio
|
||||
case 33: // In commercio (digitale)
|
||||
case 34: // In prevendita
|
||||
case 45: // Vendita sito
|
||||
case 46: // 2023 in commercio
|
||||
case 47: // Assoluto NO Reso
|
||||
case 48: // Titolo esaurito
|
||||
case undefined:
|
||||
return true;
|
||||
default:
|
||||
@@ -161,9 +190,13 @@ export const useProducts = defineStore('Products', {
|
||||
},
|
||||
|
||||
isProssimaUscitaById: (state: IProductsState) => (idStatoProdotto: number): boolean => {
|
||||
// 4 - Prossima uscita
|
||||
return (idStatoProdotto === 4)
|
||||
},
|
||||
isPrevenditaById: (state: IProductsState) => (idStatoProdotto: number): boolean => {
|
||||
// 4 - Prossima uscita
|
||||
// 34 - In Prevendita
|
||||
return (idStatoProdotto === 4) || (idStatoProdotto === 34)
|
||||
return (idStatoProdotto === 34)
|
||||
},
|
||||
|
||||
isPubblicato: (state: IProductsState) => (productInfo: IProductInfo): boolean => {
|
||||
@@ -178,6 +211,10 @@ export const useProducts = defineStore('Products', {
|
||||
return state.isProssimaUscitaById(productInfo.idStatoProdotto)
|
||||
},
|
||||
|
||||
isPrevendita: (state: IProductsState) => (productInfo: IProductInfo): boolean => {
|
||||
return state.isPrevenditaById(productInfo.idStatoProdotto)
|
||||
},
|
||||
|
||||
getDescrStatiProdottoByIdStatoProdotto: (state: IProductsState) => (idStatoProdotto: number): string => {
|
||||
const ctrec = state.stati_prodotto.find((mystatus: T_Web_StatiProdotto) => mystatus.IdStatoProdotto === idStatoProdotto)
|
||||
return (ctrec) ? ctrec.Descrizione : ''
|
||||
@@ -1520,7 +1557,7 @@ export const useProducts = defineStore('Products', {
|
||||
// Additional replacements based on the content
|
||||
const keysToCheck = [
|
||||
'{titolo}', '{sottotitolo}', '{categoria}', '{sottocategoria}', '{descr_categoria}',
|
||||
'{pagine}', '{isbn}', '{misure}', '{argomento}', '{date_pub}', '{ranking_globale}',
|
||||
'{pagine}', '{isbn}', '{misure}', '{edizione', '{ristampa}', '{argomento}', '{date_pub}', '{date_updated_fromGM}', '{ranking_globale}',
|
||||
'{venduti}', '{formato}', '{tipologia}', '{stato}', '{scale}', '{descr_trafiletto_catalogo}',
|
||||
'{link_macro}', '{qta}', '{image_link}', '{imagefile}', '{debug}'
|
||||
];
|
||||
@@ -1549,12 +1586,21 @@ export const useProducts = defineStore('Products', {
|
||||
case '{misure}':
|
||||
replacements[key] = myproduct.arrvariazioni![0].misure || '';
|
||||
break;
|
||||
case '{edizione}':
|
||||
replacements[key] = myproduct.arrvariazioni![0].edizione || '';
|
||||
break;
|
||||
case '{ristampa}':
|
||||
replacements[key] = myproduct.arrvariazioni![0].ristampa || '';
|
||||
break;
|
||||
case '{argomento}':
|
||||
replacements[key] = this.getCatProdsStrByCatProds(myproduct.productInfo.catprods!) || '';
|
||||
break;
|
||||
case '{date_pub}':
|
||||
replacements[key] = tools.getstrDateShort(myproduct.productInfo.date_pub) || '';
|
||||
break;
|
||||
case '{date_updated_fromGM}':
|
||||
replacements[key] = tools.getstrDateShort(myproduct.productInfo.date_updated_fromGM) || '';
|
||||
break;
|
||||
case '{ranking_globale}':
|
||||
replacements[key] = myproduct.productInfo.rank3M! || '0';
|
||||
break;
|
||||
@@ -1833,6 +1879,7 @@ export const useProducts = defineStore('Products', {
|
||||
},
|
||||
productTypes: [],
|
||||
excludeproductTypes: [],
|
||||
idTipologie: [],
|
||||
editore: [],
|
||||
argomenti: [],
|
||||
author: '',
|
||||
|
||||
@@ -2444,6 +2444,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
return {
|
||||
productTypes: [0],
|
||||
excludeproductTypes: [],
|
||||
idTipologie: [],
|
||||
formato: [],
|
||||
Categoria: [],
|
||||
editore: [],
|
||||
|
||||
@@ -24,6 +24,7 @@ import type {
|
||||
IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg,
|
||||
IText,
|
||||
ICollana,
|
||||
IOptRigenera,
|
||||
} from 'model';
|
||||
import {
|
||||
IMyPage,
|
||||
@@ -60,12 +61,31 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const rigeneraLibri = ref(false)
|
||||
|
||||
const search = ref('')
|
||||
const optauthors = ref(<any>[])
|
||||
|
||||
const pdfContent = ref(null);
|
||||
const addnewProd = ref(false)
|
||||
|
||||
const optDisp = ref([
|
||||
{ label: 'Tutti', value: costanti.DISP.TUTTI },
|
||||
{ label: 'Disponibili', value: costanti.DISP.DISPONIBILI },
|
||||
{ label: 'Esauriti', value: costanti.DISP.ESAURITI }])
|
||||
|
||||
const optStato = ref([
|
||||
{ label: 'Tutti', value: costanti.STATO.TUTTI },
|
||||
{ label: 'In Commercio', value: costanti.STATO.IN_COMMERCIO },
|
||||
{ label: 'Prossima Uscita', value: costanti.STATO.SOLO_PROSSIMA_USCITA },
|
||||
{ label: 'Prevendita', value: costanti.STATO.PREVENDITA },
|
||||
{ label: 'Non Vendibile', value: costanti.STATO.NON_VENDIBILE },
|
||||
])
|
||||
|
||||
const generatinglist = ref(false)
|
||||
|
||||
const optrigenera = ref<IOptRigenera>({ visibilitaDisp: costanti.DISP.DISPONIBILI, stato: costanti.STATO.IN_COMMERCIO })
|
||||
|
||||
const optcatalogo = ref(<IOptCatalogo>{ ...props.modelValue });
|
||||
|
||||
function updateCatalogoPadre() {
|
||||
@@ -84,6 +104,12 @@ export default defineComponent({
|
||||
optcatalogo.value = { ...newVal };
|
||||
}, { deep: false });
|
||||
|
||||
watch(optrigenera.value, (newVal) => {
|
||||
tools.setCookie(showListaArgomenti.value ? 'INC_ES' : 'VIS_DISP', newVal.visibilitaDisp);
|
||||
if (showListaArgomenti.value)
|
||||
calcArrProducts()
|
||||
}, { deep: true });
|
||||
|
||||
/*watch(optcatalogo, (newValue) => {
|
||||
emit('update:modelValue', newValue);
|
||||
}, { deep: true });*/
|
||||
@@ -99,7 +125,6 @@ export default defineComponent({
|
||||
const cat = ref('')
|
||||
const idGasSel = ref('')
|
||||
const loadpage = ref(false)
|
||||
const refreshpage = ref(false)
|
||||
const show_hide = ref(false)
|
||||
|
||||
const mycolumns = ref([])
|
||||
@@ -215,12 +240,13 @@ export default defineComponent({
|
||||
|
||||
watch(() => cat.value, (newval, oldval) => {
|
||||
|
||||
if (loadpage.value)
|
||||
tools.setCookie(tools.COOK_CATEGORIA, cat.value.toString())
|
||||
filter.value.author = '' // disattivo il filtro autore
|
||||
resetSearch()
|
||||
if (loadpage.value) {
|
||||
tools.setCookie(getKeyCatAtLoad(), cat.value.toString())
|
||||
filter.value.author = '' // disattivo il filtro autore
|
||||
resetSearch()
|
||||
|
||||
calcArrProducts()
|
||||
calcArrProducts()
|
||||
}
|
||||
})
|
||||
|
||||
watch(() => idGasSel.value, (newval, oldval) => {
|
||||
@@ -239,7 +265,7 @@ export default defineComponent({
|
||||
if (filter.value.author) {
|
||||
cat.value = '' // disattivo il filtro categoria
|
||||
if (loadpage.value)
|
||||
tools.setCookie(tools.COOK_CATEGORIA, '')
|
||||
tools.setCookie(getKeyCatAtLoad(), '')
|
||||
resetSearch()
|
||||
}
|
||||
|
||||
@@ -270,7 +296,7 @@ export default defineComponent({
|
||||
if (cosa.value !== shared_consts.PROD.TUTTI) {
|
||||
cat.value = ''
|
||||
if (loadpage.value)
|
||||
tools.setCookie(tools.COOK_CATEGORIA, '')
|
||||
tools.setCookie(getKeyCatAtLoad(), '')
|
||||
}
|
||||
calcArrProducts()
|
||||
}
|
||||
@@ -447,6 +473,7 @@ export default defineComponent({
|
||||
filtroAuthor: string,
|
||||
filtroProductTypes: number[],
|
||||
filtroExcludeProductTypes: number[],
|
||||
filtroidTipologie: number[],
|
||||
editore: string[],
|
||||
idCollane: ICollana[],
|
||||
arrargomstr: any[],
|
||||
@@ -463,6 +490,7 @@ export default defineComponent({
|
||||
const boolfiltroVuotoProductTypes =
|
||||
filtroProductTypes.length === 0 || (filtroProductTypes.length === 1 && filtroProductTypes[0] === 0);
|
||||
const boolfiltroVuotoExcludeProductTypes = filtroExcludeProductTypes.length === 0;
|
||||
const boolfiltroVuotoidTipologie = filtroidTipologie.length === 0;
|
||||
const boolfiltroVuotoEditore = editore.length === 0;
|
||||
const boolfiltroVuotoCollane = idCollane.length === 0;
|
||||
// const boolfiltroVuotoArgomenti = arrargomstr.length === 0;
|
||||
@@ -475,8 +503,23 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
// il prodotto dev'essere disponibile
|
||||
if (!productStore.isPubblicato(product))
|
||||
return false
|
||||
//if (!productStore.isPubblicato(product.productInfo))
|
||||
// return false
|
||||
|
||||
if (!(optrigenera.value.visibilitaDisp === costanti.DISP.TUTTI ||
|
||||
(optrigenera.value.visibilitaDisp === costanti.DISP.ESAURITI && productStore.isEsaurito(product)) ||
|
||||
(optrigenera.value.visibilitaDisp === costanti.DISP.DISPONIBILI && productStore.isDisponibile(product)))) {
|
||||
return false;
|
||||
}
|
||||
if (!(optrigenera.value.stato === costanti.STATO.TUTTI ||
|
||||
(optrigenera.value.stato === costanti.STATO.IN_COMMERCIO && productStore.isPubblicato(product.productInfo)) ||
|
||||
(optrigenera.value.stato === costanti.STATO.SOLO_PROSSIMA_USCITA && productStore.isProssimaUscita(product.productInfo)) ||
|
||||
(optrigenera.value.stato === costanti.STATO.PREVENDITA && productStore.isPrevendita(product.productInfo)) ||
|
||||
(optrigenera.value.stato === costanti.STATO.NON_VENDIBILE && productStore.isNonVendibile(product.productInfo))
|
||||
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const lowerName = (product.productInfo.name || '').toLowerCase();
|
||||
const lowerCode = (product.productInfo.code || '').toLowerCase();
|
||||
@@ -504,6 +547,10 @@ export default defineComponent({
|
||||
? false
|
||||
: (product.productInfo.productTypes || []).every((item: any) => filtroExcludeProductTypes.includes(item));
|
||||
|
||||
const hasidTipologie = boolfiltroVuotoidTipologie
|
||||
? true
|
||||
: filtroidTipologie.includes(product.arrvariazioni?.[0].idTipologia);
|
||||
|
||||
// Filtri per editore
|
||||
const hasPublished = boolfiltroVuotoEditore
|
||||
? true
|
||||
@@ -530,15 +577,15 @@ export default defineComponent({
|
||||
searchMatch &&
|
||||
hasAuthor &&
|
||||
productgassel &&
|
||||
hasProductTypes &&
|
||||
hasidTipologie &&
|
||||
// hasProductTypes &&
|
||||
(
|
||||
hasPublished &&
|
||||
hasCollana &&
|
||||
hasCategoria &&
|
||||
hasArgomentiCat
|
||||
)
|
||||
&&
|
||||
!hasExcludeProductTypes
|
||||
// && !hasExcludeProductTypes
|
||||
);
|
||||
})
|
||||
.sort((a, b) => getProductsSorted([a, b], sortField, sortDir)[0] === a ? -1 : 1);
|
||||
@@ -552,14 +599,20 @@ export default defineComponent({
|
||||
return arrris
|
||||
}
|
||||
|
||||
function calcArrProducts(generalista?: boolean) {
|
||||
async function calcArrProducts(generalista?: boolean) {
|
||||
console.log('calcArrProducts (generalista=' + generalista + ')')
|
||||
|
||||
if (!loadpage.value)
|
||||
return
|
||||
|
||||
generatinglist.value = true
|
||||
|
||||
const searchtext = getSearchText();
|
||||
let arrprod = [];
|
||||
const filtroAuthor = filter.value.author || '';
|
||||
const filtroProductTypes = optcatalogo.value.productTypes || [0];
|
||||
const filtroExcludeProductTypes = optcatalogo.value.excludeproductTypes || [0];
|
||||
const filtroidTipologie = optcatalogo.value.idTipologie || [];
|
||||
const editore = getEditoreDaFiltrare(optcatalogo.value.editore);
|
||||
const filtroPublishers = editore || [];
|
||||
const idCollane = getIdCollaneDaFiltrare(optcatalogo.value.idCollane);
|
||||
@@ -574,6 +627,9 @@ export default defineComponent({
|
||||
// Se nel catalogo è stato già generato, allora gli passo quello.
|
||||
const trovatocatalogo = getCatalogoByMyPage.value
|
||||
|
||||
if (editore)
|
||||
console.log('FILTRO editore', editore)
|
||||
|
||||
if (optcatalogo.value.showListaArgomenti) {
|
||||
generalista = true
|
||||
}
|
||||
@@ -592,6 +648,7 @@ export default defineComponent({
|
||||
filtroAuthor,
|
||||
filtroProductTypes,
|
||||
filtroExcludeProductTypes,
|
||||
filtroidTipologie,
|
||||
filtroPublishers,
|
||||
filtroCollane,
|
||||
arrargomstr,
|
||||
@@ -599,7 +656,7 @@ export default defineComponent({
|
||||
gasselstr,
|
||||
cosa.value,
|
||||
filter.value.sort_field,
|
||||
filter.value.sort_dir
|
||||
filter.value.sort_dir,
|
||||
);
|
||||
|
||||
salva = true
|
||||
@@ -613,7 +670,10 @@ export default defineComponent({
|
||||
generatearrProdToViewSorted(!generalista, salva, !optcatalogo.value.showListaArgomenti);
|
||||
loaddata();
|
||||
|
||||
refreshpage.value = false;
|
||||
console.log('***** FINE calcArrPROD')
|
||||
|
||||
generatinglist.value = false
|
||||
rigeneraLibri.value = false
|
||||
}
|
||||
|
||||
function generaListaLibri() {
|
||||
@@ -630,11 +690,38 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
function arraysEqual(arr1, arr2) {
|
||||
return (
|
||||
Array.isArray(arr1) &&
|
||||
Array.isArray(arr2) &&
|
||||
arr1.length === arr2.length &&
|
||||
arr1.every((val, index) => val === arr2[index])
|
||||
);
|
||||
}
|
||||
|
||||
function checkIfFiltriDiversi(scheda: IMyScheda, schedaprec: IMyScheda) {
|
||||
if (schedaprec === null)
|
||||
return true
|
||||
|
||||
const isDifferent =
|
||||
!arraysEqual(scheda.productTypes, schedaprec?.productTypes) ||
|
||||
!arraysEqual(scheda.excludeproductTypes, schedaprec?.excludeproductTypes) ||
|
||||
!arraysEqual(scheda.idTipologie, schedaprec?.idTipologie) ||
|
||||
!arraysEqual(scheda.editore, schedaprec?.editore) ||
|
||||
!arraysEqual(scheda.idCollane, schedaprec?.idCollane)
|
||||
;
|
||||
|
||||
return isDifferent;
|
||||
|
||||
}
|
||||
|
||||
function getProductsFilteredByScheda(scheda: IMyScheda): IProduct[] {
|
||||
let arrprod = productStore.getProducts(cosa.value) || [];
|
||||
let arrprod = [];
|
||||
|
||||
const filtroAuthor = filter.value.author || '';
|
||||
const filtroProductTypes = scheda.productTypes || [0];
|
||||
const filtroExcludeProductTypes = scheda.excludeproductTypes || [0];
|
||||
const filtroidTipologie = scheda.idTipologie || [];
|
||||
const editore = getEditoreDaFiltrare(scheda.editore);
|
||||
const filtroPublishers = editore || [];
|
||||
const idCollane = getIdCollaneDaFiltrare(scheda.idCollane);
|
||||
@@ -649,6 +736,7 @@ export default defineComponent({
|
||||
if (trovatocatalogo?.lista_prodotti.length > 0) {
|
||||
arrprod = trovatocatalogo?.lista_prodotti
|
||||
} else {
|
||||
arrprod = productStore.getProducts(cosa.value)
|
||||
|
||||
arrprod = filterProducts(
|
||||
arrprod,
|
||||
@@ -656,6 +744,7 @@ export default defineComponent({
|
||||
filtroAuthor,
|
||||
filtroProductTypes,
|
||||
filtroExcludeProductTypes,
|
||||
filtroidTipologie,
|
||||
filtroPublishers,
|
||||
filtroCollane,
|
||||
arrargomstr,
|
||||
@@ -785,6 +874,8 @@ export default defineComponent({
|
||||
|
||||
let arrprod = []
|
||||
|
||||
let schedaprec = null;
|
||||
|
||||
for (const recscheda of optcatalogo.value.arrSchede!) {
|
||||
if (recscheda && recscheda.scheda) {
|
||||
const schedePerRiga = recscheda.scheda.numschede_perRiga || 1
|
||||
@@ -798,8 +889,11 @@ export default defineComponent({
|
||||
} else {
|
||||
if (recscheda.scheda.productTypes!.length > 0) {
|
||||
// Filtra i prodotti in base ai filtri impostati !
|
||||
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
|
||||
indprod = 0
|
||||
if (checkIfFiltriDiversi(recscheda.scheda, schedaprec) || indprod === 0) {
|
||||
arrProdFiltrati = getProductsFilteredByScheda(recscheda.scheda)
|
||||
schedaprec = { ...recscheda.scheda }
|
||||
indprod = 0
|
||||
}
|
||||
} else {
|
||||
let sort_field = recscheda.scheda.sort_field! || optcatalogo.value.sort_field
|
||||
let sort_dir = recscheda.scheda.sort_dir || optcatalogo.value.sort_dir
|
||||
@@ -852,9 +946,9 @@ export default defineComponent({
|
||||
if (indtotale > optcatalogo.value.maxnumlibri!)
|
||||
return
|
||||
|
||||
//} else {
|
||||
// if (indtotale > 5000)
|
||||
// return
|
||||
//} else {
|
||||
// if (indtotale > 5000)
|
||||
// return
|
||||
}
|
||||
|
||||
}
|
||||
@@ -934,11 +1028,19 @@ export default defineComponent({
|
||||
});
|
||||
}*/
|
||||
|
||||
function getKeyCatAtLoad() {
|
||||
return tools.COOK_CATEGORIA + (showListaArgomenti.value ? '_LA' : '')
|
||||
}
|
||||
|
||||
async function mounted() {
|
||||
// console.log('mounted Catalogo')
|
||||
|
||||
cat.value = tools.getCookie(getKeyCatAtLoad(), '')
|
||||
|
||||
tabcatalogo.value = tools.getCookie('TAB_CAT', 'visu')
|
||||
|
||||
optrigenera.value.visibilitaDisp = tools.getCookie(showListaArgomenti.value ? 'INC_ES' : 'VIS_DISP', 'tutti')
|
||||
|
||||
loadpage.value = false
|
||||
await productStore.loadProducts()
|
||||
|
||||
@@ -965,7 +1067,7 @@ export default defineComponent({
|
||||
//++Todo: Per ora visualizzo solo il "Negozio" e non i GAS...
|
||||
cosa.value = shared_consts.PROD.BOTTEGA
|
||||
|
||||
cat.value = tools.getCookie(tools.COOK_CATEGORIA, '')
|
||||
|
||||
|
||||
//cosa.value = tools.getCookie(tools.COOK_COSA_PRODOTTI, shared_consts.PROD.GAS, true)
|
||||
//if (cosa.value === shared_consts.PROD.TUTTI)
|
||||
@@ -977,7 +1079,6 @@ export default defineComponent({
|
||||
|
||||
calcArrProducts()
|
||||
|
||||
loaddata()
|
||||
}
|
||||
|
||||
function loaddata() {
|
||||
@@ -990,17 +1091,18 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
function getCatProds() {
|
||||
const arrcat = productStore.getCatProds(cosa.value)
|
||||
const riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
|
||||
for (const rec of arrcat) {
|
||||
const label = rec.name + ' (' + productStore.getTotaliProdottiByIdCatProd(rec._id) + ')'
|
||||
riscat.push({ label, value: rec._id, icon: rec.icon, color: rec.color })
|
||||
}
|
||||
|
||||
return riscat
|
||||
return [{ label: 'Tutti', value: '', icon: undefined, color: undefined }].concat(
|
||||
productStore.getCatProds(cosa.value).map(rec => ({
|
||||
label: `${rec.name} (${productStore.getTotaliProdottiByIdCatProd(rec._id)})`,
|
||||
value: rec._id,
|
||||
icon: rec.icon,
|
||||
color: rec.color,
|
||||
})),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function onLoadScroll(index: number, done: any) {
|
||||
if (index >= 1) {
|
||||
if (numRecLoaded.value < arrProducts.value.length) {
|
||||
@@ -1299,7 +1401,6 @@ export default defineComponent({
|
||||
productStore,
|
||||
t,
|
||||
loadpage,
|
||||
refreshpage,
|
||||
componentToFixRef,
|
||||
isFixed,
|
||||
arrProducts,
|
||||
@@ -1345,6 +1446,11 @@ export default defineComponent({
|
||||
addProductToList,
|
||||
addnewProd,
|
||||
showListaArgomenti,
|
||||
rigeneraLibri,
|
||||
optrigenera,
|
||||
generatinglist,
|
||||
optDisp,
|
||||
optStato,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
dense
|
||||
class="bg-green text-white"
|
||||
>
|
||||
<q-tab
|
||||
<q-tab
|
||||
v-if="lista_prodotti"
|
||||
name="lista"
|
||||
icon="fas fa-list"
|
||||
@@ -46,7 +46,7 @@
|
||||
>
|
||||
</q-tab>
|
||||
<q-tab
|
||||
v-if="tools.isAdmin()"
|
||||
v-if="tools.isAdmin()"
|
||||
name="opzioni"
|
||||
icon="fas fa-save"
|
||||
label="Avanzati"
|
||||
@@ -80,7 +80,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center q-py-sm prod_trov">
|
||||
|
||||
<q-inner-loading
|
||||
id="spinner"
|
||||
:showing="generatinglist"
|
||||
>
|
||||
<q-spinner-tail
|
||||
color="primary"
|
||||
size="4em"
|
||||
>
|
||||
</q-spinner-tail>
|
||||
</q-inner-loading>
|
||||
|
||||
<div
|
||||
v-if="!generatinglist"
|
||||
class="text-center q-py-sm prod_trov"
|
||||
>
|
||||
<span v-show="productStore.getNumProdTot() !== arrProducts.length">{{
|
||||
t('ecomm.prodotti_trovati', {
|
||||
qta: arrProducts.length,
|
||||
@@ -93,9 +108,9 @@
|
||||
<q-btn
|
||||
v-if="!showListaArgomenti"
|
||||
rounded
|
||||
label="Rigenera Ordinamento Libri"
|
||||
label="Rigenera Lista"
|
||||
color="primary"
|
||||
@click="generaListaLibri()"
|
||||
@click="rigeneraLibri = true"
|
||||
></q-btn>
|
||||
|
||||
<q-btn
|
||||
@@ -107,10 +122,33 @@
|
||||
@click="clickaddNewBook()"
|
||||
></q-btn>
|
||||
|
||||
<div class="text-subtitle2 text-center">Includi nei filtri:</div>
|
||||
<div
|
||||
class="q-ma-sm column q-pa-sm"
|
||||
style="border: 1px solid #ccc"
|
||||
v-if="showListaArgomenti"
|
||||
>
|
||||
<q-btn-toggle
|
||||
v-model="optrigenera.visibilitaDisp"
|
||||
toggle-color="green"
|
||||
class="q-my-md"
|
||||
:options="optDisp"
|
||||
>
|
||||
</q-btn-toggle>
|
||||
<q-btn-toggle
|
||||
v-model="optrigenera.stato"
|
||||
toggle-color="purple"
|
||||
class="q-my-md"
|
||||
:options="optStato"
|
||||
>
|
||||
</q-btn-toggle>
|
||||
</div>
|
||||
|
||||
<CProductTable
|
||||
:lista_prodotti="lista_prodotti"
|
||||
@update:lista_prodotti="updateProducts"
|
||||
:optcatalogo="optcatalogo"
|
||||
@rigenera="generaListaLibri()"
|
||||
/>
|
||||
</q-tab-panel>
|
||||
|
||||
@@ -674,6 +712,27 @@
|
||||
|
||||
<!--<div ref="pdfContent" class="pdf-content">-->
|
||||
</q-page>
|
||||
<CMyDialog
|
||||
v-model="rigeneraLibri"
|
||||
title="Rigenera Lista"
|
||||
class="q-ma-md"
|
||||
>
|
||||
<div class="q-ma-md column">
|
||||
<q-btn-toggle
|
||||
v-model="optrigenera.visibilitaDisp"
|
||||
toggle-color="green"
|
||||
class="q-my-md"
|
||||
:options="optDisp"
|
||||
>
|
||||
</q-btn-toggle>
|
||||
<q-btn
|
||||
rounded
|
||||
label="Rigenera"
|
||||
color="primary"
|
||||
@click="generaListaLibri()"
|
||||
></q-btn>
|
||||
</div>
|
||||
</CMyDialog>
|
||||
|
||||
<CMyDialog
|
||||
v-model="addnewProd"
|
||||
|
||||
Reference in New Issue
Block a user