Browse Source

some styles componentes

amenpunk 2 years ago
parent
commit
0f93c18258

+ 1 - 0
src/App.css

416
   color:white !important;
416
   color:white !important;
417
   background:var(--main) !important;
417
   background:var(--main) !important;
418
 }
418
 }
419
+
419
 .headert_pwdu{
420
 .headert_pwdu{
420
   background:var(--main);
421
   background:var(--main);
421
   color:white !important;
422
   color:white !important;

+ 1 - 1
src/App.js

12
 const queryClient = new QueryClient({
12
 const queryClient = new QueryClient({
13
   defaultOptions: {
13
   defaultOptions: {
14
     queries: {
14
     queries: {
15
-      refetchOnWindowFocus: false,
15
+      refetchOnWindowFocus: true,
16
     },
16
     },
17
   },
17
   },
18
 })
18
 })

+ 101 - 68
src/Components/Dashboard.js

2
 import { ThemeProvider, styled, createTheme } from '@mui/material/styles';
2
 import { ThemeProvider, styled, createTheme } from '@mui/material/styles';
3
 
3
 
4
 import {
4
 import {
5
-    Container, IconButton, Divider,
5
+  Container, IconButton, Divider,
6
-    Typography, List, Toolbar,useMediaQuery as Size,
6
+  Typography, List, Toolbar, useMediaQuery as Size,
7
-    Box, Badge, Menu, Avatar, MenuItem
7
+  Box, Badge, Menu, Avatar, MenuItem
8
 } from '@mui/material'
8
 } from '@mui/material'
9
 
9
 
10
 import {
10
 import {
11
-    Fullscreen as FullscreenIcon,
11
+  Fullscreen as FullscreenIcon,
12
-    Menu as MenuIcon,
12
+  Menu as MenuIcon,
13
-    KeyboardDoubleArrowLeft as LeftKey,
13
+  KeyboardDoubleArrowLeft as LeftKey,
14
-    Notifications as NotificationsIcon,
14
+  Notifications as NotificationsIcon,
15
 } from '@mui/icons-material'
15
 } from '@mui/icons-material'
16
 
16
 
17
 import Logo from '../Images/evaluacion.jpeg';
17
 import Logo from '../Images/evaluacion.jpeg';
23
 import { Drawer as MuiDrawer, AppBar as MuiAppBar } from "../Components/Navigation/AppBar"
23
 import { Drawer as MuiDrawer, AppBar as MuiAppBar } from "../Components/Navigation/AppBar"
24
 import { MainListItems, SecondaryListItems } from '../Components/Navigation/listItems';
24
 import { MainListItems, SecondaryListItems } from '../Components/Navigation/listItems';
25
 import ProfilePicture from '../Images/man.png';
25
 import ProfilePicture from '../Images/man.png';
26
-import { useDispatch } from 'react-redux';
26
+import { useDispatch, useSelector } from 'react-redux';
27
 import { removeToken } from '../Slices/tokenSlice';
27
 import { removeToken } from '../Slices/tokenSlice';
28
 
28
 
29
 const drawerWidth = 240;
29
 const drawerWidth = 240;
30
 const mdTheme = createTheme();
30
 const mdTheme = createTheme();
31
 
31
 
32
+function stringToColor(string) {
33
+  let hash = 0;
34
+  let i;
35
+  /* eslint-disable no-bitwise */
36
+  for (i = 0; i < string.length; i += 1) {
37
+    hash = string.charCodeAt(i) + ((hash << 5) - hash);
38
+  }
39
+
40
+  let color = '#';
41
+
42
+  for (i = 0; i < 3; i += 1) {
43
+    const value = (hash >> (i * 8)) & 0xff;
44
+    color += `00${value.toString(16)}`.slice(-2);
45
+  }
46
+  /* eslint-enable no-bitwise */
47
+  return color;
48
+}
49
+
50
+
51
+function stringAvatar(name) {
52
+  console.log("NAME: ", name)
53
+  return {
54
+    sx: {
55
+      bgcolor: stringToColor(name),
56
+    },
57
+    children: `${name.split(' ')[0][0]}${name.split(' ')[1][0]}`,
58
+  };
59
+}
60
+
32
 const AppBar = styled(MuiAppBar, {
61
 const AppBar = styled(MuiAppBar, {
33
-    shouldForwardProp: (prop) => prop !== 'open',
62
+  shouldForwardProp: (prop) => prop !== 'open',
34
 })(({ theme, open }) => ({
63
 })(({ theme, open }) => ({
35
-    zIndex: theme.zIndex.drawer + 1,
64
+  zIndex: theme.zIndex.drawer + 1,
65
+  transition: theme.transitions.create(['width', 'margin'], {
66
+    easing: theme.transitions.easing.sharp,
67
+    duration: theme.transitions.duration.leavingScreen,
68
+  }),
69
+  ...(open && {
70
+    marginLeft: drawerWidth,
71
+    width: `calc(100% - ${drawerWidth}px)`,
36
     transition: theme.transitions.create(['width', 'margin'], {
72
     transition: theme.transitions.create(['width', 'margin'], {
37
-        easing: theme.transitions.easing.sharp,
73
+      easing: theme.transitions.easing.sharp,
38
-        duration: theme.transitions.duration.leavingScreen,
74
+      duration: theme.transitions.duration.enteringScreen,
39
-    }),
40
-    ...(open && {
41
-        marginLeft: drawerWidth,
42
-        width: `calc(100% - ${drawerWidth}px)`,
43
-        transition: theme.transitions.create(['width', 'margin'], {
44
-            easing: theme.transitions.easing.sharp,
45
-            duration: theme.transitions.duration.enteringScreen,
46
-        }),
47
     }),
75
     }),
76
+  }),
48
 }));
77
 }));
49
 
78
 
50
 
79
 
51
-const Drawer = styled(MuiDrawer, 
80
+const Drawer = styled(MuiDrawer,
52
-    { shouldForwardProp: (prop) => prop !== 'open' })(
81
+  { shouldForwardProp: (prop) => prop !== 'open' })(
53
     ({ theme, open }) => ({
82
     ({ theme, open }) => ({
54
-        '& .MuiDrawer-paper': {
83
+      '& .MuiDrawer-paper': {
55
-            position: 'relative',
84
+        position: 'relative',
56
-            whiteSpace: 'nowrap',
85
+        whiteSpace: 'nowrap',
57
-            width: drawerWidth,
86
+        width: drawerWidth,
58
-            transition: theme.transitions.create('width', {
87
+        transition: theme.transitions.create('width', {
59
-                easing: theme.transitions.easing.sharp,
88
+          easing: theme.transitions.easing.sharp,
60
-                duration: theme.transitions.duration.enteringScreen,
89
+          duration: theme.transitions.duration.enteringScreen,
61
-            }),
90
+        }),
62
-            boxSizing: 'border-box',
91
+        boxSizing: 'border-box',
63
-            ...(!open && {
92
+        ...(!open && {
64
-                overflowX: 'hidden',
93
+          overflowX: 'hidden',
65
-                transition: theme.transitions.create('width', {
94
+          transition: theme.transitions.create('width', {
66
-                    easing: theme.transitions.easing.sharp,
95
+            easing: theme.transitions.easing.sharp,
67
-                    duration: theme.transitions.duration.leavingScreen,
96
+            duration: theme.transitions.duration.leavingScreen,
68
-                }),
97
+          }),
69
-                width: theme.spacing(7),
98
+          width: theme.spacing(7),
70
-                [theme.breakpoints.up('sm')]: {
99
+          [theme.breakpoints.up('sm')]: {
71
-                    width: theme.spacing(9),
100
+            width: theme.spacing(9),
72
-                },
101
+          },
73
-            }),
102
+        }),
74
-        },
103
+      },
75
     }),
104
     }),
76
-);
105
+  );
77
 
106
 
78
 
107
 
79
 function DashboardContent() {
108
 function DashboardContent() {
83
   const isMovil = Size('(max-width:1000px)');
112
   const isMovil = Size('(max-width:1000px)');
84
   const dispatch = useDispatch();
113
   const dispatch = useDispatch();
85
   const navigate = useNavigate()
114
   const navigate = useNavigate()
115
+  const profile = useSelector((state) => state.recluter.info)
116
+  console.log('PROFILE: ', profile)
86
 
117
 
87
   const CerrarSession = () => {
118
   const CerrarSession = () => {
119
+    //TODO:
120
+    //remove all status
88
     dispatch(removeToken())
121
     dispatch(removeToken())
89
     navigate('/')
122
     navigate('/')
90
   }
123
   }
91
 
124
 
92
   const [anchorEl, setAnchorEl] = React.useState(null);
125
   const [anchorEl, setAnchorEl] = React.useState(null);
93
   const open_profile = Boolean(anchorEl);
126
   const open_profile = Boolean(anchorEl);
94
-  const handleClick = (event) =>  setAnchorEl(event.currentTarget);
127
+  const handleClick = (event) => setAnchorEl(event.currentTarget);
95
   const handleClose = () => setAnchorEl(null)
128
   const handleClose = () => setAnchorEl(null)
96
   const toggleDrawer = () => {
129
   const toggleDrawer = () => {
97
-    if(isMovil){
130
+    if (isMovil) {
98
       setAnchorElMov(!anchorElMovil)
131
       setAnchorElMov(!anchorElMovil)
99
-    }else{
132
+    } else {
100
       setOpen(!open);
133
       setOpen(!open);
101
     }
134
     }
102
   }
135
   }
103
   const [anchorElMovil, setAnchorElMov] = React.useState(false);
136
   const [anchorElMovil, setAnchorElMov] = React.useState(false);
104
-  React.useEffect(() => isMovil ? setOpen(false) : null , [isMovil])
137
+  React.useEffect(() => isMovil ? setOpen(false) : null, [isMovil])
105
 
138
 
106
   return (
139
   return (
107
     <ThemeProvider theme={mdTheme}>
140
     <ThemeProvider theme={mdTheme}>
114
               edge="start"
147
               edge="start"
115
               color="inherit"
148
               color="inherit"
116
               aria-label="open drawer"
149
               aria-label="open drawer"
117
-              // onClick={isMovil ? MenuResponsive : toggleDrawer}
118
               onClick={toggleDrawer}
150
               onClick={toggleDrawer}
119
-              sx={{ marginRight: '36px', ...( open && { display: 'none' }), }} >
151
+              sx={{ marginRight: '36px', ...(open && { display: 'none' }), }} >
120
               <MenuIcon style={{
152
               <MenuIcon style={{
121
                 background: '#ec5e69',
153
                 background: '#ec5e69',
122
                 fontSize: "40",
154
                 fontSize: "40",
125
             </IconButton>
157
             </IconButton>
126
             <Typography component="h1" variant="h6" color="inherit" noWrap sx={{ flexGrow: 1 }} >
158
             <Typography component="h1" variant="h6" color="inherit" noWrap sx={{ flexGrow: 1 }} >
127
               {
159
               {
128
-              open ? (
160
+                open ? (
129
-                <React.Fragment>
161
+                  <React.Fragment>
130
-
162
+
131
-                  <IconButton onClick={toggleDrawer}>
163
+                    <IconButton onClick={toggleDrawer}>
132
-                    <LeftKey/>
164
+                      <LeftKey />
133
-                  </IconButton>
165
+                    </IconButton>
134
-
166
+
135
-                  <IconButton onClick={(event) => event.target.requestFullscreen()}>
167
+                    <IconButton onClick={(event) => event.target.requestFullscreen()}>
136
-                    <FullscreenIcon style={{ paddinLeft: 15 }} />
168
+                      <FullscreenIcon style={{ paddinLeft: 15 }} />
137
-                  </IconButton>
169
+                    </IconButton>
138
-                </React.Fragment>
170
+                  </React.Fragment>
139
-              ) : undefined
171
+                ) : undefined
140
-            }
172
+              }
141
             </Typography>
173
             </Typography>
142
 
174
 
143
             <Box sx={{ display: { xs: 'none', md: 'flex' } }}>
175
             <Box sx={{ display: { xs: 'none', md: 'flex' } }}>
146
                 size="large"
178
                 size="large"
147
                 aria-label="show 17 new notifications"
179
                 aria-label="show 17 new notifications"
148
                 color="inherit">
180
                 color="inherit">
149
-                <Badge badgeContent={17} color="error">
181
+                <Badge badgeContent={1} color="error">
150
-                  <NotificationsIcon style={{ color : '#212529' }}/>
182
+                  <NotificationsIcon style={{ color: '#212529' }} />
151
                 </Badge>
183
                 </Badge>
152
               </IconButton>
184
               </IconButton>
153
 
185
 
161
                 onClick={handleClick}
193
                 onClick={handleClick}
162
                 color="inherit"
194
                 color="inherit"
163
               >
195
               >
164
-                <Avatar alt="Cindy Baker" src={ProfilePicture} />
196
+                {/* <Avatar alt="Cindy Baker" src={ProfilePicture} /> */ }
197
+                <Avatar {...stringAvatar(`${profile.nombre} ${profile.apelidos}`)} />
165
 
198
 
166
               </IconButton>
199
               </IconButton>
167
               <Menu
200
               <Menu
170
                 open={open_profile}
203
                 open={open_profile}
171
                 onClose={handleClose}
204
                 onClose={handleClose}
172
                 MenuListProps={{ 'aria-labelledby': 'basic-button', }}>
205
                 MenuListProps={{ 'aria-labelledby': 'basic-button', }}>
173
-                <MenuItem onClick={() => navigate('/dashboard/configuraciones') }>Perfil</MenuItem>
206
+                <MenuItem onClick={() => navigate('/dashboard/configuraciones')}>Perfil</MenuItem>
174
                 <MenuItem onClick={CerrarSession}>Cerrar Sesion</MenuItem>
207
                 <MenuItem onClick={CerrarSession}>Cerrar Sesion</MenuItem>
175
               </Menu>
208
               </Menu>
176
             </Box>
209
             </Box>
211
 }
244
 }
212
 
245
 
213
 export function Dashboard() {
246
 export function Dashboard() {
214
-    return <DashboardContent />;
247
+  return <DashboardContent />;
215
 }
248
 }
216
 
249
 

+ 6 - 11
src/Components/Home/Candidato.jsx

24
   let navigate = useNavigate()
24
   let navigate = useNavigate()
25
   let auth = useSelector((state) => state.token)
25
   let auth = useSelector((state) => state.token)
26
 
26
 
27
-  console.log(props)
28
   const calificar = () => {
27
   const calificar = () => {
29
-    console.log('TOKEN: ',auth.token)
30
     let rest = new Service(`/prueba/calificacion/cleaver/report/${props.pwd}`);
28
     let rest = new Service(`/prueba/calificacion/cleaver/report/${props.pwd}`);
31
 
29
 
32
     rest
30
     rest
33
       .getQuery(auth.token)
31
       .getQuery(auth.token)
34
       .then(r => {
32
       .then(r => {
35
-        console.log("SUCCESS:", r)
36
         navigate('/dashboard/resultados/' + props.pwd)
33
         navigate('/dashboard/resultados/' + props.pwd)
37
       })
34
       })
38
       .catch(e => {
35
       .catch(e => {
39
-        console.log("ERROR:", e.message)
40
         // navigate('/dashboard/resultados/' + props.pwd)
36
         // navigate('/dashboard/resultados/' + props.pwd)
41
       })
37
       })
42
   }
38
   }
51
             // navigate('/dashboard/resultados/' + props.pwd)
47
             // navigate('/dashboard/resultados/' + props.pwd)
52
           }
48
           }
53
         }}
49
         }}
54
-        style={{ color: '#0bd641' }}
50
+        style={{ color: props.color }}
55
         components="label">
51
         components="label">
56
         {<props.icon />}
52
         {<props.icon />}
57
       </IconButton>
53
       </IconButton>
67
   // Patrik: 1 -> Solo esta asignado.
63
   // Patrik: 1 -> Solo esta asignado.
68
   switch (estado) {
64
   switch (estado) {
69
     case 1: // solo asignado
65
     case 1: // solo asignado
70
-      return <IconStatus icon={AddTaskIcon} message="Candidato Asignado" />
66
+      return <IconStatus color="#0bd641" icon={AddTaskIcon} message="Candidato Asignado" />
71
     case 97: //error en las respuestas
67
     case 97: //error en las respuestas
72
-      return <IconStatus icon={ErrorIcon} message="Hay error en las respuestas" />
68
+      return <IconStatus color="var(--main)"  icon={ErrorIcon} message="Hay error en las respuestas" />
73
     case 99: // el candidato se encuentra realizndolo
69
     case 99: // el candidato se encuentra realizndolo
74
-      return <IconStatus icon={AssignmentTurnedInIcon} message="El candidato se encuentra realizando la prueba" />
70
+      return <IconStatus color="#f5f511" icon={AssignmentTurnedInIcon} message="El candidato se encuentra realizando la prueba" />
75
     case 100: // finalizado
71
     case 100: // finalizado
76
-      return <IconStatus estado={100} icon={CheckBoxIcon} message="Calificar el examen" pwd={SuperPWD} />
72
+      return <IconStatus color="#0bd641" estado={100} icon={CheckBoxIcon} message="Calificar el examen" pwd={SuperPWD} />
77
     default: return null
73
     default: return null
78
   }
74
   }
79
 }
75
 }
