Compare commits
5 Commits
main
...
4870d61f86
| Author | SHA1 | Date | |
|---|---|---|---|
| 4870d61f86 | |||
| 6ca3d0b765 | |||
| ba268a33bc | |||
| f641ccc519 | |||
| 6ea00db0dc |
@@ -18,7 +18,7 @@ public class Dotation {
|
|||||||
@JoinColumn(name = "equipement_id", nullable = false)
|
@JoinColumn(name = "equipement_id", nullable = false)
|
||||||
private Equipement equipement;
|
private Equipement equipement;
|
||||||
|
|
||||||
@Column(length = 10)
|
@Column(length = 50)
|
||||||
private String taille;
|
private String taille;
|
||||||
|
|
||||||
@Column(length = 50)
|
@Column(length = 50)
|
||||||
@@ -30,7 +30,7 @@ public class Dotation {
|
|||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
private Boolean fourni = false;
|
private Boolean fourni = false;
|
||||||
|
|
||||||
@Column(length = 10)
|
@Column(length = 50)
|
||||||
private String numero;
|
private String numero;
|
||||||
|
|
||||||
@Column(nullable = false)
|
@Column(nullable = false)
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ public class PreInscription {
|
|||||||
@Column(nullable = false, length = 100)
|
@Column(nullable = false, length = 100)
|
||||||
private String prenom;
|
private String prenom;
|
||||||
|
|
||||||
|
@Column(nullable = false, length = 10)
|
||||||
|
private String sexe;
|
||||||
|
|
||||||
@Column(name = "date_naissance", nullable = false)
|
@Column(name = "date_naissance", nullable = false)
|
||||||
private LocalDate dateNaissance;
|
private LocalDate dateNaissance;
|
||||||
|
|
||||||
@@ -71,6 +74,9 @@ public class PreInscription {
|
|||||||
public String getPrenom() { return prenom; }
|
public String getPrenom() { return prenom; }
|
||||||
public void setPrenom(String prenom) { this.prenom = prenom; }
|
public void setPrenom(String prenom) { this.prenom = prenom; }
|
||||||
|
|
||||||
|
public String getSexe() { return sexe; }
|
||||||
|
public void setSexe(String sexe) { this.sexe = sexe; }
|
||||||
|
|
||||||
public LocalDate getDateNaissance() { return dateNaissance; }
|
public LocalDate getDateNaissance() { return dateNaissance; }
|
||||||
public void setDateNaissance(LocalDate dateNaissance) { this.dateNaissance = dateNaissance; }
|
public void setDateNaissance(LocalDate dateNaissance) { this.dateNaissance = dateNaissance; }
|
||||||
|
|
||||||
|
|||||||
@@ -138,14 +138,13 @@ public class CategorieService {
|
|||||||
newDotation.setLicence(licence);
|
newDotation.setLicence(licence);
|
||||||
newDotation.setEquipement(ce.getEquipement());
|
newDotation.setEquipement(ce.getEquipement());
|
||||||
boolean isMaillot = "Maillot".equalsIgnoreCase(ce.getEquipement().getNom());
|
boolean isMaillot = "Maillot".equalsIgnoreCase(ce.getEquipement().getNom());
|
||||||
boolean isNouvelleAndU11 = false;
|
boolean isNouvelle = false;
|
||||||
if (licence.getTypeDemande() != null &&
|
if (licence.getTypeDemande() != null &&
|
||||||
(licence.getTypeDemande().equalsIgnoreCase("Nouvelle demande") || licence.getTypeDemande().equalsIgnoreCase("NOUVELLE")) &&
|
(licence.getTypeDemande().equalsIgnoreCase("Nouvelle demande") || licence.getTypeDemande().equalsIgnoreCase("NOUVELLE")) &&
|
||||||
licence.getCategorie() != null &&
|
licence.getCategorie() != null) {
|
||||||
licence.getCategorie().isU11OrBelow()) {
|
isNouvelle = true;
|
||||||
isNouvelleAndU11 = true;
|
|
||||||
}
|
}
|
||||||
newDotation.setChoisi(ce.getObligatoire() || (isMaillot && isNouvelleAndU11)); // Checked if obligatoire or if it's a new registration for U11 or below
|
newDotation.setChoisi(ce.getObligatoire() || (isMaillot && isNouvelle)); // Checked if obligatoire or if it's a new registration
|
||||||
newDotation.setFourni(false);
|
newDotation.setFourni(false);
|
||||||
newDotation.setTaille("");
|
newDotation.setTaille("");
|
||||||
newDotation.setNumero("");
|
newDotation.setNumero("");
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ public class PreInscriptionService {
|
|||||||
adherent.setTypeDemande(pre.getTypeDemande());
|
adherent.setTypeDemande(pre.getTypeDemande());
|
||||||
adherent.setAncienClub(pre.getAncienClub());
|
adherent.setAncienClub(pre.getAncienClub());
|
||||||
adherent.setAncienneCategorie(pre.getAncienneCategorie());
|
adherent.setAncienneCategorie(pre.getAncienneCategorie());
|
||||||
|
adherent.setSexe(pre.getSexe());
|
||||||
// Par défaut
|
// Par défaut
|
||||||
adherent.setSexe("MASCULIN");
|
|
||||||
adherent.setTypeMaillot("JOUEUR");
|
adherent.setTypeMaillot("JOUEUR");
|
||||||
adherent.setResidentTalange(false);
|
adherent.setResidentTalange(false);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE pre_inscription ADD COLUMN sexe VARCHAR(10) DEFAULT 'MASCULIN' NOT NULL;
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE dotation ALTER COLUMN taille TYPE VARCHAR(50);
|
||||||
|
ALTER TABLE dotation ALTER COLUMN numero TYPE VARCHAR(50);
|
||||||
+6
-6
@@ -133,9 +133,9 @@ public class PublicInscriptionController {
|
|||||||
if (!categories.isEmpty()) {
|
if (!categories.isEmpty()) {
|
||||||
Categorie cat = categories.get(0);
|
Categorie cat = categories.get(0);
|
||||||
if (cat.getTarifBase() != null) {
|
if (cat.getTarifBase() != null) {
|
||||||
BigDecimal prixMaillot = BigDecimal.ZERO;
|
BigDecimal prixMaillot = cat.getEquipementPrixByNom("Maillot");
|
||||||
if (cat.isU11OrBelow()) {
|
if (prixMaillot == null) {
|
||||||
prixMaillot = cat.getEquipementPrixByNom("Maillot");
|
prixMaillot = BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
BigDecimal tarifTotal = cat.getTarifBase().add(prixMaillot);
|
BigDecimal tarifTotal = cat.getTarifBase().add(prixMaillot);
|
||||||
tarifStr = tarifTotal.intValue() + " €";
|
tarifStr = tarifTotal.intValue() + " €";
|
||||||
@@ -175,9 +175,9 @@ public class PublicInscriptionController {
|
|||||||
|
|
||||||
Categorie cat = categories.get(0);
|
Categorie cat = categories.get(0);
|
||||||
if (cat.getTarifBase() != null) {
|
if (cat.getTarifBase() != null) {
|
||||||
BigDecimal prixMaillot = BigDecimal.ZERO;
|
BigDecimal prixMaillot = cat.getEquipementPrixByNom("Maillot");
|
||||||
if (cat.isU11OrBelow()) {
|
if (prixMaillot == null) {
|
||||||
prixMaillot = cat.getEquipementPrixByNom("Maillot");
|
prixMaillot = BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
BigDecimal tarifTotal = cat.getTarifBase().add(prixMaillot);
|
BigDecimal tarifTotal = cat.getTarifBase().add(prixMaillot);
|
||||||
return tarifTotal.intValue() + " €";
|
return tarifTotal.intValue() + " €";
|
||||||
|
|||||||
@@ -358,7 +358,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div class="flex justify-between items-start mb-1 gap-1">
|
<div class="flex justify-between items-start mb-1 gap-1">
|
||||||
<span class="font-semibold text-xs text-gray-800 truncate" th:text="${dot.equipement.nom}">Maillot</span>
|
<span class="font-semibold text-xs text-gray-800 truncate" th:title="${dot.equipement.nom}" th:text="${dot.equipement.nom}">Maillot</span>
|
||||||
<span class="text-[9px] px-1.5 py-0.5 rounded-full font-bold flex-shrink-0"
|
<span class="text-[9px] px-1.5 py-0.5 rounded-full font-bold flex-shrink-0"
|
||||||
th:classappend="${dot.licence.categorie.isEquipementObligatoire(dot.equipement.id) ? 'bg-red-50 text-red-700 border border-red-100' : 'bg-gray-50 text-gray-600 border border-gray-100'}"
|
th:classappend="${dot.licence.categorie.isEquipementObligatoire(dot.equipement.id) ? 'bg-red-50 text-red-700 border border-red-100' : 'bg-gray-50 text-gray-600 border border-gray-100'}"
|
||||||
th:text="${dot.licence.categorie.isEquipementObligatoire(dot.equipement.id) ? 'Obligatoire' : 'Facultatif'}">Obligatoire</span>
|
th:text="${dot.licence.categorie.isEquipementObligatoire(dot.equipement.id) ? 'Obligatoire' : 'Facultatif'}">Obligatoire</span>
|
||||||
|
|||||||
@@ -20,10 +20,13 @@
|
|||||||
<div class="flex-1 overflow-auto p-6">
|
<div class="flex-1 overflow-auto p-6">
|
||||||
<div class="flex justify-between items-center mb-6">
|
<div class="flex justify-between items-center mb-6">
|
||||||
<h3 class="text-xl font-bold text-gray-900">Liste des Catégories</h3>
|
<h3 class="text-xl font-bold text-gray-900">Liste des Catégories</h3>
|
||||||
|
<div class="flex items-center space-x-4">
|
||||||
|
<input type="text" id="searchInput" placeholder="Rechercher une catégorie..." class="border border-gray-300 rounded-lg px-4 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none w-64">
|
||||||
<a th:href="@{/categories/new}" class="bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700">
|
<a th:href="@{/categories/new}" class="bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700">
|
||||||
+ Nouvelle Catégorie
|
+ Nouvelle Catégorie
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
|
||||||
<div class="overflow-x-auto">
|
<div class="overflow-x-auto">
|
||||||
@@ -64,5 +67,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<script>
|
||||||
|
document.getElementById('searchInput').addEventListener('keyup', function() {
|
||||||
|
let filter = this.value.toLowerCase();
|
||||||
|
let rows = document.querySelectorAll('tbody tr.hover\\:bg-gray-50');
|
||||||
|
rows.forEach(row => {
|
||||||
|
let text = row.textContent.toLowerCase();
|
||||||
|
row.style.display = text.includes(filter) ? '' : 'none';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -20,10 +20,13 @@
|
|||||||
<div class="flex-1 overflow-auto p-6">
|
<div class="flex-1 overflow-auto p-6">
|
||||||
<div class="flex justify-between items-center mb-6">
|
<div class="flex justify-between items-center mb-6">
|
||||||
<h3 class="text-xl font-bold text-gray-900">Liste des Équipements</h3>
|
<h3 class="text-xl font-bold text-gray-900">Liste des Équipements</h3>
|
||||||
|
<div class="flex items-center space-x-4">
|
||||||
|
<input type="text" id="searchInput" placeholder="Rechercher un équipement..." class="border border-gray-300 rounded-lg px-4 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none w-64">
|
||||||
<a th:href="@{/equipements/new}" class="bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700">
|
<a th:href="@{/equipements/new}" class="bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700">
|
||||||
+ Nouvel Équipement
|
+ Nouvel Équipement
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<table class="w-full text-left border-collapse">
|
<table class="w-full text-left border-collapse">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="bg-gray-50 text-gray-500 text-sm uppercase tracking-wider border-b border-gray-200">
|
<tr class="bg-gray-50 text-gray-500 text-sm uppercase tracking-wider border-b border-gray-200">
|
||||||
@@ -51,5 +54,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
<script>
|
||||||
|
document.getElementById('searchInput').addEventListener('keyup', function() {
|
||||||
|
let filter = this.value.toLowerCase();
|
||||||
|
let rows = document.querySelectorAll('tbody tr.hover\\:bg-gray-50');
|
||||||
|
rows.forEach(row => {
|
||||||
|
let text = row.textContent.toLowerCase();
|
||||||
|
row.style.display = text.includes(filter) ? '' : 'none';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -99,6 +99,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-3">
|
||||||
|
<label class="block text-sm font-medium text-gray-700">Sexe <span class="text-red-500">*</span></label>
|
||||||
|
<div class="flex items-center space-x-6">
|
||||||
|
<label class="flex items-center">
|
||||||
|
<input type="radio" th:field="*{sexe}" value="MASCULIN" required class="w-4 h-4 text-blue-600 border-gray-300 focus:ring-blue-500">
|
||||||
|
<span class="ml-2 text-sm text-gray-700">Masculin</span>
|
||||||
|
</label>
|
||||||
|
<label class="flex items-center">
|
||||||
|
<input type="radio" th:field="*{sexe}" value="FEMININ" required class="w-4 h-4 text-blue-600 border-gray-300 focus:ring-blue-500">
|
||||||
|
<span class="ml-2 text-sm text-gray-700">Féminin</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Date de naissance <span class="text-red-500">*</span></label>
|
<label class="block text-sm font-medium text-gray-700 mb-1">Date de naissance <span class="text-red-500">*</span></label>
|
||||||
|
|||||||
Reference in New Issue
Block a user