|
@@ -3,8 +3,16 @@ import {
|
3
|
3
|
Skeleton, Box, IconButton, TableCell, TableContainer,
|
4
|
4
|
Table, TableRow, Paper, TableBody
|
5
|
5
|
} from '@mui/material';
|
|
6
|
+
|
|
7
|
+import { Col, Row } from 'react-bootstrap'
|
|
8
|
+
|
6
|
9
|
import React from 'react'
|
7
|
|
-import CheckBoxIcon from '@mui/icons-material/CheckBox';
|
|
10
|
+
|
|
11
|
+import {
|
|
12
|
+ CheckBox as CheckBoxIcon,
|
|
13
|
+ FmdBad as FmdBadIcon,
|
|
14
|
+ NewReleases as NewReleasesIcon
|
|
15
|
+} from '@mui/icons-material'
|
8
|
16
|
|
9
|
17
|
|
10
|
18
|
const big_as = 70
|
|
@@ -27,15 +35,25 @@ function Asignaciones(props) {
|
27
|
35
|
function TableUser(props) {
|
28
|
36
|
let { user } = props;
|
29
|
37
|
let { asignaciones, candi } = user
|
30
|
|
- // console.log(asignaciones)
|
|
38
|
+
|
|
39
|
+ if (asignaciones.lenght <= 0) {
|
|
40
|
+ return <h1>Sin datos</h1>
|
|
41
|
+ }
|
|
42
|
+
|
31
|
43
|
return (
|
32
|
|
- <TableRow style={{}}>
|
33
|
|
- <TableCell className="table_list_test_user home_letter">{candi.nombre + " " + candi.apellidos}</TableCell>
|
|
44
|
+ <TableRow >
|
|
45
|
+ <TableCell
|
|
46
|
+ style={{ borderRight: '1px solid #f1f1f1 !important' }}
|
|
47
|
+ className="home_letter pwd_user_name ">
|
|
48
|
+ {candi.nombre + " " + candi.apellidos}
|
|
49
|
+ </TableCell>
|
34
|
50
|
<TableCell className="table_list_test_user home_letter">
|
35
|
51
|
<table>
|
36
|
52
|
<tbody >
|
37
|
53
|
{
|
38
|
|
- asignaciones.map(a => <Asignaciones key={a.id} asign={a} />)
|
|
54
|
+ asignaciones?.length > 0 ?
|
|
55
|
+ asignaciones.map(a => <Asignaciones key={a.id} asign={a} />)
|
|
56
|
+ : <SinAsignaciones />
|
39
|
57
|
}
|
40
|
58
|
</tbody>
|
41
|
59
|
</table>
|
|
@@ -44,39 +62,52 @@ function TableUser(props) {
|
44
|
62
|
)
|
45
|
63
|
}
|
46
|
64
|
|
|
65
|
+function SinAsignaciones() {
|
|
66
|
+ return (
|
|
67
|
+ <tr style={{ padding: 5 }}>
|
|
68
|
+ <center className="home_letter">
|
|
69
|
+ <i> El candidato aun no cuenta con asignaciones... </i>
|
|
70
|
+ <FmdBadIcon style={{ color: 'var(--main)' }} />
|
|
71
|
+ </center>
|
|
72
|
+ </tr>
|
|
73
|
+ )
|
|
74
|
+}
|
|
75
|
+
|
47
|
76
|
export function Candidato(props) {
|
48
|
|
- // console.log("USER: ", props.user)
|
49
|
77
|
let { password, candidatos } = props.user
|
50
|
78
|
|
51
|
79
|
return (
|
52
|
80
|
<div className="data_candidato">
|
53
|
|
- <div className="row">
|
54
|
|
- <div style={{padding:15, borderRight: '1px solid #f1f1f1' }} className="col-3" >
|
|
81
|
+ <Row>
|
|
82
|
+ <Col md="3" sm="12" style={{ padding: 10, borderRight: '1px solid #f1f1f1' }}>
|
55
|
83
|
<p><b>{password?.toUpperCase()}</b></p>
|
56
|
|
- </div>
|
57
|
|
- <div className="col-9">
|
58
|
|
-
|
|
84
|
+ </Col>
|
|
85
|
+ <Col md="9">
|
59
|
86
|
<TableContainer style={{ boxShadow: "none" }} component={Paper}>
|
60
|
87
|
<Table size="small" aria-label="a dense table">
|
61
|
|
- {/*
|
62
|
|
- <TableHead>
|
63
|
|
- <TableRow>
|
64
|
|
- <TableCell className="tg-0lax">Nombre</TableCell>
|
65
|
|
- <TableCell className="tg-0lax">Asignaciones</TableCell>
|
66
|
|
- </TableRow>
|
67
|
|
- </TableHead>
|
68
|
|
- */}
|
69
|
88
|
<TableBody>
|
70
|
89
|
{
|
71
|
|
- candidatos.map(u => <TableUser key={u.candi.id} user={u} />)
|
|
90
|
+ candidatos.length > 0 ?
|
|
91
|
+ candidatos.map(u => <TableUser key={u.candi.id} user={u} />)
|
|
92
|
+ : <SinAsignRealizadas />
|
|
93
|
+
|
72
|
94
|
}
|
73
|
95
|
</TableBody>
|
74
|
96
|
</Table>
|
75
|
|
-
|
76
|
97
|
</TableContainer>
|
|
98
|
+ </Col>
|
|
99
|
+ </Row>
|
|
100
|
+ </div>
|
|
101
|
+ )
|
|
102
|
+}
|
77
|
103
|
|
78
|
|
- </div>
|
79
|
|
- </div>
|
|
104
|
+function SinAsignRealizadas() {
|
|
105
|
+ return (
|
|
106
|
+ <div style={{ padding: 5 }}>
|
|
107
|
+ <center className="home_letter">
|
|
108
|
+ <i> No se ha relizado ninguna asignacion... </i>
|
|
109
|
+ <NewReleasesIcon style={{ color: '#e8eb34' }} />
|
|
110
|
+ </center>
|
80
|
111
|
</div>
|
81
|
112
|
)
|
82
|
113
|
}
|