feat: gestion type de demande, calcul dynamique du tarif et pre-selection equipement (maillot) pour inscription
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 3m8s
AS Talange CI/CD Pipeline / Deploy to Test Environment (push) Successful in 3m28s

This commit is contained in:
2026-06-24 23:56:46 +02:00
parent 2df3e792f1
commit 5f2bf61829
13 changed files with 292 additions and 19 deletions
@@ -148,6 +148,24 @@
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mt-6">
<!-- Type de demande (Read-only) -->
<div>
<label for="typeDemande" class="block text-sm font-medium text-gray-700 mb-1">Type de demande (Pré-inscription)</label>
<input type="text" id="typeDemande" th:field="*{typeDemande}" readonly
class="w-full border border-gray-200 bg-gray-50 rounded-lg px-4 py-2 text-sm text-gray-500 outline-none cursor-not-allowed">
</div>
<!-- Ancien club -->
<div>
<label for="ancienClub" class="block text-sm font-medium text-gray-700 mb-1">Ancien club</label>
<input type="text" id="ancienClub" th:field="*{ancienClub}"
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"
th:classappend="${#fields.hasErrors('ancienClub')} ? 'border-red-500' : ''">
<p th:if="${#fields.hasErrors('ancienClub')}" th:errors="*{ancienClub}" class="mt-1 text-xs text-red-600"></p>
</div>
</div>
<!-- Removed Adresse -->
<div class="pt-4 flex justify-end space-x-3 border-t border-gray-100">
@@ -549,7 +567,18 @@
form.action = '/adherents/' + adherentId + '/licences';
document.getElementById('numeroLicenceInput').value = '';
document.getElementById('etatSelect').value = 'Brouillon';
document.getElementById('typeDemandeSelect').value = '';
// Pré-remplissage du type de demande
const adherentTypeDemande = document.getElementById('typeDemande') ? document.getElementById('typeDemande').value : '';
const typeDemandeSelect = document.getElementById('typeDemandeSelect');
if (adherentTypeDemande === 'NOUVELLE') {
typeDemandeSelect.value = 'Nouvelle demande';
} else if (adherentTypeDemande === 'RENOUVELLEMENT') {
typeDemandeSelect.value = 'Renouvellement';
} else {
typeDemandeSelect.value = '';
}
document.getElementById('typeLicenceSelect').value = '';
// Pré-sélection de la catégorie selon l'année de naissance