浏览代码

dashboard test user

amenpunk 2 年之前
父节点
当前提交
b772968dd7
共有 3 个文件被更改,包括 10 次插入10 次删除
  1. 3 0
      src/App.css
  2. 1 1
      src/Components/HomeUser/TestCard.jsx
  3. 6 9
      src/Pages/HomeUser.jsx

+ 3 - 0
src/App.css

280
     max-height: 500px;
280
     max-height: 500px;
281
     display : flex;
281
     display : flex;
282
 }
282
 }
283
+.card_test{
284
+    padding : 15px;
285
+}
283
 
286
 
284
 
287
 
285
 
288
 

+ 1 - 1
src/Components/HomeUser/TestCard.jsx

12
     console.log("TEST :: ", test)
12
     console.log("TEST :: ", test)
13
 
13
 
14
     return (
14
     return (
15
-        <Card sx={{ maxWidth: 500, maxHeight : 500 }}>
15
+        <Card className="card_test" elevation={0} sx={{ maxWidth: 500, maxHeight : 500 }}>
16
             <CardActionArea>
16
             <CardActionArea>
17
                 <CardMedia
17
                 <CardMedia
18
                     component="img"
18
                     component="img"

+ 6 - 9
src/Pages/HomeUser.jsx

11
     const auth = useAuth();
11
     const auth = useAuth();
12
     const token = useRef(auth.getToken());
12
     const token = useRef(auth.getToken());
13
     const [tests, setTests] = useState([]);
13
     const [tests, setTests] = useState([]);
14
+    const [password, setPasword] = useState({});
14
 
15
 
15
     useEffect(() => {
16
     useEffect(() => {
16
 
17
 
19
         rest
20
         rest
20
         .get(token.current)
21
         .get(token.current)
21
             .then(({ data }) => {
22
             .then(({ data }) => {
22
-                console.log("data >>> ", data)
23
+                console.log("DATA -> ",data)
23
                 setTests(data.tests)
24
                 setTests(data.tests)
25
+                delete data.tests
26
+                setPasword(data);
24
             })
27
             })
25
             .catch(erro => {
28
             .catch(erro => {
26
                 console.error("ERR : ", erro)
29
                 console.error("ERR : ", erro)
38
                         </h2>
41
                         </h2>
39
                         <h3>Instrucciones Generales</h3>
42
                         <h3>Instrucciones Generales</h3>
40
                         <Typography>
43
                         <Typography>
41
-                             Bienvenido, el sistema tiene como objetivo evaluar diferentes caracteristicas como  medir y cuantificar los procesos cognoscitivos de la mente humana.
42
-
43
-                            Parar resolver las pruebas que estan asignadas te recomendamos busques un lugar apropiado ya que necesitaras  en promedio 2 horas libre y es importante que se tenga el 100% de tu concentracion.
44
 
44
 
45
+Bienvenido, el sistema tiene como objetivo evaluar diferentes características como medir y cuantificar los procesos cognoscitivos de la mente humana. Parar resolver las pruebas que están asignadas te recomendamos busques un lugar apropiado, ya que necesitaras en promedio 2 horas libre y es importante que se tenga el 100% de tu concentración.
45
                         </Typography>
46
                         </Typography>
46
-
47
                         <Divider style={{margin : 5}}/>
47
                         <Divider style={{margin : 5}}/>
48
-
48
+                        <h5>Pruebas para {password.nombrepuesto}</h5>
49
                         <div className="test_list" style={{ marginTop :15 }}> 
49
                         <div className="test_list" style={{ marginTop :15 }}> 
50
                             {
50
                             {
51
                             tests.map( test => {
51
                             tests.map( test => {
55
                             })
55
                             })
56
                             }
56
                             }
57
                         </div>
57
                         </div>
58
-
59
-
60
-
61
                     </Paper>
58
                     </Paper>
62
                     <Button  onClick={auth.logout}>Salir</Button>
59
                     <Button  onClick={auth.logout}>Salir</Button>
63
                 </Box>
60
                 </Box>