feat(equipement): ajout d'un indicateur visuel pour les équipements sans référence
This commit is contained in:
@@ -31,16 +31,27 @@
|
|||||||
<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">
|
||||||
<th class="py-3 px-6 font-medium text-left">Nom de l'équipement</th>
|
<th class="py-3 px-6 font-medium text-left">Nom de l'équipement</th>
|
||||||
|
<th class="py-3 px-6 font-medium text-left">Référence</th>
|
||||||
<th class="py-3 px-6 font-medium text-left">Description</th>
|
<th class="py-3 px-6 font-medium text-left">Description</th>
|
||||||
<th class="py-3 px-6 font-medium text-right">Actions</th>
|
<th class="py-3 px-6 font-medium text-right">Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 text-sm">
|
<tbody class="divide-y divide-gray-200 text-sm">
|
||||||
<tr th:if="${#lists.isEmpty(equipements)}">
|
<tr th:if="${#lists.isEmpty(equipements)}">
|
||||||
<td colspan="3" class="py-8 text-center text-gray-500">Aucun équipement n'est paramétré.</td>
|
<td colspan="4" class="py-8 text-center text-gray-500">Aucun équipement n'est paramétré.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr th:each="equip : ${equipements}" class="hover:bg-gray-50 transition-colors">
|
<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 font-medium text-gray-900" th:text="${equip.nom}">Maillot</td>
|
||||||
|
<td class="py-4 px-6">
|
||||||
|
<span th:if="${equip.reference != null and !equip.reference.trim().isEmpty()}"
|
||||||
|
class="font-mono text-xs text-gray-700 bg-gray-100 border border-gray-200 px-2.5 py-1 rounded-md font-semibold"
|
||||||
|
th:text="${equip.reference}">REF-001</span>
|
||||||
|
<span th:if="${equip.reference == null or equip.reference.trim().isEmpty()}"
|
||||||
|
class="inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold bg-amber-50 text-amber-700 border border-amber-200" title="Référence non renseignée - Cliquez sur Modifier pour l'ajouter">
|
||||||
|
<svg class="w-3.5 h-3.5 text-amber-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/></svg>
|
||||||
|
Non renseignée
|
||||||
|
</span>
|
||||||
|
</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-gray-600" th:text="${equip.description != null ? equip.description : '-'}">Maillot de match officiel</td>
|
||||||
<td class="py-4 px-6 text-right flex justify-end space-x-3 items-center">
|
<td class="py-4 px-6 text-right flex justify-end space-x-3 items-center">
|
||||||
<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>
|
<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>
|
||||||
|
|||||||
@@ -98,7 +98,15 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="py-3 px-4 text-gray-600" th:text="${dotation.licence.categorie != null ? dotation.licence.categorie.nom : '-'}">Catégorie</td>
|
<td class="py-3 px-4 text-gray-600" th:text="${dotation.licence.categorie != null ? dotation.licence.categorie.nom : '-'}">Catégorie</td>
|
||||||
<td class="py-3 px-4 text-gray-900 font-medium" th:text="${dotation.equipement != null ? dotation.equipement.nom : '-'}">Maillot</td>
|
<td class="py-3 px-4 text-gray-900 font-medium" th:text="${dotation.equipement != null ? dotation.equipement.nom : '-'}">Maillot</td>
|
||||||
<td class="py-3 px-4 text-gray-600 font-mono text-xs" th:text="${dotation.equipement != null && dotation.equipement.reference != null ? dotation.equipement.reference : '-'}">REF-01</td>
|
<td class="py-3 px-4">
|
||||||
|
<span th:if="${dotation.equipement != null && dotation.equipement.reference != null && !dotation.equipement.reference.trim().isEmpty()}"
|
||||||
|
class="font-mono text-xs text-gray-700 bg-gray-100 border border-gray-200 px-2 py-0.5 rounded font-semibold"
|
||||||
|
th:text="${dotation.equipement.reference}">REF-01</span>
|
||||||
|
<span th:unless="${dotation.equipement != null && dotation.equipement.reference != null && !dotation.equipement.reference.trim().isEmpty()}"
|
||||||
|
class="inline-flex items-center gap-1 px-2 py-0.5 rounded text-[10px] font-semibold bg-amber-50 text-amber-700 border border-amber-200" title="Référence non renseignée sur cet équipement">
|
||||||
|
⚠️ Non renseignée
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
<td class="py-3 px-4 text-gray-600">
|
<td class="py-3 px-4 text-gray-600">
|
||||||
<div th:text="'T: ' + (${dotation.taille != null && !dotation.taille.isEmpty() ? dotation.taille : '-'})">Taille</div>
|
<div th:text="'T: ' + (${dotation.taille != null && !dotation.taille.isEmpty() ? dotation.taille : '-'})">Taille</div>
|
||||||
<div th:if="${dotation.flocage != null && !dotation.flocage.isEmpty()}" th:text="'F: ' + ${dotation.flocage}">Flocage</div>
|
<div th:if="${dotation.flocage != null && !dotation.flocage.isEmpty()}" th:text="'F: ' + ${dotation.flocage}">Flocage</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user