From bddce33217d4153c720ea66f856f4ebbad37e47d Mon Sep 17 00:00:00 2001 From: rever-tecnologia Date: Wed, 17 Dec 2025 14:39:39 -0300 Subject: [PATCH] fix(dashboard): "Em andamento" conta apenas tickets com play ativo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Tickets com status AWAITING_ATTENDANCE mas sem play ativo agora contam como "Em aberto" - "Em andamento" mostra apenas tickets onde working === true 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- convex/queues.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/convex/queues.ts b/convex/queues.ts index 2f70228..78bb6a9 100644 --- a/convex/queues.ts +++ b/convex/queues.ts @@ -154,10 +154,17 @@ export const summary = query({ const now = Date.now(); for (const ticket of tickets) { const status = normalizeStatus(ticket.status); + const isWorking = ticket.working === true; if (status === "PENDING") { pending += 1; } else if (status === "AWAITING_ATTENDANCE") { - inProgress += 1; + // "Em andamento" conta apenas tickets com play ativo + if (isWorking) { + inProgress += 1; + } else { + // Tickets em atendimento sem play ativo contam como "Em aberto" + pending += 1; + } } else if (status === "PAUSED") { paused += 1; }