Commit 63106fac authored by wilhelmhb's avatar wilhelmhb

débugage de suppression d'un rucher et déconnexion

parent d8985156
......@@ -154,13 +154,16 @@ function logout() {
},
success: function(data) {
//what to do on success
finCharge();
connect();
debut(); //il faut retourner au début et faire comme si on reprenait tout à 0 : comment ?
finCharge();
connect();
},
error: function (xhr, ajaxOptions, thrownError) {
//what to do on failure
console.log('failure');
finCharge();
afficherBd("Un problème est survenu","Fermer");
console.log('fin failure');
}
});
}
......
......@@ -96,14 +96,19 @@ function deleteHiveGroup() {
withCredentials: true
},
//data: 'idclient=1&idruche=25&nomruche=NomDeMaRuche',
success: function(data) {
finCharge();
goToListHives(1);
},
success: function(data) {
donneesRuches.hivegroups.splice(idHiveGroup, 1);
if(idHiveGroup > 0) {
idHiveGroup--;
rucher--;
}
finCharge();
goToListHives(1);
},
error: function (xhr, ajaxOptions, thrownError) {
finCharge();
console.log(thrownError);
afficherBd("Une erreur est survenue","Fermer");
finCharge();
console.log(thrownError);
afficherBd("Une erreur est survenue","Fermer");
}
});
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment