@@ -236,7 +259,7 @@ export function AppShell({ children, currentPath, navigate, role, routeTitle })
>
@@ -346,10 +369,11 @@ export function AppShell({ children, currentPath, navigate, role, routeTitle })
)
}
-function NavItem({ active, item, onNavigate }) {
+function NavItem({ active, item, onNavigate, sidebarCollapsed = false }) {
return (
-
- {item.label}
+
+ {item.label}
)
}
diff --git a/src/components/Brand.jsx b/src/components/Brand.jsx
index b541cd0..d198458 100644
--- a/src/components/Brand.jsx
+++ b/src/components/Brand.jsx
@@ -1,14 +1,32 @@
export function BrandLogo({
className = '',
iconClassName = 'size-10 rounded-[6px]',
+ iconButtonLabel = 'MediConnect',
markClassName = 'size-6',
+ onIconClick,
textClassName = 'text-2xl font-bold leading-8 tracking-[-0.025em] text-white',
}) {
+ const icon = (
+
+
+
+ )
+
return (
-
-
-
+ {onIconClick ? (
+
+ ) : (
+ icon
+ )}
MediConnect
)
diff --git a/src/index.css b/src/index.css
index 594c7c7..d7d91db 100644
--- a/src/index.css
+++ b/src/index.css
@@ -336,11 +336,6 @@ button:disabled {
background: #ffffff;
}
-[data-theme='light'] .report-editor-sidebar {
- border-color: #c8d4e2;
- background: #edf4fb;
-}
-
[data-theme='light'] .report-editor-body {
background: #f8fbff;
}
diff --git a/src/pages/MedicalRecordsPage.jsx b/src/pages/MedicalRecordsPage.jsx
index f2d7225..b9da479 100644
--- a/src/pages/MedicalRecordsPage.jsx
+++ b/src/pages/MedicalRecordsPage.jsx
@@ -575,25 +575,18 @@ function PatientPickList({ items, onSelect, selectedId }) {
}
function PatientReportHistory({ fallbackReports = [], patientId, patientName }) {
- const [reports, setReports] = useState(fallbackReports)
- const [loading, setLoading] = useState(Boolean(patientId))
+ const [reportState, setReportState] = useState({ patientId: '', reports: [] })
+ const reports = patientId && reportState.patientId === patientId ? reportState.reports : fallbackReports
+ const loading = Boolean(patientId && reportState.patientId !== patientId)
useEffect(() => {
+ if (!patientId) return undefined
+
let active = true
- if (!patientId) {
- setReports(fallbackReports)
- setLoading(false)
- return () => {
- active = false
- }
- }
-
- setLoading(true)
loadReportsForPatient(patientId, patientName).then((data) => {
if (!active) return
- setReports(data.length ? data : fallbackReports)
- setLoading(false)
+ setReportState({ patientId, reports: data.length ? data : fallbackReports })
})
return () => {
diff --git a/src/pages/PatientsPage.jsx b/src/pages/PatientsPage.jsx
index 254db76..1727a0f 100644
--- a/src/pages/PatientsPage.jsx
+++ b/src/pages/PatientsPage.jsx
@@ -796,7 +796,7 @@ export function PatientDetailPage({ navigate, patient, role }) {
async function deletePatient() {
if (!canHardDeletePatients) return
- if (!window.confirm('Tem certeza que deseja excluir este paciente definitivamente?')) {
+ if (!window.confirm('Tem certeza que deseja excluir este paciente definitivamente? Esta ação não poderá ser desfeita.')) {
return
}
@@ -900,21 +900,15 @@ export function PatientDetailPage({ navigate, patient, role }) {
{canHardDeletePatients ? (
-
-
-
-
Zona de exclusão
-
Remove definitivamente o paciente e seus dados locais carregados.
-
-
-
-
+
+
+
) : null}
{messageShortcutOpen ? (
diff --git a/src/pages/ReportsPage.jsx b/src/pages/ReportsPage.jsx
index 7667836..1310fbb 100644
--- a/src/pages/ReportsPage.jsx
+++ b/src/pages/ReportsPage.jsx
@@ -35,8 +35,6 @@ const orderOptions = [
const inputClass =
'h-10 w-full rounded-lg border border-[#404040] bg-[#1a1a1a] px-3 text-sm text-[#e5e5e5] outline-none transition placeholder:text-[#a3a3a3] focus:border-[#3b82f6] focus:ring-1 focus:ring-[#3b82f6]'
-const textareaClass =
- 'min-h-24 w-full rounded-lg border border-[#404040] bg-[#1a1a1a] px-3 py-2 text-sm text-[#e5e5e5] outline-none transition placeholder:text-[#a3a3a3] focus:border-[#3b82f6] focus:ring-1 focus:ring-[#3b82f6]'
const labelClass = 'mb-1.5 block text-xs font-medium text-[#e5e5e5]'
const cardClass = 'rounded-2xl border border-[#404040] bg-[#262626] shadow-sm'
@@ -123,8 +121,6 @@ const reportTemplates = [
},
]
-const templateCategories = ['Todos', ...Array.from(new Set(reportTemplates.map((template) => template.category)))]
-
const emptyEditor = {
id: null,
orderNumber: '',
@@ -618,16 +614,13 @@ function ReportRow({ onEdit, onView, report }) {
}
function ReportEditorModalV3({ editor, onChange, onClose, onSave, saving }) {
- const [templateCategory, setTemplateCategory] = useState('Todos')
const [templateSearch, setTemplateSearch] = useState('')
const [templatesOpen, setTemplatesOpen] = useState(false)
- const [categoriesOpen, setCategoriesOpen] = useState(true)
const isValid = isReportEditorValid(editor)
const filteredTemplates = reportTemplates.filter((template) => {
- const matchesCategory = templateCategory === 'Todos' || template.category === templateCategory
const query = normalizeSearch(templateSearch)
const matchesSearch = !query || normalizeSearch([template.title, template.description, template.tags.join(' ')].join(' ')).includes(query)
- return matchesCategory && matchesSearch
+ return matchesSearch
})
function updateField(field, value) {
@@ -672,40 +665,7 @@ function ReportEditorModalV3({ editor, onChange, onClose, onSave, saving }) {