Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15079 Rev 15083
Línea 3... Línea 3...
3
import React, { useState, useEffect } from 'react'
3
import React, { useState, useEffect } from 'react'
4
import { useForm } from 'react-hook-form'
4
import { useForm } from 'react-hook-form'
5
import { useDispatch } from 'react-redux'
5
import { useDispatch } from 'react-redux'
6
import { useHistory, useParams } from 'react-router-dom'
6
import { useHistory, useParams } from 'react-router-dom'
7
import { addNotification } from '../../../redux/notification/notification.actions'
7
import { addNotification } from '../../../redux/notification/notification.actions'
8
 
-
 
9
const pointsOptions = [
-
 
10
	{ label: 'N/A', value: 0 },
-
 
11
	{ label: '25%', value: 1 },
-
 
12
	{ label: '50%', value: 2 },
-
 
13
	{ label: '75%', value: 3 },
8
import parse from 'html-react-parser'
14
	{ label: '100%', value: 4 }
-
 
15
]
-
 
Línea 16... Línea 9...
16
 
9
 
Línea 17... Línea 10...
17
const EvaluationView = ({ actionLink, setActionLink }) => {
10
const EvaluationView = ({ actionLink, setActionLink }) => {
18
 
11
 
Línea 130... Línea 123...
130
								<div className="card-body">
123
								<div className="card-body">
131
									<div className="tab-content" id="myTabContent">
124
									<div className="tab-content" id="myTabContent">
132
										<div className="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
125
										<div className="tab-pane fade show active" id="home" role="tabpanel" aria-labelledby="home-tab">
133
											<div className="card">
126
											<div className="card">
134
												<div className="card-body">
127
												<div className="card-body">
135
													<h5>{jobDescription.name}</h5>
128
													<h5 className='mb-3 bold'>{jobDescription.name}</h5>
136
													<h6>Funciones</h6>
129
													<h6>Funciones</h6>
137
													<p>{jobDescription.functions}</p>
130
													<p>{parse(jobDescription.functions)}</p>
138
													<h6>Objetivos</h6>
131
													<h6>Objetivos</h6>
139
													<p>{jobDescription.objectives}</p>
132
													<p>{parse(jobDescription.objectives)}</p>
140
												</div>
133
												</div>
141
											</div>
134
											</div>
142
										</div>
135
										</div>
143
										<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
136
										<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
144
											{
137
											{
Línea 165... Línea 158...
165
																			</thead>
158
																			</thead>
166
																			<tbody>
159
																			<tbody>
167
																				<tr>
160
																				<tr>
168
																					<td style={{ width: '20%' }}>{behavior.description}</td>
161
																					<td style={{ width: '20%' }}>{behavior.description}</td>
169
																					<td style={{ width: '60%' }}>
162
																					<td style={{ width: '60%' }}>
170
																						<textarea
163
																						<input
171
																							name={`${behavior.competency_uuid}-${behavior.uuid}-comment`}
164
																							name={`${behavior.competency_uuid}-${behavior.uuid}-comment`}
172
																							cols="30"
-
 
173
																							rows="3"
-
 
174
																							ref={register}
165
																							ref={register}
175
																							className='form-control w100'
166
																							className='form-control w-100' />
176
																						/>
-
 
177
																					</td>
167
																					</td>
178
																					<td style={{ width: '20%' }}>
168
																					<td style={{ width: '20%' }}>
179
																						<select className='form-control' name={`select-${behavior.competency_uuid}-${behavior.uuid}`} ref={register}>
-
 
180
																							{
169
																						<input
181
																								pointsOptions.map(({ label, value }) => {
170
																							type="number"
182
																									return <option selected={watch(`select-${behavior.competency_uuid}-${behavior.uuid}`) === value} key={value} value={value}>{label}</option>
-
 
183
																								})
171
																							className='form-control'
184
																							}
172
																							name={`select-${behavior.competency_uuid}-${behavior.uuid}`}
185
																						</select>
173
																							ref={register} />
186
																					</td>
174
																					</td>
187
																				</tr>
175
																				</tr>
188
																			</tbody>
176
																			</tbody>
189
																		</table>
177
																		</table>
190
																	))
178
																	))
Línea 200... Línea 188...
200
												<label>Comentario</label>
188
												<label>Comentario</label>
201
												<textarea type="text" name="comment" className="form-control" rows="5" cols="50" ref={register} />
189
												<textarea type="text" name="comment" className="form-control" rows="5" cols="50" ref={register} />
202
											</div>
190
											</div>
203
											<div className="form-group">
191
											<div className="form-group">
204
												<label>Evaluación</label>
192
												<label>Evaluación</label>
205
												<select className='form-control' name='points' ref={register}>
-
 
206
													{
193
												<input
207
														pointsOptions.map(({ label, value }) => (
194
													type="number"
208
															<option selected={watch('points') === value} key={value} value={value}>{label}</option>
-
 
209
														))
195
													className='form-control'
210
													}
196
													name='points'
211
												</select>
197
													ref={register} />
212
											</div>
198
											</div>
213
										</div>
199
										</div>
214
									</div>
200
									</div>
215
									<div className="form-group">
201
									<div className="form-group">
216
										<button type="submit" className="btn btn-primary btn-form-save-close mr-2">
202
										<button type="submit" className="btn btn-primary btn-form-save-close mr-2">