2026-07-14 16:38:59 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
{% block titre %}Alertes - Gestion de stock IT{% endblock %}
|
|
|
|
|
{% block contenu %}
|
|
|
|
|
<h1>Destinataires des alertes de stock bas</h1>
|
|
|
|
|
|
2026-07-14 17:06:37 +00:00
|
|
|
<form method="get" action="/destinataires" class="barre-recherche">
|
|
|
|
|
<input type="search" name="q" value="{{ q }}" placeholder="Rechercher un email…">
|
|
|
|
|
{% if q %}<a href="/destinataires" class="lien-effacer">Effacer</a>{% endif %}
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<ul class="liste-resultats">
|
2026-07-14 16:38:59 +00:00
|
|
|
{% for destinataire in destinataires %}
|
|
|
|
|
<li>
|
2026-07-14 17:06:37 +00:00
|
|
|
<span>{{ destinataire.email }}</span>
|
2026-07-14 16:38:59 +00:00
|
|
|
<form method="post" action="/destinataires/{{ destinataire.id }}/supprimer" class="formulaire-inline">
|
|
|
|
|
<button type="submit" class="bouton-danger">Supprimer</button>
|
|
|
|
|
</form>
|
|
|
|
|
</li>
|
|
|
|
|
{% else %}
|
2026-07-14 17:06:37 +00:00
|
|
|
<li class="liste-vide">
|
|
|
|
|
{% if q %}Aucun destinataire ne correspond à « {{ q }} ».{% else %}Aucun destinataire configuré : aucune alerte ne sera envoyée.{% endif %}
|
|
|
|
|
</li>
|
2026-07-14 16:38:59 +00:00
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<form method="post" action="/destinataires" class="formulaire-inline">
|
|
|
|
|
<input type="email" name="email" placeholder="email@clinique.local" required>
|
|
|
|
|
<button type="submit">Ajouter</button>
|
|
|
|
|
</form>
|
|
|
|
|
{% endblock %}
|