feat: Refonte du schéma Adhérent (Lieu de naissance, Nationalité, Type Licence), suppression du téléphone, email obligatoire
This commit is contained in:
@@ -45,7 +45,6 @@ public class AdherentController {
|
||||
@org.springframework.web.bind.annotation.RequestParam(required = false) String categorie,
|
||||
@org.springframework.web.bind.annotation.RequestParam(required = false) String licence,
|
||||
@org.springframework.web.bind.annotation.RequestParam(required = false) String email,
|
||||
@org.springframework.web.bind.annotation.RequestParam(required = false) String telephone,
|
||||
@org.springframework.web.bind.annotation.RequestParam(required = false) String paiement,
|
||||
@org.springframework.web.bind.annotation.RequestParam(defaultValue = "0") int page,
|
||||
@org.springframework.web.bind.annotation.RequestParam(defaultValue = "20") int size,
|
||||
@@ -97,11 +96,6 @@ public class AdherentController {
|
||||
adherents = adherents.stream().filter(a -> a.getEmail() != null && a.getEmail().toLowerCase().contains(e)).collect(java.util.stream.Collectors.toList());
|
||||
model.addAttribute("emailFilter", email.trim());
|
||||
}
|
||||
if (telephone != null && !telephone.trim().isEmpty()) {
|
||||
String t = telephone.trim().toLowerCase();
|
||||
adherents = adherents.stream().filter(a -> a.getTelephone() != null && a.getTelephone().toLowerCase().contains(t)).collect(java.util.stream.Collectors.toList());
|
||||
model.addAttribute("telephoneFilter", telephone.trim());
|
||||
}
|
||||
if (paiement != null && !paiement.trim().isEmpty()) {
|
||||
adherents = adherents.stream().filter(a -> {
|
||||
String statut = a.getStatutPaiement();
|
||||
@@ -201,9 +195,10 @@ public class AdherentController {
|
||||
existing.setNom(adherent.getNom());
|
||||
existing.setPrenom(adherent.getPrenom());
|
||||
existing.setDateNaissance(adherent.getDateNaissance());
|
||||
existing.setTelephone(adherent.getTelephone());
|
||||
existing.setLieuNaissanceVille(adherent.getLieuNaissanceVille());
|
||||
existing.setLieuNaissancePays(adherent.getLieuNaissancePays());
|
||||
existing.setNationalite(adherent.getNationalite());
|
||||
existing.setEmail(adherent.getEmail());
|
||||
existing.setAdresse(adherent.getAdresse());
|
||||
existing.setRepresentantLegal(adherent.getRepresentantLegal());
|
||||
existing.setResidentTalange(adherent.isResidentTalange());
|
||||
existing.setSexe(adherent.getSexe());
|
||||
|
||||
@@ -44,6 +44,8 @@ public class LicenceController {
|
||||
@RequestParam Long categorieId,
|
||||
@RequestParam String etat,
|
||||
@RequestParam(required = false) String numeroLicence,
|
||||
@RequestParam(required = false) String typeDemande,
|
||||
@RequestParam(required = false) String typeLicence,
|
||||
@RequestParam(required = false) Long equipeId) {
|
||||
|
||||
Adherent adherent = adherentRepository.findById(id)
|
||||
@@ -66,6 +68,8 @@ public class LicenceController {
|
||||
licence.setSaison(saisonActive);
|
||||
licence.setEtat(etat);
|
||||
licence.setNumeroLicence(numeroLicence);
|
||||
licence.setTypeDemande(typeDemande);
|
||||
licence.setTypeLicence(typeLicence);
|
||||
|
||||
if (equipeId != null) {
|
||||
Equipe equipe = equipeRepository.findById(equipeId)
|
||||
@@ -101,6 +105,8 @@ public class LicenceController {
|
||||
@RequestParam Long categorieId,
|
||||
@RequestParam String etat,
|
||||
@RequestParam(required = false) String numeroLicence,
|
||||
@RequestParam(required = false) String typeDemande,
|
||||
@RequestParam(required = false) String typeLicence,
|
||||
@RequestParam(required = false) Long equipeId) {
|
||||
|
||||
Licence licence = licenceRepository.findById(licenceId)
|
||||
@@ -112,6 +118,8 @@ public class LicenceController {
|
||||
licence.setCategorie(categorie);
|
||||
licence.setEtat(etat);
|
||||
licence.setNumeroLicence(numeroLicence);
|
||||
licence.setTypeDemande(typeDemande);
|
||||
licence.setTypeLicence(typeLicence);
|
||||
|
||||
if (equipeId != null) {
|
||||
Equipe equipe = equipeRepository.findById(equipeId)
|
||||
|
||||
Reference in New Issue
Block a user