diff --git a/servicios.html b/servicios.html index f1415b1..24314be 100644 --- a/servicios.html +++ b/servicios.html @@ -354,24 +354,29 @@ } // 2. RENDERIZAR BOTONERA DE ESTADOS (CHIPS) - function renderStatusPills() { + function renderStatusPills() { const container = document.getElementById('statusPills'); let html = ` - `; systemStatuses.forEach(st => { const isActive = activeStatusFilter === String(st.id); - const colorData = colorDict[st.color] || colorDict['gray']; + // Usamos tu diccionario directamente para evitar fallos de Tailwind + const c = colorDict[st.color] || colorDict['gray']; - const activeClasses = `bg-white border-${st.color}-400 text-${st.color}-700 shadow-md ring-2 ring-${st.color}-100`; + // Extraemos el nombre del color base (ej: de 'bg-blue-100' sacamos 'blue') + const colorBase = c.bg.split('-')[1]; + + // Clases seguras + const activeClasses = `bg-white border-${colorBase}-400 text-${colorBase}-700 shadow-md ring-2 ring-${colorBase}-100`; const inactiveClasses = `bg-white border-slate-200 text-slate-500 hover:bg-slate-50`; html += ` `;