forked from RiseUP/riseup_squad_03
modified: package-lock.json
modified: package.json modified: src/App.jsx modified: src/index.css modified: src/pages/MedicalRecordsPage.jsx modified: src/pages/ReportsPage.jsx modified: src/repositories/medicalRecordRepository.js
This commit is contained in:
17
src/App.jsx
17
src/App.jsx
@@ -159,6 +159,23 @@ function resolveRoute(pathname, navigate, role) {
|
||||
}
|
||||
}
|
||||
|
||||
if (pathname === '/prontuario/novo') {
|
||||
return {
|
||||
element: <MedicalRecordsPage mode="new" navigate={navigate} />,
|
||||
title: 'Novo prontuário',
|
||||
withShell: true,
|
||||
}
|
||||
}
|
||||
|
||||
if (pathname.startsWith('/prontuario/')) {
|
||||
const [, , recordId, action] = pathname.split('/')
|
||||
return {
|
||||
element: <MedicalRecordsPage mode={action === 'editar' ? 'edit' : 'detail'} navigate={navigate} recordId={recordId} />,
|
||||
title: action === 'editar' ? 'Editar prontuário' : 'Prontuário',
|
||||
withShell: true,
|
||||
}
|
||||
}
|
||||
|
||||
if (pathname.startsWith('/pacientes/')) {
|
||||
const patientId = pathname.split('/')[2]
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user