diff --git a/src/App.js b/src/App.js index 622bb212..efd431db 100644 --- a/src/App.js +++ b/src/App.js @@ -1,20 +1,20 @@ import React, { useState, useEffect } from 'react'; import Sidebar from './components/Sidebar'; import Header from './components/Header'; -import Table from "./pages/Table"; // <-- ADIÇÃO AQUI -import DataTable from "./pages/DataTable"; -import Files from "./pages/files"; -import EmailApp from "./pages/EmailApp"; -//import ChatApp from "./pages/ChatApp"; -import GalleryApp from "./pages/GalleryApp"; +import Table from "./pages/Table"; + + import FormLayout from './pages/FormLayout'; import EditPage from './pages/EditPage'; -import PatientForm from "./components/patients/PatientForm"; + import Details from './pages/Details'; -//import DoctorEditPage from './components/doctors/DoctorEditPage'; + import DoctorTable from './pages/DoctorTable'; import DoctorFormLayout from './pages/DoctorFormLayout'; import Agendamento from './pages/Agendamento' + + + function App() { const [isSidebarActive, setIsSidebarActive] = useState(true); const [currentPage, setCurrentPage] = useState('table '); @@ -41,21 +41,6 @@ const renderPageContent = () => { else if(currentPage === 'doctor-table'){ return } - else if (currentPage === 'data-table') { - return ; - } - else if (currentPage === 'files') { - return ; - } - else if (currentPage === 'email-app') { - return ; - } - //else if (currentPage === 'chat-app') { - // return ; - //} - else if (currentPage === 'gallery-app') { - return ; - } else if(currentPage === 'edit-page-paciente'){ return } @@ -64,9 +49,9 @@ const renderPageContent = () => { return
; } else if(currentPage === 'agendamento-page'){ - return - + return } + // Dashboard por padrão diff --git a/src/components/AgendarConsulta/CardConsulta.jsx b/src/components/AgendarConsulta/CardConsulta.jsx new file mode 100644 index 00000000..e69de29b diff --git a/src/components/AgendarConsulta/FormNovaConsulta.jsx b/src/components/AgendarConsulta/FormNovaConsulta.jsx new file mode 100644 index 00000000..4469ba0b --- /dev/null +++ b/src/components/AgendarConsulta/FormNovaConsulta.jsx @@ -0,0 +1,80 @@ +import React from 'react' + +const FormNovaConsulta = ( {onCancel}) => { + return ( +
+ +
+ +

Informações do paciente

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

