Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 9575 | Rev 9622 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 9575 Rev 9618
Línea 1... Línea 1...
1
import React, { useState, useEffect } from 'react'
1
import React, { useState, useEffect } from 'react'
2
import axios from 'axios'
2
import axios from 'axios'
3
import { Card } from 'react-bootstrap'
3
import { Card } from 'react-bootstrap'
4
import { LengthFilter, SearchInput, Table, TablePagination } from '../components/TableComponents'
4
import { LengthFilter, SearchInput, Table, TablePagination } from '../components/TableComponents'
-
 
5
import { Link } from 'react-router-dom'
Línea 5... Línea 6...
5
 
6
 
6
const headers = [
7
const headers = [
7
  { key: "name", label: "Nombre", isSorteable: true },
8
  { key: "name", label: "Nombre", isSorteable: true },
8
  { key: "job_description", label: "Descripción de cargo", isSorteable: true },
9
  { key: "job_description", label: "Descripción de cargo", isSorteable: true },
9
  { key: "actions", label: "Acciones", isSorteable: false }
10
  { key: "actions", label: "Acciones", isSorteable: false }
Línea 10... Línea 11...
10
]
11
]
Línea 11... Línea 12...
11
 
12
 
12
const MainView = ({ table_link }) => {
13
const MainView = ({ table_link, setActionLink }) => {
13
 
14
 
14
  const [data, setData] = useState({})
15
  const [data, setData] = useState({})
Línea 65... Línea 66...
65
                  {
66
                  {
66
                    data.items?.map((item, index) => (
67
                    data.items?.map((item, index) => (
67
                      <tr key={index}>
68
                      <tr key={index}>
68
                        <td>{item.name}</td>
69
                        <td>{item.name}</td>
69
                        <td>{item.job_description}</td>
70
                        <td>{item.job_description}</td>
-
 
71
                        <td className='d-flex' style={{ gap: '5px' }}>
-
 
72
                          <Link
-
 
73
                            to={`/recruitment-and-selection/vacancies/edit`}
-
 
74
                            onClick={() => setActionLink(item.actions.link_edit)}
70
                        <td>
75
                          >
71
                          <i className='fa fa-pencil' />
76
                            <i className='fa fa-pencil' style={{ cursor: 'pointer' }} />
-
 
77
                          </Link>
-
 
78
                          <i
72
                          <i className='fa fa-trash' />
79
                            className='fa fa-trash'
-
 
80
                            onClick={() => setActionLink(item.actions.link_delete)}
-
 
81
                            style={{ cursor: 'pointer' }}
-
 
82
                          />
73
                        </td>
83
                        </td>
74
                      </tr>
84
                      </tr>
75
                    ))
85
                    ))
76
                  }
86
                  }
77
                </Table>
87
                </Table>