aggiornamenti vari...
This commit is contained in:
@@ -39,9 +39,9 @@ export default defineComponent({
|
||||
default: true,
|
||||
},
|
||||
heightcarousel: {
|
||||
type: Number,
|
||||
type: String,
|
||||
required: false,
|
||||
default: 0,
|
||||
default: '',
|
||||
},
|
||||
heightcard: {
|
||||
type: String,
|
||||
|
||||
@@ -34,14 +34,13 @@
|
||||
:prop_showMap="false"
|
||||
:heightcarousel="heightcarousel"
|
||||
@clickButtBar="clickButtBar"
|
||||
:opt="{rowclass: true, widthcard, heightcard, widthimg, heightimg}"
|
||||
:opt="{ rowclass: true, widthcard, heightcard, widthimg, heightimg }"
|
||||
>
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCatalogList.ts">
|
||||
</script>
|
||||
<script lang="ts" src="./CCatalogList.ts"></script>
|
||||
<style lang="scss" scoped>
|
||||
@import './CCatalogList.scss';
|
||||
</style>
|
||||
|
||||
@@ -1,600 +0,0 @@
|
||||
<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_pub && complete"
|
||||
class="book-data-pub"
|
||||
>
|
||||
Data Pubblicazione:
|
||||
{{ tools.getstrDate(myproduct.productInfo.date_pub) }}
|
||||
</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>
|
||||
@@ -585,7 +585,7 @@ export default defineComponent({
|
||||
emit('selauthor', id, autore)
|
||||
}
|
||||
|
||||
function click_opendetail(id: any, autore: any) {
|
||||
function click_opendetail() {
|
||||
if (!optcatalogo.value.pdf)
|
||||
emit('opendetail')
|
||||
}
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
<template>
|
||||
<div v-if="globalStore.serverError">
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
class="bg-negative text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center;">
|
||||
<q-banner rounded dense class="bg-negative text-white" color="primary q-title" style="text-align: center;">
|
||||
<template v-slot:avatar>
|
||||
<q-icon name="fas fa-exclamation-triangle" color="yellow" size="xs" />
|
||||
</template>
|
||||
<span class="mybanner">Errore di Connessione al Server</span>
|
||||
<p v-if="globalStore.serverMsgError" class="errore">{{globalStore.getMsgServerError()}}</p>
|
||||
<p v-if="tools.isCurrentUrlSignUp() && globalStore.isErroreDispositivoServer()" class="errore">Se l'Errore persiste, significa che questo browser non riesce a collegarsi col Server.<br>
|
||||
<div v-if="globalStore.serverMsgError?.msgerr?.code === 'ERR_NETWORK'" class="errore">
|
||||
Controllare di essere connessi ad Internet
|
||||
</div>
|
||||
<p v-else-if="globalStore.serverMsgError" class="errore">{{ globalStore.getMsgServerError() }}</p>
|
||||
<p v-if="tools.isCurrentUrlSignUp() && globalStore.isErroreDispositivoServer()" class="errore">Se l'Errore
|
||||
persiste,
|
||||
significa che questo browser non riesce a collegarsi col Server.<br>
|
||||
Soluzione: Provare ad installare un altro browser:<br>
|
||||
👉🏻 Clicca per installare <a href="https://download.opera.com/download/get/?partner=www¬hanks=yes&product=Android">Opera per Android</a>. </p>
|
||||
👉🏻 Clicca per installare <a
|
||||
href="https://download.opera.com/download/get/?partner=www¬hanks=yes&product=Android">Opera per
|
||||
Android</a>. </p>
|
||||
|
||||
<q-btn
|
||||
size="md"
|
||||
color="secondary" rounded icon="refresh"
|
||||
class="btnNewVersShow" @click="reloadPage" label="Riprova">
|
||||
|
||||
<q-btn size="md" color="secondary" rounded icon="refresh" class="btnNewVersShow" @click="reloadPage"
|
||||
label="Riprova">
|
||||
</q-btn>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
||||
@@ -244,108 +244,109 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
neworder.value = props.myelem.order
|
||||
try {
|
||||
neworder.value = props.myelem.order
|
||||
|
||||
arrPages.value = []
|
||||
arrPages.value.push({ label: '[Vuoto]', path: '' })
|
||||
for (const page of globalStore.mypage) {
|
||||
arrPages.value = []
|
||||
arrPages.value.push({ label: '[Vuoto]', path: '' })
|
||||
for (const page of globalStore.mypage) {
|
||||
|
||||
const rec = {
|
||||
// @ts-ignore
|
||||
label: page.title,
|
||||
// @ts-ignore
|
||||
value: page.idPage
|
||||
const rec = {
|
||||
// @ts-ignore
|
||||
label: page.title,
|
||||
// @ts-ignore
|
||||
value: page.idPage
|
||||
}
|
||||
arrPages.value.push(rec)
|
||||
}
|
||||
arrPages.value.push(rec)
|
||||
}
|
||||
|
||||
if (props.myelem)
|
||||
newtype.value = props.myelem.type
|
||||
if (props.myelem)
|
||||
newtype.value = props.myelem.type
|
||||
|
||||
if (myel.value.class4) {
|
||||
selectedClasses.value = myel.value.class4.split(' ').filter(Boolean)
|
||||
}
|
||||
if (myel.value.class4) {
|
||||
selectedClasses.value = myel.value.class4.split(' ').filter(Boolean)
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && myel.value.catalogo?.arrSchede) {
|
||||
for (const recscheda of myel.value.catalogo!.arrSchede) {
|
||||
if (recscheda.scheda) {
|
||||
recscheda.scheda.testo_right_attaccato = tools.resetIText(recscheda.scheda?.testo_right_attaccato)
|
||||
recscheda.scheda.testo_right = tools.resetIText(recscheda.scheda?.testo_right)
|
||||
recscheda.scheda.testo_bottom = tools.resetIText(recscheda.scheda?.testo_bottom)
|
||||
if (myel.value.catalogo && myel.value.catalogo?.arrSchede) {
|
||||
for (const recscheda of myel.value.catalogo!.arrSchede) {
|
||||
if (recscheda.scheda) {
|
||||
recscheda.scheda.testo_right_attaccato = tools.resetIText(recscheda.scheda?.testo_right_attaccato)
|
||||
recscheda.scheda.testo_right = tools.resetIText(recscheda.scheda?.testo_right)
|
||||
recscheda.scheda.testo_bottom = tools.resetIText(recscheda.scheda?.testo_bottom)
|
||||
|
||||
if ((!recscheda.scheda?.dimensioni.pagina)) {
|
||||
recscheda.scheda.dimensioni.pagina = tools.resetRecIPagina(recscheda.scheda?.dimensioni.pagina)
|
||||
}
|
||||
if ((!recscheda.scheda?.dimensioni.pagina.dimensioni)) {
|
||||
recscheda.scheda.dimensioni.pagina = tools.resetRecIPagina(recscheda.scheda?.dimensioni.pagina)
|
||||
}
|
||||
if (!recscheda.scheda?.dimensioni?.pagina?.testo_up) {
|
||||
recscheda.scheda!.dimensioni.pagina.testo_up = tools.resetIText(null)
|
||||
}
|
||||
if (!recscheda.scheda?.dimensioni?.pagina?.testo_down) {
|
||||
recscheda.scheda!.dimensioni.pagina.testo_down = tools.resetIText(null)
|
||||
}
|
||||
|
||||
if (!recscheda.scheda?.etichette?.novita?.show) {
|
||||
recscheda.scheda.etichette!.novita = {
|
||||
show: false,
|
||||
months: 6,
|
||||
if ((!recscheda.scheda?.dimensioni.pagina.dimensioni)) {
|
||||
recscheda.scheda.dimensioni.pagina = tools.resetRecIPagina(recscheda.scheda?.dimensioni.pagina)
|
||||
}
|
||||
recscheda.scheda.etichette!.bestseller = {
|
||||
show: false,
|
||||
primiNInClassifica: 0,
|
||||
|
||||
if (!recscheda.scheda?.dimensioni?.pagina?.testo_up) {
|
||||
recscheda.scheda!.dimensioni.pagina.testo_up = tools.resetIText(null)
|
||||
}
|
||||
if (!recscheda.scheda?.dimensioni?.pagina?.testo_down) {
|
||||
recscheda.scheda!.dimensioni.pagina.testo_down = tools.resetIText(null)
|
||||
}
|
||||
}
|
||||
|
||||
if ((!recscheda.scheda?.barcode || !recscheda.scheda?.barcode.font)) {
|
||||
recscheda.scheda.barcode = {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '33',
|
||||
},
|
||||
font: {
|
||||
name: '',
|
||||
size: '11',
|
||||
if (!recscheda.scheda?.etichette?.novita?.show) {
|
||||
recscheda.scheda.etichette!.novita = {
|
||||
show: false,
|
||||
months: 6,
|
||||
}
|
||||
recscheda.scheda.etichette!.bestseller = {
|
||||
show: false,
|
||||
primiNInClassifica: 0,
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((!recscheda.scheda?.barcode || !recscheda.scheda?.barcode.font)) {
|
||||
recscheda.scheda.barcode = {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '33',
|
||||
},
|
||||
font: {
|
||||
name: '',
|
||||
size: '11',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (myel.value.catalogo) {
|
||||
if (!myel.value.catalogo.first_page) {
|
||||
myel.value.catalogo.first_page = tools.resetRecIDimensioni(null)
|
||||
if (myel.value.catalogo) {
|
||||
if (!myel.value.catalogo.first_page) {
|
||||
myel.value.catalogo.first_page = tools.resetRecIDimensioni(null)
|
||||
}
|
||||
|
||||
myel.value.catalogo.first_page = tools.resetRecIDimensioni(myel.value.catalogo.first_page)
|
||||
}
|
||||
if (myel.value.catalogo) {
|
||||
if (!myel.value.catalogo.last_page)
|
||||
myel.value.catalogo.last_page = tools.resetRecIDimensioni(null)
|
||||
|
||||
myel.value.catalogo.last_page = tools.resetRecIDimensioni(myel.value.catalogo.last_page)
|
||||
}
|
||||
if (myel.value.catalogo) {
|
||||
if (!myel.value.catalogo.areadistampa) {
|
||||
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(null)
|
||||
myel.value.catalogo.areadistampa.margini = { left: '0.59', top: '0.59', right: '0.59', bottom: '0.28' }
|
||||
}
|
||||
|
||||
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(myel.value.catalogo.areadistampa)
|
||||
}
|
||||
|
||||
myel.value.catalogo.first_page = tools.resetRecIDimensioni(myel.value.catalogo.first_page)
|
||||
}
|
||||
if (myel.value.catalogo) {
|
||||
if (!myel.value.catalogo.last_page)
|
||||
myel.value.catalogo.last_page = tools.resetRecIDimensioni(null)
|
||||
|
||||
myel.value.catalogo.last_page = tools.resetRecIDimensioni(myel.value.catalogo.last_page)
|
||||
}
|
||||
if (myel.value.catalogo) {
|
||||
if (!myel.value.catalogo.areadistampa) {
|
||||
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(null)
|
||||
myel.value.catalogo.areadistampa.margini = { left: '0.59', top: '0.59', right: '0.59', bottom: '0.28' }
|
||||
if (myel.value.catalogo && !myel.value.catalogo.dimensioni_def) {
|
||||
myel.value.catalogo.dimensioni_def = { pagina: {} }
|
||||
}
|
||||
if (myel.value.catalogo && myel.value.catalogo.dimensioni_def) {
|
||||
myel.value.catalogo.dimensioni_def.pagina = tools.resetRecIDimensioni(myel.value.catalogo.dimensioni_def.pagina)
|
||||
}
|
||||
|
||||
myel.value.catalogo.areadistampa = tools.resetRecIAreaDiStampa(myel.value.catalogo.areadistampa)
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && !myel.value.catalogo.dimensioni_def) {
|
||||
myel.value.catalogo.dimensioni_def = { pagina: {} }
|
||||
}
|
||||
if (myel.value.catalogo && myel.value.catalogo.dimensioni_def) {
|
||||
myel.value.catalogo.dimensioni_def.pagina = tools.resetRecIDimensioni(myel.value.catalogo.dimensioni_def.pagina)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function clickOnElem() {
|
||||
@@ -469,18 +470,21 @@ export default defineComponent({
|
||||
numschede_perCol: 2,
|
||||
testo_right_attaccato: {
|
||||
contenuto: '',
|
||||
maxlength: 0,
|
||||
font: {
|
||||
posiz_text: costanti.POSIZ_TESTO.A_DESTRA,
|
||||
},
|
||||
},
|
||||
testo_right: {
|
||||
contenuto: '',
|
||||
maxlength: 0,
|
||||
font: {
|
||||
posiz_text: costanti.POSIZ_TESTO.A_DESTRA,
|
||||
},
|
||||
},
|
||||
testo_bottom: {
|
||||
contenuto: '',
|
||||
maxlength: 0,
|
||||
font: {
|
||||
posiz_text: costanti.POSIZ_TESTO.IN_BASSO,
|
||||
}
|
||||
@@ -505,6 +509,16 @@ export default defineComponent({
|
||||
sort_field: '',
|
||||
sort_dir: 0,
|
||||
arrProdottiSpeciali: [],
|
||||
etichette: {
|
||||
novita: {
|
||||
show: false,
|
||||
months: 6,
|
||||
},
|
||||
bestseller: {
|
||||
show: false,
|
||||
primiNInClassifica: 20
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!myel.value.catalogo!.arrSchede)
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<template>
|
||||
<div
|
||||
v-if="myel"
|
||||
:class="
|
||||
(editOn ? ` clEditDiv` : ``) +
|
||||
`` +
|
||||
(!myel.active ? ` clEditNotActive` : ``)
|
||||
"
|
||||
:class="(editOn ? ` clEditDiv` : ``) + `` + (!myel.active ? ` clEditNotActive` : ``)"
|
||||
>
|
||||
<div v-if="myel && myel.type">
|
||||
<div class="row justify-evenly q-gutter-sm">
|
||||
@@ -44,7 +40,10 @@
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
<q-bar v-if="enableEdit" class="q-pa-md bg-orange text-white">
|
||||
<q-bar
|
||||
v-if="enableEdit"
|
||||
class="q-pa-md bg-orange text-white"
|
||||
>
|
||||
Pagina:
|
||||
|
||||
<q-space />
|
||||
@@ -76,7 +75,10 @@
|
||||
>
|
||||
</q-btn>
|
||||
</q-bar>
|
||||
<q-bar v-if="enableEdit" class="q-pa-md bg-light-blue text-white">
|
||||
<q-bar
|
||||
v-if="enableEdit"
|
||||
class="q-pa-md bg-light-blue text-white"
|
||||
>
|
||||
Elemento:
|
||||
|
||||
<q-space />
|
||||
@@ -131,7 +133,11 @@
|
||||
</q-btn>-->
|
||||
</div>
|
||||
</div>
|
||||
<q-list padding bordered class="rounded-borders">
|
||||
<q-list
|
||||
padding
|
||||
bordered
|
||||
class="rounded-borders"
|
||||
>
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
@@ -495,13 +501,20 @@
|
||||
/>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabCard" animated keep-alive>
|
||||
<q-tab-panels
|
||||
v-model="tabCard"
|
||||
animated
|
||||
keep-alive
|
||||
>
|
||||
<q-tab-panel
|
||||
v-for="(rec, ind) in myel.listcards"
|
||||
:key="ind"
|
||||
:name="ind"
|
||||
>
|
||||
<div v-if="enableEdit" class="column bordered q-ma-xs">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="column bordered q-ma-xs"
|
||||
>
|
||||
<q-bar class="bg-primary text-white">
|
||||
Scheda {{ ind + 1 }}
|
||||
<q-space />
|
||||
@@ -531,7 +544,10 @@
|
||||
>
|
||||
</CMyFieldRec>
|
||||
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<q-input
|
||||
dense
|
||||
style="min-width: 150px"
|
||||
@@ -604,7 +620,10 @@
|
||||
>
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<CSelectColor
|
||||
v-if="enableEdit"
|
||||
v-model="rec.colorsub"
|
||||
@@ -800,13 +819,20 @@
|
||||
/>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabElemsText" animated keep-alive>
|
||||
<q-tab-panels
|
||||
v-model="tabElemsText"
|
||||
animated
|
||||
keep-alive
|
||||
>
|
||||
<q-tab-panel
|
||||
v-for="(rec, ind) in myel.elemsText"
|
||||
:key="ind"
|
||||
:name="`elem` + ind"
|
||||
>
|
||||
<div v-if="enableEdit" class="column bordered q-ma-xs">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="column bordered q-ma-xs"
|
||||
>
|
||||
<q-bar class="bg-primary text-white">
|
||||
Elem {{ ind + 1 }}
|
||||
<q-space />
|
||||
@@ -819,7 +845,10 @@
|
||||
>
|
||||
</q-btn>
|
||||
</q-bar>
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<CSelectColor
|
||||
v-if="enableEdit"
|
||||
style="min-width: 150px"
|
||||
@@ -1027,7 +1056,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.VIDEO">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<q-input
|
||||
dense
|
||||
label="NomeFile Video:"
|
||||
@@ -1051,7 +1083,10 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.FOOTER"></div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.PAGE">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
rounded
|
||||
@@ -1067,7 +1102,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.PAGEINTRO">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<q-input
|
||||
dense
|
||||
label="NomeFile Img:"
|
||||
@@ -1120,13 +1158,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_IDISCIPLINE"
|
||||
>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_IDISCIPLINE">
|
||||
<CCardCarousel :myarr="getArrDisciplines()"> </CCardCarousel>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.OPENSTREETMAP">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<q-input
|
||||
dense
|
||||
label="ImgMap:"
|
||||
@@ -1180,7 +1219,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<CMyFieldRec
|
||||
title="Lista Immagini:"
|
||||
table="myelems"
|
||||
@@ -1225,9 +1267,7 @@
|
||||
</q-toggle>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_HOME"
|
||||
></div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_HOME"></div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BUTTON">
|
||||
<q-input
|
||||
dense
|
||||
@@ -1299,7 +1339,10 @@
|
||||
</q-input>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.GRID_ORIZ">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<q-select
|
||||
v-model="myel.container"
|
||||
:options="[
|
||||
@@ -1358,7 +1401,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGLIST">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<br />
|
||||
<q-toggle
|
||||
v-model="myel.parambool"
|
||||
@@ -1375,7 +1421,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CALENDAR">
|
||||
<div v-if="enableEdit" class="row">
|
||||
<div
|
||||
v-if="enableEdit"
|
||||
class="row"
|
||||
>
|
||||
<q-input
|
||||
dense
|
||||
label="Visualizza ultimi N eventi:"
|
||||
@@ -1402,6 +1451,63 @@
|
||||
>
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.SEARCHPRODUCT">
|
||||
<div v-if="enableEdit && myel.catalogo">
|
||||
<q-btn
|
||||
v-if="myel.catalogo.arrSchede.length === 0"
|
||||
rounded
|
||||
dense
|
||||
color="primary"
|
||||
label="Aggiungi"
|
||||
icon="fas fa-plus"
|
||||
@click="addNewScheda"
|
||||
>
|
||||
</q-btn>
|
||||
<div
|
||||
v-for="(recscheda, ind) in myel.catalogo.arrSchede"
|
||||
:key="recscheda._id"
|
||||
:name="ind"
|
||||
dense
|
||||
:label="`${ind}. ` + recscheda.scheda.name ? recscheda.scheda.name : `Scheda ` + (ind + 1)"
|
||||
>
|
||||
<q-expansion-item
|
||||
dense
|
||||
dense-toggle
|
||||
expand-separator
|
||||
label="Testo"
|
||||
:disabled="recscheda.scheda.linkIdTemplate"
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<CMyText
|
||||
v-model="recscheda.scheda.testo_right_attaccato"
|
||||
@modifElem="modifElem"
|
||||
@saveFieldElem="saveFieldElem"
|
||||
@update:model-value="modifElem"
|
||||
label="Testo a Destra attaccato"
|
||||
>
|
||||
</CMyText>
|
||||
<CMyText
|
||||
v-model="recscheda.scheda.testo_right"
|
||||
@modifElem="modifElem"
|
||||
@saveFieldElem="saveFieldElem"
|
||||
@update:model-value="modifElem"
|
||||
label="Testo a Destra"
|
||||
>
|
||||
</CMyText>
|
||||
|
||||
<CMyText
|
||||
v-model="recscheda.scheda.testo_bottom"
|
||||
@modifElem="modifElem"
|
||||
@saveFieldElem="saveFieldElem"
|
||||
@update:model-value="modifElem"
|
||||
label="Testo in Basso"
|
||||
:show_dimensioni="true"
|
||||
>
|
||||
</CMyText>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
||||
<div v-if="enableEdit">
|
||||
<q-expansion-item
|
||||
@@ -1473,9 +1579,7 @@
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="
|
||||
enableEdit && myel.catalogo && myel.catalogo.productTypes
|
||||
"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.productTypes"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.productTypes"
|
||||
@@ -1491,11 +1595,7 @@
|
||||
|
||||
<q-select
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="
|
||||
enableEdit &&
|
||||
myel.catalogo &&
|
||||
myel.catalogo.excludeproductTypes
|
||||
"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes"
|
||||
rounded
|
||||
outlined
|
||||
v-model="myel.catalogo.excludeproductTypes"
|
||||
@@ -1616,26 +1716,27 @@
|
||||
:key="rec._id"
|
||||
:name="ind"
|
||||
dense
|
||||
:label="
|
||||
`${ind}. ` + rec.scheda.name
|
||||
? rec.scheda.name
|
||||
: `Scheda ` + (ind + 1)
|
||||
"
|
||||
:label="`${ind}. ` + rec.scheda.name ? rec.scheda.name : `Scheda ` + (ind + 1)"
|
||||
>
|
||||
</q-tab>
|
||||
</q-tabs>
|
||||
|
||||
<q-tab-panels v-model="tabScheda" animated keep-alive>
|
||||
<q-tab-panels
|
||||
v-model="tabScheda"
|
||||
animated
|
||||
keep-alive
|
||||
>
|
||||
<q-tab-panel
|
||||
v-for="(recscheda, ind) in myel.catalogo.arrSchede"
|
||||
:key="recscheda._id"
|
||||
:name="ind"
|
||||
>
|
||||
<q-bar v-if="recscheda" class="bg-primary text-white">
|
||||
<q-bar
|
||||
v-if="recscheda"
|
||||
class="bg-primary text-white"
|
||||
>
|
||||
{{ ind + 1 }}.
|
||||
<span v-if="recscheda.scheda">
|
||||
'{{ recscheda.scheda.name }}'</span
|
||||
>
|
||||
<span v-if="recscheda.scheda"> '{{ recscheda.scheda.name }}'</span>
|
||||
<q-space />
|
||||
<q-btn
|
||||
rounded
|
||||
@@ -1699,9 +1800,7 @@
|
||||
|
||||
<div class="row">
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
@@ -1717,9 +1816,7 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
@@ -1763,9 +1860,7 @@
|
||||
>
|
||||
<div class="column">
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo"
|
||||
rounded
|
||||
outlined
|
||||
@@ -1779,9 +1874,7 @@
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo"
|
||||
rounded
|
||||
outlined
|
||||
@@ -1795,14 +1888,8 @@
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
v-if="
|
||||
enableEdit &&
|
||||
myel.catalogo &&
|
||||
myel.catalogo.productTypes
|
||||
"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.productTypes"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda.scheda.productTypes"
|
||||
@@ -1816,14 +1903,8 @@
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
v-if="
|
||||
enableEdit &&
|
||||
myel.catalogo &&
|
||||
myel.catalogo.excludeproductTypes
|
||||
"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit && myel.catalogo && myel.catalogo.excludeproductTypes"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda.scheda.excludeproductTypes"
|
||||
@@ -1837,16 +1918,12 @@
|
||||
>
|
||||
</q-select>
|
||||
<q-select
|
||||
:behavior="
|
||||
$q.platform.is.ios === true ? 'dialog' : 'menu'
|
||||
"
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
v-if="enableEdit"
|
||||
rounded
|
||||
outlined
|
||||
v-model="recscheda.scheda.editore"
|
||||
:options="
|
||||
globalStore.getTableJoinByName('publishers')
|
||||
"
|
||||
:options="globalStore.getTableJoinByName('publishers')"
|
||||
@update:model-value="modifElem"
|
||||
multiple
|
||||
label="Editori"
|
||||
@@ -1866,9 +1943,7 @@
|
||||
:options="[]"
|
||||
use-chips
|
||||
multiple
|
||||
@update:model-value="
|
||||
recscheda.scheda.arrProdottiSpeciali
|
||||
"
|
||||
@update:model-value="recscheda.scheda.arrProdottiSpeciali"
|
||||
filled
|
||||
use-input
|
||||
new-value-mode="add-unique"
|
||||
@@ -1886,9 +1961,7 @@
|
||||
icon="fas fa-play-circle"
|
||||
>
|
||||
<CMyDimensioni
|
||||
v-model="
|
||||
recscheda.scheda.dimensioni.pagina.dimensioni
|
||||
"
|
||||
v-model="recscheda.scheda.dimensioni.pagina.dimensioni"
|
||||
:path="costanti.DIR_SCHEDA"
|
||||
@modifElem="modifElem"
|
||||
:show_imgsfondo="true"
|
||||
@@ -1903,9 +1976,7 @@
|
||||
>
|
||||
</CMyText>
|
||||
<CMyText
|
||||
v-model="
|
||||
recscheda.scheda.dimensioni.pagina.testo_down
|
||||
"
|
||||
v-model="recscheda.scheda.dimensioni.pagina.testo_down"
|
||||
@modifElem="modifElem"
|
||||
@saveFieldElem="saveFieldElem"
|
||||
@update:model-value="modifElem"
|
||||
@@ -1967,28 +2038,21 @@
|
||||
|
||||
<CMySize
|
||||
label="Schede:"
|
||||
v-model="
|
||||
recscheda.scheda.dimensioni.scheda_prodotto.size
|
||||
"
|
||||
v-model="recscheda.scheda.dimensioni.scheda_prodotto.size"
|
||||
:gap="true"
|
||||
@update:model-value="modifElem"
|
||||
></CMySize>
|
||||
|
||||
<CBorders
|
||||
label="Margini Schede:"
|
||||
v-model="
|
||||
recscheda.scheda.dimensioni.scheda_prodotto
|
||||
.margini
|
||||
"
|
||||
v-model="recscheda.scheda.dimensioni.scheda_prodotto.margini"
|
||||
@update:model-value="modifElem"
|
||||
></CBorders>
|
||||
|
||||
<CMySize
|
||||
label="Immagini:"
|
||||
:fit="true"
|
||||
v-model="
|
||||
recscheda.scheda.dimensioni.immagine_prodotto.size
|
||||
"
|
||||
v-model="recscheda.scheda.dimensioni.immagine_prodotto.size"
|
||||
@update:model-value="modifElem"
|
||||
></CMySize>
|
||||
</div>
|
||||
@@ -2127,10 +2191,7 @@
|
||||
</q-toggle>
|
||||
<CMySlider
|
||||
label="Primi N in Classifica"
|
||||
v-model="
|
||||
recscheda.scheda.etichette.bestseller
|
||||
.primiNInClassifica
|
||||
"
|
||||
v-model="recscheda.scheda.etichette.bestseller.primiNInClassifica"
|
||||
:min="1"
|
||||
:max="100"
|
||||
color="green"
|
||||
@@ -2242,10 +2303,7 @@
|
||||
</q-select>
|
||||
<div v-if="myel.catalogo.areadistampa.format.length > 1">
|
||||
Ratio:
|
||||
{{
|
||||
myel.catalogo.areadistampa.format[0] /
|
||||
myel.catalogo.areadistampa.format[1]
|
||||
}}
|
||||
{{ myel.catalogo.areadistampa.format[0] / myel.catalogo.areadistampa.format[1] }}
|
||||
</div>
|
||||
<q-select
|
||||
rounded
|
||||
@@ -2331,7 +2389,7 @@
|
||||
<div></div>
|
||||
<q-btn
|
||||
v-if="myel.catalogo.pdf && !myel.catalogo.generazionePDFInCorso"
|
||||
:label="`Prepara PDF ${myel.catalogo.pdf_filename}`"
|
||||
:label="`Prepara PDF`"
|
||||
@click="preparePDF"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
@@ -2360,27 +2418,33 @@
|
||||
<div>
|
||||
<q-dialog
|
||||
v-model="visuadd"
|
||||
style="
|
||||
width: 600px;
|
||||
max-width: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
"
|
||||
style="width: 600px; max-width: 100%; position: fixed; left: 0; top: 0; height: 100%"
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
>
|
||||
<q-card class="">
|
||||
<q-bar dense class="bg-primary text-white">
|
||||
<q-bar
|
||||
dense
|
||||
class="bg-primary text-white"
|
||||
>
|
||||
Aggiungi Elemento:
|
||||
<q-space />
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
<q-btn
|
||||
flat
|
||||
round
|
||||
color="white"
|
||||
icon="close"
|
||||
v-close-popup
|
||||
></q-btn>
|
||||
</q-bar>
|
||||
|
||||
<div class="q-pa-md row justify-center">
|
||||
<div style="width: 100%; max-width: 600px">
|
||||
<q-list padding bordered class="rounded-borders">
|
||||
<q-list
|
||||
padding
|
||||
bordered
|
||||
class="rounded-borders"
|
||||
>
|
||||
<q-expansion-item
|
||||
label="Principali"
|
||||
icon="fas fa-eye"
|
||||
@@ -2471,8 +2535,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CMyEditElem.ts">
|
||||
</script>
|
||||
<script lang="ts" src="./CMyEditElem.ts"></script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./CMyEditElem.scss";
|
||||
@import './CMyEditElem.scss';
|
||||
</style>
|
||||
|
||||
@@ -18,6 +18,7 @@ import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { LandingFooter } from '@src/components/LandingFooter'
|
||||
import { CMyActivities } from '@src/components/CMyActivities'
|
||||
import { CECommerce } from '@src/components/CECommerce'
|
||||
import { CSearchProduct } from '@src/components/CSearchProduct'
|
||||
import { CQRCode } from '@src/components/CQRCode'
|
||||
import { CAITools } from '@src/components/CAITools'
|
||||
import { CCatalogo } from '@src/components/CCatalogo'
|
||||
@@ -74,6 +75,7 @@ export default defineComponent({
|
||||
CVisuVideoPromoAndPDF, CECommerce, CCatalogo, CAITools,
|
||||
CMapComuni, CMapUsers, CMapGetCoordinates, CMapEditAddressByCoord,
|
||||
CDashGroup, CMovements, CGridOriz, CQRCode, CCatalogList,
|
||||
CSearchProduct,
|
||||
// , //CMapMarker,
|
||||
},
|
||||
emits: ['selElemClick'],
|
||||
|
||||
@@ -1,150 +1,69 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
v-if="myel"
|
||||
:class="
|
||||
(editOn ? ` clEditDiv` : ``) +
|
||||
`` +
|
||||
getClass() +
|
||||
(!myel.active ? ` clEditNotActive` : ``)
|
||||
"
|
||||
>
|
||||
<div v-if="myel" :class="(editOn ? ` clEditDiv` : ``) +
|
||||
`` +
|
||||
getClass() +
|
||||
(!myel.active ? ` clEditNotActive` : ``)
|
||||
">
|
||||
<div v-if="myel.type">
|
||||
<q-btn
|
||||
v-if="editOn"
|
||||
rounded
|
||||
dense
|
||||
icon="fas fa-pencil-alt"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<q-btn v-if="editOn" rounded dense icon="fas fa-pencil-alt" @click="clickOnElem">
|
||||
</q-btn>
|
||||
<div v-if="myel.type === shared_consts.ELEMTYPE.TEXT">
|
||||
<transition
|
||||
appear
|
||||
enter-active-class="animated fadeIn"
|
||||
leave-active-class="animated fadeOut"
|
||||
>
|
||||
<div
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
>
|
||||
<transition appear enter-active-class="animated fadeIn" leave-active-class="animated fadeOut">
|
||||
<div :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
">
|
||||
{{ myel.container }}
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
<div
|
||||
v-if="myel.type === shared_consts.ELEMTYPE.CARD"
|
||||
class="card-carousel-container"
|
||||
>
|
||||
<div v-if="myel.type === shared_consts.ELEMTYPE.CARD" class="card-carousel-container">
|
||||
<div v-if="editOn" class="elemEdit">Card</div>
|
||||
<q-carousel
|
||||
swipeable
|
||||
animated
|
||||
:autoplay="animarecard"
|
||||
v-model="slide"
|
||||
navigation
|
||||
control-text-color="white"
|
||||
ref="carousel"
|
||||
transition-next="slide-left"
|
||||
transition-prev="slide-right"
|
||||
:height="myel.heightcarousel"
|
||||
width="100%"
|
||||
control-type="flat"
|
||||
class="shadow-2 rounded-borders"
|
||||
:style="`background-color: ${myel.color} !important`"
|
||||
@mouseenter="animarecard = false"
|
||||
@mouseleave="animarecard = true"
|
||||
>
|
||||
<q-carousel swipeable animated :autoplay="animarecard" v-model="slide" navigation control-text-color="white"
|
||||
ref="carousel" transition-next="slide-left" transition-prev="slide-right" :height="myel.heightcarousel"
|
||||
width="100%" control-type="flat" class="shadow-2 rounded-borders"
|
||||
:style="`background-color: ${myel.color} !important`" @mouseenter="animarecard = false"
|
||||
@mouseleave="animarecard = true">
|
||||
<template v-slot:control>
|
||||
<q-carousel-control
|
||||
position="top-left"
|
||||
:offset="[-10, -10]"
|
||||
class="q-gutter-xs"
|
||||
style="opacity: 0.7"
|
||||
>
|
||||
<q-btn
|
||||
push
|
||||
round
|
||||
:color="$q.dark.isActive ? `black` : `white`"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||
icon="keyboard_arrow_left"
|
||||
@click="$refs.carousel.previous()"
|
||||
></q-btn>
|
||||
<q-carousel-control position="top-left" :offset="[-10, -10]" class="q-gutter-xs" style="opacity: 0.7">
|
||||
<q-btn push round :color="$q.dark.isActive ? `black` : `white`"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="keyboard_arrow_left"
|
||||
@click="$refs.carousel.previous()"></q-btn>
|
||||
</q-carousel-control>
|
||||
<q-carousel-control
|
||||
position="top-right"
|
||||
class="q-gutter-xs"
|
||||
:offset="[-10, -10]"
|
||||
style="opacity: 0.7"
|
||||
>
|
||||
<q-btn
|
||||
push
|
||||
round
|
||||
:color="$q.dark.isActive ? `black` : `white`"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||
icon="keyboard_arrow_right"
|
||||
@click="$refs.carousel.next()"
|
||||
></q-btn>
|
||||
<q-carousel-control position="top-right" class="q-gutter-xs" :offset="[-10, -10]" style="opacity: 0.7">
|
||||
<q-btn push round :color="$q.dark.isActive ? `black` : `white`"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`" icon="keyboard_arrow_right"
|
||||
@click="$refs.carousel.next()"></q-btn>
|
||||
</q-carousel-control>
|
||||
</template>
|
||||
<!-- Iteriamo sui gruppi di card invece che sulle singole card -->
|
||||
<q-carousel-slide
|
||||
v-for="(group, groupIndex) in cardGroups"
|
||||
:key="groupIndex"
|
||||
:name="groupIndex"
|
||||
>
|
||||
<q-carousel-slide v-for="(group, groupIndex) in cardGroups" :key="groupIndex" :name="groupIndex">
|
||||
<div class="row no-wrap justify-start items-center q-px-sm">
|
||||
<template v-for="(rec, cardIndex) in group" :key="cardIndex">
|
||||
<div :class="cardColumnClass">
|
||||
<q-card
|
||||
:class="
|
||||
`flex-card bordered ` +
|
||||
myel.class3 +
|
||||
(rec.link ? ' titolo_card' : '')
|
||||
"
|
||||
:style="
|
||||
rec.style +
|
||||
`; height: ${
|
||||
myel.heightimg || `300px`
|
||||
} !important; width: ${
|
||||
myel.widthimg || `300px`
|
||||
<q-card :class="`flex-card bordered ` +
|
||||
myel.class3 +
|
||||
(rec.link ? ' titolo_card' : '')
|
||||
" :style="rec.style +
|
||||
`; height: ${myel.heightimg || `300px`
|
||||
} !important; width: ${myel.widthimg || `300px`
|
||||
} !important;`
|
||||
"
|
||||
@click="rec.link ? tools.openUrl(rec.link) : undefined"
|
||||
>
|
||||
<div
|
||||
class="img-container"
|
||||
:style="`height: ${
|
||||
myel.heightimg.replace('px', '') * 0.7
|
||||
}px; overflow: hidden;`"
|
||||
>
|
||||
<q-img
|
||||
:class="
|
||||
tools.getClassAnim(myel.anim2) + ` ` + myel.class4
|
||||
"
|
||||
:src="tools.getImgFileByElem(myel, rec, path)"
|
||||
/>
|
||||
" @click="rec.link ? tools.openUrl(rec.link) : undefined">
|
||||
<div class="img-container" :style="`height: ${myel.heightimg.replace('px', '') * 0.7
|
||||
}px; overflow: hidden;`">
|
||||
<q-img :class="tools.getClassAnim(myel.anim2) + ` ` + myel.class4
|
||||
" :src="tools.getImgFileByElem(myel, rec, path)" />
|
||||
</div>
|
||||
<q-card-section class="q-card-section-small">
|
||||
<div :class="rec.size" :style="`color: ` + rec.color">
|
||||
{{ tools.getText(rec.alt) }}
|
||||
</div>
|
||||
<div
|
||||
:class="
|
||||
`q-mt-xs q-mb-xs ` + tools.getClassAnim(myel.anim)
|
||||
"
|
||||
v-html="rec.content"
|
||||
></div>
|
||||
<div
|
||||
v-if="rec.description"
|
||||
class="text-caption"
|
||||
:style="`color: ` + rec.colorsub"
|
||||
>
|
||||
<div :class="`q-mt-xs q-mb-xs ` + tools.getClassAnim(myel.anim)
|
||||
" v-html="rec.content"></div>
|
||||
<div v-if="rec.description" class="text-caption" :style="`color: ` + rec.colorsub">
|
||||
{{ rec.description }}
|
||||
</div>
|
||||
</q-card-section>
|
||||
@@ -157,268 +76,156 @@
|
||||
</div>
|
||||
|
||||
<div v-if="myel.type === shared_consts.ELEMTYPE.MARGINI">
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
:style="`margin: ` + myel.size"
|
||||
>
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem"
|
||||
:style="`margin: ` + myel.size">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.TITLE">
|
||||
<div>
|
||||
<div
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<CTitle
|
||||
:imgbackground="myel.imgback"
|
||||
:headtitle="myel.title"
|
||||
:sizes="myel.size"
|
||||
:styleadd="myel.styleadd"
|
||||
>
|
||||
<div :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
" @click="clickOnElem">
|
||||
<CTitle :imgbackground="myel.imgback" :headtitle="myel.title" :sizes="myel.size"
|
||||
:styleadd="myel.styleadd">
|
||||
</CTitle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.IMGTITLE">
|
||||
<div>
|
||||
<div
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<CImgTitle
|
||||
v-if="myel.image"
|
||||
:src="tools.getImgFileByElem(myel, undefined, path)"
|
||||
:title="myel.container"
|
||||
:legendinside="myel.container2"
|
||||
>
|
||||
<div :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
" @click="clickOnElem">
|
||||
<CImgTitle v-if="myel.image" :src="tools.getImgFileByElem(myel, undefined, path)" :title="myel.container"
|
||||
:legendinside="myel.container2">
|
||||
</CImgTitle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.IMGPOSTER">
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<CImgPoster
|
||||
v-if="myel.image"
|
||||
:src="tools.getImgFileByElem(myel, undefined, path)"
|
||||
:title="myel.container"
|
||||
:myheight="myel.heightimg"
|
||||
:vertalign="myel.vertalign"
|
||||
:speed="myel.speed"
|
||||
:elemsText="myel.elemsText"
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem">
|
||||
<CImgPoster v-if="myel.image" :src="tools.getImgFileByElem(myel, undefined, path)" :title="myel.container"
|
||||
:myheight="myel.heightimg" :vertalign="myel.vertalign" :speed="myel.speed" :elemsText="myel.elemsText"
|
||||
:logo="tools.getImgFileByFilename(myel, myel.img)"
|
||||
:logoheight="myel.height ? myel.height.toString() : '100'"
|
||||
:logowidth="myel.width ? myel.width.toString() : '100'"
|
||||
:fit="myel.fit"
|
||||
:anim="myel.anim"
|
||||
>
|
||||
:logowidth="myel.width ? myel.width.toString() : '100'" :fit="myel.fit" :anim="myel.anim">
|
||||
</CImgPoster>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.HTML">
|
||||
<div>
|
||||
<div
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
@click="clickOnElem"
|
||||
v-html="myel.containerHtml"
|
||||
></div>
|
||||
<div :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
" @click="clickOnElem" v-html="myel.containerHtml"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.QRCODE">
|
||||
<div v-if="editOn" class="elemEdit">QRCODE:</div>
|
||||
<CQRCode
|
||||
:read="myel.parambool"
|
||||
:link="myel.container"
|
||||
:textlink="myel.container2"
|
||||
:imglogo="tools.getImgFileByElem(myel, undefined, path)"
|
||||
></CQRCode>
|
||||
<CQRCode :read="myel.parambool" :link="myel.container" :textlink="myel.container2"
|
||||
:imglogo="tools.getImgFileByElem(myel, undefined, path)"></CQRCode>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.IMAGE">
|
||||
<div class="text-center">
|
||||
<div
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<q-img
|
||||
:src="tools.getImgFileByElem(myel, undefined, path)"
|
||||
:fit="myel.fit"
|
||||
class="img"
|
||||
<div :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
" @click="clickOnElem">
|
||||
<q-img :src="tools.getImgFileByElem(myel, undefined, path)" :fit="myel.fit" class="img"
|
||||
:width="myel.widthimg ? myel.widthimg : undefined"
|
||||
:height="myel.heightimg ? myel.heightimg : undefined"
|
||||
></q-img>
|
||||
:height="myel.heightimg ? myel.heightimg : undefined"></q-img>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.IMAGEUPLOAD">
|
||||
<div class="text-center">
|
||||
<div
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<q-img
|
||||
:src="tools.getImgFileByElem(myel, undefined, path)"
|
||||
:fit="myel.fit"
|
||||
class="img"
|
||||
<div :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
" @click="clickOnElem">
|
||||
<q-img :src="tools.getImgFileByElem(myel, undefined, path)" :fit="myel.fit" class="img"
|
||||
:width="myel.widthimg ? myel.widthimg : undefined"
|
||||
:height="myel.heightimg ? myel.heightimg : undefined"
|
||||
></q-img>
|
||||
:height="myel.heightimg ? myel.heightimg : undefined"></q-img>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.VIDEO">
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<q-video
|
||||
v-if="myel && !!myel.container"
|
||||
:src="myel.container"
|
||||
:ratio="myel.ratio"
|
||||
>
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem">
|
||||
<q-video v-if="myel && !!myel.container" :src="myel.container" :ratio="myel.ratio">
|
||||
</q-video>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.PAGE">
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem">
|
||||
<div v-if="editOn" style="color: gray">
|
||||
Pagina: {{ myel.container }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.PAGEINTRO">
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<CMyPageIntro
|
||||
:mypath="myel.container"
|
||||
:maxheightimg="myel.heightimg"
|
||||
:maxwidthimg="myel.widthimg"
|
||||
:link="myel.link"
|
||||
></CMyPageIntro>
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem">
|
||||
<CMyPageIntro :mypath="myel.container" :maxheightimg="myel.heightimg" :maxwidthimg="myel.widthimg"
|
||||
:link="myel.link"></CMyPageIntro>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_IDISCIPLINE"
|
||||
>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_IDISCIPLINE">
|
||||
<CCardCarousel :myarr="getArrDisciplines()"> </CCardCarousel>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.OPENSTREETMAP">
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem">
|
||||
<div v-if="myel.container">
|
||||
<!-- Da Fare -->
|
||||
<COpenStreetMap
|
||||
:imgmap="myel.container"
|
||||
:urlmap="myel.container2"
|
||||
:title="myel.container3"
|
||||
:coordinates="myel.containerHtml"
|
||||
:coord_big="myel.link"
|
||||
>
|
||||
<COpenStreetMap :imgmap="myel.container" :urlmap="myel.container2" :title="myel.container3"
|
||||
:coordinates="myel.containerHtml" :coord_big="myel.link">
|
||||
</COpenStreetMap>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CAROUSEL_IMGS">
|
||||
<section
|
||||
:class="
|
||||
($q.dark.isActive
|
||||
? `bg-black text-white`
|
||||
: `bg-white text-grey-10`) + ` padding_gallery text-center`
|
||||
"
|
||||
>
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<q-carousel
|
||||
swipeable
|
||||
animated
|
||||
:autoplay="myel.container2 ? myel.container2 * 1000 : 8000"
|
||||
v-model="slide2"
|
||||
arrows
|
||||
:fit="myel.fit"
|
||||
:thumbnails="myel.parambool2"
|
||||
infinite
|
||||
:height="
|
||||
myel.heightimg
|
||||
? myel.heightimg.toString()
|
||||
: tools.getheightgallery()
|
||||
"
|
||||
>
|
||||
<q-carousel-slide
|
||||
v-for="(rec, index) in myel.list"
|
||||
:key="index"
|
||||
:name="index"
|
||||
:img-src="
|
||||
getsrcbyimg(
|
||||
tools.getDirUpload() +
|
||||
`pages/` +
|
||||
path +
|
||||
`/` +
|
||||
rec.imagefile
|
||||
)
|
||||
"
|
||||
:alt="rec.alt"
|
||||
class="carousel_slide"
|
||||
>
|
||||
<div
|
||||
v-if="myel.parambool"
|
||||
class="absolute-bottom custom-caption"
|
||||
style="margin-bottom: 70px"
|
||||
>
|
||||
<section :class="($q.dark.isActive
|
||||
? `bg-black text-white`
|
||||
: `bg-white text-grey-10`) + ` padding_gallery text-center`
|
||||
">
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem">
|
||||
<q-carousel swipeable animated :autoplay="myel.container2 ? myel.container2 * 1000 : 8000"
|
||||
v-model="slide2" arrows :fit="myel.fit" :thumbnails="myel.parambool2" infinite :height="myel.heightimg
|
||||
? myel.heightimg.toString()
|
||||
: tools.getheightgallery()
|
||||
">
|
||||
<q-carousel-slide v-for="(rec, index) in myel.list" :key="index" :name="index" :img-src="getsrcbyimg(
|
||||
tools.getDirUpload() +
|
||||
`pages/` +
|
||||
path +
|
||||
`/` +
|
||||
rec.imagefile
|
||||
)
|
||||
" :alt="rec.alt" class="carousel_slide">
|
||||
<div v-if="myel.parambool" class="absolute-bottom custom-caption" style="margin-bottom: 70px">
|
||||
<div class="text-h5">
|
||||
<span class="text-h6 text-grey-1 shadow-max"
|
||||
>{{ index + 1 }}.
|
||||
<span class="text-h6 text-grey-1 shadow-max">{{ index + 1 }}.
|
||||
</span>
|
||||
<span v-if="rec.alt" class="text-h6 text-grey-2 shadow">{{
|
||||
rec.alt
|
||||
}}</span>
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="text-subtitle1" v-if="rec.description">
|
||||
<span class="text-grey-4 shadow">{{
|
||||
rec.description
|
||||
}}</span>
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
@@ -430,56 +237,30 @@
|
||||
<section>
|
||||
<div class="landing">
|
||||
<div class="landing__hero maxwidth1200 text-white">
|
||||
<q-carousel
|
||||
animated
|
||||
:autoplay="animare"
|
||||
swipeable
|
||||
infinite
|
||||
navigation
|
||||
transition-next="slide-left"
|
||||
transition-prev="slide-right"
|
||||
v-model="slide"
|
||||
:height="getheightgallery()"
|
||||
width="100%"
|
||||
>
|
||||
<q-carousel-slide
|
||||
v-for="(myrec, ind) in myel.list"
|
||||
:key="ind"
|
||||
:name="ind"
|
||||
:img-src="getsrcbyimg(`/images/` + myrec.imagefile)"
|
||||
>
|
||||
<q-carousel animated :autoplay="animare" swipeable infinite navigation transition-next="slide-left"
|
||||
transition-prev="slide-right" v-model="slide" :height="getheightgallery()" width="100%">
|
||||
<q-carousel-slide v-for="(myrec, ind) in myel.list" :key="ind" :name="ind"
|
||||
:img-src="getsrcbyimg(`/images/` + myrec.imagefile)">
|
||||
<div class="landing__header"></div>
|
||||
<div
|
||||
class="landing__hero-content row justify-center q-gutter-xs clgutter"
|
||||
>
|
||||
<div class="landing__hero-content row justify-center q-gutter-xs clgutter">
|
||||
<div class="row"> </div>
|
||||
<div class="flex justify-end">
|
||||
<div class="q-gutter-xs testo-banda clgutter">
|
||||
<h1 class="text-h1 shadow-max">
|
||||
{{ tools.getappname() }}
|
||||
</h1>
|
||||
<div
|
||||
class="text-subtitle1 shadow text-italic q-pl-sm"
|
||||
>
|
||||
<div class="text-subtitle1 shadow text-italic q-pl-sm">
|
||||
{{ myel.container }}
|
||||
</div>
|
||||
<div
|
||||
class="text-subtitle1 shadow-max big text-italic q-pl-sm"
|
||||
>
|
||||
<div class="text-subtitle1 shadow-max big text-italic q-pl-sm">
|
||||
{{ myel.container2 }}
|
||||
</div>
|
||||
<div
|
||||
class="text-subtitle2 shadow text-italic q-pl-sm"
|
||||
>
|
||||
<div class="text-subtitle2 shadow text-italic q-pl-sm">
|
||||
{{ myel.container3 }}
|
||||
</div>
|
||||
<div>
|
||||
<br /><br />
|
||||
<div
|
||||
v-if="!tools.isLogged()"
|
||||
style="margin: 5px; padding: 5px"
|
||||
class="home"
|
||||
>
|
||||
<div v-if="!tools.isLogged()" style="margin: 5px; padding: 5px" class="home">
|
||||
<br /><br />
|
||||
</div>
|
||||
</div>
|
||||
@@ -522,23 +303,10 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BUTTON">
|
||||
<div v-if="editOn" class="elemEdit"></div>
|
||||
<div
|
||||
:class="myel.class + (editOn ? ` clEdit` : ``) + getClass()"
|
||||
@click="clickOnElem"
|
||||
>
|
||||
<q-btn
|
||||
class="text-center"
|
||||
v-if="myel.container"
|
||||
type="a"
|
||||
rounded
|
||||
:label="myel.container"
|
||||
size=""
|
||||
:color="myel.color"
|
||||
:text-color="myel.containerHtml"
|
||||
:icon="myel.container2"
|
||||
:href="myel.link"
|
||||
:target="myel.container3"
|
||||
>
|
||||
<div :class="myel.class + (editOn ? ` clEdit` : ``) + getClass()" @click="clickOnElem">
|
||||
<q-btn class="text-center" v-if="myel.container" type="a" rounded :label="myel.container" size=""
|
||||
:color="myel.color" :text-color="myel.containerHtml" :icon="myel.container2" :href="myel.link"
|
||||
:target="myel.container3">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
@@ -560,58 +328,42 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.GRID_ORIZ">
|
||||
<div v-if="editOn" class="elemEdit">Visualizzatore Tabelle</div>
|
||||
<CGridOriz
|
||||
:table="myel.container"
|
||||
:tipovisu="myel.number"
|
||||
:prop_search="myel.parambool"
|
||||
:finder="myel.parambool2"
|
||||
:showMap="myel.parambool3"
|
||||
:heightcarousel="myel.heightcarousel"
|
||||
:prop_modif="myel.parambool4"
|
||||
></CGridOriz>
|
||||
<CGridOriz :table="myel.container" :tipovisu="myel.number" :prop_search="myel.parambool"
|
||||
:finder="myel.parambool2" :showMap="myel.parambool3" :heightcarousel="myel.heightcarousel"
|
||||
:prop_modif="myel.parambool4"></CGridOriz>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.SEARCHPRODUCT">
|
||||
<div v-if="editOn" class="elemEdit">Cerca Prodotto</div>
|
||||
<CSearchProduct v-model="myel.catalogo">
|
||||
</CSearchProduct>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGLIST">
|
||||
<div v-if="editOn" class="elemEdit">Cataloghi</div>
|
||||
<q-tabs
|
||||
v-if="tools.isEditor() || tools.isGrafico()"
|
||||
v-model="tabcatalogo"
|
||||
dense
|
||||
class="bg-green text-white"
|
||||
>
|
||||
<q-tabs v-if="tools.isEditor() || tools.isGrafico()" v-model="tabcatalogo" dense class="bg-green text-white">
|
||||
<q-tab name="griglia" icon="fas fa-eye" label="Griglia"> </q-tab>
|
||||
<q-tab name="lista" icon="fas fa-list" label="Lista"> </q-tab>
|
||||
<q-tab name="cerca" icon="fas fa-book" label="Cerca"> </q-tab>
|
||||
<q-tab name="tutorial" icon="fas fa-info" label="Tutorial"> </q-tab>
|
||||
</q-tabs>
|
||||
<q-tab-panels v-model="tabcatalogo" animated keep-alive>
|
||||
<q-tab-panel name="lista">
|
||||
<CGridOriz
|
||||
table="catalogs"
|
||||
:tipovisu="costanti.VISUTABLE_TABLELIST"
|
||||
:prop_search="true"
|
||||
:finder="true"
|
||||
:showMap="false"
|
||||
:prop_modif="tools.isAdmin()"
|
||||
></CGridOriz>
|
||||
<CGridOriz table="catalogs" :tipovisu="costanti.VISUTABLE_TABLELIST" :prop_search="true" :finder="true"
|
||||
:showMap="false" :prop_modif="tools.isAdmin()"></CGridOriz>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="cerca">
|
||||
<CSearchProduct v-model="myel.catalogo">
|
||||
</CSearchProduct>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="griglia">
|
||||
<CCatalogList
|
||||
:prop_search="myel.parambool"
|
||||
:finder="myel.parambool2"
|
||||
:heightcarousel="myel.heightcarousel"
|
||||
:heightimg="myel.heightimg"
|
||||
:widthimg="myel.widthimg"
|
||||
:heightcard="myel.heightcard"
|
||||
:widthcard="myel.widthcard"
|
||||
></CCatalogList>
|
||||
<CCatalogList :prop_search="myel.parambool" :finder="myel.parambool2"
|
||||
:heightcarousel="myel.heightcarousel" :heightimg="myel.heightimg" :widthimg="myel.widthimg"
|
||||
:heightcard="myel.heightcard" :widthcard="myel.widthcard">
|
||||
</CCatalogList>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="tutorial">
|
||||
<div class="q-pa-md q-ma-sm text-center">
|
||||
<q-btn
|
||||
rounded
|
||||
label="Apri Tutorial"
|
||||
color="primary"
|
||||
@click="naviga('/tutorial')"
|
||||
></q-btn>
|
||||
<q-btn rounded label="Apri Tutorial" color="primary" @click="naviga('/tutorial')"></q-btn>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
@@ -624,61 +376,34 @@
|
||||
<div v-if="editOn" class="elemEdit">CCheckIfIsLogged</div>
|
||||
<CCheckIfIsLogged :showalways="myel.container"></CCheckIfIsLogged>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="myel.type === shared_consts.ELEMTYPE.VISUVIDEOPROMOANDPDF"
|
||||
>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.VISUVIDEOPROMOANDPDF">
|
||||
<div v-if="editOn" class="elemEdit">Visu Video Promo and PDF</div>
|
||||
<CVisuVideoPromoAndPDF
|
||||
:showalways="myel.container"
|
||||
></CVisuVideoPromoAndPDF>
|
||||
<CVisuVideoPromoAndPDF :showalways="myel.container"></CVisuVideoPromoAndPDF>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.INFO_VERSION">
|
||||
<div>Versione: {{ tools.getvers() }}</div>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BOTT_CONDIVIDI">
|
||||
<div class="row justify-evenly items-center q-pa-sm q-ma-sm">
|
||||
<q-btn
|
||||
icon="fas fa-share"
|
||||
text-color="blue"
|
||||
type="a"
|
||||
size="md"
|
||||
color="yellow"
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
rounded
|
||||
:label="$t('reg.link_reg_and_msg')"
|
||||
@click="clickshare"
|
||||
>
|
||||
<q-btn icon="fas fa-share" text-color="blue" type="a" size="md" color="yellow" :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
" rounded :label="$t('reg.link_reg_and_msg')" @click="clickshare">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="
|
||||
myel.type === shared_consts.ELEMTYPE.BOTT_CHAT_TERRITORIALE
|
||||
"
|
||||
>
|
||||
<div v-else-if="
|
||||
myel.type === shared_consts.ELEMTYPE.BOTT_CHAT_TERRITORIALE
|
||||
">
|
||||
<div v-if="editOn" class="elemEdit">Bottone Chat Territoriale</div>
|
||||
<div class="row justify-evenly items-center">
|
||||
<q-btn
|
||||
v-if="tools.getLinkChatTerritoriale()"
|
||||
icon="fab fa-telegram"
|
||||
color="blue"
|
||||
type="a"
|
||||
size="md"
|
||||
rounded
|
||||
:label="
|
||||
$t('dashboard.link_gruppo_telegram', {
|
||||
prov: tools.getProvincia(),
|
||||
})
|
||||
"
|
||||
:href="tools.getLinkChatTerritoriale()"
|
||||
target="__blank"
|
||||
>
|
||||
<q-btn v-if="tools.getLinkChatTerritoriale()" icon="fab fa-telegram" color="blue" type="a" size="md" rounded
|
||||
:label="$t('dashboard.link_gruppo_telegram', {
|
||||
prov: tools.getProvincia(),
|
||||
})
|
||||
" :href="tools.getLinkChatTerritoriale()" target="__blank">
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
@@ -687,10 +412,7 @@
|
||||
Msg di Controllo Verifica Email
|
||||
</div>
|
||||
<div class="q-pa-xs q-gutter-md">
|
||||
<div
|
||||
v-if="tools.isLogged() && !tools.isVerified()"
|
||||
class="text-verified"
|
||||
>
|
||||
<div v-if="tools.isLogged() && !tools.isVerified()" class="text-verified">
|
||||
{{ $t("components.authentication.email_verification.link_sent") }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -709,11 +431,7 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CATALOGO">
|
||||
<div v-if="editOn" class="elemEdit">PRODOTTI CATALOGO:</div>
|
||||
<CCatalogo
|
||||
v-model="myel.catalogo"
|
||||
:idPage="idPage"
|
||||
@updateCatalogo="updateCatalogoEmit()"
|
||||
/>
|
||||
<CCatalogo v-model="myel.catalogo" :idPage="idPage" @updateCatalogo="updateCatalogoEmit(myel.catalogo)" />
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPA">
|
||||
<div v-if="editOn" class="elemEdit">MAPPA:</div>
|
||||
@@ -725,20 +443,13 @@
|
||||
<div v-if="editOn" class="elemEdit">MAPPA UTENTI:</div>
|
||||
<CMapUsers></CMapUsers>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPAGETCOORDINATE"
|
||||
>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPAGETCOORDINATE">
|
||||
<div v-if="editOn" class="elemEdit">MAPPA COORDINATE:</div>
|
||||
<CMapGetCoordinates></CMapGetCoordinates>
|
||||
</div>
|
||||
<div
|
||||
v-else-if="myel.type === shared_consts.ELEMTYPE.EDITADDRESSBYCOORD"
|
||||
>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.EDITADDRESSBYCOORD">
|
||||
<div v-if="editOn" class="elemEdit">EDIT ADDRESS BY COORD:</div>
|
||||
<CMapEditAddressByCoord
|
||||
:editaddress="true"
|
||||
v-model:model-value="coordaddr"
|
||||
></CMapEditAddressByCoord>
|
||||
<CMapEditAddressByCoord :editaddress="true" v-model:model-value="coordaddr"></CMapEditAddressByCoord>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.MAPPACOMUNI">
|
||||
<div v-if="editOn" class="elemEdit">MAPPA COMUNI:</div>
|
||||
@@ -754,98 +465,53 @@
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CHECKTESTENV">
|
||||
<div v-if="editOn" class="elemEdit">Check Sito di Test</div>
|
||||
<q-banner
|
||||
v-if="tools.isTest() && false"
|
||||
rounded
|
||||
dense
|
||||
class="bg-negative text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<q-banner v-if="tools.isTest() && false" rounded dense class="bg-negative text-white" color="primary q-title"
|
||||
style="text-align: center">
|
||||
<template v-slot:avatar>
|
||||
<q-icon
|
||||
name="fas fa-exclamation-triangle"
|
||||
color="yellow"
|
||||
size="xs"
|
||||
/>
|
||||
<q-icon name="fas fa-exclamation-triangle" color="yellow" size="xs" />
|
||||
</template>
|
||||
<span class="mybanner"> TEST !</span>
|
||||
</q-banner>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.CHECKNEWVERSION">
|
||||
<div v-if="editOn" class="elemEdit">Controllo Nuova Versione</div>
|
||||
<q-banner
|
||||
v-if="globalStore.isNewVersionAvailable"
|
||||
rounded
|
||||
dense
|
||||
class="bg-green text-white"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<q-banner v-if="globalStore.isNewVersionAvailable" rounded dense class="bg-green text-white"
|
||||
color="primary q-title" style="text-align: center">
|
||||
<template v-slot:avatar>
|
||||
<q-icon
|
||||
name="fas fa-exclamation-triangle"
|
||||
color="yellow"
|
||||
size="xs"
|
||||
/>
|
||||
<q-icon name="fas fa-exclamation-triangle" color="yellow" size="xs" />
|
||||
</template>
|
||||
<div v-if="$q.platform.is.ios">
|
||||
<span class="mybanner"
|
||||
>Chiudere e Riaprire la App, per completare
|
||||
l'Aggiornamento</span
|
||||
>
|
||||
<span class="mybanner">Chiudere e Riaprire la App, per completare
|
||||
l'Aggiornamento</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<span class="mybanner"
|
||||
>Aggiornamento APP in corso ... Se dopo 1 minuto non dovesse
|
||||
<span class="mybanner">Aggiornamento APP in corso ... Se dopo 1 minuto non dovesse
|
||||
scomparire questo messaggio, chiudere e riaprire la
|
||||
pagina.</span
|
||||
>
|
||||
pagina.</span>
|
||||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BTN_REG">
|
||||
<q-btn
|
||||
rounded
|
||||
size="md"
|
||||
color="primary"
|
||||
:to="`/registrati/${tools.getInvitante()}`"
|
||||
:label="$t('reg.submit')"
|
||||
>
|
||||
<q-btn rounded size="md" color="primary" :to="`/registrati/${tools.getInvitante()}`"
|
||||
:label="$t('reg.submit')">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BTN_REG_BYBOT">
|
||||
<q-btn
|
||||
type="a"
|
||||
rounded
|
||||
size="lg"
|
||||
color="primary"
|
||||
href="/bot"
|
||||
:label="$t('reg.submit')"
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
>
|
||||
<q-btn type="a" rounded size="lg" color="primary" href="/bot" :label="$t('reg.submit')" :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
">
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-else-if="myel.type === shared_consts.ELEMTYPE.BTN_LOGIN">
|
||||
<q-btn
|
||||
:class="
|
||||
myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
"
|
||||
rounded
|
||||
size="lg"
|
||||
color="primary"
|
||||
@click="PagLogin"
|
||||
>
|
||||
<q-btn :class="myel.class +
|
||||
(editOn ? ` clEdit` : ``) +
|
||||
getClass() +
|
||||
` ` +
|
||||
tools.getClassAnim(myel.anim)
|
||||
" rounded size="lg" color="primary" @click="PagLogin">
|
||||
{{ $t("login.enter") }}
|
||||
</q-btn>
|
||||
</div>
|
||||
@@ -858,18 +524,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<q-dialog
|
||||
v-model="visushare"
|
||||
transition-show="slide-up"
|
||||
transition-hide="slide-down"
|
||||
:maximized="$q.screen.lt.sm"
|
||||
>
|
||||
<CShareSocial
|
||||
v-if="social && social.description"
|
||||
:description="social.description"
|
||||
:title="social.title"
|
||||
:url="social.url"
|
||||
>
|
||||
<q-dialog v-model="visushare" transition-show="slide-up" transition-hide="slide-down" :maximized="$q.screen.lt.sm">
|
||||
<CShareSocial v-if="social && social.description" :description="social.description" :title="social.title"
|
||||
:url="social.url">
|
||||
</CShareSocial>
|
||||
</q-dialog>
|
||||
</div>
|
||||
|
||||
@@ -168,9 +168,13 @@ export default defineComponent({
|
||||
function selElemClick(myelem: IMyElem) {
|
||||
console.log('mypageelem selElemClick', myelem)
|
||||
|
||||
selElem.value = {}
|
||||
selElem.value = myelem
|
||||
visuEditor.value = !!myelem
|
||||
try {
|
||||
selElem.value = {}
|
||||
selElem.value = myelem
|
||||
visuEditor.value = !!myelem
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else-if="pickup">
|
||||
|
||||
<q-select
|
||||
v-if="pickup"
|
||||
:model-value="myvalue"
|
||||
@@ -100,8 +99,9 @@
|
||||
stack-label
|
||||
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||
@filter="filterFn"
|
||||
@clear="myvalue = ''"
|
||||
v-bind="$attrs"
|
||||
|
||||
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon
|
||||
@@ -130,6 +130,7 @@
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
|
||||
</q-select>
|
||||
</div>
|
||||
<div v-else-if="multiple">
|
||||
|
||||
@@ -11,7 +11,8 @@ export default defineComponent({
|
||||
props: {
|
||||
modelValue: {
|
||||
type: [String, Number],
|
||||
required: true,
|
||||
required: false,
|
||||
default: '0',
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
|
||||
126
src/components/CSearchProduct/CSearchProduct.scss
Executable file
126
src/components/CSearchProduct/CSearchProduct.scss
Executable file
@@ -0,0 +1,126 @@
|
||||
$heightBtn: 100%;
|
||||
$colore_titolo_libro: rgb(210, 12, 12);
|
||||
|
||||
body {
|
||||
line-height: 1.2 !important;
|
||||
}
|
||||
|
||||
.card .product-image {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.prod_trov {
|
||||
font-style: italic;
|
||||
color: grey;
|
||||
}
|
||||
|
||||
.fixed-group {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
/* Customize the background color as needed */
|
||||
z-index: 1000;
|
||||
/* Adjust the z-index to ensure it's above other elements */
|
||||
transition: all 1s ease;
|
||||
}
|
||||
|
||||
|
||||
// Underline like a href
|
||||
.category {
|
||||
color: darkblue;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 19px;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.category_sel {
|
||||
color: white !important;
|
||||
background: #5c8ef4 !important;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.category-title{
|
||||
font-weight: bold;
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
margin-top: 0.5rem;
|
||||
color: black;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.fixed-width {
|
||||
width: var(--width) !important; /* Usa una variabile CSS */
|
||||
}
|
||||
.fixed-height {
|
||||
height: var(--height) !important; /* Usa una variabile CSS */
|
||||
}
|
||||
|
||||
.break {
|
||||
flex-basis: 100%;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.book-title {
|
||||
font-family: 'DINPro-CondensedBold', sans-serif;
|
||||
color: $colore_titolo_libro;
|
||||
text-transform: uppercase;
|
||||
margin-top: calc(5 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
line-height: 100%;
|
||||
}
|
||||
|
||||
.book-author {
|
||||
font-family: 'DIN-Pro-Condensed-Regular', sans-serif;
|
||||
font-size: calc(18 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-descr {
|
||||
font-family: 'DIN-Pro-Condensed-Bold-Italic', sans-serif;
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-details {
|
||||
font-family: 'DIN-Pro-Condensed-Regular', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(13 * var(--scalecatalog) * 1px);
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
|
||||
.book-descr-estesa {
|
||||
font-family: 'AGaramondPro-Regular', sans-serif;
|
||||
font-size: calc(15 * var(--scalecatalog) * 1px);
|
||||
text-align: justify;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.book-link{
|
||||
font-style: italic;
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-novita {
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
|
||||
.book-text-up {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
.book-text-down {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
192
src/components/CSearchProduct/CSearchProduct.ts
Executable file
192
src/components/CSearchProduct/CSearchProduct.ts
Executable file
@@ -0,0 +1,192 @@
|
||||
import type { PropType } from 'vue';
|
||||
import { defineComponent, onMounted, ref, watch, computed, onBeforeUnmount, nextTick } from 'vue'
|
||||
import { tools } from '@tools'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useProducts } from '@store/Products'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { costanti } from '@costanti'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { CProductCard } from '@src/components/CProductCard'
|
||||
|
||||
import { CMySelect } from '@src/components/CMySelect'
|
||||
import { CContainerCatalogoCard } from '@src/components/CContainerCatalogoCard'
|
||||
import { CSelectUserActive } from '@src/components/CSelectUserActive'
|
||||
import type {
|
||||
IOptCatalogo, IDimensioni, IFilterCatalogo,
|
||||
IMyScheda, IProdView, IProduct, ISchedaSingola, ISearchList, ICatalog, IImg
|
||||
} from 'model';
|
||||
|
||||
|
||||
import { fieldsTable } from '@store/Modules/fieldsTable'
|
||||
import { useCatalogStore } from '@src/store/CatalogStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CSearchProduct',
|
||||
components: { CContainerCatalogoCard, CProductCard, CSelectUserActive, CMySelect },
|
||||
emits: [],
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Object as PropType<IOptCatalogo>,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
const productStore = useProducts()
|
||||
const router = useRouter()
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const search = ref('')
|
||||
|
||||
const loadpage = ref(false)
|
||||
const refreshpage = ref(false)
|
||||
const show_hide = ref(false)
|
||||
|
||||
const mycolumns = ref([])
|
||||
|
||||
const idPage = ref('')
|
||||
const selauthor = ref('')
|
||||
|
||||
const searchList = ref(<any[]>[])
|
||||
|
||||
const optcatalogo = ref<IOptCatalogo | null>(null);
|
||||
|
||||
const myproduct = ref(<IProduct>{})
|
||||
|
||||
const labelcombo = computed(() => (item: any) => {
|
||||
let lab = item.label
|
||||
if (item.showcount)
|
||||
lab += ' (' + valoriopt.value(item, false, false).length + ')'
|
||||
return lab
|
||||
})
|
||||
|
||||
const listaRicerca = computed(() => {
|
||||
const mylist = searchList.value.find((rec: any) => rec.table === 'products' && rec.key === 'titolo')
|
||||
|
||||
return mylist
|
||||
})
|
||||
|
||||
|
||||
const searchText = computed(() => {
|
||||
const lista = listaRicerca.value
|
||||
return lista && lista.value && tools.existProp(lista.value, 'name') ? lista.value.name : ''
|
||||
})
|
||||
|
||||
const valoriopt = computed(() => (item: any, addall: boolean, addnone: boolean = false) => {
|
||||
// console.log('valoriopt', item.table)
|
||||
return globalStore.getTableJoinByName(item.table, addall, addnone, item.filter)
|
||||
})
|
||||
|
||||
watch(() => searchText.value, (newval, oldval) => {
|
||||
console.log('searchText=', searchText.value)
|
||||
const id = getSearchId()
|
||||
loadProduct(id)
|
||||
})
|
||||
|
||||
async function loadProduct(id: string) {
|
||||
// Carica il prodotto
|
||||
|
||||
if (id) {
|
||||
myproduct.value = await productStore.loadProductById(id)
|
||||
} else {
|
||||
myproduct.value = null
|
||||
}
|
||||
|
||||
if (myproduct.value) {
|
||||
tools.setCookie(tools.COOK_LAST_PROD_SEARCH, myproduct.value._id.toString())
|
||||
} else {
|
||||
tools.setCookie(tools.COOK_LAST_PROD_SEARCH, '')
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function resetSearch() {
|
||||
const mialista = listaRicerca.value
|
||||
if (mialista && mialista.value && tools.existProp(mialista.value, 'name')) {
|
||||
mialista.value = null
|
||||
}
|
||||
search.value = ''
|
||||
}
|
||||
|
||||
|
||||
function getSearchId(): string {
|
||||
const lista = listaRicerca.value
|
||||
return lista && lista.value && lista.value._id ? lista.value._id : ''
|
||||
}
|
||||
|
||||
async function mounted() {
|
||||
// console.log('mounted Catalogo')
|
||||
|
||||
optcatalogo.value = props.modelValue
|
||||
loadpage.value = false
|
||||
|
||||
const id = tools.getCookie(tools.COOK_LAST_PROD_SEARCH, '')
|
||||
|
||||
if (id) {
|
||||
await loadProduct(id)
|
||||
}
|
||||
|
||||
mycolumns.value = fieldsTable.getArrColsByTable('products')
|
||||
|
||||
searchList.value = [
|
||||
{
|
||||
visible: true,
|
||||
label: 'Ricerca',
|
||||
table: 'products',
|
||||
key: 'titolo',
|
||||
type: costanti.FieldType.select_by_server,
|
||||
value: myproduct.value?.productInfo?.name,
|
||||
// addall: true,
|
||||
arrvalue: [],
|
||||
useinput: true,
|
||||
filter: null,
|
||||
tablesel: 'products',
|
||||
},
|
||||
]
|
||||
|
||||
// Inizializza
|
||||
loadpage.value = true
|
||||
|
||||
}
|
||||
|
||||
|
||||
function naviga(path: string) {
|
||||
router.push(path)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
userStore,
|
||||
costanti,
|
||||
tools,
|
||||
toolsext,
|
||||
search,
|
||||
shared_consts,
|
||||
productStore,
|
||||
t,
|
||||
loadpage,
|
||||
refreshpage,
|
||||
show_hide,
|
||||
searchList,
|
||||
fieldsTable,
|
||||
mycolumns,
|
||||
naviga,
|
||||
myproduct,
|
||||
optcatalogo,
|
||||
idPage,
|
||||
selauthor,
|
||||
valoriopt,
|
||||
labelcombo,
|
||||
searchText,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
72
src/components/CSearchProduct/CSearchProduct.vue
Executable file
72
src/components/CSearchProduct/CSearchProduct.vue
Executable file
@@ -0,0 +1,72 @@
|
||||
<template>
|
||||
<div class="q-ma-sm">
|
||||
<div class="text-center">
|
||||
<q-spinner
|
||||
v-if="!loadpage"
|
||||
color="primary"
|
||||
size="3em"
|
||||
:thickness="2"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="loadpage"
|
||||
class="panel"
|
||||
>
|
||||
<div class="text-h6 text-bold text-blue text-center">Cerca un Titolo:</div>
|
||||
<div
|
||||
class="col"
|
||||
v-for="(item, index) in searchList"
|
||||
:key="index"
|
||||
>
|
||||
<CMySelect
|
||||
v-if="item.type === costanti.FieldType.select || item.type === costanti.FieldType.select_by_server"
|
||||
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
|
||||
:label="item.value && item.value._id > 0 ? undefined : labelcombo(item)"
|
||||
v-model:value="item.value"
|
||||
:addall="item.addall"
|
||||
:addnone="item.addnone"
|
||||
:addlast="true"
|
||||
:tablesel="item.type === costanti.FieldType.select_by_server ? item.tablesel : ''"
|
||||
:pickup="item.type === costanti.FieldType.select_by_server"
|
||||
color="primary"
|
||||
myclass=""
|
||||
:icon_alternative="item.icon"
|
||||
:optval="fieldsTable.getKeyByTable(item.table)"
|
||||
:optlab="fieldsTable.getLabelByTable(item.table)"
|
||||
:options="valoriopt(item, false)"
|
||||
:filter="item.filter"
|
||||
:filter_extra="item.filter_extra"
|
||||
:useinput="item.useinput && item.type !== costanti.FieldType.select_by_server"
|
||||
@clear="item.value = ''"
|
||||
>
|
||||
</CMySelect>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="myproduct?._id"
|
||||
class="row justify-center"
|
||||
style="height: 400px; text-align: center;"
|
||||
>
|
||||
<CContainerCatalogoCard
|
||||
:id="myproduct._id"
|
||||
:product="myproduct"
|
||||
:complete="false"
|
||||
:cosa="0"
|
||||
v-model="optcatalogo"
|
||||
:idPage="idPage"
|
||||
:options="{
|
||||
show_edit_book: tools.isEditor(),
|
||||
}"
|
||||
@selauthor="selauthor"
|
||||
:scheda="optcatalogo.arrSchede[0].scheda"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CSearchProduct.ts"></script>
|
||||
|
||||
<style lang="scss">
|
||||
@import './CSearchProduct.scss';
|
||||
</style>
|
||||
1
src/components/CSearchProduct/index.ts
Executable file
1
src/components/CSearchProduct/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export { default as CSearchProduct } from './CSearchProduct.vue'
|
||||
@@ -9,7 +9,6 @@
|
||||
<div class="text-center text-h7">
|
||||
Query: {{ options.where }}<br>
|
||||
</div>
|
||||
risultatoHTML: {{risultatoHTML}}
|
||||
<br><br>
|
||||
<div v-html="risultatoHTML">
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user