|
@@ -63,8 +63,8 @@ function Edit(props) {
|
|
|
queryClient.invalidateQueries('puestos')
|
|
queryClient.invalidateQueries('puestos')
|
|
|
},
|
|
},
|
|
|
onError:() => {
|
|
onError:() => {
|
|
|
- close();
|
|
|
|
|
- setOpen(false)
|
|
|
|
|
|
|
+ //close();
|
|
|
|
|
+ //setOpen(false)
|
|
|
toast.error("Lo sentimos ocurrió error inténtalo más tarde")
|
|
toast.error("Lo sentimos ocurrió error inténtalo más tarde")
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -124,7 +124,7 @@ function Edit(props) {
|
|
|
let { areadeptoplz_id, fecha, tests } = response.data;
|
|
let { areadeptoplz_id, fecha, tests } = response.data;
|
|
|
let temp_test = tests.map( t => ({ id : t.id} ))
|
|
let temp_test = tests.map( t => ({ id : t.id} ))
|
|
|
setChecklist(temp_test.map( t => t.id))
|
|
setChecklist(temp_test.map( t => t.id))
|
|
|
- reset({...response.data, areadepto : areadeptoplz_id, fecha : new Date(fecha) , tests : temp_test })
|
|
|
|
|
|
|
+ reset({...response.data, aredepto : areadeptoplz_id, fecha : new Date(fecha) , tests : temp_test })
|
|
|
})
|
|
})
|
|
|
.catch(console.log)
|
|
.catch(console.log)
|
|
|
},[visible, auth,reset])
|
|
},[visible, auth,reset])
|
|
@@ -199,8 +199,8 @@ function Edit(props) {
|
|
|
<FormControl fullWidth>
|
|
<FormControl fullWidth>
|
|
|
<InputLabel>Departamento</InputLabel>
|
|
<InputLabel>Departamento</InputLabel>
|
|
|
<Controller
|
|
<Controller
|
|
|
- helperText={errors.areadepto?.message}
|
|
|
|
|
- error={Boolean(errors?.areadepto)}
|
|
|
|
|
|
|
+ helperText={errors.aredepto?.message}
|
|
|
|
|
+ error={Boolean(errors?.aredepto)}
|
|
|
name="aredepto"
|
|
name="aredepto"
|
|
|
control={control}
|
|
control={control}
|
|
|
render={ ({field}) =>
|
|
render={ ({field}) =>
|