Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 10447 Rev 10462
Línea 1... Línea 1...
1
/* eslint-disable no-mixed-spaces-and-tabs */
1
/* eslint-disable no-mixed-spaces-and-tabs */
2
import React, { useState, useEffect } from 'react'
2
import React, { useState, useEffect } from 'react'
3
import axios from 'axios'
3
import axios from 'axios'
4
import { Card } from 'react-bootstrap'
4
import { Card } from 'react-bootstrap'
5
import { LengthFilter, SearchInput, Table, TablePagination } from '../../components/TableComponents'
5
import { LengthFilter, SearchInput, Table, TablePagination } from '../../components/TableComponents'
6
import { Link, useHistory } from 'react-router-dom'
6
import { Link, useHistory, useRouteMatch } from 'react-router-dom'
7
import { addNotification } from '../../../redux/notification/notification.actions'
7
import { addNotification } from '../../../redux/notification/notification.actions'
8
import { useDispatch } from 'react-redux'
8
import { useDispatch } from 'react-redux'
9
import DeleteModal from '../../../shared/DeleteModal'
9
import DeleteModal from '../../../shared/DeleteModal'
Línea 10... Línea 10...
10
 
10
 
Línea 18... Línea 18...
18
]
18
]
Línea 19... Línea 19...
19
 
19
 
Línea 20... Línea 20...
20
const TableView = ({ table_link, permisions, vacancies, setActionLink }) => {
20
const TableView = ({ table_link, permisions, vacancies, setActionLink }) => {
-
 
21
 
21
 
22
	const history = useHistory()
22
	const history = useHistory()
23
	const { url } = useRouteMatch()
23
	const dispatch = useDispatch()
24
	const dispatch = useDispatch()
24
	const [showDeleteModal, setShowDeleteModal] = useState(false)
25
	const [showDeleteModal, setShowDeleteModal] = useState(false)
25
	const [currentVacancy, setCurrentVacancy] = useState(vacancies[0].uuid || '')
26
	const [currentVacancy, setCurrentVacancy] = useState(vacancies[0].uuid || '')
Línea 99... Línea 100...
99
										{
100
										{
100
											permisions.allowAdd
101
											permisions.allowAdd
101
											&&
102
											&&
102
											<label
103
											<label
103
												className='d-flex align-items-center'
104
												className='d-flex align-items-center'
104
												onClick={() => history.push('/recruitment-and-selection/vacancies/add')}
105
												onClick={() => history.push(`${url}/add`)}
105
												style={{ cursor: 'pointer' }}
106
												style={{ cursor: 'pointer' }}
106
											>
107
											>
107
												<i className="fa fa-plus mr-2" />
108
												<i className="fa fa-plus mr-2" />
108
												Agregar
109
												Agregar
109
											</label>
110
											</label>
Línea 156... Línea 157...
156
															<i
157
															<i
157
																className='fa fa-pencil'
158
																className='fa fa-pencil'
158
																style={{ cursor: 'pointer' }}
159
																style={{ cursor: 'pointer' }}
159
																onClick={() => {
160
																onClick={() => {
160
																	setActionLink(item.actions.link_edit)
161
																	setActionLink(item.actions.link_edit)
161
																	history.push('/recruitment-and-selection/vacancies/edit')
162
																	history.push(`${url}/edit`)
162
																}}
163
																}}
163
															/>
164
															/>
164
														}
165
														}
165
														{
166
														{
166
															permisions.allowDelete
167
															permisions.allowDelete