modified: src/App.jsx
modified: src/components/AppShell.jsx modified: src/config/api.js modified: src/config/permissions.js modified: src/data/mockData.js modified: src/hooks/useAgenda.js modified: src/hooks/useAuth.js modified: src/mappers/appointmentMapper.js modified: src/pages/AgendaPage.jsx modified: src/pages/AuthPages.jsx modified: src/pages/HomePage.jsx modified: src/pages/MedicalRecordsPage.jsx modified: src/pages/MessagesPage.jsx modified: src/pages/NotFoundPage.jsx modified: src/pages/PatientsPage.jsx modified: src/pages/ReportsPage.jsx modified: src/pages/TeamPage.jsx modified: src/pages/UsersPage.jsx modified: src/pages/VisitsPage.jsx modified: src/repositories/authRepository.js new file: src/repositories/availabilityRepository.js modified: src/repositories/communicationRepository.js modified: src/repositories/patientRepository.js modified: src/repositories/professionalRepository.js modified: src/repositories/profileRepository.js modified: src/repositories/reportRepository.js modified: src/repositories/repositoryUtils.js modified: src/repositories/settingsRepository.js modified: src/repositories/userRepository.js modified: src/repositories/visitRepository.js
This commit is contained in:
@@ -9,18 +9,18 @@ const ALL_NAV_ITEMS = [
|
||||
{ href: '/inicio', label: 'Painel', icon: 'pulse', activePaths: ['/inicio', '/home', '/dashboard'] },
|
||||
{ href: '/agenda', label: 'Agenda', icon: 'calendar' },
|
||||
{ href: '/pacientes', label: 'Pacientes', icon: 'users', exact: true },
|
||||
{ href: '/prontuario', label: 'Prontuario', icon: 'file' },
|
||||
{ href: '/laudos', label: 'Relatorios medicos', icon: 'clipboard' },
|
||||
{ href: '/prontuario', label: 'Prontuário', icon: 'file' },
|
||||
{ href: '/laudos', label: 'Relatórios médicos', icon: 'clipboard' },
|
||||
{
|
||||
href: '/camunicacao',
|
||||
label: 'Comunicacao',
|
||||
label: 'Comunicação',
|
||||
icon: 'message',
|
||||
activePaths: ['/camunicacao', '/comunicacao', '/mensagens'],
|
||||
},
|
||||
{ href: '/relatorios', label: 'Relatorios', icon: 'chart' },
|
||||
{ href: '/relatorios', label: 'Relatórios', icon: 'chart' },
|
||||
{ href: '/profissionais', label: 'Profissionais', icon: 'users' },
|
||||
{ href: '/usuarios', label: 'Usuarios', icon: 'shield' },
|
||||
{ href: '/configuracoes', label: 'Configuracoes', icon: 'settings', activePaths: ['/configuracoes', '/config'] },
|
||||
{ href: '/usuarios', label: 'Usuários', icon: 'shield' },
|
||||
{ href: '/configuracoes', label: 'Configurações', icon: 'settings', activePaths: ['/configuracoes', '/config'] },
|
||||
]
|
||||
|
||||
const titles = {
|
||||
@@ -29,24 +29,24 @@ const titles = {
|
||||
'/dashboard': 'Painel',
|
||||
'/agenda': 'Agenda',
|
||||
'/consultas': 'Consultas',
|
||||
'/laudos': 'Relatorios medicos',
|
||||
'/laudos': 'Relatórios médicos',
|
||||
'/pacientes': 'Pacientes',
|
||||
'/prontuario': 'Prontuario',
|
||||
'/camunicacao': 'Comunicacao',
|
||||
'/comunicacao': 'Comunicacao',
|
||||
'/mensagens': 'Comunicacao',
|
||||
'/relatorios': 'Relatorios',
|
||||
'/prontuario': 'Prontuário',
|
||||
'/camunicacao': 'Comunicação',
|
||||
'/comunicacao': 'Comunicação',
|
||||
'/mensagens': 'Comunicação',
|
||||
'/relatorios': 'Relatórios',
|
||||
'/profissionais': 'Profissionais',
|
||||
'/perfil': 'Perfil',
|
||||
'/configuracoes': 'Configuracoes',
|
||||
'/config': 'Configuracoes',
|
||||
'/usuarios': 'Usuarios',
|
||||
'/configuracoes': 'Configurações',
|
||||
'/config': 'Configurações',
|
||||
'/usuarios': 'Usuários',
|
||||
}
|
||||
|
||||
export function AppShell({ children, currentPath, navigate, role, routeTitle }) {
|
||||
const [menuOpen, setMenuOpen] = useState(false)
|
||||
const [quickSearch, setQuickSearch] = useState('')
|
||||
const [viewerProfile, setViewerProfile] = useState({ name: 'Usuario', role: 'Usuario do Sistema' })
|
||||
const [viewerProfile, setViewerProfile] = useState({ name: 'Usuário', role: 'Usuário do Sistema' })
|
||||
|
||||
const pageTitle = useMemo(() => {
|
||||
if (currentPath.startsWith('/pacientes/') && routeTitle) {
|
||||
@@ -78,8 +78,8 @@ export function AppShell({ children, currentPath, navigate, role, routeTitle })
|
||||
if (!active || !profile) return
|
||||
|
||||
setViewerProfile({
|
||||
name: profile.name || 'Usuario',
|
||||
role: ROLE_LABELS[role] || profile.role || 'Usuario do Sistema',
|
||||
name: profile.name || 'Usuário',
|
||||
role: ROLE_LABELS[role] || profile.role || 'Usuário do Sistema',
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -87,7 +87,7 @@ export function AppShell({ children, currentPath, navigate, role, routeTitle })
|
||||
if (active && role) {
|
||||
setViewerProfile((prev) => ({
|
||||
...prev,
|
||||
role: ROLE_LABELS[role] || 'Usuario do Sistema',
|
||||
role: ROLE_LABELS[role] || 'Usuário do Sistema',
|
||||
}))
|
||||
}
|
||||
})
|
||||
@@ -108,7 +108,7 @@ export function AppShell({ children, currentPath, navigate, role, routeTitle })
|
||||
className="sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-[#262626] focus:px-4 focus:py-2 focus:text-sm focus:font-semibold focus:text-[#3b82f6]"
|
||||
href="#app-content"
|
||||
>
|
||||
Pular para conteudo
|
||||
Pular para conteúdo
|
||||
</a>
|
||||
|
||||
<aside
|
||||
@@ -173,10 +173,10 @@ export function AppShell({ children, currentPath, navigate, role, routeTitle })
|
||||
<div className="relative w-full max-w-sm lg:w-96">
|
||||
<SearchIcon className="pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-[#a3a3a3]" />
|
||||
<input
|
||||
aria-label="Busca rapida"
|
||||
aria-label="Busca rápida"
|
||||
className="h-[38px] w-full rounded-sm border border-[#404040] bg-[#303030] py-2 pl-10 pr-4 text-sm text-[#e5e5e5] outline-none transition placeholder:text-[#a3a3a3] focus:border-[#3b82f6] focus:ring-2 focus:ring-[#3b82f6]/20"
|
||||
onChange={(event) => setQuickSearch(event.target.value)}
|
||||
placeholder="Buscar paciente, prontuario..."
|
||||
placeholder="Buscar paciente, prontuário..."
|
||||
value={quickSearch}
|
||||
/>
|
||||
</div>
|
||||
@@ -184,7 +184,7 @@ export function AppShell({ children, currentPath, navigate, role, routeTitle })
|
||||
|
||||
<div className="flex items-center gap-6">
|
||||
<button
|
||||
aria-label="Notificacoes"
|
||||
aria-label="Notificações"
|
||||
className="relative grid size-8 place-items-center text-[#a3a3a3] transition hover:text-[#e5e5e5]"
|
||||
type="button"
|
||||
>
|
||||
@@ -388,4 +388,4 @@ function getInitials(name) {
|
||||
.map((part) => part[0])
|
||||
.join('')
|
||||
.toUpperCase()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user