diff --git a/src/App.js b/src/App.js index 593486a..a3b8948 100644 --- a/src/App.js +++ b/src/App.js @@ -9,6 +9,7 @@ import NewRequestPage from './components/Requests/NewRequestPage'; import HistoryPage from './components/History/HistoryPage'; import SettingsPage from './components/Settings/SettingsPage'; import HelpPage from './components/Help/HelpPage'; +import ProfilePage from './components/Profile/ProfilePage'; function App() { const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); @@ -63,6 +64,8 @@ function App() { ? 'Configuración' : activeView === 'help' ? 'Ayuda' + : activeView === 'profile' + ? 'Perfil' : 'Dashboard'; return ( @@ -85,6 +88,8 @@ function App() { ) : activeView === 'help' ? ( + ) : activeView === 'profile' ? ( + ) : (
diff --git a/src/components/Layout/Sidebar.js b/src/components/Layout/Sidebar.js index 139c426..dced423 100644 --- a/src/components/Layout/Sidebar.js +++ b/src/components/Layout/Sidebar.js @@ -62,13 +62,21 @@ const Sidebar = ({ isMobileMenuOpen, onToggleMobileMenu, activeView = 'dashboard
-
+
onNavigate?.('profile')} + onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onNavigate?.('profile'); } }} + title="Ver perfil" + style={{ cursor: 'pointer' }} + >
JP
Juan Pérez
Administrador
- { e.preventDefault(); handleLogout(); }} title="Cerrar sesión"> + { e.preventDefault(); e.stopPropagation(); handleLogout(); }} title="Cerrar sesión">
diff --git a/src/components/Profile/ProfilePage.js b/src/components/Profile/ProfilePage.js new file mode 100644 index 0000000..c5f7d89 --- /dev/null +++ b/src/components/Profile/ProfilePage.js @@ -0,0 +1,63 @@ +import React from 'react'; +import '../../styles/components.css'; + +const ProfileRow = ({ label, value, icon }) => ( +
+
+ +
+ {value} +
+
+
+); + +const ProfilePage = () => { + // En esta versión demo, la información del usuario es estática. + // En una integración real, estos datos vendrían del backend o del contexto de autenticación. + const user = { + initials: 'JP', + name: 'Juan Pérez', + role: 'Administrador', + email: 'juan.perez@empresa.com', + }; + + return ( +
+
+
+

+ + Perfil de usuario +

+
+
+ +
+
{user.name}
+
{user.role}
+
+
+
+ +
+
+

+ + Información +

+
+
+ + + +
+
+
+ ); +}; + +export default ProfilePage;