From 8c03751b15f07bdf8e52f618acfceba1e67abde8 Mon Sep 17 00:00:00 2001 From: marsalva Date: Mon, 23 Feb 2026 08:17:45 +0000 Subject: [PATCH] Actualizar usuarios.html --- usuarios.html | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/usuarios.html b/usuarios.html index f464a97..23bea87 100644 --- a/usuarios.html +++ b/usuarios.html @@ -466,18 +466,25 @@ let roleBadge = "OP. NORMAL"; let roleColor = "bg-blue-50 text-blue-600 border-blue-100"; + let toggleRoleBtnText = "Bolsa Off"; // Botón para cambiar rol if (u.role === 'operario_cerrado') { - roleBadge = "OP. CERRADO (SIN BOLSA)"; + roleBadge = "OP. CERRADO"; roleColor = "bg-amber-50 text-amber-600 border-amber-200"; + toggleRoleBtnText = "Bolsa On"; } else if (u.role === 'admin') { roleBadge = "ADMINISTRADOR"; roleColor = "bg-purple-50 text-purple-600 border-purple-200"; + toggleRoleBtnText = ""; // Los admin no tienen esto } else if (u.role === 'facturacion') { roleBadge = "FACTURACIÓN"; roleColor = "bg-emerald-50 text-emerald-600 border-emerald-200"; + toggleRoleBtnText = ""; } + // Generar el botón de alternar bolsa si aplica + const toggleRoleHtml = toggleRoleBtnText ? `` : ''; + tbody.innerHTML += ` @@ -497,6 +504,7 @@
${uZonesHtml}
+ ${toggleRoleHtml}