Informações do atendimento

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ ) +} + +export default FormNovaConsulta \ No newline at end of file diff --git a/src/components/AgendarConsulta/TabelaAgendamentoDia.jsx b/src/components/AgendarConsulta/TabelaAgendamentoDia.jsx new file mode 100644 index 00000000..5916a4db --- /dev/null +++ b/src/components/AgendarConsulta/TabelaAgendamentoDia.jsx @@ -0,0 +1,49 @@ +import React from 'react' + +const TabelaAgendamentoDia = ({agendamentos, handleClickAgendamento}) => { + + + + return ( +
+ + + + + + + + + + + {agendamentos.map((agendamento) => ( + + + + + + + + ))} + + + + +
HorárioPaciente
{agendamento.horario} + +
handleClickAgendamento(agendamento)} > +

{agendamento.medico}

+

{agendamento.paciente}

+

{agendamento.status}

+

www

+ + +
+ +
+
+ + ) +} + +export default TabelaAgendamentoDia \ No newline at end of file diff --git a/src/components/AgendarConsulta/TabelaAgendamentoMes.jsx b/src/components/AgendarConsulta/TabelaAgendamentoMes.jsx new file mode 100644 index 00000000..ac3df2e6 --- /dev/null +++ b/src/components/AgendarConsulta/TabelaAgendamentoMes.jsx @@ -0,0 +1,43 @@ +import React from 'react' + +import dayjs from "dayjs" + +const TabelaAgendamentoMes = () => { + + const dataHoje = dayjs() + const AnoAtual = dataHoje.year() + + const mes = dataHoje.getMonth() + + console.log(AnoAtual) + + //Domingo = 0 + //Segunda = 1 + //terça = 2 + //quarta = 3 + //quinta = 4 + //sexta = 5 + //Sabado = 6 + + + + return ( +
+ + + + + + + + + + + +
SegTerQuaQuiSex
+ +
+ ) +} + +export default TabelaAgendamentoMes \ No newline at end of file diff --git a/src/components/AgendarConsulta/TabelaAgendamentoSemana.jsx b/src/components/AgendarConsulta/TabelaAgendamentoSemana.jsx new file mode 100644 index 00000000..1151cd3c --- /dev/null +++ b/src/components/AgendarConsulta/TabelaAgendamentoSemana.jsx @@ -0,0 +1,9 @@ +import React from 'react' + +const TabelaAgendamentoSemana = () => { + return ( +
TabelaAgendamentoSemana
+ ) +} + +export default TabelaAgendamentoSemana \ No newline at end of file diff --git a/src/components/TabelaAgendamentoDia.jsx b/src/components/TabelaAgendamentoDia.jsx deleted file mode 100644 index 6e618568..00000000 --- a/src/components/TabelaAgendamentoDia.jsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react' - -const TabelaAgendamentoDia = (agendamentos) => { - return ( -
- - - - {agendamentos.map((agendamento) => ( - - - - - - - ))} - -
{agendamento.horario} -
{agendamento.paciente}
-
- -
- ) -} - -export default TabelaAgendamentoDia \ No newline at end of file diff --git a/src/pages/Agendamento.jsx b/src/pages/Agendamento.jsx index 5dd5cdeb..3b967845 100644 --- a/src/pages/Agendamento.jsx +++ b/src/pages/Agendamento.jsx @@ -1,34 +1,59 @@ import React from 'react' -import DoctorTable from './DoctorTable'; -import TabelaAgendamentoDia from '../components/TabelaAgendamentoDia'; -import { useState } from 'react'; -const Agendamento = () => { +import TabelaAgendamentoDia from '../components/AgendarConsulta/TabelaAgendamentoDia'; +import TabelaAgendamentoSemana from '../components/AgendarConsulta/TabelaAgendamentoSemana'; +import TabelaAgendamentoMes from '../components/AgendarConsulta/TabelaAgendamentoMes'; +import FormNovaConsulta from '../components/AgendarConsulta/FormNovaConsulta'; +import { useState, useEffect } from 'react'; +import dayjs from 'dayjs' - let agendamentos = [ - { horario: '07:00', medico: 'Rogerio Cena', paciente: 'Caio Miguel', status: 'marcado' }, - { horario: '07:10', medico: 'Rogerio Cena', paciente: 'João Pedro', status: 'marcado' }, - { horario: '07:20', medico: 'Rogerio Cena', paciente: 'Ana Paula', status: 'cancelado' }, - { horario: '07:30', medico: 'Rogerio Cena', paciente: 'Bruno Lima', status: 'atendido' }, - { horario: '07:40', medico: 'Rogerio Cena', paciente: 'Mariana Souza', status: 'marcado' }, - { horario: '07:50', medico: 'Rogerio Cena', paciente: 'Felipe Duarte', status: 'remarcado' }, - { horario: '08:00', medico: 'Rogerio Cena', paciente: 'Carolina Alves', status: 'marcado' }, - { horario: '08:10', medico: 'Rogerio Cena', paciente: 'Ricardo Gomes', status: 'em andamento' }, - { horario: '08:20', medico: 'Rogerio Cena', paciente: 'Tatiane Ramos', status: 'marcado' }, - { horario: '08:30', medico: 'Rogerio Cena', paciente: 'Daniel Oliveira', status: 'atendido' } - ] +const Agendamento = ( {setCurrentPage }) => { const [tabela, setTabela] = useState('diario') + const [PageNovaConsulta, setPageConsulta] = useState(true) + + const handleClickAgendamento = (agendamento) => { + + if(agendamento.status !== 'vazio'){alert('tem')} + + else{ + setPageConsulta(false) + + } + + } + + const handleClickCancel = () => { + setPageConsulta(true) + } + + let agendamentos = [ + { horario: '07:00', medico: 'Rogerio Cena', paciente: 'Caio Miguel', status: 'marcado', motivo:'Consulta de Rotina' }, + { horario: '07:10', satus:'vazio' }, + { horario: '07:20', medico: 'Rogerio Cena', paciente: 'Ana Paula', status: 'cancelado', motivo:'Consulta de Rotina' }, + { horario: '07:30', medico: 'Rogerio Cena', paciente: 'Bruno Lima', status: 'atendido', motivo:'Consulta de Rotina' }, + { horario: '07:40', status:'vazio' }, + { horario: '07:50', medico: 'Rogerio Cena', paciente: 'Felipe Duarte', status: 'remarcado', motivo:'Consulta de Rotina' }, + { horario: '08:00', medico: 'Rogerio Cena', paciente: 'Carolina Alves', status: 'marcado', motivo:'2 Exames' }, + { horario: '08:10', medico: 'Rogerio Cena', paciente: 'Ricardo Gomes', status: 'em andamento', motivo:'retorno' }, + { horario: '08:20', medico: 'Rogerio Cena', paciente: 'Tatiane Ramos', status: 'marcado', motivo: '' }, + { horario: '08:30', medico: 'Rogerio Cena', paciente: 'Daniel Oliveira', status: 'atendido', motivo: '' } + ] - return ( + return( +
+

Agendar nova consulta

+ + {PageNovaConsulta? ( +
-

Unidades

+
- @@ -37,11 +62,11 @@ const Agendamento = () => {
- +
- @@ -49,36 +74,52 @@ const Agendamento = () => {
- - - + {tabela === "diario" && ( + + )} + {tabela === 'semanal' && + + } + {tabela === 'mensal' && ( + + )}
- - - - - - -
+ ) : ( + + + + + )} +
+ + + + + ) } - export default Agendamento \ No newline at end of file