diff --git a/src/App.js b/src/App.js index d6ab73ce..79396129 100644 --- a/src/App.js +++ b/src/App.js @@ -1,14 +1,47 @@ +import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import { useState } from "react"; + +import Login from "./pages/Login"; +import Register from "./pages/Register"; +import Forgot from "./pages/ForgotPassword"; import PerfilSecretaria from "./perfis/perfil_secretaria/PerfilSecretaria"; +import LandingPage from './pages/LandingPage'; +// Mantenha todas as importações de CSS globais aqui se houver! function App() { + // O estado controla qual view mostrar: false = Landing Page, true = Dashboard + const [isInternalView, setIsInternalView] = useState(false); + const handleEnterSystem = () => { + setIsInternalView(true); + }; + + const handleExitSystem = () => { + setIsInternalView(false); + }; + + // Se não estiver na visualização interna, retorna a LandingPage. + if (!isInternalView) { + return ( + + + } /> + } /> + } /> + } /> + } /> + Página não encontrada} /> + + + ) + } + + // Se estiver na visualização interna, retorna o PerfilSecretaria return ( -
- -
+ // Passamos a função de saída (logout) + ); } -export default App; +export default App; \ No newline at end of file diff --git a/src/assets/scss/components/_card.scss b/src/assets/scss/components/_card.scss index 12a65154..2372c495 100644 --- a/src/assets/scss/components/_card.scss +++ b/src/assets/scss/components/_card.scss @@ -1,3 +1,9 @@ +.card-position { + padding-top: 1rem; + display: flex; + align-items: center; + justify-content: center; +} .card { margin-bottom: 2.2rem; border: none; diff --git a/src/data/sidebar-items.json b/src/data/sidebar-items.json index 5edc8a42..e32a49d2 100644 --- a/src/data/sidebar-items.json +++ b/src/data/sidebar-items.json @@ -6,31 +6,31 @@ { "name":"Início", - "url": "/", + "url": "/secretaria/inicio", "icon": "house" }, { "name": "Lista de Pacientes", "icon": "clipboard-heart-fill", - "url": "/pacientes" + "url": "/secretaria/pacientes" }, { "name": "Lista de Médico", "icon": "hospital-fill", - "url": "/medicos" + "url": "/secretaria/medicos" }, { "name": "Agendar consulta", "icon": "calendar-plus-fill", - "url": "/agendamento" + "url": "/secretaria/agendamento" }, { "name": "Laudo do Paciente", "icon": "table", - "url": "/laudo" + "url": "/secretaria/laudo" } ] \ No newline at end of file diff --git a/src/pages/EditPage.jsx b/src/pages/EditPage.jsx index 56b2ac8e..982f592c 100644 --- a/src/pages/EditPage.jsx +++ b/src/pages/EditPage.jsx @@ -79,8 +79,7 @@ const HandlePutPatient = async () => { {setCurrentPage('table')}} - setCurrentPage={setCurrentPage} + onCancel={() => {navigate('/secretaria/pacientes')}} formData={PatientToPUT} setFormData={setPatientPUT} /> diff --git a/src/pages/ForgotPassword.jsx b/src/pages/ForgotPassword.jsx new file mode 100644 index 00000000..787b4745 --- /dev/null +++ b/src/pages/ForgotPassword.jsx @@ -0,0 +1,82 @@ +import React, { useState } from 'react'; +import { Link } from "react-router-dom"; + +function ForgotPassword() { + const [email, setEmail] = useState(""); + const [alert, setAlert] = useState(""); + + const handleChange = (e) => { + setEmail(e.target.value); + }; + + const handleSubmit = (e) => { + e.preventDefault(); + if (email) { + // Simulate sending email + setAlert("E-mail de verificação enviado!"); + // You can add your actual email logic here + } else { + setAlert("Preencha o campo de e-mail!"); + } + }; + + return ( + <> +
+
+
+
+
+
+ +

MediConnect

+ +
+

Esqueci minha senha

+

+ Informe seu e-mail e enviaremos um link para redefinir sua senha. +

+ {alert && ( +
+ {alert} +
+ )} +
+
+ +
+ +
+
+ + +
+

+ Lembrou da sua senha? + + Entrar + + . +

