feat(customer.twig): Affiche le nombre total de contacts et traduit les types.

 feat(Stripe/Client.php): Ajoute la suppression et la mise à jour des clients Stripe.

 feat(base.twig): Affiche les messages flash avec des styles et des icônes.

 feat(customer/show.twig): Crée la page d'édition et de suppression du client.

🐛 fix(CustomerController.php): Corrige les actions d'édition et de suppression.
```
This commit is contained in:
Serreau Jovann
2026-01-16 13:35:13 +01:00
parent e7619e949b
commit 93f9a35130
5 changed files with 409 additions and 51 deletions

View File

@@ -144,6 +144,39 @@
</div>
</div>
{% endif %}
{# SECTION DES MESSAGES FLASH #}
<div class="w-full space-y-4 mb-8">
{% for label, messages in app.flashes %}
{% for message in messages %}
{% set bgColor = label == 'success' ? 'bg-emerald-500/5' : (label == 'error' ? 'bg-rose-500/5' : 'bg-blue-500/5') %}
{% set borderColor = label == 'success' ? 'border-emerald-500/20' : (label == 'error' ? 'border-rose-500/20' : 'border-blue-500/20') %}
{% set textColor = label == 'success' ? 'text-emerald-500' : (label == 'error' ? 'text-rose-500' : 'text-blue-500') %}
{% set icon = label == 'success'
? '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />'
: '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />'
%}
<div class="flex items-center p-5 backdrop-blur-xl {{ bgColor }} border {{ borderColor }} rounded-[1.5rem] shadow-xl animate-in slide-in-from-right-4 duration-500" role="alert">
<div class="flex-shrink-0 w-10 h-10 rounded-xl {{ bgColor }} border {{ borderColor }} flex items-center justify-center {{ textColor }} mr-4">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
{{ icon|raw }}
</svg>
</div>
<div class="flex-1">
<p class="text-[10px] font-black {{ textColor }} uppercase tracking-[0.2em] mb-0.5">
{{ label == 'success' ? 'Succès' : (label == 'error' ? 'Erreur' : 'Information') }}
</p>
<p class="text-sm text-slate-400 font-medium">
{{ message }}
</p>
</div>
<button type="button" onclick="this.parentElement.remove()" class="ml-auto text-slate-500 hover:text-slate-300 transition-colors">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /></svg>
</button>
</div>
{% endfor %}
{% endfor %}
</div>
<div class="w-full">
{% block body %}{% endblock %}