[SCRUM-41]: dashboard e relatórios integração#31
Merged
Conversation
…amento Feature/scrum 51 telas detalhamento
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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