|
|
@@ -3,8 +3,16 @@ import {
|
|
|
Skeleton, Box, IconButton, TableCell, TableContainer,
|
|
|
Table, TableRow, Paper, TableBody
|
|
|
} from '@mui/material';
|
|
|
+
|
|
|
+import { Col, Row } from 'react-bootstrap'
|
|
|
+
|
|
|
import React from 'react'
|
|
|
-import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
|
|
+
|
|
|
+import {
|
|
|
+ CheckBox as CheckBoxIcon,
|
|
|
+ FmdBad as FmdBadIcon,
|
|
|
+ NewReleases as NewReleasesIcon
|
|
|
+} from '@mui/icons-material'
|
|
|
|
|
|
|
|
|
const big_as = 70
|
|
|
@@ -27,15 +35,25 @@ function Asignaciones(props) {
|
|
|
function TableUser(props) {
|
|
|
let { user } = props;
|
|
|
let { asignaciones, candi } = user
|
|
|
- // console.log(asignaciones)
|
|
|
+
|
|
|
+ if (asignaciones.lenght <= 0) {
|
|
|
+ return <h1>Sin datos</h1>
|
|
|
+ }
|
|
|
+
|
|
|
return (
|
|
|
- <TableRow style={{}}>
|
|
|
- <TableCell className="table_list_test_user home_letter">{candi.nombre + " " + candi.apellidos}</TableCell>
|
|
|
+ <TableRow >
|
|
|
+ <TableCell
|
|
|
+ style={{ borderRight: '1px solid #f1f1f1 !important' }}
|
|
|
+ className="home_letter pwd_user_name ">
|
|
|
+ {candi.nombre + " " + candi.apellidos}
|
|
|
+ </TableCell>
|
|
|
<TableCell className="table_list_test_user home_letter">
|
|
|
<table>
|
|
|
<tbody >
|
|
|
{
|
|
|
- asignaciones.map(a => <Asignaciones key={a.id} asign={a} />)
|
|
|
+ asignaciones?.length > 0 ?
|
|
|
+ asignaciones.map(a => <Asignaciones key={a.id} asign={a} />)
|
|
|
+ : <SinAsignaciones />
|
|
|
}
|
|
|
</tbody>
|
|
|
</table>
|
|
|
@@ -44,39 +62,52 @@ function TableUser(props) {
|
|
|
)
|
|
|
}
|
|
|
|
|
|
+function SinAsignaciones() {
|
|
|
+ return (
|
|
|
+ <tr style={{ padding: 5 }}>
|
|
|
+ <center className="home_letter">
|
|
|
+ <i> El candidato aun no cuenta con asignaciones... </i>
|
|
|
+ <FmdBadIcon style={{ color: 'var(--main)' }} />
|
|
|
+ </center>
|
|
|
+ </tr>
|
|
|
+ )
|
|
|
+}
|
|
|
+
|
|
|
export function Candidato(props) {
|
|
|
- // console.log("USER: ", props.user)
|
|
|
let { password, candidatos } = props.user
|
|
|
|
|
|
return (
|
|
|
<div className="data_candidato">
|
|
|
- <div className="row">
|
|
|
- <div style={{padding:15, borderRight: '1px solid #f1f1f1' }} className="col-3" >
|
|
|
+ <Row>
|
|
|
+ <Col md="3" sm="12" style={{ padding: 10, borderRight: '1px solid #f1f1f1' }}>
|
|
|
<p><b>{password?.toUpperCase()}</b></p>
|
|
|
- </div>
|
|
|
- <div className="col-9">
|
|
|
-
|
|
|
+ </Col>
|
|
|
+ <Col md="9">
|
|
|
<TableContainer style={{ boxShadow: "none" }} component={Paper}>
|
|
|
<Table size="small" aria-label="a dense table">
|
|
|
- {/*
|
|
|
- <TableHead>
|
|
|
- <TableRow>
|
|
|
- <TableCell className="tg-0lax">Nombre</TableCell>
|
|
|
- <TableCell className="tg-0lax">Asignaciones</TableCell>
|
|
|
- </TableRow>
|
|
|
- </TableHead>
|
|
|
- */}
|
|
|
<TableBody>
|
|
|
{
|
|
|
- candidatos.map(u => <TableUser key={u.candi.id} user={u} />)
|
|
|
+ candidatos.length > 0 ?
|
|
|
+ candidatos.map(u => <TableUser key={u.candi.id} user={u} />)
|
|
|
+ : <SinAsignRealizadas />
|
|
|
+
|
|
|
}
|
|
|
</TableBody>
|
|
|
</Table>
|
|
|
-
|
|
|
</TableContainer>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ </div>
|
|
|
+ )
|
|
|
+}
|
|
|
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+function SinAsignRealizadas() {
|
|
|
+ return (
|
|
|
+ <div style={{ padding: 5 }}>
|
|
|
+ <center className="home_letter">
|
|
|
+ <i> No se ha relizado ninguna asignacion... </i>
|
|
|
+ <NewReleasesIcon style={{ color: '#e8eb34' }} />
|
|
|
+ </center>
|
|
|
</div>
|
|
|
)
|
|
|
}
|