fix(equipements): ne calculer et n'afficher que les equipements choisis sur la grille adherents
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user