{% extends "base.html.twig" %}
{% block body %}
{% set basePath = path('admin.pointage', {
'sort': sortField,
'order': sortOrder,
'user': userFilter ?? '',
'period': period,
'page': 1
}) %}
{# FILTRES#}
{# Utilisateurs #}
Utilisateurs
Tous
{% for u in users %}
{{ u.username }}
{% endfor %}
{# Séparateur #}
{# Période#}
{% if dateStartInput and dateEndInput %}
{{ dateStartInput|date('d/m/Y') }} → {{ dateEndInput|date('d/m/Y') }}
Effacer
{% else %}
Périodicité
Jour
Semaine
Mois
Année
Tout
{% endif %}
{# Dates personnalisées #}
{% if not dateStartInput or not dateEndInput %}
Du
Au
OK
{% endif %}
{# PAGINATION #}
{% if (dateStartInput and dateEndInput) == false and period != 'global' %}
période affichée :
{% if period == 'day' %}{{ dateStart|date('d/m/Y') }}
{% elseif period == 'week' %}{{ dateStart|date('d/m/Y') }} → {{ dateEnd|date('d/m/Y') }}
{% elseif period == 'month' %}{{ dateStart|date('m/Y') }}
{% elseif period == 'year' %}{{ dateStart|date('Y') }}{% endif %}
{% endif %}
{# Tableau des pointages#}
Utilisateur
Date
Entrée
Début pause
Fin pause
Sortie
Total
Actions
{% for pointage in pointages %}
{{ pointage.utilisateur ? pointage.utilisateur.username : 'Utilisateur inconnu' }}
{{ pointage.datePointage ? pointage.datePointage|date('d/m/Y') : 'N/A' }}
{{ pointage.heureEntree ? pointage.heureEntree|date('H:i') : '—' }}
{{ pointage.heureDebutPause ? pointage.heureDebutPause|date('H:i') : '—' }}
{{ pointage.heureFinPause ? pointage.heureFinPause|date('H:i') : '—' }}
{{ pointage.heureSortie ? pointage.heureSortie|date('H:i') : '—' }}
{{ pointage.totalTravailFormatted ?? 'N/A' }}
Éditer
Supprimer
{% else %}
Aucun pointage enregistré
{% endfor %}
Récapitulatif par utilisateur
Utilisateur
Période
Jours travaillés
Total
{% if recapParUtilisateur|length > 0 %}
{% for row in recapParUtilisateur %}
{{ row.user.username }}
{% if period == 'global' %}
Toute la période
{% elseif period == 'day' %}
{{ dateStart|date('d/m/Y') }}
{% else %}
du {{ dateStart|date('d/m/Y') }} au {{ dateEnd|date('d/m/Y') }}
{% endif %}
{{ row.joursTravailles }}
{{ row.totalFormatted }}
{% endfor %}
{% else %}
Aucun pointage sur la période sélectionnée
{% endif %}