aggiornamenti vari...

This commit is contained in:
Surya Paolo
2025-03-21 19:51:55 +01:00
parent a09a49ac37
commit 4c82015f27
121 changed files with 1343 additions and 5032 deletions

View File

@@ -1,13 +1,15 @@
<template>
<div v-if="optcatalogo" :class="{
' items-start q-gutter-sm': true,
}" :style="scheda.height
? ' height: ' +
tools.adjustSize(optcatalogo, scheda.height) +
'px !important; '
: ''
">
}" :style="scheda.dimensioni?.pagina?.dimensioni?.size?.height
? ' height: ' +
tools.adjustSize(optcatalogo, scheda.dimensioni?.pagina?.dimensioni?.size?.height) +
'px !important; '
: ''
">
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
<div v-if="!!myproduct && !!myproduct.productInfo" :class="{
'my-card-big book-details': complete,
@@ -31,99 +33,99 @@
? ''
: 'flex flex-row', // Layout flessibile
]" :style="{
gap:
tools.adjustSize(
optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size.gap
) ?? '0.1rem',
width:
tools.adjustSize(
optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size.width
) ?? '100%',
height: tools.adjustSize(
gap:
tools.adjustSize(
optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size.height
),
}">
scheda.dimensioni?.scheda_prodotto?.size?.gap
) ?? '0.1rem',
width:
tools.adjustSize(
optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size?.width
) ?? '100%',
height: tools.adjustSize(
optcatalogo,
scheda.dimensioni?.scheda_prodotto?.size?.height
),
}">
<div>
<a :href="myproduct.productInfo.link_macro" target="_blank">
<q-img v-if="myproduct.productInfo" :src="myproduct.productInfo.imagefile
? tools.getFullFileNameByImageFile(
'productInfos',
myproduct.productInfo.imagefile
)
: myproduct.productInfo.image_link
? tools.getFullFileNameByImageFile(
'productInfos',
myproduct.productInfo.imagefile
)
: myproduct.productInfo.image_link
" :alt="myproduct.productInfo.name" :fit="scheda.dimensioni?.immagine_prodotto?.size?.fit ?? 'cover'
" :class="{
'book-image-fixed': complete,
'cursor-pointer': !complete,
'shadow-4': !optcatalogo.pdf,
'border-box': optcatalogo.pdf,
}" :style="{
zIndex: 2,
width:
scheda.testo_right.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
? scheda.testo_right.font?.perc_text ?? '50%'
: '45%',
...(tools.adjustSize(
optcatalogo,
scheda.dimensioni?.immagine_prodotto?.size?.width
) && {
'book-image-fixed': complete,
'cursor-pointer': !complete,
'shadow-4': !optcatalogo.pdf,
'border-box': optcatalogo.pdf,
}" :style="{
zIndex: 2,
width:
tools.adjustSize(
optcatalogo,
scheda.dimensioni?.immagine_prodotto.size?.width
) + ' !important',
}),
height: scheda.dimensioni?.immagine_prodotto?.size?.height
? tools.adjustSize(
scheda.testo_right.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
? scheda.testo_right.font?.perc_text ?? '50%'
: '45%',
...(tools.adjustSize(
optcatalogo,
scheda.dimensioni?.immagine_prodotto?.size?.height
)
: undefined,
display: 'block',
}" @click="click_opendetail()" />
scheda.dimensioni?.immagine_prodotto?.size?.width
) && {
width:
tools.adjustSize(
optcatalogo,
scheda.dimensioni?.immagine_prodotto.size?.width
) + ' !important',
}),
height: scheda.dimensioni?.immagine_prodotto?.size?.height
? tools.adjustSize(
optcatalogo,
scheda.dimensioni?.immagine_prodotto?.size?.height
)
: undefined,
display: 'block',
}" @click="click_opendetail()" />
</a>
<q-card-actions align="center" class="q-pa-none absolute-top-left">
<div class="row justify-center">
<q-card-actions class="q-pa-none q-ma-none absolute-top-left">
<div class="column">
<q-fab v-if="
(tools.isManager() || tools.isEditor()) &&
!optcatalogo.generazionePDFInCorso &&
editOn
" color="primary" icon="fas fa-pencil-alt" direction="up" flat dense>
(editOn || options.show_edit_book)
" color="primary" icon="fas fa-pencil-alt" direction="down" flat dense>
<q-fab-action v-if="
tools.isManager() &&
!optcatalogo.generazionePDFInCorso &&
editOn
(editOn || options.show_edit_book)
" icon="fas fa-pencil-alt" label="Aggiorna da GM" color="accent" @click="refreshDataFromGM()" />
<q-fab-action v-if="
tools.isManager() &&
!optcatalogo.generazionePDFInCorso &&
editOn
(editOn || options.show_edit_book)
" icon="fas fa-pencil-alt" label="Visualizza su GM" color="positive" @click="
showQtaDisponibile = false;
visufromgm = true;
" />
showQtaDisponibile = false;
visufromgm = true;
" />
<q-fab-action v-if="
tools.isManager() &&
!optcatalogo.generazionePDFInCorso &&
editOn
(editOn || options.show_edit_book)
" icon="fas fa-eye" label="Vedi Numero di Pagine (Da GM)" color="positive"
@click="refreshFieldFromGM('Pagine')" />
<q-fab-action v-if="
tools.isManager() &&
!optcatalogo.generazionePDFInCorso &&
editOn
(editOn || options.show_edit_book)
" icon="fas fa-pencil-alt" label="Visualizza su GM (Tutti i campi)" color="positive" @click="
showQtaDisponibile = true;
visufromgm = true;
" />
showQtaDisponibile = true;
visufromgm = true;
" />
<q-fab-action v-if="
(tools.isManager() || tools.isEditor()) &&
!optcatalogo.generazionePDFInCorso &&
editOn
(editOn || options.show_edit_book)
" label="Modifica" icon="fas fa-pencil-alt" color="primary" @click="modifOn = !modifOn" />
</q-fab>
</div>
@@ -137,35 +139,35 @@
scheda.testo_right_attaccato.font?.posiz_text !==
costanti.POSIZ_TESTO.IN_BASSO
" :style="{
alignSelf:
scheda.testo_right_attaccato.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
? ''
: 'end',
marginTop:
scheda.testo_right_attaccato.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
? 'auto'
: '0',
}">
alignSelf:
scheda.testo_right_attaccato.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
? ''
: 'end',
marginTop:
scheda.testo_right_attaccato.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
? 'auto'
: '0',
}">
<CText :rectext="scheda.testo_right" :myproduct="myproduct" :optcatalogo="optcatalogo"
:show_at_right="scheda.barcode.show_at_right" :scheda="scheda" :idPage="idPage">
:show_at_right="scheda.barcode?.show_at_right" :scheda="scheda" :idPage="idPage">
<div class="row no-wrap items-center">
<div v-if="scheda.barcode && scheda.barcode.show">
<CBarCode :value="myproduct.productInfo.code" :format="scheda.barcode.format"
:fontsizeprop="scheda.barcode.font?.size" :gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
" :width="parseInt(
tools.adjustSize(
optcatalogo,
scheda.barcode.size?.width
tools.adjustSize(
optcatalogo,
scheda.barcode.size?.width
)
)
)
" :widthlines="tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
" :height="tools.adjustSize(
optcatalogo,
scheda.barcode.size?.height
)
" :show_at_right="scheda.barcode.show_at_right">
" :widthlines="tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
" :height="tools.adjustSize(
optcatalogo,
scheda.barcode.size?.height
)
" :show_at_right="scheda.barcode?.show_at_right">
</CBarCode>
</div>
<div v-if="
@@ -190,23 +192,23 @@
scheda.testo_right_attaccato.font?.posiz_text ===
costanti.POSIZ_TESTO.IN_BASSO
" class="flexible-width" :style="{
marginTop: 'auto',
}">
marginTop: 'auto',
}">
<CText :rectext="scheda.testo_right" :myproduct="myproduct" :optcatalogo="optcatalogo" :scheda="scheda"
:show_at_right="scheda.barcode.show_at_right" :idPage="idPage">
:show_at_right="scheda.barcode?.show_at_right" :idPage="idPage">
<div class="row no-wrap items-center">
<div v-if="scheda.barcode && scheda.barcode.show">
<CBarCode :value="myproduct.productInfo.code" :format="scheda.barcode.format"
:fontsizeprop="scheda.barcode.font?.size" :gap="tools.adjustSize(optcatalogo, scheda.barcode.size?.gap)
" :width="parseInt(
tools.adjustSize(
optcatalogo,
scheda.barcode.size?.width
tools.adjustSize(
optcatalogo,
scheda.barcode.size?.width
)
)
)
" :widthlines="tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
" :height="tools.adjustSize(optcatalogo, scheda.barcode.size?.height)
" :show_at_right="scheda.barcode.show_at_right">
" :widthlines="tools.adjustSize(optcatalogo, scheda.barcode.widthlines)
" :height="tools.adjustSize(optcatalogo, scheda.barcode.size?.height)
" :show_at_right="scheda.barcode.show_at_right">
</CBarCode>
</div>
<div v-if="
@@ -362,8 +364,8 @@
<q-dialog v-model="isFullScreen" position="top" :maximized="true" class="q-pt-none">
<div v-if="isFullScreen" class="fullscreen-container" @touchmove.prevent @click="toggleFullScreen">
<q-img :src="myproduct.productInfo.imagefile
? `` + myproduct.productInfo.imagefile
: myproduct.productInfo.image_link
? `` + myproduct.productInfo.imagefile
: myproduct.productInfo.image_link
" :alt="myproduct.productInfo.name" :fit="tools.isMobile() ? 'fill' : 'contain'" class="fullscreen-image"
@touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" ref="fullscreenImage">
</q-img>
@@ -397,8 +399,8 @@
<CMyValueDb :editOn="modifOn" :title="t('catalogo.descrizione_estesa')" table="productinfos"
:id="myproduct.productInfo._id" :rec="myproduct.productInfo" mykey="descrizione_completa_macro"
:maxlength="scheda.testo_bottom.maxlength
? scheda.testo_bottom.maxlength
: 10000
? scheda.testo_bottom.maxlength
: 10000
" debounce="1000" :save="updateproductmodif()" :type="costanti.FieldType.string">
</CMyValueDb>
<div class="row q-ma-xm q-pa-xs">