{% set currentRoute = app.request.attributes.get('_route') %}
{# --- SECTION 1 : TABLEAU DE BORD --- #}
-
{# Détermination de la route selon la hiérarchie des rôles #}
{% if is_granted('ROLE_ADMIN') or is_granted('ROLE_SUPERVISEUR') %}
{% set dashboardRoute = 'app_admin_dashboard' %}
{% elseif is_granted('ROLE_COMPTABLE') %}
{% set dashboardRoute = 'app_comptable_dashboard' %}
{% elseif is_granted('ROLE_TECHNICIEN') %}
{% set dashboardRoute = 'app_technique_dashboard' %}
{% elseif is_granted('ROLE_COMMERCIAL') %}
{% set dashboardRoute = 'app_commercial_dashboard' %}
{% else %}
{% set dashboardRoute = 'app_client_espace' %}
{% endif %}
Tableau de bord
{# --- SECTION 2 : ADMINISTRATION (Admin uniquement) --- #}
{% if is_granted('ROLE_SUPERVISEUR') %}
{% endif %}
{% if is_granted('ROLE_COMPTABLE') %}
{% endif %}
{% if 'ROLE_TECHNICIEN' in app.user.roles %}
{% endif %}
{# --- SECTION 3 : ESPACE COMMERCIAL --- #}
{% if 'ROLE_COMMERCIAL' in app.user.roles %}
{% endif %}
{# --- SECTION 4 : ESPACE ACQUÉREUR --- #}
{% if is_granted('ROLE_CLIENT') and not is_granted('ROLE_STAFF') %}
{% endif %}
{# --- SECTION 5 : PARAMÈTRES (Admin uniquement) --- #}
{% if is_granted('ROLE_ADMIN') %}
{% endif %}
{# Footer déconnexion #}