diff --git a/src/app/DRE/teste.tsx b/src/app/DRE/teste.tsx index aa70cc6..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 border-l-4 border-green-500 shadow-lg"; + " bg-green-100 shadow-lg"; } switch (row.type) { @@ -2822,19 +2822,41 @@ 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 ( +
handleRowClick(row)} + > +
+
+ {renderCellContent(row)} +
-
- ))} + ); + })}
@@ -2871,18 +2893,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 +2940,7 @@ export default function Teste() { handleRowClick(row, mes)} title={ row.percentuaisPorMes && @@ -2930,7 +2960,7 @@ export default function Teste() { {/* Coluna Total */} handleRowClick(row)} title={row.total ? formatCurrency(row.total) : "-"} > @@ -2953,7 +2983,7 @@ export default function Teste() { {/* Coluna Percentual Total */} handleRowClick(row)} title={ row.percentualTotal !== undefined @@ -2966,7 +2996,8 @@ export default function Teste() { : "-"} - ))} + ); + })}