浏览代码

grid in list view plazas

amenpunk 2 年之前
父节点
当前提交
85a5f777de
共有 4 个文件被更改,包括 42 次插入30 次删除
  1. 9 0
      src/App.css
  2. 1 1
      src/Components/Puestos/GridMode.jsx
  3. 8 10
      src/Css/all.css
  4. 24 19
      src/Pages/Puestos.jsx

+ 9 - 0
src/App.css

@@ -207,3 +207,12 @@
207 207
 #login_btn_fn:hover{
208 208
     background-color: var(--second)
209 209
 }
210
+
211
+.btn_plaza_common{
212
+    cursor:pointer;
213
+}
214
+
215
+.btn_plaza_common:hover{
216
+    color:var(--second) !important;
217
+}
218
+

+ 1 - 1
src/Components/Puestos/GridMode.jsx

@@ -1,5 +1,6 @@
1 1
 import React from "react";
2 2
 import NotFound from '../../Images/not_found.png';
3
+
3 4
 import { 
4 5
     RemoveRedEye as RemoveRedEyeIcon,
5 6
     Edit as EditIcon,
@@ -18,7 +19,6 @@ export function GridMode(props){
18 19
             {
19 20
                 data.length ? 
20 21
                     data.map( plaza => {
21
-                        console.log('plaza', plaza)
22 22
                         return(
23 23
                             <Col key={plaza.id} lg="4" md="6" sm="6" xs="12" >
24 24
                                 <div className="panel">

+ 8 - 10
src/Css/all.css

@@ -3,10 +3,6 @@
3 3
     outline: 0 !important;
4 4
     font-family: 'gudea' !important;
5 5
 }
6
-.row {
7
-    margin: 0 !important;
8
-    padding: 0;
9
-}
10 6
 @font-face {
11 7
     font-family: gudea;
12 8
     src: url("../Fonts/Gudea-Regular.ttf"); /* TTF file for CSS3 browsers */
@@ -314,7 +310,8 @@ li.nav-item {
314 310
     margin-bottom: 24px;
315 311
 }
316 312
 .body-table {
317
-    padding: 40px;
313
+    /* padding: 40px; */
314
+    padding: 15px;
318 315
     background: #24344d;
319 316
     border-radius: 2px;
320 317
     box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 -1px 0 rgba(0,0,0,.02); 
@@ -806,15 +803,16 @@ table.dataTable tbody th, table.dataTable tbody td {
806 803
 .add_producto {
807 804
     width: 150px;
808 805
     text-align: center;
809
-    margin-bottom: 40px;
806
+    /* margin-bottom: 40px; */
810 807
     float: right;
811 808
 }
812 809
 .btn_add_producto {
813
-    border: 1px solid #2ec5d3;
814
-    background: #2ec5d3;
815
-    border-radius: 20px;
810
+    border: 1px solid var(--second);
811
+    background: var(--second);
812
+    border-radius: 10px;
816 813
     color: #fff;
817 814
     font-size: 12px;
815
+    margin : 3px;
818 816
 }
819 817
 .btn_add_producto:hover {
820 818
     border: 1px solid #2ec5d3;
@@ -824,7 +822,7 @@ table.dataTable tbody th, table.dataTable tbody td {
824 822
 }
825 823
 .btn_add_producto span {
826 824
     display: block;
827
-    padding: 10px;
825
+    padding: 6px;
828 826
 }
829 827
 .modal-header {
830 828
     display: -ms-flexbox;

+ 24 - 19
src/Pages/Puestos.jsx

@@ -18,6 +18,7 @@ import Mostrar from '../Components/Modal/MostrarPlaza';
18 18
 
19 19
 import { ListMode } from '../Components/Puestos/ListMode'
20 20
 import { GridMode } from '../Components/Puestos/GridMode'
21
+import { Add as AddIcon, } from '@mui/icons-material/'
21 22
 
22 23
 
23 24
 const Success =  () => toast.success('Plaza Agregada!!')
@@ -32,22 +33,22 @@ export function Puestos() {
32 33
         let rest = new Service("/plaza/getall")
33 34
 
34 35
         rest
35
-        .get(token)
36
-        .then(({data}) => {
37
-            let entries = data.map( e => {
38
-                return {
39
-                    nombre : e.nombrepuesto,
40
-                    description : e.notas,
41
-                    id : e.id,
42
-                    created: e.create_day,
43
-                    data: e
44
-                };
36
+            .get(token)
37
+            .then(({data}) => {
38
+                let entries = data.map( e => {
39
+                    return {
40
+                        nombre : e.nombrepuesto,
41
+                        description : e.notas,
42
+                        id : e.id,
43
+                        created: e.create_day,
44
+                        data: e
45
+                    };
46
+                })
47
+                setData(entries)
48
+            })
49
+            .catch((error) => {
50
+                console.log('error fetching data  ', error );
45 51
             })
46
-            setData(entries)
47
-        })
48
-        .catch((error) => {
49
-            console.log('error fetching data  ', error );
50
-        })
51 52
 
52 53
     },[token])
53 54
 
@@ -86,9 +87,9 @@ export function Puestos() {
86 87
         <div className="content-section">
87 88
             <div className="main">
88 89
                 <Box sx={{ width: '100%' }}>
89
-                    <Paper sx={{ width: '100%', mb: 2, padding : 2 }}>
90
+                    <Paper sx={{ width: '100%', mb: 2, padding : 2, height: '95vh' }}>
90 91
 
91
-                        <Row>
92
+                        <Row style={{paddingBottom : 15}}>
92 93
                             <Col md="2" sm="2" xs="2">
93 94
                                 <div className="breadcrumb-header">
94 95
                                     <Box sx={{ float : 'left',display: 'flex', flexDirection: 'column', alignItems: 'center', '& > :not(style) + :not(style)': { mt: 2 }, }} >
@@ -100,10 +101,14 @@ export function Puestos() {
100 101
                             </Col>
101 102
                             <Col md="10" sm='10' xs="10">
102 103
                                 <div className="add_producto">
103
-                                    <div onClick={() => setManual(true) } className="btn_add_producto"> <span >Agregar manual</span> </div>
104
+                                    <div onClick={() => setManual(true) } className="btn_add_producto"> 
105
+                                        <span className="btn_plaza_common" >Agregar manual <AddIcon/></span> 
106
+                                    </div>
104 107
                                 </div>
105 108
                                 <div onClick={() => setExpress(true) } className="add_producto">
106
-                                    <div className="btn_add_producto"> <span >Agregar express</span> </div>
109
+                                    <div className="btn_add_producto"> 
110
+                                        <span className="btn_plaza_common">Agregar express <AddIcon/></span> 
111
+                                    </div>
107 112
                                 </div>
108 113
                             </Col>
109 114
                         </Row>