fix(equipements): ne calculer et n'afficher que les equipements choisis sur la grille adherents
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 4m39s
AS Talange CI/CD Pipeline / Deploy to Test Environment (push) Successful in 6m50s

This commit is contained in:
2026-08-07 15:22:19 +02:00
parent 2bd623b719
commit 3612206e57
2 changed files with 29 additions and 21 deletions
@@ -97,8 +97,14 @@ public class AdherentController {
if (lic == null || lic.getDotations() == null || lic.getDotations().isEmpty()) {
return false;
}
long total = lic.getDotations().size();
long fournis = lic.getDotations().stream().filter(d -> Boolean.TRUE.equals(d.getFourni())).count();
List<com.astalange.core.entity.Dotation> choisis = lic.getDotations().stream()
.filter(d -> Boolean.TRUE.equals(d.getChoisi()))
.collect(java.util.stream.Collectors.toList());
if (choisis.isEmpty()) {
return false;
}
long total = choisis.size();
long fournis = choisis.stream().filter(d -> Boolean.TRUE.equals(d.getFourni())).count();
if ("TOUT_FOURNI".equalsIgnoreCase(eqFilter)) {
return fournis == total;
} else if ("PARTIEL".equalsIgnoreCase(eqFilter)) {