From 3f012552e7f1702ad4aa1ab34c99eb5e8fa0e27c Mon Sep 17 00:00:00 2001 From: "Rodrigo B. de Sousa Martins" Date: Wed, 16 Jul 2025 16:16:17 -0300 Subject: [PATCH] calculo: fix pensaoalimenticia Signed-off-by: Rodrigo B. de Sousa Martins --- src/components/calculos/CalculosList.tsx | 4 ++-- src/components/calculos/DetalhePensaoAlimenticia.tsx | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/calculos/CalculosList.tsx b/src/components/calculos/CalculosList.tsx index 8dbf3ca..c31ae02 100644 --- a/src/components/calculos/CalculosList.tsx +++ b/src/components/calculos/CalculosList.tsx @@ -149,13 +149,13 @@ export function CalculosList() { to="/calculos/novo" className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" > - Novo Cálculo + Novo Cálculo Judicial - Novo Pensão + Novo Cálculo de Pensão diff --git a/src/components/calculos/DetalhePensaoAlimenticia.tsx b/src/components/calculos/DetalhePensaoAlimenticia.tsx index f3bf659..3e475d6 100644 --- a/src/components/calculos/DetalhePensaoAlimenticia.tsx +++ b/src/components/calculos/DetalhePensaoAlimenticia.tsx @@ -32,6 +32,11 @@ export function DetalhePensaoAlimenticia() { const [loading, setLoading] = useState(true); useEffect(() => { + if (id === "novo") { + setLoading(false); + setCalculo(null); + return; + } const loadCalculo = async () => { try { // Buscar cálculo pelo endpoint correto