Skip to content

feat: gerador de relatórios de qualidade elétrica (entrada manual ou automática)#5

Merged
sthevan027 merged 16 commits into
mainfrom
feat/relatorios-qualidade
Apr 27, 2026
Merged

feat: gerador de relatórios de qualidade elétrica (entrada manual ou automática)#5
sthevan027 merged 16 commits into
mainfrom
feat/relatorios-qualidade

Conversation

@sthevan027
Copy link
Copy Markdown
Owner

@sthevan027 sthevan027 commented Mar 23, 2026

Resumo

Implementação do plano Relatórios separados: valores manuais ou gerados automaticamente, evoluindo o EletroLab para um gerador de relatórios de qualidade da parte elétrica, com cinco módulos, exportação PDF e Excel, e opção de entrada manual ou automática.

Commits

1. feat(megger): modo manual + Excel

  • Alternância Gerar valores / Colocar valores em GenerateReport.tsx
  • No modo Colocar valores: campos para R(00:15), R(00:30), R(00:45), R(01:00)
  • Leituras editáveis após geração automática
  • Novo export-excel.ts com exportação Excel (biblioteca xlsx)
  • Botão Exportar Excel junto ao Exportar PDF

2. feat(microhm,hipot): relatório + PDF/Excel

  • Tools.tsx com metadados (Tag, Cliente, Operador)
  • Botões PDF e Excel nas abas Microhmímetro e Hi-Pot
  • PDFs via html2pdf.js

3. feat(cabo,disjuntor): PDF/Excel

  • Cable.tsx e Breaker.tsx com metadados e exportação
  • PDFs para dimensionamento de cabo e teste de disjuntor
  • Excel com parâmetros e resultados

4. feat(nav): navegação

  • Dashboard com os cinco módulos: Megger, Microhm, Hi-Pot, Cabo, Disjuntor
  • Sidebar com Relatórios e Sistema
  • Página Relatórios com filtro por tipo (chips)

Arquivos principais

Arquivo Mudança
src/pages/GenerateReport.tsx Modo colocar/gerar, leituras manuais, Excel
src/utils/export-excel.ts Novo — Excel para os cinco módulos
src/pages/Tools.tsx Metadados + PDF/Excel (Microhm e Hi-Pot)
src/utils/export.ts exportMicrohmPDF, exportHipotPDF, exportCablePDF, exportBreakerPDF
src/pages/Cable.tsx Metadados + PDF/Excel
src/pages/Breaker.tsx Metadados + PDF/Excel
src/pages/Dashboard.tsx Módulos e descrição
src/components/Layout.tsx Sidebar Relatórios/Sistema
src/pages/Reports.tsx Filtro por módulo
package.json Dependência xlsx

Plano de testes

  • Megger: alternar Gerar valores e Colocar valores
  • Modo Colocar valores: preencher leituras e gerar relatório
  • Exportar Megger em PDF e Excel
  • Microhm: calcular e exportar PDF e Excel
  • Hi-Pot: calcular e exportar PDF e Excel
  • Cabo: calcular e exportar PDF e Excel
  • Disjuntor: conferir resultado e exportar PDF e Excel
  • Dashboard: cinco módulos visíveis
  • Sidebar: seções Relatórios e Sistema
  • Relatórios: filtros por módulo

- Add toggle "Colocar Valores" / "Gerar Valores" in GenerateReport
- In manual mode: fields for R(00:15), R(00:30), R(00:45), R(01:00)
- Make readings editable after automatic generation
- Create export-excel.ts with Excel export functions (xlsx)
- Add "Exportar Excel" button alongside PDF export

Made-with: Cursor
- Update Tools.tsx with metadata fields (tag, client, operator)
- Add PDF and Excel export buttons for Microhm and Hi-Pot
- Create exportMicrohmPDF and exportHipotPDF in export.ts
- Generate formatted PDF reports with parameters and results

Made-with: Cursor
- Update Cable.tsx with metadata fields and export buttons
- Update Breaker.tsx with metadata fields and export buttons
- Add exportCablePDF and exportBreakerPDF templates
- Both pages now support PDF and Excel report generation

Made-with: Cursor
- Redesign Dashboard with prominent cards for Megger, Microhm, Hi-Pot, Cabo, Disjuntor
- Reorganize sidebar navigation into "Relatórios" and "Sistema" sections
- Add module-type filter chips in Reports page (Megger, Microhm, Hi-Pot, Cabo, Disjuntor, Multi-Fase)
- Update descriptions to reflect quality report generator focus

Made-with: Cursor
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 723f75fb43

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/pages/GenerateReport.tsx
- Remove --frozen-lockfile to allow install when package.json has new deps
- Fix unused MultiPhaseReport import in export-excel.ts

Made-with: Cursor
- Switch to npm ci (package-lock.json has xlsx)
- Add package-lock.json to workflow paths
- Update vercel-build to npm run build

Made-with: Cursor
- Layout: sidebar mais limpa com indicador ativo à esquerda, logo com ícone, seções de labels, footer com IA ativa
- Dashboard: cards de stats com bordas coloridas, módulos com layout de card horizontal, seção "Mais" + Recentes em grid 1/3 + 2/3
- GenerateReport: fundo corrigido (dark), notificação escura, erros escuros, categoria em radio list, form 2-col para identificação, botões 2x2 grid, inputs de leitura visíveis com fundo e borda
- Tools: header limpo sem wrapper max-w, tabs com ícone, inputs menores, resultado com cards contrastados por status
- Cable: mesma linguagem visual, grid 2-col para parâmetros, resultado com bordas coloridas por status
- Breaker: layout 2-col, resultado em tempo real, status com card colorido
- Reports: chips de filtro em rounded-full, lista mais compacta, empty state melhorado

Made-with: Cursor
- Removed unused import of Category from database.ts
- Updated import statement in cloud.ts for consistency
- Cleaned up import in Cable.tsx to only include necessary types
@sthevan027 sthevan027 changed the title feat: Gerador de Relatórios de Qualidade Elétrica – Colocar ou Gerar Valores feat: gerador de relatórios de qualidade elétrica (entrada manual ou automática) Mar 24, 2026
sthevan027 and others added 3 commits March 24, 2026 14:51
- Remove imports/variáveis não usadas e código morto (generator, ai-engine).
npm run lint e npm run build passam; eslint com --max-warnings 0 fica limpo.
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@sthevan027 sthevan027 merged commit 39452e3 into main Apr 27, 2026
8 checks passed
@sthevan027 sthevan027 deleted the feat/relatorios-qualidade branch April 27, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants