Browse Source

Merge branch 'backend/feature/gestion_commandes_annulees' into dev

dev
Guillaume Bourgeois 6 years ago
parent
commit
e596431d44
2 changed files with 13 additions and 2 deletions
  1. +5
    -2
      backend/views/distribution/index.php
  2. +8
    -0
      backend/web/js/vuejs/distribution-index.js

+ 5
- 2
backend/views/distribution/index.php View File

@@ -183,7 +183,7 @@ $this->setPageTitle('Distributions') ;
<span class="info-box-icon bg-yellow"><i class="fa fa-download"></i></span>
<div class="info-box-content">
<span class="info-box-text">
{{ orders.length }} Commande<span v-if="orders.length">s</span><br /><br />
{{ countOrders }} Commande<span v-if="countOrders > 1">s</span><br /><br />
<a :href="distribution.url_report" class="btn btn-default" v-if="orders.length">Télécharger (PDF)</a>
</span>
</div>
@@ -253,6 +253,10 @@ $this->setPageTitle('Distributions') ;
<span class="label label-default" v-else-if="order.amount_paid > order.amount">surplus</span>
<span class="label label-warning" v-else-if="order.amount_paid < order.amount">reste à payer</span>
</td>
<td>
<span class="label label-danger" v-if="order.date_delete">annulée</span>
<span class="label label-warning" v-if="order.date_update">modifiée</span>
</td>
<td class="column-actions">
<button class="btn btn-default" :data-id-order="order.id" @click="orderViewClick"><span :class="'glyphicon ' + ((showViewProduct && idOrderView == order.id) ? 'glyphicon-eye-close' : 'glyphicon-eye-open')"></span></button>
<button class="btn btn-default" :data-id-order="order.id" @click="orderPaymentModalClick"><span class="glyphicon glyphicon-euro"></span></button>
@@ -294,7 +298,6 @@ $this->setPageTitle('Distributions') ;
</div>
</div>
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="fa fa-user"></i></span>
<div class="info-box-content">

+ 8
- 0
backend/web/js/vuejs/distribution-index.js View File

@@ -16,6 +16,7 @@ var app = new Vue({
countActivePointsSale: 0,
countOrdersByPointSale: [],
orders: [],
countOrders: 0,
users: [],
showModalProducts: false,
showModalPointsSale: false,
@@ -113,6 +114,13 @@ var app = new Vue({
if(response.data.orders) {
this.orders = response.data.orders ;
this.countOrders = 0 ;
for(i=0 ; i < this.orders.length ; i++) {
if(!this.orders[i].date_delete) {
this.countOrders ++ ;
}
}
}
else {
this.orders = [] ;

Loading…
Cancel
Save