Aggiungi il codice alla cassa in automatico

This commit is contained in:
Surya Paolo
2023-12-18 15:21:12 +01:00
parent aaa1f619a5
commit 6d4f3f9f0b
14 changed files with 145 additions and 59 deletions

View File

@@ -15,9 +15,12 @@
width: 50px;
}
.ordine_scontato_barrato{
text-decoration: line-through;
.ordine_scontato{
color: gray;
font-size: 0.85rem;
}
.barrato {
text-decoration: line-through;
}
.ordine_scontato_nuovo{
font-size: 1.1rem;

View File

@@ -73,11 +73,16 @@ export default defineComponent({
products.removeFromCart({ order: order.value })
}
function getRisparmio(): string {
return ((order.value.price * order.value.quantity) - order.value.TotalPriceProduct).toFixed(2)
}
return {
myimgclass,
addsubqty,
removeFromCard,
isApplicatoSconto,
getRisparmio,
}
},
})

View File

@@ -27,12 +27,12 @@
@click="addsubqty(true, false)"></q-btn>
</div>
</div>
<div class="col-2 no-wrap text-subtitle3 q-mr-sm">
<div v-if="isApplicatoSconto()">
<span class="ordine_scontato_barrato">&nbsp; {{ (order.price * order.quantity).toFixed(2) }}</span>
</div>
<span v-if="isApplicatoSconto()" class="ordine_scritta_sconto">{{ $t('ecomm.sconto_applicato') }}</span>
<div class="col-2 no-wrap text-subtitle3_short q-mr-sm">
<span :class="isApplicatoSconto() ? 'ordine_scontato_nuovo' : ''">&nbsp;{{ order.TotalPriceProduct ? order.TotalPriceProduct.toFixed(2) : 0 }}</span>
<span v-if="isApplicatoSconto()">
&nbsp;<span class="ordine_scontato">(<span class="barrato"> {{(order.price * order.quantity).toFixed(2) }}</span>)</span>&nbsp;
</span>
<span v-if="isApplicatoSconto()" class="ordine_scritta_sconto">{{ $t('ecomm.sconto_applicato', {risparmio: getRisparmio()}) }}</span>
</div>
<div class="col-1">
<q-btn v-if="!nomodif" icon="fas fa-times" color="negative" round size="xs" @click="removeFromCard">