- Catalogo: Aggiunta di Schede
This commit is contained in:
@@ -46,13 +46,19 @@
|
||||
|
||||
<q-card-section>
|
||||
<div
|
||||
:class="{
|
||||
'flex q-pa-sm': !optcatalogo.pdf,
|
||||
'shadow-2': options.in_3d,
|
||||
'items-center': true, // Centrare verticalmente
|
||||
|
||||
:class="[
|
||||
'flex q-pa-xs', // Classi comuni
|
||||
{ 'shadow-2': options.in_3d }, // Classe condizionale
|
||||
optcatalogo.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? 'flex-col'
|
||||
: 'flex-row', // Layout flessibile
|
||||
]"
|
||||
:style="{
|
||||
justifyContent: 'center',
|
||||
alignItems: 'flex-start',
|
||||
gap: '0.5rem',
|
||||
width: '100%',
|
||||
}"
|
||||
:style="'justify-items: center; '"
|
||||
>
|
||||
<q-img
|
||||
v-if="myproduct.productInfo"
|
||||
@@ -70,14 +76,17 @@
|
||||
'cursor-pointer': !complete,
|
||||
'shadow-4': true,
|
||||
'image-wrapper': optcatalogo.pdf,
|
||||
'items-center': true,
|
||||
}"
|
||||
:style="
|
||||
'place-items: center; ' +
|
||||
(optcatalogo.width
|
||||
? ' width: ' + optcatalogo.width + ' !important; '
|
||||
: '')
|
||||
"
|
||||
:style="{
|
||||
width:
|
||||
optcatalogo.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? '50%'
|
||||
: '45%',
|
||||
...(optcatalogo.width && {
|
||||
width: optcatalogo.width + ' !important',
|
||||
}),
|
||||
display: 'block',
|
||||
}"
|
||||
@click="click_opendetail()"
|
||||
>
|
||||
<div
|
||||
@@ -96,288 +105,24 @@
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
<div class="scheda-book">
|
||||
<q-card-title>
|
||||
<span class="book-title" :data-col="options.quante_col">
|
||||
<span
|
||||
v-if="!complete"
|
||||
class="cursor-pointer"
|
||||
@click="click_opendetail()"
|
||||
>{{ myproduct.productInfo.name }}
|
||||
</span>
|
||||
<span v-else>{{ myproduct.productInfo.name }} </span>
|
||||
</span>
|
||||
</q-card-title>
|
||||
<q-card-subtitle
|
||||
v-if="myproduct.productInfo.authors"
|
||||
class="book-author"
|
||||
:data-col="options.quante_col"
|
||||
>
|
||||
di
|
||||
<span
|
||||
v-for="(author, index) in myproduct.productInfo.authors"
|
||||
:key="author._id"
|
||||
>
|
||||
<span v-if="index > 0">, </span>
|
||||
<span
|
||||
class="author cursor-pointer text-primary"
|
||||
@click="
|
||||
click_author(author._id, author.name + ' ' + author.surname)
|
||||
"
|
||||
>{{ author.name }} {{ author.surname }}</span
|
||||
>
|
||||
</span>
|
||||
</q-card-subtitle>
|
||||
<q-card-subtitle
|
||||
v-if="myproduct.productInfo.catprods && options.show_cat"
|
||||
class="book-category"
|
||||
>
|
||||
<div
|
||||
v-for="catprod in myproduct.productInfo.catprods"
|
||||
:key="catprod._id"
|
||||
>
|
||||
<q-chip
|
||||
dense
|
||||
color="primary"
|
||||
text-color="white"
|
||||
icon="category"
|
||||
>
|
||||
{{ catprod.name }}
|
||||
</q-chip>
|
||||
</div>
|
||||
</q-card-subtitle>
|
||||
<q-card-main
|
||||
v-if="
|
||||
options.show_short_descr && myproduct.productInfo.short_descr
|
||||
"
|
||||
class="book-short-descr"
|
||||
>{{
|
||||
tools.firstchars(myproduct.productInfo.short_descr, 200, true)
|
||||
}}</q-card-main
|
||||
>
|
||||
|
||||
<!-- Testo associato all'immagine -->
|
||||
<div
|
||||
:style="{
|
||||
width:
|
||||
optcatalogo.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? '100%'
|
||||
: '50%',
|
||||
textAlign: 'center',
|
||||
marginTop:
|
||||
optcatalogo.posiz_text === costanti.POSIZ_TESTO.IN_BASSO
|
||||
? '1rem'
|
||||
: '0',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
v-if="myproduct.productInfo.numpages && complete"
|
||||
class="book-pages"
|
||||
>
|
||||
Pagine: {{ myproduct.productInfo.numpages }}
|
||||
</div>
|
||||
<div v-if="myproduct.productInfo.publisher" class="book-pages">
|
||||
{{ myproduct.productInfo.publisher.name }}
|
||||
</div>
|
||||
<div
|
||||
v-if="myproduct.productInfo.date_publishing && complete"
|
||||
class="book-data-pub"
|
||||
>
|
||||
Data Pubblicazione:
|
||||
{{ tools.getstrDate(myproduct.productInfo.date_publishing) }}
|
||||
</div>
|
||||
|
||||
<q-separator class="q-my-sm"></q-separator>
|
||||
|
||||
<div v-if="options.show_price">
|
||||
<div
|
||||
:class="{
|
||||
'row items-center q-pa-nome block-variazione': true,
|
||||
'block-variazione-selected': indvariazSel == index,
|
||||
}"
|
||||
v-for="(variazione, index) of myproduct.arrvariazioni"
|
||||
:key="index"
|
||||
@click="setvariazioneSelected(index)"
|
||||
>
|
||||
<div
|
||||
v-if="checkIfVariazioneDaVisu(variazione)"
|
||||
class="flex justify-between items-center q-mx-sm"
|
||||
>
|
||||
<q-badge
|
||||
class="q-badge--large"
|
||||
:color="
|
||||
tools.getRecByVersioneProd(variazione.versione).color
|
||||
"
|
||||
>
|
||||
<q-icon
|
||||
v-if="variazione.versione > 0"
|
||||
:name="tools.getIconByVersione(variazione.versione)"
|
||||
color="white"
|
||||
></q-icon
|
||||
>
|
||||
{{ tools.getRecByVersioneProd(variazione.versione).label }}
|
||||
</q-badge>
|
||||
<div v-if="variazione.formato && false">
|
||||
formato: {{ variazione.formato }}
|
||||
</div>
|
||||
<div v-if="variazione.tipologia && false">
|
||||
tipologia: {{ variazione.tipologia }}
|
||||
</div>
|
||||
<div v-if="variazione.status && false">
|
||||
status: {{ variazione.status }}
|
||||
</div>
|
||||
<div v-if="variazione.preOrderDate">
|
||||
preOrderDate: {{ variazione.preOrderDate }}
|
||||
</div>
|
||||
</div>
|
||||
<q-item-section>
|
||||
<q-item-label>
|
||||
<CPrice
|
||||
:sale_price="variazione.sale_price"
|
||||
:price="variazione.price"
|
||||
></CPrice>
|
||||
<span v-if="!!myproduct.after_price">{{
|
||||
myproduct.after_price
|
||||
}}</span>
|
||||
</q-item-label>
|
||||
<q-item-label
|
||||
v-if="
|
||||
myproduct.scontisticas &&
|
||||
myproduct.scontisticas.length > 0
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="prod_sconti"
|
||||
v-for="(sconti, index) of myproduct.scontisticas"
|
||||
:key="index"
|
||||
>
|
||||
{{ sconti.description }}
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side v-if="!!variazione.quantita">
|
||||
<q-icon
|
||||
v-if="variazione.quantita > 10"
|
||||
:color="tools.colordisponib(variazione.quantita)"
|
||||
name="fas fa-check"
|
||||
/>
|
||||
<q-icon
|
||||
v-else-if="
|
||||
variazione.quantita > 3 && variazione.quantita <= 10
|
||||
"
|
||||
:color="tools.colordisponib(variazione.quantita)"
|
||||
name="fas fa-exclamation"
|
||||
/>
|
||||
<q-icon
|
||||
v-else-if="
|
||||
variazione.quantita > 0 && variazione.quantita <= 3
|
||||
"
|
||||
:color="tools.colordisponib(variazione.quantita)"
|
||||
name="fas fa-exclamation"
|
||||
/>
|
||||
<q-icon
|
||||
v-else-if="variazione.quantita === 0"
|
||||
:color="tools.colordisponib(variazione.quantita)"
|
||||
name="fas fa-times"
|
||||
/>
|
||||
</q-item-section>
|
||||
</div>
|
||||
<div
|
||||
v-for="(variazione, index) of myproduct.arrvariazioni"
|
||||
:key="index"
|
||||
>
|
||||
<div
|
||||
v-show="
|
||||
indvariazSel == index && checkIfVariazioneDaVisu(variazione)
|
||||
"
|
||||
>
|
||||
<div
|
||||
v-show="tools.disponibStr(variazione.quantita)"
|
||||
class="row justify-center q-mt-sm vertical-middle"
|
||||
style="align-items: center"
|
||||
>
|
||||
<span class="q-mr-sm"
|
||||
>{{ $t('ecomm.disponibilita') }}: </span
|
||||
>
|
||||
<q-chip
|
||||
size="md"
|
||||
dense
|
||||
text-color="white"
|
||||
:color="tools.colordisponib(variazione.quantita)"
|
||||
>{{ tools.disponibStr(variazione.quantita) }}</q-chip
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
class="row justify-center vertical-middle"
|
||||
style="align-items: center"
|
||||
>
|
||||
<span class="q-mr-sm">{{ $t('products.price') }}:</span>
|
||||
<CPrice
|
||||
:sale_price="variazione.sale_price"
|
||||
:price="variazione.price"
|
||||
bold="true"
|
||||
></CPrice>
|
||||
<span v-show="!!myproduct.after_price">{{
|
||||
myproduct.after_price
|
||||
}}</span>
|
||||
</div>
|
||||
<div
|
||||
v-show="!!variazione.formato"
|
||||
class="row justify-center q-ma-sm vertical-middle"
|
||||
style="align-items: center"
|
||||
>
|
||||
<span class="q-mr-sm">{{ $t('products.formato') }}:</span>
|
||||
<q-badge
|
||||
v-show="variazione.versione > 0"
|
||||
:color="
|
||||
tools.getRecByVersioneProd(variazione.versione).color
|
||||
"
|
||||
>{{ variazione.formato }}</q-badge
|
||||
>
|
||||
</div>
|
||||
<div
|
||||
v-show="!!variazione.edizione"
|
||||
class="row justify-center q-ma-sm vertical-middle"
|
||||
style="align-items: center"
|
||||
>
|
||||
<span class="q-mr-sm">{{ $t('products.edizione') }}:</span>
|
||||
{{ variazione.edizione }}
|
||||
</div>
|
||||
<div
|
||||
v-show="!!myproduct.isbn"
|
||||
class="row justify-center q-ma-sm vertical-middle"
|
||||
style="align-items: center"
|
||||
>
|
||||
<span class="q-mr-sm">{{ $t('products.isbn') }}:</span>
|
||||
{{ myproduct.isbn }}
|
||||
</div>
|
||||
<div
|
||||
v-show="!!myproduct.productInfo.publisher"
|
||||
class="row justify-center q-ma-sm vertical-middle"
|
||||
style="align-items: center"
|
||||
>
|
||||
<span class="q-mr-sm">{{ $t('products.editore') }}:</span>
|
||||
<q-badge
|
||||
:color="
|
||||
tools.getRecByVersioneProd(variazione.versione).color
|
||||
"
|
||||
>{{ myproduct.productInfo.publisher.name }}</q-badge
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="row justify-center q-mt-sm">
|
||||
<q-btn
|
||||
v-if="variazione.addtocart_link && true"
|
||||
:href="variazione.addtocart_link"
|
||||
target="_blank"
|
||||
color="primary"
|
||||
icon="fas fa-cart-plus"
|
||||
class="q-mr-sm"
|
||||
no-caps
|
||||
:label="$t('products.addtocart_ext')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
v-if="myproduct.productInfo.checkout_link && true"
|
||||
:href="myproduct.productInfo.checkout_link"
|
||||
target="_blank"
|
||||
class="q-ml-sm"
|
||||
color="white"
|
||||
icon="fas fa-shopping-cart"
|
||||
outline
|
||||
text-color="black"
|
||||
no-caps
|
||||
:label="$t('ecomm.carrello')"
|
||||
></q-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
:style="`line-height: ${optcatalogo.line_height}%; `"
|
||||
v-html="products.replaceKeyWordsByProduct(myproduct, optcatalogo.text)"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
@@ -411,11 +156,13 @@
|
||||
class="listaev__table"
|
||||
>
|
||||
<thead>
|
||||
<th>Data</th>
|
||||
<th>Persona</th>
|
||||
<th>Stato</th>
|
||||
<th>Quantita</th>
|
||||
<th>Note</th>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Persona</th>
|
||||
<th>Stato</th>
|
||||
<th>Quantita</th>
|
||||
<th>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user