42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %} — Tenants{% endblock %}
|
|
{% block content %}
|
|
<h1>Tenants ({{ tenants|length }})</h1>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>chat_id</th>
|
|
<th>Nombre</th>
|
|
<th>Estado</th>
|
|
<th>Tono</th>
|
|
<th>Timezone</th>
|
|
<th>Cédula</th>
|
|
<th>Último activo</th>
|
|
<th>Acciones</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for t in tenants %}
|
|
<tr>
|
|
<td><a href="/tenants/{{ t.chat_id }}">{{ t.chat_id }}</a></td>
|
|
<td>{{ t.nombre_preferido or "—" }}</td>
|
|
<td><span class="badge badge-{{ t.estado or 'pendiente' }}">{{ t.estado or "pendiente" }}</span></td>
|
|
<td>{{ t.tono or "—" }}</td>
|
|
<td>{{ t.timezone or "—" }}</td>
|
|
<td><code>{{ t.cedula_masked }}</code></td>
|
|
<td>{{ (t.last_active or "")[:19] }}</td>
|
|
<td>
|
|
<a href="/tenants/{{ t.chat_id }}" class="btn btn-primary btn-sm">Ver</a>
|
|
<form method="post" action="/tenants/{{ t.chat_id }}/resetear"
|
|
onsubmit="return confirm('¿Resetear tenant {{ t.chat_id }}? Esta acción borra el tenant y su snapshot.')">
|
|
<button type="submit" class="btn btn-danger btn-sm">Resetear</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="8" style="text-align:center;color:#999">Sin tenants registrados</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endblock %}
|