From bdabcf9f60a3c7e2164b36002d7714f91519fc79 Mon Sep 17 00:00:00 2001 From: jp-lima Date: Fri, 3 Oct 2025 17:02:23 -0300 Subject: [PATCH] Inicio Login funcional e troca de perfis --- .../style/styleTabelas/tabeladia.css | 12 +- src/components/ProfileCard.js | 4 +- src/components/Sidebar.jsx | 4 + src/components/patients/PatientForm.jsx | 1 - src/pages/DoctorEditPage.jsx | 2 +- src/pages/DoctorTable.jsx | 4 +- src/pages/Login.jsx | 104 +++++++++++++----- src/pages/PatientCadastroManager.jsx | 2 +- src/pages/TablePaciente.jsx | 6 +- 9 files changed, 90 insertions(+), 49 deletions(-) diff --git a/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css b/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css index a242ba06..3a1dc164 100644 --- a/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css +++ b/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css @@ -52,17 +52,7 @@ font-weight: 600; } /* Ajuste para a classe calendario, se for usada */ -/* -.calendario { - margin-top: 20px; - border-collapse: collapse; - width: 100%; - border-radius: 10px; - overflow: hidden; - box-shadow: 0 4px 12px rgb(255, 255, 255); - border: 10px solid #ffffffc5; - background-color: rgb(253, 253, 253); -}*/ + .mostrar-horario td, .mostrar-horario th { diff --git a/src/components/ProfileCard.js b/src/components/ProfileCard.js index 7a5b181a..64b88b2c 100644 --- a/src/components/ProfileCard.js +++ b/src/components/ProfileCard.js @@ -1,4 +1,4 @@ -/*import React from 'react'; +import React from 'react'; function ProfileCard() { return ( @@ -18,4 +18,4 @@ function ProfileCard() { ); } -export default ProfileCard;*/ \ No newline at end of file +export default ProfileCard; \ No newline at end of file diff --git a/src/components/Sidebar.jsx b/src/components/Sidebar.jsx index ecc49fd6..e1cc85ad 100644 --- a/src/components/Sidebar.jsx +++ b/src/components/Sidebar.jsx @@ -1,6 +1,8 @@ import React, { useState } from "react"; import { Link } from "react-router-dom"; import menuItems from "../data/sidebar-items-medico.json"; // Use "sidebar-items-secretaria.json" para secretaria e "sidebar-items-adm.json" para ADM +import TrocardePerfis from "./TrocardePerfis"; + // 1. Recebe 'menuItems' e 'onLogout' como props function Sidebar({ menuItems, onLogout }) { @@ -120,6 +122,8 @@ function Sidebar({ menuItems, onLogout }) { + + diff --git a/src/components/patients/PatientForm.jsx b/src/components/patients/PatientForm.jsx index 1e76f572..fc76e97e 100644 --- a/src/components/patients/PatientForm.jsx +++ b/src/components/patients/PatientForm.jsx @@ -105,7 +105,6 @@ function PatientForm({ onSave, onCancel, formData, setFormData }) { const handleSubmit = async () => { if (!formData.full_name || !formData.cpf || !formData.sex || !formData.birth_date){ - console.log(formData.full_name, formData.cpf, formData.sex, formData.birth_date) setErrorModalMsg('Por favor, preencha Nome, CPF, Gênero e data de nascimento.'); setShowModal404(true); return diff --git a/src/pages/DoctorEditPage.jsx b/src/pages/DoctorEditPage.jsx index 41cff758..fd934a73 100644 --- a/src/pages/DoctorEditPage.jsx +++ b/src/pages/DoctorEditPage.jsx @@ -5,7 +5,7 @@ import { useAuth } from '../components/utils/AuthProvider' import {useEffect, useState} from 'react' import { useParams } from 'react-router-dom' import API_KEY from '../components/utils/apiKeys' -const DoctorEditPage = ( {id, setCurrentPage}) => { +const DoctorEditPage = () => { const {getAuthorizationHeader, isAuthenticated} = useAuth(); const [DoctorToPUT, setDoctorPUT] = useState({}) diff --git a/src/pages/DoctorTable.jsx b/src/pages/DoctorTable.jsx index 54ae437d..16b49f66 100644 --- a/src/pages/DoctorTable.jsx +++ b/src/pages/DoctorTable.jsx @@ -163,7 +163,7 @@ function TableDoctor({ setCurrentPage, setPatientID }) {
{/* Ver Detalhes */} - +