|
@@ -1,4 +1,4 @@
|
|
|
-import React, { useEffect, useState } from 'react'
|
|
|
|
|
|
|
+import React, { useEffect, useState, useRef } from 'react'
|
|
|
import $ from 'jquery'
|
|
import $ from 'jquery'
|
|
|
import { Row, Col } from 'react-bootstrap'
|
|
import { Row, Col } from 'react-bootstrap'
|
|
|
|
|
|
|
@@ -54,50 +54,26 @@ export function Pruebas() {
|
|
|
|
|
|
|
|
let navigate = useNavigate()
|
|
let navigate = useNavigate()
|
|
|
|
|
|
|
|
- var inteligencia = [
|
|
|
|
|
- 'TERMAN',
|
|
|
|
|
- 'BETAIIR',
|
|
|
|
|
- 'BETAIII',
|
|
|
|
|
- 'IE',
|
|
|
|
|
- 'RAVEN',
|
|
|
|
|
- 'DOMINOS',
|
|
|
|
|
- 'WONDERLIC',
|
|
|
|
|
- 'COIR',
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ var inteligencia = [ 'TERMAN', 'BETAIIR', 'BETAIII', 'IE', 'RAVEN', 'DOMINOS', 'WONDERLIC', 'COIR', ]
|
|
|
|
|
|
|
|
- var comportamiento = [
|
|
|
|
|
- 'CLEAVER',
|
|
|
|
|
- 'ESTILO',
|
|
|
|
|
- 'VALORES',
|
|
|
|
|
- 'VALORES COMP',
|
|
|
|
|
- 'MOSS',
|
|
|
|
|
- 'KOSTICK',
|
|
|
|
|
- 'ZAVIC',
|
|
|
|
|
- 'VALPER',
|
|
|
|
|
- 'LIFO',
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ var comportamiento = [ 'CLEAVER', 'ESTILO', 'VALORES', 'VALORES COMP', 'MOSS', 'KOSTICK', 'ZAVIC', 'VALPER', 'LIFO', ]
|
|
|
|
|
|
|
|
- var personalidad = [
|
|
|
|
|
- 'LUSCHER',
|
|
|
|
|
- 'CPI',
|
|
|
|
|
- 'PGV',
|
|
|
|
|
- 'BFQ',
|
|
|
|
|
- '16FP',
|
|
|
|
|
- 'PIP',
|
|
|
|
|
- 'IMP',
|
|
|
|
|
- 'PVC',
|
|
|
|
|
- 'NIC',
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ var personalidad = [ 'LUSCHER', 'CPI', 'PGV', 'BFQ', '16FP', 'PIP', 'IMP', 'PVC', 'NIC', ]
|
|
|
|
|
|
|
|
const all = [...inteligencia, ...comportamiento, ...personalidad]
|
|
const all = [...inteligencia, ...comportamiento, ...personalidad]
|
|
|
|
|
|
|
|
- useEffect(() => {
|
|
|
|
|
- setPruebas(all)
|
|
|
|
|
- console.log('Pruebas >> ',pruebas)
|
|
|
|
|
- },[])
|
|
|
|
|
|
|
|
|
|
let [nombre, setNombre] = useState(null)
|
|
let [nombre, setNombre] = useState(null)
|
|
|
let [pruebas, setPruebas] = useState([])
|
|
let [pruebas, setPruebas] = useState([])
|
|
|
|
|
+
|
|
|
|
|
+ let main = useRef(null);
|
|
|
|
|
+
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ if(pruebas.lenght !== all.lenght ){
|
|
|
|
|
+ console.log(main.current)
|
|
|
|
|
+ }
|
|
|
|
|
+ setPruebas(all)
|
|
|
|
|
+ },[])
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<section>
|
|
<section>
|
|
@@ -105,22 +81,18 @@ export function Pruebas() {
|
|
|
<div className="main main_pruebas_list">
|
|
<div className="main main_pruebas_list">
|
|
|
<h1>Listado de pruebas psicométricas</h1>
|
|
<h1>Listado de pruebas psicométricas</h1>
|
|
|
|
|
|
|
|
- <div className="row">
|
|
|
|
|
- <Col md='6' className="busqueda_prueba">
|
|
|
|
|
|
|
+ <Row>
|
|
|
|
|
+ <Col md='9' className="busqueda_prueba">
|
|
|
<Row>
|
|
<Row>
|
|
|
- <Col md="6">
|
|
|
|
|
|
|
+ <Col md="8">
|
|
|
<input
|
|
<input
|
|
|
onChange={(event) => {
|
|
onChange={(event) => {
|
|
|
let nombre = event.target.value
|
|
let nombre = event.target.value
|
|
|
- console.log('NOMBRE >>',nombre)
|
|
|
|
|
if(nombre){
|
|
if(nombre){
|
|
|
- // let temp = pruebas.filter( prueba => prueba.search(nombre) )
|
|
|
|
|
let temp = pruebas.filter( prueba => {
|
|
let temp = pruebas.filter( prueba => {
|
|
|
let isset = prueba.toUpperCase().includes( nombre.toUpperCase())
|
|
let isset = prueba.toUpperCase().includes( nombre.toUpperCase())
|
|
|
- console.log('ISET >>',prueba,isset )
|
|
|
|
|
return isset
|
|
return isset
|
|
|
})
|
|
})
|
|
|
- console.log('TEMP >>', temp)
|
|
|
|
|
setPruebas(temp)
|
|
setPruebas(temp)
|
|
|
setNombre(nombre)
|
|
setNombre(nombre)
|
|
|
}else{
|
|
}else{
|
|
@@ -132,24 +104,28 @@ export function Pruebas() {
|
|
|
name="nombreprueba"
|
|
name="nombreprueba"
|
|
|
placeholder="Escribe el nombre de la prueba que deseas consultar"/>
|
|
placeholder="Escribe el nombre de la prueba que deseas consultar"/>
|
|
|
</Col>
|
|
</Col>
|
|
|
- <Col md="6">
|
|
|
|
|
|
|
+ <Col md="4">
|
|
|
<div className="buscar_prueba">
|
|
<div className="buscar_prueba">
|
|
|
<button className="btn_buscar_prueba">BUSCAR</button>
|
|
<button className="btn_buscar_prueba">BUSCAR</button>
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
</Row>
|
|
</Row>
|
|
|
</Col>
|
|
</Col>
|
|
|
- <Col md="6">
|
|
|
|
|
|
|
+ <Col md="3">
|
|
|
<div className="crear_nueva_prueba">
|
|
<div className="crear_nueva_prueba">
|
|
|
- <span onClick={ () => navigate('/dashboard/pruebas/crear') } className="btn_crear_prueba">CREAR PRUEBA</span>
|
|
|
|
|
|
|
+ <span
|
|
|
|
|
+ onClick={ () => navigate('/dashboard/pruebas/crear') }
|
|
|
|
|
+ className="btn_crear_prueba">CREAR PRUEBA
|
|
|
|
|
+ </span>
|
|
|
</div>
|
|
</div>
|
|
|
</Col>
|
|
</Col>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </Row>
|
|
|
|
|
|
|
|
<div className="tabs_pruebas">
|
|
<div className="tabs_pruebas">
|
|
|
<Row >
|
|
<Row >
|
|
|
<Col md="3">
|
|
<Col md="3">
|
|
|
<div
|
|
<div
|
|
|
|
|
+ ref={main}
|
|
|
className="test_tab active"
|
|
className="test_tab active"
|
|
|
id="todaspruebas"
|
|
id="todaspruebas"
|
|
|
onClick={() => setPruebas(all)}
|
|
onClick={() => setPruebas(all)}
|