Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 10550 Rev 10554
Línea 7... Línea 7...
7
import { addNotification } from '../../../redux/notification/notification.actions'
7
import { addNotification } from '../../../redux/notification/notification.actions'
Línea 8... Línea 8...
8
 
8
 
Línea 182... Línea 182...
182
									<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">
183
										{
183
                                        {
184
											competencies.length
184
                                            competencies.length
185
                                            &&
185
                                            &&
186
                                            competencies.map((competency) => (
186
                                            competencies.map((competency, index) => (
187
                                            	<div className="card" key={competency.competency_uuid}>
187
                                                <div className="card" key={competency.competency_uuid}>
188
                                            		<div className="card-header">
188
                                                    <div className="card-header">
189
                                            			<h5>{competency.competency_name} - {competency.competency_type_name}</h5>
189
                                                        <h5>{competency.competency_name} - {competency.competency_type_name}</h5>
190
                                            		</div>
190
                                                    </div>
191
                                            		<div className="card-body">
191
                                                    <div className="card-body">
192
                                            			{
192
                                                        {
193
                                            				competency.behaviors
193
                                                            competency.behaviors
194
                                                            &&
194
                                                            &&
195
                                                            competency.behaviors.map((behavior) => (
195
                                                            competency.behaviors.map((behavior, index) => (
196
                                                            	<table key={behavior.uuid}>
196
                                                                <table key={behavior.uuid}>
197
                                                            		<thead>
197
                                                                    <thead>
198
                                                            			<tr>
198
                                                                        <tr>
199
                                                            				<th style={{ width: '20%' }}>Conducta Observable</th>
199
                                                                            <th style={{ width: '20%' }}>Conducta Observable</th>
200
                                                            				<th style={{ width: '60%' }}>Comentario</th>
200
                                                                            <th style={{ width: '60%' }}>Comentario</th>
201
                                                            				<th style={{ width: '20%' }}>Evaluación</th>
201
                                                                            <th style={{ width: '20%' }}>Evaluación</th>
202
                                                            			</tr>
202
                                                                        </tr>
203
                                                            		</thead>
203
                                                                    </thead>
204
                                                            		<tbody>
204
                                                                    <tbody>
205
                                                            			<tr>
205
                                                                        <tr>
206
                                                            				<td style={{ width: '20%' }}>{behavior.description}</td>
206
                                                                            <td style={{ width: '20%' }}>{behavior.description}</td>
207
                                                            				<td style={{ width: '60%' }}>
207
                                                                            <td style={{ width: '60%' }}>
208
                                                            					<textarea
208
                                                                                <textarea
209
                                                            						name="behavior-comment"
209
                                                                                    name="behavior-comment"
210
                                                            						cols="30"
-
 
211
                                                            						rows="3"
210
                                                                                    cols="30"
212
                                                            						onChange={(e) => setCompetencies(prev => {
-
 
213
                                                            							console.log([...prev])
-
 
214
                                                            							return prev
211
                                                                                    rows="3"
215
                                                            						})}
212
                                                                                    onChange={(e) => setCompetencies([...competencies, { ...competency, behaviors[index]: { ...behaviors[index], name: e.target.value } }])}
216
                                                            					/>
213
                                                                                />
217
                                                            				</td>
214
                                                                            </td>
218
                                                            				<td style={{ width: '20%' }}>
215
                                                                            <td style={{ width: '20%' }}>
219
                                                            					<select className='form-control' name='behavior-points' >
216
                                                                                <select className='form-control' name='behavior-points' >
220
                                                            						{
217
                                                                                    {
221
                                                            							pointsOptions.map(({ label, value }) => (
218
                                                                                        pointsOptions.map(({ label, value }) => (
222
                                                            								<option selected={behavior.points === value} key={value} value={value}>{label}</option>
219
                                                                                            <option selected={behavior.points === value} key={value} value={value}>{label}</option>
223
                                                            							))
220
                                                                                        ))
224
                                                            						}
221
                                                                                    }
225
                                                            					</select>
222
                                                                                </select>
226
                                                            				</td>
223
                                                                            </td>
227
                                                            			</tr>
224
                                                                        </tr>
228
                                                            		</tbody>
225
                                                                    </tbody>
229
                                                            	</table>
226
                                                                </table>
230
                                                            ))
227
                                                            ))
231
                                            			}
228
                                                        }
232
                                            		</div>
229
                                                    </div>
233
                                            	</div>
230
                                                </div>
234
                                            ))
231
                                            ))
235
										}
232
                                        }
236
									</div>
233
                                    </div>
237
									<div className="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
234
                                    <div className="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
238
										<div className="form-group">
235
                                        <div className="form-group">
239
											<label>Comentario</label>
236
                                            <label>Comentario</label>
240
											<input type="text" name="comment" className="form-control" ref={register} />
237
                                            <input type="text" name="comment" className="form-control" ref={register} />
241
										</div>
238
                                        </div>
242
										<div className="form-group">
239
                                        <div className="form-group">
243
											<label>Evaluación</label>
240
                                            <label>Evaluación</label>
244
											<select className='form-control' name='points' ref={register}>
241
                                            <select className='form-control' name='points' ref={register}>
245
												{
242
                                                {
246
													pointsOptions.map(({ label, value }) => (
243
                                                    pointsOptions.map(({ label, value }) => (
247
														<option selected={watch('points') === value} key={value} value={value}>{label}</option>
244
                                                        <option selected={watch('points') === value} key={value} value={value}>{label}</option>
248
													))
245
                                                    ))
249
												}
246
                                                }
250
											</select>
247
                                            </select>
251
										</div>
248
                                        </div>
252
										<div className="form-group">
249
                                        <div className="form-group">
253
											<label>Estatus</label>
250
                                            <label>Estatus</label>
254
											<select className='form-control' name='status' ref={register}>
251
                                            <select className='form-control' name='status' ref={register}>
255
												{
252
                                                {
256
													statusOptions.map(({ label, value }) => (
253
                                                    statusOptions.map(({ label, value }) => (
257
														<option selected={watch('status') === value} key={value} value={value}>{label}</option>
254
                                                        <option selected={watch('status') === value} key={value} value={value}>{label}</option>
258
													))
255
                                                    ))
259
												}
256
                                                }
260
											</select>
257
                                            </select>
261
										</div>
258
                                        </div>
262
									</div>
259
                                    </div>
263
								</div>
260
                                </div>
264
								<div className="form-group">
261
                                <div className="form-group">
265
									<button type="submit" className="btn btn-primary btn-form-save-close mr-2">
262
                                    <button type="submit" className="btn btn-primary btn-form-save-close mr-2">
266
                                        Guardar
263
                                        Guardar
267
									</button>
264
                                    </button>
268
									<button
265
                                    <button
269
										type="button"
266
                                        type="button"
270
										className="btn btn-secondary btn-edit-cancel"
267
                                        className="btn btn-secondary btn-edit-cancel"
271
										onClick={() => history.goBack()}
268
                                        onClick={() => history.goBack()}
272
									>
269
                                    >
273
                                        Cancelar
270
                                        Cancelar
274
									</button>
271
                                    </button>
275
								</div>
272
                                </div>
276
							</div>
273
                            </div>
277
						</div>
274
                        </div>
278
					</div>
275
                    </div>
279
				</div>
276
                </div>
280
			</div>
277
            </div>
281
		</section >
278
        </section >
282
	)
279
    )