|
@@ -1,14 +1,14 @@
|
|
|
import * as React from 'react';
|
|
import * as React from 'react';
|
|
|
|
|
|
|
|
-import {
|
|
|
|
|
|
|
+import {
|
|
|
rows,
|
|
rows,
|
|
|
action_icon,
|
|
action_icon,
|
|
|
Comparar,
|
|
Comparar,
|
|
|
Cuerpo,
|
|
Cuerpo,
|
|
|
} from '../Components/Password/config.js';
|
|
} from '../Components/Password/config.js';
|
|
|
|
|
|
|
|
-import {
|
|
|
|
|
- Table, TableBody, TableCell, TableContainer,
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ Table, TableBody, TableCell, TableContainer,
|
|
|
TableRow, TablePagination,
|
|
TableRow, TablePagination,
|
|
|
Paper, Box, Switch, FormControlLabel,
|
|
Paper, Box, Switch, FormControlLabel,
|
|
|
Checkbox,
|
|
Checkbox,
|
|
@@ -36,7 +36,7 @@ export function Contras() {
|
|
|
|
|
|
|
|
const SeleccionarTodos = (event) => {
|
|
const SeleccionarTodos = (event) => {
|
|
|
if (event.target.checked) {
|
|
if (event.target.checked) {
|
|
|
- const newSelecteds = rows.map( (n) => n.pass);
|
|
|
|
|
|
|
+ const newSelecteds = rows.map((n) => n.pass);
|
|
|
setSelected(newSelecteds);
|
|
setSelected(newSelecteds);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -84,110 +84,114 @@ export function Contras() {
|
|
|
return (
|
|
return (
|
|
|
<div className="content-section">
|
|
<div className="content-section">
|
|
|
<div className="main">
|
|
<div className="main">
|
|
|
- <Box sx={{ width: '100%' }}>
|
|
|
|
|
- <Paper sx={{ width: '100%', mb: 2 }}>
|
|
|
|
|
-
|
|
|
|
|
- <TableOperation numSelected={selected.length} />
|
|
|
|
|
-
|
|
|
|
|
- <TableContainer>
|
|
|
|
|
-
|
|
|
|
|
- <Table
|
|
|
|
|
- sx={{ minWidth: 750 }}
|
|
|
|
|
- aria-labelledby=""
|
|
|
|
|
- size={dense ? 'small' : 'medium'} >
|
|
|
|
|
-
|
|
|
|
|
- <TableHead
|
|
|
|
|
- numSelected={selected.length}
|
|
|
|
|
- order={order}
|
|
|
|
|
- orderBy={orderBy}
|
|
|
|
|
- onSelectAllClick={SeleccionarTodos}
|
|
|
|
|
- onRequestSort={CambiarTipoOrden}
|
|
|
|
|
- rowCount={rows.length} />
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <TableBody>
|
|
|
|
|
- {Cuerpo(rows, Comparar(order, orderBy))
|
|
|
|
|
- .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
|
|
|
- .map( (row, index) => {
|
|
|
|
|
-
|
|
|
|
|
- const isItemSelected = isSelected(row.pass);
|
|
|
|
|
- const labelId = `enhanced-table-checkbox-${index}`;
|
|
|
|
|
-
|
|
|
|
|
- return (
|
|
|
|
|
|
|
+ <Paper sx={{ mb: 2, padding: 2, height: '100%', minHeight: '95vh', background: 'blue' }}>
|
|
|
|
|
+
|
|
|
|
|
+ <Box sx={{ width: '100%' }}>
|
|
|
|
|
+ <Paper sx={{ width: '100%', mb: 2 }}>
|
|
|
|
|
+
|
|
|
|
|
+ <TableOperation numSelected={selected.length} />
|
|
|
|
|
+
|
|
|
|
|
+ <TableContainer>
|
|
|
|
|
+
|
|
|
|
|
+ <Table
|
|
|
|
|
+ sx={{ minWidth: 750 }}
|
|
|
|
|
+ aria-labelledby=""
|
|
|
|
|
+ size={dense ? 'small' : 'medium'} >
|
|
|
|
|
+
|
|
|
|
|
+ <TableHead
|
|
|
|
|
+ numSelected={selected.length}
|
|
|
|
|
+ order={order}
|
|
|
|
|
+ orderBy={orderBy}
|
|
|
|
|
+ onSelectAllClick={SeleccionarTodos}
|
|
|
|
|
+ onRequestSort={CambiarTipoOrden}
|
|
|
|
|
+ rowCount={rows.length} />
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <TableBody>
|
|
|
|
|
+ {Cuerpo(rows, Comparar(order, orderBy))
|
|
|
|
|
+ .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
|
|
|
+ .map((row, index) => {
|
|
|
|
|
+
|
|
|
|
|
+ const isItemSelected = isSelected(row.pass);
|
|
|
|
|
+ const labelId = `enhanced-table-checkbox-${index}`;
|
|
|
|
|
+
|
|
|
|
|
+ return (
|
|
|
|
|
+ <TableRow
|
|
|
|
|
+ hover
|
|
|
|
|
+ onClick={(event) => Seleccionar(event, row.pass)}
|
|
|
|
|
+ // onClick={(event) => console.log(event)}
|
|
|
|
|
+ role="checkbox"
|
|
|
|
|
+ aria-checked={isItemSelected}
|
|
|
|
|
+ tabIndex={-1}
|
|
|
|
|
+ key={row.pass}
|
|
|
|
|
+ selected={isItemSelected}
|
|
|
|
|
+ >
|
|
|
|
|
+ <TableCell padding="checkbox">
|
|
|
|
|
+ <Checkbox
|
|
|
|
|
+ color="primary"
|
|
|
|
|
+ checked={isItemSelected}
|
|
|
|
|
+ inputProps={{
|
|
|
|
|
+ 'aria-labelledby': labelId,
|
|
|
|
|
+ }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </TableCell>
|
|
|
|
|
+ <TableCell
|
|
|
|
|
+ component="th"
|
|
|
|
|
+ id={labelId}
|
|
|
|
|
+ scope="row"
|
|
|
|
|
+ padding="none"
|
|
|
|
|
+ >
|
|
|
|
|
+ {row.pass}
|
|
|
|
|
+ </TableCell>
|
|
|
|
|
+ <TableCell align="right">{row.nivel}</TableCell>
|
|
|
|
|
+ <TableCell align="right">{row.puesto}</TableCell>
|
|
|
|
|
+ <TableCell align="right">{row.cui}</TableCell>
|
|
|
|
|
+ <TableCell align="right">{row.uso}</TableCell>
|
|
|
|
|
+ <TableCell align="right">{row.picture}</TableCell>
|
|
|
|
|
+ <TableCell align="right">{row.cv}</TableCell>
|
|
|
|
|
+ <TableCell align="right">{row.estado}</TableCell>
|
|
|
|
|
+ <TableCell align="center">
|
|
|
|
|
+ <EditSharp style={action_icon} />
|
|
|
|
|
+ <MailSharp style={action_icon} />
|
|
|
|
|
+ </TableCell>
|
|
|
|
|
+ </TableRow>
|
|
|
|
|
+ );
|
|
|
|
|
+ })}
|
|
|
|
|
+ {emptyRows > 0 && (
|
|
|
<TableRow
|
|
<TableRow
|
|
|
- hover
|
|
|
|
|
- onClick={(event) => Seleccionar(event, row.pass)}
|
|
|
|
|
- // onClick={(event) => console.log(event)}
|
|
|
|
|
- role="checkbox"
|
|
|
|
|
- aria-checked={isItemSelected}
|
|
|
|
|
- tabIndex={-1}
|
|
|
|
|
- key={row.pass}
|
|
|
|
|
- selected={isItemSelected}
|
|
|
|
|
|
|
+ style={{
|
|
|
|
|
+ height: (dense ? 33 : 53) * emptyRows,
|
|
|
|
|
+ }}
|
|
|
>
|
|
>
|
|
|
- <TableCell padding="checkbox">
|
|
|
|
|
- <Checkbox
|
|
|
|
|
- color="primary"
|
|
|
|
|
- checked={isItemSelected}
|
|
|
|
|
- inputProps={{
|
|
|
|
|
- 'aria-labelledby': labelId,
|
|
|
|
|
- }}
|
|
|
|
|
- />
|
|
|
|
|
- </TableCell>
|
|
|
|
|
- <TableCell
|
|
|
|
|
- component="th"
|
|
|
|
|
- id={labelId}
|
|
|
|
|
- scope="row"
|
|
|
|
|
- padding="none"
|
|
|
|
|
- >
|
|
|
|
|
- {row.pass}
|
|
|
|
|
- </TableCell>
|
|
|
|
|
- <TableCell align="right">{row.nivel}</TableCell>
|
|
|
|
|
- <TableCell align="right">{row.puesto}</TableCell>
|
|
|
|
|
- <TableCell align="right">{row.cui}</TableCell>
|
|
|
|
|
- <TableCell align="right">{row.uso}</TableCell>
|
|
|
|
|
- <TableCell align="right">{row.picture}</TableCell>
|
|
|
|
|
- <TableCell align="right">{row.cv}</TableCell>
|
|
|
|
|
- <TableCell align="right">{row.estado}</TableCell>
|
|
|
|
|
- <TableCell align="center">
|
|
|
|
|
- <EditSharp style={action_icon} />
|
|
|
|
|
- <MailSharp style={action_icon}/>
|
|
|
|
|
- </TableCell>
|
|
|
|
|
|
|
+ <TableCell colSpan={6} />
|
|
|
</TableRow>
|
|
</TableRow>
|
|
|
- );
|
|
|
|
|
- })}
|
|
|
|
|
- {emptyRows > 0 && (
|
|
|
|
|
- <TableRow
|
|
|
|
|
- style={{
|
|
|
|
|
- height: (dense ? 33 : 53) * emptyRows,
|
|
|
|
|
- }}
|
|
|
|
|
- >
|
|
|
|
|
- <TableCell colSpan={6} />
|
|
|
|
|
- </TableRow>
|
|
|
|
|
- )}
|
|
|
|
|
- </TableBody>
|
|
|
|
|
- </Table>
|
|
|
|
|
- </TableContainer>
|
|
|
|
|
-
|
|
|
|
|
- <TablePagination
|
|
|
|
|
- rowsPerPageOptions={[5, 10, 25]}
|
|
|
|
|
- component="div"
|
|
|
|
|
- count={rows.length}
|
|
|
|
|
- rowsPerPage={rowsPerPage}
|
|
|
|
|
- page={page}
|
|
|
|
|
- onPageChange={handleChangePage}
|
|
|
|
|
- onRowsPerPageChange={handleChangeRowsPerPage}
|
|
|
|
|
- labelRowsPerPage={"Mostrar: "}
|
|
|
|
|
|
|
+ )}
|
|
|
|
|
+ </TableBody>
|
|
|
|
|
+ </Table>
|
|
|
|
|
+ </TableContainer>
|
|
|
|
|
+
|
|
|
|
|
+ <TablePagination
|
|
|
|
|
+ rowsPerPageOptions={[5, 10, 25]}
|
|
|
|
|
+ component="div"
|
|
|
|
|
+ count={rows.length}
|
|
|
|
|
+ rowsPerPage={rowsPerPage}
|
|
|
|
|
+ page={page}
|
|
|
|
|
+ onPageChange={handleChangePage}
|
|
|
|
|
+ onRowsPerPageChange={handleChangeRowsPerPage}
|
|
|
|
|
+ labelRowsPerPage={"Mostrar: "}
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
- </Paper>
|
|
|
|
|
|
|
+ </Paper>
|
|
|
|
|
|
|
|
- <FormControlLabel
|
|
|
|
|
- control={<Switch checked={dense} onChange={handleChangeDense} />}
|
|
|
|
|
- label="Comprimir"
|
|
|
|
|
|
|
+ <FormControlLabel
|
|
|
|
|
+ control={<Switch checked={dense} onChange={handleChangeDense} />}
|
|
|
|
|
+ label="Comprimir"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
- </Box>
|
|
|
|
|
|
|
+ </Box>
|
|
|
|
|
+
|
|
|
|
|
+ </Paper>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
);
|
|
);
|