2021-09-04 15:05:34 +02:00
|
|
|
<template>
|
2023-12-18 12:11:22 +01:00
|
|
|
<div v-if="order && order.product" class="q-pa-xs q-gutter-xs">
|
2021-09-04 15:05:34 +02:00
|
|
|
|
2023-12-09 19:38:30 +01:00
|
|
|
<div v-if="order.product" class="row items-center justify-evenly no-wrap">
|
2021-09-04 15:05:34 +02:00
|
|
|
<div class="col-2 text-h6 ellipsis">
|
2023-12-14 15:20:27 +01:00
|
|
|
<q-img v-if="order.product && order.product.img" :src="`` + order.product.img" :alt="order.product.name"
|
|
|
|
|
:class="myimgclass">
|
|
|
|
|
</q-img>
|
2021-09-04 15:05:34 +02:00
|
|
|
</div>
|
|
|
|
|
<div class="col-4 q-ml-xs">
|
|
|
|
|
{{ order.product.name }}
|
|
|
|
|
<div v-if="showall">
|
|
|
|
|
<br><span class="text-grey">{{ order.product.description }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-3">
|
|
|
|
|
<div class="row q-mb-xs no-wrap items-center centeritems">
|
2023-12-14 15:20:27 +01:00
|
|
|
<q-btn v-if="showall && !nomodif" round size="xs" text-color="grey" icon="fas fa-minus"
|
2021-09-04 15:05:34 +02:00
|
|
|
@click="addsubqty(false, true)"></q-btn>
|
|
|
|
|
<!--<q-field outlined dense style="width: 25px; height: 20px; " class="q-mx-xs text-subtitle4">
|
|
|
|
|
<template v-slot:control>
|
|
|
|
|
<div class="self-center no-outline" tabindex="0" >{{ order.quantity }}</div>
|
|
|
|
|
</template>
|
|
|
|
|
</q-field>-->
|
2023-12-20 21:56:30 +01:00
|
|
|
<div v-if="order.quantity > 0" :class="`q-mx-sm text-blue-14`">{{ order.quantity + order.quantitypreordered }}</div>
|
2023-12-14 15:20:27 +01:00
|
|
|
<q-btn v-if="showall && !nomodif" round size="xs" text-color="grey" icon="fas fa-plus"
|
2021-09-04 15:05:34 +02:00
|
|
|
@click="addsubqty(true, false)"></q-btn>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-12-18 15:21:12 +01:00
|
|
|
<div class="col-2 no-wrap text-subtitle3_short q-mr-sm">
|
2023-12-18 12:11:22 +01:00
|
|
|
<span :class="isApplicatoSconto() ? 'ordine_scontato_nuovo' : ''">€ {{ order.TotalPriceProduct ? order.TotalPriceProduct.toFixed(2) : 0 }}</span>
|
2023-12-18 15:21:12 +01:00
|
|
|
<span v-if="isApplicatoSconto()">
|
2023-12-20 22:11:52 +01:00
|
|
|
<span class="ordine_scontato">(<span class="barrato">€ {{((order.price * order.quantity) + (order.price * order.quantitypreordered)).toFixed(2) }}</span>)</span>
|
2023-12-18 15:21:12 +01:00
|
|
|
</span>
|
|
|
|
|
<span v-if="isApplicatoSconto()" class="ordine_scritta_sconto">{{ $t('ecomm.sconto_applicato', {risparmio: getRisparmio()}) }}</span>
|
2021-09-04 15:05:34 +02:00
|
|
|
</div>
|
|
|
|
|
<div class="col-1">
|
|
|
|
|
<q-btn v-if="!nomodif" icon="fas fa-times" color="negative" round size="xs" @click="removeFromCard">
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" src="./CSingleCart.ts">
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import './CSingleCart.scss';
|
|
|
|
|
</style>
|