2025-09-19 11:24:07 -03:00

118 lines
3.9 KiB
JavaScript

import React from "react";
import InputMask from "react-input-mask";
import "./style/styleagendamentos.css";
const FormNovaConsulta = ({ onCancel }) => {
const handleSubmit = (e) => {
e.preventDefault();
alert("Agendamento salvo!");
};
return (
<div className="form-container">
<form className="form-agendamento" onSubmit={handleSubmit}>
<h2 className="section-title">Informações do paciente</h2>
<div id="informacoes-paciente-primeiralinha">
<label>Nome *</label>
<input type="text" name="nome" placeholder="Insira o nome do paciente" required />
<label>CPF do paciente</label>
<InputMask mask="999.999.999-99" placeholder="000.000.000-00">
{(inputProps) => <input {...inputProps} type="text" name="cpf" />}
</InputMask>
<label>RG</label>
<input type="text" name="rg" placeholder="Insira o nº do RG" maxLength={9} />
</div>
<label>Data de nascimento *</label>
<input type="date" name="data_nascimento" required />
<label>Telefone</label>
<InputMask mask="(99) 99999-9999" placeholder="(99) 99999-9999">
{(inputProps) => <input {...inputProps} type="tel" name="telefone" />}
</InputMask>
<label>E-mail</label>
<input type="email" name="email" placeholder="Email" />
<label>Convênio</label>
<select name="convenio">
<option value="particular">Particular</option>
<option value="publico">Público</option>
</select>
<label>Matrícula</label>
<input type="text" name="matricula" placeholder="000000000" />
<label>Validade</label>
<InputMask mask="99/99/9999" placeholder="00/00/0000">
{(inputProps) => <input {...inputProps} type="text" name="validade" />}
</InputMask>
<h3 className="section-subtitle">Informações adicionais</h3>
<button type="button" className="btn-secondary">Documentos e anexos</button>
<h2 className="section-title">Informações do atendimento</h2>
<label>Nome do profissional *</label>
<input type="text" name="profissional" required />
<label>Tipo de atendimento *</label>
<input type="text" name="tipoAtendimento" required />
<label>Unidade *</label>
<select name="unidade">
<option value="centro">Núcleo de Especialidades Integradas</option>
<option value="leste">Unidade Leste</option>
</select>
<label>Data *</label>
<input type="date" name="dataAtendimento" required />
<label>Início *</label>
<input type="time" name="inicio" required />
<label>Término *</label>
<input type="time" name="termino" required />
<label>Profissional solicitante</label>
<select name="solicitante">
<option value="">Selecione o solicitante</option>
<option value="secretaria">Secretária</option>
<option value="medico">Médico</option>
</select>
<label>Observações</label>
<textarea name="observacoes"></textarea>
<label>
<input type="checkbox" name="reembolso" /> Pagamento via Reembolso
</label>
<label>
<input type="checkbox" name="imprimirEtiqueta" /> Imprimir na Etiqueta / Pulseira
</label>
<h3 className="section-subtitle">Acessibilidade</h3>
<div className="btn-group">
<button type="button"></button>
<button type="button"></button>
<button type="button"></button>
<button type="button"></button>
</div>
<div className="form-actions">
<button type="submit" className="btn-primary">Salvar agendamento</button>
<button type="button" className="btn-cancel" onClick={onCancel}>Cancelar</button>
</div>
</form>
</div>
);
};
export default FormNovaConsulta;