- aggiornato carrello e bottoni sul catalogo
This commit is contained in:
@@ -15,10 +15,6 @@
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.ordine_scontato{
|
||||
color: gray;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.barrato {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -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">
|
||||
<span class="ordine_scontato"
|
||||
>(<span class="barrato"
|
||||
>€
|
||||
@@ -214,7 +231,7 @@
|
||||
>
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user