diff --git a/package-lock.json b/package-lock.json index b71f88c3..ac8723b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21614,8 +21614,7 @@ "node_modules/dayjs": { "version": "1.11.18", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.18.tgz", - "integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==", - "license": "MIT" + "integrity": "sha512-zFBQ7WFRvVRhKcWoUh+ZA1g2HVgUbsZm9sbddh8EC5iv93sui8DVVz1Npvz+r6meo9VKfa8NyLWBsQK1VvIKPA==" }, "node_modules/debug": { "version": "4.4.1", @@ -30562,7 +30561,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.5.0.tgz", "integrity": "sha512-MEFcXdkP3dLo8uumGI5xN3lDFNsRtrjbOEKDLD7yv76v4wpnEq2Lt2qeHaQOr34I/wPN3s3+N08WkQ+CW37Xiw==", - "license": "MIT", "peerDependencies": { "react": "*" } diff --git a/src/App.js b/src/App.js index 6b640e8c..72499035 100644 --- a/src/App.js +++ b/src/App.js @@ -6,8 +6,10 @@ import Table from "./pages/Table"; import Inicio from './pages/Inicio'; import FormLayout from './pages/FormLayout'; import EditPage from './pages/EditPage'; +import DoctorEditPage from './pages/DoctorEditPage'; import Details from './pages/Details'; +import DoctorDetails from './pages/DoctorDetails'; import DoctorTable from './pages/DoctorTable'; import DoctorFormLayout from './pages/DoctorFormLayout'; @@ -40,8 +42,12 @@ function App() { return ; case 'details-page-paciente': return
; + case 'details-page-doctor': + return ; case 'edit-page-paciente': return ; + case 'edit-page-doctor': + return ; default: return ; } diff --git a/src/assets/static/js/initTheme.js b/src/assets/static/js/initTheme.js index 6783bd98..05413db1 100644 --- a/src/assets/static/js/initTheme.js +++ b/src/assets/static/js/initTheme.js @@ -1,5 +1,5 @@ const body = document.body; const theme = localStorage.getItem('theme') -if (theme) +if (theme) document.documentElement.setAttribute('data-bs-theme', theme) diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js index 4177d270..23bb80b9 100644 --- a/src/components/Sidebar.js +++ b/src/components/Sidebar.js @@ -48,12 +48,12 @@ function Sidebar(props) {
- {/* Logo volta pro Início */} + {/* Logo volta pro Dashboard */} { e.preventDefault(); - props.setCurrentPage('Inicio'); + props.setCurrentPage('dashboard'); }} > MediConnect diff --git a/src/components/doctors/DoctorForm.jsx b/src/components/doctors/DoctorForm.jsx index 94dbf689..72559427 100644 --- a/src/components/doctors/DoctorForm.jsx +++ b/src/components/doctors/DoctorForm.jsx @@ -31,63 +31,98 @@ function DoctorForm({ onSave, onCancel, PatientDict }) { const [formData, setFormData] = useState({ - nome: PatientDict.nome, - nomeSocial: PatientDict.nome_social, - dataNascimento: PatientDict.data_nascimento, - genero: PatientDict.sexo, - //documento: '', - //numeroDocumento: '', - cpf: PatientDict.cpf, - profissao: PatientDict.profissao , - //nomeConjuge: '', - //outroId: '', - cep: '', - cidade: PatientDict.cidade, - estado: PatientDict.estado, - bairro: PatientDict.bairro, - rua: PatientDict.logradouro, - numero: '', - complemento: '', - email: PatientDict.email, - telefone1: PatientDict.celular, - telefone2: '', - telefone3: '', - observacoes: '' - }); - - const handleChange = (e) => { - const { name, value } = e.target; - setFormData({ - ...formData, - [name]: value + foto: null, + nome: PatientDict.nome, + nomeSocial: PatientDict.nome_social, + dataNascimento: PatientDict.data_nascimento, + genero: PatientDict.sexo, + cpf: PatientDict.cpf, + profissao: PatientDict.profissao , + nomeConjuge: '', + outroId: '', + cep: '', + cidade: PatientDict.cidade, + estado: PatientDict.estado, + bairro: PatientDict.bairro, + rua: PatientDict.logradouro, + numero: '', + complemento: '', + email: PatientDict.email, + telefone1: PatientDict.celular, + telefone2: '', + telefone3: '', + observacoes: '', + rg: '', + documentoTipo: '', + numeroDocumento: '', + etniaRaca: '', + naturalidade: '', + nacionalidade: '', + estadoCivil: '', + + // INFORMAÇÕES MÉDICAS + tipoSanguineo: '', + peso: '', + altura: '', + imc: '', + alergias: '', + + // ANEXO + anexos: null, }); + // Estado para armazenar a URL da foto do avatar + const [avatarUrl, setAvatarUrl] = useState(null); - if(name.includes('cpf')){ + // Estado para controlar quais seções estão colapsadas + const [collapsedSections, setCollapsedSections] = useState({ + dadosPessoais: true, // Alterado para true para a seção ficar aberta por padrão + infoMedicas: false, + infoConvenio: false, + endereco: false, + contato: false, + }); - let cpfFormatado = FormatCPF(e.target.value) + // Função para alternar o estado de colapso de uma seção + const handleToggleCollapse = (section) => { + setCollapsedSections(prevState => ({ + ...prevState, + [section]: !prevState[section] + })); + }; - setFormData({...formData, - [name]: cpfFormatado,} - )} + const handleChange = (e) => { + const { name, value, type, checked, files } = e.target; + + if (type === 'checkbox') { + setFormData({ ...formData, [name]: checked }); + } else if (type === 'file') { + setFormData({ ...formData, [name]: files[0] }); - else if(name.includes('telefone')){ - let telefoneFormatado = FormatTelefones(value) + // Lógica para pré-visualizar a imagem no avatar + if (name === 'foto' && files[0]) { + const reader = new FileReader(); + reader.onloadend = () => { + setAvatarUrl(reader.result); + }; + reader.readAsDataURL(files[0]); + } else if (name === 'foto' && !files[0]) { + setAvatarUrl(null); // Limpa o avatar se nenhum arquivo for selecionado + } - console.log(telefoneFormatado) - - - - setFormData({...formData, - [name]: telefoneFormatado - }) + } else { + setFormData({ ...formData, [name]: value }); } - + if (name.includes('cpf')) { + let cpfFormatado = FormatCPF(value); + setFormData(prev => ({ ...prev, [name]: cpfFormatado })); + } else if (name.includes('telefone')) { + let telefoneFormatado = FormatTelefones(value); + setFormData(prev => ({ ...prev, [name]: telefoneFormatado })); + } + }; - }; - - // Função para buscar endereço pelo CEP const handleCepBlur = async () => { const cep = formData.cep.replace(/\D/g, ''); @@ -113,196 +148,421 @@ function DoctorForm({ onSave, onCancel, PatientDict }) { }; const handleSubmit = () => { - if (!formData.nome || !formData.cpf || !formData.genero || !formData.dataNascimento || !formData.email){ - alert('Por favor, preencha: Nome ,CPF, Gênero, Data de nascimento e Email.'); + if (!formData.nome || !formData.cpf || !formData.genero || !formData.dataNascimento || !formData.email) { + alert('Por favor, preencha: Nome ,CPF, Gênero, Data de Nascimento e Email.'); return; } + onSave( - {nome: formData.nome, - nomeSocial: formData.nomeSocial, - dataNascimento: formData.dataNascimento, - genero: formData.genero, - //documento: formData.documento, - //numeroDocumento: formData.numeroDocumento, - cpf: formData.cpf, - profissao: formData.profissao, - //nomeConjuge: formData.nomeConjuge, - //outroId: formData.outroId, - endereco: { - cep: formData.cep, - cidade: formData.cidade, - estado: formData.estado, - bairro: formData.bairro, - logradouro: formData.rua, - numero: formData.numero, - complemento: formData.complemento, - }, - - contato: { - email: formData.email, - telefone1: formData.telefone1, - telefone2: formData.telefone2, - telefone3: formData.telefone3, - }, - - observacoes: formData.observacoes, -} - - + { + ...formData, + endereco: { + cep: formData.cep, + cidade: formData.cidade, + estado: formData.estado, + bairro: formData.bairro, + logradouro: formData.rua, + numero: formData.numero, + complemento: formData.complemento, + }, + contato: { + email: formData.email, + telefone1: formData.telefone1, + telefone2: formData.telefone2, + telefone3: formData.telefone3, + }, + infoMedicas: { + tipoSanguineo: formData.tipoSanguineo, + peso: formData.peso, + altura: formData.altura, + imc: formData.imc, + alergias: formData.alergias, + } + } ); }; return ( -
-

MediConnect

+
+

MediConnect

- {/* ------------------ DADOS PESSOAIS ------------------ */} -
Dados Pessoais
-
-
- - + {/* DADOS PESSOAIS */} +
+

handleToggleCollapse('dadosPessoais')} style={{ fontSize: '1.8rem' }}> + Dados Pessoais + + {collapsedSections.dadosPessoais ? '▲' : '▼'} + +

+
+
+ {/* AVATAR E INPUT DE FOTO */} +
+
+ {avatarUrl ? ( + Avatar do Médico + ) : ( +
+ ☤ +
+ )} +
+
+ + + {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 */} + //
+ // + // + //
+ //
); } diff --git a/src/components/patients/PatientForm.jsx b/src/components/patients/PatientForm.jsx index 9844b803..5000e609 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 4da9e92b..a582d5bf 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 de3aad9d..00000000 --- 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 a3f43930..66f59682 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 1a445e3a..f6467bf8 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 ( -//
+
-// -// + /> -//
-// ) -// } +
+ ) +} -// 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 9f032b53..f13fd168 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 a64930b4..a803feba 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 (
- - diff --git a/src/pages/FormLayout.jsx b/src/pages/FormLayout.jsx index 14e05a7f..3e05495f 100644 --- a/src/pages/FormLayout.jsx +++ b/src/pages/FormLayout.jsx @@ -23,7 +23,6 @@ function FormLayout( ) { header: myHeaders, body:raw, redirect:'follow' - }