|
@@ -1,11 +1,18 @@
|
1
|
1
|
import { Col, Button, Table } from 'react-bootstrap'
|
2
|
|
-import Zoom from '@mui/material/Zoom';
|
|
2
|
+import { Zoom, useMediaQuery as Size, TableCell } from '@mui/material'
|
|
3
|
+
|
|
4
|
+import ShowI from '@mui/icons-material/Grading';
|
|
5
|
+import EditI from '@mui/icons-material/Edit';
|
|
6
|
+import Deletei from '@mui/icons-material/Delete';
|
3
|
7
|
|
4
|
8
|
export function ListMode(props) {
|
5
|
9
|
|
6
|
10
|
const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
|
7
|
11
|
let { setEdit, setDelete, setShow, setPuesto, data, index, showing } = props;
|
8
|
12
|
|
|
13
|
+ const isMovil = Size('(min-width:770px)');
|
|
14
|
+ console.log("IS MOV:: ", isMovil)
|
|
15
|
+
|
9
|
16
|
return(
|
10
|
17
|
<Col md="12">
|
11
|
18
|
<div className="body-table">
|
|
@@ -28,34 +35,43 @@ export function ListMode(props) {
|
28
|
35
|
<td className="text-center">{ plaza.nombre }</td>
|
29
|
36
|
<td className="text-center">{ plaza.description }</td>
|
30
|
37
|
<td className="text-center">{ new Date( plaza.created ).toLocaleDateString('es-GT',opciones) }</td>
|
31
|
|
- <td className="actions_butons_plaza">
|
|
38
|
+ <TableCell
|
|
39
|
+ sx={{
|
|
40
|
+ "display":'flex',
|
|
41
|
+ "flex-direction":'row',
|
|
42
|
+ "justify-content": "space-between",
|
|
43
|
+ "flex-wrap": !isMovil ? "wrap": "nowrap",
|
|
44
|
+ }}
|
|
45
|
+ className="actions_butons_plaza">
|
32
|
46
|
<Button
|
33
|
47
|
onClick={() => {
|
34
|
48
|
setPuesto(plaza)
|
35
|
49
|
setShow(true)
|
36
|
50
|
}}
|
37
|
|
- className="ver_producto">Ver
|
|
51
|
+ className="ver_producto">
|
|
52
|
+ {!isMovil ? <ShowI/> : "Ver"}
|
38
|
53
|
</Button>
|
39
|
|
-
|
40
|
54
|
<Button
|
41
|
55
|
onClick={() => {
|
42
|
56
|
setPuesto(plaza)
|
43
|
57
|
setEdit(true)
|
44
|
58
|
}}
|
45
|
|
- className="editar_producto">Editar
|
|
59
|
+ className="editar_producto">
|
|
60
|
+ {!isMovil ? <EditI/> : "Editar"}
|
46
|
61
|
</Button>
|
47
|
62
|
<Button
|
48
|
63
|
onClick={() => {
|
49
|
64
|
setPuesto(plaza)
|
50
|
65
|
setDelete(true)
|
51
|
66
|
}}
|
52
|
|
- className="eliminar_producto">Eliminar
|
|
67
|
+ className="eliminar_producto">
|
|
68
|
+ {!isMovil ? <Deletei/> : "Eliminar"}
|
53
|
69
|
</Button>
|
54
|
|
- </td>
|
|
70
|
+ </TableCell>
|
55
|
71
|
</tr>
|
56
|
72
|
</Zoom>
|
57
|
73
|
)
|
58
|
|
- }) : <h1>no data bro</h1>
|
|
74
|
+ }) : <span></span>
|
59
|
75
|
}
|
60
|
76
|
</tbody>
|
61
|
77
|
<tfoot>
|