- aggiornato carrello e bottoni sul catalogo

This commit is contained in:
Surya Paolo
2025-06-12 10:08:07 +02:00
parent d99ad47483
commit 2dac04fb16
36 changed files with 707 additions and 745 deletions

View File

@@ -15,10 +15,6 @@
width: 50px;
}
.ordine_scontato{
color: gray;
font-size: 0.85rem;
}
.barrato {
text-decoration: line-through;
}

View File

@@ -54,6 +54,7 @@ export default defineComponent({
const orderQuantityPreordered = ref(<number | undefined>undefined);
const orderTotalPriceProduct = ref(<number | undefined>undefined);
const showPointer = ref(false);
const enableQty = ref(false);
const endload = ref(false);
const enableQtyPreordered = ref(false);
@@ -241,6 +242,28 @@ export default defineComponent({
enableChangeTotalPrice.value = true;
}
const copyToClipboard = (text) => {
navigator.clipboard
.writeText(text)
.then(() => {
$q.notify({
message: 'Codice copiato negli appunti!',
color: 'positive',
icon: 'check',
position: 'top',
});
})
.catch((err) => {
console.error('Errore durante la copia:', err);
$q.notify({
message: 'Errore nella copia',
color: 'negative',
icon: 'error',
position: 'top',
});
});
};
onMounted(mounted);
return {
@@ -264,6 +287,8 @@ export default defineComponent({
endload,
qtyInCart,
getRispPerc,
copyToClipboard,
showPointer,
};
},
});

View File

@@ -44,7 +44,24 @@
</span>
</q-item-label>
<q-item-label>
{{ order.product.productInfo.code }}
<q-chip
dense
outline
icon="fas fa-barcode"
color="primary"
text-color="white"
>
<span
style="cursor: pointer"
@mouseenter="showPointer = true"
@mouseleave="showPointer = false"
@click="copyToClipboard(order.product.productInfo.code)"
>
<span :style="showPointer ? 'background-color: rgba(0,0,255,0.1)' : ''">
{{ order.product.productInfo.code }}
</span>
</span>
</q-chip>
</q-item-label>
<q-item-label caption>
@@ -200,7 +217,7 @@
{{ order.TotalPriceProduct ? order.TotalPriceProduct.toFixed(2) : 0 }}
</span>
<span v-if="isApplicatoSconto">
<span v-if="isApplicatoSconto && showall">
&nbsp;<span class="ordine_scontato"
>(<span class="barrato"
>€
@@ -214,7 +231,7 @@
>&nbsp;
</span>
<div
v-if="isApplicatoSconto && !editmode"
v-if="isApplicatoSconto && !editmode && showall"
class="ordine_scritta_sconto"
v-html="
$t('ecomm.sconto_applicato', {
@@ -222,8 +239,7 @@
perc: getRispPerc,
})
"
>
</div>
></div>
</div>
</q-item-label>
</q-item-section>