sec(licence): restriction de l'option et de la visibilité réduction éducateur aux seuls administrateurs
This commit is contained in:
@@ -273,15 +273,20 @@
|
||||
th:text="${lic.etat}">Brouillon</span>
|
||||
</td>
|
||||
<td class="py-4 px-4 font-medium cell-tarif-global">
|
||||
<div th:if="${lic.reductionEducateur}" class="flex flex-col">
|
||||
<span class="text-[10px] font-bold text-amber-700 bg-amber-50 border border-amber-200 px-2 py-0.5 rounded-full inline-block w-max mb-0.5"
|
||||
th:text="'Éducateur (-' + ${lic.pourcentageReductionEducateur != null ? lic.pourcentageReductionEducateur : 100} + '%)'">Éducateur (-100%)</span>
|
||||
<div class="flex items-center space-x-1 text-xs">
|
||||
<span th:if="${lic.getPrixBrut().compareTo(lic.getPrixTotal()) != 0}" class="line-through text-gray-400" th:text="${lic.getPrixBrut() + ' €'}">150.00 €</span>
|
||||
<span class="text-gray-900 font-bold" th:text="${lic.getPrixTotal() + ' €'}">0.00 €</span>
|
||||
<div sec:authorize="hasRole('ROLE_ADMIN')">
|
||||
<div th:if="${lic.reductionEducateur}" class="flex flex-col">
|
||||
<span class="text-[10px] font-bold text-amber-700 bg-amber-50 border border-amber-200 px-2 py-0.5 rounded-full inline-block w-max mb-0.5"
|
||||
th:text="'Éducateur (-' + ${lic.pourcentageReductionEducateur != null ? lic.pourcentageReductionEducateur : 100} + '%)'">Éducateur (-100%)</span>
|
||||
<div class="flex items-center space-x-1 text-xs">
|
||||
<span th:if="${lic.getPrixBrut().compareTo(lic.getPrixTotal()) != 0}" class="line-through text-gray-400" th:text="${lic.getPrixBrut() + ' €'}">150.00 €</span>
|
||||
<span class="text-gray-900 font-bold" th:text="${lic.getPrixTotal() + ' €'}">0.00 €</span>
|
||||
</div>
|
||||
</div>
|
||||
<div th:if="${!lic.reductionEducateur}">
|
||||
<span class="text-gray-900" th:text="${lic.getPrixTotal() + ' €'}">130.00 €</span>
|
||||
</div>
|
||||
</div>
|
||||
<div th:if="${!lic.reductionEducateur}">
|
||||
<div sec:authorize="!hasRole('ROLE_ADMIN')">
|
||||
<span class="text-gray-900" th:text="${lic.getPrixTotal() + ' €'}">130.00 €</span>
|
||||
</div>
|
||||
</td>
|
||||
@@ -579,7 +584,7 @@
|
||||
<label class="block text-sm font-medium text-gray-700 mb-1">Commentaire</label>
|
||||
<textarea id="licenceCommentaireInput" name="commentaire" rows="3" class="w-full border border-gray-300 rounded-lg px-4 py-2 text-sm focus:ring-2 focus:ring-blue-500 outline-none" placeholder="Commentaire optionnel..."></textarea>
|
||||
</div>
|
||||
<div class="bg-amber-50 p-3 rounded-lg border border-amber-200">
|
||||
<div sec:authorize="hasRole('ROLE_ADMIN')" class="bg-amber-50 p-3 rounded-lg border border-amber-200">
|
||||
<label class="flex items-center space-x-2 cursor-pointer select-none">
|
||||
<input type="checkbox" id="reductionEducateurInput" name="reductionEducateur" value="true" onchange="toggleReductionPourcentageVisibility()" class="w-4 h-4 text-amber-600 border-gray-300 rounded focus:ring-amber-500">
|
||||
<span class="text-sm font-semibold text-amber-900">Enfant d'éducateur / Réduction</span>
|
||||
|
||||
Reference in New Issue
Block a user