Bug : Affichages des conges

This commit is contained in:
2026-04-30 13:28:57 +02:00
committed by Soriba SYLLA
parent 91bdd791f1
commit 6026af5498
263 changed files with 44164 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
btnEnregistrerBailleur.addEventListener('click', function() {
const form = document.getElementById('formBailleur');
const formData = new FormData(form);
fetch(form.action, {
method: 'POST',
body: formData,
headers: {
'X-CSRFToken': formData.get('csrfmiddlewaretoken')
}
})
.then(response => response.json())
.then(data => {
if (data.success) {
alert('Bailleur enregistré avec succès !');
window.location.reload();
} else {
alert('Ce bailleur existe déjà dans la base de données.');
}
});
});