Commandes
{# {% if is_granted('ROLE_ADMIN') %}| N° | Utilisateur | Produits | Date | Note | Action | |
|---|---|---|---|---|---|---|
| {{ commande.id }} | {{ commande.user.name }} {{commande.user.surname}} | {#{% set countProduits = 0 %} {% for element in commande.demande.toArray %} {% set countProduits = countProduits + element.quantite %} {% endfor %} {{ countProduits }} | #}{% set uniqueProduits = [] %} {% for element in commande.demande.toArray %} {% if element.produit not in uniqueProduits %} {% set uniqueProduits = uniqueProduits|merge([element.produit]) %} {% endif %} {% endfor %} {{ uniqueProduits|length }} | {{ commande.createdAt|date('d-m-Y') }} | {{ commande.details|slice(0, 50) }} | {# #} {% if is_granted('ROLE_ADMIN') %} {% endif %} |