Concerto das linkagens
This commit is contained in:
parent
086bf2b700
commit
0bf19ab6f2
@ -1,37 +1,11 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { FaUser, FaUserPlus, FaCalendarAlt, FaCalendarCheck } from 'react-icons/fa';
|
||||
import './style/Inicio.css';
|
||||
|
||||
function Inicio({ setCurrentPage }) {
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
function Inicio() {
|
||||
const [pacientes, setPacientes] = useState([]);
|
||||
const [agendamentos, setAgendamentos] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchPacientes = async () => {
|
||||
try {
|
||||
const res = await fetch("https://mock.apidog.com/m1/1053378-0-default/pacientes");
|
||||
const data = await res.json();
|
||||
console.log(data)
|
||||
//setPacientes(data.data);
|
||||
} catch (error) {
|
||||
console.error("Erro ao buscar pacientes:", error);
|
||||
}
|
||||
};
|
||||
|
||||
const fetchAgendamentos = async () => {
|
||||
return; // <===serve para que nao cause erro
|
||||
// try {
|
||||
// const res = await fetch();
|
||||
// const data = await res.json();
|
||||
// setAgendamentos(data.data);
|
||||
// } catch (error) {
|
||||
// console.error("Erro ao buscar agendamentos:", error);
|
||||
// }
|
||||
};
|
||||
|
||||
fetchPacientes();
|
||||
fetchAgendamentos();
|
||||
}, []);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const totalPacientes = pacientes.length;
|
||||
const novosEsseMes = pacientes.filter(p => p.createdAt && new Date(p.createdAt).getMonth() === new Date().getMonth()).length;
|
||||
@ -87,21 +61,21 @@ function Inicio({ setCurrentPage }) {
|
||||
<div className="quick-actions">
|
||||
<h2>Ações Rápidas</h2>
|
||||
<div className="actions-grid">
|
||||
<div className="action-button" onClick={() => setCurrentPage('form-layout')}>
|
||||
<div className="action-button" onClick={() => navigate('/form-layout')}>
|
||||
<FaUserPlus className="action-icon" />
|
||||
<div className="action-info">
|
||||
<span className="action-title">Novo Paciente</span>
|
||||
<span className="action-title">Novo Pacient</span>
|
||||
<span className="action-desc">Cadastrar um novo paciente</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="action-button" onClick={() => setCurrentPage('table')}>
|
||||
<div className="action-button" onClick={() => navigate('/table')}>
|
||||
<FaUser className="action-icon" />
|
||||
<div className="action-info">
|
||||
<span className="action-title">Lista de Pacientes</span>
|
||||
<span className="action-desc">Ver todos os pacientes</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="action-button" onClick={() => setCurrentPage('agendamento')}>
|
||||
<div className="action-button" onClick={() => navigate('agendamento')}>
|
||||
<FaCalendarCheck className="action-icon" />
|
||||
<div className="action-info">
|
||||
<span className="action-title">Agendamentos</span>
|
||||
@ -126,7 +100,7 @@ function Inicio({ setCurrentPage }) {
|
||||
<div className="no-appointments-content">
|
||||
<FaCalendarCheck className="no-appointments-icon" />
|
||||
<p>Nenhum agendamento para hoje</p>
|
||||
<button className="manage-button" onClick={() => setCurrentPage('agendamento')}>
|
||||
<button className="manage-button" onClick={() => navigate('/medico/agendamento')}>
|
||||
Gerenciar Agendamentos
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -281,21 +281,20 @@ function PatientForm({ onSave, onCancel, formData, setFormData }) {
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* CAMPOS MOVIDOS */}
|
||||
<div className="col-md-12 mb-3 mt-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>Observações:</label>
|
||||
<textarea className="form-control" name="notes" value={formData.notes} onChange={handleChange} style={{ fontSize: '1.1rem' }} placeholder='alergias, doenças crônicas, informações sobre porteses ou marca-passo, etc'></textarea>
|
||||
</div>
|
||||
<div className="col-md-12 mb-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>Anexos do Paciente:</label>
|
||||
<div>
|
||||
<label htmlFor="anexos-input" className="btn btn-secondary" style={{ fontSize: '1.1rem' }}>Escolher arquivo</label>
|
||||
<input type="file" className="form-control d-none" name="anexos" id="anexos-input" onChange={handleChange} />
|
||||
<span className="ms-2" style={{ fontSize: '1.1rem' }}>{formData.anexos ? formData.anexos.name : 'Nenhum arquivo escolhido'}</span>
|
||||
<div className="form-check">
|
||||
<input className="form-check-input" type="checkbox" name="vip" checked={formData.vip} onChange={handleChange} id="vip" style={{ transform: 'scale(1.2)' }} />
|
||||
<label className="form-check-label ms-2" htmlFor="vip" style={{ fontSize: '1.1rem' }}>
|
||||
Paciente VIP
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-md-12 mb-3 mt-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>Observações:</label>
|
||||
<textarea className="form-control" name="notes" value={formData.notes} onChange={handleChange} style={{ fontSize: '1.1rem' }} placeholder='alergias, doenças crônicas, informações sobre porteses ou marca-passo, etc'></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -332,68 +331,12 @@ function PatientForm({ onSave, onCancel, formData, setFormData }) {
|
||||
<label style={{ fontSize: '1.1rem' }}>Altura (m):</label>
|
||||
<input type="text" step="0.01" className="form-control" name="height_m" value={formData.height_m} onChange={handleChange} style={{ fontSize: '1.1rem' }} />
|
||||
</div>
|
||||
<div className="col-md-2 mb-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>IMC (kg/m²):</label>
|
||||
<input type="text" className="form-control" name="bmi" value={formData.bmi} readOnly disabled style={{ fontSize: '1.1rem' }} />
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* INFORMAÇÕES DE CONVÊNIO */}
|
||||
<div className="mb-5 p-4 border rounded shadow-sm">
|
||||
<h4 className="mb-4 cursor-pointer d-flex justify-content-between align-items-center" onClick={() => handleToggleCollapse('infoConvenio')} style={{ fontSize: '1.8rem' }}>
|
||||
Informações de convênio
|
||||
<span className="fs-5">
|
||||
{collapsedSections.infoConvenio ? '▲' : '▼'}
|
||||
</span>
|
||||
</h4>
|
||||
<div className={`collapse${collapsedSections.infoConvenio ? ' show' : ''}`}>
|
||||
<div className="row mt-3">
|
||||
<div className="col-md-6 mb-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>Convênio:</label>
|
||||
<select className="form-control" name="convenio" value={formData.convenio} onChange={handleChange} style={{ fontSize: '1.1rem' }}>
|
||||
<option value="">Selecione</option>
|
||||
<option value="Amil">Amil</option>
|
||||
<option value="Bradesco Saúde">Bradesco Saúde</option>
|
||||
<option value="SulAmérica">SulAmérica</option>
|
||||
<option value="Unimed">Unimed</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="col-md-6 mb-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>Plano:</label>
|
||||
<input type="text" className="form-control" name="plano" value={formData.plano} onChange={handleChange} style={{ fontSize: '1.1rem' }} />
|
||||
</div>
|
||||
<div className="col-md-6 mb-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>Nº de matrícula:</label>
|
||||
<input type="text" className="form-control" name="numeroMatricula" value={formData.numeroMatricula} onChange={handleChange} style={{ fontSize: '1.1rem' }} />
|
||||
</div>
|
||||
<div className="col-md-4 mb-3">
|
||||
<label style={{ fontSize: '1.1rem' }}>Validade da Carteira:</label>
|
||||
<input type="date" className="form-control" name="validadeCarteira" value={formData.validadeCarteira} onChange={handleChange} disabled={formData.validadeIndeterminada} style={{ fontSize: '1.1rem' }} />
|
||||
</div>
|
||||
<div className="col-md-2 d-flex align-items-end mb-3">
|
||||
<div className="form-check">
|
||||
<input className="form-check-input" type="checkbox" name="validadeIndeterminada" checked={formData.validadeIndeterminada} onChange={handleChange} id="validadeIndeterminada" style={{ transform: 'scale(1.2)' }} />
|
||||
<label className="form-check-label ms-2" htmlFor="validadeIndeterminada" style={{ fontSize: '1.1rem' }}>
|
||||
Validade indeterminada
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{/* PACIENTE VIP */}
|
||||
<div className="col-md-12 mb-3 mt-3">
|
||||
<div className="form-check">
|
||||
<input className="form-check-input" type="checkbox" name="vip" checked={formData.vip} onChange={handleChange} id="vip" style={{ transform: 'scale(1.2)' }} />
|
||||
<label className="form-check-label ms-2" htmlFor="vip" style={{ fontSize: '1.1rem' }}>
|
||||
Paciente VIP
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* ENDEREÇO */}
|
||||
<div className="mb-5 p-4 border rounded shadow-sm">
|
||||
<h4 className="mb-4 cursor-pointer d-flex justify-content-between align-items-center" onClick={() => handleToggleCollapse('endereco')} style={{ fontSize: '1.8rem' }}>
|
||||
|
||||
@ -3,12 +3,6 @@
|
||||
"name": "Menu",
|
||||
"isTitle": true
|
||||
},
|
||||
|
||||
{
|
||||
"name":"Início",
|
||||
"url": "/admin/",
|
||||
"icon": "house"
|
||||
},
|
||||
{
|
||||
"name": "Lista de Pacientes",
|
||||
"icon": "clipboard-heart-fill",
|
||||
@ -20,12 +14,7 @@
|
||||
"icon": "hospital-fill",
|
||||
"url": "/admin/medicos"
|
||||
},
|
||||
{
|
||||
"name": "Agendar consulta",
|
||||
"icon": "calendar-plus-fill",
|
||||
"url": "/admin/agendamento"
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"name": "Gestão de Usuários",
|
||||
"icon": "person-badge-fill",
|
||||
|
||||
@ -3,25 +3,6 @@
|
||||
"name": "Menu-Financeiro",
|
||||
"isTitle": true
|
||||
},
|
||||
|
||||
{
|
||||
"name":"Início",
|
||||
"url": "/financeiro/inicio",
|
||||
"icon": "house"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Lista de Pacientes",
|
||||
"icon": "clipboard-heart-fill",
|
||||
"url": "/financeiro/pacientes"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Lista de Médico",
|
||||
"icon": "hospital-fill",
|
||||
"url": "/financeiro/medicos"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Controle Financeiro",
|
||||
"icon": "cash-coin",
|
||||
|
||||
@ -3,12 +3,6 @@
|
||||
"name": "Menu",
|
||||
"isTitle": true
|
||||
},
|
||||
|
||||
{
|
||||
"name":"Início",
|
||||
"url": "/medico/",
|
||||
"icon": "house"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "Prontuário",
|
||||
|
||||
@ -1,22 +1,26 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import avatarPlaceholder from '../assets/images/avatar_placeholder.png';
|
||||
import { useParams } from "react-router-dom";
|
||||
import { useParams, useNavigate, useLocation, Navigate } from "react-router-dom";
|
||||
import API_KEY from "../components/utils/apiKeys";
|
||||
import {GetByID} from "../components/utils/Functions-Endpoints/Patient"
|
||||
import { Link } from "react-router-dom";
|
||||
import { useAuth } from "../components/utils/AuthProvider";
|
||||
|
||||
|
||||
|
||||
const Details = () => {
|
||||
const parametros = useParams();
|
||||
const {getAuthorizationHeader, isAuthenticated} = useAuth();
|
||||
const [paciente, setPaciente] = useState({});
|
||||
const [anexos, setAnexos] = useState([]);
|
||||
const [selectedFile, setSelectedFile] = useState(null);
|
||||
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const patientID = parametros.id
|
||||
|
||||
const Voltar = () => {
|
||||
const prefixo = location.pathname.split("/")[1];
|
||||
navigate(`/${prefixo}/pacientes`);
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (!patientID) return;
|
||||
@ -30,36 +34,8 @@ const Details = () => {
|
||||
})
|
||||
.catch((err) => console.error("Erro ao buscar paciente:", err));
|
||||
|
||||
/*fetch(`https://mock.apidog.com/m1/1053378-0-default/pacientes/${patientID}/anexos`)
|
||||
.then(res => res.json())
|
||||
.then(data => setAnexos(data.data || []))
|
||||
.catch(err => console.error("Erro ao buscar anexos:", err));
|
||||
*/
|
||||
}, [patientID]);
|
||||
}, [patientID]);
|
||||
|
||||
const handleUpload = async () => {
|
||||
if (!selectedFile) return;
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('file', selectedFile);
|
||||
|
||||
try {
|
||||
const response = await fetch(`https://mock.apidog.com/m1/1053378-0-default/pacientes/${patientID}/anexos`, {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
});
|
||||
|
||||
if (response.ok) {
|
||||
const newAnexo = await response.json();
|
||||
setAnexos(prev => [...prev, newAnexo]);
|
||||
setSelectedFile(null);
|
||||
} else {
|
||||
console.error('Erro ao enviar anexo');
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Erro ao enviar anexo:', err);
|
||||
}
|
||||
};
|
||||
|
||||
const handleDelete = async (anexoId) => {
|
||||
try {
|
||||
@ -89,11 +65,10 @@ const Details = () => {
|
||||
<h3 className="mb-3 text-center">MediConnect</h3>
|
||||
<hr />
|
||||
<div className="d-flex justify-content-between align-items-center mb-3">
|
||||
<Link to={'pacientes'}>
|
||||
<button className="btn btn-success me-2" >
|
||||
<button className="btn btn-success me-2" onClick={() => Voltar()}>
|
||||
<i className="bi bi-chevron-left"></i> Voltar
|
||||
</button>
|
||||
</Link>
|
||||
|
||||
|
||||
<div className="d-flex mb-3">
|
||||
<div className="avatar avatar-xl">
|
||||
@ -197,10 +172,7 @@ const Details = () => {
|
||||
<label className="font-extrabold">Estado civil:</label>
|
||||
<p>{paciente.marital_status || "-"}</p>
|
||||
</div>
|
||||
<div className="col-md-6 mb-3">
|
||||
<label className="font-extrabold">Nome do esposo(a):</label>
|
||||
<p>{paciente.nome_conjuge || "-"}</p>
|
||||
</div>
|
||||
|
||||
<div className="col-md-6 mb-3">
|
||||
<label className="font-extrabold">Identificador de outro sistema:</label>
|
||||
<p>{paciente.legacy_code || "-"}</p>
|
||||
@ -210,28 +182,18 @@ const Details = () => {
|
||||
<input className="form-check-input" type="checkbox" checked={paciente.rn_in_insurance} disabled/>
|
||||
<label className="font-extrabold">RN na Guia do convênio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-md-2 d-flex align-items-end mb-3">
|
||||
<div className="form-check">
|
||||
<input className="form-check-input" type="checkbox" checked={paciente.vip} disabled/>
|
||||
<label className="font-extrabold">Paciente VIP: </label>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-md-6 mb-3">
|
||||
<label className="font-extrabold">Observações:</label>
|
||||
<p>{paciente.notes || "-"}</p>
|
||||
</div>
|
||||
<div className="col-md-6 mb-3">
|
||||
<label className="font-extrabold">Anexos do Paciente:</label>
|
||||
{anexos.length > 0 ?(
|
||||
<ul>
|
||||
{anexos.map((anexo) => (
|
||||
<li key={anexo.id} className="d-flex aling-items-center">
|
||||
<a href={anexo.url} target="-blank" rel="noopener noreferrer">
|
||||
{anexo.nome}
|
||||
</a>
|
||||
<button className="btn btn-danger btn-sm" onclick={() => handleDelete(anexo.id)} >Remover</button>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<p>-</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@ -260,42 +222,6 @@ const Details = () => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* ------------------ INFORMAÇÕES DE CONVÊNIO ------------------ */}
|
||||
<div className="card p-3 shadow-sm">
|
||||
<h5>Informações de Convênio</h5>
|
||||
<hr />
|
||||
<div className="row">
|
||||
<div className="col-md-6 mb-3">
|
||||
<label className="font-extrabold">Convênio:</label>
|
||||
<p>{paciente.convenio || "-"}</p>
|
||||
</div>
|
||||
<div className="col-md-6 mb-3">
|
||||
<label className="font-extrabold">Plano:</label>
|
||||
<p>{paciente.plano || "-"}</p>
|
||||
</div>
|
||||
<div className="col-md-6 mb-3">
|
||||
<label className="font-extrabold">Nº de matrícula:</label>
|
||||
<p>{paciente.numeroMatricula || "-"}</p>
|
||||
</div>
|
||||
<div className="col-md-3 mb-3">
|
||||
<label className="font-extrabold">Validade da Carteira:</label>
|
||||
<p>{paciente.validadeCarteira || "-"}</p>
|
||||
</div>
|
||||
<div className="col-md-2 d-flex align-items-end mb-3">
|
||||
<div className="form-check">
|
||||
<input className="form-check-input" type="checkbox" checked={paciente.validadeIndeterminada} disabled/>
|
||||
<label className="font-extrabold">Validade indeterminada:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-md-2 d-flex align-items-end mb-3">
|
||||
<div className="form-check">
|
||||
<input className="form-check-input" type="checkbox" checked={paciente.vip} disabled/>
|
||||
<label className="font-extrabold">Paciente VIP: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* ------------------ ENDEREÇO ------------------ */}
|
||||
<div className="card p-3 shadow-sm">
|
||||
<h5>Endereço</h5>
|
||||
|
||||
@ -1,13 +1,20 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import avatarPlaceholder from '../assets/images/avatar_placeholder.png';
|
||||
import { useParams,Link } from "react-router-dom";
|
||||
import { useParams,Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { GetDoctorByID } from "../components/utils/Functions-Endpoints/Doctor";
|
||||
import { useAuth } from "../components/utils/AuthProvider";
|
||||
|
||||
const Details = ({setCurrentPage }) => {
|
||||
const {getAuthorizationHeader, isAuthenticated} = useAuth();
|
||||
|
||||
const Details = () => {
|
||||
const {getAuthorizationHeader} = useAuth();
|
||||
const [doctor, setDoctor] = useState({});
|
||||
const Parametros = useParams()
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
const Voltar = () => {
|
||||
const prefixo = location.pathname.split("/")[1];
|
||||
navigate(`/${prefixo}/medicos`);
|
||||
}
|
||||
|
||||
const doctorID = Parametros.id
|
||||
useEffect(() => {
|
||||
@ -34,11 +41,10 @@ const Details = ({setCurrentPage }) => {
|
||||
<h3 className="mb-3 text-center">MediConnect</h3>
|
||||
<hr />
|
||||
<div className="d-flex justify-content-between align-items-center mb-3">
|
||||
<Link to={'/medicos'}>
|
||||
<button className="btn btn-success me-2" >
|
||||
<i className="bi bi-chevron-left"></i> Voltar
|
||||
</button>
|
||||
</Link>
|
||||
<button className="btn btn-success me-2" onClick={() => Voltar()}>
|
||||
<i className="bi bi-chevron-left"></i> Voltar
|
||||
</button>
|
||||
|
||||
<div className="d-flex mb-3">
|
||||
<div className="avatar avatar-xl">
|
||||
<img src={avatarPlaceholder} alt="" />
|
||||
@ -48,7 +54,7 @@ const Details = ({setCurrentPage }) => {
|
||||
<p>{doctor.cpf || "CPF"}</p>
|
||||
</div>
|
||||
</div>
|
||||
<Link to={`/medicos/${doctor.id}/edit`}>
|
||||
<Link to={`edit`}>
|
||||
<button className="btn btn-light" onClick={() => {console.log(doctor.id)}} >
|
||||
<i className="bi bi-pencil-square"></i> Editar
|
||||
</button>
|
||||
|
||||
@ -48,13 +48,8 @@ const authHeader = getAuthorizationHeader()
|
||||
};
|
||||
|
||||
try {
|
||||
const response = await fetch(`https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctors?id=eq.${DoctorID}`,requestOptions);
|
||||
|
||||
// se o backend retorna JSON
|
||||
const result = await response.json();
|
||||
console.log("ATUALIZADO COM SUCESSO", result);
|
||||
|
||||
return result;
|
||||
const response = await fetch(`https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctors?id=eq.${DoctorID}`,requestOptions);
|
||||
|
||||
} catch (error) {
|
||||
console.error("Erro ao atualizar paciente:", error);
|
||||
throw error;
|
||||
|
||||
@ -53,11 +53,11 @@ const HandlePutPatient = async () => {
|
||||
try {
|
||||
const response = await fetch(`https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/patients?id=eq.${PatientID}`,requestOptions);
|
||||
|
||||
// se o backend retorna JSON
|
||||
console.log("Resposta do servidor:", response.ok);
|
||||
|
||||
|
||||
if(response.ok === false){
|
||||
const errorText = await response.text();
|
||||
console.error("Erro ao atualizar paciente:", errorText);
|
||||
|
||||
console.error("Erro ao atualizar paciente:");
|
||||
}
|
||||
else{
|
||||
|
||||
|
||||
@ -37,8 +37,6 @@ function PatientCadastroManager( {} ) {
|
||||
};
|
||||
|
||||
|
||||
// 23505 - cpf duplicadoo
|
||||
// 23514 - cpf invalido
|
||||
try {
|
||||
const response = await fetch("https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/patients", requestOptions);
|
||||
console.log(response.ok, 'aqui')
|
||||
@ -55,7 +53,7 @@ function PatientCadastroManager( {} ) {
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log("ATUALIZADO COM SUCESSO");
|
||||
console.log("Salvo com sucesso");
|
||||
navigate('/pacientes')
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@ -22,7 +22,7 @@ function Perfiladm() {
|
||||
<Sidebar menuItems={admItems} />
|
||||
<div id="main">
|
||||
<Routes>
|
||||
<Route path="/" element={<Inicio />} />
|
||||
<Route path="/" element={<UserDashboard />} />
|
||||
<Route path="/pacientes/cadastro" element={<PatientCadastroManager />} />
|
||||
<Route path="/medicos/cadastro" element={<DoctorCadastroManager />} />
|
||||
<Route path="/pacientes" element={<TablePaciente />} />
|
||||
@ -33,7 +33,7 @@ function Perfiladm() {
|
||||
<Route path="/medicos/:id/edit" element={<DoctorEditPage />} />
|
||||
<Route path="/agendamento" element={<Agendamento />} />
|
||||
<Route path="/laudo" element={<LaudoManager />} />
|
||||
<Route path="/laudo" element={<LaudoManager />} />
|
||||
|
||||
<Route path="/gestao" element={<UserDashboard />} />
|
||||
<Route path="/painel" element={<PainelAdministrativo />} />
|
||||
<Route path="*" element={<h2>Página não encontrada</h2>} />
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
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";
|
||||
import LaudoManager from "../../pages/LaudoManager";
|
||||
import Prontuario from "../../PagesMedico/prontuario";
|
||||
import Relatorio from "../../PagesMedico/relatorio";
|
||||
@ -17,7 +16,7 @@ function PerfilMedico() {
|
||||
<Sidebar menuItems={DoctorItems} />
|
||||
<div id="main">
|
||||
<Routes>
|
||||
<Route path="/" element={<Inicio />} />
|
||||
<Route path="/" element={<LaudoManager />} />
|
||||
<Route path="/laudo" element={<LaudoManager />} />
|
||||
<Route path="/prontuario" element={<Prontuario />} />
|
||||
<Route path="/relatorios" element={<Relatorio />} />
|
||||
|
||||
@ -2,11 +2,8 @@ import { Routes, Route } from "react-router-dom";
|
||||
import Sidebar from "../../components/Sidebar";
|
||||
import FinanceiroItems from "../../data/sidebar-items-financeiro.json";
|
||||
import Inicio from "../../pages/Inicio";
|
||||
import TablePaciente from "../../pages/TablePaciente";
|
||||
import FinanceiroDashboard from "../../pages/FinanceiroDashboard";
|
||||
import DoctorTable from "../../pages/DoctorTable";
|
||||
import Details from "../../pages/Details";
|
||||
import DoctorDetails from "../../pages/DoctorDetails";
|
||||
|
||||
|
||||
function PerfilFinanceiro({ onLogout }) {
|
||||
return (
|
||||
@ -15,12 +12,9 @@ function PerfilFinanceiro({ onLogout }) {
|
||||
<div id="main">
|
||||
<Routes>
|
||||
<Route path="/" element={<FinanceiroDashboard/>}/>
|
||||
<Route path="inicio" element={<Inicio />} />
|
||||
|
||||
<Route path="controlefinanceiro" element={<FinanceiroDashboard/>}/>
|
||||
<Route path="pacientes" element={<TablePaciente />} />
|
||||
<Route path="medicos" element={<DoctorTable />} />
|
||||
<Route path="pacientes/:id" element={<Details />} />
|
||||
<Route path="medicos/:id" element={<DoctorDetails />} />
|
||||
|
||||
<Route path="*" element={<h2>Página não encontrada</h2>} />
|
||||
</Routes>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user