This commit is contained in:
2026-09-03 14:25:28 +00:00
36 changed files with 292 additions and 252 deletions

View File

@@ -16,6 +16,7 @@ const tableau_certificat = new Tabulator("#tableau-certificat", {
],
ajaxURL: url_certificat,
})
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
@@ -53,28 +54,35 @@ enregistrerProfil.addEventListener("click", (e) => {
=======
>>>>>>> 6026af5 (Bug : Affichages des conges)
=======
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
const enregistrerProfil = $("enregistrerProfil");
enregistrerProfil.addEventListener("click", (e) => {
const url = $("information-personnelles").dataset.url;
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
const formData = new FormData();
formData.append("nom", $("nom").value);
formData.append("prenom", $("prenom").value);
formData.append("email", $("email").value);
formData.append("telephone", $("telephone").value);
formData.append("adresse", $("adresse").value);
formData.append("sexe", $("sexe").value);
formData.append("date_naissance", $("date_naissance").value);
fetch(url, {
method: 'POST',
method: "POST",
headers: {
'Content-Type': 'application/json',
'X-CSRFToken': csrftoken
"X-CSRFToken": csrftoken
},
body: JSON.stringify({
"nom": $("nom").value,
"prenom": $("prenom").value,
"email": $("email").value,
"telephone": $("telephone").value,
"adresse": $("adresse").value,
"sexe": $("sexe").value,
"date_naissance": $("date_naissance").value,
})
body: formData
})
.then(response => response.json())
.then(data => alert(data.message))
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
})
@@ -85,3 +93,7 @@ enregistrerProfil.addEventListener("click", (e) => {
=======
})
>>>>>>> 6026af5 (Bug : Affichages des conges)
=======
.catch(error => console.error("Erreur:", error));
});
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5