Aggiornamento modifiche preOrdini

This commit is contained in:
Surya Paolo
2023-12-20 22:11:52 +01:00
16 changed files with 211 additions and 107 deletions

View File

@@ -15,7 +15,19 @@
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;
font-weight: bold;
}
.ordine_scritta_sconto{
font-style: italic;
color: green;
font-weight: bold;
}

View File

@@ -89,11 +89,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

@@ -1,5 +1,5 @@
<template>
<div class="q-pa-xs q-gutter-xs">
<div v-if="order && order.product" class="q-pa-xs q-gutter-xs">
<div v-if="order.product" class="row items-center justify-evenly no-wrap">
<div class="col-2 text-h6 ellipsis">
@@ -27,11 +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) + (order.price * order.quantitypreordered)).toFixed(2) }}</span>
</div>
&nbsp;{{ order.TotalPriceProduct ? order.TotalPriceProduct.toFixed(2) : 0 }}
<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) + (order.price * order.quantitypreordered)).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">