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:
@@ -104,7 +104,7 @@ $periodLabels = [
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-tab-panel="performance">
|
<div data-tab-panel="performance" class="helpdesk-team-performance-panel">
|
||||||
<div class="helpdesk-segment-control" id="team-period-selector">
|
<div class="helpdesk-segment-control" id="team-period-selector">
|
||||||
<?php foreach ($periods as $p): ?>
|
<?php foreach ($periods as $p): ?>
|
||||||
<input type="radio" name="team-period" id="team-period-<?php e($p); ?>" value="<?php e($p); ?>"<?php if ($p === 90): ?> checked<?php endif; ?>>
|
<input type="radio" name="team-period" id="team-period-<?php e($p); ?>" value="<?php e($p); ?>"<?php if ($p === 90): ?> checked<?php endif; ?>>
|
||||||
|
|||||||
@@ -171,6 +171,10 @@
|
|||||||
color: var(--app-muted-color);
|
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 */
|
/* Muted zero values — de-emphasize non-information */
|
||||||
.helpdesk-team-muted {
|
.helpdesk-team-muted {
|
||||||
color: var(--app-muted-color);
|
color: var(--app-muted-color);
|
||||||
|
|||||||
@@ -100,9 +100,10 @@ if (container) {
|
|||||||
if (!elCurrentBody) return;
|
if (!elCurrentBody) return;
|
||||||
elCurrentBody.replaceChildren();
|
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 tr = document.createElement('tr');
|
||||||
const isUnassigned = m.support_user === '';
|
const isUnassigned = m.support_user === '';
|
||||||
|
|
||||||
@@ -132,11 +133,13 @@ if (container) {
|
|||||||
if (!elPerformanceBody) return;
|
if (!elPerformanceBody) return;
|
||||||
elPerformanceBody.replaceChildren();
|
elPerformanceBody.replaceChildren();
|
||||||
|
|
||||||
const sorted = [...members].sort((a, b) => {
|
const sorted = [...members]
|
||||||
if (a.support_user === '') return 1;
|
.filter(m => m.resolved_in_period > 0)
|
||||||
if (b.support_user === '') return -1;
|
.sort((a, b) => {
|
||||||
return b.resolved_in_period - a.resolved_in_period;
|
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));
|
const maxResolved = Math.max(1, ...sorted.map(m => m.resolved_in_period));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user