diff --git a/usuarios.html b/usuarios.html index af6670a..f330d24 100644 --- a/usuarios.html +++ b/usuarios.html @@ -10,7 +10,7 @@ /* VARIABLES CORPORATIVAS DINÁMICAS */ :root { --primary: #2563eb; - --secondary: #10b981; /* Verde base para algunas acciones */ + --secondary: #10b981; --app-bg: #f8fafc; } @@ -23,8 +23,6 @@ .text-primary-dynamic { color: var(--primary) !important; } .bg-primary-dynamic { background-color: var(--primary) !important; } .border-primary-dynamic { border-color: var(--primary) !important; } - .ring-primary-dynamic { --tw-ring-color: var(--primary) !important; } - .focus\:ring-primary-dynamic:focus { --tw-ring-color: var(--primary) !important; } @@ -46,7 +44,7 @@
- +
@@ -81,10 +79,11 @@
- - + + +
@@ -425,6 +424,7 @@ document.getElementById('uEmail').value = ""; document.getElementById('uPhone').value = ""; document.getElementById('uPass').value = ""; + document.getElementById('uRole').value = "operario"; // Reset al valor por defecto tempUserZones = []; renderTempZones(); document.getElementById('formTitle').innerText = "2. Nueva Ficha de Usuario"; @@ -468,6 +468,20 @@ return `
${city} (${groupedZones[city].join(", ")})
`; }).join("") || 'Sin zona'; + let roleBadge = "OP. NORMAL"; + let roleColor = "bg-blue-50 text-blue-600 border-blue-100"; + + if (u.role === 'operario_cerrado') { + roleBadge = "OP. CERRADO (SIN BOLSA)"; + roleColor = "bg-amber-50 text-amber-600 border-amber-200"; + } else if (u.role === 'admin') { + roleBadge = "ADMINISTRADOR"; + roleColor = "bg-purple-50 text-purple-600 border-purple-200"; + } else if (u.role === 'facturacion') { + roleBadge = "FACTURACIÓN"; + roleColor = "bg-emerald-50 text-emerald-600 border-emerald-200"; + } + tbody.innerHTML += ` @@ -482,7 +496,7 @@ ${u.phone} - ${u.role} + ${roleBadge}

${uGuildNames || '-'}

${uZonesHtml}