- Catalogo: Aggiunta di Schede
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
max-width: 200px;
|
||||
min-width: 120px;
|
||||
padding: 1rem 1rem;
|
||||
box-shadow: none;
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
max-width: 150px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
@@ -3,26 +3,28 @@
|
||||
max-width: 200px;
|
||||
min-width: 120px;
|
||||
padding: 1rem 1rem;
|
||||
@media (max-width: 718px) {
|
||||
box-shadow: none;
|
||||
|
||||
// PER VERSIONE MOBILE
|
||||
@media (max-width: 718px) {
|
||||
max-width: 150px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.my-card-small-stat {
|
||||
width: 100%;
|
||||
max-width: 60px;
|
||||
min-width: 40px;
|
||||
box-shadow: none;
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
max-width: 50px;
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
600
src/components/CCatalogoCard/CCatalogoCard copy.off
Executable file
600
src/components/CCatalogoCard/CCatalogoCard copy.off
Executable file
@@ -0,0 +1,600 @@
|
||||
<template>
|
||||
<div
|
||||
:class="{
|
||||
' items-start q-gutter-sm': true,
|
||||
}"
|
||||
:style="
|
||||
optcatalogo.height
|
||||
? ' height: ' + optcatalogo.height + ' !important; '
|
||||
: ''
|
||||
"
|
||||
>
|
||||
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
|
||||
<div
|
||||
v-if="!!myproduct && !!myproduct.productInfo"
|
||||
:class="{
|
||||
'my-card-big book-details': complete,
|
||||
'book-card': !complete && !optcatalogo.pdf,
|
||||
colfix_prodotti_1: options.quante_col == 'c1' && !optcatalogo.pdf,
|
||||
colfix_prodotti_2: options.quante_col == 'c2' && !optcatalogo.pdf,
|
||||
colfix_prodotti_3: options.quante_col == 'c3' && !optcatalogo.pdf,
|
||||
}"
|
||||
>
|
||||
<q-toggle
|
||||
v-if="tools.isManager() && !optcatalogo.pdf"
|
||||
v-model="editOn"
|
||||
class="absolute-top-right"
|
||||
color="green"
|
||||
icon="fas fa-pencil-alt"
|
||||
dense
|
||||
>
|
||||
</q-toggle>
|
||||
<q-page-sticky
|
||||
v-if="complete && !optcatalogo.pdf"
|
||||
position="bottom-right"
|
||||
:offset="[18, 0]"
|
||||
style="z-index: 1000"
|
||||
>
|
||||
<q-btn
|
||||
fab
|
||||
icon="fas fa-arrow-up"
|
||||
class="semi-transparent"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
/>
|
||||
</q-page-sticky>
|
||||
|
||||
<q-card-section>
|
||||
<div
|
||||
:class="{
|
||||
'flex q-pa-sm': !optcatalogo.pdf,
|
||||
'shadow-2': options.in_3d,
|
||||
'items-center': true, // Centrare verticalmente
|
||||
}"
|
||||
:style="'justify-items: center; '"
|
||||
>
|
||||
<q-img
|
||||
v-if="myproduct.productInfo"
|
||||
:src="
|
||||
myproduct.productInfo.imagefile
|
||||
? tools.getFullFileNameByImageFile(
|
||||
'productInfos',
|
||||
myproduct.productInfo.imagefile
|
||||
)
|
||||
: myproduct.productInfo.image_link
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
:class="{
|
||||
'book-image-fixed': complete,
|
||||
'cursor-pointer': !complete,
|
||||
'shadow-4': true,
|
||||
'image-wrapper': optcatalogo.pdf,
|
||||
'items-center': true,
|
||||
}"
|
||||
:style="
|
||||
'place-items: center; ' +
|
||||
(optcatalogo.width
|
||||
? ' width: ' + optcatalogo.width + ' !important; '
|
||||
: '')
|
||||
"
|
||||
@click="click_opendetail()"
|
||||
>
|
||||
<div
|
||||
class="absolute transparent"
|
||||
style="left: 90%; top: -18px; transform: translateX(-50%)"
|
||||
>
|
||||
<q-btn
|
||||
v-if="!optcatalogo.pdf"
|
||||
color="blue-6"
|
||||
class="semi-transparent"
|
||||
round
|
||||
icon="search"
|
||||
@click.stop="toggleFullScreen"
|
||||
size="sm"
|
||||
/>
|
||||
</div>
|
||||
</q-img>
|
||||
|
||||
<div v-if="false" class="scheda-book">
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
<div
|
||||
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>
|
||||
</div>
|
||||
<div
|
||||
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>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
options.show_short_descr && myproduct.productInfo.short_descr
|
||||
"
|
||||
class="book-short-descr"
|
||||
>
|
||||
{{
|
||||
tools.firstchars(myproduct.productInfo.short_descr, 200, true)
|
||||
}}
|
||||
</div>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator v-if="complete" class="q-my-sm"></q-separator>
|
||||
<q-card-section v-if="complete && myproduct.productInfo.description">
|
||||
<div class="title-descr text-blue row">Descrizione:</div>
|
||||
<div class="row items-center">
|
||||
<div class="text-title text-grey-9">
|
||||
<span
|
||||
class="text-grey-7"
|
||||
v-html="myproduct.productInfo.description"
|
||||
></span>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</div>
|
||||
|
||||
<q-dialog v-if="myproduct" v-model="openlistorders">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ t('ecomm.listaord') }} - {{ myproduct.productInfo.name }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="q-pa-xs inset-shadow">
|
||||
<q-markup-table
|
||||
wrap-cells
|
||||
bordered
|
||||
separator="horizontal"
|
||||
class="listaev__table"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Persona</th>
|
||||
<th>Stato</th>
|
||||
<th>Quantita</th>
|
||||
<th>Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="(ordcart, index) of listord"
|
||||
:key="index"
|
||||
class="listaev listaev__table"
|
||||
>
|
||||
<td class="text-center">
|
||||
<div>
|
||||
{{ func_tools.getDateTimeShortStr(ordcart.created_at) }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong>{{
|
||||
tools.getNomeUtenteEUsernameByRecUser(ordcart.user)
|
||||
}}</strong>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong>{{
|
||||
shared_consts.getStatusStr(ordcart.status)
|
||||
}}</strong>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div v-for="(singleord, index) in ordcart.items" :key="index">
|
||||
<span
|
||||
v-if="
|
||||
singleord.order.idProduct === myproduct._id &&
|
||||
singleord.order.quantity > 0
|
||||
"
|
||||
>
|
||||
{{ singleord.order.quantity }}</span
|
||||
>
|
||||
<span
|
||||
v-if="
|
||||
singleord.order.idProduct === myproduct._id &&
|
||||
singleord.order.quantitypreordered > 0
|
||||
"
|
||||
>
|
||||
{{ singleord.order.quantitypreordered }}</span
|
||||
>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ ordcart.note }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-center">
|
||||
Totali:
|
||||
<span class="totali">{{ sumval }}</span>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</q-markup-table>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog
|
||||
v-if="
|
||||
true &&
|
||||
myproduct &&
|
||||
myproduct.productInfo &&
|
||||
myproduct.productInfo.link_scheda
|
||||
"
|
||||
v-model="apriSchedaPDF"
|
||||
maximized
|
||||
>
|
||||
<q-card>
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ myproduct.productInfo.name }}
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
label="CHIUDI"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section>
|
||||
<iframe
|
||||
:src="myproduct.productInfo.link_scheda"
|
||||
frameborder="0"
|
||||
width="100%"
|
||||
height="100%"
|
||||
></iframe>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<q-card-actions align="bottom">
|
||||
<q-btn color="primary" label="Chiudi" @click="apriSchedaPDF = false" />
|
||||
</q-card-actions>
|
||||
</q-dialog>
|
||||
|
||||
<q-dialog
|
||||
v-if="
|
||||
false &&
|
||||
myproduct &&
|
||||
myproduct.productInfo &&
|
||||
myproduct.productInfo.link_scheda
|
||||
"
|
||||
v-model="apriSchedaPDF"
|
||||
fullscreen
|
||||
>
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ myproduct.productInfo.name }}
|
||||
</q-toolbar-title>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
label="CHIUDI"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section>
|
||||
<vue-pdf-app
|
||||
:pdf="myproduct.productInfo.link_scheda"
|
||||
style="height: 100vh"
|
||||
></vue-pdf-app>
|
||||
</q-card-section>
|
||||
</q-dialog>
|
||||
|
||||
<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
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
:fit="tools.isMobile() ? 'fill' : 'contain'"
|
||||
class="fullscreen-image"
|
||||
@touchstart="onTouchStart"
|
||||
@touchmove="onTouchMove"
|
||||
@touchend="onTouchEnd"
|
||||
ref="fullscreenImage"
|
||||
>
|
||||
</q-img>
|
||||
<br />
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<q-btn
|
||||
class="q-ma-md"
|
||||
@click="isFullScreen = false"
|
||||
label="Chiudi"
|
||||
rounded
|
||||
color="primary"
|
||||
icon="close"
|
||||
></q-btn>
|
||||
</div>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCatalogoCard.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCatalogoCard.scss';
|
||||
</style>
|
||||
@@ -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>
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
min-width: 120px;
|
||||
padding: 1rem 1rem;
|
||||
|
||||
box-shadow: none;
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
max-width: 150px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.my-card-small-stat {
|
||||
width: 100%;
|
||||
max-width: 60px;
|
||||
min-width: 40px;
|
||||
box-shadow: none;
|
||||
|
||||
@media (max-width: 718px) {
|
||||
// PER VERSIONE MOBILE
|
||||
@@ -24,7 +24,6 @@
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {
|
||||
defineComponent, onMounted, PropType, computed, ref, toRef, watch,
|
||||
} from 'vue'
|
||||
|
||||
import { IColGridTable, IElemText, IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IOperators } from '@src/model'
|
||||
import { IColGridTable, IElemText, IImgGallery, ILabelValue, IMyCard, IMyElem, IMyPage, IMyScheda, IOperators, ISchedaSingola } from '@src/model'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
|
||||
import { CImgTitle } from '@/components/CImgTitle'
|
||||
@@ -40,7 +40,7 @@ export default defineComponent({
|
||||
CCardCarousel, COpenStreetMap, CMyPage, CMyPageIntro, CMyEditor, CMyFieldRec,
|
||||
CSelectColor, CSelectFontSize, CSelectImage, CImgPoster, CSelectAnimation, CMySlider
|
||||
},
|
||||
emits: ['saveElem', 'selElemClick', 'toggleSize', 'deleteElem'],
|
||||
emits: ['saveElem', 'selElemClick', 'toggleSize', 'deleteElem', 'dupPage'],
|
||||
props: {
|
||||
myelem: {
|
||||
type: Object as PropType<IMyElem>,
|
||||
@@ -51,6 +51,11 @@ export default defineComponent({
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
IdPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
},
|
||||
editOn: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
@@ -72,10 +77,16 @@ export default defineComponent({
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const posizTextOptions = ref([
|
||||
{ label: 'In basso', value: costanti.POSIZ_TESTO.IN_BASSO },
|
||||
{ label: 'A Destra', value: costanti.POSIZ_TESTO.A_DESTRA },
|
||||
])
|
||||
|
||||
const animare = ref(0)
|
||||
const slide = ref(0)
|
||||
const slide2 = ref(0)
|
||||
const tabCard = ref('card0')
|
||||
const tabCard = ref(0)
|
||||
const tabScheda = ref(0)
|
||||
const tabElemsText = ref('elem0')
|
||||
const arrPages = ref([] as any[])
|
||||
const disableSave = ref(true)
|
||||
@@ -161,6 +172,9 @@ export default defineComponent({
|
||||
// emit('updateAll', newrec)
|
||||
}
|
||||
|
||||
async function dupPage() {
|
||||
emit('dupPage', null)
|
||||
}
|
||||
async function dupElem(order?: number) {
|
||||
|
||||
const newrec: IMyElem = { ...props.myelem }
|
||||
@@ -246,6 +260,77 @@ export default defineComponent({
|
||||
|
||||
|
||||
}
|
||||
function addNewScheda() {
|
||||
|
||||
let maxorder = 0
|
||||
myel.value.catalogo!.arrSchede?.forEach(scheda => {
|
||||
if (scheda.order > maxorder) {
|
||||
maxorder = scheda.order
|
||||
}
|
||||
})
|
||||
|
||||
let newscheda: IMyScheda = {
|
||||
_id: objectId(),
|
||||
idapp: tools.appid()!,
|
||||
isTemplate: false,
|
||||
name: 'Scheda Nuova',
|
||||
widthscheda: '360px',
|
||||
line_height: 100,
|
||||
widthpag: 800,
|
||||
width: 150,
|
||||
height: 234,
|
||||
numschede_perRiga: 2,
|
||||
numschede_perCol: 2,
|
||||
margine_top: 12,
|
||||
margine_pagina: '92px',
|
||||
margine_riga: '41px',
|
||||
text: '',
|
||||
posiz_text: costanti.POSIZ_TESTO.A_DESTRA,
|
||||
|
||||
productTypes: [],
|
||||
excludeproductTypes: [],
|
||||
editore: [],
|
||||
author: '',
|
||||
sort: costanti.SORT_PUBDATE,
|
||||
arrProdottiSpeciali: [],
|
||||
}
|
||||
|
||||
if (!myel.value.catalogo!.arrSchede)
|
||||
myel.value.catalogo!.arrSchede = []
|
||||
|
||||
myel.value.catalogo!.arrSchede.push(
|
||||
{
|
||||
_id: objectId(),
|
||||
scheda: { ...newscheda },
|
||||
order: maxorder + 10,
|
||||
numSchede: 1,
|
||||
}
|
||||
)
|
||||
// console.log('arrschede', myel.value.catalogo!.arrSchede)
|
||||
|
||||
modifElem()
|
||||
|
||||
}
|
||||
function dupNewScheda(id: string) {
|
||||
if (!myel.value.catalogo!.arrSchede)
|
||||
return
|
||||
|
||||
const myfindscheda = myel.value.catalogo!.arrSchede.find((scheda: ISchedaSingola) => scheda._id === id)
|
||||
|
||||
if (myfindscheda) {
|
||||
let myscheda = { ...myfindscheda }
|
||||
delete myscheda._id
|
||||
myscheda._id = objectId()
|
||||
|
||||
const bakscheda = [...myel.value.catalogo!.arrSchede]
|
||||
|
||||
myel.value.catalogo!.arrSchede = []
|
||||
myel.value.catalogo!.arrSchede = [...bakscheda, myscheda]
|
||||
modifElem()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function dupNewCard() {
|
||||
if (!myel.value.listcards)
|
||||
@@ -306,10 +391,17 @@ export default defineComponent({
|
||||
myel.elemsText = myel.elemsText.filter((rec: IElemText) => rec._id !== id)
|
||||
}
|
||||
|
||||
}
|
||||
function delRecScheda(id: string, myel: IMyElem) {
|
||||
//
|
||||
myel.catalogo!.arrSchede = myel.catalogo!.arrSchede!.filter((scheda: ISchedaSingola) => scheda._id !== id)
|
||||
|
||||
modifElem()
|
||||
|
||||
}
|
||||
|
||||
function saveFieldElem(rec: any, newval: any, col: IColGridTable) {
|
||||
console.log('saveFieldElem', rec, 'newval', newval, 'col', col)
|
||||
//console.log('saveFieldElem', rec, 'newval', newval, 'col', col)
|
||||
|
||||
let iscatalogo = costanti.CATALOGO_FIELDS.includes(col.name)
|
||||
|
||||
@@ -366,7 +458,7 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
modifElem()
|
||||
|
||||
|
||||
}
|
||||
|
||||
function showAnimation() {
|
||||
@@ -399,6 +491,20 @@ export default defineComponent({
|
||||
return options;
|
||||
}
|
||||
|
||||
function SchedeOpt() {
|
||||
const arrschede = globalStore.getMySchede()
|
||||
|
||||
let arr: any = []
|
||||
|
||||
if (arrschede) {
|
||||
arrschede.forEach(scheda => {
|
||||
arr.push({ label: scheda.name, value: scheda._id })
|
||||
});
|
||||
}
|
||||
|
||||
return arr
|
||||
}
|
||||
|
||||
function updateSizeWidth(value: any) {
|
||||
// Gestisce l'input dell'utente per un nuovo valore
|
||||
myel.value.widthimg = value; // Aggiorna widthimg con il nuovo valore
|
||||
@@ -409,36 +515,6 @@ export default defineComponent({
|
||||
myel.value.catalogo!.width = value // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
function updateCatalogoNumSchedePerCol(value: any) {
|
||||
// Gestisce l'input dell'utente per un nuovo valore
|
||||
myel.value.catalogo!.numschede_perCol = value // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
function updateCatalogoNumSchedePerRiga(value: any) {
|
||||
// Gestisce l'input dell'utente per un nuovo valore
|
||||
myel.value.catalogo!.numschede_perRiga = value // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
function updateCatalogoSizeWidthScheda(value: any) {
|
||||
// Gestisce l'input dell'utente per un nuovo valore
|
||||
myel.value.catalogo!.widthscheda = value // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
function updateCatalogoSizeWidthPag(value: any) {
|
||||
// Gestisce l'input dell'utente per un nuovo valore
|
||||
myel.value.catalogo!.widthpag = value // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
function updateCatalogoSizeWidthPagPrintable(value: any) {
|
||||
// Gestisce l'input dell'utente per un nuovo valore
|
||||
myel.value.catalogo!.widthpagPrintable = value // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
}
|
||||
function updateCatalogoSizeHeight(value: any) {
|
||||
myel.value.catalogo!.height = value
|
||||
modifElem()
|
||||
}
|
||||
|
||||
function updateSizeHeight(value: any) {
|
||||
myel.value.heightimg = value; // Aggiorna widthimg con il nuovo valore
|
||||
modifElem()
|
||||
@@ -466,10 +542,14 @@ export default defineComponent({
|
||||
neworder.value = rec
|
||||
}
|
||||
|
||||
function addProdSpeciale(rec: any) {
|
||||
neworder.value = rec
|
||||
}
|
||||
|
||||
async function moveElem(direz: any) {
|
||||
let myelem = props.myelem
|
||||
|
||||
const elemprec = globalStore.getMyElemPrecThisElemId(props.path, myelem._id)
|
||||
const elemprec = globalStore.getMyElemPrecThisElemId(props.path, myelem._id!)
|
||||
const elemnext = globalStore.getMyElemNextThisElemId(props.path, myelem._id!)
|
||||
|
||||
let neworder = 0
|
||||
@@ -589,12 +669,14 @@ export default defineComponent({
|
||||
classiImmagineOptions,
|
||||
saveFieldElem,
|
||||
updateCatalogoSizeWidth,
|
||||
updateCatalogoSizeHeight,
|
||||
updateCatalogoSizeWidthScheda,
|
||||
updateCatalogoSizeWidthPag,
|
||||
updateCatalogoSizeWidthPagPrintable,
|
||||
updateCatalogoNumSchedePerCol,
|
||||
updateCatalogoNumSchedePerRiga,
|
||||
dupPage,
|
||||
posizTextOptions,
|
||||
tabScheda,
|
||||
addNewScheda,
|
||||
dupNewScheda,
|
||||
delRecScheda,
|
||||
SchedeOpt,
|
||||
addProdSpeciale,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -53,6 +53,15 @@
|
||||
|
||||
|
||||
<q-space />
|
||||
<q-btn
|
||||
icon="far fa-copy"
|
||||
label="Duplica Pagina"
|
||||
dense
|
||||
size="sm"
|
||||
color="fuchsia"
|
||||
@click="dupPage()"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
icon="fas fa-trash-alt"
|
||||
color="negative"
|
||||
@@ -70,6 +79,15 @@
|
||||
@click="dupElem(myel.order + 10 * direzadd)"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
dense
|
||||
icon="fas fa-check"
|
||||
color="positive"
|
||||
label="Salva"
|
||||
size="sm"
|
||||
@click="saveElem"
|
||||
>
|
||||
</q-btn>
|
||||
</q-bar>
|
||||
<div class="fixed-button">
|
||||
<div class="justify-center row q-ma-xs">
|
||||
@@ -403,7 +421,7 @@
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
label="Scheda"
|
||||
label="Aggiungi"
|
||||
icon="fas fa-plus"
|
||||
@click="addNewCard"
|
||||
>
|
||||
@@ -412,7 +430,7 @@
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
label="Scheda"
|
||||
label="Duplica"
|
||||
icon="fas fa-copy"
|
||||
@click="dupNewCard"
|
||||
>
|
||||
@@ -1317,154 +1335,467 @@
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div>Cataloghi:</div>
|
||||
<br />
|
||||
<q-toggle
|
||||
v-model="myel.catalogo.pdf"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
label="Versione PDF"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
<br />
|
||||
|
||||
<!--++AddCATALOGO_FIELDS-->
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.productTypes"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.productTypes"
|
||||
:options="shared_consts.VERSIONI_PRODOTTO"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Includi"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</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"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Escludi"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.Editore"
|
||||
:options="Products.publishers"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Editori"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
option-value="_id"
|
||||
option-label="name"
|
||||
>
|
||||
</q-select>
|
||||
|
||||
<CMySlider
|
||||
label="Larghezza Schede:"
|
||||
v-model="myel.catalogo.widthscheda"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="green"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Larghezza Pagina:"
|
||||
v-model="myel.catalogo.widthpag"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="green"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Larghezza Immagini:"
|
||||
v-model="myel.catalogo.width"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="green"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Altezza Schede:"
|
||||
v-model="myel.catalogo.height"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
</div>
|
||||
<div class="sfondo_margine">
|
||||
Margini:<br />
|
||||
<CMySlider
|
||||
label="Schede per Riga"
|
||||
v-model="myel.catalogo.numschede_perRiga"
|
||||
:min="1"
|
||||
:max="10"
|
||||
color="green"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Schede per Colonna"
|
||||
v-model="myel.catalogo.numschede_perCol"
|
||||
:min="1"
|
||||
:max="10"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Margine per Pagina"
|
||||
v-model="myel.catalogo.margine_pagina"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Margine per Riga"
|
||||
v-model="myel.catalogo.margine_riga"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
</div>
|
||||
<div>Sfondo:</div>
|
||||
<div v-if="enableEdit">
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Selezione Collane/Editori"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div class="row">
|
||||
<q-toggle
|
||||
v-model="myel.catalogo.pdf"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
label="Versione PDF"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
<br />
|
||||
|
||||
<!--++AddCATALOGO_FIELDS-->
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="
|
||||
enableEdit && myel.catalogo && myel.catalogo.productTypes
|
||||
"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.productTypes"
|
||||
:options="shared_consts.VERSIONI_PRODOTTO"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Includi"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</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"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Escludi"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.Editore"
|
||||
:options="Products.publishers"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Editori"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
option-value="_id"
|
||||
option-label="name"
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Schede"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div class="row">
|
||||
<q-btn
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
label="Aggiungi"
|
||||
icon="fas fa-plus"
|
||||
@click="addNewScheda"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<q-tabs
|
||||
v-model="tabScheda"
|
||||
dense
|
||||
class="text-grey"
|
||||
active-color="primary"
|
||||
indicator-color="primary"
|
||||
align="justify"
|
||||
narrow-indicator
|
||||
>
|
||||
<q-tab
|
||||
v-for="(rec, ind) in myel.catalogo.arrSchede"
|
||||
:key="ind"
|
||||
:name="ind"
|
||||
:label="`Scheda ` + (ind + 1)"
|
||||
icon="fas fa-pencil-alt"
|
||||
>
|
||||
</q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabScheda" animated>
|
||||
<q-tab-panel
|
||||
v-for="(recscheda, ind) in myel.catalogo.arrSchede"
|
||||
:key="ind"
|
||||
:name="ind"
|
||||
>
|
||||
<q-bar v-if="recscheda" class="bg-primary text-white">
|
||||
Scheda {{ ind + 1 }}
|
||||
<span v-if="recscheda.scheda"> '{{
|
||||
recscheda.scheda.name
|
||||
}}'</span>
|
||||
<q-space />
|
||||
<q-btn
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
label="Duplica"
|
||||
icon="fas fa-copy"
|
||||
@click="dupNewScheda(recscheda._id)"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
icon="fas fa-trash-alt"
|
||||
color="negative"
|
||||
dense
|
||||
size="sm"
|
||||
@click="delRecScheda(recscheda._id, myel)"
|
||||
>
|
||||
</q-btn>
|
||||
</q-bar>
|
||||
<div v-if="recscheda && recscheda.scheda">
|
||||
<q-select
|
||||
v-model="recscheda.order"
|
||||
:options="orderOptions"
|
||||
label="Posizionamento"
|
||||
options-dense
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
style="width: 100px"
|
||||
@update:model-value="modifElem"
|
||||
fill-input
|
||||
text-color="white"
|
||||
>
|
||||
</q-select>
|
||||
|
||||
<q-toggle
|
||||
v-model="recscheda.scheda.isTemplate"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
label="E' un template"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
<q-input
|
||||
dense
|
||||
label="Nome Template"
|
||||
@update:model-value="modifElem"
|
||||
v-model="recscheda.scheda.name"
|
||||
filled
|
||||
v-on:keyup.enter="saveElem"
|
||||
>
|
||||
</q-input>
|
||||
|
||||
<!--<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda._id"
|
||||
:options="SchedeOpt()"
|
||||
@update:model-value="modifElem"
|
||||
dense
|
||||
label="Scegli Scheda"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>-->
|
||||
|
||||
<CMySlider
|
||||
label="Schede da ripetere"
|
||||
v-model="recscheda.numSchede"
|
||||
:min="1"
|
||||
:max="100"
|
||||
color="green"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Filtri"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div class="row">
|
||||
<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"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Includi"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
v-if="
|
||||
enableEdit &&
|
||||
myel.catalogo &&
|
||||
myel.catalogo.excludeproductTypes
|
||||
"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda.scheda.excludeproductTypes"
|
||||
:options="shared_consts.VERSIONI_PRODOTTO"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Escludi"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda.scheda.Editore"
|
||||
:options="Products.publishers"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
dense
|
||||
label="Editori"
|
||||
style="width: 150px"
|
||||
emit-value
|
||||
map-options
|
||||
option-value="_id"
|
||||
option-label="name"
|
||||
>
|
||||
</q-select>
|
||||
|
||||
<q-select
|
||||
label="Prodotti Speciali:"
|
||||
v-model="recscheda.scheda.arrProdottiSpeciali"
|
||||
emit-value
|
||||
map-options
|
||||
:options="[]"
|
||||
use-chips
|
||||
multiple
|
||||
@update:model-value="
|
||||
recscheda.scheda.arrProdottiSpeciali
|
||||
"
|
||||
filled
|
||||
use-input
|
||||
new-value-mode="add-unique"
|
||||
dense
|
||||
style="width: 350px"
|
||||
/>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Dimensioni Schede"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div class="row">
|
||||
<CMySlider
|
||||
label="Schede per Riga"
|
||||
v-model="recscheda.scheda.numschede_perRiga"
|
||||
:min="1"
|
||||
:max="10"
|
||||
color="green"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Schede per Colonna"
|
||||
v-model="recscheda.scheda.numschede_perCol"
|
||||
:min="1"
|
||||
:max="10"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Larghezza Schede:"
|
||||
v-model="recscheda.scheda.widthscheda"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="green"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Larghezza Pagina:"
|
||||
v-model="recscheda.scheda.widthpag"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="green"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Larghezza Immagini:"
|
||||
v-model="recscheda.scheda.width"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="green"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Altezza Schede:"
|
||||
v-model="recscheda.scheda.height"
|
||||
:min="10"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Testo"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<q-select
|
||||
v-model="recscheda.scheda.posiz_text"
|
||||
:options="posizTextOptions"
|
||||
label="Posizione"
|
||||
options-dense
|
||||
dense
|
||||
emit-value
|
||||
map-options
|
||||
style="width: 100px"
|
||||
@update:model-value="modifElem"
|
||||
fill-input
|
||||
text-color="white"
|
||||
>
|
||||
</q-select>
|
||||
<CMySlider
|
||||
label="Line Height:"
|
||||
v-model="recscheda.scheda.line_height"
|
||||
:min="70"
|
||||
:max="200"
|
||||
color="blue"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMyFieldRec
|
||||
title="Testo:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="recscheda.scheda.text"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.html"
|
||||
@save="saveFieldElem"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
</q-expansion-item>
|
||||
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Margini Pagina"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div class="sfondo_margine row">
|
||||
<CMySlider
|
||||
label="Margine Top"
|
||||
v-model="recscheda.scheda.margine_top"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="blue"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Margine per Pagina"
|
||||
v-model="recscheda.scheda.margine_pagina"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Margine per Riga"
|
||||
v-model="recscheda.scheda.margine_riga"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Sfondi"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
Nome File Web: {{ myel.catalogo.backgroundimage }}<br />
|
||||
<CMyFieldRec
|
||||
title="Per Web:"
|
||||
@@ -1479,59 +1810,183 @@
|
||||
>
|
||||
</CMyFieldRec>
|
||||
<br />
|
||||
<div class="sfondo_print">
|
||||
Per Stampa:
|
||||
<q-toggle
|
||||
v-model="myel.catalogo.printable"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
label="Versione Stampabile"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
</q-expansion-item>
|
||||
|
||||
<q-input
|
||||
dense
|
||||
label="Margine per Pagina:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.catalogo.margine_paginaPrintable"
|
||||
filled
|
||||
v-on:keyup.enter="saveFieldElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-input
|
||||
dense
|
||||
label="Margine per Riga:"
|
||||
@update:model-value="modifElem"
|
||||
v-model="myel.catalogo.margine_rigaPrintable"
|
||||
filled
|
||||
v-on:keyup.enter="saveFieldElem"
|
||||
>
|
||||
</q-input>
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Prima Pagina"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
Prima Pagina: {{ myel.catalogo.first_page_img }}<br />
|
||||
<div class="row">
|
||||
<CMySlider
|
||||
label="Larghezza Pagina Stampa:"
|
||||
v-model="myel.catalogo.widthpagPrintable"
|
||||
label="Altezza:"
|
||||
v-model="myel.catalogo.first_page_height"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
:max="4000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
Nome File Printable: {{ myel.catalogo.backgroundimage_printable }}
|
||||
<CMyFieldRec
|
||||
title="Sfondo:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="backgroundimage_printable"
|
||||
<CMySlider
|
||||
label="Larghezza:"
|
||||
v-model="myel.catalogo.first_page_width"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.image"
|
||||
@save="saveFieldElem"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
></CMySlider>
|
||||
</div>
|
||||
|
||||
<CMyFieldRec
|
||||
title="Per Web:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="first_page_img"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.image"
|
||||
@save="saveFieldElem"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
<CMyFieldRec
|
||||
title="Testo pagina:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="first_page_html"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.html"
|
||||
@save="saveFieldElem"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
|
||||
<br />
|
||||
</q-expansion-item>
|
||||
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Ultima Pagina"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
Immagine: {{ myel.catalogo.last_page_img }}<br />
|
||||
<div class="row">
|
||||
<CMySlider
|
||||
label="Altezza:"
|
||||
v-model="myel.catalogo.last_page_height"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Larghezza:"
|
||||
v-model="myel.catalogo.last_page_width"
|
||||
:min="0"
|
||||
:max="4000"
|
||||
color="red"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
</div>
|
||||
|
||||
<CMyFieldRec
|
||||
title="Per Web:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="last_page_img"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.image"
|
||||
@save="saveFieldElem"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
<CMyFieldRec
|
||||
title="Testo pagina:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="last_page_html"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.html"
|
||||
@save="saveFieldElem"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
|
||||
<br />
|
||||
</q-expansion-item>
|
||||
<div v-if="enableEdit">
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Per Stampa"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<div class="sfondo_print">
|
||||
Per Stampa:
|
||||
<q-toggle
|
||||
v-model="myel.catalogo.printable"
|
||||
color="positive"
|
||||
icon="fas fa-file-pdf"
|
||||
label="Versione Stampabile"
|
||||
@update:model-value="modifElem"
|
||||
>
|
||||
</q-toggle>
|
||||
|
||||
<CMySlider
|
||||
label="Margine per Pagina"
|
||||
v-model="myel.catalogo.margine_paginaPrintable"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
<CMySlider
|
||||
label="Margine per Riga"
|
||||
v-model="myel.catalogo.margine_rigaPrintable"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
<CMySlider
|
||||
label="Larghezza Pagina Stampa:"
|
||||
v-model="myel.catalogo.widthpagPrintable"
|
||||
:min="0"
|
||||
:max="1000"
|
||||
color="red"
|
||||
addstr="px"
|
||||
@update:model-value="modifElem"
|
||||
></CMySlider>
|
||||
|
||||
Nome File Printable:
|
||||
{{ myel.catalogo.backgroundimage_printable }}
|
||||
<CMyFieldRec
|
||||
title="Sfondo:"
|
||||
table="catalogo"
|
||||
:rec="myel.catalogo"
|
||||
field="backgroundimage_printable"
|
||||
@update:model-value="modifElem"
|
||||
:canEdit="true"
|
||||
:canModify="true"
|
||||
:fieldtype="costanti.FieldType.image"
|
||||
@save="saveFieldElem"
|
||||
>
|
||||
</CMyFieldRec>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</div>
|
||||
</q-list>
|
||||
|
||||
@@ -50,12 +50,13 @@ export default defineComponent({
|
||||
const myfonts = ref({
|
||||
arial: 'Arial',
|
||||
arial_black: 'Arial Black',
|
||||
AGaramondProRegular: 'AGaramondPro-Regular',
|
||||
comic_sans: 'Comic Sans MS',
|
||||
courier_new: 'Courier New',
|
||||
impact: 'Impact',
|
||||
lucida_grande: 'Lucida Grande',
|
||||
times_new_roman: 'Times New Roman',
|
||||
verdana: 'Verdana'
|
||||
verdana: 'Verdana',
|
||||
})
|
||||
|
||||
const showtools = ref(false)
|
||||
|
||||
@@ -469,7 +469,6 @@ body.mobile .landing:before {
|
||||
.elemEdit{
|
||||
margin: 3px;
|
||||
padding: 3px;
|
||||
background-color: #3fdaff;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -173,7 +173,7 @@ export default defineComponent({
|
||||
if (arrk.length > 2)
|
||||
mysubsubkey.value = arrk[2]
|
||||
}
|
||||
console.log('### table', props.table, 'col.value', col.value, 'field', props.field, 'mykey', mykey.value, 'mysubkey', mysubkey.value)
|
||||
// console.log('### table', props.table, 'col.value', col.value, 'field', props.field, 'mykey', mykey.value, 'mysubkey', mysubkey.value)
|
||||
|
||||
}
|
||||
|
||||
@@ -235,6 +235,11 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function update_col(name: string, val: any) {
|
||||
// console.log('update_col', name, val)
|
||||
myrec.value[name] = val
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -257,6 +262,7 @@ export default defineComponent({
|
||||
visuElem,
|
||||
getclass,
|
||||
myrec,
|
||||
update_col,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
:path="path"
|
||||
:nosaveToDb="nosaveToDb"
|
||||
@showandsave="showandsave"
|
||||
@update_col="update_col"
|
||||
>
|
||||
</CMyPopupEdit>
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,11 @@ export default defineComponent({
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
myidPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
img: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -62,6 +67,7 @@ export default defineComponent({
|
||||
setup(props) {
|
||||
const rec = ref<IMyPage | null>(null)
|
||||
const mypathin = toRef(props, 'mypath')
|
||||
const myidPage = toRef(props, 'idPage')
|
||||
|
||||
const $q = useQuasar()
|
||||
|
||||
@@ -91,7 +97,9 @@ export default defineComponent({
|
||||
const onloading = ref(false)
|
||||
|
||||
const myelems = computed(() => {
|
||||
if (mypathin.value)
|
||||
if (myidPage.value)
|
||||
return globalStore.getMyElemsByIdPage(myidPage.value)
|
||||
else if (mypathin.value)
|
||||
return globalStore.getMyElems(mypathin.value)
|
||||
else
|
||||
return null
|
||||
@@ -159,6 +167,10 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
async function duplicatePage() {
|
||||
await globalStore.duplicatePage(mypathin.value, $q, t)
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
@@ -179,6 +191,7 @@ export default defineComponent({
|
||||
toggleSize,
|
||||
onloading,
|
||||
deleteElem,
|
||||
duplicatePage,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -41,9 +41,11 @@
|
||||
:myelem="selElem"
|
||||
:editOn="true"
|
||||
:path="rec.path"
|
||||
:IdPath="rec._id"
|
||||
@selElemClick="selElemClick"
|
||||
@deleteElem="deleteElem"
|
||||
@toggleSize="toggleSize"
|
||||
@dupPage="duplicatePage"
|
||||
>
|
||||
</CMyEditElem>
|
||||
</q-drawer>
|
||||
|
||||
@@ -28,6 +28,11 @@ export default defineComponent({
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
myidPage: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
img: {
|
||||
type: String,
|
||||
required: false,
|
||||
@@ -74,7 +79,9 @@ export default defineComponent({
|
||||
const editOn = computed(() => globalStore.editOn)
|
||||
|
||||
const myelems = computed(() => {
|
||||
if (mypathin.value)
|
||||
if (myidPage.value)
|
||||
return globalStore.getMyElemsByIdPage(myidPage.value)
|
||||
else if (mypathin.value)
|
||||
return globalStore.getMyElems(mypathin.value)
|
||||
else
|
||||
return null
|
||||
|
||||
@@ -411,7 +411,6 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function changevalRecOrig(newval: any, subcol: string = '') {
|
||||
// console.log('changevalRec', newval)
|
||||
// if (!props.insertMode || (props.insertMode && col.value.fieldtype !== costanti.FieldType.multioption)) {
|
||||
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
newval = tools.removespaces_slash(newval)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="q-pa-xs" style="width: 300px">
|
||||
<div class="q-pa-xs" style="width: 180px">
|
||||
<q-badge color="primary"> {{ label }} {{ modelValue }} </q-badge>
|
||||
|
||||
<q-input
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
.prod_off_price {
|
||||
font-size: 1rem;
|
||||
|
||||
@media (max-width: 718px) {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
color: gray;
|
||||
text-decoration: line-through;
|
||||
padding-left: 8px;
|
||||
|
||||
@media (max-width: 718px) {
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* ******** */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="row items-start q-gutter-sm">
|
||||
<div class="row">
|
||||
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
|
||||
<q-card
|
||||
:class="{
|
||||
@@ -30,7 +30,10 @@
|
||||
<q-img
|
||||
:src="
|
||||
myproduct.productInfo.imagefile
|
||||
? tools.getFullFileNameByImageFile('productInfos', myproduct.productInfo.imagefile)
|
||||
? tools.getFullFileNameByImageFile(
|
||||
'productInfos',
|
||||
myproduct.productInfo.imagefile
|
||||
)
|
||||
: myproduct.productInfo.image_link
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
@@ -45,11 +48,15 @@
|
||||
color="primary"
|
||||
round
|
||||
icon="fas fa-eye"
|
||||
|
||||
class="absolute semi-transparent"
|
||||
size="md"
|
||||
@click="toggleFullScreen"
|
||||
style="bottom: -10px; right: 0px; transform: translateY(-50%); z-index: 2"
|
||||
style="
|
||||
bottom: -10px;
|
||||
right: 0px;
|
||||
transform: translateY(-50%);
|
||||
z-index: 2;
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -226,7 +233,7 @@
|
||||
<div v-if="false" class="barcode">
|
||||
<barcode :value="myproduct.productInfo.code" format="EAN-13">
|
||||
</barcode>
|
||||
<vue-barcode ></vue-barcode>
|
||||
<vue-barcode></vue-barcode>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
@@ -375,7 +382,8 @@
|
||||
<q-card-section
|
||||
v-if="
|
||||
editOn &&
|
||||
(!!myproduct.productInfo.imagefile || myproduct.productInfo.imagefile === '')
|
||||
(!!myproduct.productInfo.imagefile ||
|
||||
myproduct.productInfo.imagefile === '')
|
||||
"
|
||||
>
|
||||
<div class="text-center">
|
||||
@@ -921,11 +929,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>
|
||||
@@ -1072,7 +1082,10 @@
|
||||
<q-img
|
||||
:src="
|
||||
myproduct.productInfo.imagefile
|
||||
? tools.getFullFileNameByImageFile('productInfos', myproduct.productInfo.imagefile)
|
||||
? tools.getFullFileNameByImageFile(
|
||||
'productInfos',
|
||||
myproduct.productInfo.imagefile
|
||||
)
|
||||
: myproduct.productInfo.image_link
|
||||
"
|
||||
:alt="myproduct.productInfo.name"
|
||||
|
||||
Reference in New Issue
Block a user