diff --git a/as-talange-web/src/main/java/com/astalange/web/controller/AdherentController.java b/as-talange-web/src/main/java/com/astalange/web/controller/AdherentController.java index 7a99baa..62bd049 100644 --- a/as-talange-web/src/main/java/com/astalange/web/controller/AdherentController.java +++ b/as-talange-web/src/main/java/com/astalange/web/controller/AdherentController.java @@ -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 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)) { diff --git a/as-talange-web/src/main/resources/templates/adherents/list.html b/as-talange-web/src/main/resources/templates/adherents/list.html index 3b6a51b..557e4fa 100644 --- a/as-talange-web/src/main/resources/templates/adherents/list.html +++ b/as-talange-web/src/main/resources/templates/adherents/list.html @@ -199,27 +199,29 @@ th:text="${adherent.getLicenceActuelle() != null ? adherent.getLicenceActuelle().getCategorie().getNom() + (adherent.getLicenceActuelle().getEquipe() != null ? ' (' + adherent.getLicenceActuelle().getEquipe().getNom() + ')' : '') : '-'}">- -
- - Complet (3/3) - -
- - - Maillot +
+
+ + Complet (3/3) +
+ + + Maillot + +
+
+
+ -
-
-
- -