Browse Source

[add] full puestos dashboard

amenpunk 3 years ago
parent
commit
58de31ba6d
3 changed files with 56 additions and 29 deletions
  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
     opacity: 0;
108
     opacity: 0;
109
     pointer-events:none;
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
     width: 100%;
286
     width: 100%;
287
     float: left;
287
     float: left;
288
     border: 1px solid #dcdcdc;
288
     border: 1px solid #dcdcdc;
289
+    padding : 10px;
289
 }
290
 }
290
 .footerinfo p {
291
 .footerinfo p {
291
     font-size: 14px;
292
     font-size: 14px;

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

1
 import * as React from 'react';
1
 import * as React from 'react';
2
-import classnames from 'classnames';
3
 import { Row, Col } from 'react-bootstrap'
2
 import { Row, Col } from 'react-bootstrap'
4
 
3
 
5
 import Box from '@mui/material/Box';
4
 import Box from '@mui/material/Box';
8
 
7
 
9
 import ViewListIcon from '@mui/icons-material/ViewList';
8
 import ViewListIcon from '@mui/icons-material/ViewList';
10
 import ViewModuleIcon from '@mui/icons-material/ViewModule';
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
 let data = [{
17
 let data = [{
13
     nombre : 'Nombre puesto',
18
     nombre : 'Nombre puesto',
16
 
21
 
17
 }]
22
 }]
18
 
23
 
19
-for( let _ of new Array(10) ){
24
+for( let _ of new Array(23) ){
20
     data.push(data[0])
25
     data.push(data[0])
21
 }
26
 }
22
 
27
 
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
     return(
100
     return(
77
         <React.Fragment> 
101
         <React.Fragment> 
78
             {
102
             {
79
                 data.length ? 
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
                                         </div>
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
                                         </div>
121
                                         </div>
102
-                                    </div>
103
-                                </div>
122
+                                    </Col>
123
+                                </Row>
104
                             </div>
124
                             </div>
105
-                        </div>
106
-                    </div>
107
-                    : undefined
125
+                        </Col>
126
+                    )
127
+                }) : undefined
108
             }
128
             }
109
         </React.Fragment>
129
         </React.Fragment>
110
     )
130
     )
159
                 </Row>
179
                 </Row>
160
                 <div className={`main_productos ${ alignment === 'grid' ? 'activar_vista' : 'desactivar_vista'  }`} id="grid_view">
180
                 <div className={`main_productos ${ alignment === 'grid' ? 'activar_vista' : 'desactivar_vista'  }`} id="grid_view">
161
                     <Row>
181
                     <Row>
162
-                        <ModuleMode/>
182
+                        <GridMode/>
163
                     </Row>
183
                     </Row>
164
                 </div>
184
                 </div>
165
                 <div className={`main_list_products ${alignment === 'list' ?  'activar_vista' : 'desactivar_vista'}`} id="list_view_products">
185
                 <div className={`main_list_products ${alignment === 'list' ?  'activar_vista' : 'desactivar_vista'}`} id="list_view_products">