Browse Source

responsive puestos style

amenpunk 3 years ago
parent
commit
9c251c88c9
4 changed files with 28 additions and 14 deletions
  1. 0 1
      src/App.css
  2. 0 2
      src/Components/Dashboard.js
  3. 24 8
      src/Components/Puestos/ListMode.jsx
  4. 4 3
      src/Css/all.css

+ 0 - 1
src/App.css

90
 .actions_butons_plaza{
90
 .actions_butons_plaza{
91
     display: flex;
91
     display: flex;
92
     flex-direction: row;
92
     flex-direction: row;
93
-    flex-wrap: nowrap;
94
     align-content: center;
93
     align-content: center;
95
     justify-content: space-around;
94
     justify-content: space-around;
96
     align-items: flex-start;
95
     align-items: flex-start;

+ 0 - 2
src/Components/Dashboard.js

248
                         {secondaryListItems}
248
                         {secondaryListItems}
249
                     </List>
249
                     </List>
250
                 </Drawer>
250
                 </Drawer>
251
-                {/* <Box component="main" sx={{ backgroundColor: (theme) => theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[900], flexGrow: 1, height: '100vh', overflow: 'auto', }} > */}
252
                     <Container maxWidth="lg" sx={{ mt: 2 , mb: 2 }}>
251
                     <Container maxWidth="lg" sx={{ mt: 2 , mb: 2 }}>
253
                         <Outlet/>
252
                         <Outlet/>
254
                         <Footer/>
253
                         <Footer/>
255
                     </Container>
254
                     </Container>
256
-                {/* </Box> */}
257
             </Box>
255
             </Box>
258
         </ThemeProvider>
256
         </ThemeProvider>
259
     );
257
     );

+ 24 - 8
src/Components/Puestos/ListMode.jsx

1
 import {  Col, Button, Table } from 'react-bootstrap'
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
 export function ListMode(props) {
8
 export function ListMode(props) {
5
     
9
     
6
     const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
10
     const opciones = { weekday: 'long', year: 'numeric', month: 'short', day: 'numeric' };
7
     let { setEdit, setDelete, setShow, setPuesto, data, index, showing } = props;
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
     return(
16
     return(
10
         <Col md="12">
17
         <Col md="12">
11
             <div className="body-table">
18
             <div className="body-table">
28
                                             <td className="text-center">{ plaza.nombre }</td>
35
                                             <td className="text-center">{ plaza.nombre }</td>
29
                                             <td className="text-center">{ plaza.description }</td>
36
                                             <td className="text-center">{ plaza.description }</td>
30
                                             <td className="text-center">{ new Date( plaza.created ).toLocaleDateString('es-GT',opciones) }</td>
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
                                                 <Button 
46
                                                 <Button 
33
                                                     onClick={() => {
47
                                                     onClick={() => {
34
                                                         setPuesto(plaza) 
48
                                                         setPuesto(plaza) 
35
                                                         setShow(true)
49
                                                         setShow(true)
36
                                                     }} 
50
                                                     }} 
37
-                                                    className="ver_producto">Ver
51
+                                                    className="ver_producto">
52
+                                                    {!isMovil ? <ShowI/> : "Ver"}
38
                                                 </Button>
53
                                                 </Button>
39
-
40
                                                 <Button 
54
                                                 <Button 
41
                                                     onClick={() => {
55
                                                     onClick={() => {
42
                                                         setPuesto(plaza) 
56
                                                         setPuesto(plaza) 
43
                                                         setEdit(true)
57
                                                         setEdit(true)
44
                                                     }} 
58
                                                     }} 
45
-                                                    className="editar_producto">Editar
59
+                                                    className="editar_producto">
60
+                                                    {!isMovil ? <EditI/> : "Editar"}
46
                                                 </Button>
61
                                                 </Button>
47
                                                 <Button 
62
                                                 <Button 
48
                                                     onClick={() => {
63
                                                     onClick={() => {
49
                                                         setPuesto(plaza) 
64
                                                         setPuesto(plaza) 
50
                                                         setDelete(true) 
65
                                                         setDelete(true) 
51
                                                     }} 
66
                                                     }} 
52
-                                                    className="eliminar_producto">Eliminar
67
+                                                    className="eliminar_producto">
68
+                                                    {!isMovil ? <Deletei/> : "Eliminar"}
53
                                                 </Button>
69
                                                 </Button>
54
-                                            </td>
70
+                                            </TableCell>
55
                                         </tr>
71
                                         </tr>
56
                                     </Zoom>
72
                                     </Zoom>
57
                                     )
73
                                     )
58
-                            }) : <h1>no data bro</h1>
74
+                            }) : <span></span>
59
                         }
75
                         }
60
                     </tbody>
76
                     </tbody>
61
                     <tfoot>
77
                     <tfoot>

+ 4 - 3
src/Css/all.css

852
     background-color: #fff;
852
     background-color: #fff;
853
     background-clip: padding-box;
853
     background-clip: padding-box;
854
     border: 1px solid rgba(0,0,0,.2);
854
     border: 1px solid rgba(0,0,0,.2);
855
-    border-radius: 2px;
855
+    border-radius: 5px;
856
     outline: 0;
856
     outline: 0;
857
+    margin-top:12%;
857
 }
858
 }
858
 .custom-file-upload-hidden {
859
 .custom-file-upload-hidden {
859
   display: none;
860
   display: none;
3520
     width: 100%;
3521
     width: 100%;
3521
 }
3522
 }
3522
 .content-section {
3523
 .content-section {
3523
-    padding: 40px 0px;
3524
+    padding: 10px 0px;
3524
 }
3525
 }
3525
 .cabeceras {
3526
 .cabeceras {
3526
     background: #f1f1f1;
3527
     background: #f1f1f1;
3633
     width: 100%;
3634
     width: 100%;
3634
 }
3635
 }
3635
 .content-section {
3636
 .content-section {
3636
-    padding: 40px 0px;
3637
+    padding: 10px 0px;
3637
 }
3638
 }
3638
 .cabeceras {
3639
 .cabeceras {
3639
     background: #f1f1f1;
3640
     background: #f1f1f1;