diff --git a/src/components/AgendarConsulta/FormNovaConsulta.jsx b/src/components/AgendarConsulta/FormNovaConsulta.jsx index 120aa56..2dbd572 100644 --- a/src/components/AgendarConsulta/FormNovaConsulta.jsx +++ b/src/components/AgendarConsulta/FormNovaConsulta.jsx @@ -3,6 +3,40 @@ import InputMask from "react-input-mask"; import "./style/formagendamentos.css"; const FormNovaConsulta = ({ onCancel }) => { + + const BuscarCPFnoBancodeDados = (cpf) => { + + var myHeaders = new Headers(); + myHeaders.append("Authorization", "Bearer "); + myHeaders.append("Content-Type", "application/json"); + + var raw = JSON.stringify({ + "cpf": cpf + }); + + var requestOptions = { + method: 'POST', + headers: myHeaders, + body: raw, + redirect: 'follow' + }; + +fetch("https://mock.apidog.com/m1/1053378-0-default/pacientes/validar-cpf", requestOptions) + .then(response => response.text()) + .then(result => console.log(result)) + .catch(error => console.log('error', error)); + } + + const BuscarPacienteExistentePeloCPF = (value) => { + + if(isNaN(value[13]) === false){ + BuscarCPFnoBancodeDados(value) + } + //BuscarCPFnoBancodeDados(value) + + + } + const handleSubmit = (e) => { e.preventDefault(); alert("Agendamento salvo!"); @@ -23,8 +57,8 @@ const FormNovaConsulta = ({ onCancel }) => {
- - {(inputProps) => } + BuscarPacienteExistentePeloCPF(e.target.value)}> + {(inputProps) => }
@@ -98,7 +132,7 @@ const FormNovaConsulta = ({ onCancel }) => {
@@ -133,7 +167,15 @@ const FormNovaConsulta = ({ onCancel }) => {
- + +
+ accessible + elderly + pregnant_woman + child_care + accessibility_new +
+
@@ -145,6 +187,7 @@ const FormNovaConsulta = ({ onCancel }) => {
+ ); }; diff --git a/src/components/AgendarConsulta/TabelaAgendamentoMes.jsx b/src/components/AgendarConsulta/TabelaAgendamentoMes.jsx index 924332f..55d8cf9 100644 --- a/src/components/AgendarConsulta/TabelaAgendamentoMes.jsx +++ b/src/components/AgendarConsulta/TabelaAgendamentoMes.jsx @@ -47,7 +47,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => { ))} {dias.segunda.length > 3 ? -

+ {dias.segunda.length - 3}

+

+ {dias.segunda.length - 3}

: null} @@ -65,7 +65,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => { ))} {dias.terca.length > 3 ? -

+ {dias.terca.length - 3}

+

+ {dias.terca.length - 3}

: null} @@ -83,7 +83,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => { ))} {dias.quarta.length > 3 ? -

+ {dias.quarta.length - 3}

+

+ {dias.quarta.length - 3}

: null} @@ -101,7 +101,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => { ))} {dias.quinta.length > 3 ? -

+ {dias.quinta.length - 3}

+

+ {dias.quinta.length - 3}

: null} @@ -119,7 +119,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => { ))} {dias.sexta.length > 3 ? -

+ {dias.sexta.length - 3}

+

+ {dias.sexta.length - 3}

: null} diff --git a/src/components/AgendarConsulta/style/formagendamentos.css b/src/components/AgendarConsulta/style/formagendamentos.css index 3684f90..7bb5276 100644 --- a/src/components/AgendarConsulta/style/formagendamentos.css +++ b/src/components/AgendarConsulta/style/formagendamentos.css @@ -1,3 +1,26 @@ +@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined'); + +.icons-container { + display: flex; + gap: 10px; +} + +.icon { + font-family: 'Material Symbols Outlined'; + font-size: 36px; + padding: 12px; + border: 1px solid #d1d5db; + border-radius: 12px; + display: flex; + align-items: center; + justify-content: center; + width: 56px; + height: 56px; + cursor: default; +} + + + .form-container { /*max-width: 800px;*/ margin: 20px auto; @@ -124,13 +147,11 @@ display: flex; flex-direction: row; gap: 4rem; - } textarea{ width: 30px; resize: both; - } .campos-informacoes-paciente, diff --git a/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css b/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css index bc1a179..a242ba0 100644 --- a/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css +++ b/src/components/AgendarConsulta/style/styleTabelas/tabeladia.css @@ -51,8 +51,9 @@ font-weight: 600; padding: 8px; } -/* Ajuste para a classe .diadia, se for usada */ -.diadia { +/* Ajuste para a classe calendario, se for usada */ +/* +.calendario { margin-top: 20px; border-collapse: collapse; width: 100%; @@ -61,7 +62,7 @@ font-weight: 600; 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/AgendarConsulta/style/styleTabelas/tabelames.css b/src/components/AgendarConsulta/style/styleTabelas/tabelames.css index 6df085d..fbce17b 100644 --- a/src/components/AgendarConsulta/style/styleTabelas/tabelames.css +++ b/src/components/AgendarConsulta/style/styleTabelas/tabelames.css @@ -147,4 +147,10 @@ padding: 4px 8px; margin-bottom: 5px; border-radius: 4px; +} + +.cards-que-faltam{ + color: #005a9e; + font-weight: bold; + font-size: larger; } \ No newline at end of file diff --git a/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css b/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css index e890b6f..70cdeef 100644 --- a/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css +++ b/src/components/AgendarConsulta/style/styleTabelas/tabelasemana.css @@ -56,17 +56,7 @@ padding: 12px; } -/* Ajuste para a classe .diadia, se for usada */ -.diadia { - 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); -} +/* Ajuste para a classe .calendario, se for usada */ .tabelasemanal tr:nth-child(even) { background-color: #e7e7e7a6 !important; diff --git a/src/components/ProfileCard.js b/src/components/ProfileCard.js index 64b88b2..7a5b181 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/pages/Agendamento.jsx b/src/pages/Agendamento.jsx index 0f68825..b008dc0 100644 --- a/src/pages/Agendamento.jsx +++ b/src/pages/Agendamento.jsx @@ -112,13 +112,20 @@ const Agendamento = () => { +
+ + +
+ +
+ {FiladeEspera ===false ? -
+
-
+
-
- -
-
-
+
Realizado @@ -157,6 +160,10 @@ const Agendamento = () => { Cancelado
+ +
+ + @@ -179,7 +186,15 @@ const Agendamento = () => { )}
+
: + +
+
+
+ + } +
) : ( diff --git a/src/pages/Table.jsx b/src/pages/Table.jsx index 1ad96dd..a5eb050 100644 --- a/src/pages/Table.jsx +++ b/src/pages/Table.jsx @@ -29,8 +29,6 @@ function TablePaciente({ setCurrentPage, setPatientID }) { } - - const DeleteAnexo = async (patientID) => { @@ -66,12 +64,8 @@ function TablePaciente({ setCurrentPage, setPatientID }) { // Função para excluir paciente const deletePatient = async (id) => { - DeleteAnexo(id) - - - const requestOptionsDelete = { method: "DELETE", redirect: "follow" }; if (!window.confirm("Tem certeza que deseja excluir este paciente?")) return; diff --git a/src/pages/style/Agendamento.css b/src/pages/style/Agendamento.css index 06fb555..3bb469a 100644 --- a/src/pages/style/Agendamento.css +++ b/src/pages/style/Agendamento.css @@ -93,6 +93,7 @@ margin-top: 30px; margin-bottom: 10px; gap: 15px; + justify-content: flex-end; } .legenda-item-realizado{ @@ -143,9 +144,53 @@ border-radius: 10px; } -.botões-container{ +.btns-e-legenda-container{ display: flex; justify-content: space-between; + flex-direction: row; + margin-top: 10px; +} + + +.calendario { + + 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); +} + + + +.calendario-ou-filaespera{ + margin-top: 0; +} + +.container-btns-agenda-fila_esepera{ + margin-top: 30px; + display: flex; + flex-direction: row; + gap: 20px; + margin-left:20px ; + +} + +.btn-fila-espera, .btn-agenda{ + background-color: transparent; + border: 0px ; + border-bottom: 3px solid rgb(253, 253, 253); + padding: 8px; + border-radius: 10px 10px 0px 0px; + font-weight: bold; + +} + +.opc-filaespera-ativo, .opc-agenda-ativo{ + color: white; + background-color: #5980fd; } \ No newline at end of file