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) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 19:24:37 +02:00
parent 70bfbbdc30
commit 49c3741c66
3 changed files with 51 additions and 15 deletions

View File

@@ -9,6 +9,7 @@ if (container) {
const dataUrl = container.dataset.teamWorkloadUrl;
const labelQueue = container.dataset.labelQueue || 'Queue';
const labelTickets = container.dataset.labelTickets || 'Tickets';
const labelCritical = container.dataset.labelCritical || 'Critical (>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) {