- ver 1.2.47 :

- corretto errore di modifica scheda
- aggiunto scraping (fase 1)
This commit is contained in:
Surya Paolo
2025-05-16 10:26:29 +02:00
parent b7ecd60fc3
commit 810815a12a
23 changed files with 103 additions and 80 deletions

View File

@@ -917,7 +917,7 @@ export default defineComponent({
trovatocatalogo?.condition_andor !== undefined ? trovatocatalogo.condition_andor : costanti.OP_ANDOR.OP_AND,
};
if (!generalista && myCatalog.value.lista_prodotti?.length > 0) {
if (!generalista && myCatalog.value?.lista_prodotti?.length > 0) {
arrprod = myCatalog.value.lista_prodotti;
} else {
arrprod = productStore.getProducts(cosa.value);
@@ -1064,7 +1064,7 @@ export default defineComponent({
condition_andor: trovatocatalogo?.condition_andor ?? costanti.OP_ANDOR.OP_AND,
};
if (myCatalog.value.lista_prodotti?.length > 0) {
if (myCatalog.value?.lista_prodotti?.length > 0) {
arrprod = myCatalog.value.lista_prodotti;
} else {
arrprod = productStore.getProducts(cosa.value);
@@ -1186,7 +1186,7 @@ export default defineComponent({
let arrGeneraleProdotti = [];
if (usaprodottiSalvati && myCatalog.value.lista_prodotti?.length > 0) {
if (usaprodottiSalvati && myCatalog.value?.lista_prodotti?.length > 0) {
} else {
arrGeneraleProdotti = arrProducts.value;
}
@@ -1208,7 +1208,7 @@ export default defineComponent({
let arrProdFiltrati: IProduct[] = [];
if (usaprodottiSalvati && myCatalog.value.lista_prodotti?.length > 0) {
if (usaprodottiSalvati && myCatalog.value?.lista_prodotti?.length > 0) {
arrProdFiltrati = myCatalog.value.lista_prodotti;
} else {
if (recscheda.scheda.productTypes!.length > 0) {
@@ -1784,9 +1784,9 @@ export default defineComponent({
if (element) {
// add this record to lista_prodotti
if (myCatalog.value && !myCatalog.value.lista_prodotti?.some((p) => p._id === element._id)) {
if (myCatalog.value && !myCatalog.value?.lista_prodotti?.some((p) => p._id === element._id)) {
// inserire il record in cima
const arr = myCatalog.value.lista_prodotti || [];
const arr = myCatalog.value?.lista_prodotti || [];
if (where === shared_consts.WHERE_INSERT.ONTOP) arr.unshift(element);
else if (where === shared_consts.WHERE_INSERT.ONBOTTOM) arr.push(element);

View File

@@ -8,9 +8,7 @@
{{ 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>
@@ -140,13 +138,23 @@
<span
v-else
v-show="productStore.getNumProdTot() !== arrProducts.length"
>{{
t('ecomm.prodotti_trovati', {
qta: arrProducts.length,
qtatot: productStore.getNumProdTot(),
})
}}</span
>
<span v-if="productStore.getNumProdTot()"
>{{
t('ecomm.prodotti_trovati', {
qta: arrProducts.length,
qtatot: productStore.getNumProdTot(),
})
}}
</span>
<span v-else>
{{
t('ecomm.prodotti_trovati_qta', {
qta: arrProducts.length,
})
}}
</span>
</span>
</div>
</q-tab-panel>