ajuste responsividade modal de alterar competencia da tarefa
This commit is contained in:
@@ -172,19 +172,6 @@ function formatDateOnly(value: string | null): string {
|
|||||||
return parsed.toLocaleDateString("pt-BR");
|
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 {
|
function normalizeTextFilter(value: string): string {
|
||||||
return value.trim().toLocaleLowerCase("pt-BR");
|
return value.trim().toLocaleLowerCase("pt-BR");
|
||||||
}
|
}
|
||||||
@@ -1153,7 +1140,7 @@ export default function FechamentoDetalhes() {
|
|||||||
setReprocessandoAsana(true);
|
setReprocessandoAsana(true);
|
||||||
const data = await fechamentoFechamentosService.reprocessarAsana(fechamentoId);
|
const data = await fechamentoFechamentosService.reprocessarAsana(fechamentoId);
|
||||||
toast.success(
|
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);
|
setIsReprocessAsanaOpen(false);
|
||||||
await loadTarefas();
|
await loadTarefas();
|
||||||
@@ -1610,7 +1597,7 @@ export default function FechamentoDetalhes() {
|
|||||||
<TableCell>{getTipoLancamentoLabel(tarefa.tipo)}</TableCell>
|
<TableCell>{getTipoLancamentoLabel(tarefa.tipo)}</TableCell>
|
||||||
<TableCell>{formatDateOnly(tarefa.dataInicio)}</TableCell>
|
<TableCell>{formatDateOnly(tarefa.dataInicio)}</TableCell>
|
||||||
<TableCell>{formatDateOnly(tarefa.dataVencimento)}</TableCell>
|
<TableCell>{formatDateOnly(tarefa.dataVencimento)}</TableCell>
|
||||||
<TableCell>{formatDateTime(tarefa.dataConclusao)}</TableCell>
|
<TableCell>{formatDateOnly(tarefa.dataConclusao)}</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
{tarefa.etiquetas && tarefa.etiquetas.length > 0 ? (
|
{tarefa.etiquetas && tarefa.etiquetas.length > 0 ? (
|
||||||
<div className="flex flex-wrap gap-1">
|
<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>
|
<DialogHeader>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
{tarefasAlteracaoCompetencia.length <= 1
|
{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."}
|
: "Mova as tarefas selecionadas para outra competência em aberto. O histórico de cada alteração ficará registrado."}
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<div className="space-y-4">
|
<div className="min-w-0 space-y-4">
|
||||||
{tarefasAlteracaoCompetencia.length > 1 ? (
|
{tarefasAlteracaoCompetencia.length > 1 ? (
|
||||||
<div className="space-y-2">
|
<div className="min-w-0 space-y-2">
|
||||||
<Label>Tarefas selecionadas</Label>
|
<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) => (
|
{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}
|
{t.descricao}
|
||||||
</li>
|
</li>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ type ReprocessarAsanaResponse = {
|
|||||||
tarefasRecebidas: number;
|
tarefasRecebidas: number;
|
||||||
tarefasImportadas: number;
|
tarefasImportadas: number;
|
||||||
tarefasIgnoradasSemParceiro: number;
|
tarefasIgnoradasSemParceiro: number;
|
||||||
|
tarefasRemovidasForaCompetencia: number;
|
||||||
chamadasSubtarefasAsana: number;
|
chamadasSubtarefasAsana: number;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user