Corretto Ordini e visualizzazione dei Totali
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<div class="q-pa-md row items-start q-gutter-md">
|
||||
<q-card :class="getmycardcl()" v-if="!!myproduct" bordered>
|
||||
<q-img :src="`` + myproduct.img" :alt="myproduct.name" :class="getclimgproduct()"></q-img>
|
||||
<q-spinner v-if="!endload" color="primary" size="3em" :thickness="2" />
|
||||
|
||||
<q-card :class="getmycardcl()" v-if="!!myproduct && endload" bordered>
|
||||
<q-img
|
||||
:src="`` + myproduct.img"
|
||||
:alt="myproduct.name"
|
||||
:class="getclimgproduct()"
|
||||
></q-img>
|
||||
|
||||
<q-list>
|
||||
<q-item>
|
||||
@@ -28,7 +34,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</q-item>
|
||||
<q-item clickable>
|
||||
<q-item>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="moneygreen" name="fas fa-euro-sign" />
|
||||
</q-item-section>
|
||||
@@ -44,7 +50,6 @@
|
||||
<span v-if="!!myproduct.after_price">{{
|
||||
myproduct.after_price
|
||||
}}</span>
|
||||
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
@@ -87,7 +92,10 @@
|
||||
<!--<q-rating v-model="myproduct.stars" :max="5" size="32px" readonly/>-->
|
||||
|
||||
<q-list>
|
||||
<q-item>
|
||||
<q-item
|
||||
:clickable="tools.isManager()"
|
||||
@click="tools.isManager() ? (openlistorders = true) : null"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon color="green" name="fas fa-store" />
|
||||
</q-item-section>
|
||||
@@ -103,8 +111,14 @@
|
||||
<span class="prod_qtywarn">
|
||||
{{ getQtyWarn() }}
|
||||
|
||||
<div v-if="tools.isManager() && myproduct.QuantitaOrdinateInAttesa > 0">Quantita Ordinate In Attesa : {{ myproduct.QuantitaOrdinateInAttesa }}</div>
|
||||
|
||||
<div
|
||||
v-if="
|
||||
tools.isManager() && myproduct.QuantitaOrdinateInAttesa > 0
|
||||
"
|
||||
>
|
||||
Quantita Ordinate In Attesa :
|
||||
{{ myproduct.QuantitaOrdinateInAttesa }}
|
||||
</div>
|
||||
</span>
|
||||
</q-item-label>
|
||||
<q-item-label> </q-item-label>
|
||||
@@ -112,14 +126,6 @@
|
||||
</q-item>
|
||||
</q-list>
|
||||
<div class="row q-mb-sm no-wrap items-center centeritems">
|
||||
<!--<q-btn
|
||||
round
|
||||
size="xs"
|
||||
text-color="grey"
|
||||
icon="fas fa-minus"
|
||||
@click="decqty()"
|
||||
></q-btn>-->
|
||||
|
||||
<q-btn
|
||||
icon="fas fa-cart-arrow-down"
|
||||
:color="enableSubQty() ? 'negative' : 'grey'"
|
||||
@@ -144,7 +150,6 @@
|
||||
</template>
|
||||
</q-field>
|
||||
|
||||
<!--<q-btn round size="xs" text-color="grey" icon="fas fa-plus" @click="addqty()"></q-btn>-->
|
||||
<q-btn
|
||||
icon-right="fas fa-cart-plus"
|
||||
color="positive"
|
||||
@@ -200,6 +205,77 @@
|
||||
-->
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
<q-dialog v-model="openlistorders">
|
||||
<q-card class="dialog_card">
|
||||
<q-toolbar class="bg-primary text-white">
|
||||
<q-toolbar-title>
|
||||
{{ t('ecomm.listaord') }} - {{ myproduct.name }}
|
||||
</q-toolbar-title>
|
||||
<q-btn flat round color="white" icon="close" v-close-popup></q-btn>
|
||||
</q-toolbar>
|
||||
<q-card-section class="q-pa-xs inset-shadow">
|
||||
<q-markup-table
|
||||
wrap-cells
|
||||
bordered
|
||||
separator="horizontal"
|
||||
class="listaev__table"
|
||||
>
|
||||
<thead>
|
||||
<th>Data</th>
|
||||
<th>Persona</th>
|
||||
<th>Stato</th>
|
||||
<th>Quantita</th>
|
||||
<th>Note</th>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="(ordcart, index) of arrordersCart"
|
||||
:key="index"
|
||||
class="listaev listaev__table"
|
||||
>
|
||||
<td class="text-center">
|
||||
<div>
|
||||
{{ func_tools.getDateTimeShortStr(ordcart.created_at) }}
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong
|
||||
>{{ ordcart.user.name }} {{ ordcart.user.surname }}</strong
|
||||
>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<strong
|
||||
>{{ shared_consts.getStatusStr(ordcart.status) }}</strong
|
||||
>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<div v-for="(singleord, index) in ordcart.items" :key="index">
|
||||
<span v-if="singleord.order.idProduct === myproduct._id">{{
|
||||
singleord.order.quantity
|
||||
}}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ ordcart.note }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td class="text-center">
|
||||
Totali:
|
||||
<span class="totali">{{
|
||||
products.getSumQtyOrderProductInOrdersCart(myproduct._id)
|
||||
}}</span>
|
||||
</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</q-markup-table>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user