浏览代码

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,6 +280,9 @@
280 280
     max-height: 500px;
281 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,7 +12,7 @@ export function TestCard(props) {
12 12
     console.log("TEST :: ", test)
13 13
 
14 14
     return (
15
-        <Card sx={{ maxWidth: 500, maxHeight : 500 }}>
15
+        <Card className="card_test" elevation={0} sx={{ maxWidth: 500, maxHeight : 500 }}>
16 16
             <CardActionArea>
17 17
                 <CardMedia
18 18
                     component="img"

+ 6 - 9
src/Pages/HomeUser.jsx

@@ -11,6 +11,7 @@ export function HomeUser(){
11 11
     const auth = useAuth();
12 12
     const token = useRef(auth.getToken());
13 13
     const [tests, setTests] = useState([]);
14
+    const [password, setPasword] = useState({});
14 15
 
15 16
     useEffect(() => {
16 17
 
@@ -19,8 +20,10 @@ export function HomeUser(){
19 20
         rest
20 21
         .get(token.current)
21 22
             .then(({ data }) => {
22
-                console.log("data >>> ", data)
23
+                console.log("DATA -> ",data)
23 24
                 setTests(data.tests)
25
+                delete data.tests
26
+                setPasword(data);
24 27
             })
25 28
             .catch(erro => {
26 29
                 console.error("ERR : ", erro)
@@ -38,14 +41,11 @@ export function HomeUser(){
38 41
                         </h2>
39 42
                         <h3>Instrucciones Generales</h3>
40 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 46
                         </Typography>
46
-
47 47
                         <Divider style={{margin : 5}}/>
48
-
48
+                        <h5>Pruebas para {password.nombrepuesto}</h5>
49 49
                         <div className="test_list" style={{ marginTop :15 }}> 
50 50
                             {
51 51
                             tests.map( test => {
@@ -55,9 +55,6 @@ export function HomeUser(){
55 55
                             })
56 56
                             }
57 57
                         </div>
58
-
59
-
60
-
61 58
                     </Paper>
62 59
                     <Button  onClick={auth.logout}>Salir</Button>
63 60
                 </Box>