Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 12016 Rev 12017
Línea 4... Línea 4...
4
import { LengthFilter, SearchInput, Table, TablePagination } from '../../../recruitment_and_selection/components/TableComponents'
4
import { LengthFilter, SearchInput, Table, TablePagination } from '../../../recruitment_and_selection/components/TableComponents'
5
import { addNotification } from '../../../redux/notification/notification.actions'
5
import { addNotification } from '../../../redux/notification/notification.actions'
6
import DeleteModal from '../../../shared/DeleteModal'
6
import DeleteModal from '../../../shared/DeleteModal'
7
import axios from 'axios'
7
import axios from 'axios'
8
import { useDispatch } from 'react-redux'
8
import { useDispatch } from 'react-redux'
9
import { useHistory, useRouteMatch } from 'react-router-dom'
9
import { useHistory } from 'react-router-dom'
Línea 10... Línea 10...
10
 
10
 
11
const headers = [
11
const headers = [
12
	{ key: 'name', label: 'Nombre', isSorteable: true },
12
	{ key: 'name', label: 'Nombre', isSorteable: true },
13
	{ key: 'job_description', label: 'Descripción', isSorteable: true },
13
	{ key: 'job_description', label: 'Descripción', isSorteable: true },
Línea 16... Línea 16...
16
]
16
]
Línea 17... Línea 17...
17
 
17
 
Línea 18... Línea 18...
18
const TableView = ({ add_link, table_link, permisions, actionLink, setActionLink }) => {
18
const TableView = ({ add_link, table_link, permisions, actionLink, setActionLink }) => {
19
 
-
 
20
	const history = useHistory()
19
 
21
	const { url, path } = useRouteMatch()
20
	const history = useHistory()
22
	const dispatch = useDispatch()
21
	const dispatch = useDispatch()
23
	const [modalToShow, setModalToShow] = useState('')
22
	const [modalToShow, setModalToShow] = useState('')
24
	const [items, setItems] = useState([])
23
	const [items, setItems] = useState([])
Línea 28... Línea 27...
28
	const [pages, setPages] = useState({
27
	const [pages, setPages] = useState({
29
		current: 1,
28
		current: 1,
30
		last: 1
29
		last: 1
31
	})
30
	})
Línea 32... Línea -...
32
 
-
 
33
	console.log(path, url)
-
 
34
 
31
 
Línea 35... Línea 32...
35
	const getData = ({ url = '', params = {} }) => {
32
	const getData = ({ url = '', params = {} }) => {
36
 
33
 
37
		axios.get(url, { params: { ...params } })
34
		axios.get(url, { params: { ...params } })
Línea 78... Línea 75...
78
											&&
75
											&&
79
											<label
76
											<label
80
												className='d-flex align-items-center'
77
												className='d-flex align-items-center'
81
												onClick={() => {
78
												onClick={() => {
82
													setActionLink(add_link)
79
													setActionLink(add_link)
83
													history.push(`${url}/add`)
80
													history.push('/add')
84
												}}
81
												}}
85
												style={{ cursor: 'pointer' }}
82
												style={{ cursor: 'pointer' }}
86
											>
83
											>
87
												<i className="fa fa-plus mr-2" />
84
												<i className="fa fa-plus mr-2" />
88
												Agregar
85
												Agregar
Línea 133... Línea 130...
133
																	&&
130
																	&&
134
																	<i
131
																	<i
135
																		className='fa fa-pencil'
132
																		className='fa fa-pencil'
136
																		onClick={() => {
133
																		onClick={() => {
137
																			setActionLink(item.actions.link_edit)
134
																			setActionLink(item.actions.link_edit)
138
																			history.push(`${url}/edit`)
135
																			history.push('/edit')
139
																		}}
136
																		}}
140
																		style={{ cursor: 'pointer' }}
137
																		style={{ cursor: 'pointer' }}
141
																	/>
138
																	/>
142
																}
139
																}
143
																{
140
																{