{% extends 'account/base_account.html.twig' %} {% block page_title %}Demandes RGPD{% endblock %} {% block stylesheets %} {{ parent() }} {% endblock %} {% block content %} {# ── Onglets ── #}
⏳ En attente {{ counts.pending }} ✅ Traitées {{ counts.processed }} ❌ Refusées {{ counts.refused }}
{# ── Liste ── #} {% if demandes is empty %}
🎉

Aucune demande {{ statut_actif == 'pending' ? 'en attente' : (statut_actif == 'processed' ? 'traitée' : 'refusée') }}.

{% else %} {% for demande in demandes %} {% set jours = (demande.deadlineAt and statut_actif == 'pending') ? (((demande.deadlineAt|date('U') - 'now'|date('U')) / 86400)|round(0, 'ceil')) : null %} {% set isUrgent = jours is not null and jours <= 7 %} {% set did = demande.id %}
{# En-tête #}
{{ demande.typeLabel }} #{{ did }} {% if demande.isOverdue %} ⛔ DÉPASSÉ {% endif %}
{{ demande.requestedAt|date('d/m/Y à H:i') }}
{% if jours is not null %}
{% if jours <= 0 %}⛔ DÉLAI DÉPASSÉ {% elseif jours <= 3 %}🔴 J-{{ jours }} — URGENT {% elseif jours <= 7 %}🟡 J-{{ jours }} jours {% else %}🟢 Échéance {{ demande.deadlineAt|date('d/m/Y') }} {% endif %}
{% endif %}
{# Métadonnées #}
Demandeur
{{ demande.nomDemandeur ?? '—' }}
Email
{{ demande.emailDemandeur ?? '—' }}
Statut
{{ demande.statusLabel }}
{% if demande.user %}
Compte lié
✅ User#{{ demande.user.id ?? '?' }} Voir →
{% else %}
Compte lié
Aucun compte trouvé
{% endif %} {% if demande.requestIp %}
IP
{{ demande.requestIp }}
{% endif %}
{# Notes admin #} {% if demande.notesAdmin %}
Notes admin :
{{ demande.notesAdmin }}
{% endif %} {# Actions #} {% if statut_actif == 'pending' %}
{% if demande.type == 'suppression' %} {% if demande.user %}
{% else %} ℹ️ Aucun compte — traitement manuel {% endif %} {% endif %}
{% endif %}
{% endfor %} {% endif %} {% endblock %}