Sfoglia il codice sorgente

Distributions : correction affichage nombre de commandes erroné

dev
parent
commit
6f78a01e7c
2 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  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 Vedi File

@@ -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 Vedi File

@@ -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 = [] ;

Loading…
Annulla
Salva