From 153d2d13a0c92c35e287b543c769d485a59ab2c0 Mon Sep 17 00:00:00 2001 From: Rafael Tsutomu <127237352+rafaelTsu@users.noreply.github.com> Date: Fri, 8 Aug 2025 21:01:05 -0400 Subject: [PATCH 1/2] Update README.md --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ad7f6c8..20d7bcd 100644 --- a/README.md +++ b/README.md @@ -1 +1,8 @@ -# B3yond \ No newline at end of file +# B3yond + +### Requisitos + - Docker + - Docker compose + +### Comando para executar docker compose: +`docker compose up --build` From 1c2d82ef0fe387c696e2dc4530a609c0973126d2 Mon Sep 17 00:00:00 2001 From: EngRPin Date: Mon, 18 Aug 2025 12:46:49 -0400 Subject: [PATCH 2/2] =?UTF-8?q?Implementa=C3=A7=C3=A3o=20da=20tela=20Home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/app/App.tsx | 14 ++-- frontend/src/app/RootLayout.tsx | 5 +- frontend/src/app/routes.tsx | 9 ++- frontend/src/app/screens/AppHome.tsx | 35 ++++----- .../shared/components/Home/IdeasSection.tsx | 72 +++++++++++++++++++ .../components/Home/InitiativesSection.tsx | 56 +++++++++++++++ .../components/Home/InnovatorsSection.tsx | 63 ++++++++++++++++ 7 files changed, 222 insertions(+), 32 deletions(-) create mode 100644 frontend/src/shared/components/Home/IdeasSection.tsx create mode 100644 frontend/src/shared/components/Home/InitiativesSection.tsx create mode 100644 frontend/src/shared/components/Home/InnovatorsSection.tsx diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index 8cdc75f..0332700 100755 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -28,7 +28,7 @@ const theme = createTheme({ const router = createBrowserRouter([ { - element: , // AuthProvider fica dentro do RootLayout + element: , children: [ { path: '/', element: }, { path: '/login', element: }, @@ -36,19 +36,19 @@ const router = createBrowserRouter([ { path: '/app', element: ( - - + // + // - - + // + // ), }, { path: '/profile', element: ( - + // - + // ), }, ], diff --git a/frontend/src/app/RootLayout.tsx b/frontend/src/app/RootLayout.tsx index 94fa079..3f06127 100644 --- a/frontend/src/app/RootLayout.tsx +++ b/frontend/src/app/RootLayout.tsx @@ -1,10 +1,9 @@ import { Outlet } from 'react-router-dom'; -import { AuthProvider } from '../features/auth/hooks/useAuth'; export default function RootLayout() { return ( - + // - + // ); } diff --git a/frontend/src/app/routes.tsx b/frontend/src/app/routes.tsx index 45b7831..1839d70 100644 --- a/frontend/src/app/routes.tsx +++ b/frontend/src/app/routes.tsx @@ -10,21 +10,20 @@ export const router = createBrowserRouter([ element: , children: [ { path: '/', element: }, - { path: '/login', element: }, { path: '/app', element: ( - + // - + // ), }, { path: '/profile', element: ( - + // - + // ), }, ], diff --git a/frontend/src/app/screens/AppHome.tsx b/frontend/src/app/screens/AppHome.tsx index 750849b..c6aa440 100644 --- a/frontend/src/app/screens/AppHome.tsx +++ b/frontend/src/app/screens/AppHome.tsx @@ -1,20 +1,21 @@ -import { useAuth } from '../../features/auth'; +import React from 'react'; +import { Box } from '@mui/material'; +import { Navbar } from '../../shared/components/Navbar'; +import { PageHeader } from '../../shared/components/PageHeader'; +import { InitiativesSection } from '../../shared/components/Home/InitiativesSection'; +import { IdeasSection } from '../../shared/components/Home/IdeasSection'; +import { InnovatorsSection } from '../../shared/components/Home/InnovatorsSection'; -export default function AppHome() { - const { user, signOut, refresh } = useAuth(); - if (user === undefined) return

