{% extends "mag/base_mag_ecom.html" %} {% load static %} {% block title %}AUTO-PIECE — Comptes employés{% endblock title %} {% block page %}Comptes employés{% endblock page %} {% block extra_head %} {% endblock extra_head %} {% block page_action_buttons %} Excel {% endblock page_action_buttons %} {% block main_content %}
{# ── Modal : Nouveau compte ───────────────────────────────────────── #}

{{ comptes|length }} compte{% if comptes|length != 1 %}s{% endif %} employé{% if comptes|length != 1 %}s{% endif %} {% if search_q %} · « {{ search_q }} » {% endif %}

{% include "mag/partials/_alpine_table_toolbar.html" with search_placeholder="Filtrer dans le tableau…" %}
{% if user.is_superuser %}{% endif %} {% for c in comptes %} {% if user.is_superuser %} {% endif %} {% empty %} {% endfor %}
Nom utilisateur Email Rôle Genre LocalitéPermissionsActiver Actions
{{ c.username }} {{ c.email }} {{ c.get_role_display|default:c.role }} {{ c.genre|default:"—" }} {% if c.local_entrepot %}{{ c.local_entrepot.nom }}{% else %}—{% endif %}
{% if search_q %}Aucun compte ne correspond à « {{ search_q }} ».{% else %}Aucun compte.{% endif %}
{% if comptes %} {% include "mag/partials/_table_pager.html" %} {% endif %}
{# ── Modal : Modifier le compte ───────────────────────────────────── #} {# ── Modal : Modifier les permissions ─────────────────────────────── #}
{% endblock main_content %} {% block extra_js %} {% endblock extra_js %}