{# Header fixe avec titre + recherche + actions #}
{# Ligne 1 : Titre + Actions #}
{# Actions #}
{# Ligne 2 : Barre de recherche (composition d'atomes : icon) #}
{# Corps scrollable #}
{% include '_atoms/icon/icon.html.twig' with { name: 'users-group', size: 'md', color: 'primary' } only %}
Équipe
{{ stats.users|length }} membre{{ stats.users|length > 1 ? 's' : '' }}
{% include '_atoms/button/button.html.twig' with {
label: 'Tout remettre à 0',
variant: 'soft-error',
size: 'sm',
icon: 'refresh',
radius: 'lg',
attr: { id: 'reset-all-btn' }
} only %}
{% include '_atoms/icon/icon.html.twig' with { name: 'search', size: 'sm', color: 'muted' } only %}
{% if stats.users|length > 0 %}
{% else %}
{% include '_molecules/empty-state/empty-state.html.twig' with {
title: 'Aucun utilisateur actif',
description: "Il n'y a pas d'utilisateur actif dans cette entreprise.",
icon: 'users',
size: 'md'
} only %}
{% endif %}
{% for userStat in stats.users|sort((a, b) => a.user.fullName <=> b.user.fullName) %}
{% set member = userStat.user %}
{% set allocation = userStat.monthlyAllocation %}
{% set percentage = stats.monthlyBudget > 0 ? (allocation / stats.monthlyBudget * 100)|round : 0 %}
{% endfor %}
{# Message "aucun résultat" (caché par défaut, affiché par JS) #}
{# Infos utilisateur #}
{% include '_atoms/avatar/avatar.html.twig' with {
name: member.fullName,
size: 'sm'
} only %}
{# Slider + Input #}
{{ member.fullName }}
Solde : {{ userStat.currentBalance|number_format(0, ',', ' ') }}
{% include '_atoms/icon/icon.html.twig' with { name: 'search', size: 'xl', color: 'muted' } only %}
Aucun membre trouvé
Essayez avec un autre nom