ajuste responsividade modal de alterar competencia da tarefa

This commit is contained in:
Vitex Tecnologia
2026-06-05 13:46:40 -03:00
parent 8a77c0dd31
commit 521ca9743f
2 changed files with 8 additions and 20 deletions
@@ -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() {
<TableCell>{getTipoLancamentoLabel(tarefa.tipo)}</TableCell>
<TableCell>{formatDateOnly(tarefa.dataInicio)}</TableCell>
<TableCell>{formatDateOnly(tarefa.dataVencimento)}</TableCell>
<TableCell>{formatDateTime(tarefa.dataConclusao)}</TableCell>
<TableCell>{formatDateOnly(tarefa.dataConclusao)}</TableCell>
<TableCell>
{tarefa.etiquetas && tarefa.etiquetas.length > 0 ? (
<div className="flex flex-wrap gap-1">
@@ -1832,7 +1819,7 @@ export default function FechamentoDetalhes() {
}
}}
>
<DialogContent className="sm:max-w-lg">
<DialogContent className="overflow-hidden sm:max-w-lg">
<DialogHeader>
<DialogTitle>
{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."}
</DialogDescription>
</DialogHeader>
<div className="space-y-4">
<div className="min-w-0 space-y-4">
{tarefasAlteracaoCompetencia.length > 1 ? (
<div className="space-y-2">
<div className="min-w-0 space-y-2">
<Label>Tarefas selecionadas</Label>
<ul className="max-h-32 space-y-1 overflow-y-auto rounded-md border bg-muted/30 px-3 py-2 text-sm text-muted-foreground">
<ul className="max-h-32 w-full min-w-0 max-w-full space-y-1 overflow-x-auto overflow-y-auto rounded-md border bg-muted/30 px-3 py-2 text-sm text-muted-foreground">
{tarefasAlteracaoCompetencia.slice(0, 5).map((t) => (
<li key={t.id} className="truncate">
<li key={t.id} className="min-w-0 truncate" title={t.descricao}>
{t.descricao}
</li>
))}
+1
View File
@@ -84,6 +84,7 @@ type ReprocessarAsanaResponse = {
tarefasRecebidas: number;
tarefasImportadas: number;
tarefasIgnoradasSemParceiro: number;
tarefasRemovidasForaCompetencia: number;
chamadasSubtarefasAsana: number;
};
};