feat: add payment confirmation email service and resend actions

This commit is contained in:
2026-08-06 22:09:44 +02:00
parent 2b2025a78f
commit 9dcd12872a
7 changed files with 540 additions and 26 deletions
@@ -327,6 +327,14 @@
<td class="py-2 px-3 text-right font-semibold text-green-600" th:text="${paiement.montant + ' €'}">50.00 €</td>
<td class="py-2 px-3 text-right pr-4">
<div class="flex justify-end items-center space-x-2">
<form th:action="@{/paiements/{id}/resend-email(id=${paiement.id})}" method="post" class="inline m-0" onsubmit="return confirm('Renvoyer l\'e-mail de reçu de paiement à l\'adhérent ?');">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
<button type="submit" class="text-emerald-600 hover:text-emerald-900 bg-emerald-50 hover:bg-emerald-100 p-1.5 rounded transition-colors inline-flex items-center" title="Renvoyer le reçu par e-mail">
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
</svg>
</button>
</form>
<button type="button"
th:data-paiement-id="${paiement.id}"
th:data-montant="${paiement.montant}"
@@ -93,6 +93,15 @@
<td class="py-4 px-6 text-right font-semibold text-green-600" th:text="${p.montant + ' €'}">50.00 €</td>
<td class="py-4 px-6 text-right pr-6">
<div class="flex justify-end items-center space-x-2">
<form th:action="@{/paiements/{id}/resend-email(id=${p.id})}" method="post" class="inline m-0" onsubmit="return confirm('Renvoyer l\'e-mail de reçu de paiement à l\'adhérent ?');">
<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
<input type="hidden" name="redirect" value="/paiements" />
<button type="submit" class="text-emerald-600 hover:text-emerald-900 bg-emerald-50 hover:bg-emerald-100 p-1.5 rounded transition-colors inline-flex items-center" title="Renvoyer le reçu par e-mail">
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"/>
</svg>
</button>
</form>
<button type="button"
th:data-paiement-id="${p.id}"
th:data-montant="${p.montant}"