|
@@ -1,5 +1,4 @@
|
|
|
import * as React from 'react';
|
|
import * as React from 'react';
|
|
|
-import ListItemButton from '@mui/material/ListItemButton';
|
|
|
|
|
import ListItem from '@mui/material/ListItem';
|
|
import ListItem from '@mui/material/ListItem';
|
|
|
import List from '@mui/material/List';
|
|
import List from '@mui/material/List';
|
|
|
|
|
|
|
@@ -23,8 +22,37 @@ import OndemandVideoIcon from '@mui/icons-material/OndemandVideo';
|
|
|
import StarIcon from '@mui/icons-material/Star';
|
|
import StarIcon from '@mui/icons-material/Star';
|
|
|
import SupportAgentIcon from '@mui/icons-material/SupportAgent';
|
|
import SupportAgentIcon from '@mui/icons-material/SupportAgent';
|
|
|
|
|
|
|
|
-import NavStyle from './NavStyle'
|
|
|
|
|
|
|
+import Collapse from '@mui/material/Collapse';
|
|
|
|
|
+import ExpandLess from '@mui/icons-material/ExpandLess';
|
|
|
|
|
+import ExpandMore from '@mui/icons-material/ExpandMore';
|
|
|
|
|
|
|
|
|
|
+function SubMenuItem (props) {
|
|
|
|
|
+
|
|
|
|
|
+ function change (event){
|
|
|
|
|
+ props.change(event, props.index)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ let isOn = props.selected === props.index
|
|
|
|
|
+
|
|
|
|
|
+ return(
|
|
|
|
|
+ <ListItem
|
|
|
|
|
+ sx={{ pl: 9}}
|
|
|
|
|
+ selected={isOn}
|
|
|
|
|
+ onClick={change}
|
|
|
|
|
+ button
|
|
|
|
|
+ >
|
|
|
|
|
+ <ListItemText
|
|
|
|
|
+ sx={{
|
|
|
|
|
+ fontSize: 12,
|
|
|
|
|
+ ' .css-10hburv-MuiTypography-root' : {
|
|
|
|
|
+ fontSize : '.875rem'
|
|
|
|
|
+ },
|
|
|
|
|
+ }}
|
|
|
|
|
+ primary={props.title}
|
|
|
|
|
+ />
|
|
|
|
|
+ </ListItem>
|
|
|
|
|
+ )
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
function Item (props) {
|
|
function Item (props) {
|
|
|
|
|
|
|
@@ -32,18 +60,13 @@ function Item (props) {
|
|
|
function change (event){
|
|
function change (event){
|
|
|
props.change(event, props.index)
|
|
props.change(event, props.index)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
let isOn = props.selected === props.index
|
|
let isOn = props.selected === props.index
|
|
|
|
|
|
|
|
//.css-10oikv1-MuiButtonBase-root-MuiListItem-root.Mui-selected
|
|
//.css-10oikv1-MuiButtonBase-root-MuiListItem-root.Mui-selected
|
|
|
return(
|
|
return(
|
|
|
<ListItem
|
|
<ListItem
|
|
|
- sx={{
|
|
|
|
|
- color : '#25344f',
|
|
|
|
|
- '& .MuiButtonBase-selected' :{
|
|
|
|
|
- color : '#121212',
|
|
|
|
|
- backgroundColor : '#101010'
|
|
|
|
|
- }
|
|
|
|
|
- }}
|
|
|
|
|
|
|
+ sx={{ color : '#25344f'}}
|
|
|
selected={isOn}
|
|
selected={isOn}
|
|
|
onClick={change}
|
|
onClick={change}
|
|
|
button
|
|
button
|
|
@@ -66,7 +89,7 @@ function Item (props) {
|
|
|
|
|
|
|
|
|
|
|
|
|
export const MainListItems = () => {
|
|
export const MainListItems = () => {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
const [selectedIndex, setSelectedIndex] = React.useState(1);
|
|
const [selectedIndex, setSelectedIndex] = React.useState(1);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -74,6 +97,12 @@ export const MainListItems = () => {
|
|
|
setSelectedIndex(index);
|
|
setSelectedIndex(index);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const [open, setOpen] = React.useState(true);
|
|
|
|
|
+
|
|
|
|
|
+ const showPruebas = () => {
|
|
|
|
|
+ setOpen(!open);
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
|
|
|
return(
|
|
return(
|
|
|
<List>
|
|
<List>
|
|
@@ -83,9 +112,41 @@ export const MainListItems = () => {
|
|
|
<Item icon={<VisibilityOffIcon/>} selected={selectedIndex} change={handleListItemClick} index={2} title="Contraseñas" route="/contrasenas" />
|
|
<Item icon={<VisibilityOffIcon/>} selected={selectedIndex} change={handleListItemClick} index={2} title="Contraseñas" route="/contrasenas" />
|
|
|
<Item icon={<PeopleAltIcon/>} selected={selectedIndex} change={handleListItemClick} index={3} title="Expedientes" route="/expedientes" />
|
|
<Item icon={<PeopleAltIcon/>} selected={selectedIndex} change={handleListItemClick} index={3} title="Expedientes" route="/expedientes" />
|
|
|
<Item icon={<EqualizerIcon/>} selected={selectedIndex} change={handleListItemClick} index={4} title="Resultados" route="/resultados" />
|
|
<Item icon={<EqualizerIcon/>} selected={selectedIndex} change={handleListItemClick} index={4} title="Resultados" route="/resultados" />
|
|
|
- <Item icon={<FingerprintIcon/>} selected={selectedIndex} change={handleListItemClick} index={5} title="Pruebas" route="/pruebas" />
|
|
|
|
|
- <Item icon={<MiscellaneousServicesIcon/>} selected={selectedIndex} change={handleListItemClick} index={6} title="Configuraciones" route="/configuraciones" />
|
|
|
|
|
- <Item icon={<HistoryIcon/>} selected={selectedIndex} change={handleListItemClick} index={7} title="Historial" route="/historial" />
|
|
|
|
|
|
|
+ {/* <Item icon={<FingerprintIcon/>} selected={selectedIndex} change={handleListItemClick} index={5} title="Pruebas" route="/pruebas" /> */}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <ListItem onClick={showPruebas}>
|
|
|
|
|
+ <ListItemIcon>
|
|
|
|
|
+ <FingerprintIcon />
|
|
|
|
|
+ </ListItemIcon>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <ListItemText
|
|
|
|
|
+ sx={{
|
|
|
|
|
+ fontSize: 12,
|
|
|
|
|
+ ' .css-10hburv-MuiTypography-root' : {
|
|
|
|
|
+ fontSize : '.875rem'
|
|
|
|
|
+ },
|
|
|
|
|
+ }}
|
|
|
|
|
+ primary="Pruebas" />
|
|
|
|
|
+ {open ? <ExpandLess /> : <ExpandMore />}
|
|
|
|
|
+ </ListItem>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <Collapse in={open} timeout="auto" unmountOnExit>
|
|
|
|
|
+ <List component="div" disablePadding>
|
|
|
|
|
+
|
|
|
|
|
+ <SubMenuItem selected={selectedIndex} index={5} change={handleListItemClick} title="Crear Prueba" />
|
|
|
|
|
+ <SubMenuItem selected={selectedIndex} index={6} change={handleListItemClick} title="Listado de pruebas" />
|
|
|
|
|
+ <SubMenuItem selected={selectedIndex} index={7} change={handleListItemClick} title="Aplicar" />
|
|
|
|
|
+ <SubMenuItem selected={selectedIndex} index={8} change={handleListItemClick} title="Respuestas" />
|
|
|
|
|
+ <SubMenuItem selected={selectedIndex} index={9} change={handleListItemClick} title="Calificaciones" />
|
|
|
|
|
+
|
|
|
|
|
+ </List>
|
|
|
|
|
+ </Collapse>
|
|
|
|
|
+
|
|
|
|
|
+ <Item icon={<MiscellaneousServicesIcon/>} selected={selectedIndex} change={handleListItemClick} index={10} title="Configuraciones" route="/configuraciones" />
|
|
|
|
|
+ <Item icon={<HistoryIcon/>} selected={selectedIndex} change={handleListItemClick} index={11} title="Historial" route="/historial" />
|
|
|
</List>
|
|
</List>
|
|
|
)
|
|
)
|
|
|
};
|
|
};
|