feat: add users management tab to admin panel

New Sistema > Usuarios section with user listing, role badges
(ADMIN=blue, OWNER=purple, TALLER=green, BODEGA=orange),
activate/deactivate toggle, and pending users badge count.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-18 22:25:09 +00:00
parent 6c6a9eecd6
commit e5d074687a
2 changed files with 148 additions and 3 deletions

View File

@@ -668,6 +668,15 @@
<span>Exportar CSV</span>
</div>
</div>
<div class="sidebar-section">
<h3>Sistema</h3>
<div class="sidebar-item" data-section="users">
<span class="icon">👤</span>
<span>Usuarios</span>
<span class="badge" id="pendingUsersBadge" style="display:none; background:var(--warning); color:#000; font-size:0.7rem; padding:2px 6px; border-radius:10px; margin-left:auto;"></span>
</div>
</div>
</aside>
<!-- Main Content -->
@@ -1207,6 +1216,35 @@
</div>
</div>
</section>
<!-- Users Section -->
<section id="section-users" class="admin-section">
<div class="page-header">
<h1 class="page-title">Usuarios</h1>
</div>
<div class="card">
<div class="table-wrapper">
<table>
<thead>
<tr>
<th>Nombre</th>
<th>Email</th>
<th>Negocio</th>
<th>Rol</th>
<th>Activo</th>
<th>Último Login</th>
<th>Acciones</th>
</tr>
</thead>
<tbody id="usersTable">
<tr><td colspan="7" class="loading"><div class="spinner"></div></td></tr>
</tbody>
</table>
</div>
</div>
</section>
</main>
</div>