Browse Source

templeta and logic edit

amenpunk 2 years ago
parent
commit
321ac4bf48
2 changed files with 37 additions and 4 deletions
  1. 9 0
      src/App.css
  2. 28 4
      src/Components/Password/Rows.js

+ 9 - 0
src/App.css

266
 .title_td{
266
 .title_td{
267
     font-weight: bold;
267
     font-weight: bold;
268
 }
268
 }
269
+.operation_buttons{
270
+    display: flex;
271
+    flex-direction:row;
272
+}
273
+.icon_op{
274
+    border : 1px solid var(--main);
275
+    color : var(--main);
276
+    margin :5px;
277
+}

+ 28 - 4
src/Components/Password/Rows.js

1
+import EditIcon from '@mui/icons-material/Edit';
2
+import SendIcon from '@mui/icons-material/Send';
3
+
1
 export const Encabezados = [
4
 export const Encabezados = [
2
     {
5
     {
3
         name: 'pass',
6
         name: 'pass',
23
         disablePadding: true,
26
         disablePadding: true,
24
         label: 'Correo',
27
         label: 'Correo',
25
     },
28
     },
29
+    {
30
+        name: 'op',
31
+        numeric: false,
32
+        disablePadding: true,
33
+        label: 'Operación',
34
+        options: {
35
+            filter: true,
36
+            sort: false,
37
+        }
38
+    },
26
 ]
39
 ]
27
 
40
 
28
 export const niveles_educativos = [
41
 export const niveles_educativos = [
47
     "Guatemala",
60
     "Guatemala",
48
 ]
61
 ]
49
 
62
 
50
-export function Build(pwds){
51
-    return pwds.map( pwd => {
52
-        let { candidato: user } = pwd
63
+export function Build(pwds) {
64
+    return pwds.map(password => {
65
+        let { candidato: user, plaza_id, pwd } = password
53
         return {
66
         return {
54
-            pass : pwd.pwd,
67
+            pass: pwd,
55
             name: user.nombre,
68
             name: user.nombre,
56
             apell: user.apellidos,
69
             apell: user.apellidos,
57
             mail: user.mail,
70
             mail: user.mail,
71
+            op: <OpButtons plz={plaza_id} pwd={pwd}  />
58
         }
72
         }
59
     })
73
     })
60
 }
74
 }
75
+
76
+
77
+function OpButtons(props){
78
+    return(
79
+        <div className="operation_buttons">
80
+            <EditIcon onClick={() => console.log(props)} className="icon_op"/>
81
+            <SendIcon className="icon_op"/>
82
+        </div>
83
+    )
84
+}