{% extends 'gestion/_base.html.twig' %} {% set active = 'notifications' %} {% block title %}Notifications{% endblock %} {% set typeIcons = { 'vente': 'green', 'livraison': 'green', 'suivi_anomalie': 'red', 'reservation': 'ember', 'demande_affutage': 'dark', 'systeme': 'neutral' } %} {% block content %}
Pilotage

Notifications

{{ unread }} non lue{{ unread > 1 ? 's' }} — ventes, livraisons, anomalies, réservations.

{% if unread > 0 %} {% endif %}
Toutes {% for type in types %} {{ type.label }} {% endfor %}
{% if notifications is empty %}

Aucune notification{{ filtre ? ' de ce type' }}.

{% else %}
{# Sous 768 px, la ligne se replie : badge de type, puis le texte, puis les actions pleine largeur (cf. §18 du DS). #} {% for notification in notifications %}
{{ notification.type.label }}
{{ notification.titre }} {% if notification.message %}
{{ notification.message }}
{% endif %}
{{ notification.createdAt|date('d/m/Y H:i') }}
{% if notification.url %} Voir {% endif %} {% if not notification.read %} {% endif %}
{% endfor %}
{% endif %} {% endblock %} {% block scripts %} {% endblock %}