Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 9618 Rev 9622
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'
5
import { useHistory } from 'react-router-dom'
Línea 6... Línea 6...
6
 
6
 
7
const headers = [
7
const headers = [
8
  { key: "name", label: "Nombre", isSorteable: true },
8
  { key: "name", label: "Nombre", isSorteable: true },
9
  { key: "job_description", label: "Descripción de cargo", isSorteable: true },
9
  { key: "job_description", label: "Descripción de cargo", isSorteable: true },
10
  { key: "actions", label: "Acciones", isSorteable: false }
10
  { key: "actions", label: "Acciones", isSorteable: false }
Línea 11... Línea 11...
11
]
11
]
Línea -... Línea 12...
-
 
12
 
12
 
13
const MainView = ({ table_link, setActionLink }) => {
13
const MainView = ({ table_link, setActionLink }) => {
14
 
14
 
15
  const history = useHistory()
15
  const [data, setData] = useState({})
16
  const [data, setData] = useState({})
16
  const [search, setSearch] = useState('')
17
  const [search, setSearch] = useState('')
Línea 66... Línea 67...
66
                  {
67
                  {
67
                    data.items?.map((item, index) => (
68
                    data.items?.map((item, index) => (
68
                      <tr key={index}>
69
                      <tr key={index}>
69
                        <td>{item.name}</td>
70
                        <td>{item.name}</td>
70
                        <td>{item.job_description}</td>
71
                        <td>{item.job_description}</td>
71
                        <td className='d-flex' style={{ gap: '5px' }}>
72
                        <td className='d-flex' style={{ gap: '10px' }}>
72
                          <Link
73
                          <i
73
                            to={`/recruitment-and-selection/vacancies/edit`}
74
                            className='fa fa-pencil'
-
 
75
                            onClick={() => {
74
                            onClick={() => setActionLink(item.actions.link_edit)}
76
                              setActionLink(item.actions.link_edit)
-
 
77
                              history.push('/edit')
75
                          >
78
                            }}
76
                            <i className='fa fa-pencil' style={{ cursor: 'pointer' }} />
79
                            style={{ cursor: 'pointer' }}
77
                          </Link>
80
                          />
78
                          <i
81
                          <i
79
                            className='fa fa-trash'
82
                            className='fa fa-trash'
80
                            onClick={() => setActionLink(item.actions.link_delete)}
83
                            onClick={() => setActionLink(item.actions.link_delete)}
81
                            style={{ cursor: 'pointer' }}
84
                            style={{ cursor: 'pointer' }}
82
                          />
85
                          />