|
@@ -1,14 +1,14 @@
|
1
|
1
|
import * as React from 'react';
|
2
|
2
|
|
3
|
|
-import {
|
|
3
|
+import {
|
4
|
4
|
rows,
|
5
|
5
|
action_icon,
|
6
|
6
|
Comparar,
|
7
|
7
|
Cuerpo,
|
8
|
8
|
} from '../Components/Password/config.js';
|
9
|
9
|
|
10
|
|
-import {
|
11
|
|
- Table, TableBody, TableCell, TableContainer,
|
|
10
|
+import {
|
|
11
|
+ Table, TableBody, TableCell, TableContainer,
|
12
|
12
|
TableRow, TablePagination,
|
13
|
13
|
Paper, Box, Switch, FormControlLabel,
|
14
|
14
|
Checkbox,
|
|
@@ -36,7 +36,7 @@ export function Contras() {
|
36
|
36
|
|
37
|
37
|
const SeleccionarTodos = (event) => {
|
38
|
38
|
if (event.target.checked) {
|
39
|
|
- const newSelecteds = rows.map( (n) => n.pass);
|
|
39
|
+ const newSelecteds = rows.map((n) => n.pass);
|
40
|
40
|
setSelected(newSelecteds);
|
41
|
41
|
return;
|
42
|
42
|
}
|
|
@@ -84,110 +84,114 @@ export function Contras() {
|
84
|
84
|
return (
|
85
|
85
|
<div className="content-section">
|
86
|
86
|
<div className="main">
|
87
|
|
- <Box sx={{ width: '100%' }}>
|
88
|
|
- <Paper sx={{ width: '100%', mb: 2 }}>
|
89
|
|
-
|
90
|
|
- <TableOperation numSelected={selected.length} />
|
91
|
|
-
|
92
|
|
- <TableContainer>
|
93
|
|
-
|
94
|
|
- <Table
|
95
|
|
- sx={{ minWidth: 750 }}
|
96
|
|
- aria-labelledby=""
|
97
|
|
- size={dense ? 'small' : 'medium'} >
|
98
|
|
-
|
99
|
|
- <TableHead
|
100
|
|
- numSelected={selected.length}
|
101
|
|
- order={order}
|
102
|
|
- orderBy={orderBy}
|
103
|
|
- onSelectAllClick={SeleccionarTodos}
|
104
|
|
- onRequestSort={CambiarTipoOrden}
|
105
|
|
- rowCount={rows.length} />
|
106
|
|
-
|
107
|
|
-
|
108
|
|
- <TableBody>
|
109
|
|
- {Cuerpo(rows, Comparar(order, orderBy))
|
110
|
|
- .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
111
|
|
- .map( (row, index) => {
|
112
|
|
-
|
113
|
|
- const isItemSelected = isSelected(row.pass);
|
114
|
|
- const labelId = `enhanced-table-checkbox-${index}`;
|
115
|
|
-
|
116
|
|
- return (
|
|
87
|
+ <Paper sx={{ mb: 2, padding: 2, height: '100%', minHeight: '95vh', background: 'blue' }}>
|
|
88
|
+
|
|
89
|
+ <Box sx={{ width: '100%' }}>
|
|
90
|
+ <Paper sx={{ width: '100%', mb: 2 }}>
|
|
91
|
+
|
|
92
|
+ <TableOperation numSelected={selected.length} />
|
|
93
|
+
|
|
94
|
+ <TableContainer>
|
|
95
|
+
|
|
96
|
+ <Table
|
|
97
|
+ sx={{ minWidth: 750 }}
|
|
98
|
+ aria-labelledby=""
|
|
99
|
+ size={dense ? 'small' : 'medium'} >
|
|
100
|
+
|
|
101
|
+ <TableHead
|
|
102
|
+ numSelected={selected.length}
|
|
103
|
+ order={order}
|
|
104
|
+ orderBy={orderBy}
|
|
105
|
+ onSelectAllClick={SeleccionarTodos}
|
|
106
|
+ onRequestSort={CambiarTipoOrden}
|
|
107
|
+ rowCount={rows.length} />
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+ <TableBody>
|
|
111
|
+ {Cuerpo(rows, Comparar(order, orderBy))
|
|
112
|
+ .slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage)
|
|
113
|
+ .map((row, index) => {
|
|
114
|
+
|
|
115
|
+ const isItemSelected = isSelected(row.pass);
|
|
116
|
+ const labelId = `enhanced-table-checkbox-${index}`;
|
|
117
|
+
|
|
118
|
+ return (
|
|
119
|
+ <TableRow
|
|
120
|
+ hover
|
|
121
|
+ onClick={(event) => Seleccionar(event, row.pass)}
|
|
122
|
+ // onClick={(event) => console.log(event)}
|
|
123
|
+ role="checkbox"
|
|
124
|
+ aria-checked={isItemSelected}
|
|
125
|
+ tabIndex={-1}
|
|
126
|
+ key={row.pass}
|
|
127
|
+ selected={isItemSelected}
|
|
128
|
+ >
|
|
129
|
+ <TableCell padding="checkbox">
|
|
130
|
+ <Checkbox
|
|
131
|
+ color="primary"
|
|
132
|
+ checked={isItemSelected}
|
|
133
|
+ inputProps={{
|
|
134
|
+ 'aria-labelledby': labelId,
|
|
135
|
+ }}
|
|
136
|
+ />
|
|
137
|
+ </TableCell>
|
|
138
|
+ <TableCell
|
|
139
|
+ component="th"
|
|
140
|
+ id={labelId}
|
|
141
|
+ scope="row"
|
|
142
|
+ padding="none"
|
|
143
|
+ >
|
|
144
|
+ {row.pass}
|
|
145
|
+ </TableCell>
|
|
146
|
+ <TableCell align="right">{row.nivel}</TableCell>
|
|
147
|
+ <TableCell align="right">{row.puesto}</TableCell>
|
|
148
|
+ <TableCell align="right">{row.cui}</TableCell>
|
|
149
|
+ <TableCell align="right">{row.uso}</TableCell>
|
|
150
|
+ <TableCell align="right">{row.picture}</TableCell>
|
|
151
|
+ <TableCell align="right">{row.cv}</TableCell>
|
|
152
|
+ <TableCell align="right">{row.estado}</TableCell>
|
|
153
|
+ <TableCell align="center">
|
|
154
|
+ <EditSharp style={action_icon} />
|
|
155
|
+ <MailSharp style={action_icon} />
|
|
156
|
+ </TableCell>
|
|
157
|
+ </TableRow>
|
|
158
|
+ );
|
|
159
|
+ })}
|
|
160
|
+ {emptyRows > 0 && (
|
117
|
161
|
<TableRow
|
118
|
|
- hover
|
119
|
|
- onClick={(event) => Seleccionar(event, row.pass)}
|
120
|
|
- // onClick={(event) => console.log(event)}
|
121
|
|
- role="checkbox"
|
122
|
|
- aria-checked={isItemSelected}
|
123
|
|
- tabIndex={-1}
|
124
|
|
- key={row.pass}
|
125
|
|
- selected={isItemSelected}
|
|
162
|
+ style={{
|
|
163
|
+ height: (dense ? 33 : 53) * emptyRows,
|
|
164
|
+ }}
|
126
|
165
|
>
|
127
|
|
- <TableCell padding="checkbox">
|
128
|
|
- <Checkbox
|
129
|
|
- color="primary"
|
130
|
|
- checked={isItemSelected}
|
131
|
|
- inputProps={{
|
132
|
|
- 'aria-labelledby': labelId,
|
133
|
|
- }}
|
134
|
|
- />
|
135
|
|
- </TableCell>
|
136
|
|
- <TableCell
|
137
|
|
- component="th"
|
138
|
|
- id={labelId}
|
139
|
|
- scope="row"
|
140
|
|
- padding="none"
|
141
|
|
- >
|
142
|
|
- {row.pass}
|
143
|
|
- </TableCell>
|
144
|
|
- <TableCell align="right">{row.nivel}</TableCell>
|
145
|
|
- <TableCell align="right">{row.puesto}</TableCell>
|
146
|
|
- <TableCell align="right">{row.cui}</TableCell>
|
147
|
|
- <TableCell align="right">{row.uso}</TableCell>
|
148
|
|
- <TableCell align="right">{row.picture}</TableCell>
|
149
|
|
- <TableCell align="right">{row.cv}</TableCell>
|
150
|
|
- <TableCell align="right">{row.estado}</TableCell>
|
151
|
|
- <TableCell align="center">
|
152
|
|
- <EditSharp style={action_icon} />
|
153
|
|
- <MailSharp style={action_icon}/>
|
154
|
|
- </TableCell>
|
|
166
|
+ <TableCell colSpan={6} />
|
155
|
167
|
</TableRow>
|
156
|
|
- );
|
157
|
|
- })}
|
158
|
|
- {emptyRows > 0 && (
|
159
|
|
- <TableRow
|
160
|
|
- style={{
|
161
|
|
- height: (dense ? 33 : 53) * emptyRows,
|
162
|
|
- }}
|
163
|
|
- >
|
164
|
|
- <TableCell colSpan={6} />
|
165
|
|
- </TableRow>
|
166
|
|
- )}
|
167
|
|
- </TableBody>
|
168
|
|
- </Table>
|
169
|
|
- </TableContainer>
|
170
|
|
-
|
171
|
|
- <TablePagination
|
172
|
|
- rowsPerPageOptions={[5, 10, 25]}
|
173
|
|
- component="div"
|
174
|
|
- count={rows.length}
|
175
|
|
- rowsPerPage={rowsPerPage}
|
176
|
|
- page={page}
|
177
|
|
- onPageChange={handleChangePage}
|
178
|
|
- onRowsPerPageChange={handleChangeRowsPerPage}
|
179
|
|
- labelRowsPerPage={"Mostrar: "}
|
|
168
|
+ )}
|
|
169
|
+ </TableBody>
|
|
170
|
+ </Table>
|
|
171
|
+ </TableContainer>
|
|
172
|
+
|
|
173
|
+ <TablePagination
|
|
174
|
+ rowsPerPageOptions={[5, 10, 25]}
|
|
175
|
+ component="div"
|
|
176
|
+ count={rows.length}
|
|
177
|
+ rowsPerPage={rowsPerPage}
|
|
178
|
+ page={page}
|
|
179
|
+ onPageChange={handleChangePage}
|
|
180
|
+ onRowsPerPageChange={handleChangeRowsPerPage}
|
|
181
|
+ labelRowsPerPage={"Mostrar: "}
|
180
|
182
|
/>
|
181
|
183
|
|
182
|
184
|
|
183
|
|
- </Paper>
|
|
185
|
+ </Paper>
|
184
|
186
|
|
185
|
|
- <FormControlLabel
|
186
|
|
- control={<Switch checked={dense} onChange={handleChangeDense} />}
|
187
|
|
- label="Comprimir"
|
|
187
|
+ <FormControlLabel
|
|
188
|
+ control={<Switch checked={dense} onChange={handleChangeDense} />}
|
|
189
|
+ label="Comprimir"
|
188
|
190
|
/>
|
189
|
191
|
|
190
|
|
- </Box>
|
|
192
|
+ </Box>
|
|
193
|
+
|
|
194
|
+ </Paper>
|
191
|
195
|
</div>
|
192
|
196
|
</div>
|
193
|
197
|
);
|