diff --git a/src/actions/conseiller.actions.js b/src/actions/conseiller.actions.js index 20d7815..34a17d2 100644 --- a/src/actions/conseiller.actions.js +++ b/src/actions/conseiller.actions.js @@ -133,13 +133,12 @@ function resetCVFile() { function deleteCandidature(motif, conseiller, username, password) { return dispatch => { dispatch(request()); - userService.login(username, password).then( () => { conseillerService.deleteCandidature(motif, conseiller).then( data => { dispatch(success(data)); - history.push('/candidature-supprimee'); + window.location.pathname = '/candidature-supprimee'; }, error => { dispatch(failure(error)); @@ -148,7 +147,6 @@ function deleteCandidature(motif, conseiller, username, password) { }, error => { dispatch(failure(error.error)); - history.push('/login'); } ); diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index ea4f486..b83da42 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -165,7 +165,7 @@ $blue-france:#000091; font-size: 1rem; cursor: pointer; &:hover { - background-color: #d30000; + background-color: #d30000 !important; } } .desactiver-btn { diff --git a/src/components/anonymous/Login.js b/src/components/anonymous/Login.js index 0e4196e..0980ada 100644 --- a/src/components/anonymous/Login.js +++ b/src/components/anonymous/Login.js @@ -26,7 +26,7 @@ function Login() { function handleChange(e) { const { name, value } = e.target; - setInputs(inputs => ({ ...inputs, [name]: value })); + setInputs(inputs => ({ ...inputs, [name]: value.trim() })); } function handleSubmit() { diff --git a/src/components/connected/SupprimerCandidature.js b/src/components/connected/SupprimerCandidature.js index 2cf8bcd..e7ceecd 100644 --- a/src/components/connected/SupprimerCandidature.js +++ b/src/components/connected/SupprimerCandidature.js @@ -11,6 +11,7 @@ function SupprimerCandidature({ conseiller }) { const [displaySupprimerCandidatureForm, setDisplaySupprimerCandidatureForm] = useState(false); const [autre, setAutre] = useState(false); const [active, setActive] = useState(false); + const [clickDisabled, setClickDisabled] = useState(false); const [inputs, setInputs] = useState({ motif: '', password: '', @@ -148,7 +149,13 @@ function SupprimerCandidature({ conseiller }) { setActive(false); } }>Annuler