feat: add admin toggle to open/close public pre-registrations with ui messaging
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 2m52s
AS Talange CI/CD Pipeline / Build & Run in Docker Container (push) Successful in 3m18s

This commit is contained in:
2026-06-12 23:37:41 +02:00
parent bb24363500
commit 87c65c6ebd
6 changed files with 77 additions and 18 deletions
@@ -30,12 +30,13 @@
<tr class="bg-gray-50 text-gray-500 text-sm uppercase tracking-wider border-b border-gray-200">
<th class="py-3 px-6 font-medium text-left">Nom de la Saison</th>
<th class="py-3 px-6 font-medium text-center">Statut</th>
<th class="py-3 px-6 font-medium text-center">Inscriptions Publiques</th>
<th class="py-3 px-6 font-medium text-right">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 text-sm">
<tr th:if="${#lists.isEmpty(saisons)}">
<td colspan="3" class="py-8 text-center text-gray-500">Aucune saison configurée.</td>
<td colspan="4" class="py-8 text-center text-gray-500">Aucune saison configurée.</td>
</tr>
<tr th:each="saison : ${saisons}" class="hover:bg-gray-50 transition-colors">
<td class="py-4 px-6 font-medium text-gray-900" th:text="${saison.nom}">Saison 2024-2025</td>
@@ -47,6 +48,14 @@
Clôturée
</span>
</td>
<td class="py-4 px-6 text-center">
<form th:if="${saison.estActive}" th:action="@{/saisons/{id}/toggle-inscriptions(id=${saison.id})}" method="post">
<button type="submit" th:class="${saison.inscriptionsOuvertes ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'} + ' px-3 py-1 rounded-full text-xs font-medium hover:opacity-80 transition-opacity'" title="Cliquez pour ouvrir/fermer">
<span th:text="${saison.inscriptionsOuvertes ? 'Ouvertes' : 'Fermées'}"></span>
</button>
</form>
<span th:unless="${saison.estActive}" class="text-gray-400 text-xs">-</span>
</td>
<td class="py-4 px-6 text-right flex justify-end space-x-3 items-center">
<form th:if="${!saison.estActive}" th:action="@{/saisons/{id}/activer(id=${saison.id})}" method="post">
<button type="submit" class="text-indigo-600 hover:text-indigo-900 font-medium bg-indigo-50 px-3 py-1 rounded-lg">Définir Active</button>