Skip to content

Commit

Permalink
N'affiche plus de '-' pour les valeurs à 0 dans le tableau fiche PEI
Browse files Browse the repository at this point in the history
Issue: #191191
Change-Id: Ieb14fa729c6f516f41abae8c8f49e0bd6b65fbf2
  • Loading branch information
Clément GRENOT committed Oct 25, 2023
1 parent 75e18dc commit 5a8ac98
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client-ng/src/components/Fiche.vue
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,14 @@ export default {
axios.get('/remocra/hydrantspibi/histoverifhydrauforgrid/'+id).then(response => {
if(response.data){
_.forEach(response.data.data, data=> {
this.items.push({'dateControle':data[0] && data[0]!== null? data[0] : '-', 'debitNM1': data[1] && data[1]!== null? data[1] : '-',
'debitMaxNM1': data[2]&& data[2]!== null? data[2] : '-', 'pressionNM1': data[3]&& data[3]!== null? data[3] : '-',
'pressionDynNM1': data[4]&& data[4]!== null? data[4] : '-', 'pressionDynDebNM1': data[5]&& data[5]!== null? data[5] : '-'});
this.items.push(
{'dateControle':data[0]!== undefined && data[0]!== null? data[0] : '-',
'debitNM1': data[1]!== undefined && data[1]!== null? data[1] : '-',
'debitMaxNM1': data[2]!== undefined && data[2]!== null? data[2] : '-',
'pressionNM1': data[3]!== undefined && data[3]!== null? data[3] : '-',
'pressionDynNM1': data[4]!== undefined && data[4]!== null? data[4] : '-',
'pressionDynDebNM1': data[5]!== undefined && data[5]!== null? data[5] : '-'}
);
})
let moyennes = this.items
this.moyenneDebitNM1 = _.meanBy(moyennes, function(o) { return o.debitNM1 && o.debitNM1 !== '-' ? o.debitNM1 : 0 ; });
Expand Down

0 comments on commit 5a8ac98

Please sign in to comment.