|
@@ -1,5 +1,4 @@
|
1
|
1
|
import * as React from 'react';
|
2
|
|
-import ListItemButton from '@mui/material/ListItemButton';
|
3
|
2
|
import ListItem from '@mui/material/ListItem';
|
4
|
3
|
import List from '@mui/material/List';
|
5
|
4
|
|
|
@@ -23,8 +22,37 @@ import OndemandVideoIcon from '@mui/icons-material/OndemandVideo';
|
23
|
22
|
import StarIcon from '@mui/icons-material/Star';
|
24
|
23
|
import SupportAgentIcon from '@mui/icons-material/SupportAgent';
|
25
|
24
|
|
26
|
|
-import NavStyle from './NavStyle'
|
|
25
|
+import Collapse from '@mui/material/Collapse';
|
|
26
|
+import ExpandLess from '@mui/icons-material/ExpandLess';
|
|
27
|
+import ExpandMore from '@mui/icons-material/ExpandMore';
|
27
|
28
|
|
|
29
|
+function SubMenuItem (props) {
|
|
30
|
+
|
|
31
|
+ function change (event){
|
|
32
|
+ props.change(event, props.index)
|
|
33
|
+ }
|
|
34
|
+
|
|
35
|
+ let isOn = props.selected === props.index
|
|
36
|
+
|
|
37
|
+ return(
|
|
38
|
+ <ListItem
|
|
39
|
+ sx={{ pl: 9}}
|
|
40
|
+ selected={isOn}
|
|
41
|
+ onClick={change}
|
|
42
|
+ button
|
|
43
|
+ >
|
|
44
|
+ <ListItemText
|
|
45
|
+ sx={{
|
|
46
|
+ fontSize: 12,
|
|
47
|
+ ' .css-10hburv-MuiTypography-root' : {
|
|
48
|
+ fontSize : '.875rem'
|
|
49
|
+ },
|
|
50
|
+ }}
|
|
51
|
+ primary={props.title}
|
|
52
|
+ />
|
|
53
|
+ </ListItem>
|
|
54
|
+ )
|
|
55
|
+}
|
28
|
56
|
|
29
|
57
|
function Item (props) {
|
30
|
58
|
|
|
@@ -32,18 +60,13 @@ function Item (props) {
|
32
|
60
|
function change (event){
|
33
|
61
|
props.change(event, props.index)
|
34
|
62
|
}
|
|
63
|
+
|
35
|
64
|
let isOn = props.selected === props.index
|
36
|
65
|
|
37
|
66
|
//.css-10oikv1-MuiButtonBase-root-MuiListItem-root.Mui-selected
|
38
|
67
|
return(
|
39
|
68
|
<ListItem
|
40
|
|
- sx={{
|
41
|
|
- color : '#25344f',
|
42
|
|
- '& .MuiButtonBase-selected' :{
|
43
|
|
- color : '#121212',
|
44
|
|
- backgroundColor : '#101010'
|
45
|
|
- }
|
46
|
|
- }}
|
|
69
|
+ sx={{ color : '#25344f'}}
|
47
|
70
|
selected={isOn}
|
48
|
71
|
onClick={change}
|
49
|
72
|
button
|
|
@@ -66,7 +89,7 @@ function Item (props) {
|
66
|
89
|
|
67
|
90
|
|
68
|
91
|
export const MainListItems = () => {
|
69
|
|
-
|
|
92
|
+
|
70
|
93
|
const [selectedIndex, setSelectedIndex] = React.useState(1);
|
71
|
94
|
|
72
|
95
|
|
|
@@ -74,6 +97,12 @@ export const MainListItems = () => {
|
74
|
97
|
setSelectedIndex(index);
|
75
|
98
|
};
|
76
|
99
|
|
|
100
|
+ const [open, setOpen] = React.useState(true);
|
|
101
|
+
|
|
102
|
+ const showPruebas = () => {
|
|
103
|
+ setOpen(!open);
|
|
104
|
+ };
|
|
105
|
+
|
77
|
106
|
|
78
|
107
|
return(
|
79
|
108
|
<List>
|
|
@@ -83,9 +112,41 @@ export const MainListItems = () => {
|
83
|
112
|
<Item icon={<VisibilityOffIcon/>} selected={selectedIndex} change={handleListItemClick} index={2} title="Contraseñas" route="/contrasenas" />
|
84
|
113
|
<Item icon={<PeopleAltIcon/>} selected={selectedIndex} change={handleListItemClick} index={3} title="Expedientes" route="/expedientes" />
|
85
|
114
|
<Item icon={<EqualizerIcon/>} selected={selectedIndex} change={handleListItemClick} index={4} title="Resultados" route="/resultados" />
|
86
|
|
- <Item icon={<FingerprintIcon/>} selected={selectedIndex} change={handleListItemClick} index={5} title="Pruebas" route="/pruebas" />
|
87
|
|
- <Item icon={<MiscellaneousServicesIcon/>} selected={selectedIndex} change={handleListItemClick} index={6} title="Configuraciones" route="/configuraciones" />
|
88
|
|
- <Item icon={<HistoryIcon/>} selected={selectedIndex} change={handleListItemClick} index={7} title="Historial" route="/historial" />
|
|
115
|
+ {/* <Item icon={<FingerprintIcon/>} selected={selectedIndex} change={handleListItemClick} index={5} title="Pruebas" route="/pruebas" /> */}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+ <ListItem onClick={showPruebas}>
|
|
119
|
+ <ListItemIcon>
|
|
120
|
+ <FingerprintIcon />
|
|
121
|
+ </ListItemIcon>
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+ <ListItemText
|
|
125
|
+ sx={{
|
|
126
|
+ fontSize: 12,
|
|
127
|
+ ' .css-10hburv-MuiTypography-root' : {
|
|
128
|
+ fontSize : '.875rem'
|
|
129
|
+ },
|
|
130
|
+ }}
|
|
131
|
+ primary="Pruebas" />
|
|
132
|
+ {open ? <ExpandLess /> : <ExpandMore />}
|
|
133
|
+ </ListItem>
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+ <Collapse in={open} timeout="auto" unmountOnExit>
|
|
137
|
+ <List component="div" disablePadding>
|
|
138
|
+
|
|
139
|
+ <SubMenuItem selected={selectedIndex} index={5} change={handleListItemClick} title="Crear Prueba" />
|
|
140
|
+ <SubMenuItem selected={selectedIndex} index={6} change={handleListItemClick} title="Listado de pruebas" />
|
|
141
|
+ <SubMenuItem selected={selectedIndex} index={7} change={handleListItemClick} title="Aplicar" />
|
|
142
|
+ <SubMenuItem selected={selectedIndex} index={8} change={handleListItemClick} title="Respuestas" />
|
|
143
|
+ <SubMenuItem selected={selectedIndex} index={9} change={handleListItemClick} title="Calificaciones" />
|
|
144
|
+
|
|
145
|
+ </List>
|
|
146
|
+ </Collapse>
|
|
147
|
+
|
|
148
|
+ <Item icon={<MiscellaneousServicesIcon/>} selected={selectedIndex} change={handleListItemClick} index={10} title="Configuraciones" route="/configuraciones" />
|
|
149
|
+ <Item icon={<HistoryIcon/>} selected={selectedIndex} change={handleListItemClick} index={11} title="Historial" route="/historial" />
|
89
|
150
|
</List>
|
90
|
151
|
)
|
91
|
152
|
};
|