- estrazione dei dati del libro sul sito di Amazon.

- possibilità di visualizzare i dati estratti e di aggiornare i dati, sia solo se vuoti, che sovrascrivere tutti i dati.
This commit is contained in:
Surya Paolo
2025-05-16 18:52:12 +02:00
parent 810815a12a
commit 859ba022fa
18 changed files with 1840 additions and 798 deletions

View File

@@ -1,9 +1,17 @@
<template>
<q-page>
<div class="text-center">
<q-spinner v-if="!loadpage" color="primary" size="3em" :thickness="2" />
<q-spinner
v-if="!loadpage"
color="primary"
size="3em"
:thickness="2"
/>
</div>
<div v-if="loadpage" class="panel">
<div
v-if="loadpage"
class="panel"
>
<div>
<div class="text-center">
<CSelectUserActive></CSelectUserActive>
@@ -16,9 +24,18 @@
dense
toggle-color="purple"
:options="[
{ value: shared_consts.PROD.TUTTI, slot: 'tutti' },
{ value: shared_consts.PROD.BOTTEGA, slot: 'bottega' },
{ value: shared_consts.PROD.GAS, slot: 'gas' },
{
value: shared_consts.PROD.TUTTI,
slot: 'tutti',
},
{
value: shared_consts.PROD.BOTTEGA,
slot: 'bottega',
},
{
value: shared_consts.PROD.GAS,
slot: 'gas',
},
]"
>
<template v-slot:tutti>
@@ -26,7 +43,10 @@
<div class="text-center">
{{ t('ecomm.tutti') }}
</div>
<q-icon right name="fas fa-user-friends" />
<q-icon
right
name="fas fa-user-friends"
/>
</div>
</template>
@@ -41,7 +61,10 @@
})
}}
</div>
<q-icon right name="fas fa-user-friends" />
<q-icon
right
name="fas fa-user-friends"
/>
</div>
</template>
@@ -56,7 +79,10 @@
})
}}
</div>
<q-icon right name="fas fa-store" />
<q-icon
right
name="fas fa-store"
/>
</div>
</template>
</q-btn-toggle>
@@ -82,15 +108,24 @@
</template>
</q-input>
</div>
<div class="row q-gutter-xs justify-center q-mx-auto">
<div v-for="(reccat, index) in getCatProds()" :key="index">
<div
class="row q-gutter-xs justify-center q-mx-auto"
>
<div
v-for="(reccat, index) in getCatProds()"
:key="index"
>
<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'"
:color="
cat === reccat.value ? 'primary' : undefined
"
:text-color="
cat === reccat.value ? 'white' : 'black'
"
rounded
:label="reccat.label"
@click="cat = reccat.value"
@@ -101,10 +136,13 @@
<div class="text-center q-py-sm prod_trov">
{{
t('ecomm.prodotti_trovati', {
qta: getArrProducts.length,
qtatot: productStore.getNumProdTot(),
qta: arrProducts.length,
qtatot:
productStore.getNumProdTot() > 0
? ` ${t('ecomm.su')} ${productStore.getNumProdTot()}`
: '',
})
}}{{}}
}}
</div>
<div class="row justify-around">
<div
@@ -112,7 +150,11 @@
v-for="(product, index) in getArrProducts"
:key="index"
>
<CProductCard :id="product._id" :complete="false" :cosa="cosa" />
<CProductCard
:id="product._id"
:complete="false"
:cosa="cosa"
/>
</div>
</div>
</div>
@@ -120,8 +162,7 @@
</q-page>
</template>
<script lang="ts" src="./cash.ts">
</script>
<script lang="ts" src="./cash.ts"></script>
<style lang="scss" scoped>
@import './cash';

View File

