feat(helpdesk): add trend delta indicator per agent in team dashboard
Shows a small arrow next to the ticket count in each agent card header: ↑3 (orange) = received 3 more than resolved → backlog growing ↓2 (green) = resolved 2 more than received → backlog shrinking Hidden when delta is 0 (stable). Delta is computed from received_in_period (tickets created in the selected period assigned to this agent) minus resolved_in_period. No snapshot storage needed — derived from existing ticket data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -110,6 +110,15 @@ if (container) {
|
||||
title.appendChild(document.createTextNode(name));
|
||||
|
||||
title.appendChild(h('span', 'helpdesk-team-title-count', count));
|
||||
|
||||
// Trend delta: ↑3 (growing) or ↓2 (shrinking)
|
||||
const delta = m.trend_delta ?? 0;
|
||||
if (delta !== 0) {
|
||||
const arrow = delta > 0 ? '↑' : '↓';
|
||||
const cls = delta > 0 ? 'helpdesk-team-trend-up' : 'helpdesk-team-trend-down';
|
||||
title.appendChild(h('span', cls, arrow + Math.abs(delta)));
|
||||
}
|
||||
|
||||
section.appendChild(title);
|
||||
|
||||
// Ticket table
|
||||
|
||||
Reference in New Issue
Block a user