|
@@ -1,11 +1,18 @@
|
|
|
import { Col, Button, Table } from 'react-bootstrap'
|
|
import { Col, Button, Table } from 'react-bootstrap'
|
|
|
-import Zoom from '@mui/material/Zoom';
|
|
|
|
|
|
|
+import { Zoom, useMediaQuery as Size, TableCell } from '@mui/material'
|
|
|
|
|
+
|
|
|
|
|
+import ShowI from '@mui/icons-material/Grading';
|
|
|
|
|
+import EditI from '@mui/icons-material/Edit';
|
|
|
|
|
+import Deletei from '@mui/icons-material/Delete';
|
|
|
|
|
|
|
|
export function ListMode(props) {
|
|
export function ListMode(props) {
|
|
|
|
|
|
|
|
const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
|
|
const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
|
|
|
let { setEdit, setDelete, setShow, setPuesto, data, index, showing } = props;
|
|
let { setEdit, setDelete, setShow, setPuesto, data, index, showing } = props;
|
|
|
|
|
|
|
|
|
|
+ const isMovil = Size('(min-width:770px)');
|
|
|
|
|
+ console.log("IS MOV:: ", isMovil)
|
|
|
|
|
+
|
|
|
return(
|
|
return(
|
|
|
<Col md="12">
|
|
<Col md="12">
|
|
|
<div className="body-table">
|
|
<div className="body-table">
|
|
@@ -28,34 +35,43 @@ export function ListMode(props) {
|
|
|
<td className="text-center">{ plaza.nombre }</td>
|
|
<td className="text-center">{ plaza.nombre }</td>
|
|
|
<td className="text-center">{ plaza.description }</td>
|
|
<td className="text-center">{ plaza.description }</td>
|
|
|
<td className="text-center">{ new Date( plaza.created ).toLocaleDateString('es-GT',opciones) }</td>
|
|
<td className="text-center">{ new Date( plaza.created ).toLocaleDateString('es-GT',opciones) }</td>
|
|
|
- <td className="actions_butons_plaza">
|
|
|
|
|
|
|
+ <TableCell
|
|
|
|
|
+ sx={{
|
|
|
|
|
+ "display":'flex',
|
|
|
|
|
+ "flex-direction":'row',
|
|
|
|
|
+ "justify-content": "space-between",
|
|
|
|
|
+ "flex-wrap": !isMovil ? "wrap": "nowrap",
|
|
|
|
|
+ }}
|
|
|
|
|
+ className="actions_butons_plaza">
|
|
|
<Button
|
|
<Button
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
setPuesto(plaza)
|
|
setPuesto(plaza)
|
|
|
setShow(true)
|
|
setShow(true)
|
|
|
}}
|
|
}}
|
|
|
- className="ver_producto">Ver
|
|
|
|
|
|
|
+ className="ver_producto">
|
|
|
|
|
+ {!isMovil ? <ShowI/> : "Ver"}
|
|
|
</Button>
|
|
</Button>
|
|
|
-
|
|
|
|
|
<Button
|
|
<Button
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
setPuesto(plaza)
|
|
setPuesto(plaza)
|
|
|
setEdit(true)
|
|
setEdit(true)
|
|
|
}}
|
|
}}
|
|
|
- className="editar_producto">Editar
|
|
|
|
|
|
|
+ className="editar_producto">
|
|
|
|
|
+ {!isMovil ? <EditI/> : "Editar"}
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button
|
|
<Button
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
setPuesto(plaza)
|
|
setPuesto(plaza)
|
|
|
setDelete(true)
|
|
setDelete(true)
|
|
|
}}
|
|
}}
|
|
|
- className="eliminar_producto">Eliminar
|
|
|
|
|
|
|
+ className="eliminar_producto">
|
|
|
|
|
+ {!isMovil ? <Deletei/> : "Eliminar"}
|
|
|
</Button>
|
|
</Button>
|
|
|
- </td>
|
|
|
|
|
|
|
+ </TableCell>
|
|
|
</tr>
|
|
</tr>
|
|
|
</Zoom>
|
|
</Zoom>
|
|
|
)
|
|
)
|
|
|
- }) : <h1>no data bro</h1>
|
|
|
|
|
|
|
+ }) : <span></span>
|
|
|
}
|
|
}
|
|
|
</tbody>
|
|
</tbody>
|
|
|
<tfoot>
|
|
<tfoot>
|