Skip to content

Commit

Permalink
Corrige la modal saisie visite
Browse files Browse the repository at this point in the history
Issue: #216397
Change-Id: I0085d6608031efa15843e6e850572eed78f607d5
  • Loading branch information
Renaud-Kieffer committed May 22, 2024
1 parent e5b2e04 commit b118632
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions client-ng/src/components/tournee/ModalSaisieVisite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,20 @@ export default {
if (this.hydrants != null) {
return this.hydrants.filter(h => {
let lastVisite = h.visites != null && h.visites.length > 0 ? h.visites[0] : null;
return h.ras === true
let anomalieLastVisite = lastVisite !=null && lastVisite.anomalies ? JSON.parse(lastVisite.anomalies): null;
return h.ras
|| (
h.newVisite != null &&
(h.newVisite.anomalies != null &&
((lastVisite == null && h.newVisite.anomalies.length > 0) ||
(lastVisite != null && JSON.parse(lastVisite.anomalies).sort().toString() != h.newVisite.anomalies.sort().toString()))
(
(lastVisite == null && h.newVisite.anomalies.length > 0) ||
(anomalieLastVisite === null && h.newVisite.anomalies!==null) ||
(lastVisite !== null && (anomalieLastVisite.sort().toString() !== h.newVisite.anomalies.sort().toString()))
)
|| h.newVisite.debit != null || h.newVisite.debitMax != null
|| h.newVisite.pression != null || h.newVisite.pressionDyn != null || h.newVisite.pressionDynDeb != null
))}
).length == this.hydrants.length;
).length === this.hydrants.length;
}
return false;
}
Expand Down

0 comments on commit b118632

Please sign in to comment.