From 521ca9743fbdbd62a4306949815baae976e532ef Mon Sep 17 00:00:00 2001 From: Vitex Tecnologia Date: Fri, 5 Jun 2026 13:46:40 -0300 Subject: [PATCH] ajuste responsividade modal de alterar competencia da tarefa --- .../pages/FechamentoDetalhes.tsx | 27 +++++-------------- src/services/fechamento/fechamentos.ts | 1 + 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/modules/intelligence-score/pages/FechamentoDetalhes.tsx b/src/modules/intelligence-score/pages/FechamentoDetalhes.tsx index f3d0c52..db4fcf8 100644 --- a/src/modules/intelligence-score/pages/FechamentoDetalhes.tsx +++ b/src/modules/intelligence-score/pages/FechamentoDetalhes.tsx @@ -172,19 +172,6 @@ function formatDateOnly(value: string | null): string { return parsed.toLocaleDateString("pt-BR"); } -function formatDateTime(value: string | null): string { - if (!value) return "—"; - const parsed = new Date(value); - if (Number.isNaN(parsed.getTime())) return "—"; - return parsed.toLocaleString("pt-BR", { - day: "2-digit", - month: "2-digit", - year: "numeric", - hour: "2-digit", - minute: "2-digit", - }); -} - function normalizeTextFilter(value: string): string { return value.trim().toLocaleLowerCase("pt-BR"); } @@ -1153,7 +1140,7 @@ export default function FechamentoDetalhes() { setReprocessandoAsana(true); const data = await fechamentoFechamentosService.reprocessarAsana(fechamentoId); toast.success( - `Reprocessamento concluído: ${data.tarefasImportadas} tarefa(s) atualizada(s) para este parceiro.`, + `Reprocessamento concluído: ${data.tarefasImportadas} tarefa(s) atualizada(s), ${data.tarefasRemovidasForaCompetencia} removida(s) fora da competência.`, ); setIsReprocessAsanaOpen(false); await loadTarefas(); @@ -1610,7 +1597,7 @@ export default function FechamentoDetalhes() { {getTipoLancamentoLabel(tarefa.tipo)} {formatDateOnly(tarefa.dataInicio)} {formatDateOnly(tarefa.dataVencimento)} - {formatDateTime(tarefa.dataConclusao)} + {formatDateOnly(tarefa.dataConclusao)} {tarefa.etiquetas && tarefa.etiquetas.length > 0 ? (
@@ -1832,7 +1819,7 @@ export default function FechamentoDetalhes() { } }} > - + {tarefasAlteracaoCompetencia.length <= 1 @@ -1845,13 +1832,13 @@ export default function FechamentoDetalhes() { : "Mova as tarefas selecionadas para outra competência em aberto. O histórico de cada alteração ficará registrado."} -
+
{tarefasAlteracaoCompetencia.length > 1 ? ( -
+
-
    +
      {tarefasAlteracaoCompetencia.slice(0, 5).map((t) => ( -
    • +
    • {t.descricao}
    • ))} diff --git a/src/services/fechamento/fechamentos.ts b/src/services/fechamento/fechamentos.ts index 2d86296..beced10 100644 --- a/src/services/fechamento/fechamentos.ts +++ b/src/services/fechamento/fechamentos.ts @@ -84,6 +84,7 @@ type ReprocessarAsanaResponse = { tarefasRecebidas: number; tarefasImportadas: number; tarefasIgnoradasSemParceiro: number; + tarefasRemovidasForaCompetencia: number; chamadasSubtarefasAsana: number; }; };