{# @tailwind-safelist bg-primary/10 bg-cohorts/10 bg-warning/10 bg-error/10 bg-success/10 bg-info/10 bg-pink/10 bg-primary/[0.08] bg-cohorts/[0.08] bg-warning/[0.08] bg-error/[0.08] bg-success/[0.08] bg-info/[0.08] bg-pink/[0.08] bg-primary/[0.14] bg-cohorts/[0.14] bg-warning/[0.14] bg-error/[0.14] bg-success/[0.14] bg-info/[0.14] bg-pink/[0.14] text-primary text-cohorts text-warning text-error text-success text-info text-pink hover:bg-primary/[0.07] hover:bg-cohorts/[0.07] hover:bg-warning/[0.07] hover:bg-error/[0.07] hover:bg-success/[0.07] hover:bg-info/[0.07] hover:bg-pink/[0.07] has-[:checked]:from-primary/[0.08] has-[:checked]:from-cohorts/[0.08] has-[:checked]:from-warning/[0.08] has-[:checked]:from-error/[0.08] has-[:checked]:from-success/[0.08] has-[:checked]:from-info/[0.08] has-[:checked]:from-pink/[0.08] has-[:checked]:to-primary/[0.03] has-[:checked]:to-cohorts/[0.03] has-[:checked]:to-warning/[0.03] has-[:checked]:to-error/[0.03] has-[:checked]:to-success/[0.03] has-[:checked]:to-info/[0.03] has-[:checked]:to-pink/[0.03] group-hover/opt:border-primary group-hover/opt:border-cohorts group-hover/opt:border-warning group-hover/opt:border-error group-hover/opt:border-success group-hover/opt:border-info group-hover/opt:border-pink group-hover/opt:bg-primary/[0.14] group-hover/opt:bg-cohorts/[0.14] group-hover/opt:bg-warning/[0.14] group-hover/opt:bg-error/[0.14] group-hover/opt:bg-success/[0.14] group-hover/opt:bg-info/[0.14] group-hover/opt:bg-pink/[0.14] group-has-[:checked]/opt:bg-primary group-has-[:checked]/opt:bg-cohorts group-has-[:checked]/opt:bg-warning group-has-[:checked]/opt:bg-error group-has-[:checked]/opt:bg-success group-has-[:checked]/opt:bg-info group-has-[:checked]/opt:bg-pink group-has-[:checked]/opt:border-primary group-has-[:checked]/opt:border-cohorts group-has-[:checked]/opt:border-warning group-has-[:checked]/opt:border-error group-has-[:checked]/opt:border-success group-has-[:checked]/opt:border-info group-has-[:checked]/opt:border-pink group-has-[:checked]/opt:text-primary group-has-[:checked]/opt:text-cohorts group-has-[:checked]/opt:text-warning group-has-[:checked]/opt:text-error group-has-[:checked]/opt:text-success group-has-[:checked]/opt:text-info group-has-[:checked]/opt:text-pink #} {% extends 'base.html.twig' %} {% block title %}{{ isAdmin ? 'Gestion des utilisateurs - Admin' : 'Utilisateurs - ' ~ managerCompany.name }}{% endblock %} {% block body %}
| Utilisateur | Rôle | {% if isAdmin %}Entreprise | Plan | {% endif %} {# Tokens — en-tête triable (asc/desc), filtres courants préservés #} {% set _tokNextDir = (sort == 'tokens' and dir == 'desc') ? 'asc' : 'desc' %}Tokens {% if sort == 'tokens' %} {% else %} {% endif %} | {# Consommé (30 j) — en-tête triable (asc/desc), filtres courants préservés #} {% set _consNextDir = (sort == 'consumed' and dir == 'desc') ? 'asc' : 'desc' %}Consommé (30 j) {% if sort == 'consumed' %} {% else %} {% endif %} | Statut | Actions |
|---|---|---|---|---|---|---|---|
|
{% include '_atoms/avatar/avatar.html.twig' with {
name: user.fullName,
size: 'sm'
} only %}
{{ user.fullName }}
{% if user.isBetaTester or 'ROLE_BETA_TESTER' in user.roles %}
{% include '_atoms/icon/icon.html.twig' with { name: 'star', size: 'xs', color: 'warning' } only %}
{% endif %}
{{ user.email }}
{% if isAdmin and user.googleId %}
G: {{ user.googleId }}
{% endif %}
{{ user.createdAt|date('d/m/Y') }}
|
{# Rôle #}
{% if 'ROLE_ADMIN' in user.roles %} {% include '_atoms/badge/badge.html.twig' with { label: 'Admin', variant: 'error', size: 'sm' } only %} {% elseif 'ROLE_COMPANY_MANAGER' in user.roles %} {% include '_atoms/badge/badge.html.twig' with { label: 'Gestionnaire', variant: 'cohorts', size: 'sm' } only %} {% elseif 'ROLE_COMMERCIAL' in user.roles %} {% include '_atoms/badge/badge.html.twig' with { label: 'Commercial', variant: 'success', size: 'sm' } only %} {% else %} {% include '_atoms/badge/badge.html.twig' with { label: 'Utilisateur', variant: 'primary', size: 'sm' } only %} {% endif %} | {# Entreprise (admin only) #} {% if isAdmin %}{% if user.company %} {{ user.company.name }} {% else %} - {% endif %} | {# Plan (admin only) #}{% set sub = user.subscription %} {% set plan = sub ? sub.plan : null %} {% include '_atoms/plan-badge/plan-badge.html.twig' with { name: plan ? plan.name : null, gradient: plan ? plan.gradientCss : null, isFree: not (plan and not plan.isFree() and sub.isActive()), isAnnual: sub ? sub.isAnnual() : false, isB2B: user.isB2B() } only %} | {% endif %} {# Tokens #}{% if user.userToken %} {{ user.userToken.tokensRemaining|number_format(0, ',', ' ') }} {% else %} - {% endif %} | {# Tokens consommés sur les 30 derniers jours #}{% set consumed30d = tokensConsumed30d[user.id] ?? 0 %} {% if consumed30d > 0 %} {{ consumed30d|number_format(0, ',', ' ') }} {% else %} - {% endif %} | {# Statut #}
{% include '_atoms/badge/badge.html.twig' with {
preset: user.isActive ? 'user-active' : 'user-inactive',
size: 'sm'
} only %}
{% if not user.isEmailVerified %}
{% include '_atoms/badge/badge.html.twig' with {
label: 'Email non vérifié',
variant: 'warning',
size: 'xs'
} only %}
{% endif %}
|
{# Actions #}
{% if user != app.user %} {% endif %} |