Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 14237 Rev 14238
Línea 70... Línea 70...
70
					msg: `Registro ${action === 'edit' ? 'actualizado' : 'añadido'}`
70
					msg: `Registro ${action === 'edit' ? 'actualizado' : 'añadido'}`
71
				}))
71
				}))
72
			})
72
			})
73
	}
73
	}
Línea 74... Línea 74...
74
 
74
 
75
	const handleSetCompetencies = () => {
75
	const àddCompetencies = () => {
76
		const current_competency = competencyOptions.find(competency => competency.competency_id === selectInput.current.value)
76
		const current_competency = competencyOptions.find(competency => competency.competency_id === selectInput.current.value)
77
		console.log(current_competency)
77
		console.log(current_competency)
78
		setCompetenciesSelected(prev => [current_competency, ...prev])
78
		setCompetenciesSelected(prev => [current_competency, ...prev])
Línea 171... Línea 171...
171
														<label>Objetivo</label>
171
														<label>Objetivo</label>
172
														{
172
														{
173
															initObjectives
173
															initObjectives
174
															&&
174
															&&
175
															<CKEditor
175
															<CKEditor
176
																data={initObjectives}
-
 
177
																onChange={(e) => setValue('objectives', e.editor.getData())}
176
																onChange={(e) => setValue('objectives', e.editor.getData())}
-
 
177
																onInstanceReady={(e) => e.editor.setData(initObjectives)}
178
																config={config}
178
																config={config}
179
																name="objectives"
179
																name="objectives"
180
															/>
180
															/>
181
														}
181
														}
182
													</div>
182
													</div>
Línea 186... Línea 186...
186
														<label>Funciones</label>
186
														<label>Funciones</label>
187
														{
187
														{
188
															initFunctions
188
															initFunctions
189
															&&
189
															&&
190
															<CKEditor
190
															<CKEditor
191
																data={initFunctions}
-
 
192
																onChange={(e) => setValue('functions', e.editor.getData())}
191
																onChange={(e) => setValue('functions', e.editor.getData())}
-
 
192
																onInstanceReady={(e) => e.editor.setData(initFunctions)}
193
																config={config}
193
																config={config}
194
																name="functions"
194
																name="functions"
195
															/>
195
															/>
196
														}
196
														}
197
													</div>
197
													</div>
Línea 199... Línea 199...
199
											</div>
199
											</div>
200
										</div>
200
										</div>
201
										<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
201
										<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
202
											<div className="card p-2">
202
											<div className="card p-2">
203
												<div className="d-flex justify-content-around">
203
												<div className="d-flex justify-content-around">
-
 
204
													<div className="col-9">
204
													<select className='form-control' name="job_description_id_boss" ref={selectInput}>
205
														<select className='form-control' name="job_description_id_boss" ref={selectInput}>
205
														<option value="">Seleccione</option>
206
															<option value="">Seleccione</option>
206
														{
207
															{
207
															competencyOptions.map((competency) => {
208
																competencyOptions.map((competency) => {
208
																const competency_type = competencyTypeOptions.find(type => type.competency_type_id === competency.competency_type_id)
209
																	const competency_type = competencyTypeOptions.find(type => type.competency_type_id === competency.competency_type_id)
209
 
210
 
210
																return (
211
																	return (
211
																	<option
212
																		<option
212
																		key={competency.competency_id}
213
																			key={competency.competency_id}
213
																		value={competency.competency_id}>
214
																			value={competency.competency_id}>
214
																		{`${competency_type} - ${competency.name}`}
215
																			{`${competency_type.name} - ${competency.name}`}
215
																	</option>
216
																		</option>
216
																)
217
																	)
217
															})
218
																})
218
														}
219
															}
219
													</select>
220
														</select>
-
 
221
													</div>
-
 
222
													<div className='col-3'>
220
													<button
223
														<button
221
														className='btn btn-primary'
224
															className='btn btn-primary'
222
														onClick={handleSetCompetencies}
225
															onClick={àddCompetencies}
223
													>
226
														>
224
														Agregar Competencia
227
															Agregar Competencia
225
													</button>
228
														</button>
-
 
229
													</div>
226
												</div>
230
												</div>
227
											</div>
231
											</div>
228
										</div>
232
										</div>
229
										<div className="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">
233
										<div className="tab-pane fade" id="contact" role="tabpanel" aria-labelledby="contact-tab">