Reorganização do CSS
This commit is contained in:
parent
b306e2ad5d
commit
7db8d38bb0
@ -1,6 +1,5 @@
|
||||
/* TrocardePerfis.css */
|
||||
.container-perfis {
|
||||
/* certifique-se de que este arquivo esteja sendo importado corretamente */
|
||||
position: relative; /* evita sobrescrever posição do layout pai */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
10
src/App.js
10
src/App.js
@ -3,10 +3,10 @@
|
||||
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
||||
|
||||
// Suas páginas
|
||||
import Login from "./pages/usuario/Login.jsx";
|
||||
import Register from "./pages/usuario/CadastrarUsuario.jsx";
|
||||
import Forgot from "./pages/usuario/RecuperarConta.jsx";
|
||||
import LandingPage from './pages/usuario/Inicio.jsx';
|
||||
import Login from "./pages/geral/Login.jsx";
|
||||
import Register from "./pages/geral/CadastrarUsuario.jsx";
|
||||
import Forgot from "./pages/geral/RecuperarConta.jsx";
|
||||
import LandingPage from './pages/geral/Inicio.jsx';
|
||||
|
||||
import PerfilSecretaria from "./perfis/perfil_secretaria/PerfilSecretaria.jsx"
|
||||
import PerfilFinanceiro from "./perfis/perfil_financeiro/PerfilFinanceiro.jsx";
|
||||
@ -15,7 +15,7 @@ import PerfilMedico from "./perfis/Perfil_medico/PerfilMedico.jsx";
|
||||
import PerfilPaciente from "./perfis/Perfil_paciente/PerfilPaciente.jsx"
|
||||
|
||||
// COMBINADO: Importações de ambas as versões
|
||||
import ProfilePage from "./pages/usuario/PerfilUsuario.jsx";
|
||||
import ProfilePage from "./pages/geral/PerfilUsuario.jsx";
|
||||
import Header from "./components/Header/Header.jsx";
|
||||
|
||||
// Componentes globais de acessibilidade
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* card-consulta.css */
|
||||
.actions-container {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
@ -1,3 +1,5 @@
|
||||
/* DoctorForm.css */
|
||||
|
||||
.doctor-form-container {
|
||||
padding: 1rem;
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
/* PatientForm.css */
|
||||
|
||||
.patient-form-container {
|
||||
padding: 1rem;
|
||||
}
|
||||
@ -1,3 +1,4 @@
|
||||
/* gestao.css */
|
||||
|
||||
.dashboard-container {
|
||||
padding: 2rem;
|
||||
@ -1,3 +1,5 @@
|
||||
/* painel.css */
|
||||
|
||||
.painel-container {
|
||||
padding: 2rem;
|
||||
font-family: Arial, sans-serif;
|
||||
@ -1,3 +1,5 @@
|
||||
/* Inicio.css */
|
||||
|
||||
/* Container Principal */
|
||||
.dashboard-container {
|
||||
padding: 2rem;
|
||||
@ -1,3 +1,5 @@
|
||||
/* DoctorRelatorioManager.css */
|
||||
|
||||
.contador-relatorios {
|
||||
background-color: #1e3a8a;
|
||||
color: white;
|
||||
@ -1,3 +1,5 @@
|
||||
/* geral.css */
|
||||
|
||||
/* --- Estilos Gerais e Reset Básico --- */
|
||||
:root {
|
||||
--cor-primaria: #0078d7; /* Azul principal */
|
||||
@ -1,3 +1,5 @@
|
||||
/* inicioPaciente.css */
|
||||
|
||||
.dashboard-paciente-container {
|
||||
padding: 2rem;
|
||||
background-color: #f7f9fc;
|
||||
@ -1,3 +1,5 @@
|
||||
/* DoctorCadastroManager.css */
|
||||
|
||||
/* Estilos do modal */
|
||||
.modal-overlay {
|
||||
display: flex;
|
||||
@ -1,3 +1,5 @@
|
||||
/* PatientCadastroManager.css */
|
||||
|
||||
.page-heading {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
@ -1,3 +1,5 @@
|
||||
/* DisponibilidadesDoctorPage.css */
|
||||
|
||||
.disponibilidades-container {
|
||||
padding: 20px;
|
||||
background: #f5f7fa;
|
||||
@ -43,5 +43,4 @@ const SearchCep = async (cep) => {
|
||||
.then(response => console.log(response))
|
||||
}
|
||||
|
||||
|
||||
export { UserInfos,SearchCep };
|
||||
@ -1,7 +1,5 @@
|
||||
import API_KEY from "../apiKeys";
|
||||
|
||||
|
||||
|
||||
const GetPatientByID = async (ID,authHeader) => {
|
||||
|
||||
var myHeaders = new Headers();
|
||||
@ -14,7 +12,6 @@ const GetPatientByID = async (ID,authHeader) => {
|
||||
headers:myHeaders
|
||||
};
|
||||
|
||||
|
||||
const result = await fetch(`https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/patients?id=eq.${ID}`, requestOptions)
|
||||
const DictPaciente = await result.json()
|
||||
return DictPaciente
|
||||
@ -39,7 +36,6 @@ const GetAllPatients = async (authHeader) => {
|
||||
const GetPatientByCPF = async (cpf, authHeader) => {
|
||||
const Pacientes = await GetAllPatients(authHeader)
|
||||
|
||||
|
||||
for (let i = 0; i < Pacientes.length; i++) {
|
||||
if (Pacientes[i].cpf === cpf) {
|
||||
console.log('Paciente encontrado:', Pacientes[i]);
|
||||
@ -47,7 +43,6 @@ const GetAllPatients = async (authHeader) => {
|
||||
}
|
||||
else{console.log("nada encontrado")}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export {GetPatientByID, GetAllPatients, GetPatientByCPF}
|
||||
@ -1,9 +1,7 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { useNavigate, useLocation } from 'react-router-dom';
|
||||
// import './Header.css';
|
||||
import '../../_assets/css/components/Header.css';
|
||||
|
||||
const Header = () => {
|
||||
// --- hooks (sempre na mesma ordem) ---
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { useAuth } from "./utils/AuthProvider";
|
||||
import { useAuth } from "../../_assets/utils/AuthProvider";
|
||||
import MobileMenuToggle from "./MobileMenuToggle";
|
||||
import ToggleSidebar from "./ToggleSidebar";
|
||||
|
||||
import PacienteItems from "../data/sidebar-items-paciente.json"
|
||||
import DoctorItems from "../data/sidebar-items-medico.json"
|
||||
import admItems from "../data/sidebar-items-adm.json"
|
||||
import SecretariaItems from "../data/sidebar-items-secretaria.json"
|
||||
import FinanceiroItems from "../data/sidebar-items-financeiro.json"
|
||||
import PacienteItems from "../../data/sidebar-items-paciente.json"
|
||||
import DoctorItems from "../../data/sidebar-items-medico.json"
|
||||
import admItems from "../../data/sidebar-items-adm.json"
|
||||
import SecretariaItems from "../../data/sidebar-items-secretaria.json"
|
||||
import FinanceiroItems from "../../data/sidebar-items-financeiro.json"
|
||||
|
||||
|
||||
function Sidebar({ menuItems }) {
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from 'react'
|
||||
import { Link, useLocation } from 'react-router-dom'
|
||||
//import "./Estilo/Toggle.css"
|
||||
import "../../_assets/css/components/Sidebar/ToggleSidebar.css"
|
||||
|
||||
const ToggleSidebar = ({ perfil, items, defaultOpen = false }) => {
|
||||
const [isOpen, setOpen] = useState(defaultOpen)
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
//TrocardePerfis.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { UserInfos } from "../_assets/utils/Functions-Endpoints/General";
|
||||
import { useAuth } from "../_assets/utils/AuthProvider";
|
||||
|
||||
//import "./TrocardePerfis.css";
|
||||
import "../_assets/css/components/TrocarPerfis.css";
|
||||
|
||||
const ToggleIcon = ({ isOpen }) => (
|
||||
<svg
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
//Nesta página falta: mudar nomes, ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { FaVideo, FaExpand, FaCompress } from 'react-icons/fa';
|
||||
import { JitsiMeeting } from '@jitsi/react-sdk';
|
||||
import { db } from '../../firebaseConfig';
|
||||
import { ref, set, remove } from "firebase/database";
|
||||
|
||||
//import './BotaoVideoChamada.css';
|
||||
import '../../_assets/css/components/VideoChamada/BotaoVideoChamada.css';
|
||||
|
||||
// MOCK PACIENTE
|
||||
const mockPacientes = [
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { FaVideo, FaExpand, FaCompress, FaPhoneSlash, FaPhone } from 'react-icons/fa';
|
||||
import { JitsiMeeting } from '@jitsi/react-sdk';
|
||||
import { db } from '../../firebaseConfig';
|
||||
import { ref, onValue, remove } from "firebase/database";
|
||||
|
||||
//import './BotaoVideoPaciente.css';
|
||||
import '../../_assets/css/components/VideoChamada/BotaoVideoPaciente.css';
|
||||
|
||||
// ID DO PACIENTE
|
||||
const MEU_ID_PACIENTE = '1'; // Deve ser '1' para bater com o do médico
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect, useRef } from 'react';
|
||||
import { setTheme } from '../../_assets/static/js/components/dark'
|
||||
//import './botaoacessibilidade.css'; // Importando o CSS
|
||||
import '../../_assets/css/components/acessibilidade/BotaoAcessibilidade.css';
|
||||
|
||||
// Componente para o Guia de Leitura
|
||||
function GuiaDeLeitura() {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// src/components/VlibrasWidget.jsx
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
const VlibrasWidget = () => {
|
||||
useEffect(() => {
|
||||
@ -8,7 +8,7 @@ const VlibrasWidget = () => {
|
||||
const vwDiv = document.createElement('div');
|
||||
vwDiv.setAttribute('vw', '');
|
||||
vwDiv.classList.add('enabled');
|
||||
vwDiv.id = 'vlibras-div'; // 🔹 ADICIONADO: ID para remoção segura
|
||||
vwDiv.id = 'vlibras-div'; // ADICIONADO: ID para remoção segura
|
||||
|
||||
const vwAccessButton = document.createElement('div');
|
||||
vwAccessButton.setAttribute('vw-access-button', '');
|
||||
|
||||
@ -1,10 +1,7 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
|
||||
//import "./style/card-consulta.css"
|
||||
|
||||
import '../../_assets/css/components/agendamento/CardConsulta.css'
|
||||
|
||||
const CardConsulta = ( {DadosConsulta, TabelaAgendamento, setShowDeleteModal, setDictInfo, setSelectedId, setShowConfirmModal, corModal, selectedID, coresConsultas, setListaConsultaID, listaConsultasID} ) => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
//Nesta página falta: mudar nome da página, ajustar caminho do CSS
|
||||
//FormNovaConsulta.jsx
|
||||
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { GetPatientByCPF, GetAllPatients } from "../../_assets/utils/Functions-Endpoints/Patient";
|
||||
@ -6,8 +6,7 @@ import { GetAllDoctors } from "../../_assets/utils/Functions-Endpoints/Doctor";
|
||||
import { useAuth } from "../../_assets/utils/AuthProvider";
|
||||
import API_KEY from "../../_assets/utils/apiKeys";
|
||||
|
||||
//import "./style/formagendamentos.css";
|
||||
|
||||
import '../../_assets/css/components/agendamento/FormAgendamento.css';
|
||||
|
||||
const FormNovaConsulta = ({ onCancel, onSave, setAgendamento, agendamento }) => {
|
||||
const { getAuthorizationHeader } = useAuth();
|
||||
@ -1,7 +1,6 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { ChevronLeft, ChevronRight, Edit, Trash2, User, Stethoscope } from 'lucide-react';
|
||||
import '../../_assets/css/components/agendamento/tabelas/TabelaAgendamentoDia.css';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import 'dayjs/locale/pt-br';
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useEffect, useState, useMemo } from 'react';
|
||||
import '../../_assets/css/components/agendamento/tabelas/TabelaAgendamentoMes.css';
|
||||
|
||||
import CardConsulta from './CardConsulta';
|
||||
import Spinner from '../Spinner';
|
||||
import dayjs from "dayjs";
|
||||
|
||||
//import "./style/styleTabelas/tabelames.css";
|
||||
|
||||
const TabelaAgendamentoMes = ({ ListarDiasdoMes, agendamentos, setShowDeleteModal, setSelectedId ,setDictInfo, setShowConfirmModal, coresConsultas ,setListaConsultaID, listaConsultasID }) => {
|
||||
|
||||
|
||||
@ -1,14 +1,12 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useEffect, useState, useMemo } from 'react';
|
||||
import '../../_assets/css/components/agendamento/tabelas/TabelaAgendamentoSemana.css';
|
||||
|
||||
import CardConsulta from './CardConsulta';
|
||||
import Spinner from '../Spinner';
|
||||
import weekOfYear from 'dayjs/plugin/weekOfYear'
|
||||
import dayjs from 'dayjs';
|
||||
dayjs.extend(weekOfYear)
|
||||
|
||||
//import "./style/styleTabelas/tabelasemana.css";
|
||||
|
||||
|
||||
const TabelaAgendamentoSemana = ({ agendamentos, ListarDiasdoMes, setShowDeleteModal ,setSelectedId ,setDictInfo, setShowConfirmModal, coresConsultas ,setListaConsultaID, listaConsultasID}) => {
|
||||
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
//DoctorForm.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useRef, useCallback } from "react";
|
||||
import { Link, useNavigate, useLocation } from "react-router-dom";
|
||||
import { useAuth } from '../utils/AuthProvider';
|
||||
import API_KEY from '../utils/apiKeys';
|
||||
import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import HorariosDisponibilidade from "../doctors/HorariosDisponibilidade";
|
||||
import "./DoctorForm.css";
|
||||
import HorariosDisponibilidade from "./HorariosDisponibilidade";
|
||||
import "../../_assets/css/components/medico/FormCadastroMedico.css";
|
||||
|
||||
const ENDPOINT_AVAILABILITY = "https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctor_availability";
|
||||
|
||||
|
||||
@ -1,12 +1,9 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { useAuth } from "../../_assets/utils/AuthProvider";
|
||||
import { GetAllDoctors } from '../../_assets/utils/Functions-Endpoints/Doctor';
|
||||
import API_KEY from "../../_assets/utils/apiKeys";
|
||||
|
||||
//import "./agendamento/style/formagendamentos.css";
|
||||
|
||||
import "../../_assets/css/components/agendamento/FormAgendamento.css";
|
||||
|
||||
const ENDPOINT_CRIAR_EXCECAO = "https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctor_exceptions";
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import { GetPatientByCPF } from '../_assets/utils/Functions-Endpoints/Patient'
|
||||
import { FormatCPF } from '../_assets/utils/Formatar/Format'
|
||||
import html2pdf from 'html2pdf.js'
|
||||
|
||||
//import '../PagesMedico/styleMedico/FormNovoRelatorio.css'
|
||||
import '../../_assets/css/medico/FormRelatorio.css'
|
||||
|
||||
const FormRelatorio = ({onSave, DictInfo, setDictInfo }) => {
|
||||
const {getAuthorizationHeader} = useAuth()
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect, useCallback, useRef } from "react";
|
||||
import { Clock } from "lucide-react";
|
||||
//import "./HorariosDisponibilidade.css";
|
||||
import "../../_assets/css/pages/medico/HorariosDisponibilidade.css";
|
||||
|
||||
const initialBlockTemplate = {
|
||||
id: null,
|
||||
|
||||
@ -3,6 +3,11 @@
|
||||
"name": "Seus Agendamentos",
|
||||
"icon": "calendar",
|
||||
"url": "/medico/agendamento"
|
||||
},
|
||||
{
|
||||
"name": "Exceções de Disponibilidade",
|
||||
"icon": "calendar-x-fill",
|
||||
"url": "/medico/excecoes-disponibilidade"
|
||||
},
|
||||
|
||||
{
|
||||
@ -16,6 +21,4 @@
|
||||
"icon": "chat-dots-fill",
|
||||
"url": "/medico/chat"
|
||||
}
|
||||
|
||||
|
||||
]
|
||||
@ -1,8 +1,7 @@
|
||||
//gestao.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { FaEdit, FaTrash } from "react-icons/fa";
|
||||
//import "./gestao.css";
|
||||
import "../../_assets/css/pages/admin/DashboardUsuarios.css";
|
||||
|
||||
function UserDashboard() {
|
||||
return (
|
||||
|
||||
@ -14,7 +14,7 @@ import {
|
||||
ResponsiveContainer
|
||||
} from "recharts";
|
||||
|
||||
//import "./painel.css";
|
||||
import "../../_assets/css/pages/admin/PainelAdmin.css";
|
||||
|
||||
export default function PainelAdministrativo() {
|
||||
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//FinanceiroDashboard.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect, useMemo, useCallback } from "react";
|
||||
//import './style/FinanceiroDashboard.css';
|
||||
import '../../_assets/css/pages/financeiro/DashboardFinanceiro.css';
|
||||
|
||||
const CONVENIOS_LIST = [
|
||||
"Particular",
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//LandingPage.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
//import './style/LandingPage.css';
|
||||
import '../../_assets/css/pages/geral/Inicio.css';
|
||||
|
||||
const LandingPage = () => {
|
||||
const navigate = useNavigate();
|
||||
@ -1,9 +1,8 @@
|
||||
//ProfilePage.jsx
|
||||
//Nesta página falta: ajustar caminho CSS
|
||||
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
//import "./style/ProfilePage.css";
|
||||
import '../../_assets/css/pages/geral/PerfilUsuario.css';
|
||||
|
||||
|
||||
const MOCK_API_BASE_URL = "https://mock.apidog.com/m1/1053378-0-default";
|
||||
@ -1,5 +1,5 @@
|
||||
//DoctorAgendamentoManager.jsx
|
||||
//Nesta página falta: mudar nomes, ajustar caminho do CSS
|
||||
//Nesta página falta: mudar nomes dos componentes importados
|
||||
|
||||
import { useState, useMemo, useEffect, useCallback } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@ -16,8 +16,8 @@ import localeData from 'dayjs/plugin/localeData';
|
||||
import AgendamentoCadastroManager from '../secretaria/CadastroAgendamento.jsx';
|
||||
import Spinner from '../../components/Spinner.jsx';
|
||||
|
||||
//import "../pages/style/Agendamento.css";
|
||||
//import '../pages/style/FilaEspera.css';
|
||||
import '../../_assets/css/pages/agendamento/Agendamento.css';
|
||||
import '../../_assets/css/pages/agendamento/FilaEspera.css';
|
||||
|
||||
dayjs.locale('pt-br');
|
||||
dayjs.extend(isBetween);
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
//DoctorRelatorioManager.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
@ -10,8 +9,8 @@ import { UserInfos } from '../../_assets/utils/Functions-Endpoints/General';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import html2pdf from 'html2pdf.js';
|
||||
import TiptapViewer from './TiptapViewer';
|
||||
//import './styleMedico/DoctorRelatorioManager.css';
|
||||
import TiptapViewer from '../../components/medico/TiptapViewer';
|
||||
import '../../_assets/css/pages/medico/CadastroRelatorio.css';
|
||||
|
||||
const DoctorRelatorioManager = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useRef, useEffect } from 'react';
|
||||
//import './styleMedico/chat.css';
|
||||
import '../../_assets/css/pages/medico/Chat.css';
|
||||
|
||||
// --- COMPONENTES (Estes não mudam) ---
|
||||
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
//InicioMedico.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { FaUser, FaUserPlus, FaCalendarAlt, FaCalendarCheck } from 'react-icons/fa';
|
||||
//import './style/Inicio.css';
|
||||
import '../../_assets/css/pages/geral/Dashboard.css';
|
||||
|
||||
function Inicio() {
|
||||
const [pacientes, setPacientes] = useState([]);
|
||||
|
||||
@ -6,7 +6,7 @@ import { useAuth } from '../../_assets/utils/AuthProvider'
|
||||
import { UserInfos } from '../../_assets/utils/Functions-Endpoints/General'
|
||||
import API_KEY from '../../_assets/utils/apiKeys'
|
||||
|
||||
import FormNovaConsulta from '../../components/agendamento/FormNovaConsulta'
|
||||
import FormNovaConsulta from '../../components/agendamento/FormAgendamento'
|
||||
|
||||
|
||||
const DoctorAgendamentoEditPage = ({DictInfo, setDictInfo}) => {
|
||||
|
||||
249
src/pages/medico/ExcecoesDisponibilidadeMedico.jsx
Normal file
249
src/pages/medico/ExcecoesDisponibilidadeMedico.jsx
Normal file
@ -0,0 +1,249 @@
|
||||
import { useState, useEffect, useMemo, useCallback } from 'react';
|
||||
import { useAuth } from '../../_assets/utils/AuthProvider'
|
||||
import FormExcecaoDisponibilidade from '../../components/medico/FormExcecaoDisponibilidade';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import weekday from 'dayjs/plugin/weekday';
|
||||
import 'dayjs/locale/pt-br';
|
||||
dayjs.extend(weekday);
|
||||
dayjs.locale('pt-br');
|
||||
|
||||
const ENDPOINT_BASE = 'https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctor_exceptions';
|
||||
|
||||
const getDateRange = (date, view) => {
|
||||
const base = dayjs(date);
|
||||
let fromDate, toDate, titleRange;
|
||||
|
||||
if (view === 'diario') {
|
||||
fromDate = base.startOf('day').format('YYYY-MM-DD');
|
||||
toDate = base.endOf('day').format('YYYY-MM-DD');
|
||||
titleRange = base.format('DD/MM/YYYY');
|
||||
} else if (view === 'semanal') {
|
||||
fromDate = base.startOf('week').format('YYYY-MM-DD');
|
||||
toDate = base.endOf('week').format('YYYY-MM-DD');
|
||||
titleRange = `${base.startOf('week').format('DD/MM')} - ${base.endOf('week').format('DD/MM')}`;
|
||||
} else { // mensal
|
||||
fromDate = base.startOf('month').format('YYYY-MM-DD');
|
||||
toDate = base.endOf('month').format('YYYY-MM-DD');
|
||||
titleRange = base.format('MMMM YYYY');
|
||||
}
|
||||
return { fromDate, toDate, titleRange };
|
||||
};
|
||||
|
||||
const ExcecoesDisponibilidadeDoctor = () => {
|
||||
const { getAuthorizationHeader, user } = useAuth();
|
||||
const [excecoes, setExcecoes] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [visualizacao, setVisualizacao] = useState('diario');
|
||||
const [dataFiltro, setDataFiltro] = useState(dayjs().format('YYYY-MM-DD'));
|
||||
const [mostrarForm, setMostrarForm] = useState(false);
|
||||
const [erro, setErro] = useState('');
|
||||
const [buscaTexto, setBuscaTexto] = useState('');
|
||||
|
||||
const doctorID = user?.doctor_id || user?.id; // ajuste conforme estrutura real
|
||||
|
||||
const { fromDate, toDate, titleRange } = useMemo(
|
||||
() => getDateRange(dataFiltro, visualizacao),
|
||||
[dataFiltro, visualizacao]
|
||||
);
|
||||
|
||||
const fetchExcecoes = useCallback(async () => {
|
||||
if (!doctorID) return;
|
||||
setLoading(true);
|
||||
setErro('');
|
||||
try {
|
||||
// trata getAuthorizationHeader() que pode retornar objeto ou string
|
||||
const maybeAuth = getAuthorizationHeader();
|
||||
const headers = {};
|
||||
if (typeof maybeAuth === 'string') {
|
||||
headers['Authorization'] = maybeAuth;
|
||||
} else if (maybeAuth && typeof maybeAuth === 'object') {
|
||||
Object.assign(headers, maybeAuth);
|
||||
}
|
||||
headers['Content-Type'] = 'application/json';
|
||||
headers['Prefer'] = 'count=exact';
|
||||
|
||||
const params = new URLSearchParams();
|
||||
params.append('doctor_id', `eq.${doctorID}`);
|
||||
params.append('date', `gte.${fromDate}`);
|
||||
params.append('date', `lte.${toDate}`);
|
||||
params.append('order', 'date.asc');
|
||||
|
||||
const res = await fetch(`${ENDPOINT_BASE}?${params.toString()}`, {
|
||||
headers
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error('Falha ao carregar exceções');
|
||||
}
|
||||
const data = await res.json();
|
||||
setExcecoes(Array.isArray(data) ? data : []);
|
||||
} catch (e) {
|
||||
setErro(e.message);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}, [doctorID, fromDate, toDate, getAuthorizationHeader]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchExcecoes();
|
||||
}, [fetchExcecoes]);
|
||||
|
||||
const handleDelete = async (id) => {
|
||||
if (!window.confirm('Remover esta exceção?')) return;
|
||||
try {
|
||||
const maybeAuth = getAuthorizationHeader();
|
||||
const headers = {};
|
||||
if (typeof maybeAuth === 'string') {
|
||||
headers['Authorization'] = maybeAuth;
|
||||
} else if (maybeAuth && typeof maybeAuth === 'object') {
|
||||
Object.assign(headers, maybeAuth);
|
||||
}
|
||||
headers['Content-Type'] = 'application/json';
|
||||
|
||||
const res = await fetch(`${ENDPOINT_BASE}?id=eq.${id}`, {
|
||||
method: 'DELETE',
|
||||
headers
|
||||
});
|
||||
if (!res.ok) throw new Error('Erro ao deletar');
|
||||
setExcecoes(prev => prev.filter(e => e.id !== id));
|
||||
} catch (e) {
|
||||
alert(e.message);
|
||||
}
|
||||
};
|
||||
|
||||
const excecoesFiltradas = useMemo(() => {
|
||||
if (!buscaTexto.trim()) return excecoes;
|
||||
const txt = buscaTexto.toLowerCase();
|
||||
return excecoes.filter(e =>
|
||||
(e.reason || '').toLowerCase().includes(txt) ||
|
||||
(e.kind || '').toLowerCase().includes(txt)
|
||||
);
|
||||
}, [buscaTexto, excecoes]);
|
||||
|
||||
const mudarData = (delta) => {
|
||||
const base = dayjs(dataFiltro);
|
||||
let nova;
|
||||
if (visualizacao === 'diario') nova = base.add(delta, 'day');
|
||||
else if (visualizacao === 'semanal') nova = base.add(delta, 'week');
|
||||
else nova = base.add(delta, 'month');
|
||||
setDataFiltro(nova.format('YYYY-MM-DD'));
|
||||
};
|
||||
|
||||
if (mostrarForm) {
|
||||
return (
|
||||
<div className="container mt-3">
|
||||
<h4>Nova Exceção</h4>
|
||||
<FormExcecaoDisponibilidade
|
||||
doctorID={doctorID}
|
||||
onCancel={(reload) => {
|
||||
setMostrarForm(false);
|
||||
if (reload) fetchExcecoes();
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="container mt-3">
|
||||
<div className="d-flex justify-content-between align-items-center mb-3">
|
||||
<h4>Exceções de Disponibilidade</h4>
|
||||
<button className="btn btn-primary" onClick={() => setMostrarForm(true)}>
|
||||
Criar Exceção
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="d-flex gap-2 flex-wrap mb-3">
|
||||
<div className="btn-group">
|
||||
<button
|
||||
className={`btn btn-sm ${visualizacao === 'diario' ? 'btn-secondary' : 'btn-outline-secondary'}`}
|
||||
onClick={() => setVisualizacao('diario')}
|
||||
>
|
||||
Diário
|
||||
</button>
|
||||
<button
|
||||
className={`btn btn-sm ${visualizacao === 'semanal' ? 'btn-secondary' : 'btn-outline-secondary'}`}
|
||||
onClick={() => setVisualizacao('semanal')}
|
||||
>
|
||||
Semanal
|
||||
</button>
|
||||
<button
|
||||
className={`btn btn-sm ${visualizacao === 'mensal' ? 'btn-secondary' : 'btn-outline-secondary'}`}
|
||||
onClick={() => setVisualizacao('mensal')}
|
||||
>
|
||||
Mensal
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="d-flex align-items-center gap-2">
|
||||
<button className="btn btn-outline-dark btn-sm" onClick={() => mudarData(-1)}><</button>
|
||||
<strong>{titleRange}</strong>
|
||||
<button className="btn btn-outline-dark btn-sm" onClick={() => mudarData(1)}>></button>
|
||||
</div>
|
||||
|
||||
<input
|
||||
type="date"
|
||||
className="form-control form-control-sm"
|
||||
value={dataFiltro}
|
||||
onChange={e => setDataFiltro(e.target.value)}
|
||||
style={{ maxWidth: 160 }}
|
||||
/>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Buscar (motivo / tipo)"
|
||||
className="form-control form-control-sm"
|
||||
value={buscaTexto}
|
||||
onChange={e => setBuscaTexto(e.target.value)}
|
||||
style={{ flex: 1, minWidth: 180 }}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{erro && <div className="alert alert-danger py-1">{erro}</div>}
|
||||
{loading && <div>Carregando...</div>}
|
||||
|
||||
{!loading && excecoesFiltradas.length === 0 && (
|
||||
<div className="alert alert-info py-1">Nenhuma exceção neste intervalo.</div>
|
||||
)}
|
||||
|
||||
{!loading && excecoesFiltradas.length > 0 && (
|
||||
<div className="table-responsive">
|
||||
<table className="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Início</th>
|
||||
<th>Término</th>
|
||||
<th>Tipo</th>
|
||||
<th>Motivo</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{excecoesFiltradas.map(ex => (
|
||||
<tr key={ex.id}>
|
||||
<td>{ex.date ? dayjs(ex.date).format('DD/MM/YYYY') : '-'}</td>
|
||||
<td>{ex.start_time || ex.inicio || '-'}</td>
|
||||
<td>{ex.end_time || ex.termino || '-'}</td>
|
||||
<td>{ex.kind || ex.tipoAtendimento || '-'}</td>
|
||||
<td>{ex.reason || ex.motivo || '-'}</td>
|
||||
<td>
|
||||
<button
|
||||
className="btn btn-outline-danger btn-sm"
|
||||
onClick={() => handleDelete(ex.id)}
|
||||
>
|
||||
Remover
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ExcecoesDisponibilidadeDoctor;
|
||||
@ -1,5 +1,4 @@
|
||||
//FormNovoRelatorio.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useEffect, useState, useRef } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@ -10,7 +9,8 @@ import { UserInfos } from '../../_assets/utils/Functions-Endpoints/General';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import TiptapEditor from '../../components/medico/TiptapEditor';
|
||||
//import './styleMedico/FormNovoRelatorio.css';
|
||||
import '../../_assets/css/pages/medico/FormRelatorio.css';
|
||||
|
||||
|
||||
const FormNovoRelatorio = () => {
|
||||
const { getAuthorizationHeader } = useAuth();
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
//prontuario.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
//import "./styleMedico/geral.css";
|
||||
import '../../_assets/css/pages/medico/RelatorioEProntuario.css';
|
||||
|
||||
const pacientes = [
|
||||
{
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
//relatorio.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState } from 'react';
|
||||
//import './styleMedico/geral.css';
|
||||
import '../../_assets/css/pages/medico/RelatorioEProntuario.css';
|
||||
|
||||
const mockData = {
|
||||
atendimentos: [
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
//inicioPaciente.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@ -7,7 +6,7 @@ import { FaCalendarAlt, FaCalendarCheck, FaFileAlt, FaUserMd, FaClock } from 're
|
||||
import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
// import './style/inicioPaciente.css';
|
||||
import '../../_assets/css/pages/paciente/DashboardPaciente.css';
|
||||
|
||||
function InicioPaciente() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//ConsultasPaciente.jsx
|
||||
//Nesta página falta: mudar nomes, ajustar caminho do CSS
|
||||
//Nesta página falta: mudar nomes
|
||||
|
||||
import { useState, useMemo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@ -15,8 +15,8 @@ import localeData from 'dayjs/plugin/localeData';
|
||||
import AgendamentoCadastroManager from '../secretaria/CadastroAgendamento.jsx';
|
||||
import Spinner from '../../components/Spinner.jsx';
|
||||
|
||||
// import "../pages/style/Agendamento.css";
|
||||
// import '../pages/style/FilaEspera.css';
|
||||
import '../../_assets/css/pages/agendamento/Agendamento.css';
|
||||
import '../../_assets/css/pages/agendamento/FilaEspera.css';
|
||||
|
||||
dayjs.locale('pt-br');
|
||||
dayjs.extend(isBetween);
|
||||
|
||||
@ -7,7 +7,7 @@ import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
import { UserInfos } from '../../_assets/utils/Functions-Endpoints/General';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import FormNovaConsulta from '../../components/agendamento/FormNovaConsulta';
|
||||
import FormNovaConsulta from '../../components/agendamento/FormAgendamento';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
|
||||
|
||||
@ -11,8 +11,7 @@ import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import html2pdf from 'html2pdf.js';
|
||||
import TiptapViewer from '../../components/medico/TiptapViewer'
|
||||
|
||||
//import '../PagesMedico/styleMedico/DoctorRelatorioManager.css';
|
||||
import '../../_assets/css/pages/medico/CadastroRelatorio.css';
|
||||
|
||||
const LaudoManager = () => {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//DoctorCadastroManager.jsx
|
||||
//Nesta página falta: mudar nomes, ajustar caminho do CSS
|
||||
//Nesta página falta: mudar nomes
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useNavigate, useLocation } from 'react-router-dom';
|
||||
@ -7,7 +7,7 @@ import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import DoctorForm from '../../components/medico/FormCadastroMedico';
|
||||
//import './style/DoctorCadastroManager.css';
|
||||
import '../../_assets/css/pages/secretaria/CadastroMedico.css';
|
||||
|
||||
function DoctorCadastroManager() {
|
||||
const [doctorData, setDoctorData] = useState({});
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//PatientCadastroManager.jsx
|
||||
//Nesta página falta: mudar nomes, ajustar caminho do CSS
|
||||
//Nesta página falta: mudar nomes
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@ -7,7 +7,7 @@ import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import PatientForm from '../../components/paciente/FormCadastroPaciente';
|
||||
//import './style/PatientCadastroManager.css';
|
||||
import '../../_assets/css/pages/secretaria/CadastroPaciente.css';
|
||||
|
||||
function PatientCadastroManager() {
|
||||
const navigate = useNavigate()
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
//inicio.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect } from 'react';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { FaUser, FaUserPlus, FaCalendarAlt, FaCalendarCheck } from 'react-icons/fa';
|
||||
import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
// import './style/Inicio.css';
|
||||
import '../../_assets/css/pages/geral/Dashboard.css';
|
||||
|
||||
|
||||
function Inicio() {
|
||||
|
||||
@ -5,7 +5,7 @@ import { useAuth } from "../../_assets/utils/AuthProvider";
|
||||
import API_KEY from "../../_assets/utils/apiKeys";
|
||||
|
||||
import HorariosDisponibilidade from "../../components/medico/HorariosDisponibilidade";
|
||||
// import "./style/DisponibilidadesDoctorPage.css";
|
||||
import "../../_assets/css/pages/secretaria/DisponibilidadesMedico.css";
|
||||
|
||||
const ENDPOINT = "https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctor_availability";
|
||||
const DOCTORS_ENDPOINT = "https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctors";
|
||||
|
||||
@ -7,7 +7,7 @@ import { useAuth } from '../../_assets/utils/AuthProvider'
|
||||
import { UserInfos } from '../../_assets/utils/Functions-Endpoints/General'
|
||||
import API_KEY from '../../_assets/utils/apiKeys'
|
||||
|
||||
import FormNovaConsulta from '../../components/agendamento/FormNovaConsulta'
|
||||
import FormNovaConsulta from '../../components/agendamento/FormAgendamento'
|
||||
|
||||
const AgendamentoEditPage = ({setDictInfo, DictInfo}) => {
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
//ExcecoesDisponibilidade.jsx
|
||||
//Nesta página falta: ajustar caminho do CSS
|
||||
|
||||
import { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { useAuth } from '../../_assets/utils/AuthProvider';
|
||||
import { GetAllDoctors } from '../../_assets/utils/Functions-Endpoints/Doctor';
|
||||
import API_KEY from '../../_assets/utils/apiKeys';
|
||||
|
||||
import FormExcecaoDisponibilidade from '../../components/medico/FormExcecaoDisponibilidade';
|
||||
//import "../components/agendamento/style/formagendamentos.css";
|
||||
//import "./style/Agendamento.css";
|
||||
//import './style/FilaEspera.css';
|
||||
import '../../_assets/css/components/agendamento/FormAgendamento.css';
|
||||
import '../../_assets/css/pages/agendamento/Agendamento.css';
|
||||
import '../../_assets/css/pages/agendamento/FilaEspera.css';
|
||||
|
||||
import 'dayjs/locale/pt-br';
|
||||
import weekday from 'dayjs/plugin/weekday';
|
||||
@ -17,6 +17,7 @@ dayjs.extend(weekday);
|
||||
dayjs.locale('pt-br');
|
||||
|
||||
const ENDPOINT_BASE = "https://yuanqfswhberkoevtmfr.supabase.co/rest/v1/doctor_exceptions";
|
||||
const API_ROOT = "https://yuanqfswhberkoevtmfr.supabase.co/rest/v1";
|
||||
|
||||
const getDateRange = (date, view) => {
|
||||
const startDayjs = dayjs(date);
|
||||
@ -103,7 +104,52 @@ const ExcecoesDisponibilidade = () => {
|
||||
const result = await response.json();
|
||||
|
||||
if (response.ok && Array.isArray(result)) {
|
||||
setExcecoes(result);
|
||||
// usar função existente para obter lista de médicos
|
||||
const doctorIds = Array.from(new Set(result.map(r => r.doctor_id).filter(Boolean)));
|
||||
let doctors = [];
|
||||
try {
|
||||
// GetAllDoctors já retorna id e full_name (ver Doctor.js)
|
||||
doctors = await GetAllDoctors(authHeader);
|
||||
} catch (err) {
|
||||
console.warn('Falha ao obter lista de médicos via GetAllDoctors:', err);
|
||||
doctors = [];
|
||||
}
|
||||
const doctorMap = {};
|
||||
if (Array.isArray(doctors)) {
|
||||
doctors.forEach(d => {
|
||||
if (d && d.id != null) doctorMap[d.id] = d.full_name || d.name || d.display_name || d.id;
|
||||
});
|
||||
}
|
||||
|
||||
// buscar nomes de quem criou (profiles) — usa REST direto (não há função pronta)
|
||||
const createdByIds = Array.from(new Set(result.map(r => r.created_by).filter(Boolean)));
|
||||
const creatorMap = {};
|
||||
if (createdByIds.length > 0) {
|
||||
const inList = createdByIds.map(id => (isNaN(Number(id)) ? `"${String(id).replace(/"/g,'\\"')}"` : id)).join(',');
|
||||
const profilesUrl = `${API_ROOT}/profiles?select=*&id=in.(${inList})`;
|
||||
try {
|
||||
const resProfiles = await fetch(profilesUrl, { method: 'GET', headers: myHeaders, redirect: 'follow' });
|
||||
if (resProfiles.ok) {
|
||||
const profiles = await resProfiles.json();
|
||||
profiles.forEach(p => {
|
||||
creatorMap[p.id] = p.full_name || p.name || p.username || p.email || p.id;
|
||||
});
|
||||
} else {
|
||||
console.warn('Não foi possível buscar profiles:', resProfiles.status);
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('Erro ao buscar profiles:', err);
|
||||
}
|
||||
}
|
||||
|
||||
// anexa nomes às exceções (fallback para ids caso não encontre nome)
|
||||
const enriched = result.map(r => ({
|
||||
...r,
|
||||
doctor_name: doctorMap[r.doctor_id] || r.doctor_name || r.doctor_id,
|
||||
created_by_name: creatorMap[r.created_by] || r.created_by_name || r.created_by
|
||||
}));
|
||||
|
||||
setExcecoes(enriched);
|
||||
} else {
|
||||
setExcecoes([]);
|
||||
console.error("Erro ao listar exceções (Status:", response.status, "):", result);
|
||||
@ -236,7 +282,7 @@ const ExcecoesDisponibilidade = () => {
|
||||
<table className="fila-tabela">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Médico (ID)</th>
|
||||
<th>Médico (Nome)</th>
|
||||
<th>Data</th>
|
||||
<th>Início</th>
|
||||
<th>Término</th>
|
||||
@ -248,12 +294,12 @@ const ExcecoesDisponibilidade = () => {
|
||||
<tbody>
|
||||
{excecoes.map((exc) => (
|
||||
<tr key={exc.id}>
|
||||
<td><p>{exc.doctor_id}</p></td>
|
||||
<td><p>{exc.doctor_name || exc.doctor_id}</p></td>
|
||||
<td>{dayjs(exc.date).format('DD/MM/YYYY')}</td>
|
||||
<td>{exc.start_time ? dayjs(exc.start_time, 'HH:mm:ss').format('HH:mm') : '—'}</td>
|
||||
<td>{exc.end_time ? dayjs(exc.end_time, 'HH:mm:ss').format('HH:mm') : '—'}</td>
|
||||
<td><p>{exc.reason}</p></td>
|
||||
<td>{exc.created_by || '—'}</td>
|
||||
<td>{exc.created_by_name || exc.created_by || '—'}</td>
|
||||
<td>
|
||||
<div className="d-flex gap-2">
|
||||
<button
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//Agendamento.jsx
|
||||
//Nesta página falta: mudar nomes, ajustar caminho CSS
|
||||
//Nesta página falta: mudar nomes
|
||||
|
||||
import { useState, useMemo, useEffect } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@ -13,12 +13,12 @@ import AgendamentoCadastroManager from '../secretaria/CadastroAgendamento.jsx';
|
||||
import TabelaAgendamentoDia from '../../components/agendamento/TabelaAgendamentoDia.jsx';
|
||||
import TabelaAgendamentoSemana from '../../components/agendamento/TabelaAgendamentoSemana.jsx';
|
||||
import TabelaAgendamentoMes from '../../components/agendamento/TabelaAgendamentoMes.jsx';
|
||||
import FormNovaConsulta from '../../components/agendamento/FormNovaConsulta.jsx';
|
||||
import FormNovaConsulta from '../../components/agendamento/FormAgendamento.jsx';
|
||||
import CalendarComponent from '../../components/agendamento/Calendario.jsx';
|
||||
import Spinner from '../../components/Spinner.jsx';
|
||||
|
||||
// import "./style/Agendamento.css";
|
||||
// import './style/FilaEspera.css';
|
||||
import '../../_assets/css/pages/agendamento/Agendamento.css';
|
||||
import '../../_assets/css/pages/agendamento/FilaEspera.css';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
import 'dayjs/locale/pt-br';
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
//DoctorTable.jsx
|
||||
//Nesta página falta: ajustar caminho CSS
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useAuth } from "../../_assets/utils/AuthProvider";
|
||||
import API_KEY from "../../_assets/utils/apiKeys";
|
||||
|
||||
//import "./style/TableDoctor.css";
|
||||
import "../../_assets/css/pages/secretaria/TabelaMedicos.css";
|
||||
|
||||
function TableDoctor({setDictInfo}) {
|
||||
const { getAuthorizationHeader, isAuthenticated } = useAuth();
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
//TablePaciente.jsx
|
||||
//Nesta página falta: ajustar caminho CSS
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useAuth } from "../../_assets/utils/AuthProvider";
|
||||
import manager from "../../_assets/utils/fetchErros/ManagerFunction";
|
||||
import API_KEY from "../../_assets/utils/apiKeys";
|
||||
//import "./style/TablePaciente.css";
|
||||
|
||||
import "../../_assets/css/pages/secretaria/TabelaPacientes.css";
|
||||
|
||||
function TablePaciente({ setDictInfo }) {
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ import Details from "../../pages/secretaria/DetalhesPaciente";
|
||||
import EditPage from "../../pages/secretaria/EditarPaciente";
|
||||
import DoctorDetails from "../../pages/secretaria/DetalhesMedico";
|
||||
import DoctorEditPage from "../../pages/secretaria/EditarMedico";
|
||||
import UserDashboard from '../../pages/admin/UserDashboard';
|
||||
import UserDashboard from '../../pages/admin/DashboardUsuarios';
|
||||
import PainelAdministrativo from '../../pages/admin/PainelAdmin';
|
||||
|
||||
//Data
|
||||
|
||||
@ -15,6 +15,7 @@ import Chat from "../../pages/medico/Chat";
|
||||
import FormNovoRelatorio from "../../pages/medico/FormRelatorio";
|
||||
import EditPageRelatorio from "../../pages/medico/EditarRelatorio";
|
||||
import DoctorAgendamentoEditPage from "../../pages/medico/EditarAgendamento";
|
||||
import ExcecoesDisponibilidadeDoctor from "../../pages/medico/ExcecoesDisponibilidadeMedico";
|
||||
|
||||
//Data
|
||||
import DoctorItems from "../../data/sidebar-items-medico.json";
|
||||
@ -37,6 +38,7 @@ function PerfilMedico() {
|
||||
<Route path="/relatorios" element={<DoctorRelatorioManager />} />
|
||||
<Route path="/agendamento" element={<DoctorAgendamentoManager setDictInfo={setDictInfo}/>} />
|
||||
<Route path="/agendamento/edit" element={<DoctorAgendamentoEditPage DictInfo={dictInfo} setDictInfo={setDictInfo}/>} />
|
||||
<Route path="/excecoes-disponibilidade" element={<ExcecoesDisponibilidadeDoctor />} />
|
||||
<Route path="/chat" element={<Chat />} />
|
||||
</Routes>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user