From 35f103831758ba38b440fe39d94ae2ecfce04021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Gon=C3=A7aalves?= Date: Mon, 10 Nov 2025 14:57:21 -0300 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20corre=C3=A7=C3=A3o=20de=20alinhament?= =?UTF-8?q?o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/DRE/teste.tsx | 76 ++++++++++++++++++++++++++++++------------- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/src/app/DRE/teste.tsx b/src/app/DRE/teste.tsx index aa70cc6..9e40762 100644 --- a/src/app/DRE/teste.tsx +++ b/src/app/DRE/teste.tsx @@ -2191,7 +2191,7 @@ export default function Teste() { if (isSelected) { style += - " bg-gradient-to-r from-green-100 to-emerald-100 border-l-4 border-green-500 shadow-lg"; + " bg-gradient-to-r from-green-100 to-emerald-100 shadow-lg"; } switch (row.type) { @@ -2822,19 +2822,40 @@ export default function Teste() { }} onScroll={() => syncScroll('descricao')} > - {hierarchicalData.map((row, index) => ( -
-
-
- {renderCellContent(row)} + {hierarchicalData.map((row, index) => { + const linhaId = `${row.type}-${row.grupo || ""}-${row.subgrupo || ""}-${row.centro_custo || ""}-${row.codigo_conta || ""}`; + const isSelected = linhaSelecionada === linhaId; + return ( +
+
+
+ {renderCellContent(row)} +
-
- ))} + ); + })}
@@ -2871,18 +2892,26 @@ export default function Teste() { {/* Table Body */} - {hierarchicalData.map((row, index) => ( - + {hierarchicalData.map((row, index) => { + const linhaId = `${row.type}-${row.grupo || ""}-${row.subgrupo || ""}-${row.centro_custo || ""}-${row.codigo_conta || ""}`; + const isSelected = linhaSelecionada === linhaId; + return ( + {/* Colunas de valores por mês */} {mesesDisponiveis.map((mes) => ( handleRowClick(row, mes)} title={ row.valoresPorMes && row.valoresPorMes[mes] @@ -2910,7 +2939,7 @@ export default function Teste() { handleRowClick(row, mes)} title={ row.percentuaisPorMes && @@ -2930,7 +2959,7 @@ export default function Teste() { {/* Coluna Total */} handleRowClick(row)} title={row.total ? formatCurrency(row.total) : "-"} > @@ -2953,7 +2982,7 @@ export default function Teste() { {/* Coluna Percentual Total */} handleRowClick(row)} title={ row.percentualTotal !== undefined @@ -2966,7 +2995,8 @@ export default function Teste() { : "-"} - ))} + ); + })} From b29fa44a71573a6479004433e487da361ea18743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Gon=C3=A7aalves?= Date: Mon, 10 Nov 2025 15:04:27 -0300 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20corre=C3=A7=C3=A3o=20no=20estilo=20d?= =?UTF-8?q?a=20c=C3=A9lula=20selecionada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/DRE/teste.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/DRE/teste.tsx b/src/app/DRE/teste.tsx index 9e40762..7d24854 100644 --- a/src/app/DRE/teste.tsx +++ b/src/app/DRE/teste.tsx @@ -2191,7 +2191,7 @@ export default function Teste() { if (isSelected) { style += - " bg-gradient-to-r from-green-100 to-emerald-100 shadow-lg"; + " bg-green-100 shadow-lg"; } switch (row.type) { @@ -2828,7 +2828,7 @@ export default function Teste() { return (
handleRowClick(row)} >