{% extends 'app/base.html.twig' %} {% block title %}Archives HACCP{% endblock %} {% block body %}

Archives HACCP

Tous les documents enregistrés

Retour {% if is_granted('ROLE_TENANT_GESTIONNAIRE') %} Téléverser {% endif %}
{# ── Filtres ───────────────────────────────────────────────────────────────── #}
{% if categorie or mois != "now"|date('n') or annee != "now"|date('Y') %} {% endif %}
{# ── Liste des documents ─────────────────────────────────────────────────── #} {% if documents is empty %}
Aucun document pour ces critères.
{% else %}
{% for doc in documents %} {% set catInfo = categories[doc.categorie] ?? {label: doc.categorie, icone: 'fas fa-folder', couleur: 'secondary'} %} {% endfor %}
Type Catégorie Document Mois Statut Date Actions
{% if doc.type == 'filled' %} Formulaire {% else %} PDF uploadé {% endif %} {{ catInfo.label }} {{ doc.nom_original }} {% if doc.mois and doc.annee %} {{ ['Jan','Fév','Mar','Avr','Mai','Juin','Juil','Août','Sep','Oct','Nov','Déc'][doc.mois-1] }} {{ doc.annee }} {% else %}—{% endif %} {% if doc.status == 'finalized' %} Finalisé {% else %} Brouillon {% endif %} {{ doc.date_creation|date('d/m/Y') }}
{% if doc.type == 'filled' %} {% if doc.status == 'draft' and is_granted('ROLE_TENANT_USER') %} {% endif %} {% else %} {% endif %} {% if is_granted('ROLE_TENANT_GESTIONNAIRE') %}
{% endif %}
{{ documents|length }} document{% if documents|length > 1 %}s{% endif %} trouvé{% if documents|length > 1 %}s{% endif %}
{% endif %} {% endblock %}