Risolto problema blocco
This commit is contained in:
@@ -14,3 +14,8 @@
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.ordine_scontato_barrato{
|
||||
text-decoration: line-through;
|
||||
color: gray;
|
||||
}
|
||||
@@ -61,6 +61,14 @@ export default defineComponent({
|
||||
})
|
||||
}
|
||||
|
||||
function isApplicatoSconto() {
|
||||
const totalipotetico = order.value.price! * order.value.quantity
|
||||
if (totalipotetico > order.value.TotalPriceProduct!) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
function removeFromCard() {
|
||||
products.removeFromCart({ order: order.value })
|
||||
}
|
||||
@@ -69,6 +77,7 @@ export default defineComponent({
|
||||
myimgclass,
|
||||
addsubqty,
|
||||
removeFromCard,
|
||||
isApplicatoSconto,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -28,7 +28,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 no-wrap text-subtitle3 q-mr-sm">
|
||||
€ {{ (order.price * order.quantity) ? (order.price * order.quantity).toFixed(2) : 0 }}
|
||||
<div v-if="isApplicatoSconto()">
|
||||
<span class="ordine_scontato_barrato">€ {{ (order.price * order.quantity).toFixed(2) }}</span>
|
||||
</div>
|
||||
€ {{ order.TotalPriceProduct ? order.TotalPriceProduct.toFixed(2) : 0 }}
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<q-btn v-if="!nomodif" icon="fas fa-times" color="negative" round size="xs" @click="removeFromCard">
|
||||
|
||||
Reference in New Issue
Block a user