|
|
@@ -17,15 +17,19 @@ export function Prueba() {
|
|
|
let dispatch = useDispatch();
|
|
|
let [data, setData] = useState({});
|
|
|
|
|
|
+ console.log('PROFILE: ', profile)
|
|
|
+
|
|
|
useState(() => {
|
|
|
let rest = new Service(`/prueba/findid/${id}`)
|
|
|
rest.get(auth.token)
|
|
|
- .then(resp => {
|
|
|
- setData(resp.data)
|
|
|
- })
|
|
|
+ .then(resp => {
|
|
|
+ setData(resp.data)
|
|
|
+ })
|
|
|
.catch(_e => setData({}))
|
|
|
}, [id])
|
|
|
|
|
|
+ console.log('Prueba info: ', data)
|
|
|
+
|
|
|
const CreateAssign = () => {
|
|
|
|
|
|
let now = new Date().toISOString();
|
|
|
@@ -37,10 +41,12 @@ export function Prueba() {
|
|
|
"score": "0",
|
|
|
"mensaje": "0",
|
|
|
"mensaje2": "0",
|
|
|
+ "candidatoinpwd_id": profile.profile.idsuperpwd,
|
|
|
//candidatoinpwd -> idSuperContraseña -> viene al hacer login
|
|
|
- "idcontrasenia": profile.role.passid, // ya no se va enviar
|
|
|
- "nombre": "assing CLEVAERR"
|
|
|
+ "idcontrasenia": profile.role.pass, // ya no se va enviar
|
|
|
+ "nombre": "assing CLEVAERR",
|
|
|
//cattest_id // catalogo de examenes -> viene del api del catalogo del admin
|
|
|
+ "cattest_id": data.id
|
|
|
}
|
|
|
|
|
|
let rest = new Service("/prueba/asignacion");
|
|
|
@@ -55,23 +61,23 @@ export function Prueba() {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- if(profile.role.assingid){
|
|
|
+ if (profile.role.assingid) {
|
|
|
return <Cleaver />
|
|
|
}
|
|
|
|
|
|
return (
|
|
|
- <div className="content-section">
|
|
|
+ <div className="content-section">
|
|
|
<div className="main">
|
|
|
<Box >
|
|
|
<Paper>
|
|
|
- <Header/>
|
|
|
+ <Header />
|
|
|
</Paper>
|
|
|
<Paper className="prueba_body" elevation={1}>
|
|
|
<h1>{data?.nombre}</h1>
|
|
|
<Divider />
|
|
|
<Typography style={{ marginTop: 15, textAlign: 'center' }}>{data?.decription}</Typography>
|
|
|
<Divider style={{ marginTop: 15 }} />
|
|
|
- <Button variant="contained" onClick={CreateAssign}>Inicar Prueba</Button>
|
|
|
+ <Button variant="contained" onClick={CreateAssign}>Inicar Prueba</Button>
|
|
|
</Paper>
|
|
|
</Box>
|
|
|
<Toaster
|