Kaynağa Gözat

list all tests

amenpunk 3 yıl önce
ebeveyn
işleme
e88d529c10

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

@@ -133,7 +133,8 @@ export const MainListItems = (props) =>  {
133 133
                 setOpen(true)
134 134
             }
135 135
         }
136
-    },[props, selectedIndex])
136
+    // },[props, selectedIndex])
137
+    })
137 138
 
138 139
 
139 140
     return(

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

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

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

@@ -1,5 +1,4 @@
1
-import React, { useEffect, useState, useRef } from 'react'
2
-import $ from 'jquery'
1
+import React, { useState, useRef } from 'react'
3 2
 import { Row, Col } from 'react-bootstrap'
4 3
 
5 4
 import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
@@ -62,29 +61,20 @@ export function Pruebas() {
62 61
 
63 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 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 68
     return (
79 69
         <section>
80 70
             <div className="content-section">
81 71
                 <div className="main main_pruebas_list">
82 72
                     <h1>Listado de pruebas psicométricas</h1>
83
-
73
+                    {/* <Row style={{ display : 'flex', alignItems: 'baseline' }}> */}
84 74
                     <Row>
85
-                        <Col md='9' className="busqueda_prueba">
75
+                        <Col sm='6' md='8' className="busqueda_prueba">
86 76
                             <Row>
87
-                                <Col md="8">
77
+                                <Col style={{  padding : 0, margin : 0 }} xs='6' sm='6' md="8">
88 78
                                     <input 
89 79
                                         onChange={(event) => {
90 80
                                             let nombre = event.target.value
@@ -94,29 +84,27 @@ export function Pruebas() {
94 84
                                                     return isset
95 85
                                                 })
96 86
                                                 setPruebas(temp)
97
-                                                setNombre(nombre)
98 87
                                             }else{
99 88
                                                 setPruebas(all)
100
-                                                setNombre(nombre)
101 89
                                             }
102 90
                                         }} 
103 91
                                         type="text" 
104 92
                                         name="nombreprueba" 
105 93
                                         placeholder="Escribe el nombre de la prueba que deseas consultar"/>
106 94
                                 </Col>
107
-                                <Col md="4">
95
+                                <Col style={{ paddinRight : 0 }} xs='6' sm='6' md="4">
108 96
                                     <div className="buscar_prueba">
109 97
                                         <button className="btn_buscar_prueba">BUSCAR</button>
110 98
                                     </div>
111 99
                                 </Col>
112 100
                             </Row>
113 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 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 108
                             </div>
121 109
                         </Col>
122 110
                     </Row>