|
@@ -17,15 +17,19 @@ export function Prueba() {
|
17
|
17
|
let dispatch = useDispatch();
|
18
|
18
|
let [data, setData] = useState({});
|
19
|
19
|
|
|
20
|
+ console.log('PROFILE: ', profile)
|
|
21
|
+
|
20
|
22
|
useState(() => {
|
21
|
23
|
let rest = new Service(`/prueba/findid/${id}`)
|
22
|
24
|
rest.get(auth.token)
|
23
|
|
- .then(resp => {
|
24
|
|
- setData(resp.data)
|
25
|
|
- })
|
|
25
|
+ .then(resp => {
|
|
26
|
+ setData(resp.data)
|
|
27
|
+ })
|
26
|
28
|
.catch(_e => setData({}))
|
27
|
29
|
}, [id])
|
28
|
30
|
|
|
31
|
+ console.log('Prueba info: ', data)
|
|
32
|
+
|
29
|
33
|
const CreateAssign = () => {
|
30
|
34
|
|
31
|
35
|
let now = new Date().toISOString();
|
|
@@ -37,10 +41,12 @@ export function Prueba() {
|
37
|
41
|
"score": "0",
|
38
|
42
|
"mensaje": "0",
|
39
|
43
|
"mensaje2": "0",
|
|
44
|
+ "candidatoinpwd_id": profile.profile.idsuperpwd,
|
40
|
45
|
//candidatoinpwd -> idSuperContraseña -> viene al hacer login
|
41
|
|
- "idcontrasenia": profile.role.passid, // ya no se va enviar
|
42
|
|
- "nombre": "assing CLEVAERR"
|
|
46
|
+ "idcontrasenia": profile.role.pass, // ya no se va enviar
|
|
47
|
+ "nombre": "assing CLEVAERR",
|
43
|
48
|
//cattest_id // catalogo de examenes -> viene del api del catalogo del admin
|
|
49
|
+ "cattest_id": data.id
|
44
|
50
|
}
|
45
|
51
|
|
46
|
52
|
let rest = new Service("/prueba/asignacion");
|
|
@@ -55,23 +61,23 @@ export function Prueba() {
|
55
|
61
|
})
|
56
|
62
|
}
|
57
|
63
|
|
58
|
|
- if(profile.role.assingid){
|
|
64
|
+ if (profile.role.assingid) {
|
59
|
65
|
return <Cleaver />
|
60
|
66
|
}
|
61
|
67
|
|
62
|
68
|
return (
|
63
|
|
- <div className="content-section">
|
|
69
|
+ <div className="content-section">
|
64
|
70
|
<div className="main">
|
65
|
71
|
<Box >
|
66
|
72
|
<Paper>
|
67
|
|
- <Header/>
|
|
73
|
+ <Header />
|
68
|
74
|
</Paper>
|
69
|
75
|
<Paper className="prueba_body" elevation={1}>
|
70
|
76
|
<h1>{data?.nombre}</h1>
|
71
|
77
|
<Divider />
|
72
|
78
|
<Typography style={{ marginTop: 15, textAlign: 'center' }}>{data?.decription}</Typography>
|
73
|
79
|
<Divider style={{ marginTop: 15 }} />
|
74
|
|
- <Button variant="contained" onClick={CreateAssign}>Inicar Prueba</Button>
|
|
80
|
+ <Button variant="contained" onClick={CreateAssign}>Inicar Prueba</Button>
|
75
|
81
|
</Paper>
|
76
|
82
|
</Box>
|
77
|
83
|
<Toaster
|