Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 11160 Rev 11163
Línea 91... Línea 91...
91
	useEffect(() => {
91
	useEffect(() => {
92
		if (action === 'edit') {
92
		if (action === 'edit') {
93
			axios.get(actionLink)
93
			axios.get(actionLink)
94
				.then(({ data }) => {
94
				.then(({ data }) => {
95
					const respData = data.data
95
					const respData = data.data
96
 
-
 
97
					if (data.success) {
96
					if (data.success) {
98
						setValue('name', respData.name)
-
 
99
						setValue('description', respData.description)
-
 
100
						setLocationLabel(respData.formatted_address)
97
						setLocationLabel(respData.formatted_address)
101
						setYear(respData.last_date)
98
						setYear(respData.last_date)
102
						respData.status === 'a' ? setIsActive(true) : setIsActive(false)
99
						respData.status === 'a' ? setIsActive(true) : setIsActive(false)
Línea 103... Línea 100...
103
 
100
 
Línea 111... Línea 108...
111
 
108
 
112
						Object.entries(respData.job_description.description_options).map(([value, label]) => {
109
						Object.entries(respData.job_description.description_options).map(([value, label]) => {
113
							setJobsDescriptions(prev => [...prev, { value: value, label: label }])
110
							setJobsDescriptions(prev => [...prev, { value: value, label: label }])
Línea -... Línea 111...
-
 
111
						})
-
 
112
 
-
 
113
						register('description')
-
 
114
						setValue('name', respData.name)
114
						})
115
						setValue('description', respData.description)
115
 
116
 
116
					}
117
					}
117
				})
118
				})
Línea 218... Línea 219...
218
						<div className="form-group">
219
						<div className="form-group">
219
							<button
220
							<button
220
								type="submit"
221
								type="submit"
221
								className="btn btn-primary btn-form-save-close mr-2"
222
								className="btn btn-primary btn-form-save-close mr-2"
222
							>
223
							>
223
                Guardar
224
								Guardar
224
							</button>
225
							</button>
225
							<button
226
							<button
226
								type="button"
227
								type="button"
227
								className="btn btn-secondary btn-edit-cancel"
228
								className="btn btn-secondary btn-edit-cancel"
228
								onClick={() => history.goBack()}
229
								onClick={() => history.goBack()}
229
							>
230
							>
230
                Cancelar
231
								Cancelar
231
							</button>
232
							</button>
232
						</div>
233
						</div>
233
					</form>
234
					</form>
234
				</div>
235
				</div>
235
			</div>
236
			</div>