@@ -8,10 +8,15 @@
{{ getTitoloCatalogo() }}
</div>
<div
v-if="ispageCatalogata && (tools.isEditor() || tools.isCommerciale()) && myCatalog?.referenti?.length > 0"
v-if="
ispageCatalogata &&
(tools.isEditor() || tools.isCommerciale()) &&
myCatalog?.referenti?.length > 0
"
class="text-h7 text-center text-red q-ma-sm"
>
{{ $t('cataloglist.referenti') }}: <span class="text-bold">{{ getReferentiCatalogo() }}</span>
{{ $t('cataloglist.referenti') }}:
<span class="text-bold">{{ getReferentiCatalogo() }}</span>
</div>
<q-tabs
v-model="tabcatalogo"
@@ -103,7 +108,9 @@
v-for="(reccat, index) in getCatProds()"
:key="index"
class="category"
:class="{ category_sel: cat === reccat.value }"
:class="{
category_sel: cat === reccat.value,
}"
@click="cat = reccat.value"
>
{{ reccat.label }}
@@ -117,7 +124,9 @@
v-for="(reccollana, index) in getCollane()"
:key="index"
class="category"
:class="{ category_sel: collana === reccollana.value }"
:class="{
category_sel: collana === reccollana.value,
}"
@click="collana = reccollana.value"
>
{{ reccollana.label }}
@@ -130,7 +139,9 @@
class="text-center q-py-sm prod_trov"
>
<div
v-if="cat === '' && arrProducts.length === 0 && showListaFiltrata"
v-if="
cat === '' && arrProducts.length === 0 && showListaFiltrata
"
class="row justify-center text-h6"
>
Seleziona {{ filtroStrApplicato }}
@@ -139,18 +150,14 @@
v-else
v-show="productStore.getNumProdTot() !== arrProducts.length"
>
<span v-if="productStore.getNumProdTot()"
>{{
<span>
{{
t('ecomm.prodotti_trovati', {
qta: arrProducts.length,
qtatot: productStore.getNumProdTot(),
})
}}
</span>
<span v-else>
{{
t('ecomm.prodotti_trovati_qta', {
qta: arrProducts.length,
qtatot:
productStore.getNumProdTot() > 0
? ` ${t('ecomm.su')} ${productStore.getNumProdTot()}`
: '',
})
}}
</span>
@@ -171,7 +178,7 @@
</q-inner-loading>
<q-btn
v-if="!showListaFiltrata"
v-if="!showListaFiltrata && tools.is"
rounded
icon="fas fa-redo"
label="Rigenera Lista"
@@ -325,7 +332,9 @@
class="row justify-center"
>
<q-btn
v-if="optcatalogo.pdf && !optcatalogo.generazionePDFInCorso"
v-if="
optcatalogo.pdf && !optcatalogo.generazionePDFInCorso
"
:label="`1) PREPARA PDF`"
@click="preparePDF"
></q-btn>
@@ -335,7 +344,9 @@
@click="terminaPDF"
></q-btn>
<q-btn
v-if="optcatalogo.pdf && optcatalogo.generazionePDFInCorso"
v-if="
optcatalogo.pdf && optcatalogo.generazionePDFInCorso
"
:label="`2) Genera PDF ` + getPdfFilename()"
@click="generatePDF()"
color="positive"
@@ -353,7 +364,9 @@
v-if="myCatalog.pdf_generato"
class="bg-green-1 q-ma-sm q-pa-sm"
>
<div class="bg-blue-1 text-red text-bold text-h6 q-ma-sm q-pa-sm">
<div
class="bg-blue-1 text-red text-bold text-h6 q-ma-sm q-pa-sm"
>
<strong>PDF generati Temporanei</strong>
</div>
@@ -400,18 +413,26 @@
</q-table>
<div class="bg-red-1 q-pa-md q-mt-md">
<div class="bg-blue-1 text-green text-bold text-h6 q-ma-sm q-pa-sm">
<div
class="bg-blue-1 text-green text-bold text-h6 q-ma-sm q-pa-sm"
>
<strong>PDF Pubblicati OnLine</strong>
</div>
<table class="q-table q-table--flat q-table--dense q-ma-none q-pa-none">
<table
class="q-table q-table--flat q-table--dense q-ma-none q-pa-none"
>
<tbody>
<tr>
<td><strong>PDF OnLine:</strong></td>
<td>
<strong>PDF OnLine:</strong>
</td>
<td>
<a
v-if="myCatalog.pdf_online"
:href="tools.getHost() + myCatalog.pdf_online"
:href="
tools.getHost() + myCatalog.pdf_online
"
target="_blank"
class="text-bold"
>
@@ -419,22 +440,40 @@
</a>
<span v-else>-</span>
</td>
<td>{{ tools.getstrDateTime(myCatalog.data_online) }}</td>
<td>
{{
tools.getstrDateTime(myCatalog.data_online)
}}
</td>
</tr>
<tr>
<td><strong>PDF OnLine Stampa:</strong></td>
<td>
<strong>PDF OnLine Stampa:</strong>
</td>
<td>
<a
v-if="myCatalog.pdf_online_stampa"
:href="tools.getHost() + myCatalog.pdf_online_stampa"
:href="
tools.getHost() +
myCatalog.pdf_online_stampa
"
target="_blank"
class="text-bold"
>
{{ tools.getHost() + myCatalog.pdf_online_stampa }}
{{
tools.getHost() +
myCatalog.pdf_online_stampa
}}
</a>
<span v-else>-</span>
</td>
<td>{{ tools.getstrDateTime(myCatalog.data_online_stampa) }}</td>
<td>
{{
tools.getstrDateTime(
myCatalog.data_online_stampa
)
}}
</td>
</tr>
</tbody>
</table>
@@ -463,7 +502,9 @@
v-for="(reccat, index) in getCatProds()"
:key="index"
class="category"
:class="{ category_sel: cat === reccat.value }"
:class="{
category_sel: cat === reccat.value,
}"
@click="cat = reccat.value"
>
{{ reccat.label }}
@@ -477,7 +518,9 @@
v-for="(reccollana, index) in getCollane()"
:key="index"
class="category"
:class="{ category_sel: collana === reccollana.value }"
:class="{
category_sel: collana === reccollana.value,
}"
@click="collana = reccollana.value"
>
{{ reccollana.label }}
@@ -544,15 +587,26 @@
<CMySelect
:col="fieldsTable.getColByColumns(mycolumns, item.key)"
v-if="
item.type === costanti.FieldType.select || item.type === costanti.FieldType.select_by_server
item.type === costanti.FieldType.select ||
item.type === costanti.FieldType.select_by_server
"
:label="
item.value && item.value._id > 0
? undefined
: labelcombo(item)
"
: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"
:tablesel="
item.type === costanti.FieldType.select_by_server
? item.tablesel
: ''
"
:pickup="
item.type === costanti.FieldType.select_by_server
"
:label-color="$q.dark.isActive ? 'white' : 'black'"
myclass="comboselector"
color="primary"
@@ -564,7 +618,10 @@
:filter="item.filter"
:filter_extra="item.filter_extra"
style="font-size: 0.8rem !important"
:useinput="item.useinput && item.type !== costanti.FieldType.select_by_server"
:useinput="
item.useinput &&
item.type !== costanti.FieldType.select_by_server
"
>
</CMySelect>
</div>
@@ -601,7 +658,11 @@
<div class="text-center q-py-sm prod_trov">
<div
v-if="cat === '' && arrProducts.length === 0 && showListaFiltrata"
v-if="
cat === '' &&
arrProducts.length === 0 &&
showListaFiltrata
"
class="row justify-center text-h6"
>
Seleziona {{ filtroStrApplicato }}
@@ -609,13 +670,17 @@
<span
v-else
v-show="productStore.getNumProdTot() !== arrProducts.length"
>{{
>
{{
t('ecomm.prodotti_trovati', {
qta: arrProducts.length,
qtatot: productStore.getNumProdTot(),
qtatot:
productStore.getNumProdTot() > 0
? ` ${t('ecomm.su')} ${productStore.getNumProdTot()}`
: '',
})
}}</span
>
}}
</span>
</div>
<div
class="row justify-around"
@@ -644,14 +709,26 @@
optcatalogo.first_page.text_html &&
optcatalogo.first_page.text_html.contenuto
"
:style="generateStyleByPageDim(optcatalogo, optcatalogo.first_page)"
:style="
generateStyleByPageDim(
optcatalogo,
optcatalogo.first_page
)
"
>
<div v-html="optcatalogo.first_page.text_html.contenuto"></div>
<div
v-html="optcatalogo.first_page.text_html.contenuto"
></div>
</div>
<div :style="generateStyleCatalogo(optcatalogo)">
<div class="flex-container-book">
<q-infinite-scroll
v-if="!optcatalogo.pdf && arrLoaded && arrLoaded.length > 0 && !ismounting"
v-if="
!optcatalogo.pdf &&
arrLoaded &&
arrLoaded.length > 0 &&
!ismounting
"
ref="myinfscroll"
:initial-index="0"
@load="onLoadScroll"
@@ -668,7 +745,9 @@
v-if="
product.active ||
(show_hide &&
product.productInfo.productTypes.includes(shared_consts.PRODUCTTYPE.PRODUCT))
product.productInfo.productTypes.includes(
shared_consts.PRODUCTTYPE.PRODUCT
))
"
:id="product._id"
:product="product"
@@ -708,13 +787,17 @@
>
<!-- Itera sulle schede -->
<div
v-for="(recscheda, schedaIndex) in optcatalogo.arrSchede"
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)"
v-for="(page, pageIndex) in groupedPages(
recscheda
)"
:key="pageIndex"
>
<div
@@ -725,13 +808,24 @@
'card-page': false,
'pdf-section': true,
}"
:style="generateStylePageScheda(optcatalogo, recscheda.scheda)"
:style="
generateStylePageScheda(
optcatalogo,
recscheda.scheda
)
"
>
<div
v-if="recscheda.scheda.dimensioni.pagina?.testo_title?.contenuto"
v-if="
recscheda.scheda.dimensioni.pagina
?.testo_title?.contenuto
"
:style="{
'--scalecatalog': tools.getScale(optcatalogo),
'line-height': recscheda.scheda.dimensioni.pagina?.testo_title?.font.line_height,
'--scalecatalog':
tools.getScale(optcatalogo),
'line-height':
recscheda.scheda.dimensioni.pagina
?.testo_title?.font.line_height,
display: 'flex',
flexDirection: 'column',
position: 'relative', // Posizionamento assoluto
@@ -745,14 +839,24 @@
>
<div
v-html="getTitoloPagina(null, recscheda)"
style="display: flex; flex-direction: row; justify-content: center"
style="
display: flex;
flex-direction: row;
justify-content: center;
"
></div>
</div>
<div
v-if="recscheda.scheda.dimensioni.pagina?.testo_up?.contenuto"
v-if="
recscheda.scheda.dimensioni.pagina?.testo_up
?.contenuto
"
:style="{
'--scalecatalog': tools.getScale(optcatalogo),
'line-height': recscheda.scheda.dimensioni.pagina?.testo_up?.font.line_height,
'--scalecatalog':
tools.getScale(optcatalogo),
'line-height':
recscheda.scheda.dimensioni.pagina
?.testo_up?.font.line_height,
display: 'flex',
flexDirection: 'column',
}"
@@ -781,7 +885,9 @@
v-for="(prod, colIndex) in row"
:key="`${pageIndex}-${rowIndex}-${colIndex}`"
class="flex-item-book"
:style="getStyleSchedaProdotto(recscheda)"
:style="
getStyleSchedaProdotto(recscheda)
"
>
<CContainerCatalogoCard
v-if="prod && prod.active"
@@ -802,7 +908,9 @@
@selauthor="selauthor"
/>
<CProductCard
v-else-if="prod && (prod.active || show_hide)"
v-else-if="
prod && (prod.active || show_hide)
"
:id="prod._id"
:complete="false"
:cosa="cosa"
@@ -813,13 +921,18 @@
<!-- Separatore -->
<div
v-if="recscheda.scheda?.show_separatore && rowIndex !== page.length - 1"
v-if="
recscheda.scheda?.show_separatore &&
rowIndex !== page.length - 1
"
class="text-center"
:style="getStyleRow(recscheda)"
>
<q-separator
inset
:size="tools.adjustSize(optcatalogo, '1px')"
:size="
tools.adjustSize(optcatalogo, '1px')
"
></q-separator>
</div>
</div>
@@ -840,9 +953,13 @@
optcatalogo.last_page.text_html &&
optcatalogo.last_page.text_html.contenuto
"
:style="generateStyleByPageDim(optcatalogo, optcatalogo.last_page)"
:style="
generateStyleByPageDim(optcatalogo, optcatalogo.last_page)
"
>
<div v-html="optcatalogo.last_page.text_html.contenuto"></div>
<div
v-html="optcatalogo.last_page.text_html.contenuto"
></div>
</div>
</div>
</div>
@@ -854,14 +971,18 @@
<div>
Sfondo:
{{
tools.getDirUpload() + costanti.DIR_CATALOGO + optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
}}
</div>
<q-img
v-if="optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile"
:src="
tools.getDirUpload() + costanti.DIR_CATALOGO + optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.dimensioni_def?.pagina.imgsfondo?.imagefile
"
>
</q-img>
@@ -871,17 +992,37 @@
<div class="row justify-center q-mx-auto bg-blue-1">
<div>
Prima Pagina:
{{ tools.getDirUpload() + costanti.DIR_CATALOGO + optcatalogo.first_page.imgsfondo.imagefile }}
{{
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.first_page.imgsfondo.imagefile
}}
</div>
<q-img :src="tools.getDirUpload() + costanti.DIR_CATALOGO + optcatalogo.first_page.imgsfondo.imagefile">
<q-img
:src="
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.first_page.imgsfondo.imagefile
"
>
</q-img>
<div>
Ultima Pagina:
{{ tools.getDirUpload() + costanti.DIR_CATALOGO + optcatalogo.last_page.imgsfondo.imagefile }}
{{
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.last_page.imgsfondo.imagefile
}}
</div>
<q-img :src="tools.getDirUpload() + costanti.DIR_CATALOGO + optcatalogo.last_page.imgsfondo.imagefile">
<q-img
:src="
tools.getDirUpload() +
costanti.DIR_CATALOGO +
optcatalogo.last_page.imgsfondo.imagefile
"
>
</q-img>
</div>
</q-tab-panel>

