Add Stripe account status display on event edit page for ROLE_ROOT

Show charges/payouts acceptance status and Stripe connection state
when an admin views an organizer's event. Pass owner to template
and use it for Stripe checks instead of app.user.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-26 09:51:44 +01:00
parent aa2add2696
commit b43c6bcbab
2 changed files with 26 additions and 1 deletions

View File

@@ -26,7 +26,7 @@
Passer hors ligne
</button>
</form>
{% elseif app.user.stripeChargesEnabled and app.user.stripePayoutsEnabled %}
{% elseif owner.stripeChargesEnabled and owner.stripePayoutsEnabled %}
<form method="post" action="{{ path('app_account_toggle_event_online', {id: event.id}) }}">
<button type="submit" class="px-4 py-2 border-2 border-gray-900 bg-green-500 text-white font-black uppercase text-xs tracking-widest cursor-pointer hover:bg-green-700 transition-all">
Mettre en ligne
@@ -64,6 +64,30 @@
</div>
</div>
{% if is_granted('ROLE_ROOT') %}
<div class="card-brutal mb-6">
<p class="text-[10px] font-black uppercase tracking-widest text-gray-500 mb-2">Statut Stripe du compte organisateur</p>
<div class="flex flex-wrap gap-3 items-center">
<span class="text-sm font-bold">{{ owner.companyName ?? (owner.firstName ~ ' ' ~ owner.lastName) }}</span>
{% if owner.stripeAccountId %}
<span class="badge-green text-xs font-black uppercase">Compte Stripe connecte</span>
{% else %}
<span class="badge-red text-xs font-black uppercase">Aucun compte Stripe</span>
{% endif %}
{% if owner.stripeChargesEnabled %}
<span class="badge-green text-xs font-black uppercase">Charges accepted</span>
{% else %}
<span class="badge-red text-xs font-black uppercase">Charges non accepted</span>
{% endif %}
{% if owner.stripePayoutsEnabled %}
<span class="badge-green text-xs font-black uppercase">Payouts accepted</span>
{% else %}
<span class="badge-red text-xs font-black uppercase">Payouts non accepted</span>
{% endif %}
</div>
</div>
{% endif %}
{% if event.online %}
<div class="card-brutal-green mb-6 flex flex-wrap items-center justify-between gap-4">
<div>