fix: ajuste na estilização do grupos calculados

This commit is contained in:
Alessandro Gonçaalves 2025-10-21 00:19:21 -03:00
parent 6f14b655f5
commit b80e4ab970
1 changed files with 2 additions and 22 deletions

View File

@ -458,25 +458,8 @@ export default function Teste() {
" bg-gradient-to-r from-blue-100 to-indigo-100 border-l-4 border-blue-500 shadow-lg"; " bg-gradient-to-r from-blue-100 to-indigo-100 border-l-4 border-blue-500 shadow-lg";
} }
// Verificar se é um grupo calculado
const isCalculado = row.grupo?.includes("CALCULADO") ||
row.grupo?.includes("FATURAMENTO LÍQUIDO") ||
row.grupo?.includes("LUCRO BRUTO") ||
row.grupo?.includes("MARGEM LOJA") ||
row.grupo?.includes("RESULTADO OPERACIONAL") ||
row.grupo?.includes("RESULTADO FINANCEIRO") ||
row.grupo?.includes("OUTRAS RECEITAS / DESPESAS") ||
row.grupo?.includes("LAIR") ||
row.grupo?.includes("IR") ||
row.grupo?.includes("CSLL") ||
row.grupo?.includes("LUCRO LÍQUIDO") ||
row.grupo?.includes("EBITDA");
switch (row.type) { switch (row.type) {
case "grupo": case "grupo":
if (isCalculado) {
return `${style} bg-gradient-to-r from-green-50/30 to-emerald-50/20 font-bold text-gray-900 border-b-2 border-green-200 border-l-4 border-green-400`;
}
return `${style} bg-gradient-to-r from-blue-50/20 to-indigo-50/20 font-bold text-gray-900 border-b-2 border-blue-200`; return `${style} bg-gradient-to-r from-blue-50/20 to-indigo-50/20 font-bold text-gray-900 border-b-2 border-blue-200`;
case "subgrupo": case "subgrupo":
return `${style} bg-gradient-to-r from-gray-50/30 to-blue-50/20 font-semibold text-gray-800`; return `${style} bg-gradient-to-r from-gray-50/30 to-blue-50/20 font-semibold text-gray-800`;
@ -527,14 +510,11 @@ export default function Teste() {
className="flex-1 text-left hover:bg-blue-50/50 p-2 rounded-lg cursor-pointer transition-all duration-200 truncate" className="flex-1 text-left hover:bg-blue-50/50 p-2 rounded-lg cursor-pointer transition-all duration-200 truncate"
> >
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{isCalculado && ( <span className="font-bold text-gray-900">
<span className="text-green-600 font-bold text-sm"></span>
)}
<span className={`font-bold ${isCalculado ? 'text-green-800' : 'text-gray-900'}`}>
{row.grupo} {row.grupo}
</span> </span>
{isCalculado && ( {isCalculado && (
<span className="text-xs text-green-600 font-medium">(CALCULADO)</span> <span className="text-blue-600 font-bold text-sm"></span>
)} )}
</div> </div>
</button> </button>