{% extends 'app/base.html.twig' %} {% block title %}Plan Alimentaire — Analyse de conformité{% endblock %} {% block body %}

Plan Alimentaire

Analyse de conformité — Annexe 4.2 Recommandation Nutrition
{% if is_granted('ROLE_TENANT_ADMIN') %} Configurer {% endif %}
{# Info repas analysés #}
Analyse basée sur les {{ nb_repas }} derniers repas enregistrés (sur 20 repas/5 semaines consécutives). {% if nb_repas < 20 %} Données insuffisantes — ajoutez davantage de menus pour une analyse fiable. {% endif %}
{# Recommandations #}
Recommandations
{% for reco in recommandations %} {% if reco.type == 'success' %}
{{ reco.message }}
{% elseif reco.type == 'warning' %}
{{ reco.message }}
{% else %}
{{ reco.message }}
{% endif %} {% endfor %}
{# Groupes de conformité #} {% for groupeNom, items in groupes %}
{{ groupeNom }}
{% for key, data in items %}
{{ data.label }}
{% if data.description %} {{ data.description }} {% endif %}
{{ data.valeur }} {% if data.inverse is defined and data.inverse %} / {{ data.maximum }} max {% else %} / {{ data.minimum }} min {% endif %}
{# Barre de progression #} {% if data.inverse is defined and data.inverse %} {% set pct = data.maximum > 0 ? min(100, (data.valeur / data.maximum * 100)) : 0 %}
{% else %} {% set pct = data.minimum > 0 ? min(100, (data.valeur / data.minimum * 100)) : 0 %}
{% endif %}
{% endfor %}
{% endfor %}
{% endblock %}