Carregando…

; +const AppHome: React.FC = () => { return ( -
- {user ? ( - <> -

Bem-vindo, {user.nome}

-

ID: {user.id}

- - - - ) : ( -

Sem sessão. Vá para /auth.

- )} -
+ + + + + + + ); -} +}; + +export default AppHome; diff --git a/frontend/src/shared/components/Home/IdeasSection.tsx b/frontend/src/shared/components/Home/IdeasSection.tsx new file mode 100644 index 0000000..cde4622 --- /dev/null +++ b/frontend/src/shared/components/Home/IdeasSection.tsx @@ -0,0 +1,72 @@ +import React from 'react'; +import { Box, Typography, Paper, IconButton, Button } from '@mui/material'; +import ArrowBackIosNewIcon from '@mui/icons-material/ArrowBackIosNew'; +import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos'; + +export const IdeasSection: React.FC = () => { + const mockIdeias = Array(3).fill({ + usuario: 'Nome do usuário', + titulo: 'Título da ideia', + descricao: + 'Pequenas descrição da ideia. Pequenas descrição da ideia. Pequenas descrição da ideia.', + curtidas: 9, + comentarios: 12, + }); + + return ( + + + Ideias mais relevantes + + + As ideias mais curtidas do fórum da B3 + + + + + + + + {mockIdeias.map((ideia, i) => ( + + + {ideia.usuario} + + + {ideia.titulo} + + + {ideia.descricao} + + + {ideia.curtidas} curtidas + {ideia.comentarios} comentários + + + ))} + + + + + + + + + + + ); +}; diff --git a/frontend/src/shared/components/Home/InitiativesSection.tsx b/frontend/src/shared/components/Home/InitiativesSection.tsx new file mode 100644 index 0000000..3d2acad --- /dev/null +++ b/frontend/src/shared/components/Home/InitiativesSection.tsx @@ -0,0 +1,56 @@ +import React from 'react'; +import { Box, Typography, Button, Grid, Paper } from '@mui/material'; +import { CategoryTag } from '../CategoryTag'; + +export const InitiativesSection: React.FC = () => { + const mockIniciativas = Array(4).fill({ + usuario: 'Nome do usuário', + titulo: 'Este é o título da iniciativa', + descricao: 'Pequena descrição da ideia. Pequena descrição da ideia. Pequena descrição da ideia.', + categorias: ['Categoria 1', 'Categoria 1', 'Categoria 1'] + }); + + return ( + + + Últimas iniciativas + + + As iniciativas mais recentes em andamento + + + + {mockIniciativas.map((ini, index) => ( + + + + {ini.usuario} + + + {ini.titulo} + + + {ini.descricao} + + + + {ini.categorias.map((cat, i) => ( + + ))} + + + + ))} + + + + + + + ); +}; diff --git a/frontend/src/shared/components/Home/InnovatorsSection.tsx b/frontend/src/shared/components/Home/InnovatorsSection.tsx new file mode 100644 index 0000000..aa51687 --- /dev/null +++ b/frontend/src/shared/components/Home/InnovatorsSection.tsx @@ -0,0 +1,63 @@ +import React from 'react'; +import { Box, Typography, Paper, Avatar } from '@mui/material'; + +const cores = ['#FFFACD', '#D3D3D3', '#FFDAB9', '#ffffff', '#ffffff']; + +export const InnovatorsSection: React.FC = () => { + const mockRanking = Array(5).fill({ + nome: 'Nome do usuário', + username: '@usuario', + contribuições: 'XX', + comentários: 'XX', + ideias: 'XX', + iniciativas: 'XX', + }); + + return ( + + + Funcionários mais Inovadores + + + Os funcionários mais engajados na área de Inovação da B3 + + + {mockRanking.map((user, i) => ( + + + {i + 1} + + + {user.nome} + {user.username} + + + + + {user.contribuições} Contribuições + {user.comentários} Comentários + {user.ideias} Ideias + {user.iniciativas} Iniciativas + + + ))} + + ); +};