- Aggiornamento template mail (tramite i campi in HTML)

- Aggiornato Carrello
This commit is contained in:
Surya Paolo
2023-12-28 00:50:42 +01:00
parent 6be8ccc906
commit d90b46c206
17 changed files with 354 additions and 237 deletions

View File

@@ -1,100 +1,130 @@
<template>
<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">
<q-img
v-if="order.product && order.product.productInfo.img"
:src="`` + order.product.productInfo.img"
:alt="order.product.productInfo.name"
:class="myimgclass"
>
</q-img>
</div>
<div class="col-4 q-ml-xs">
<div v-if="order.idGasordine" class="gasordine">
{{ products.getSingleGasordine(order, true) }}<br>
</div>
{{ order.product.productInfo.name }}
<div v-if="order.product">
<q-item>
<q-item-section top thumbnail class="q-ml-none">
<img
v-if="order.product && order.product.productInfo.img"
:src="`` + order.product.productInfo.img"
:alt="order.product.productInfo.name"
:class="myimgclass()"
/>
</q-item-section>
<!--<div v-if="showalle">
<br /><span class="text-grey">{{ order.product.description }}</span>
</div>
<q-item-section>
<q-item-label>
<div v-if="order.idGasordine" class="gasordine">
{{ products.getSingleGasordine(order, true) }}<br />
</div>
{{ order.product.productInfo.name }}
</q-item-label>
<q-item-label caption>
<div
class="text-black text-h8"
v-if="order.product.productInfo.unit"
>
{{ tools.getWeightTotalByOrder(order) }}
{{ tools.getUnitsMeasure(order.product.productInfo.unit, true) }}
</div>
<div class="row q-mb-xs no-wrap items-center centeritems">
<q-btn
v-if="showall && !nomodif"
:disable="!products.enableSubQty(order)"
size="sm"
icon="fas fa-cart-arrow-down"
:color="products.enableSubQty(order) ? 'negative' : 'grey'"
@click="addsubqty(false, true)"
rounded
:label="
t('products.subcart', {
qta: products.qtaNextSub(order, order.product),
})
"
></q-btn>
<div v-if="showall" :class="`q-mx-sm text-blue-14`">
{{ order.quantity }}
</div>
<div v-if="order.quantity > 0 && order.quantitypreordered > 0">
+ {{ t('ecomm.preord') }}:
</div>
<div
v-if="order.quantitypreordered > 0"
:class="`q-mx-sm text-blue-14`"
>
{{ order.quantitypreordered }}
</div>
<q-btn
v-if="showall && !nomodif"
icon-right="fas fa-cart-plus"
color="positive"
:disable="!products.enableAddQty(order, order.product)"
rounded
size="sm"
:label="
t('products.addcart', {
qta: products.qtaNextAdd(order, order.product),
})
"
@click="addsubqty(true, false)"
>
</q-btn>
</div>
</q-item-label>
<q-item-label>
<div class="col-2 no-wrap text-subtitle3_short q-mr-sm">
<span class="prezzo_singolo">
{{ order.quantity + order.quantitypreordered }} x
{{ order.price ? order.price : 0 }}
</span>
<span :class="isApplicatoSconto() ? 'ordine_scontato_nuovo' : ''">
=
{{
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>
</q-item-label>
</q-item-section>
<q-item-section side top>
<q-item-label>
<div class="col-1">
<q-btn
v-if="!nomodif"
icon="fas fa-trash"
color="negative"
round
size="xs"
@click="removeFromCard"
>
</q-btn>
</div>
</q-item-label>
</q-item-section>
<!--<q-item-section side top>
<q-item-label caption>meta</q-item-label>
</q-item-section>
-->
</div>
<div class="col-3">
<div class="row q-mb-xs no-wrap items-center centeritems">
<q-btn
v-if="showall && !nomodif"
round
size="xs"
text-color="grey"
icon="fas fa-minus"
@click="addsubqty(false, true)"
></q-btn>
<div v-if="order.quantity > 0" :class="`q-mx-sm text-blue-14`">
{{ order.quantity }}
</div>
<div v-if="order.quantity > 0 && order.quantitypreordered > 0">
+ {{ t('ecomm.preord') }}:
</div>
<div
v-if="order.quantitypreordered > 0"
:class="`q-mx-sm text-blue-14`"
>
{{ order.quantitypreordered }}
</div>
<q-btn
v-if="showall && !nomodif"
round
size="xs"
text-color="grey"
icon="fas fa-plus"
@click="addsubqty(true, false)"
></q-btn>
</div>
<div
class="text-black q-ml-xs text-h8 text-center"
v-if="order.product.productInfo.unit"
>
{{ tools.getWeightTotalByOrder(order) }}
{{ tools.getUnitsMeasure(order.product.productInfo.unit, true) }}
</div>
</div>
<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"
>
</q-btn>
</div>
</q-item>
</div>
</div>
</template>