浏览代码

templeta and logic edit

amenpunk 2 年之前
父节点
当前提交
321ac4bf48
共有 2 个文件被更改,包括 37 次插入4 次删除
  1. 9 0
      src/App.css
  2. 28 4
      src/Components/Password/Rows.js

+ 9 - 0
src/App.css

@@ -266,3 +266,12 @@
266 266
 .title_td{
267 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,3 +1,6 @@
1
+import EditIcon from '@mui/icons-material/Edit';
2
+import SendIcon from '@mui/icons-material/Send';
3
+
1 4
 export const Encabezados = [
2 5
     {
3 6
         name: 'pass',
@@ -23,6 +26,16 @@ export const Encabezados = [
23 26
         disablePadding: true,
24 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 41
 export const niveles_educativos = [
@@ -47,14 +60,25 @@ export const departamentos = [
47 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 66
         return {
54
-            pass : pwd.pwd,
67
+            pass: pwd,
55 68
             name: user.nombre,
56 69
             apell: user.apellidos,
57 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
+}