Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11025 Rev 11046
Línea 6... Línea 6...
6
import { useHistory } from 'react-router-dom'
6
import { useHistory } 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'
10
import ContentTitle from '../../../shared/ContentTitle'
10
import ContentTitle from '../../../shared/ContentTitle'
-
 
11
import AddModal from '../components/AddModal'
Línea 11... Línea 12...
11
 
12
 
12
const headers = [
13
const headers = [
13
	{ key: 'first_name', label: 'Nombre', isSorteable: true },
14
	{ key: 'first_name', label: 'Nombre', isSorteable: true },
14
	{ key: 'last_name', label: 'Apellido', isSorteable: true },
15
	{ key: 'last_name', label: 'Apellido', isSorteable: true },
Línea 17... Línea 18...
17
	{ key: 'actions', label: 'Acciones', isSorteable: false }
18
	{ key: 'actions', label: 'Acciones', isSorteable: false }
18
]
19
]
Línea 19... Línea 20...
19
 
20
 
Línea 20... Línea -...
20
const MainView = ({ email_link, add_link, table_link, permisions, vacancies }) => {
-
 
21
 
21
const MainView = ({ email_link, add_link, table_link, permisions, vacancies }) => {
22
	const history = useHistory()
22
 
-
 
23
	const dispatch = useDispatch()
23
	const dispatch = useDispatch()
24
	const [showDeleteModal, setShowDeleteModal] = useState(false)
24
	const [showDeleteModal, setShowDeleteModal] = useState(false)
25
	const [isShowAddModal, setIsShowAddModal] = useState(false)
25
	const [currentVacancy, setCurrentVacancy] = useState(vacancies[0].uuid || '')
26
	const [currentVacancy, setCurrentVacancy] = useState(vacancies[0].uuid || '')
26
	const [actionLink, setActionLink] = useState('')
27
	const [actionLink, setActionLink] = useState('')
27
	const [data, setData] = useState({})
28
	const [data, setData] = useState({})
Línea 61... Línea 62...
61
				page: pages.current
62
				page: pages.current
62
			}
63
			}
63
		})
64
		})
64
	}, [search, dataLength, pages.current, currentVacancy])
65
	}, [search, dataLength, pages.current, currentVacancy])
Línea -... Línea 66...
-
 
66
 
-
 
67
	useEffect(() => {
-
 
68
		add_link.replace('UUID_PLACEHOLDER', currentVacancy)
-
 
69
	}, [currentVacancy])
65
 
70
 
66
	return (
71
	return (
67
		<ContentTitle title='Preselección'>
72
		<ContentTitle title='Preselección'>
68
			<section className="content">
73
			<section className="content">
69
				<div className="container-fluid">
74
				<div className="container-fluid">
Línea 171... Línea 176...
171
									<div className='row justify-content-between align-items-center'>
176
									<div className='row justify-content-between align-items-center'>
172
										<p className='mb-0'>
177
										<p className='mb-0'>
173
											{`Mostrando registros del ${(dataLength * pages.current) - (dataLength - 1) || 0} al ${(dataLength * pages.current) - (dataLength - data.total) || 0} de un total de ${data.total || 0} registros`}
178
											{`Mostrando registros del ${(dataLength * pages.current) - (dataLength - 1) || 0} al ${(dataLength * pages.current) - (dataLength - data.total) || 0} de un total de ${data.total || 0} registros`}
174
										</p>
179
										</p>
175
										<TablePagination
180
										<TablePagination
176
											onDecrement={(e) => setPages(prev => prev.current -= 1)}
181
											onDecrement={() => setPages(prev => prev.current -= 1)}
177
											onIncrement={(e) => setPages(prev => prev.current += 1)}
182
											onIncrement={() => setPages(prev => prev.current += 1)}
178
											totalPages={pages.last}
183
											totalPages={pages.last}
179
											currentPage={pages.current}
184
											currentPage={pages.current}
180
										/>
185
										/>
181
									</div>
186
									</div>
182
								</Card.Body>
187
								</Card.Body>
183
							</Card>
188
							</Card>
184
						</div>
189
						</div>
185
					</div >
190
					</div >
186
				</div >
191
				</div >
187
			</section >
192
			</section >
-
 
193
			<AddModal
-
 
194
				email_link={email_link}
-
 
195
				add_link={add_link}
-
 
196
				closeModal={() => setIsShowAddModal(false)}
-
 
197
				isOpen={isShowAddModal}
-
 
198
			/>
188
			<DeleteModal
199
			<DeleteModal
189
				url={actionLink}
200
				url={actionLink}
190
				isOpen={showDeleteModal}
201
				isOpen={showDeleteModal}
191
				closeModal={() => setShowDeleteModal(false)}
202
				closeModal={() => setShowDeleteModal(false)}
192
				title="Esta seguro de borrar esta vacante?"
203
				title="Esta seguro de borrar esta vacante?"