From b3d9ebe9994e3873326c94440c8976127c7a8ae3 Mon Sep 17 00:00:00 2001 From: "Rodrigo B. de Sousa Martins" Date: Tue, 15 Jul 2025 20:42:04 -0300 Subject: [PATCH] dashboard: reimaginacao Signed-off-by: Rodrigo B. de Sousa Martins --- .../dashboard/BenchmarkingEscritorio.tsx | 53 +++++++++++++------ 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/src/components/dashboard/BenchmarkingEscritorio.tsx b/src/components/dashboard/BenchmarkingEscritorio.tsx index 29db6db..e8f6b96 100644 --- a/src/components/dashboard/BenchmarkingEscritorio.tsx +++ b/src/components/dashboard/BenchmarkingEscritorio.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { useBenchmarking } from '../../hooks/useBenchmarking'; +import { CheckCircleIcon, XCircleIcon, FolderOpenIcon } from '@heroicons/react/24/solid'; export const BenchmarkingEscritorio: React.FC = () => { // Hook para buscar e calcular benchmarking @@ -9,23 +10,45 @@ export const BenchmarkingEscritorio: React.FC = () => { if (error) return
Erro ao buscar benchmarking
; if (!benchmarking) return null; + // Cálculo da porcentagem de sucesso das causas + const totalCausas = benchmarking.procedentes + benchmarking.improcedentesOuSemMerito; + const sucessoPercent = totalCausas > 0 ? Math.round((benchmarking.procedentes / totalCausas) * 100) : 0; + return ( -
-
- Total de processos: - {benchmarking.totalProcessos} +
+
+
+ +
+
Total de processos
+
{benchmarking.totalProcessos}
+
+
+
+ +
+
Processos ativos
+
{benchmarking.ativos}
+
+
+
+ +
+
Julgados procedentes
+
{benchmarking.procedentes}
+
+
+
+ +
+
Improcedentes/Sem mérito
+
{benchmarking.improcedentesOuSemMerito}
+
+
-
- Processos ativos: - {benchmarking.ativos} -
-
- Julgados procedentes: - {benchmarking.procedentes} -
-
- Improcedentes/Sem análise de mérito: - {benchmarking.improcedentesOuSemMerito} +
+ % de sucesso das causas + {sucessoPercent}%
);