View File

@@ -1,12 +1,22 @@
<template>
<q-page>
<div class="text-center">
<q-spinner v-if="!loadpage" color="primary" size="3em" :thickness="2" />
<q-spinner
v-if="!loadpage"
color="primary"
size="3em"
:thickness="2"
/>
</div>
<div v-if="loadpage" class="panel">
<div
v-if="loadpage"
class="panel"
>
<div>
<CSelectUserActive></CSelectUserActive>
<div class="text-center text-h7 text-blue">Filtra Prodotti per:</div>
<div class="text-center text-h7 text-blue">
Filtra Prodotti per:
</div>
<div class="text-center">
<q-btn-toggle
v-model="cosa"
@@ -16,23 +26,32 @@
glossy
toggle-color="primary"
:options="[
{ value: shared_consts.PROD.GAS, slot: 'gas' },
{ value: shared_consts.PROD.BOTTEGA, slot: 'bottega' },
{
value: shared_consts.PROD.GAS,
slot: 'gas',
},
{
value: shared_consts.PROD.BOTTEGA,
slot: 'bottega',
},
]"
>
<template v-slot:tutti>
<div class="row items-center no-wrap">
<div class="text-center">
{{ t("ecomm.tutti") }}
{{ t('ecomm.tutti') }}
</div>
<q-icon right name="fas fa-check-square" />
<q-icon
right
name="fas fa-check-square"
/>
</div>
</template>
<template v-slot:gas>
<div class="row items-center no-wrap">
<div class="text-center">
{{ t("gas.ordina_sul_gas") }}
{{ t('gas.ordina_sul_gas') }}
<!--<br />
{{
t('gas.x_prodotti_gas', {
@@ -40,14 +59,17 @@
})
}}-->
</div>
<q-icon right name="fas fa-user-friends" />
<q-icon
right
name="fas fa-user-friends"
/>
</div>
</template>
<template v-slot:bottega>
<div class="row items-center no-wrap">
<div class="text-center">
{{ t("gas.bottega") }}
{{ t('gas.bottega') }}
<!--<br />
{{
t('gas.x_prodotti_bottega', {
@@ -55,7 +77,10 @@
})
}}-->
</div>
<q-icon right name="fas fa-store" />
<q-icon
right
name="fas fa-store"
/>
</div>
</template>
</q-btn-toggle>
@@ -93,37 +118,67 @@
</q-slide-transition>
<div v-if="cosa === shared_consts.PROD.GAS">
<div v-if="!idGasSel">
<div class="text-center text-h6 text-red">Ordini Attivi:</div>
<div class="text-center text-h6 text-red">
Ordini Attivi:
</div>
</div>
<div class="row q-gutter-xs justify-center q-mx-auto">
<div
class="row q-gutter-xs justify-center q-mx-auto"
>
<div
v-for="(recgas, index) in productStore.getGasordinesActives()"
v-for="(
recgas, index
) in productStore.getGasordinesActives()"
:key="index"
>
<q-btn
push
dense
:size="tools.isMobile() ? '0.9rem' : '1.05rem'"
:color="idGasSel === recgas._id ? 'primary' : undefined"
:text-color="idGasSel === recgas._id ? 'white' : 'black'"
:size="
tools.isMobile() ? '0.9rem' : '1.05rem'
"
:color="
idGasSel === recgas._id
? 'primary'
: undefined
"
:text-color="
idGasSel === recgas._id
? 'white'
: 'black'
"
:label="recgas.name"
@click="idGasSel = recgas._id"
>
</q-btn>
</div>
</div>
<div class="row q-gutter-xs justify-center q-mx-auto">
<div
class="row q-gutter-xs justify-center q-mx-auto"
>
<div
v-for="(reccat, index) in getCatProdsByGas(idGasSel)"
v-for="(reccat, index) in getCatProdsByGas(
idGasSel
)"
:key="index"
>
<q-btn
:push="cat === reccat.value"
dense
:size="tools.isMobile() ? '0.70rem' : '0.85rem'"
:icon="reccat.icon ? reccat.icon : undefined"
:color="cat === reccat.value ? 'primary' : undefined"
:text-color="cat === reccat.value ? 'white' : 'black'"
:size="
tools.isMobile() ? '0.70rem' : '0.85rem'
"
: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"
@@ -137,16 +192,32 @@
class="row q-gutter-xs justify-center q-mx-auto"
>
<div
v-for="(recsubcat, index) in getSubCatProdsByGas(idGasSel, cat)"
v-for="(
recsubcat, index
) in getSubCatProdsByGas(idGasSel, cat)"
:key="index"
>
<q-btn
:push="subcat === recsubcat.value"
dense
:size="tools.isMobile() ? '0.70rem' : '0.85rem'"
:icon="recsubcat.icon ? recsubcat.icon : undefined"
:color="subcat === recsubcat.value ? 'positive' : undefined"
:text-color="subcat === recsubcat.value ? 'white' : 'blue'"
:size="
tools.isMobile() ? '0.70rem' : '0.85rem'
"
:icon="
recsubcat.icon
? recsubcat.icon
: undefined
"
:color="
subcat === recsubcat.value
? 'positive'
: undefined
"
:text-color="
subcat === recsubcat.value
? 'white'
: 'blue'
"
rounded
:label="recsubcat.label"
@click="subcat = recsubcat.value"
@@ -157,16 +228,25 @@
<div class="text-center q-py-sm prod_trov">
<span
v-show="productStore.getNumProdTot() !== arrProducts.length"
v-show="
productStore.getNumProdTot() !==
arrProducts.length
"
>{{
t("ecomm.prodotti_trovati", {
t('ecomm.prodotti_trovati', {
qta: arrProducts.length,
qtatot: productStore.getNumProdTot(),
qtatot:
productStore.getNumProdTot() > 0
? ` ${t('ecomm.su')} ${productStore.getNumProdTot()}`
: '',
})
}}</span
>
</div>
<div class="row justify-around" v-if="tools.isManager()">
<div
class="row justify-around"
v-if="tools.isManager()"
>
<q-toggle
v-model="show_hide"
push
@@ -200,22 +280,40 @@
</div>
<template v-slot:loading>
<div class="text-center">
<q-spinner-dots color="primary" size="40px" />
<q-spinner-dots
color="primary"
size="40px"
/>
</div>
</template>
</q-infinite-scroll>
</div>
</div>
<div v-else>
<div class="row q-gutter-xs justify-center q-mx-auto">
<div v-for="(reccat, index) in getCatProds()" :key="index">
<div
class="row q-gutter-xs justify-center q-mx-auto"
>
<div
v-for="(reccat, index) in getCatProds()"
:key="index"
>
<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'"
: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"
@@ -225,16 +323,25 @@
</div>
<div class="text-center q-py-sm prod_trov">
<span
v-show="productStore.getNumProdTot() !== arrProducts.length"
v-show="
productStore.getNumProdTot() !==
arrProducts.length
"
>{{
t("ecomm.prodotti_trovati", {
t('ecomm.prodotti_trovati', {
qta: arrProducts.length,
qtatot: productStore.getNumProdTot(),
qtatot:
productStore.getNumProdTot() > 0
? ` ${t('ecomm.su')} ${productStore.getNumProdTot()}`
: '',
})
}}</span
>
</div>
<div class="row justify-around" v-if="tools.isManager()">
<div
class="row justify-around"
v-if="tools.isManager()"
>
<q-toggle
v-model="show_hide"
push
@@ -268,7 +375,10 @@
</div>
<template v-slot:loading>
<div class="text-center">
<q-spinner-dots color="primary" size="40px" />
<q-spinner-dots
color="primary"
size="40px"
/>
</div>
</template>
</q-infinite-scroll>
@@ -279,9 +389,8 @@
</q-page>
</template>
<script lang="ts" src="./productsList.ts">
</script>
<script lang="ts" src="./productsList.ts"></script>
<style lang="scss" scoped>
@import "./productsList";
@import './productsList';
</style>