Risolto problema blocco

This commit is contained in:
Surya Paolo
2023-12-18 08:02:35 +01:00
parent c2af144c05
commit 265c8f4d9e
7 changed files with 160 additions and 132 deletions

View File

@@ -14,3 +14,8 @@
height: 50px;
width: 50px;
}
.ordine_scontato_barrato{
text-decoration: line-through;
color: gray;
}

View File

@@ -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,
}
},
})

View File

@@ -28,7 +28,10 @@
</div>
</div>
<div class="col-2 no-wrap text-subtitle3 q-mr-sm">
&nbsp;{{ (order.price * order.quantity) ? (order.price * order.quantity).toFixed(2) : 0 }}
<div v-if="isApplicatoSconto()">
<span class="ordine_scontato_barrato">&nbsp; {{ (order.price * order.quantity).toFixed(2) }}</span>
</div>
&nbsp;{{ 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">