fix: improve adherent size matching and conditional visibility in dotations
AS Talange CI/CD Pipeline / Build & Run Unit Tests (push) Successful in 4m12s
AS Talange CI/CD Pipeline / Deploy to Test Environment (push) Successful in 6m0s

This commit is contained in:
2026-07-29 16:28:51 +02:00
parent baa4d3c0cd
commit da0443f655
4 changed files with 102 additions and 13 deletions
@@ -413,22 +413,17 @@
<div th:if="${dot.equipement.taillesDisponibles != null and !dot.equipement.taillesDisponibles.trim().isEmpty()}">
<label class="block text-[9px] uppercase font-bold text-gray-400">Taille</label>
<select th:name="'taille_' + ${dot.id}" class="w-full text-xs border border-gray-300 rounded px-1 py-0.5 focus:ring-1 focus:ring-blue-500 outline-none">
<option value="" th:selected="${dot.taille == null or dot.taille.isEmpty()}">Choisir...</option>
<option th:if="${dot.taille != null and !dot.taille.isEmpty()}"
<option value="">Choisir...</option>
<option th:if="${dot.taille != null and !dot.taille.isEmpty() and !#strings.contains(dot.equipement.taillesDisponibles, dot.taille)}"
th:value="${dot.taille}"
th:text="${dot.taille} + ' (Actuelle)'"
selected></option>
<option th:each="t : ${#strings.arraySplit(dot.equipement.taillesDisponibles, ',')}"
th:if="${dot.taille == null or dot.taille != #strings.trim(t)}"
th:value="${#strings.trim(t)}"
th:text="${#strings.trim(t)}"
th:selected="${dot.taille == null and (#strings.trim(t) == adherent.tailleVetement or #strings.trim(t) == adherent.pointure)}"></option>
th:selected="${dot.isTailleOptionSelected(#strings.trim(t))}"></option>
</select>
</div>
<div th:if="${(dot.equipement.taillesDisponibles == null or dot.equipement.taillesDisponibles.trim().isEmpty())}">
<label class="block text-[9px] uppercase font-bold text-gray-400">Taille</label>
<input type="text" th:name="'taille_' + ${dot.id}" th:value="${dot.taille != null and !dot.taille.isEmpty() ? dot.taille : (adherent.tailleVetement != null ? adherent.tailleVetement : '')}" class="w-full text-xs border border-gray-300 rounded px-1 py-0.5 focus:ring-1 focus:ring-blue-500 outline-none" placeholder="Taille/Pointure">
</div>
<div th:if="${dot.equipement.couleursDisponibles != null and !dot.equipement.couleursDisponibles.trim().isEmpty()}">
<label class="block text-[9px] uppercase font-bold text-gray-400">Couleur</label>