Bläddra i källkod

Distributions : correction affichage nombre de commandes erroné

refactoring
Guillaume Bourgeois 5 år sedan
förälder
incheckning
6f78a01e7c
2 ändrade filer med 4 tillägg och 2 borttagningar
  1. +2
    -1
      backend/views/distribution/index.php
  2. +2
    -1
      backend/web/js/vuejs/distribution-index.js

+ 2
- 1
backend/views/distribution/index.php Visa fil

@@ -179,7 +179,8 @@ $this->setPageTitle('Distributions') ;
<div class="info-box-content">
<span class="info-box-text">
{{ 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>
<a href="#" class="btn btn-default" disabled="disabled" v-if="countOrders == 0">Télécharger (PDF)</a>
<a :href="distribution.url_report" class="btn btn-default" v-else>Télécharger (PDF)</a>
</span>
</div>
</div>

+ 2
- 1
backend/web/js/vuejs/distribution-index.js Visa fil

@@ -115,15 +115,16 @@ var app = new Vue({
this.oneDistributionWeekActive = response.data.one_distribution_week_active ;
this.countOrders = 0 ;
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 = [] ;

Laddar…
Avbryt
Spara