Fix/Correction affectation departement
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
Some checks failed
Organisation/sirh/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -9,7 +9,6 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
||||
{"title": "Projet", "field": "projet"},
|
||||
{"title": "Téléphone", "field": "telephone"},
|
||||
],
|
||||
// ajaxURL: url_liste_employe,
|
||||
pagination: true,
|
||||
paginationSize: 10,
|
||||
responsiveLayout : "hide"
|
||||
@@ -19,7 +18,6 @@ fetch(url_liste_employe)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success){
|
||||
console.log(data.data)
|
||||
tableau_liste_employe.setData(data.data);
|
||||
}else{
|
||||
alert(data.message);
|
||||
@@ -29,7 +27,6 @@ fetch(url_liste_employe)
|
||||
|
||||
tableau_liste_employe.on("rowClick", function (row, rowData) {
|
||||
const data = rowData.getData();
|
||||
console.log('Employé cliqué:', data);
|
||||
|
||||
document.getElementById('detail-id').value = data.id;
|
||||
document.getElementById('detail-matricule').value = data.matricule;
|
||||
@@ -215,17 +212,10 @@ $("enregistrerDetail").addEventListener("click", function() {
|
||||
const matricule = document.getElementById('detail-matricule').value;
|
||||
const departement = document.getElementById('detail-departement').value;
|
||||
|
||||
console.log('=== ENREGISTREMENT DÉTAILS ===');
|
||||
console.log('ID:', id_);
|
||||
console.log('Fonction:', fonction);
|
||||
console.log('Date embauche:', dateEmbauche);
|
||||
console.log('Matricule:', matricule);
|
||||
console.log('Département (valeur brute):', departement);
|
||||
console.log('Département (type):', typeof departement);
|
||||
console.log('Département est vide:', !departement);
|
||||
|
||||
const url_enregistrer_detail = $("modalDetailEmployeBody").dataset.url;
|
||||
const url_enregistrer_detail = document.getElementById("modalDetailEmployeBody").dataset.url;
|
||||
|
||||
console.log("Le lien de l'enregistrement :", document.getElementById("modalDetailEmployeBody").dataset)
|
||||
|
||||
const payload = {
|
||||
"id": id_,
|
||||
"fonction": fonction,
|
||||
@@ -234,9 +224,6 @@ $("enregistrerDetail").addEventListener("click", function() {
|
||||
"departement": departement
|
||||
};
|
||||
|
||||
console.log('Payload JSON:', payload);
|
||||
console.log('Payload stringifié:', JSON.stringify(payload));
|
||||
|
||||
fetch(url_enregistrer_detail, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -283,15 +270,12 @@ const listeContratExpirant = new Tabulator("#listeContratExpirant", {
|
||||
ajaxURL: $("boutonContratExpirants").dataset.urlexpirants,
|
||||
})
|
||||
|
||||
let tabContrats = null;
|
||||
/* let tabContrats = null;
|
||||
|
||||
document.getElementById("modalContratsEmploye")
|
||||
.addEventListener("show.bs.modal", function () {
|
||||
document.getElementById("modalContratsEmploye").addEventListener("show.bs.modal", function () {
|
||||
|
||||
const employeId = document.getElementById("detail-id").value;
|
||||
|
||||
console.log("Employe ID :", employeId);
|
||||
|
||||
if (!employeId) {
|
||||
alert("Aucun employé sélectionné");
|
||||
return;
|
||||
@@ -350,4 +334,4 @@ document.getElementById("modalContratsEmploye")
|
||||
.catch(error => {
|
||||
console.error("Erreur :", error);
|
||||
});
|
||||
});
|
||||
}); */
|
||||
|
||||
Reference in New Issue
Block a user