{% extends "base.html" %} {% block title %}Multiplicadores e Usuários — {{ app_name }}{% endblock %} {% block content %}
Gestão de contas, hierarquia e permissões da equipe
| Nome / CPF | E-mail / Gmail | Perfil | Superior Hierárquico | Progresso da Meta (Definida pelo Admin) | Status | Ações |
|---|---|---|---|---|---|---|
|
{{ u.nome }}
{% if u.cpf %}
CPF: {{ u.cpf }} {% endif %} |
{{ u.email or 'N/A (CPF)' }} | {% if u.perfil == 'cadastrador' %}MULTIPLICADOR{% else %}{{ u.perfil|upper }}{% endif %} | {% if u.cadastrador_pai %} {{ u.cadastrador_pai.nome }} {% else %} Raiz / Sem Superior {% endif %} |
{% if u.perfil == 'cadastrador' %}
{% set meta_info = u.meta_rel %}
{% set meta_val = meta_info.meta if meta_info else (campanha.meta_por_cadastrador if campanha else 50) %}
{% set qtd_val = u.cadastros|length %}
{{ qtd_val }} / {{ meta_val }} apoiadores
{{ ((qtd_val / meta_val) * 100)|round(1) if meta_val > 0 else 0 }}% Atingido {% else %} — {% endif %} |
{% if u.solicitou_reset %} ⚠️ Reset Solicitado {% elif u.ativo %} Ativo {% else %} Inativo {% endif %} | {% if current_user.can_create_cadastrador() %} {% endif %} {% if current_user.can_manage_users() or (current_user.perfil == 'cadastrador' and u.cadastrador_pai_id == current_user.id) %} Editar {% endif %} {% if u.perfil == 'cadastrador' %} Ver Rede {% endif %} {% if current_user.can_manage_users() %} {% endif %} |
| Nenhum usuário cadastrado. | ||||||