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) {