+
+
+
+
+
+
+
+
+ + ); +} + +export default ForgotPassword; \ No newline at end of file diff --git a/src/pages/Inicio.jsx b/src/pages/Inicio.jsx index 68c91dec..602e33d8 100644 --- a/src/pages/Inicio.jsx +++ b/src/pages/Inicio.jsx @@ -1,11 +1,13 @@ import React, { useState, useEffect } from 'react'; +import { useNavigate } from 'react-router-dom'; import { FaUser, FaUserPlus, FaCalendarAlt, FaCalendarCheck } from 'react-icons/fa'; import './style/Inicio.css'; import { useAuth } from '../components/utils/AuthProvider'; import { Link } from 'react-router-dom'; -function Inicio({ setCurrentPage }) { - const {setAuthTokens} = useAuth() +function Inicio() { + const { authTokens, setAuthTokens } = useAuth(); + const navigate = useNavigate(); const [pacientes, setPacientes] = useState([]); const [agendamentos, setAgendamentos] = useState([]); @@ -120,21 +122,21 @@ function Inicio({ setCurrentPage }) {

Ações Rápidas

-
setCurrentPage('form-layout')}> +
navigate('/secretaria/pacientes/cadastro')}>
Novo Paciente Cadastrar um novo paciente
-
setCurrentPage('table')}> +
navigate('/secretaria/pacientes')}>
Lista de Pacientes Ver todos os pacientes
-
setCurrentPage('agendamento')}> +
navigate('/secretaria/agendamento')}>
Agendamentos @@ -159,7 +161,7 @@ function Inicio({ setCurrentPage }) {

Nenhum agendamento para hoje

-
diff --git a/src/pages/LandingPage.jsx b/src/pages/LandingPage.jsx new file mode 100644 index 00000000..2551aa9f --- /dev/null +++ b/src/pages/LandingPage.jsx @@ -0,0 +1,47 @@ +import React from 'react'; +import { useNavigate } from "react-router-dom"; +import './style/LandingPage.css'; + +const LandingPage = () => { + const navigate = useNavigate(); + return ( + // Usa a classe de isolamento CSS +
+ {/* CABEÇALHO */} +
+
+ {/* Logo da Landing Page. O CSS irá estilizá-la corretamente. */} +

MediConnect

+
+ +
+ + {/* ÁREA DE DESTAQUE (HERO SECTION) */} +
+
+ {/* Título Legível (Branco) */} +

+ Descubra o Equilíbrio Perfeito de
Cuidado e Tecnologia. +

+

+ Somos focados em oferecer a melhor experiência para pacientes e a gestão mais eficiente para a clínica. +

+ {/* Botão de ação principal: "Acessar Sistema" */} + +
+
+
+ ); +}; + +export default LandingPage; \ No newline at end of file diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx new file mode 100644 index 00000000..86c5ffed --- /dev/null +++ b/src/pages/Login.jsx @@ -0,0 +1,131 @@ +import React, { useState } from 'react'; +import { Link, useNavigate } from "react-router-dom"; + +function Login() { + const navigate = useNavigate(); + const [form, setForm] = useState({ + username: "", + password: "" + }); + const [alert, setAlert] = useState(""); + const [showPassword, setShowPassword] = useState(false); + + const handleChange = (e) => { + setForm({ ...form, [e.target.name]: e.target.value }); + }; + + const handleLogin = (e) => { + e.preventDefault(); + if (form.username && form.password) { + // ...login logic... + navigate('/secretaria/inicio'); + } else { + setAlert("Preencha todos os campos!"); + } + }; + + return ( + <> +
+
+
+
+
+
+ +

MediConnect

+ +
+

Entrar

+

+ Entre com os dados que você inseriu durante o registro. +

+ {alert && ( +
+ {alert} +
+ )} +
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+ + +
+ + +
+

+ Não tem uma conta? + + Cadastre-se + + . +

+

+ + Esqueceu a senha? + + . +

+
+
+
+
+
+
+
+
+ + ); +} + +export default Login; \ No newline at end of file diff --git a/src/pages/PatientCadastroManager.jsx b/src/pages/PatientCadastroManager.jsx index e0fe94c5..926887f4 100644 --- a/src/pages/PatientCadastroManager.jsx +++ b/src/pages/PatientCadastroManager.jsx @@ -1,8 +1,10 @@ import {useState} from 'react'; +import React from 'react'; +import { useNavigate } from 'react-router-dom'; import PatientForm from '../components/patients/PatientForm'; import API_KEY from '../components/utils/apiKeys'; import { useAuth } from '../components/utils/AuthProvider'; -import { useNavigate } from 'react-router-dom'; + function PatientCadastroManager( {setCurrentPage} ) { const navigate = useNavigate() @@ -97,7 +99,7 @@ function PatientCadastroManager( {setCurrentPage} ) {
{navigate('/pacientes')}} + onCancel={() => {navigate('/secretaria/pacientes')}} formData={formData} setFormData={setFormData} /> diff --git a/src/pages/Register.jsx b/src/pages/Register.jsx new file mode 100644 index 00000000..b1a6c0f5 --- /dev/null +++ b/src/pages/Register.jsx @@ -0,0 +1,182 @@ +import React, { useState } from 'react'; +import { Link, useNavigate } from "react-router-dom"; + +function Register() { + const navigate = useNavigate(); + const [form, setForm] = useState({ + email: "", + username: "", + userType: "", + password: "", + confirmPassword: "" + }); + const [alert, setAlert] = useState(""); + const [showPassword, setShowPassword] = useState(false); + const [showConfirmPassword, setShowConfirmPassword] = useState(false); + + const handleChange = (e) => { + setForm({ ...form, [e.target.name]: e.target.value }); + }; + + const handleLogin = (e) => { + e.preventDefault(); + if ( + form.email && + form.username && + form.userType && + form.password && + form.confirmPassword + ) { + if (form.password !== form.confirmPassword) { + setAlert("As senhas não coincidem!"); + return; + } + // ...register logic... + navigate('/secretaria/inicio'); + } else { + setAlert("Preencha todos os campos!"); + } + }; + + return ( + <> +
+
+
+
+
+
+ +

MediConnect

+ +
+

Cadastre-se

+

+ Insira seus dados para se registrar em nosso site. +

+ {alert && ( +
+ {alert} +
+ )} +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + +
+

+ Já tem uma conta? + + Entrar + + . +

+
+
+
+
+
+
+
+
+ + ); +} + +export default Register; \ No newline at end of file diff --git a/src/pages/TablePaciente.jsx b/src/pages/TablePaciente.jsx index 666fe6ca..c7054c5e 100644 --- a/src/pages/TablePaciente.jsx +++ b/src/pages/TablePaciente.jsx @@ -156,10 +156,9 @@ function TablePaciente({ setCurrentPage, setPatientID }) {

Pacientes Cadastrados

- + diff --git a/src/pages/style/LandingPage.css b/src/pages/style/LandingPage.css new file mode 100644 index 00000000..078ec5d2 --- /dev/null +++ b/src/pages/style/LandingPage.css @@ -0,0 +1,105 @@ +/* src/pages/style/LandingPage.css */ + +/* O seletor .landing-page-public-view ajuda a isolar os estilos */ +.landing-page-public-view { + min-height: 100vh; + background-color: #f0f2f5; +} + +/* --- Cabeçalho --- */ +.landing-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 15px 50px; + background-color: white; + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); + position: fixed; + width: 100%; + top: 0; + left: 0; + z-index: 1000; +} + +/* Estilo para a logo DENTRO do cabeçalho da Landing Page */ +.landing-header .logo h1 { + font-size: 1.8em; + color: #25396f; + font-weight: 700; + margin: 0; /* Remove margem que pode quebrar o layout */ + padding: 0; /* Remove padding */ +} + +.nav-menu a { + text-decoration: none; + color: #333; + margin-left: 25px; + font-size: 1em; + transition: color 0.2s; +} + +.nav-menu a:hover { + color: #5b56f8; +} +.nav-menu button:hover { + background-color: #4540d6; +} + +.access-button { + background-color: #5b56f8; + color: white; + border: none; + padding: 8px 18px; + border-radius: 5px; + margin-left: 25px; + cursor: pointer; + font-weight: 600; +} + +/* --- Área de Destaque (Hero Section) --- */ +.hero-section { + display: flex; + justify-content: flex-start; + align-items: center; + padding: 100px 50px; + background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://picsum.photos/1200/600?random=4') center/cover; + color: white; + min-height: 600px; + padding-top: 100px; +} + +.hero-content { + max-width: 700px; + text-align: left; +} + +/* Título Branco e Legível */ +.hero-content .hero-title { + font-size: 3.5em; + font-weight: 700; + margin-bottom: 20px; + color: #ffffff; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); +} + +.hero-content p { + font-size: 1.2em; + margin-bottom: 30px; + color: #ddd; +} + +.main-action-button { + background-color: #5b56f8; + color: white; + border: none; + padding: 15px 30px; + border-radius: 5px; + font-size: 1.1em; + font-weight: 600; + cursor: pointer; + transition: background-color 0.3s; +} + +.main-action-button:hover { + background-color: #4540d6; +} \ No newline at end of file diff --git a/src/perfis/perfil_secretaria/PerfilSecretaria.jsx b/src/perfis/perfil_secretaria/PerfilSecretaria.jsx index 89aaa339..a6f455ed 100644 --- a/src/perfis/perfil_secretaria/PerfilSecretaria.jsx +++ b/src/perfis/perfil_secretaria/PerfilSecretaria.jsx @@ -1,4 +1,5 @@ -import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; +//import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; +import { Routes, Route } from "react-router-dom"; import Sidebar from "../../components/Sidebar"; import Inicio from "../../pages/Inicio"; @@ -15,12 +16,12 @@ import DoctorEditPage from "../../pages/DoctorEditPage"; function PerfilSecretaria() { return ( - + //
- } /> + } /> } /> } /> } /> @@ -35,7 +36,7 @@ function PerfilSecretaria() {
-
+ //
); }