Merge pull request #8 from JurunenseDevInterno/dev

Dev
This commit is contained in:
Alessandro Gonçalves 2025-10-22 19:56:44 -03:00 committed by GitHub
commit e32473710d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1927 additions and 737 deletions

1154
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,6 +9,11 @@
"lint": "eslint" "lint": "eslint"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@mui/material": "^7.3.4",
"@mui/x-data-grid": "^8.14.1",
"@mui/x-data-grid-pro": "^8.14.1",
"@radix-ui/react-checkbox": "^1.3.3", "@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15", "@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-label": "^2.1.7", "@radix-ui/react-label": "^2.1.7",

File diff suppressed because it is too large Load Diff

View File

@ -72,7 +72,17 @@ export async function GET(request: NextRequest) {
console.log('📝 Primeiros 3 registros:', data.slice(0, 3)); console.log('📝 Primeiros 3 registros:', data.slice(0, 3));
// Transformar os dados do Oracle para o formato esperado pelo componente // Transformar os dados do Oracle para o formato esperado pelo componente
const transformedData = data.map((item: any) => ({ const transformedData = data.map((item: any) => {
// Debug dos valores monetários
console.log('🔍 Item original:', {
VLREALIZADO: item.VLREALIZADO,
VLPREVISTO: item.VLPREVISTO,
VLCONFIRMADO: item.VLCONFIRMADO,
VLPAGO: item.VLPAGO,
tipo_VLREALIZADO: typeof item.VLREALIZADO
});
return {
codigo_grupo: item.CODGRUPO || "", codigo_grupo: item.CODGRUPO || "",
codigo_subgrupo: "", // Não existe na tabela Oracle codigo_subgrupo: "", // Não existe na tabela Oracle
codigo_fornecedor: item.CODFORNEC || "", codigo_fornecedor: item.CODFORNEC || "",
@ -87,7 +97,7 @@ export async function GET(request: NextRequest) {
codigo_conta: item.CODCONTA || "", codigo_conta: item.CODCONTA || "",
conta: item.CONTA || "", conta: item.CONTA || "",
codigo_centrocusto: item.CODIGOCENTROCUSTO || "", codigo_centrocusto: item.CODIGOCENTROCUSTO || "",
valor: item.VLREALIZADO || 0, valor: item.VLREALIZADO !== null && item.VLREALIZADO !== undefined ? Number(item.VLREALIZADO) : 0,
historico: item.HISTORICO || "", historico: item.HISTORICO || "",
historico2: item.HISTORICO2 || "", historico2: item.HISTORICO2 || "",
created_at: new Date().toISOString(), created_at: new Date().toISOString(),
@ -95,13 +105,14 @@ export async function GET(request: NextRequest) {
// Campos adicionais do Oracle // Campos adicionais do Oracle
entidade: item.ENTIDADE || "", entidade: item.ENTIDADE || "",
tipo_parceiro: item.TIPOPARCEIRO || "", tipo_parceiro: item.TIPOPARCEIRO || "",
valor_previsto: item.VLPREVISTO || 0, valor_previsto: item.VLPREVISTO !== null && item.VLPREVISTO !== undefined ? Number(item.VLPREVISTO) : 0,
valor_confirmado: item.VLCONFIRMADO || 0, valor_confirmado: item.VLCONFIRMADO !== null && item.VLCONFIRMADO !== undefined ? Number(item.VLCONFIRMADO) : 0,
valor_pago: item.VLPAGO || 0, valor_pago: item.VLPAGO !== null && item.VLPAGO !== undefined ? Number(item.VLPAGO) : 0,
numero_lancamento: item.NUMLANC || 0, numero_lancamento: item.NUMLANC || 0,
ano_mes_comp: item.ANOMESCOMP || "", ano_mes_comp: item.ANOMESCOMP || "",
codgrupo: item.CODGRUPO || "" codgrupo: item.CODGRUPO || ""
})); };
});
console.log('🔄 Dados transformados:', transformedData.length, 'registros'); console.log('🔄 Dados transformados:', transformedData.length, 'registros');
console.log('📝 Primeiros 3 transformados:', transformedData.slice(0, 3)); console.log('📝 Primeiros 3 transformados:', transformedData.slice(0, 3));