- Catalogo: Aggiunta di Schede
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
>
|
||||
<q-tab name="visu" icon="fas fa-eye" label="Visualizza"> </q-tab>
|
||||
<q-tab name="sfondo" icon="fas fa-image" label="Sfondo"> </q-tab>
|
||||
<q-tab name="pagine" icon="fas fa-book-reader" label="Pagine"> </q-tab>
|
||||
<q-tab name="opzioni" icon="fas fa-save" label="Opzioni"> </q-tab>
|
||||
</q-tabs>
|
||||
<q-tab-panels v-model="tabcatalogo" animated class="">
|
||||
@@ -60,18 +61,6 @@
|
||||
>{{ reccat.label }}
|
||||
</span>
|
||||
|
|
||||
<!--<q-btn
|
||||
:push="cat === reccat.value"
|
||||
dense
|
||||
:size="tools.isMobile() ? '0.70rem' : '1rem'"
|
||||
:icon="reccat.icon ? reccat.icon : undefined"
|
||||
:color="cat === reccat.value ? 'primary' : undefined"
|
||||
:text-color="cat === reccat.value ? 'white' : 'black'"
|
||||
rounded
|
||||
:label="reccat.label"
|
||||
@click="cat = reccat.value"
|
||||
>
|
||||
</q-btn>-->
|
||||
</div>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
@@ -216,128 +205,226 @@
|
||||
id="pdf-content"
|
||||
ref="pdfContent"
|
||||
:class="{ 'fixed-width': true }"
|
||||
:style="{
|
||||
backgroundImage: `url(${
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
(optcatalogo.printable
|
||||
? optcatalogo.backgroundimage_printable
|
||||
: optcatalogo.backgroundimage)
|
||||
})`,
|
||||
backgroundSize: 'contain',
|
||||
'--width':
|
||||
(optcatalogo.printable
|
||||
? optcatalogo.widthpagPrintable
|
||||
: optcatalogo.widthpag) + 'px',
|
||||
}"
|
||||
>
|
||||
<div class="flex-container-book">
|
||||
<q-infinite-scroll
|
||||
v-if="!optcatalogo.pdf && arrLoaded && arrLoaded.length > 0"
|
||||
ref="myinfscroll"
|
||||
:initial-index="0"
|
||||
@load="onLoadScroll"
|
||||
:offset="2000"
|
||||
debounce="200"
|
||||
class="q-pa-xs row items-start"
|
||||
style="place-content: center"
|
||||
>
|
||||
<div
|
||||
class="q-pa-xs"
|
||||
v-for="(product, index) in arrLoaded"
|
||||
:key="index"
|
||||
<div
|
||||
v-if="optcatalogo.first_page_img"
|
||||
:style="{
|
||||
backgroundImage: `url(${
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
(optcatalogo.printable
|
||||
? optcatalogo.first_page_img
|
||||
: optcatalogo.first_page_img)
|
||||
})`,
|
||||
backgroundSize: 'cover',
|
||||
height: optcatalogo.first_page_height + 'px',
|
||||
width: optcatalogo.first_page_width + 'px',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="first_page"
|
||||
v-html="optcatalogo.first_page_html"
|
||||
></div>
|
||||
</div>
|
||||
<div
|
||||
:class="{ 'fixed-width': true }"
|
||||
:style="{
|
||||
backgroundImage: `url(${
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
(optcatalogo.printable
|
||||
? optcatalogo.backgroundimage_printable
|
||||
: optcatalogo.backgroundimage)
|
||||
})`,
|
||||
backgroundSize: 'contain',
|
||||
|
||||
'--width':
|
||||
(optcatalogo.printable
|
||||
? optcatalogo.widthpagPrintable
|
||||
: optcatalogo.widthpag) + 'px',
|
||||
}"
|
||||
>
|
||||
<div class="flex-container-book">
|
||||
<q-infinite-scroll
|
||||
v-if="
|
||||
!optcatalogo.pdf && arrLoaded && arrLoaded.length > 0
|
||||
"
|
||||
ref="myinfscroll"
|
||||
:initial-index="0"
|
||||
@load="onLoadScroll"
|
||||
:offset="2000"
|
||||
debounce="200"
|
||||
class="q-pa-xs row items-start"
|
||||
style="place-content: center"
|
||||
>
|
||||
<CContainerCatalogoCard
|
||||
v-if="
|
||||
product.active ||
|
||||
(show_hide &&
|
||||
productInfo.productTypes.includes(
|
||||
shared_consts.PRODUCTTYPE.PRODUCT
|
||||
))
|
||||
"
|
||||
:id="product._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
:optcatalogo="optcatalogo"
|
||||
:options="{
|
||||
show_short_descr: false,
|
||||
show_price: false,
|
||||
show_cat: false,
|
||||
quante_col: 'c2',
|
||||
in_3d: false,
|
||||
}"
|
||||
@selauthor="selauthor"
|
||||
/>
|
||||
<CProductCard
|
||||
v-else-if="product.active || show_hide"
|
||||
:id="product._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
/>
|
||||
</div>
|
||||
<template v-slot:loading>
|
||||
<div class="text-center">
|
||||
<q-spinner-dots color="primary" size="40px" />
|
||||
</div>
|
||||
</template>
|
||||
</q-infinite-scroll>
|
||||
<div v-else class="cards-container">
|
||||
<!-- Itera sulle pagine -->
|
||||
<div
|
||||
v-for="(page, pageIndex) in groupedPages()"
|
||||
:key="pageIndex"
|
||||
class="card-page"
|
||||
:style="`margin-bottom: ${optcatalogo.printable ? optcatalogo.margine_paginaPrintable : optcatalogo.margine_pagina};`"
|
||||
>
|
||||
<!-- Itera sulle righe di ogni pagina -->
|
||||
<div
|
||||
v-for="(row, rowIndex) in page"
|
||||
:key="`${pageIndex}-${rowIndex}`"
|
||||
class="card-row"
|
||||
:style="`margin-bottom: ${optcatalogo.printable ? optcatalogo.margine_rigaPrintable : optcatalogo.margine_riga};`"
|
||||
class="q-pa-xs"
|
||||
v-for="(product, index) in arrLoaded"
|
||||
:key="index"
|
||||
>
|
||||
<!-- Itera sui prodotti di ogni riga -->
|
||||
<div
|
||||
v-for="(product, colIndex) in row"
|
||||
:key="`${pageIndex}-${rowIndex}-${colIndex}`"
|
||||
class="flex-item-book image-container"
|
||||
:style="
|
||||
'place-content: center; ' +
|
||||
('flex: 0 1 ' + optcatalogo.widthscheda + '; ')
|
||||
<CContainerCatalogoCard
|
||||
v-if="
|
||||
product.active ||
|
||||
(show_hide &&
|
||||
productInfo.productTypes.includes(
|
||||
shared_consts.PRODUCTTYPE.PRODUCT
|
||||
))
|
||||
"
|
||||
>
|
||||
<CContainerCatalogoCard
|
||||
v-if="
|
||||
product && product.active ||
|
||||
(show_hide &&
|
||||
productInfo.productTypes.includes(
|
||||
shared_consts.PRODUCTTYPE.PRODUCT
|
||||
))
|
||||
"
|
||||
:id="product._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
:optcatalogo="optcatalogo"
|
||||
:options="{
|
||||
show_short_descr: false,
|
||||
show_price: false,
|
||||
show_cat: false,
|
||||
quante_col: 'c2',
|
||||
in_3d: false,
|
||||
}"
|
||||
@selauthor="selauthor"
|
||||
/>
|
||||
<CProductCard
|
||||
v-else-if="product && (product.active || show_hide)"
|
||||
:id="product._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
/>
|
||||
:id="product._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
:optcatalogo="optcatalogo"
|
||||
:options="{
|
||||
show_short_descr: false,
|
||||
show_price: false,
|
||||
show_cat: false,
|
||||
quante_col: 'c2',
|
||||
in_3d: false,
|
||||
}"
|
||||
@selauthor="selauthor"
|
||||
/>
|
||||
<CProductCard
|
||||
v-else-if="product.active || show_hide"
|
||||
:id="product._id"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
/>
|
||||
</div>
|
||||
<template v-slot:loading>
|
||||
<div class="text-center">
|
||||
<q-spinner-dots color="primary" size="40px" />
|
||||
</div>
|
||||
</template>
|
||||
</q-infinite-scroll>
|
||||
<div v-else class="cards-container">
|
||||
<!-- Itera sulle schede -->
|
||||
<div
|
||||
v-for="(
|
||||
recscheda, schedaIndex
|
||||
) in optcatalogo.arrSchede"
|
||||
:key="schedaIndex"
|
||||
>
|
||||
<div v-if="recscheda && recscheda.scheda">
|
||||
<!-- Itera sulle pagine -->
|
||||
<div
|
||||
v-for="(page, pageIndex) in groupedPages(
|
||||
recscheda.scheda
|
||||
)"
|
||||
:key="pageIndex"
|
||||
class="card-page"
|
||||
:style="`margin-bottom: ${
|
||||
optcatalogo.printable
|
||||
? optcatalogo.margine_paginaPrintable
|
||||
: optcatalogo.margine_pagina
|
||||
}; margin-top: ${optcatalogo.margine_top + 'px'};`"
|
||||
>
|
||||
<!-- Itera sulle righe di ogni pagina -->
|
||||
<div
|
||||
v-for="(row, rowIndex) in page"
|
||||
:key="`${pageIndex}-${rowIndex}`"
|
||||
class="card-row"
|
||||
:style="`margin-bottom: ${
|
||||
optcatalogo.printable
|
||||
? optcatalogo.margine_rigaPrintable
|
||||
: optcatalogo.margine_riga
|
||||
};`"
|
||||
>
|
||||
<!-- Itera sui prodotti di ogni riga -->
|
||||
<div
|
||||
v-for="(indprod, colIndex) in row"
|
||||
:key="`${pageIndex}-${rowIndex}-${colIndex}`"
|
||||
class="flex-item-book image-container"
|
||||
:style="
|
||||
'place-content: center; ' +
|
||||
('flex: 0 1 ' +
|
||||
recscheda.scheda.widthscheda ||
|
||||
'100px' + '; ')
|
||||
"
|
||||
>
|
||||
<CContainerCatalogoCard
|
||||
v-if="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda.scheda,
|
||||
rowIndex,
|
||||
colIndex
|
||||
) &&
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda.scheda,
|
||||
rowIndex,
|
||||
colIndex
|
||||
).active
|
||||
"
|
||||
:id="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda.scheda,
|
||||
rowIndex,
|
||||
colIndex
|
||||
)._id
|
||||
"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
:optcatalogo="optcatalogo"
|
||||
:options="{
|
||||
show_short_descr: false,
|
||||
show_price: false,
|
||||
show_cat: false,
|
||||
quante_col: 'c2',
|
||||
in_3d: false,
|
||||
}"
|
||||
@selauthor="selauthor"
|
||||
/>
|
||||
<CProductCard
|
||||
v-else-if="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda.scheda,
|
||||
rowIndex,
|
||||
colIndex
|
||||
) &&
|
||||
(getProdBySchedaRigaCol(
|
||||
recscheda.scheda,
|
||||
rowIndex,
|
||||
colIndex
|
||||
).active ||
|
||||
show_hide)
|
||||
"
|
||||
:id="
|
||||
getProdBySchedaRigaCol(
|
||||
recscheda.scheda,
|
||||
rowIndex,
|
||||
colIndex
|
||||
)._id
|
||||
"
|
||||
:complete="false"
|
||||
:cosa="cosa"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="optcatalogo.last_page_img"
|
||||
:style="{
|
||||
backgroundImage: `url(${
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
(optcatalogo.printable
|
||||
? optcatalogo.last_page_img
|
||||
: optcatalogo.last_page_img)
|
||||
})`,
|
||||
backgroundSize: 'cover',
|
||||
height: optcatalogo.last_page_height + 'px',
|
||||
width: optcatalogo.last_page_width + 'px',
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="last_page"
|
||||
v-html="optcatalogo.last_page_html"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -381,6 +468,44 @@
|
||||
</q-img>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="pagine">
|
||||
<div class="row q-gutter-xs justify-center q-mx-auto bg-blue-1">
|
||||
<div>
|
||||
Prima Pagina:
|
||||
{{
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.first_page_img
|
||||
}}
|
||||
</div>
|
||||
|
||||
<q-img
|
||||
:src="
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.first_page_img
|
||||
"
|
||||
>
|
||||
</q-img>
|
||||
<div>
|
||||
Ultima Pagina:
|
||||
{{
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.last_page_img
|
||||
}}
|
||||
</div>
|
||||
|
||||
<q-img
|
||||
:src="
|
||||
costanti.DIR_UPLOAD +
|
||||
costanti.DIR_CATALOGO +
|
||||
optcatalogo.last_page_img
|
||||
"
|
||||
>
|
||||
</q-img>
|
||||
</div>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="opzioni">
|
||||
<div class="row q-gutter-xs justify-center q-mx-auto bg-blue-1"></div>
|
||||
</q-tab-panel>
|
||||
|
||||
Reference in New Issue
Block a user