feat: add gender and goalkeeper/field player jersey style customization for members
This commit is contained in:
@@ -37,8 +37,20 @@ public class Adherent {
|
||||
|
||||
private boolean residentTalange = true;
|
||||
|
||||
@Column(nullable = false, length = 10)
|
||||
private String sexe = "MASCULIN";
|
||||
|
||||
@Column(name = "type_maillot", nullable = false, length = 20)
|
||||
private String typeMaillot = "JOUEUR";
|
||||
|
||||
// Getters and Setters
|
||||
|
||||
public String getSexe() { return sexe; }
|
||||
public void setSexe(String sexe) { this.sexe = sexe; }
|
||||
|
||||
public String getTypeMaillot() { return typeMaillot; }
|
||||
public void setTypeMaillot(String typeMaillot) { this.typeMaillot = typeMaillot; }
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
|
||||
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE adherent ADD COLUMN sexe VARCHAR(10) DEFAULT 'MASCULIN' NOT NULL;
|
||||
ALTER TABLE adherent ADD COLUMN type_maillot VARCHAR(20) DEFAULT 'JOUEUR' NOT NULL;
|
||||
@@ -124,6 +124,26 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<!-- Sexe -->
|
||||
<div>
|
||||
<label for="sexe" class="block text-sm font-medium text-gray-700 mb-1">Sexe</label>
|
||||
<select id="sexe" th:field="*{sexe}" class="w-full border border-gray-300 rounded-lg px-4 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-colors">
|
||||
<option value="MASCULIN">Masculin</option>
|
||||
<option value="FEMININ">Féminin</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Type de Maillot / Poste -->
|
||||
<div>
|
||||
<label for="typeMaillot" class="block text-sm font-medium text-gray-700 mb-1">Poste (Type de maillot)</label>
|
||||
<select id="typeMaillot" th:field="*{typeMaillot}" class="w-full border border-gray-300 rounded-lg px-4 py-2 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-colors">
|
||||
<option value="JOUEUR">Joueur de champ</option>
|
||||
<option value="GARDIEN">Gardien de but</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Adresse -->
|
||||
<div>
|
||||
<label for="adresse" class="block text-sm font-medium text-gray-700 mb-1">Adresse postale</label>
|
||||
@@ -231,6 +251,13 @@
|
||||
th:text="${dot.equipement.obligatoire ? 'Obligatoire' : 'Facultatif'}">Obligatoire</span>
|
||||
</div>
|
||||
<div class="text-[10px] text-gray-400 mb-2 truncate" th:title="${dot.equipement.description}" th:text="${dot.equipement.description != null and !dot.equipement.description.isEmpty() ? dot.equipement.description : 'Pas de description'}">Description</div>
|
||||
<!-- Special dynamic label for Jersey type -->
|
||||
<div class="mb-2" th:if="${dot.equipement.nom == 'Maillot'}">
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-[10px] font-semibold bg-blue-50 text-blue-700 border border-blue-100"
|
||||
th:text="${adherent.sexe == 'FEMININ' ? 'Modèle Femme' : 'Modèle Homme'} + ' - ' + ${adherent.typeMaillot == 'GARDIEN' ? 'Gardien' : 'Joueur'}">
|
||||
Modèle Homme - Joueur
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form inputs for bulk updating -->
|
||||
|
||||
@@ -74,7 +74,14 @@
|
||||
<td colspan="7" class="py-8 text-center text-gray-500">Aucun adhérent enregistré.</td>
|
||||
</tr>
|
||||
<tr th:each="adherent : ${adherents}" class="hover:bg-gray-50 transition-colors">
|
||||
<td class="py-4 px-6 font-medium text-gray-900" th:text="${adherent.nom}">Dupont</td>
|
||||
<td class="py-4 px-6 font-medium text-gray-900">
|
||||
<span th:text="${adherent.nom}">Dupont</span>
|
||||
<div class="text-[10px] text-gray-400 font-normal mt-0.5">
|
||||
<span th:text="${adherent.sexe == 'FEMININ' ? 'Féminin' : 'Masculin'}">Masculin</span>
|
||||
<span class="mx-1">|</span>
|
||||
<span th:text="${adherent.typeMaillot == 'GARDIEN' ? 'Gardien' : 'Joueur'}">Joueur</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="py-4 px-6 font-medium text-gray-900" th:text="${adherent.prenom}">Jean</td>
|
||||
<td class="py-4 px-6 text-center text-gray-600 font-mono text-xs"
|
||||
th:text="${adherent.getLicenceActuelle() != null and adherent.getLicenceActuelle().numeroLicence != null and !adherent.getLicenceActuelle().numeroLicence.isEmpty() ? adherent.getLicenceActuelle().numeroLicence : '-'}">-</td>
|
||||
|
||||
Reference in New Issue
Block a user