80
 
76
 
81
 function Asignaciones(props) {
77
 function Asignaciones(props) {
82
 
78
 
83
-  let { estado, cattest, calificacionescleaver: test_result, id: SuperPWD } = props.asign;
79
+  let { estado, cattest, id: SuperPWD } = props.asign;
84
-  console.log(props, test_result, SuperPWD)
85
 
80
 
86
   return (
81
   return (
87
     <tr>
82
     <tr>

+ 91 - 87
src/Components/Navigation/listItems.js

3
 
3
 
4
 import { Fingerprint, ExpandLess, ExpandMore } from '@mui/icons-material/'
4
 import { Fingerprint, ExpandLess, ExpandMore } from '@mui/icons-material/'
5
 import { useNavigate, useResolvedPath, useMatch } from 'react-router-dom'
5
 import { useNavigate, useResolvedPath, useMatch } from 'react-router-dom'
6
-import { Collapse,ListItem, List ,ListItemIcon,ListItemText,ListSubheader } from '@mui/material/'
6
+import { Collapse, ListItem, List, ListItemIcon, ListItemText, ListSubheader } from '@mui/material/'
7
 
7
 
8
-import { 
8
+import {
9
-    MainItems, ExtraItems, PruebaItems, TxTStyle,
9
+  MainItems, ExtraItems, PruebaItems, TxTStyle,
10
-    UserItems
10
+  UserItems
11
 } from '../../Utils/MenuItems'
11
 } from '../../Utils/MenuItems'
12
 
12
 
13
 
13
 
14
-function NavItem (props) {
14
+function NavItem(props) {
15
-    
15
+
16
-    let navigate = useNavigate()
16
+  let navigate = useNavigate()
17
-    let resolved = useResolvedPath(props.route);
17
+  let resolved = useResolvedPath(props.route);
18
-    let match = useMatch({ path: resolved.pathname, end: true });
18
+  let match = useMatch({ path: resolved.pathname, end: true });
19
+
20
+  let { title, route, icon, open, AppBarVisible, setOpen } = props
21
+
22
+  if (route.startsWith('prueba') && match && open && !AppBarVisible) {
23
+    setOpen(false);
24
+  }
25
+
26
+  return (
27
+    <ListItem
28
+      sx={{ color: '#25344f' }}
29
+      selected={match && typeof (match) === "object"}
30
+      onClick={() => navigate(route)}
31
+      button >
32
+      <ListItemIcon>
33
+        {icon && icon}
34
+      </ListItemIcon>
35
+      <ListItemText
36
+        sx={TxTStyle}
37
+        primary={title}
38
+      />
39
+    </ListItem>
40
+  )
41
+}
19
 
42
 
20
-    let { title, route, icon, open, AppBarVisible, setOpen } = props
21
 
43
 
22
-    if(route.startsWith('prueba') && match && open && !AppBarVisible ){
44
+export const MainListItems = (props) => {
23
-        setOpen(false);
24
-    }
25
 
45
 
26
-    return(
46
+  const [open, setOpen] = React.useState(false);
27
-        <ListItem
28
-            sx={{ color : '#25344f'}}
29
-            selected={ match && typeof(match) === "object" }
30
-            onClick={() => navigate(route) } 
31
-            button >
32
-            <ListItemIcon>
33
-                {icon && icon}
34
-            </ListItemIcon>
35
-            <ListItemText 
36
-                sx={TxTStyle}
37
-                primary={title} 
38
-            />
39
-        </ListItem>
40
-    )
41
-}
42
 
47
 
48
+  const showPruebas = () => {
49
+    if (!props.AppBarVisible) {
50
+      props.setAppBarVisible(true);
51
+    }
52
+    setOpen(!open);
53
+  };
54
+
55
+  return (
56
+    <List>
57
+      <ListSubheader inset>MENÚ</ListSubheader>
58
+      {
59
+        MainItems.map(({ icon, title, route }, i) => (
60
+          <NavItem key={i} icon={icon} title={title} route={route} />
61
+        ))
62
+      }
63
+
64
+      {/*
65
+        <ListItem selected={open} onClick={showPruebas}>
66
+          <ListItemIcon>
67
+            <Fingerprint />
68
+          </ListItemIcon>
69
+          <ListItemText
70
+            sx={TxTStyle}
71
+            primary="Pruebas"
72
+          />
73
+          {open ? <ExpandLess /> : <ExpandMore />}
74
+        </ListItem>
43
 
75
 
44
-export const MainListItems = (props) =>  {
76
+          <Collapse in={open} timeout="auto" unmountOnExit>
45
-
77
+            <List component="div" disablePadding>
46
-    const [open, setOpen] = React.useState(false);
78
+              {
47
-
79
+                PruebaItems.map(({ route, title }, i) =>
48
-    const showPruebas = () => {
80
+                  (<NavItem key={i} setOpen={setOpen} {...props} open={open} route={route} title={title} />)
49
-        if(!props.AppBarVisible){
81
+                )
50
-            props.setAppBarVisible(true);
82
+              }
51
-        }
83
+            </List>
52
-        setOpen(!open);
53
-    };
54
-
55
-    return(
56
-        <List>
57
-            <ListSubheader inset>MENÚ</ListSubheader>
58
-            {
59
-                MainItems.map( ({ icon, title, route}, i) =>  (
60
-                    <NavItem key={i} icon={icon} title={title} route={route} />
61
-                ))
62
-            }
63
-            <ListItem selected={open} onClick={showPruebas}>
64
-                <ListItemIcon>
65
-                    <Fingerprint />
66
-                </ListItemIcon>
67
-                <ListItemText 
68
-                    sx={TxTStyle}
69
-                    primary="Pruebas" 
70
-                />
71
-                {open ? <ExpandLess /> : <ExpandMore />}
72
-            </ListItem>
73
-            <Collapse in={open} timeout="auto" unmountOnExit>
74
-                <List component="div" disablePadding>
75
-                    {
76
-                        PruebaItems.map( ({ route, title},i) => 
77
-                            ( <NavItem key={i} setOpen={setOpen} { ...props} open={open} route={route} title={title} />)
78
-                        )
79
-                    }
80
-                </List>
81
             </Collapse>
84
             </Collapse>
85
+      */}
82
 
86
 
83
-        </List>
87
+    </List>
84
-    )
88
+  )
85
 };
89
 };
86
 
90
 
87
-export const UserListItems = (_props) =>  {
91
+export const UserListItems = (_props) => {
88
-    return(
92
+  return (
89
-        <List>
93
+    <List>
90
-            <ListSubheader inset>MENÚ</ListSubheader>
94
+      <ListSubheader inset>MENÚ</ListSubheader>
91
-            {
95
+      {
92
-                UserItems.map( ({ icon, title, route}, i) =>  (
96
+        UserItems.map(({ icon, title, route }, i) => (
93
-                    <NavItem key={i} icon={icon} title={title} route={route} />
97
+          <NavItem key={i} icon={icon} title={title} route={route} />
94
-                ))
98
+        ))
95
-            }
99
+      }
96
-        </List>
100
+    </List>
97
-    )
101
+  )
98
 };
102
 };
99
 
103
 
100
 export const SecondaryListItems = (
104
 export const SecondaryListItems = (
101
-    <Nav>
105
+  <Nav>
102
-        <ListSubheader inset>EXTRAS</ListSubheader>
106
+    <ListSubheader inset>EXTRAS</ListSubheader>
103
-        {
107
+    {
104
-            ExtraItems.map( ({ icon, route, title}) => 
108
+      ExtraItems.map(({ icon, route, title }) =>
105
-                ( <NavItem key={route} icon={icon} title={title} route={route} />)
109
+        (<NavItem key={route} icon={icon} title={title} route={route} />)
106
-            )
110
+      )
107
-        }
111
+    }
108
-    </Nav>
112
+  </Nav>
109
 );
113
 );
110
 
114
 

+ 4 - 0
src/Components/Routes.js

23
 import { HomeUser } from '../Pages/HomeUser'
23
 import { HomeUser } from '../Pages/HomeUser'
24
 import { Prueba } from '../Pages/Prueba.jsx'
24
 import { Prueba } from '../Pages/Prueba.jsx'
25
 import { RequireToken, RequireUserToken } from '../Components/PrivateRoute'
25
 import { RequireToken, RequireUserToken } from '../Components/PrivateRoute'
26
+import { Default } from '../Pages/Default';
26
 
27
 
27
 export default function MyRoutes() {
28
 export default function MyRoutes() {
28
 
29
 
74
         <Route path="pruebas/listar" element={<Pruebas />} />
75
         <Route path="pruebas/listar" element={<Pruebas />} />
75
         <Route path="pruebas/crear" element={<PruebaNueva />} />
76
         <Route path="pruebas/crear" element={<PruebaNueva />} />
76
         <Route path="pruebas/aplicar" element={<PruebaAsignar />} />
77
         <Route path="pruebas/aplicar" element={<PruebaAsignar />} />
78
+        <Route path="default" element={<Default />} />
79
+        <Route path="default2" element={<Default />} />
80
+
77
       </Route>
81
       </Route>
78
       <Route path="*" element={<NotFound />} />
82
       <Route path="*" element={<NotFound />} />
79
 
83
 

+ 18 - 0
src/Pages/Default.jsx

1
+import { Row, Container } from 'react-bootstrap'
2
+
3
+export function Default() {
4
+
5
+  return (
6
+
7
+    <section>
8
+      <div className="content-section">
9
+        <div className="main">
10
+          <Container >
11
+            <Row style={{ display: 'flex', flexWrap: 'wrap', justifyContent: "center" }}></Row>
12
+          </Container>
13
+        </div>
14
+      </div>
15
+    </section>
16
+  )
17
+
18
+}

+ 7 - 7
src/Utils/MenuItems.js

65
 ]
65
 ]
66
 
66
 
67
 export const ExtraItems = [
67
 export const ExtraItems = [
68
-  {
68
+  // {
69
-    icon: <Star />,
69
+  //   icon: <Star />,
70
-    route: 'elementos',
70
+  //   route: 'elementos',
71
-    title: 'Elementos'
71
+  //   title: 'Elementos'
72
-  },
72
+  // },
73
   {
73
   {
74
     icon: <OndemandVideo />,
74
     icon: <OndemandVideo />,
75
-    route: 'tutoriales',
75
+    route: 'default',
76
     title: 'Tutoriales'
76
     title: 'Tutoriales'
77
   },
77
   },
78
   {
78
   {
79
     icon: <SupportAgent />,
79
     icon: <SupportAgent />,
80
-    route: 'help',
80
+    route: 'default2',
81
     title: 'Asistencia Técnica'
81
     title: 'Asistencia Técnica'
82
   },
82
   },
83
 ]
83
 ]