Skip to content

[SCRUM-41] Integracao dashboard relatorios#30

Merged
degoNDL merged 3 commits intomainfrom
feature/SCRUM-41-integracao-dashboard-relatorios
Apr 26, 2026
Merged

[SCRUM-41] Integracao dashboard relatorios#30
degoNDL merged 3 commits intomainfrom
feature/SCRUM-41-integracao-dashboard-relatorios

Conversation

@degoNDL
Copy link
Copy Markdown
Contributor

@degoNDL degoNDL commented Apr 26, 2026

Integração completa das telas de relatórios com o backend. As telas antes exibiam dados mockados; agora consomem a API real.

Mudanças:
types/Report.ts (novo) — tipos TypeScript espelhando os schemas Pydantic do backend (AIReportSummary e AIReportDetail)
services/reports.ts (novo) — service com as 3 chamadas à API via fetch:
POST /reports/generate/{empresa_id} — gera novo relatório via IA
GET /reports/by-enterprise/{empresa_id} — lista relatórios da empresa
GET /reports/{report_id} — busca detalhes de um relatório
app/(report)/report.tsx — tela principal agora busca o último relatório ao carregar; exibe skeleton durante loading, botão de geração se não houver relatório, e CardList com dados reais caso exista
components/report/CardList.tsx — passa report_id nos params de navegação para as telas de detalhe
app/(report)/positivePoints.tsx, negativePoints.tsx, recomendations.tsx — recebem report_id via useLocalSearchParams e buscam o AIReportDetail completo do backend

degoNDL and others added 2 commits April 26, 2026 17:46
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@degoNDL degoNDL force-pushed the feature/SCRUM-41-integracao-dashboard-relatorios branch from 1d07585 to e298935 Compare April 26, 2026 23:14
@notsogreatdavi notsogreatdavi temporarily deployed to feature/SCRUM-41-integracao-dashboard-relatorios - mandaca-frontend-production PR #30 April 26, 2026 23:14 — with Render Destroyed
@degoNDL degoNDL self-assigned this Apr 26, 2026
Copy link
Copy Markdown
Collaborator

@DanielSantana47 DanielSantana47 left a comment

Choose a reason for hiding this comment

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

Aproved.

@degoNDL degoNDL merged commit 03571c0 into main Apr 26, 2026
3 checks passed
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.

3 participants