|
|
@@ -1,9 +1,9 @@
|
|
|
import React from 'react';
|
|
|
import { ThemeProvider } from '@mui/material/styles';
|
|
|
|
|
|
-import {
|
|
|
- Menu,MenuItem,Container,Avatar, Badge,IconButton,Divider,
|
|
|
- Typography, List, Toolbar, Box, CssBaseline,useMediaQuery as Size,
|
|
|
+import {
|
|
|
+ Menu, MenuItem, Container, Avatar, Badge, IconButton, Divider,
|
|
|
+ Typography, List, Toolbar, Box, CssBaseline, useMediaQuery as Size,
|
|
|
} from '@mui/material'
|
|
|
|
|
|
import {
|
|
|
@@ -15,7 +15,7 @@ import useAuth from '../Auth/useAuth';
|
|
|
import Logo from '../Images/logo.png';
|
|
|
import ProfilePicture from '../Images/man.png';
|
|
|
|
|
|
-import { Outlet, useNavigate} from "react-router-dom";
|
|
|
+import { Outlet, useNavigate } from "react-router-dom";
|
|
|
import { MenuMovil } from '../Components/Navigation/MenuMovil';
|
|
|
import Footer from "../Components/Footer";
|
|
|
|
|
|
@@ -26,6 +26,7 @@ import { MainListItems, SecondaryListItems } from '../Components/Navigation/list
|
|
|
function DashboardContent() {
|
|
|
|
|
|
const [open, setOpen] = React.useState(false);
|
|
|
+
|
|
|
const isMovil = Size('(min-width:770px)');
|
|
|
const auth = useAuth();
|
|
|
const navigate = useNavigate()
|
|
|
@@ -46,56 +47,56 @@ function DashboardContent() {
|
|
|
console.log('cerrando session')
|
|
|
auth.logout();
|
|
|
navigate('/')
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
return (
|
|
|
<ThemeProvider theme={mdTheme}>
|
|
|
|
|
|
- <MenuMovil
|
|
|
+ <MenuMovil
|
|
|
anchor={anchorElMovil}
|
|
|
control={setAnchorElMov} />
|
|
|
|
|
|
<Box sx={{ display: 'flex' }}>
|
|
|
- <CssBaseline/>
|
|
|
- <AppBar style={{ backgroundColor : '#fff', boxShadow : 'None' }} position="absolute" open={ !isMovil ? open : false}>
|
|
|
- <Toolbar sx={{ pr: '24px' , borderBottom : "1px solid #ec5e69"}} >
|
|
|
+ <CssBaseline />
|
|
|
+ <AppBar style={{ backgroundColor: '#fff', boxShadow: 'None' }} position="absolute" open={!isMovil ? open : false}>
|
|
|
+ <Toolbar sx={{ pr: '24px', borderBottom: "1px solid #ec5e69" }} >
|
|
|
|
|
|
{/* boton para activar navegacion */}
|
|
|
- <IconButton
|
|
|
- edge="start"
|
|
|
- color="inherit"
|
|
|
- aria-label="open drawer"
|
|
|
- onClick={ !isMovil ? MenuResponsive : toggleDrawer }
|
|
|
- sx={{ marginRight: '36px', ...( !isMovil && open && { display: 'none' }), }} >
|
|
|
- <MenuIcon style={{
|
|
|
+ <IconButton
|
|
|
+ edge="start"
|
|
|
+ color="inherit"
|
|
|
+ aria-label="open drawer"
|
|
|
+ onClick={!isMovil ? MenuResponsive : toggleDrawer}
|
|
|
+ sx={{ marginRight: '36px', ...(!isMovil && open && { display: 'none' }), }} >
|
|
|
+ <MenuIcon style={{
|
|
|
background: '#ec5e69',
|
|
|
fontSize: "40",
|
|
|
color: "#fff"
|
|
|
- }}/>
|
|
|
+ }} />
|
|
|
</IconButton>
|
|
|
|
|
|
<Typography component="h1" variant="h6" color="inherit" noWrap sx={{ flexGrow: 1 }} >
|
|
|
{
|
|
|
- !isMovil && open ? (
|
|
|
- <React.Fragment>
|
|
|
-
|
|
|
- <IconButton onClick={toggleDrawer}>
|
|
|
- <MenuIcon />
|
|
|
- </IconButton>
|
|
|
-
|
|
|
- <IconButton onClick={ (event) => event.target.requestFullscreen() }>
|
|
|
- <FullscreenIcon style={{ paddinLeft : 15 }}/>
|
|
|
- </IconButton>
|
|
|
- </React.Fragment>
|
|
|
- ) : undefined
|
|
|
- }
|
|
|
+ !isMovil && open ? (
|
|
|
+ <React.Fragment>
|
|
|
+
|
|
|
+ <IconButton onClick={toggleDrawer}>
|
|
|
+ <MenuIcon />
|
|
|
+ </IconButton>
|
|
|
+
|
|
|
+ <IconButton onClick={(event) => event.target.requestFullscreen()}>
|
|
|
+ <FullscreenIcon style={{ paddinLeft: 15 }} />
|
|
|
+ </IconButton>
|
|
|
+ </React.Fragment>
|
|
|
+ ) : undefined
|
|
|
+ }
|
|
|
</Typography>
|
|
|
|
|
|
|
|
|
<Box sx={{ display: { xs: 'none', md: 'flex' } }}>
|
|
|
<IconButton size="large" aria-label="show 4 new mails" color="inherit">
|
|
|
<Badge badgeContent={4} color="error">
|
|
|
- <MailIcon style={{ color : '#212529' }} />
|
|
|
+ <MailIcon style={{ color: '#212529' }} />
|
|
|
</Badge>
|
|
|
</IconButton>
|
|
|
<IconButton
|
|
|
@@ -103,7 +104,7 @@ function DashboardContent() {
|
|
|
aria-label="show 17 new notifications"
|
|
|
color="inherit">
|
|
|
<Badge badgeContent={17} color="error">
|
|
|
- <NotificationsIcon style={{ color : '#212529' }}/>
|
|
|
+ <NotificationsIcon style={{ color: '#212529' }} />
|
|
|
</Badge>
|
|
|
</IconButton>
|
|
|
|
|
|
@@ -116,7 +117,7 @@ function DashboardContent() {
|
|
|
aria-expanded={open_profile ? 'true' : undefined}
|
|
|
onClick={handleClick}
|
|
|
color="inherit" >
|
|
|
- <Avatar alt="profile picture" src={ProfilePicture} />
|
|
|
+ <Avatar alt="profile picture" src={ProfilePicture} />
|
|
|
</IconButton>
|
|
|
<Menu
|
|
|
id="basic-menu"
|
|
|
@@ -124,9 +125,9 @@ function DashboardContent() {
|
|
|
open={open_profile}
|
|
|
onClose={handleClose}
|
|
|
MenuListProps={{ 'aria-labelledby': 'basic-button', }}>
|
|
|
- <MenuItem onClick={() => navigate('dashboard/perfil') }>Mi Cuenta</MenuItem>
|
|
|
+ <MenuItem onClick={() => navigate('dashboard/perfil')}>Mi Cuenta</MenuItem>
|
|
|
<MenuItem onClick={() => console.log('dashboard/perfil')}>Configuraciones</MenuItem>
|
|
|
- <MenuItem onClick={CerrarSession}>Logout</MenuItem>
|
|
|
+ <MenuItem onClick={CerrarSession}>Cerrar Sesión</MenuItem>
|
|
|
</Menu>
|
|
|
</Box>
|
|
|
</Toolbar>
|
|
|
@@ -139,9 +140,9 @@ function DashboardContent() {
|
|
|
justifyContent: 'flex-start',
|
|
|
px: [1]
|
|
|
}} >
|
|
|
- <div style={{ flat : 'righ' }} className="sidebar-header">
|
|
|
+ <div style={{ flat: 'righ' }} className="sidebar-header">
|
|
|
<div className="width_img">
|
|
|
- <img src={Logo} alt="pruebas psicometricas"/>
|
|
|
+ <img src={Logo} alt="pruebas psicometricas" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</Toolbar>
|
|
|
@@ -154,8 +155,8 @@ function DashboardContent() {
|
|
|
{SecondaryListItems}
|
|
|
</List>
|
|
|
</Drawer>
|
|
|
- <Container maxWidth="lg" sx={{ mt: 2 , mb: 2 }}>
|
|
|
- <Outlet />
|
|
|
+ <Container maxWidth="lg" sx={{ mt: 2, mb: 2 }}>
|
|
|
+ <Outlet />
|
|
|
<Footer />
|
|
|
</Container>
|
|
|
</Box>
|