Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 14233 Rev 14234
Línea 16... Línea 16...
16
 
16
 
17
	// Hooks
17
	// Hooks
18
	const dispatch = useDispatch()
18
	const dispatch = useDispatch()
19
	const history = useHistory()
19
	const history = useHistory()
-
 
20
	const { action } = useParams()
-
 
21
	const {
-
 
22
		setValue,
-
 
23
		register,
-
 
24
		watch,
-
 
25
		handleSubmit,
-
 
26
		errors,
20
	const { action } = useParams()
27
		clearErrors
Línea 21... Línea 28...
21
	const { setValue, register, watch, handleSubmit } = useForm()
28
	} = useForm()
22
 
29
 
-
 
30
	//States
-
 
31
	const [supervisers, setSupervisers] = useState([])
Línea 23... Línea 32...
23
	//States
32
	const [initObjectives, setInitObjectives] = useState('')
Línea 24... Línea 33...
24
	const [supervisers, setSupervisers] = useState([])
33
	const [initFunctions, setInitFunctions] = useState('')
25
 
34
 
Línea 86... Línea 95...
86
					return {
95
					return {
87
						key: option.name,
96
						key: option.name,
88
						value: option.uuid
97
						value: option.uuid
89
					}
98
					}
90
				}))
99
				}))
-
 
100
				setInitObjectives(data.data['objectives'])
-
 
101
				setInitFunctions(data.data['functions'])
-
 
102
 
91
				setValue('name', data.data['name'])
103
				setValue('name', data.data['name'])
92
				setValue('status', data.data['status'])
104
				setValue('status', data.data['status'])
93
				setValue('objectives', data.data['objectives'])
-
 
94
				setValue('functions', data.data['functions'])
-
 
95
				setValue('job_description_id_boss', data.data['job_description_id_boss'])
105
				setValue('job_description_id_boss', data.data['job_description_id_boss'])
Línea 96... Línea 106...
96
 
106
 
97
			})
107
			})
Línea 152... Línea 162...
152
												</div>
162
												</div>
153
												<div className="d-flex">
163
												<div className="d-flex">
154
													<div className="form-group w-100">
164
													<div className="form-group w-100">
155
														<label>Objetivo</label>
165
														<label>Objetivo</label>
156
														<CKEditor
166
														<CKEditor
-
 
167
															onChange={(e) => {
-
 
168
																const text = e.editor.getData()
157
															onChange={(e) => setValue('objectives', e.editor.getData())}
169
																setValue('objectives', text)
-
 
170
																if (errors.objectives) {
-
 
171
																	clearErrors('objectives')
-
 
172
																}
-
 
173
															}}
158
															initData={watch('objectives')}
174
															initData={initObjectives}
159
															config={config}
175
															config={config}
160
															name="objectives"
176
															name="objectives"
161
														/>
177
														/>
162
													</div>
178
													</div>
163
												</div>
179
												</div>