Ver código fonte

[add] full puestos dashboard

amenpunk 3 anos atrás
pai
commit
58de31ba6d
3 arquivos alterados com 56 adições e 29 exclusões
  1. 6 0
      psicoadmin/src/App.css
  2. 1 0
      psicoadmin/src/Css/all.css
  3. 49 29
      psicoadmin/src/Pages/Puestos.js

+ 6 - 0
psicoadmin/src/App.css

@@ -108,5 +108,11 @@
108 108
     opacity: 0;
109 109
     pointer-events:none;
110 110
 }
111
+.grid_btn{
112
+    font-size : 20px !important;
113
+    color: #b9c3ce;
114
+    transition: all 0.3s;
115
+    cursor: pointer;
116
+}
111 117
 
112 118
 

+ 1 - 0
psicoadmin/src/Css/all.css

@@ -286,6 +286,7 @@ li.nav-item {
286 286
     width: 100%;
287 287
     float: left;
288 288
     border: 1px solid #dcdcdc;
289
+    padding : 10px;
289 290
 }
290 291
 .footerinfo p {
291 292
     font-size: 14px;

+ 49 - 29
psicoadmin/src/Pages/Puestos.js

@@ -1,5 +1,4 @@
1 1
 import * as React from 'react';
2
-import classnames from 'classnames';
3 2
 import { Row, Col } from 'react-bootstrap'
4 3
 
5 4
 import Box from '@mui/material/Box';
@@ -8,6 +7,12 @@ import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
8 7
 
9 8
 import ViewListIcon from '@mui/icons-material/ViewList';
10 9
 import ViewModuleIcon from '@mui/icons-material/ViewModule';
10
+
11
+import RemoveRedEyeIcon from '@mui/icons-material/RemoveRedEye';
12
+import EditIcon from '@mui/icons-material/Edit';
13
+import HighlightOffIcon from '@mui/icons-material/HighlightOff';
14
+
15
+import NotFound from '../Images/not_found.png';
11 16
     
12 17
 let data = [{
13 18
     nombre : 'Nombre puesto',
@@ -16,7 +21,7 @@ let data = [{
16 21
 
17 22
 }]
18 23
 
19
-for( let _ of new Array(10) ){
24
+for( let _ of new Array(23) ){
20 25
     data.push(data[0])
21 26
 }
22 27
 
@@ -72,39 +77,54 @@ function ListMode() {
72 77
 }
73 78
 
74 79
 
75
-function ModuleMode () {
80
+function GridMode () {
81
+
82
+    let buttons = [
83
+        <div className="botones_interactivos">
84
+            <a href="#" tooltip-location="top" tooltip-animate tooltip="Ver plaza" data-toggle="modal" data-target="#verProducto">
85
+                <RemoveRedEyeIcon className="grid_btn"/>
86
+            </a>
87
+        </div>,
88
+        <div className="botones_interactivos">
89
+            <a href="#" tooltip-location="top" tooltip-animate tooltip="Editar plaza" data-toggle="modal" data-target="#editarProducto">
90
+                <EditIcon className="grid_btn"/>
91
+            </a>
92
+        </div>,
93
+        <div className="botones_interactivos">
94
+            <a href="#" tooltip-location="top" tooltip-animate tooltip="Eliminar plaza" data-toggle="modal" data-target="#deleteProducto">
95
+                <HighlightOffIcon className="grid_btn"/>
96
+            </a>
97
+        </div>
98
+    ]
99
+
76 100
     return(
77 101
         <React.Fragment> 
78 102
             {
79 103
                 data.length ? 
80
-                    <div className="col-md-3">
81
-                        <div className="panel">
82
-                            <div className="row">
83
-                                <div className="col-md-4">
84
-                                    <div className="img-container">
85
-                                        <img src="images/not_found.png"/>
86
-                                    </div>
87
-                                </div>
88
-                                <div className="col-md-8">
89
-                                    <div className="info_details">
90
-                                        <p>Nombre de la plaza</p>
91
-                                        <p>Descripción</p>
92
-                                        <p>Salario</p>
93
-                                        <div className="botones_interactivos">
94
-                                            <a href="#" tooltip-location="top" tooltip-animate tooltip="Ver plaza" data-toggle="modal" data-target="#verProducto"><i className="far fa-eye"></i></a>
95
-                                        </div>
96
-                                        <div className="botones_interactivos">
97
-                                            <a href="#" tooltip-location="top" tooltip-animate tooltip="Editar plaza" data-toggle="modal" data-target="#editarProducto"><i className="far fa-edit"></i></a>
104
+                data.map( plaza => {
105
+
106
+                    return(
107
+                        <Col md="3">
108
+                            <div className="panel">
109
+                                <Row>
110
+                                    <Col md="4">
111
+                                        <div className="img-container">
112
+                                            <img src={NotFound}/>
98 113
                                         </div>
99
-                                        <div className="botones_interactivos">
100
-                                            <a href="#" tooltip-location="top" tooltip-animate tooltip="Eliminar plaza" data-toggle="modal" data-target="#deleteProducto"><i className="far fa-times-circle"></i></a>
114
+                                    </Col>
115
+                                    <Col md="8">
116
+                                        <div className="info_details">
117
+                                            <p>{ plaza.nombre }</p>
118
+                                            <p>{ plaza.description }</p>
119
+                                            <p>{ plaza.salario }</p>
120
+                                            { buttons }
101 121
                                         </div>
102
-                                    </div>
103
-                                </div>
122
+                                    </Col>
123
+                                </Row>
104 124
                             </div>
105
-                        </div>
106
-                    </div>
107
-                    : undefined
125
+                        </Col>
126
+                    )
127
+                }) : undefined
108 128
             }
109 129
         </React.Fragment>
110 130
     )
@@ -159,7 +179,7 @@ export function Puestos() {
159 179
                 </Row>
160 180
                 <div className={`main_productos ${ alignment === 'grid' ? 'activar_vista' : 'desactivar_vista'  }`} id="grid_view">
161 181
                     <Row>
162
-                        <ModuleMode/>
182
+                        <GridMode/>
163 183
                     </Row>
164 184
                 </div>
165 185
                 <div className={`main_list_products ${alignment === 'list' ?  'activar_vista' : 'desactivar_vista'}`} id="list_view_products">