Começo da fila de espera e icones de formulario
This commit is contained in:
parent
8866ebedbf
commit
00b58733e1
@ -3,6 +3,40 @@ import InputMask from "react-input-mask";
|
|||||||
import "./style/formagendamentos.css";
|
import "./style/formagendamentos.css";
|
||||||
|
|
||||||
const FormNovaConsulta = ({ onCancel }) => {
|
const FormNovaConsulta = ({ onCancel }) => {
|
||||||
|
|
||||||
|
const BuscarCPFnoBancodeDados = (cpf) => {
|
||||||
|
|
||||||
|
var myHeaders = new Headers();
|
||||||
|
myHeaders.append("Authorization", "Bearer <token>");
|
||||||
|
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) => {
|
const handleSubmit = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
alert("Agendamento salvo!");
|
alert("Agendamento salvo!");
|
||||||
@ -23,8 +57,8 @@ const FormNovaConsulta = ({ onCancel }) => {
|
|||||||
|
|
||||||
<div className="campo-de-input">
|
<div className="campo-de-input">
|
||||||
<label>CPF do paciente</label>
|
<label>CPF do paciente</label>
|
||||||
<InputMask mask="999.999.999-99" placeholder="000.000.000-00">
|
<InputMask mask="999.999.999-99" placeholder="000.000.000-00" onChange={(e) => BuscarPacienteExistentePeloCPF(e.target.value)}>
|
||||||
{(inputProps) => <input {...inputProps} type="text" name="cpf" />}
|
{(inputProps) => <input {...inputProps} type="text" name="cpf" />}
|
||||||
</InputMask>
|
</InputMask>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -98,7 +132,7 @@ const FormNovaConsulta = ({ onCancel }) => {
|
|||||||
<div className='campo-de-input'>
|
<div className='campo-de-input'>
|
||||||
<label>Unidade *</label>
|
<label>Unidade *</label>
|
||||||
<select name="unidade">
|
<select name="unidade">
|
||||||
<option value="" disabled invisible>Selecione sua unidade</option>
|
<option value="" disabled invisible>Selecione a unidade</option>
|
||||||
<option value="centro">Núcleo de Especialidades Integradas</option>
|
<option value="centro">Núcleo de Especialidades Integradas</option>
|
||||||
<option value="leste">Unidade Leste</option>
|
<option value="leste">Unidade Leste</option>
|
||||||
</select>
|
</select>
|
||||||
@ -134,6 +168,14 @@ const FormNovaConsulta = ({ onCancel }) => {
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div className="icons-container">
|
||||||
|
<span className="material-symbols-outlined icon">accessible</span>
|
||||||
|
<span className="material-symbols-outlined icon">elderly</span>
|
||||||
|
<span className="material-symbols-outlined icon">pregnant_woman</span>
|
||||||
|
<span className="material-symbols-outlined icon">child_care</span>
|
||||||
|
<span className="material-symbols-outlined icon">accessibility_new</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="campo-de-input">
|
<div className="campo-de-input">
|
||||||
<label>Observações</label>
|
<label>Observações</label>
|
||||||
<textarea name="observacoes" rows="4" cols="1"></textarea>
|
<textarea name="observacoes" rows="4" cols="1"></textarea>
|
||||||
@ -145,6 +187,7 @@ const FormNovaConsulta = ({ onCancel }) => {
|
|||||||
<button type="button" className="btn-cancel" onClick={onCancel}>Cancelar</button>
|
<button type="button" className="btn-cancel" onClick={onCancel}>Cancelar</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -47,7 +47,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{dias.segunda.length > 3 ?
|
{dias.segunda.length > 3 ?
|
||||||
<div><p>+ {dias.segunda.length - 3}</p></div>
|
<div><p className='cards-que-faltam'>+ {dias.segunda.length - 3}</p></div>
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -65,7 +65,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{dias.terca.length > 3 ?
|
{dias.terca.length > 3 ?
|
||||||
<div><p>+ {dias.terca.length - 3}</p></div>
|
<div><p className='cards-que-faltam'>+ {dias.terca.length - 3}</p></div>
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -83,7 +83,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{dias.quarta.length > 3 ?
|
{dias.quarta.length > 3 ?
|
||||||
<div><p>+ {dias.quarta.length - 3}</p></div>
|
<div><p className='cards-que-faltam'>+ {dias.quarta.length - 3}</p></div>
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -101,7 +101,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{dias.quinta.length > 3 ?
|
{dias.quinta.length > 3 ?
|
||||||
<div><p>+ {dias.quinta.length - 3}</p></div>
|
<div><p className='cards-que-faltam'>+ {dias.quinta.length - 3}</p></div>
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -119,7 +119,7 @@ const TabelaAgendamentoMes = ({ListarDiasdoMes}) => {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{dias.sexta.length > 3 ?
|
{dias.sexta.length > 3 ?
|
||||||
<div><p>+ {dias.sexta.length - 3}</p></div>
|
<div><p className='cards-que-faltam'>+ {dias.sexta.length - 3}</p></div>
|
||||||
: null}
|
: null}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -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 {
|
.form-container {
|
||||||
/*max-width: 800px;*/
|
/*max-width: 800px;*/
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
@ -124,13 +147,11 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
gap: 4rem;
|
gap: 4rem;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea{
|
textarea{
|
||||||
width: 30px;
|
width: 30px;
|
||||||
resize: both;
|
resize: both;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.campos-informacoes-paciente,
|
.campos-informacoes-paciente,
|
||||||
|
|||||||
@ -51,8 +51,9 @@ font-weight: 600;
|
|||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ajuste para a classe .diadia, se for usada */
|
/* Ajuste para a classe calendario, se for usada */
|
||||||
.diadia {
|
/*
|
||||||
|
.calendario {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -61,7 +62,7 @@ font-weight: 600;
|
|||||||
box-shadow: 0 4px 12px rgb(255, 255, 255);
|
box-shadow: 0 4px 12px rgb(255, 255, 255);
|
||||||
border: 10px solid #ffffffc5;
|
border: 10px solid #ffffffc5;
|
||||||
background-color: rgb(253, 253, 253);
|
background-color: rgb(253, 253, 253);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
.mostrar-horario td, .mostrar-horario th {
|
.mostrar-horario td, .mostrar-horario th {
|
||||||
|
|||||||
@ -148,3 +148,9 @@
|
|||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cards-que-faltam{
|
||||||
|
color: #005a9e;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: larger;
|
||||||
|
}
|
||||||
@ -56,17 +56,7 @@
|
|||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ajuste para a classe .diadia, se for usada */
|
/* Ajuste para a classe .calendario, 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabelasemanal tr:nth-child(even) {
|
.tabelasemanal tr:nth-child(even) {
|
||||||
background-color: #e7e7e7a6 !important;
|
background-color: #e7e7e7a6 !important;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
/*import React from 'react';
|
||||||
|
|
||||||
function ProfileCard() {
|
function ProfileCard() {
|
||||||
return (
|
return (
|
||||||
@ -18,4 +18,4 @@ function ProfileCard() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ProfileCard;
|
export default ProfileCard;*/
|
||||||
@ -112,13 +112,20 @@ const Agendamento = () => {
|
|||||||
<input type="text" placeholder='Selecionar profissional' />
|
<input type="text" placeholder='Selecionar profissional' />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className='container-btns-agenda-fila_esepera'>
|
||||||
|
<button className={`btn-agenda ${ FiladeEspera === false ? "opc-agenda-ativo": "" }`} onClick={ () => setFiladeEspera(false)}>Agenda</button>
|
||||||
|
<button className={`btn-fila-espera ${ FiladeEspera === true ? "opc-filaespera-ativo": "" }`} onClick={ () => setFiladeEspera(true)}>Fila de espera</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className='diadia'>
|
<section className='calendario-ou-filaespera'>
|
||||||
|
{FiladeEspera ===false ?
|
||||||
|
|
||||||
|
<div className='calendario'>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<section className='botões-container'>
|
<section className='btns-e-legenda-container'>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button className={`btn-selecionar-tabeladia ${tabela === "diario" ? "ativo" : ""}`}
|
<button className={`btn-selecionar-tabeladia ${tabela === "diario" ? "ativo" : ""}`}
|
||||||
@ -136,12 +143,8 @@ const Agendamento = () => {
|
|||||||
Mês
|
Mês
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className='botão-fila-espera'>
|
|
||||||
<button onClick={ () => setFiladeEspera(true)}>Abrir fila de espera</button>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div className='legenda-tabela'>
|
<div className='legenda-tabela'>
|
||||||
<div className='legenda-item-realizado'>
|
<div className='legenda-item-realizado'>
|
||||||
|
|
||||||
<span>Realizado</span>
|
<span>Realizado</span>
|
||||||
@ -158,6 +161,10 @@ const Agendamento = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{tabela === "diario" && (
|
{tabela === "diario" && (
|
||||||
@ -179,7 +186,15 @@ const Agendamento = () => {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>:
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<div className='container-fila-espera'></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
}
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
||||||
|
|||||||
@ -29,8 +29,6 @@ function TablePaciente({ setCurrentPage, setPatientID }) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const DeleteAnexo = async (patientID) => {
|
const DeleteAnexo = async (patientID) => {
|
||||||
|
|
||||||
|
|
||||||
@ -66,12 +64,8 @@ function TablePaciente({ setCurrentPage, setPatientID }) {
|
|||||||
|
|
||||||
// Função para excluir paciente
|
// Função para excluir paciente
|
||||||
const deletePatient = async (id) => {
|
const deletePatient = async (id) => {
|
||||||
|
|
||||||
DeleteAnexo(id)
|
DeleteAnexo(id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const requestOptionsDelete = { method: "DELETE", redirect: "follow" };
|
const requestOptionsDelete = { method: "DELETE", redirect: "follow" };
|
||||||
|
|
||||||
if (!window.confirm("Tem certeza que deseja excluir este paciente?")) return;
|
if (!window.confirm("Tem certeza que deseja excluir este paciente?")) return;
|
||||||
|
|||||||
@ -93,6 +93,7 @@
|
|||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
gap: 15px;
|
gap: 15px;
|
||||||
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.legenda-item-realizado{
|
.legenda-item-realizado{
|
||||||
@ -143,9 +144,53 @@
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.botões-container{
|
.btns-e-legenda-container{
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
justify-content: space-between;
|
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;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user