From 49c3741c66de7c1e4bdd57c94c17164e50b2c8e7 Mon Sep 17 00:00:00 2001 From: fs Date: Sun, 5 Apr 2026 19:24:37 +0200 Subject: [PATCH] fix(helpdesk): neutral count badges, bordered tables, critical legend - Count badge in section title is always neutral (no warning color) - Critical highlighting only on ticket number, not entire row - Ticket tables have border + border-radius + subtle header background matching the existing table widget pattern - Legend at bottom explains the warning color when critical tickets exist Co-Authored-By: Claude Opus 4.6 (1M context) --- .../pages/helpdesk/team/index(default).phtml | 1 + modules/helpdesk/web/css/helpdesk.css | 49 ++++++++++++++----- modules/helpdesk/web/js/helpdesk-team.js | 16 ++++-- 3 files changed, 51 insertions(+), 15 deletions(-) diff --git a/modules/helpdesk/pages/helpdesk/team/index(default).phtml b/modules/helpdesk/pages/helpdesk/team/index(default).phtml index f0a2dae..2e3672e 100644 --- a/modules/helpdesk/pages/helpdesk/team/index(default).phtml +++ b/modules/helpdesk/pages/helpdesk/team/index(default).phtml @@ -21,6 +21,7 @@ $periodLabels = [ data-label-tickets="" data-label-error="" data-label-empty="" + data-label-critical="48h open)')); ?>" >
48h open)'; const elLoading = document.getElementById('team-loading'); const elError = document.getElementById('team-error'); @@ -87,9 +88,7 @@ if (container) { } title.appendChild(document.createTextNode(name)); - const badge = h('span', 'helpdesk-team-title-count', count); - if (m.critical_tickets > 0) badge.classList.add('helpdesk-team-title-count-warning'); - title.appendChild(badge); + title.appendChild(h('span', 'helpdesk-team-title-count', count)); section.appendChild(title); // Ticket table @@ -139,6 +138,17 @@ if (container) { if (queue) elCurrentCards.appendChild(buildAgentWidget(queue, true)); for (const m of agents) elCurrentCards.appendChild(buildAgentWidget(m, false)); + + // Legend + const hasCritical = members.some(m => m.critical_tickets > 0); + if (hasCritical) { + const legend = h('div', 'helpdesk-team-legend'); + const item = h('span', 'helpdesk-team-legend-item'); + item.appendChild(h('span', 'helpdesk-team-legend-dot helpdesk-team-legend-dot-warning')); + item.appendChild(h('span', '', labelCritical)); + legend.appendChild(item); + elCurrentCards.appendChild(legend); + } } function renderPerformanceTab(members) {