diff --git a/assets/css/styles.css b/assets/css/styles.css index b148420..5fbc4fb 100644 --- a/assets/css/styles.css +++ b/assets/css/styles.css @@ -1173,6 +1173,22 @@ body { box-shadow: 0 6px 18px rgba(220, 53, 69, 0.12); } +.conversation-attention { + display: inline-flex; + align-items: center; + justify-content: center; + width: 28px; + height: 28px; + border-radius: 50%; + background: #dc3545; + color: white; + font-size: 0.85rem; +} + +.conversation-attention i { + font-size: 0.9rem; +} + /* Notification bell indicator when there are unseen notifications */ #notification-bell.has-notifications { position: relative; diff --git a/assets/js/app.js b/assets/js/app.js index c05a904..6194c83 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -341,9 +341,12 @@ class WhatsAppBotManager { createConversationRow(conv) { const tr = document.createElement('tr'); + const attentionClass = conv.advisor_requested ? 'table-attention' : ''; + tr.className = attentionClass; + const attentionBadge = conv.advisor_requested ? `¡Atención!` : ''; tr.innerHTML = ` -
${conv.phone_number}
+
${conv.phone_number} ${attentionBadge}
${conv.name || 'Sin nombre'} ${this.truncateText(conv.last_message, 50)} diff --git a/assets/js/app_simple.js b/assets/js/app_simple.js index a0e8149..97fdc2f 100644 --- a/assets/js/app_simple.js +++ b/assets/js/app_simple.js @@ -627,6 +627,10 @@ class SimpleWhatsAppManager { const unreadBadge = (conv.unread_count && conv.unread_count > 0) ? `
${conv.unread_count}
` : ''; + // Attention badge for advisor requests (ensure defined for filtered view) + const attentionBadge = conv.advisor_requested ? `
` : ''; + const attentionClass = conv.advisor_requested ? ' attention' : ''; + const statusIcon = conv.last_direction === 'outgoing' ? '' : ''; diff --git a/index.php b/index.php index 7fe962e..5bf14f8 100644 --- a/index.php +++ b/index.php @@ -37,8 +37,8 @@ try { WhatsApp Bot Manager - - + + @@ -664,7 +664,7 @@ try { - +