From 82c76d6119627f1869ef8d3e8c1854d7b1958b78 Mon Sep 17 00:00:00 2001 From: fs Date: Sun, 5 Apr 2026 18:58:10 +0200 Subject: [PATCH] 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) --- .../pages/helpdesk/team/index(default).phtml | 2 +- modules/helpdesk/web/css/helpdesk.css | 4 ++++ modules/helpdesk/web/js/helpdesk-team.js | 17 ++++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/modules/helpdesk/pages/helpdesk/team/index(default).phtml b/modules/helpdesk/pages/helpdesk/team/index(default).phtml index 6b291b4..9bd35e2 100644 --- a/modules/helpdesk/pages/helpdesk/team/index(default).phtml +++ b/modules/helpdesk/pages/helpdesk/team/index(default).phtml @@ -104,7 +104,7 @@ $periodLabels = [ -
+
checked> diff --git a/modules/helpdesk/web/css/helpdesk.css b/modules/helpdesk/web/css/helpdesk.css index 329d809..2e98630 100644 --- a/modules/helpdesk/web/css/helpdesk.css +++ b/modules/helpdesk/web/css/helpdesk.css @@ -171,6 +171,10 @@ color: var(--app-muted-color); } + .helpdesk-team-performance-panel > .helpdesk-segment-control { + margin-bottom: calc(var(--app-spacing) * 0.75); + } + /* Muted zero values — de-emphasize non-information */ .helpdesk-team-muted { color: var(--app-muted-color); diff --git a/modules/helpdesk/web/js/helpdesk-team.js b/modules/helpdesk/web/js/helpdesk-team.js index df15e4f..fb92e3c 100644 --- a/modules/helpdesk/web/js/helpdesk-team.js +++ b/modules/helpdesk/web/js/helpdesk-team.js @@ -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));