From cca5ddb2e9f7e2b98eb4d452c6d9c034b5a627c8 Mon Sep 17 00:00:00 2001 From: Daniel Santana Date: Mon, 20 Apr 2026 17:51:25 -0300 Subject: [PATCH 1/9] feature/scrum-51-telas-detalhamento --- app/(report)/negativePoints.tsx | 9 ++- app/(report)/positivePoints.tsx | 9 ++- app/(report)/recomendations.tsx | 9 ++- components/report/CardItem.tsx | 2 +- components/report/CardItemFeedback.tsx | 69 +++++++++++++++++++ components/report/CardList.tsx | 6 +- components/report/NegativeFeedbackList.tsx | 49 +++++++++++++ components/report/PositiveFeedbackList.tsx | 48 +++++++++++++ .../report/RecommendationFeedbackList.tsx | 49 +++++++++++++ 9 files changed, 243 insertions(+), 7 deletions(-) create mode 100644 components/report/CardItemFeedback.tsx create mode 100644 components/report/NegativeFeedbackList.tsx create mode 100644 components/report/PositiveFeedbackList.tsx create mode 100644 components/report/RecommendationFeedbackList.tsx diff --git a/app/(report)/negativePoints.tsx b/app/(report)/negativePoints.tsx index 91f9bca..12fb5d8 100644 --- a/app/(report)/negativePoints.tsx +++ b/app/(report)/negativePoints.tsx @@ -1,12 +1,19 @@ import { Container } from '@/components/general/container'; import { Header } from '@/components/general/header'; +import { NegativeFeedbackList } from '@/components/report/NegativeFeedbackList'; import { View } from 'react-native'; export default function NegativePoints () { return( -
+
+ + ''} /> ) diff --git a/app/(report)/positivePoints.tsx b/app/(report)/positivePoints.tsx index 49f2e5c..ef7dbc0 100644 --- a/app/(report)/positivePoints.tsx +++ b/app/(report)/positivePoints.tsx @@ -1,12 +1,19 @@ import { Container } from '@/components/general/container'; import { Header } from '@/components/general/header'; +import { PositiveFeedbackList } from '@/components/report/PositiveFeedbackList'; import { View } from 'react-native'; export default function PositivePoints () { return( -
+
+ + ''} /> ) diff --git a/app/(report)/recomendations.tsx b/app/(report)/recomendations.tsx index 146b0b2..7923d7d 100644 --- a/app/(report)/recomendations.tsx +++ b/app/(report)/recomendations.tsx @@ -1,12 +1,19 @@ import { Container } from '@/components/general/container'; import { Header } from '@/components/general/header'; +import { RecommendationFeedbackList } from '@/components/report/RecommendationFeedbackList'; import { View } from 'react-native'; export default function Recomendations () { return( -
+
+ + ''} /> ) diff --git a/components/report/CardItem.tsx b/components/report/CardItem.tsx index 13906bc..646c3d8 100644 --- a/components/report/CardItem.tsx +++ b/components/report/CardItem.tsx @@ -41,7 +41,7 @@ export const CardItem = ({icon, typeCard, topics, handlePress}: Props)=> { {topics.map(item=> ( - + {item.text} ))} diff --git a/components/report/CardItemFeedback.tsx b/components/report/CardItemFeedback.tsx new file mode 100644 index 0000000..00788d8 --- /dev/null +++ b/components/report/CardItemFeedback.tsx @@ -0,0 +1,69 @@ +import Ionicons from '@expo/vector-icons/Ionicons' +import { Pressable, Text, View } from 'react-native' + +type Props = { + icon: any, + typeCard: 'positive' | 'negative' | 'recomendation', + text: string, + chages: string, + automaticChanges: boolean, + handlePress: ()=> void +} + +export const CardItemFeedback = ({ + icon, + typeCard, + text, + chages, + automaticChanges, + handlePress, +}: Props)=> { + + const backgroundColor = { + positive: 'bg-green-500/30', + negative: 'bg-red-500/30', + recomendation: 'bg-blue-500/30', + } + + const title = { + positive: 'Pontos positivos', + negative: 'Pontos negativos', + recomendation: 'Recomendações', + } + + return( + + + + + + {title[typeCard]} + + + + + + {text} + + {automaticChanges && + + + + {chages} + + + + + Aplicar mudanças + + + + } + + ) +} \ No newline at end of file diff --git a/components/report/CardList.tsx b/components/report/CardList.tsx index 7a2db84..a960d12 100644 --- a/components/report/CardList.tsx +++ b/components/report/CardList.tsx @@ -15,7 +15,7 @@ export const CardList = ()=> { return( { handlePress={handlePresPositive} /> { handlePress={handlePresNegative} /> void }) => { + + const feedbacks: FeedbackItem[] = [ + { + id: '1', + text: 'O tempo médio de entrega aumentou para 52 minutos neste mês, impactando negativamente a experiência dos clientes.', + changes: 'Vou sugerir ajustes na logística de entregas para reduzir o tempo.', + automaticChanges: true, + }, + { + id: '2', + text: 'Houve um aumento de 25% nas avaliações negativas relacionadas à temperatura dos alimentos.', + changes: 'Vou recomendar melhorias na embalagem térmica.', + automaticChanges: true, + }, + { + id: '3', + text: 'A taxa de cancelamento de pedidos subiu para 12%, acima da média esperada.', + changes: '', + automaticChanges: false, + }, + ] + + return ( + + {feedbacks.map(item => ( + + ))} + + ) +} \ No newline at end of file diff --git a/components/report/PositiveFeedbackList.tsx b/components/report/PositiveFeedbackList.tsx new file mode 100644 index 0000000..7f32035 --- /dev/null +++ b/components/report/PositiveFeedbackList.tsx @@ -0,0 +1,48 @@ +import { View } from 'react-native' +import { CardItemFeedback } from './CardItemFeedback' + +type FeedbackItem = { + id: string + text: string + changes: string + automaticChanges: boolean +} + +export const PositiveFeedbackList = ({ handlePress }: { handlePress: () => void }) => { + + const feedbacks: FeedbackItem[] = [ + { + id: '1', + text: 'Seu estabelecimento recebeu avaliações positivas com média de 4.8 estrelas este mês.', + changes: '', + automaticChanges: false, + }, + { + id: '2', + text: 'A sopa de feijão foi o prato mais pedido do seu estabelecimento, somando 145 pedidos neste mês. Isso representa um aumento de 18% em comparação ao mês anterior.', + changes: 'Vou destacar a sopa como prato principal no seu cardápio.', + automaticChanges: true, + }, + { + id: '3', + text: 'Seu tempo médio de entrega reduziu para 28 minutos, melhorando a experiência dos clientes.', + changes: 'Vou destacar sua agilidade como diferencial no app.', + automaticChanges: true, + }, + ] + return ( + + {feedbacks.map(item => ( + + ))} + + ) +} \ No newline at end of file diff --git a/components/report/RecommendationFeedbackList.tsx b/components/report/RecommendationFeedbackList.tsx new file mode 100644 index 0000000..c1a9d28 --- /dev/null +++ b/components/report/RecommendationFeedbackList.tsx @@ -0,0 +1,49 @@ +import { View } from 'react-native' +import { CardItemFeedback } from './CardItemFeedback' + +type FeedbackItem = { + id: string + text: string + changes: string + automaticChanges: boolean +} + +export const RecommendationFeedbackList = ({ handlePress }: { handlePress: () => void }) => { + + const feedbacks: FeedbackItem[] = [ + { + id: '1', + text: 'Adicionar combos promocionais pode aumentar o ticket médio dos pedidos.', + changes: 'Vou criar sugestões de combos com seus pratos mais vendidos.', + automaticChanges: true, + }, + { + id: '2', + text: 'Investir em fotos mais atrativas dos pratos pode aumentar a conversão de pedidos.', + changes: '', + automaticChanges: false, + }, + { + id: '3', + text: 'Expandir o horário de funcionamento pode atrair mais clientes no período da noite.', + changes: 'Vou recomendar horários ideais com base na demanda.', + automaticChanges: true, + }, + ] + + return ( + + {feedbacks.map(item => ( + + ))} + + ) +} \ No newline at end of file From afc9bc52496aee6edf52e4d195686f65f688066d Mon Sep 17 00:00:00 2001 From: Daniel Santana Date: Mon, 20 Apr 2026 17:52:52 -0300 Subject: [PATCH 2/9] scrum-51 telas de detalhamento de feedbacks --- components/report/PositiveFeedbackList.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/report/PositiveFeedbackList.tsx b/components/report/PositiveFeedbackList.tsx index 7f32035..6165296 100644 --- a/components/report/PositiveFeedbackList.tsx +++ b/components/report/PositiveFeedbackList.tsx @@ -15,28 +15,28 @@ export const PositiveFeedbackList = ({ handlePress }: { handlePress: () => void id: '1', text: 'Seu estabelecimento recebeu avaliações positivas com média de 4.8 estrelas este mês.', changes: '', - automaticChanges: false, + automaticChanges: false }, { id: '2', text: 'A sopa de feijão foi o prato mais pedido do seu estabelecimento, somando 145 pedidos neste mês. Isso representa um aumento de 18% em comparação ao mês anterior.', changes: 'Vou destacar a sopa como prato principal no seu cardápio.', - automaticChanges: true, + automaticChanges: true }, { id: '3', text: 'Seu tempo médio de entrega reduziu para 28 minutos, melhorando a experiência dos clientes.', changes: 'Vou destacar sua agilidade como diferencial no app.', - automaticChanges: true, + automaticChanges: true }, ] return ( - + {feedbacks.map(item => ( Date: Mon, 20 Apr 2026 17:55:45 -0300 Subject: [PATCH 3/9] scrum-51 type FeedbackItem --- components/report/NegativeFeedbackList.tsx | 8 +------- components/report/PositiveFeedbackList.tsx | 9 +-------- components/report/RecommendationFeedbackList.tsx | 8 +------- types/FeedbackItem.ts | 6 ++++++ 4 files changed, 9 insertions(+), 22 deletions(-) create mode 100644 types/FeedbackItem.ts diff --git a/components/report/NegativeFeedbackList.tsx b/components/report/NegativeFeedbackList.tsx index 22fd2ca..ec1ce38 100644 --- a/components/report/NegativeFeedbackList.tsx +++ b/components/report/NegativeFeedbackList.tsx @@ -1,13 +1,7 @@ +import { FeedbackItem } from '@/types/FeedbackItem' import { View } from 'react-native' import { CardItemFeedback } from './CardItemFeedback' -type FeedbackItem = { - id: string - text: string - changes: string - automaticChanges: boolean -} - export const NegativeFeedbackList = ({ handlePress }: { handlePress: () => void }) => { const feedbacks: FeedbackItem[] = [ diff --git a/components/report/PositiveFeedbackList.tsx b/components/report/PositiveFeedbackList.tsx index 6165296..44b001a 100644 --- a/components/report/PositiveFeedbackList.tsx +++ b/components/report/PositiveFeedbackList.tsx @@ -1,13 +1,6 @@ +import { FeedbackItem } from '@/types/FeedbackItem' import { View } from 'react-native' import { CardItemFeedback } from './CardItemFeedback' - -type FeedbackItem = { - id: string - text: string - changes: string - automaticChanges: boolean -} - export const PositiveFeedbackList = ({ handlePress }: { handlePress: () => void }) => { const feedbacks: FeedbackItem[] = [ diff --git a/components/report/RecommendationFeedbackList.tsx b/components/report/RecommendationFeedbackList.tsx index c1a9d28..0fd920d 100644 --- a/components/report/RecommendationFeedbackList.tsx +++ b/components/report/RecommendationFeedbackList.tsx @@ -1,13 +1,7 @@ +import { FeedbackItem } from '@/types/FeedbackItem' import { View } from 'react-native' import { CardItemFeedback } from './CardItemFeedback' -type FeedbackItem = { - id: string - text: string - changes: string - automaticChanges: boolean -} - export const RecommendationFeedbackList = ({ handlePress }: { handlePress: () => void }) => { const feedbacks: FeedbackItem[] = [ diff --git a/types/FeedbackItem.ts b/types/FeedbackItem.ts new file mode 100644 index 0000000..924d3db --- /dev/null +++ b/types/FeedbackItem.ts @@ -0,0 +1,6 @@ +export type FeedbackItem = { + id: string + text: string + changes: string + automaticChanges: boolean +} \ No newline at end of file From 2cf0e239cf0e250c0a9c6d602cec274cb1efdc4d Mon Sep 17 00:00:00 2001 From: Daniel Santana Date: Mon, 20 Apr 2026 18:00:58 -0300 Subject: [PATCH 4/9] scrum-51 lint fix --- components/report/PositiveFeedbackList.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/report/PositiveFeedbackList.tsx b/components/report/PositiveFeedbackList.tsx index 44b001a..c0a6ade 100644 --- a/components/report/PositiveFeedbackList.tsx +++ b/components/report/PositiveFeedbackList.tsx @@ -8,19 +8,19 @@ export const PositiveFeedbackList = ({ handlePress }: { handlePress: () => void id: '1', text: 'Seu estabelecimento recebeu avaliações positivas com média de 4.8 estrelas este mês.', changes: '', - automaticChanges: false + automaticChanges: false, }, { id: '2', text: 'A sopa de feijão foi o prato mais pedido do seu estabelecimento, somando 145 pedidos neste mês. Isso representa um aumento de 18% em comparação ao mês anterior.', changes: 'Vou destacar a sopa como prato principal no seu cardápio.', - automaticChanges: true + automaticChanges: true, }, { id: '3', text: 'Seu tempo médio de entrega reduziu para 28 minutos, melhorando a experiência dos clientes.', changes: 'Vou destacar sua agilidade como diferencial no app.', - automaticChanges: true + automaticChanges: true, }, ] return ( @@ -29,7 +29,7 @@ export const PositiveFeedbackList = ({ handlePress }: { handlePress: () => void Date: Sat, 25 Apr 2026 17:43:04 +0000 Subject: [PATCH 5/9] SCRUM-198 chore: auto-bump version to 0.1.3 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d917d3e..b1e80bb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.2 +0.1.3 From e27f72aed2853602983ff54c4bd01d5a8bec693f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 Apr 2026 08:52:25 +0000 Subject: [PATCH 6/9] SCRUM-198 chore: auto-bump version to 0.1.4 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index b1e80bb..845639e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.3 +0.1.4 From a50aceb419bd355974d903f27d668dd8a6965b4d Mon Sep 17 00:00:00 2001 From: degoNDL Date: Sun, 26 Apr 2026 17:46:53 -0300 Subject: [PATCH 7/9] =?UTF-8?q?SCRUM-41:=20integra=20dashboard=20de=20rela?= =?UTF-8?q?t=C3=B3rios=20com=20backend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- app/(report)/negativePoints.tsx | 56 ++++++++++++++++------- app/(report)/positivePoints.tsx | 56 ++++++++++++++++------- app/(report)/recomendations.tsx | 56 ++++++++++++++++------- app/(report)/report.tsx | 60 ++++++++++++++++++++----- components/report/CardList.tsx | 80 ++++++++++++++++----------------- services/reports.ts | 18 ++++++++ types/Report.ts | 15 +++++++ 7 files changed, 241 insertions(+), 100 deletions(-) create mode 100644 services/reports.ts create mode 100644 types/Report.ts diff --git a/app/(report)/negativePoints.tsx b/app/(report)/negativePoints.tsx index 12fb5d8..c678e33 100644 --- a/app/(report)/negativePoints.tsx +++ b/app/(report)/negativePoints.tsx @@ -1,20 +1,44 @@ import { Container } from '@/components/general/container'; import { Header } from '@/components/general/header'; -import { NegativeFeedbackList } from '@/components/report/NegativeFeedbackList'; -import { View } from 'react-native'; +import { CardItemFeedback } from '@/components/report/CardItemFeedback'; +import { CardListSkeleton } from '@/components/report/cardListSkeleton'; +import { getReport } from '@/services/reports'; +import { AIReportDetail } from '@/types/Report'; +import { useLocalSearchParams } from 'expo-router'; +import { useEffect, useState } from 'react'; +import { ScrollView, View } from 'react-native'; -export default function NegativePoints () { - return( - - -
+export default function NegativePoints() { + const { report_id } = useLocalSearchParams<{ report_id: string }>(); + const [report, setReport] = useState(null); + const [loading, setLoading] = useState(true); - ''} /> - - - ) -} \ No newline at end of file + useEffect(() => { + if (!report_id) return; + getReport(report_id) + .then(setReport) + .finally(() => setLoading(false)); + }, [report_id]); + + return ( + + +
+ + {loading ? ( + + ) : report ? ( + {}} + /> + ) : null} + + + + ); +} diff --git a/app/(report)/positivePoints.tsx b/app/(report)/positivePoints.tsx index ef7dbc0..dfe0c01 100644 --- a/app/(report)/positivePoints.tsx +++ b/app/(report)/positivePoints.tsx @@ -1,20 +1,44 @@ import { Container } from '@/components/general/container'; import { Header } from '@/components/general/header'; -import { PositiveFeedbackList } from '@/components/report/PositiveFeedbackList'; -import { View } from 'react-native'; +import { CardItemFeedback } from '@/components/report/CardItemFeedback'; +import { CardListSkeleton } from '@/components/report/cardListSkeleton'; +import { getReport } from '@/services/reports'; +import { AIReportDetail } from '@/types/Report'; +import { useLocalSearchParams } from 'expo-router'; +import { useEffect, useState } from 'react'; +import { ScrollView, View } from 'react-native'; -export default function PositivePoints () { - return( - - -
+export default function PositivePoints() { + const { report_id } = useLocalSearchParams<{ report_id: string }>(); + const [report, setReport] = useState(null); + const [loading, setLoading] = useState(true); - ''} /> - - - ) -} \ No newline at end of file + useEffect(() => { + if (!report_id) return; + getReport(report_id) + .then(setReport) + .finally(() => setLoading(false)); + }, [report_id]); + + return ( + + +
+ + {loading ? ( + + ) : report ? ( + {}} + /> + ) : null} + + + + ); +} diff --git a/app/(report)/recomendations.tsx b/app/(report)/recomendations.tsx index 7923d7d..bfb33bb 100644 --- a/app/(report)/recomendations.tsx +++ b/app/(report)/recomendations.tsx @@ -1,20 +1,44 @@ import { Container } from '@/components/general/container'; import { Header } from '@/components/general/header'; -import { RecommendationFeedbackList } from '@/components/report/RecommendationFeedbackList'; -import { View } from 'react-native'; +import { CardItemFeedback } from '@/components/report/CardItemFeedback'; +import { CardListSkeleton } from '@/components/report/cardListSkeleton'; +import { getReport } from '@/services/reports'; +import { AIReportDetail } from '@/types/Report'; +import { useLocalSearchParams } from 'expo-router'; +import { useEffect, useState } from 'react'; +import { ScrollView, View } from 'react-native'; -export default function Recomendations () { - return( - - -
+export default function Recomendations() { + const { report_id } = useLocalSearchParams<{ report_id: string }>(); + const [report, setReport] = useState(null); + const [loading, setLoading] = useState(true); - ''} /> - - - ) -} \ No newline at end of file + useEffect(() => { + if (!report_id) return; + getReport(report_id) + .then(setReport) + .finally(() => setLoading(false)); + }, [report_id]); + + return ( + + +
+ + {loading ? ( + + ) : report ? ( + {}} + /> + ) : null} + + + + ); +} diff --git a/app/(report)/report.tsx b/app/(report)/report.tsx index 5112d90..d67c847 100644 --- a/app/(report)/report.tsx +++ b/app/(report)/report.tsx @@ -1,27 +1,65 @@ import { Container } from '@/components/general/container'; +import GeneralButton from '@/components/general/generalButton'; import { Header } from '@/components/general/header'; import { CardList } from '@/components/report/CardList'; import { CardListSkeleton } from '@/components/report/cardListSkeleton'; -import { ChatButton } from '@/components/report/chatButton'; -import { useState } from 'react'; -import { View } from 'react-native'; +import { generateReport, getReportsByEnterprise } from '@/services/reports'; +import { AIReportSummary } from '@/types/Report'; +import { useEffect, useState } from 'react'; +import { Text, View } from 'react-native'; + +const ENTERPRISE_ID = 'caa68f64-b68e-4327-90f0-264ca1bb73e2'; export default function Report() { - const [loading, setLoading] = useState(false) + const [report, setReport] = useState(null); + const [loading, setLoading] = useState(true); + const [generating, setGenerating] = useState(false); + + useEffect(() => { + fetchLatestReport(); + }, []); - const handlePress = ()=> { - setLoading //to do + const fetchLatestReport = async () => { + try { + setLoading(true); + const reports = await getReportsByEnterprise(ENTERPRISE_ID); + if (reports.length > 0) { + setReport(reports[reports.length - 1]); + } + } finally { + setLoading(false); } - - return ( + }; + + const handleGenerate = async () => { + try { + setGenerating(true); + const newReport = await generateReport(ENTERPRISE_ID); + setReport(newReport); + } finally { + setGenerating(false); + } + }; + + return (
- {loading ? ( - + + ) : report ? ( + ) : ( - + + + Nenhum relatório gerado ainda. Gere o primeiro relatório do seu negócio. + + + )} diff --git a/components/report/CardList.tsx b/components/report/CardList.tsx index a960d12..5d18dac 100644 --- a/components/report/CardList.tsx +++ b/components/report/CardList.tsx @@ -1,45 +1,43 @@ +import { AIReportSummary } from '@/types/Report' import { router } from 'expo-router' import { View } from 'react-native' import { CardItem } from './CardItem' -export const CardList = ()=> { - const handlePresPositive = ()=> { - router.navigate('/(report)/positivePoints') - } - const handlePresNegative = ()=> { - router.navigate('/(report)/negativePoints') - } - const handlePresRecomendation = ()=> { - router.navigate('/(report)/recomendations') - } - return( - - - - - - ) -} \ No newline at end of file +type Props = { + report: AIReportSummary +} + +export const CardList = ({ report }: Props) => { + const handlePressPositive = () => { + router.navigate({ pathname: '/positivePoints' as any, params: { report_id: report.id_relatorio } }) + } + const handlePressNegative = () => { + router.navigate({ pathname: '/negativePoints' as any, params: { report_id: report.id_relatorio } }) + } + const handlePressRecomendation = () => { + router.navigate({ pathname: '/recomendations' as any, params: { report_id: report.id_relatorio } }) + } + + return ( + + + + + + ) +} diff --git a/services/reports.ts b/services/reports.ts new file mode 100644 index 0000000..4094995 --- /dev/null +++ b/services/reports.ts @@ -0,0 +1,18 @@ +import axios from 'axios' +import { API_URL } from '@/constants/api' +import { AIReportDetail, AIReportSummary } from '@/types/Report' + +export const generateReport = async (empresaId: string): Promise => { + const { data } = await axios.post(`${API_URL}/reports/generate/${empresaId}`) + return data +} + +export const getReportsByEnterprise = async (empresaId: string): Promise => { + const { data } = await axios.get(`${API_URL}/reports/by-enterprise/${empresaId}`) + return data +} + +export const getReport = async (reportId: string): Promise => { + const { data } = await axios.get(`${API_URL}/reports/${reportId}`) + return data +} diff --git a/types/Report.ts b/types/Report.ts new file mode 100644 index 0000000..5891303 --- /dev/null +++ b/types/Report.ts @@ -0,0 +1,15 @@ +export type AIReportSummary = { + id_relatorio: string + empresa_id: string + contexto_id: string + pontos_positivos_resumo: string + melhorias_resumo: string + recomendacoes_resumo: string + criado_em: string +} + +export type AIReportDetail = AIReportSummary & { + pontos_positivos_detalhado: string + melhorias_detalhado: string + recomendacoes_detalhado: string +} From 563508023cab518a5072c491278c3df059b1cb0b Mon Sep 17 00:00:00 2001 From: degoNDL Date: Sun, 26 Apr 2026 18:30:45 -0300 Subject: [PATCH 8/9] SCRUM-41: substitui axios por fetch no reports service Co-Authored-By: Claude Sonnet 4.6 --- services/reports.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/services/reports.ts b/services/reports.ts index 4094995..cffa10f 100644 --- a/services/reports.ts +++ b/services/reports.ts @@ -1,18 +1,17 @@ -import axios from 'axios' import { API_URL } from '@/constants/api' import { AIReportDetail, AIReportSummary } from '@/types/Report' export const generateReport = async (empresaId: string): Promise => { - const { data } = await axios.post(`${API_URL}/reports/generate/${empresaId}`) - return data + const res = await fetch(`${API_URL}/reports/generate/${empresaId}`, { method: 'POST' }) + return res.json() } export const getReportsByEnterprise = async (empresaId: string): Promise => { - const { data } = await axios.get(`${API_URL}/reports/by-enterprise/${empresaId}`) - return data + const res = await fetch(`${API_URL}/reports/by-enterprise/${empresaId}`) + return res.json() } export const getReport = async (reportId: string): Promise => { - const { data } = await axios.get(`${API_URL}/reports/${reportId}`) - return data + const res = await fetch(`${API_URL}/reports/${reportId}`) + return res.json() } From e298935d7b9808d622354151ceab600426353470 Mon Sep 17 00:00:00 2001 From: degoNDL Date: Sun, 26 Apr 2026 19:56:34 -0300 Subject: [PATCH 9/9] =?UTF-8?q?SCRUM-41:=20integra=C3=A7=C3=A3o=20relatori?= =?UTF-8?q?o=20e=20dashboard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- constants/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constants/api.ts b/constants/api.ts index b85468d..91a4616 100644 --- a/constants/api.ts +++ b/constants/api.ts @@ -1,2 +1,2 @@ export const API_URL = - process.env.EXPO_PUBLIC_API_URL ?? 'http://localhost:8000'; + process.env.EXPO_PUBLIC_API_URL ?? 'https://mandaca-backend-production.onrender.com';