Bladeren bron

Distributions : correction affichage nombre de commandes erroné

dev
Guillaume Bourgeois 5 jaren geleden
bovenliggende
commit
6f78a01e7c
2 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  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 Bestand weergeven

@@ -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 Bestand weergeven

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

Laden…
Annuleren
Opslaan