fix: rename loop variable eq to equip in equipements_list to avoid clash with reserved keyword

This commit is contained in:
2026-05-19 22:45:54 +02:00
parent 5cd807f916
commit bcd4a94973
@@ -51,17 +51,17 @@
<tr th:if="${#lists.isEmpty(equipements)}">
<td colspan="4" class="py-8 text-center text-gray-500">Aucun équipement n'est paramétré.</td>
</tr>
<tr th:each="eq : ${equipements}" class="hover:bg-gray-50 transition-colors">
<td class="py-4 px-6 font-medium text-gray-900" th:text="${eq.nom}">Maillot</td>
<td class="py-4 px-6 text-gray-600" th:text="${eq.description != null ? eq.description : '-'}">Maillot de match officiel</td>
<tr th:each="equip : ${equipements}" class="hover:bg-gray-50 transition-colors">
<td class="py-4 px-6 font-medium text-gray-900" th:text="${equip.nom}">Maillot</td>
<td class="py-4 px-6 text-gray-600" th:text="${equip.description != null ? equip.description : '-'}">Maillot de match officiel</td>
<td class="py-4 px-6 text-center">
<span class="px-2.5 py-1 text-xs font-semibold rounded-full"
th:classappend="${eq.obligatoire ? 'bg-red-100 text-red-800' : 'bg-gray-100 text-gray-800'}"
th:text="${eq.obligatoire ? 'Oui' : 'Non'}">Oui</span>
th:classappend="${equip.obligatoire ? 'bg-red-100 text-red-800' : 'bg-gray-100 text-gray-800'}"
th:text="${equip.obligatoire ? 'Oui' : 'Non'}">Oui</span>
</td>
<td class="py-4 px-6 text-right flex justify-end space-x-3 items-center">
<a th:href="@{/equipements/{id}/edit(id=${eq.id})}" class="text-indigo-600 hover:text-indigo-900 font-medium bg-indigo-50 px-3 py-1 rounded-lg">Modifier</a>
<form th:action="@{/equipements/{id}/delete(id=${eq.id})}" method="post" onsubmit="return confirm('Supprimer cet équipement ? Cela supprimera également les dotations associées de toutes les licences.');">
<a th:href="@{/equipements/{id}/edit(id=${equip.id})}" class="text-indigo-600 hover:text-indigo-900 font-medium bg-indigo-50 px-3 py-1 rounded-lg">Modifier</a>
<form th:action="@{/equipements/{id}/delete(id=${equip.id})}" method="post" onsubmit="return confirm('Supprimer cet équipement ? Cela supprimera également les dotations associées de toutes les licences.');">
<button type="submit" class="text-red-600 hover:text-red-800 font-medium">Supprimer</button>
</form>
</td>