2021-09-02 03:22:13 +02:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div id="mycontainer">
|
|
|
|
|
<div class="myheader row justify-between">
|
|
|
|
|
<div class="col-6">
|
|
|
|
|
<q-btn class="q-mx-xs" round dense flat icon="fas fa-shopping-cart">
|
2023-12-28 00:50:42 +01:00
|
|
|
<q-badge
|
|
|
|
|
v-if="getnumItemsCart() > 0"
|
|
|
|
|
color="red"
|
|
|
|
|
floating
|
|
|
|
|
transparent
|
|
|
|
|
>
|
2021-09-16 21:08:02 +02:00
|
|
|
{{ getnumItemsCart() }}
|
2021-09-02 03:22:13 +02:00
|
|
|
</q-badge>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-6" style="text-align: right">
|
2023-12-28 00:50:42 +01:00
|
|
|
<span v-if="myTotalPrice" class="text-grey q-mr-xs">Totale:</span>
|
|
|
|
|
<span class="text-subtitle1 q-mr-sm"
|
|
|
|
|
>€ {{ myTotalPrice ? myTotalPrice.toFixed(2) : 0 }}</span
|
|
|
|
|
>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<q-separator></q-separator>
|
|
|
|
|
<div id="mybody">
|
|
|
|
|
<div v-for="(rec, index) in ordersCart" :key="index" class="col">
|
2024-01-13 00:29:02 +01:00
|
|
|
<CSingleCart :order="rec.order" :showall="false" :idOrdersCart="ordersCart ? ordersCart._id: ''"> </CSingleCart>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="numOrders === 0" style="text-align: center" class="text-grey">
|
2023-12-15 21:50:28 +01:00
|
|
|
{{ $t('ecomm.carrello_vuoto') }}
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
|
|
|
|
<div v-else style="text-align: center">
|
2023-12-18 15:21:12 +01:00
|
|
|
<div class="text-center">
|
2023-12-28 00:50:42 +01:00
|
|
|
<q-btn
|
|
|
|
|
rounded
|
|
|
|
|
icon="fas fa-shopping-cart"
|
|
|
|
|
color="primary"
|
2024-01-13 00:29:02 +01:00
|
|
|
:label="t('ecomm.btn_cassa')"
|
2023-12-28 00:50:42 +01:00
|
|
|
@click="globalStore.rightCartOpen = false"
|
|
|
|
|
class="q-mb-sm"
|
|
|
|
|
to="/checkout"
|
|
|
|
|
>
|
2023-12-18 15:21:12 +01:00
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
2023-12-28 00:50:42 +01:00
|
|
|
<div class="text-center">
|
|
|
|
|
<q-btn
|
|
|
|
|
v-if="existsOrders()"
|
|
|
|
|
rounded
|
2025-06-11 01:05:20 +02:00
|
|
|
outline
|
2023-12-28 00:50:42 +01:00
|
|
|
icon="fas fa-clipboard-list"
|
2025-06-11 01:05:20 +02:00
|
|
|
style="color: green;"
|
2024-01-13 00:29:02 +01:00
|
|
|
:label="t('ecomm.btn_ordini')"
|
2023-12-28 00:50:42 +01:00
|
|
|
class="q-mb-sm"
|
|
|
|
|
@click="globalStore.rightCartOpen = false"
|
|
|
|
|
to="/orderinfo"
|
|
|
|
|
>
|
|
|
|
|
</q-btn>
|
|
|
|
|
</div>
|
2021-09-02 03:22:13 +02:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" src="./CMyCart.ts">
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import './CMyCart.scss';
|
|
|
|
|
</style>
|