up
This commit is contained in:
@@ -120,6 +120,18 @@ body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Small badge placed inside sidebar items */
|
||||
.sidebar-menu .nav-link .sidebar-badge {
|
||||
position: absolute;
|
||||
right: 14px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
font-size: 0.72rem;
|
||||
padding: 0.12rem 0.36rem;
|
||||
border-radius: 999px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Divisor del sidebar */
|
||||
.sidebar-divider {
|
||||
margin: 10px 20px;
|
||||
|
||||
@@ -193,6 +193,14 @@ class WhatsAppBotManager {
|
||||
document.getElementById('conversations-today').textContent = stats.conversations_today || 0;
|
||||
document.getElementById('active-users').textContent = stats.active_users || 0;
|
||||
document.getElementById('total-conversations').textContent = stats.total_conversations || 0;
|
||||
|
||||
// Actualizar badge de conversaciones en el menú lateral
|
||||
const convBadge = document.getElementById('conversations-count');
|
||||
if (convBadge) {
|
||||
const val = stats.total_conversations || 0;
|
||||
convBadge.textContent = val;
|
||||
convBadge.style.display = val > 0 ? 'inline-block' : 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -273,6 +273,14 @@ class SimpleWhatsAppManager {
|
||||
this.log(`Estadística actualizada: ${item.id} = ${item.value}`);
|
||||
}
|
||||
});
|
||||
|
||||
// Actualizar badge de conversaciones en el menú lateral (compatibilidad con versión simple)
|
||||
const convBadge = document.getElementById('conversations-count');
|
||||
if (convBadge) {
|
||||
const val = stats.total_conversations || 0;
|
||||
convBadge.textContent = val;
|
||||
convBadge.style.display = val > 0 ? 'inline-block' : 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user