Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11965 Rev 12012
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'
Línea 9... Línea 10...
9
 
10
 
10
const headers = [
11
const headers = [
11
	{ key: 'name', label: 'Nombre', isSorteable: true },
12
	{ key: 'name', label: 'Nombre', isSorteable: true },
12
	{ key: 'job_description', label: 'Descripción', isSorteable: true },
13
	{ key: 'job_description', label: 'Descripción', isSorteable: true },
13
	{ key: 'status', label: 'Estatus', isSorteable: false },
14
	{ key: 'status', label: 'Estatus', isSorteable: false },
14
	{ key: 'actions', label: 'Acciones', isSorteable: false }
15
	{ key: 'actions', label: 'Acciones', isSorteable: false }
Línea 15... Línea 16...
15
]
16
]
Línea 16... Línea 17...
16
 
17
 
-
 
18
const TableView = ({ add_link, table_link, permisions, actionLink, setActionLink }) => {
-
 
19
 
17
const TableView = ({ add_link, table_link, permisions }) => {
20
	const dispatch = useDispatch()
18
 
-
 
19
	const dispatch = useDispatch()
21
	const history = useHistory()
20
	const [modalToShow, setModalToShow] = useState('')
22
	const { url } = useRouteMatch()
21
	const [actionLink, setActionLink] = useState(add_link)
23
	const [modalToShow, setModalToShow] = useState('')
22
	const [items, setItems] = useState([])
24
	const [items, setItems] = useState([])
23
	const [total, setTotal] = useState(0)
25
	const [total, setTotal] = useState(0)
Línea 74... Línea 76...
74
											&&
76
											&&
75
											<label
77
											<label
76
												className='d-flex align-items-center'
78
												className='d-flex align-items-center'
77
												onClick={() => {
79
												onClick={() => {
78
													setActionLink(add_link)
80
													setActionLink(add_link)
79
													setModalToShow('add')
81
													history.push(`${url}/add`)
80
												}}
82
												}}
81
												style={{ cursor: 'pointer' }}
83
												style={{ cursor: 'pointer' }}
82
											>
84
											>
83
												<i className="fa fa-plus mr-2" />
85
												<i className="fa fa-plus mr-2" />
84
												Agregar
86
												Agregar
Línea 129... Línea 131...
129
																	&&
131
																	&&
130
																	<i
132
																	<i
131
																		className='fa fa-pencil'
133
																		className='fa fa-pencil'
132
																		onClick={() => {
134
																		onClick={() => {
133
																			setActionLink(item.actions.link_edit)
135
																			setActionLink(item.actions.link_edit)
134
																			setModalToShow('edit')
136
																			history.push(`${url}/edit`)
135
																		}}
137
																		}}
136
																		style={{ cursor: 'pointer' }}
138
																		style={{ cursor: 'pointer' }}
137
																	/>
139
																	/>
138
																}
140
																}
139
																{
141
																{