fix(helpdesk): hide zero-activity agents and add spacing in team dashboard

Filter out agents with 0 open tickets from Current tab and 0 resolved
from Performance tab to reduce noise. Add margin between period selector
and KPI card in the Performance panel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-05 18:58:10 +02:00
parent 0927dea7bb
commit 82c76d6119
3 changed files with 15 additions and 8 deletions

View File

@@ -100,9 +100,10 @@ if (container) {
if (!elCurrentBody) return;
elCurrentBody.replaceChildren();
const maxOpen = Math.max(1, ...members.map(m => m.open_tickets));
const visible = members.filter(m => m.open_tickets > 0 || m.critical_tickets > 0);
const maxOpen = Math.max(1, ...visible.map(m => m.open_tickets));
for (const m of members) {
for (const m of visible) {
const tr = document.createElement('tr');
const isUnassigned = m.support_user === '';
@@ -132,11 +133,13 @@ if (container) {
if (!elPerformanceBody) return;
elPerformanceBody.replaceChildren();
const sorted = [...members].sort((a, b) => {
if (a.support_user === '') return 1;
if (b.support_user === '') return -1;
return b.resolved_in_period - a.resolved_in_period;
});
const sorted = [...members]
.filter(m => m.resolved_in_period > 0)
.sort((a, b) => {
if (a.support_user === '') return 1;
if (b.support_user === '') return -1;
return b.resolved_in_period - a.resolved_in_period;
});
const maxResolved = Math.max(1, ...sorted.map(m => m.resolved_in_period));