From c79ba4638c491916175a7c623f8a762ba1074046 Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Wed, 19 Nov 2025 09:57:04 -0300 Subject: [PATCH] Allow reassigning during active sessions --- convex/tickets.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/convex/tickets.ts b/convex/tickets.ts index 5feb4d5..88e3ca4 100644 --- a/convex/tickets.ts +++ b/convex/tickets.ts @@ -2805,11 +2805,7 @@ export const changeAssignee = mutation({ if (viewer.role === "MANAGER") { throw new ConvexError("Gestores não podem reatribuir chamados") } - const normalizedStatus = normalizeStatus(ticketDoc.status) const hasActiveSession = Boolean(ticketDoc.activeSessionId) - if (normalizedStatus === "AWAITING_ATTENDANCE" && !hasActiveSession) { - throw new ConvexError("Pause o atendimento antes de reatribuir o chamado") - } const currentAssigneeId = ticketDoc.assigneeId ?? null if (currentAssigneeId && currentAssigneeId !== actorId && !isAdmin) { throw new ConvexError("Somente o responsável atual pode reatribuir este chamado")