Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 10532 Rev 10540
Línea -... Línea 1...
-
 
1
/* eslint-disable no-mixed-spaces-and-tabs */
1
import axios from 'axios'
2
import axios from 'axios'
2
import React, { useState, useEffect } from 'react'
3
import React, { useState, useEffect } from 'react'
3
import { useForm } from 'react-hook-form'
4
import { useForm } from 'react-hook-form'
4
import { useDispatch } from 'react-redux'
5
import { useDispatch } from 'react-redux'
5
import { useHistory, useParams } from 'react-router-dom'
6
import { useHistory, useParams } from 'react-router-dom'
Línea 37... Línea 38...
37
	const [candidatesOptions, setCandidatesOptions] = useState([
38
	const [candidatesOptions, setCandidatesOptions] = useState([
38
		{ label: 'Estatus', value: '' },
39
		{ label: 'Estatus', value: '' },
39
		{ label: 'Aceptado', value: 'a' },
40
		{ label: 'Aceptado', value: 'a' },
40
		{ label: 'Rechazado', value: 'r' }
41
		{ label: 'Rechazado', value: 'r' }
41
	])
42
	])
-
 
43
	const [competencies, setCompetencies] = useState([])
Línea 42... Línea 44...
42
 
44
 
43
	// Hooks
45
	// Hooks
44
	const { setValue, register, watch } = useForm()
46
	const { setValue, register, watch } = useForm()
45
	const history = useHistory()
47
	const history = useHistory()
Línea 62... Línea 64...
62
					}
64
					}
Línea 63... Línea 65...
63
 
65
 
64
					setValue('comment', resData.interview.comment)
66
					setValue('comment', resData.interview.comment)
65
					setValue('points', resData.interview.points)
67
					setValue('points', resData.interview.points)
-
 
68
					setValue('status', resData.interview.status)
66
					setValue('status', resData.interview.status)
69
					setCompetencies(resData.job_description.competencies)
67
					setGeneralOptions({
70
					setGeneralOptions({
68
						...generalOptions,
71
						...generalOptions,
69
						name: resData.vacancy.name,
72
						name: resData.vacancy.name,
70
						uuid: resData.vacancy.uuid,
73
						uuid: resData.vacancy.uuid,
Línea 176... Línea 179...
176
											</div>
179
											</div>
177
										</div>
180
										</div>
178
									</div>
181
									</div>
179
									<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
182
									<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
180
										{
183
										{
181
											competencies.map((competency) => (
184
											competencies.length
-
 
185
                                            &&
-
 
186
                                            competencies.map((competency) => (
182
												<div className="card" key={competency.competency_uuid}>
187
                                            	<div className="card" key={competency.competency_uuid}>
183
													<div className="card-header">
188
                                            		<div className="card-header">
184
														<h5>{competency.competency_name} - {competency.competency_type_name}</h5>
189
                                            			<h5>{competency.competency_name} - {competency.competency_type_name}</h5>
185
													</div>
190
                                            		</div>
186
													<div className="card-body">
191
                                            		<div className="card-body">
187
														{
192
                                            			{
188
															competency.behaviors
193
                                            				competency.behaviors
189
                                                            &&
194
                                                            &&
190
                                                            competency.behaviors.map((behavior) => (
195
                                                            competency.behaviors.map((behavior) => (
191
                                                            	<table key={behavior.uuid}>
196
                                                            	<table key={behavior.uuid}>
192
                                                            		<thead>
197
                                                            		<thead>
193
                                                            			<tr>
198
                                                            			<tr>
Línea 220... Línea 225...
220
                                                            				</td>
225
                                                            				</td>
221
                                                            			</tr>
226
                                                            			</tr>
222
                                                            		</tbody>
227
                                                            		</tbody>
223
                                                            	</table>
228
                                                            	</table>
224
                                                            ))
229
                                                            ))
225
														}
230
                                            			}
226
													</div>
231
                                            		</div>
227
												</div>
232
                                            	</div>
228
											))
233
                                            ))
229
										}
234
										}
230
									</div>
235
									</div>
231
									<div className="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
236
									<div className="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
232
										<div className="form-group">
237
										<div className="form-group">
233
											<label>Comentario</label>
238
											<label>Comentario</label>