Browse Source

list all tests

amenpunk 3 years ago
parent
commit
e88d529c10

+ 2 - 1
psicoadmin/src/Components/listItems.js

133
                 setOpen(true)
133
                 setOpen(true)
134
             }
134
             }
135
         }
135
         }
136
-    },[props, selectedIndex])
136
+    // },[props, selectedIndex])
137
+    })
137
 
138
 
138
 
139
 
139
     return(
140
     return(

+ 10 - 6
psicoadmin/src/Css/all.css

2128
     color: #949494;
2128
     color: #949494;
2129
 }
2129
 }
2130
 .crear_nueva_prueba {
2130
 .crear_nueva_prueba {
2131
-    padding: 10px 0px 10px;
2131
+    /* padding: 10px 0px 10px; */
2132
     text-align: right;
2132
     text-align: right;
2133
 }
2133
 }
2134
 .btn_crear_prueba {
2134
 .btn_crear_prueba {
2135
     border: 1px solid #fd4b4b;
2135
     border: 1px solid #fd4b4b;
2136
     color: #fff;
2136
     color: #fff;
2137
     background: #fd4b4b;
2137
     background: #fd4b4b;
2138
-    padding: 10px 55px;
2138
+    padding: 10px 20px;
2139
     font-size: 14px;
2139
     font-size: 14px;
2140
     position: relative;
2140
     position: relative;
2141
     cursor: pointer;
2141
     cursor: pointer;
3876
     transition: all 0.3s;
3876
     transition: all 0.3s;
3877
 }
3877
 }
3878
 .busqueda_prueba {
3878
 .busqueda_prueba {
3879
-    margin-bottom: 40px;
3879
+    /* margin-bottom: 40px; */
3880
 }
3880
 }
3881
 .buscar_prueba {
3881
 .buscar_prueba {
3882
     padding: 0px 0px 25px;
3882
     padding: 0px 0px 25px;
3883
     text-align: left;
3883
     text-align: left;
3884
 }
3884
 }
3885
+.crear_prueba{
3886
+    display : flex;
3887
+    justify-content: flex-end;
3888
+    margin-bottom : 15px;
3889
+}
3885
 .btn_buscar_prueba {
3890
 .btn_buscar_prueba {
3891
+    width : 100%;
3886
     border: 1px solid #fd4b4b;
3892
     border: 1px solid #fd4b4b;
3887
     color: #fff;
3893
     color: #fff;
3888
     background: #fd4b4b;
3894
     background: #fd4b4b;
3889
-    padding: 10px 55px;
3890
     font-size: 14px;
3895
     font-size: 14px;
3891
-    position: relative;
3892
     cursor: pointer;
3896
     cursor: pointer;
3893
     transition: all 0.3s;
3897
     transition: all 0.3s;
3894
-    /* margin-left: 15px; */
3898
+    height : 42px;
3895
 }
3899
 }
3896
 .btn_buscar_prueba:hover {
3900
 .btn_buscar_prueba:hover {
3897
     border: 1px solid #fd4b4b;
3901
     border: 1px solid #fd4b4b;

+ 11 - 23
psicoadmin/src/Pages/Pruebas.jsx

1
-import React, { useEffect, useState, useRef } from 'react'
2
-import $ from 'jquery'
1
+import React, { useState, useRef } from 'react'
3
 import { Row, Col } from 'react-bootstrap'
2
 import { Row, Col } from 'react-bootstrap'
4
 
3
 
5
 import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
4
 import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
62
 
61
 
63
     const all = [...inteligencia, ...comportamiento, ...personalidad]
62
     const all = [...inteligencia, ...comportamiento, ...personalidad]
64
 
63
 
65
-    
66
-    let [nombre, setNombre] = useState(null)
67
-    let [pruebas, setPruebas] = useState([])
64
+    let [pruebas, setPruebas] = useState(all)
68
 
65
 
69
     let main =  useRef(null);
66
     let main =  useRef(null);
70
     
67
     
71
-    useEffect(() => {
72
-        if(pruebas.lenght !==  all.lenght ){
73
-            console.log(main.current)
74
-        }
75
-        setPruebas(all)
76
-    },[])
77
- 
78
     return (
68
     return (
79
         <section>
69
         <section>
80
             <div className="content-section">
70
             <div className="content-section">
81
                 <div className="main main_pruebas_list">
71
                 <div className="main main_pruebas_list">
82
                     <h1>Listado de pruebas psicométricas</h1>
72
                     <h1>Listado de pruebas psicométricas</h1>
83
-
73
+                    {/* <Row style={{ display : 'flex', alignItems: 'baseline' }}> */}
84
                     <Row>
74
                     <Row>
85
-                        <Col md='9' className="busqueda_prueba">
75
+                        <Col sm='6' md='8' className="busqueda_prueba">
86
                             <Row>
76
                             <Row>
87
-                                <Col md="8">
77
+                                <Col style={{  padding : 0, margin : 0 }} xs='6' sm='6' md="8">
88
                                     <input 
78
                                     <input 
89
                                         onChange={(event) => {
79
                                         onChange={(event) => {
90
                                             let nombre = event.target.value
80
                                             let nombre = event.target.value
94
                                                     return isset
84
                                                     return isset
95
                                                 })
85
                                                 })
96
                                                 setPruebas(temp)
86
                                                 setPruebas(temp)
97
-                                                setNombre(nombre)
98
                                             }else{
87
                                             }else{
99
                                                 setPruebas(all)
88
                                                 setPruebas(all)
100
-                                                setNombre(nombre)
101
                                             }
89
                                             }
102
                                         }} 
90
                                         }} 
103
                                         type="text" 
91
                                         type="text" 
104
                                         name="nombreprueba" 
92
                                         name="nombreprueba" 
105
                                         placeholder="Escribe el nombre de la prueba que deseas consultar"/>
93
                                         placeholder="Escribe el nombre de la prueba que deseas consultar"/>
106
                                 </Col>
94
                                 </Col>
107
-                                <Col md="4">
95
+                                <Col style={{ paddinRight : 0 }} xs='6' sm='6' md="4">
108
                                     <div className="buscar_prueba">
96
                                     <div className="buscar_prueba">
109
                                         <button className="btn_buscar_prueba">BUSCAR</button>
97
                                         <button className="btn_buscar_prueba">BUSCAR</button>
110
                                     </div>
98
                                     </div>
111
                                 </Col>
99
                                 </Col>
112
                             </Row>
100
                             </Row>
113
                         </Col>
101
                         </Col>
114
-                        <Col md="3">
115
-                            <div className="crear_nueva_prueba">
116
-                                <span 
102
+                        <Col sm='12' md="4">
103
+                            <div className="crear_prueba">
104
+                                <button 
117
                                     onClick={ () =>  navigate('/dashboard/pruebas/crear') } 
105
                                     onClick={ () =>  navigate('/dashboard/pruebas/crear') } 
118
-                                    className="btn_crear_prueba">CREAR PRUEBA
119
-                                </span>
106
+                                    className="btn_buscar_prueba">CREAR PRUEBA
107
+                                </button>
120
                             </div>
108
                             </div>
121
                         </Col>
109
                         </Col>
122
                     </Row>
110
                     </Row>