+
handleToggleCollapse('dadosPessoais')} style={{ fontSize: '1.8rem' }}>
+ Dados Pessoais
+
+ {collapsedSections.dadosPessoais ? '▲' : '▼'}
+
+
+
+
+ {/* AVATAR E INPUT DE FOTO */}
+
+
+ {avatarUrl ? (
+

+ ) : (
+
+ ☤
+
+ )}
+
+
+
+
+ {formData.foto && {formData.foto.name}}
+
+
+ {/* CADASTRO */}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/* CAMPOS MOVIDOS */}
+
+
+
+
+
+
+
+
+
+ {formData.anexos ? formData.anexos.name : 'Nenhum arquivo escolhido'}
+
+
+
+
-
-
-
+
+
+ {/* ENDEREÇO */}
+
+
handleToggleCollapse('endereco')} style={{ fontSize: '1.8rem' }}>
+ Endereço
+
+ {collapsedSections.endereco ? '▲' : '▼'}
+
+
+
-
-
-
+
+
+ {/* CONTATO */}
+
+
handleToggleCollapse('contato')} style={{ fontSize: '1.8rem' }}>
+ Contato
+
+ {collapsedSections.contato ? '▲' : '▼'}
+
+
+
-
-
-
-
- {/*
-
-
-
-
-
-
-
-
- */}
-
-
-
-
-
-
-
+
-
- {/*
-
-
-
-
-
-
-
-
- */}
-
-
- {/* ------------------ ENDEREÇO ------------------ */}
-
Endereço
-
-
- {/* ------------------ CONTATO ------------------ */}
-
Contato
-
-
- {/* ------------------ INFORMAÇÕES ADICIONAIS ------------------ */}
-
Informações Adicionais
-
-
-
-
-
{/* Botões */}
-
-
+ //
+ //
MediConnect
+
+ // {/* ------------------ DADOS PESSOAIS ------------------ */}
+ //
Dados Pessoais
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+ //
+
+ // {/* ------------------ ENDEREÇO ------------------ */}
+ //
Endereço
+ //
+
+ // {/* ------------------ CONTATO ------------------ */}
+ //
Contato
+ //
+
+ // {/* ------------------ INFORMAÇÕES ADICIONAIS ------------------ */}
+ //
Informações Adicionais
+ //
+ //
+ //
+ //
+
+ // {/* Botões */}
+ //
+ //
+ // Salvar Paciente
+ //
+ //
+ // Cancelar
+ //
+ //
+ //
);
}
diff --git a/src/components/patients/PatientForm.jsx b/src/components/patients/PatientForm.jsx
index 9844b80..5000e60 100644
--- a/src/components/patients/PatientForm.jsx
+++ b/src/components/patients/PatientForm.jsx
@@ -165,11 +165,12 @@ function PatientForm({ onSave, onCancel, PatientDict }) {
const handleSubmit = () => {
if (!formData.nome || !formData.cpf || !formData.genero || !formData.dataNascimento){
- alert('Por favor, preencha Nome ,CPF, Gênero e data de nascimento.');
+ alert('Por favor, preencha: Nome ,CPF, Gênero e Data de Nascimento.');
return;
}
- onSave({
+ onSave(
+ {
...formData,
endereco: {
cep: formData.cep,
@@ -200,12 +201,14 @@ function PatientForm({ onSave, onCancel, PatientDict }) {
validadeCarteira: formData.validadeCarteira,
validadeIndeterminada: formData.validadeIndeterminada,
pacienteVip: formData.pacienteVip,
- },
- });
+ }
+
+ }
+ );
};
return (
-
+
MediConnect
{/* DADOS PESSOAIS */}
@@ -366,7 +369,7 @@ function PatientForm({ onSave, onCancel, PatientDict }) {
@@ -439,7 +442,7 @@ function PatientForm({ onSave, onCancel, PatientDict }) {
{/* INFORMAÇÕES DE CONVÊNIO */}
handleToggleCollapse('infoConvenio')} style={{ fontSize: '1.8rem' }}>
- Informações de convênio
+ Informações de Convênio
{collapsedSections.infoConvenio ? '▲' : '▼'}
@@ -554,7 +557,7 @@ function PatientForm({ onSave, onCancel, PatientDict }) {
-
+
diff --git a/src/data/sidebar-items.json b/src/data/sidebar-items.json
index 4da9e92..a582d5b 100644
--- a/src/data/sidebar-items.json
+++ b/src/data/sidebar-items.json
@@ -13,29 +13,29 @@
{
"name": "Cadastro de Pacientes",
"url": "form-layout",
- "icon": "file-earmark-medical-fill"
+ "icon": "heart-pulse-fill"
},
{
"name": "Cadastro do Médico",
"url": "doctor-form-layout",
- "icon": "file-earmark-medical-fill"
+ "icon": "capsule"
},
{
"name": "Lista de Pacientes",
- "icon": "table",
+ "icon": "clipboard-heart-fill",
"url": "table"
},
{
"name": "Lista de Médico",
- "icon": "table",
+ "icon": "hospital-fill",
"url": "doctor-table"
},
{
"name": "Agendar consulta",
- "icon": "table",
+ "icon": "calendar-plus-fill",
"url": "agendamento"
}
diff --git a/src/horizontal-menu-items.json b/src/horizontal-menu-items.json
deleted file mode 100644
index de3aad9..0000000
--- a/src/horizontal-menu-items.json
+++ /dev/null
@@ -1,409 +0,0 @@
-[
- {
- "name": "Início",
- "url": "Inicio",
- "icon": "grid-fill"
- },
- {
- "name": "Components",
- "key": "component",
- "icon": "stack",
- "submenu": [
- {
- "name": "Alert",
- "url": "component-alert.html"
- },
- {
- "name": "Badge",
- "url": "component-badge.html"
- },
- {
- "name": "Breadcrumb",
- "url": "component-breadcrumb.html"
- },
- {
- "name": "Button",
- "url": "component-button.html"
- },
- {
- "name": "Card",
- "url": "component-card.html"
- },
- {
- "name": "Carousel",
- "url": "component-carousel.html"
- },
- {
- "name": "Collapse",
- "url": "component-collapse.html"
- },
- {
- "name": "Dropdown",
- "url": "component-dropdown.html"
- },
- {
- "name": "List Group",
- "url": "component-list-group.html"
- },
- {
- "name": "Modal",
- "url": "component-modal.html"
- },
- {
- "name": "Navs",
- "url": "component-navs.html"
- },
- {
- "name": "Pagination",
- "url": "component-pagination.html"
- },
- {
- "name": "Progress",
- "url": "component-progress.html"
- },
- {
- "name": "Spinner",
- "url": "component-spinner.html"
- },
- {
- "name": "Tooltip",
- "url": "component-tooltip.html"
- },
- {
- "name": "Extra Components",
- "key": "extra-component",
- "icon": "collection-fill",
- "submenu": [
- {
- "name": "Avatar",
- "url": "extra-component-avatar.html"
- },
- {
- "name": "Comment",
- "url": "extra-component-comment.html"
- },
- {
- "name": "Sweet Alert",
- "url": "extra-component-sweetalert.html"
- },
- {
- "name": "Toastify",
- "url": "extra-component-toastify.html"
- },
- {
- "name": "Rating",
- "url": "extra-component-rating.html"
- },
- {
- "name": "Divider",
- "url": "extra-component-divider.html"
- },
- {
- "name": "GLightbox",
- "url": "extra-component-glightbox.html"
- }
- ]
- }
- ]
- },
- {
- "name": "Layouts",
- "key": "layout",
- "icon": "grid-1x2-fill",
- "submenu": [
- {
- "name": "Default Layout",
- "url": "layout-default.html"
- },
- {
- "name": "1 Column",
- "url": "layout-vertical-1-column.html"
- },
- {
- "name": "Vertical Navbar",
- "url": "layout-vertical-navbar.html"
- },
- {
- "name": "RTL Layout",
- "url": "layout-rtl.html"
- },
- {
- "name": "Horizontal Menu",
- "url": "layout-horizontal.html"
- }
- ]
- },
- {
- "name": "Forms",
- "key": "form",
- "icon": "file-earmark-medical-fill",
- "submenu": [
- {
- "name": "Form Elements",
- "key": "form-element",
- "icon": "hexagon-fill",
- "submenu": [
- {
- "name": "Input",
- "url": "form-element-input.html"
- },
- {
- "name": "Input Group",
- "url": "form-element-input-group.html"
- },
- {
- "name": "Select",
- "url": "form-element-select.html"
- },
- {
- "name": "Radio",
- "url": "form-element-radio.html"
- },
- {
- "name": "Checkbox",
- "url": "form-element-checkbox.html"
- },
- {
- "name": "Textarea",
- "url": "form-element-textarea.html"
- }
- ]
- },
- {
- "name": "Form Layout",
- "url": "form-layout",
- "icon": "file-earmark-medical-fill"
- },
- {
- "name": "Form Validation",
- "icon": "journal-check",
- "key": "form-validation",
- "submenu": [
- {
- "name": "Parsley",
- "url": "form-validation-parsley.html"
- }
- ]
- },
- {
- "name": "Form Editor",
- "icon": "pen-fill",
- "key": "form-editor",
- "submenu": [
- {
- "name": "Quill",
- "url": "form-editor-quill.html"
- },
- {
- "name": "CKEditor",
- "url": "form-editor-ckeditor.html"
- },
- {
- "name": "Summernote",
- "url": "form-editor-summernote.html"
- },
- {
- "name": "TinyMCE",
- "url": "form-editor-tinymce.html"
- }
- ]
- }
- ]
- },
- {
- "name": "Table",
- "icon": "table",
- "submenu": [
- {
- "name": "Table",
- "url": "table",
- "icon": "file-earmark-spreadsheet-fill"
- },
- {
- "name": "Datatable",
- "url": "table-datatable.html",
- "icon": "file-earmark-spreadsheet-fill"
- },
- {
- "name": "Datatable (jQuery)",
- "url": "table-datatable-jquery.html",
- "icon": "file-earmark-spreadsheet-fill"
- }
- ]
- },
- {
- "name": "Extras",
- "key": "extras",
- "icon": "plus-square-fill",
- "submenu": [
- {
- "name": "Widgets",
- "key": "ui-widgets",
- "icon": "pentagon-fill",
- "submenu": [
- {
- "name": "Chatbox",
- "url": "ui-widgets-chatbox.html"
- },
- {
- "name": "Pricing",
- "url": "ui-widgets-pricing.html"
- },
- {
- "name": "To-do List",
- "url": "ui-widgets-todolist.html"
- }
- ]
- },
- {
- "name": "Icons",
- "key": "ui-icons",
- "icon": "egg-fill",
- "submenu": [
- {
- "name": "Bootstrap Icons ",
- "url": "ui-icons-bootstrap-icons.html"
- },
- {
- "name": "Fontawesome",
- "url": "ui-icons-fontawesome.html"
- },
- {
- "name": "Dripicons",
- "url": "ui-icons-dripicons.html"
- }
- ]
- },
- {
- "name": "Charts",
- "key": "ui-chart",
- "icon": "bar-chart-fill",
- "submenu": [
- {
- "name": "ChartJS",
- "url": "ui-chart-chartjs.html"
- },
- {
- "name": "Apexcharts",
- "url": "ui-chart-apexcharts.html"
- }
- ]
- }
- ]
- },
- {
- "name": "Pages",
- "key": "pages",
- "icon": "file-earmark-fill",
- "submenu": [
- {
- "name": "Authentication",
- "key": "auth",
- "icon": "person-badge-fill",
- "submenu": [
- {
- "name": "Login",
- "url": "auth-login.html"
- },
- {
- "name": "Register",
- "url": "auth-register.html"
- },
- {
- "name": "Forgot Password",
- "url": "auth-forgot-password.html"
- }
- ]
- },
- {
- "name": "Errors",
- "key": "error",
- "icon": "x-octagon-fill",
- "submenu": [
- {
- "name": "403",
- "url": "error-403.html"
- },
- {
- "name": "404",
- "url": "error-404.html"
- },
- {
- "name": "500",
- "url": "error-500.html"
- }
- ]
- },
- {
- "name": "File Uploader",
- "key": "ui-file",
- "icon": "cloud-arrow-up-fill",
- "url": "ui-file-uploader.html"
- },
- {
- "name": "Maps",
- "key": "ui-map",
- "icon": "map-fill",
- "submenu": [
- {
- "name": "Google Map",
- "url": "ui-map-google-map.html"
- },
- {
- "name": "JS Vector Map",
- "url": "ui-map-jsvectormap.html"
- }
- ]
- },
- {
- "name": "Email Application",
- "key": "application-email",
- "icon": "envelope-fill",
- "url": "application-email.html"
- },
- {
- "name": "Chat Application",
- "key": "application-chat",
- "icon": "chat-dots-fill",
- "url": "application-chat.html"
- },
- {
- "name": "Photo Gallery",
- "key": "application-gallery",
- "icon": "image-fill",
- "url": "application-gallery.html"
- },
- {
- "name": "Checkout Page",
- "key": "application-checkout",
- "icon": "basket-fill",
- "url": "application-checkout.html"
- }
- ]
- },
- {
- "name": "Support",
- "key": "error",
- "icon": "life-preserver",
- "submenu": [
- {
- "name": "Documentation",
- "key": "error",
- "icon": "life-preserver",
- "url": "https://zuramai.github.io/mazer/docs"
- },
- {
- "name": "Contribute",
- "key": "error",
- "url": "https://github.com/zuramai/mazer/blob/main/CONTRIBUTING.md",
- "icon": "puzzle"
- },
- {
- "name": "Donate",
- "key": "error",
- "url": "https://github.com/zuramai/mazer#donation",
- "icon": "cash"
- }
- ]
- }
-]
\ No newline at end of file
diff --git a/src/pages/Details.jsx b/src/pages/Details.jsx
index a3f4393..66f5968 100644
--- a/src/pages/Details.jsx
+++ b/src/pages/Details.jsx
@@ -17,7 +17,7 @@ const Details = ({ patientID, setCurrentPage }) => {
return (
<>
-
+
MediConnect
@@ -25,10 +25,10 @@ const Details = ({ patientID, setCurrentPage }) => {
Voltar
-
+
-
+
{paciente.nome || "Nome Completo"}
{paciente.cpf || "CPF"}
@@ -38,258 +38,238 @@ const Details = ({ patientID, setCurrentPage }) => {
-
+
{/* ------------------ DADOS PESSOAIS ------------------ */}
-
+
Dados Pessoais
-
+
{paciente.nome || "-"}
-
+
{paciente.nomeSocial || "-"}
-
+
{paciente.dataNascimento || "-"}
-
+
{paciente.sexo || "-"}
-
-
{paciente.documento || "-"}
-
-
-
-
{paciente.numeroDocumento || "-"}
-
-
-
+
{paciente.cpf || "-"}
-
+
+
{paciente.rg || "-"}
+
+
+
+
{paciente.documento || "-"}
+
+
+
+
{paciente.numeroDocumento || "-"}
+
+
+
+
{paciente.etniaRaca || "-"}
+
+
+
+
{paciente.etniaRaca || "-"}
+
+
+
+
{paciente.etniaRaca || "-"}
+
+
+
{paciente.profissao || "-"}
-
+
{paciente.nomeMae || "-"}
-
+
{paciente.profissaoMae || "-"}
-
+
{paciente.nomePai || "-"}
-
+
{paciente.profissaoPai || "-"}
-
+
{paciente.nomeResponsavel || "-"}
-
+
{paciente.cpfResponsavel || "-"}
-
+
+
{paciente.estadoCivil || "-"}
+
+
+
{paciente.nomeConjuge || "-"}
-
+
{paciente.outroId || "-"}
+
+
+
+
+
+
+
+
+
{paciente.observacoes || "-"}
+
+
+
+
{paciente.anexos || "-"}
+
+
+
+
+ {/* ------------------ INFORMAÇÕES MÉDICAS ------------------ */}
+
+
Informações Médicas
+
+
+
+
+
{paciente.tipoSanguineo || "-"}
+
+
+
+
{paciente.peso || "-"}
+
+
+
+
{paciente.altura || "-"}
+
+
+
+
{paciente.imc || "-"}
+
+
+
+
{paciente.alergias || "-"}
+
+
+
+
+ {/* ------------------ INFORMAÇÕES DE CONVÊNIO ------------------ */}
+
+
Informações de Convênio
+
+
+
+
+
{paciente.convenio || "-"}
+
+
+
+
{paciente.plano || "-"}
+
+
+
+
{paciente.numeroMatricula || "-"}
+
+
+
+
{paciente.validadeCarteira || "-"}
+
+
+
+
+
+
+
+
{/* ------------------ ENDEREÇO ------------------ */}
-
+
Endereço
-
+
{paciente.cep || "-"}
-
+
{paciente.rua || "-"}
-
+
{paciente.bairro || "-"}
-
+
{paciente.cidade || "-"}
-
+
{paciente.estado || "-"}
-
+
{paciente.numero || "-"}
-
+
{paciente.complemento || "-"}
{/* ------------------ CONTATO ------------------ */}
-
+
Contato
-
+
{paciente.email || "-"}
-
+
{paciente.telefone1 || "-"}
-
+
{paciente.telefone2 || "-"}
-
+
{paciente.telefone3 || "-"}
-
- {/* ------------------ INFORMAÇÕES ADICIONAIS ------------------ */}
-
-
Informações Adicionais
-
-
-
-
{paciente.observacoes || "-"}
-
-
-
- {/* Dados pessoais
-
-
Dados Pessoais
-
-
Nome Completo: {paciente.nomeCompleto}
-
CPF: {paciente.cpf}
-
Idade: {paciente.idade}
-
Data de Nascimento: {paciente.dataNascimento}
-
Sexo: {paciente.sexo}
-
Estado Civil: {paciente.estadoCivil}
-
Profissão: {paciente.profissao}
-
Nacionalidade: {paciente.nacionalidade}
-
Naturalidade: {paciente.naturalidade}
-
Etnia: {paciente.etnia}
-
-
- */}
- {/* Contato */}
- {/*
-
Informações de Contato
-
-
E-mail: {paciente.email}
-
Celular: {paciente.celular}
-
Telefone 1: {paciente.telefone1 || "-"}
-
Telefone 2: {paciente.telefone2 || "-"}
-
-
*/}
-
>
);
};
-// const styles = {
-// container: {
-// width: "80%",
-// maxWidth: "800px",
-// margin: "30px auto",
-// background: "#fff",
-// borderRadius: "10px",
-// padding: "20px",
-// boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
-// fontFamily: "Arial, sans-serif",
-// position: "relative"
-// },
-// backBtn: {
-// background: "#ddd",
-// border: "none",
-// borderRadius: "6px",
-// padding: "8px 14px",
-// cursor: "pointer",
-// marginBottom: "15px"
-// },
-// header: {
-// textAlign: "center",
-// marginBottom: "20px",
-// position: "relative"
-// },
-// avatar: {
-// width: "80px",
-// height: "80px",
-// borderRadius: "50%",
-// background: "#ddd",
-// display: "block",
-// margin: "0 auto"
-// },
-// nome: {
-// margin: "10px 0 5px"
-// },
-// vip: {
-// color: "#f7b500",
-// fontWeight: "bold",
-// marginLeft: "5px"
-// },
-// cpf: {
-// margin: "5px 0",
-// color: "#555"
-// },
-// editBtn: {
-// background: "#0d6efd",
-// color: "white",
-// padding: "8px 14px",
-// border: "none",
-// borderRadius: "6px",
-// cursor: "pointer",
-// position: "absolute",
-// right: "20px",
-// top: "20px"
-// },
-// section: {
-// marginBottom: "20px",
-// border: "1px solid #e0e0e0",
-// borderRadius: "8px",
-// padding: "15px"
-// },
-// sectionTitle: {
-// marginTop: 0,
-// borderBottom: "1px solid #ddd",
-// paddingBottom: "8px",
-// fontSize: "18px"
-// },
-// grid: {
-// display: "grid",
-// gridTemplateColumns: "1fr 1fr",
-// gap: "10px 20px",
-// marginTop: "10px"
-// },
-// item: {
-// fontSize: "14px"
-// }
-// };
-
export default Details;
\ No newline at end of file
diff --git a/src/pages/DoctorEditPage.jsx b/src/pages/DoctorEditPage.jsx
index 1a445e3..f6467bf 100644
--- a/src/pages/DoctorEditPage.jsx
+++ b/src/pages/DoctorEditPage.jsx
@@ -1,52 +1,51 @@
-// import React from 'react'
+import React from 'react'
-// import DoctorForm from '../components/doctors/DoctorForm'
+import DoctorForm from '../components/doctors/DoctorForm'
-// import {useEffect, useState} from 'react'
+import {useEffect, useState} from 'react'
-// const EditPage = ( {id}) => {
+const DoctorEditPage = ( {id}) => {
-// const [PatientToPUT, setPatientPUT] = useState({})
+ const [PatientToPUT, setPatientPUT] = useState({})
-// var requestOptions = {
-// method: 'GET',
-// redirect: 'follow'
-// };
+ var requestOptions = {
+ method: 'GET',
+ redirect: 'follow'
+};
-// useEffect(() => {
+useEffect(() => {
-// fetch(`https://mock.apidog.com/m1/1053378-0-default/pacientes/${id}`, requestOptions)
-// .then(response => response.json())
-// .then(result => result.data)
-// .then(data => console.log(data))
-// .catch(error => console.log('error', error));
+fetch(`https://mock.apidog.com/m1/1053378-0-default/pacientes/${id}`, requestOptions)
+ .then(response => response.json())
+ .then(result => result.data)
+ .then(data => console.log(data))
+ .catch(error => console.log('error', error));
-// }, [])
-// const HandlePutPatient = () => {
+}, [])
+ const HandlePutPatient = () => {
-// console.log('médico atualizado')
+ console.log('médico atualizado')
-// }
+ }
-// return (
+ return (
-//
+
-//
Voltar para lista sem salvar
-//
+ />
-//
-// )
-// }
+
+ )
+}
-// export default EditPage
\ No newline at end of file
+export default DoctorEditPage
\ No newline at end of file
diff --git a/src/pages/DoctorTable.jsx b/src/pages/DoctorTable.jsx
index 9f032b5..f13fd16 100644
--- a/src/pages/DoctorTable.jsx
+++ b/src/pages/DoctorTable.jsx
@@ -25,11 +25,11 @@ function TableDoctor({ setCurrentPage, setPatientID }) {
let value = e.target.value;
if (value === "verdetalhes") {
- setCurrentPage("details-page-paciente");
+ setCurrentPage("details-page-doctor");
}
if (value === "editar") {
- setCurrentPage("edit-page-paciente");
+ setCurrentPage("edit-page-doctor");
setPatientID(id);
}
diff --git a/src/pages/EditPage.jsx b/src/pages/EditPage.jsx
index a64930b..a803feb 100644
--- a/src/pages/EditPage.jsx
+++ b/src/pages/EditPage.jsx
@@ -33,8 +33,6 @@ fetch(`https://mock.apidog.com/m1/1053378-0-default/pacientes/${id}`, requestOpt
return (
-
- Voltar para lista sem salvar
diff --git a/src/pages/FormLayout.jsx b/src/pages/FormLayout.jsx
index 14e05a7..3e05495 100644
--- a/src/pages/FormLayout.jsx
+++ b/src/pages/FormLayout.jsx
@@ -23,7 +23,6 @@ function FormLayout( ) {
header: myHeaders,
body:raw,
redirect:'follow'
-
}