Merge branch 'main' of https://jenkins.cerfig.org/CERFIG/sirh
This commit is contained in:
@@ -3,6 +3,7 @@ const $ = (element) => document.getElementById(element);
|
||||
const url_liste_conge_attente = $("liste-demande-conges").dataset.url
|
||||
|
||||
const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -16,6 +17,9 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
=======
|
||||
layout : "fitColumns",
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
// layout : "fitColumns",
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
columns: [
|
||||
{"title": "Nom et Prénom", "field": "prenom_nom"},
|
||||
{"title": "Date de début", "field": "date_debut", formatter:"datetime", formatterParams:{
|
||||
@@ -27,6 +31,7 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
outputFormat:"dd/MM/yy",
|
||||
}},
|
||||
{"title": "Type de congé", "field": "type"},
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -40,6 +45,9 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
=======
|
||||
{"title": "Date de la demande", "field": "date_demande"},
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
{"title": "Date de la demande", "field": "date_demande", responsive: 1},
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
{"title": "Validation par supérieur hiérarchique", "field": "validation_hierarchique", formatter:"tickCross", formatterParams :{
|
||||
allowEmpty : true ,
|
||||
}},
|
||||
@@ -48,6 +56,7 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
}},
|
||||
],
|
||||
pagination: true,
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -61,6 +70,9 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
=======
|
||||
paginationSize: 5
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
paginationSize: 5,
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
})
|
||||
|
||||
const bouton_demande_conges = $("bouton-demande-conge");
|
||||
|
||||
@@ -12,6 +12,7 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
||||
// ajaxURL: url_liste_employe,
|
||||
pagination: true,
|
||||
paginationSize: 10,
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -22,6 +23,9 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
responsiveLayout : "hide"
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
})
|
||||
|
||||
fetch(url_liste_employe)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -9,6 +10,9 @@ let table;
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
let table;
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
btnEnregistrerBailleur.addEventListener('click', function() {
|
||||
const form = document.getElementById('formBailleur');
|
||||
@@ -30,9 +34,12 @@ btnEnregistrerBailleur.addEventListener('click', function() {
|
||||
alert('Ce bailleur existe déjà dans la base de données.');
|
||||
}
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
@@ -61,6 +68,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
});
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
@@ -70,3 +78,5 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
=======
|
||||
});
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
@@ -15,6 +15,7 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
currentReservationId = data.id_reservation;
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -27,6 +28,8 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
=======
|
||||
console.log(data);
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
$("id_reservation_detail").value = data.id_reservation;
|
||||
$("id_reservation_refus").value = data.id_reservation;
|
||||
$("id_reservation_zoom").value = data.id_reservation;
|
||||
@@ -41,6 +44,7 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
$("besoin_ordinateur").checked=data.besoin_ordinateur;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -65,6 +69,12 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
if (data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = "d-none";
|
||||
}
|
||||
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
})
|
||||
}
|
||||
});
|
||||
@@ -110,20 +120,26 @@ $("bouton-annuler").addEventListener("click", (e) => {
|
||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||
const url_annuler = $("formulaire-details").dataset.urlannuler;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
console.log("URL d'annulation :");
|
||||
console.log($("formulaire-details"))
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
fetch(
|
||||
url_annuler,
|
||||
{
|
||||
@@ -174,6 +190,7 @@ if($("refuserReservation")){
|
||||
const url = e.currentTarget.dataset.lienrefus;
|
||||
const idRes = $("id_reservation_detail").value;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -186,6 +203,11 @@ if($("refuserReservation")){
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
console.log(idRes);
|
||||
e.preventDefault();
|
||||
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
fetch(url, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -217,6 +239,7 @@ const tableau_reservation_attente = new Tabulator("#tableau-reservation-attente"
|
||||
tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
const data = rowData.getData();
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -232,10 +255,13 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
console.log(data);
|
||||
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
if(data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = 'd-none';
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -256,6 +282,9 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
const id_user = $("current-user-id").dataset.userid;
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
$("id_reservation_detail").value = data.id;
|
||||
$("id_reservation_refus").value = data.id;
|
||||
$("id_reservation_zoom").value = data.id;
|
||||
@@ -263,6 +292,7 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
$("employe").value=data.employe;
|
||||
$("salle").value=data.salle;
|
||||
$("statut-reservation").innerHTML=data.statut;
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
@@ -277,19 +307,27 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
=======
|
||||
$("date_evenement").value=data.date_debut;
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
$("date_debut").value = data.date_debut;
|
||||
$("date_fin").value = data.date_fin;
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
$("heure_debut").value=data.heure_debut;
|
||||
$("heure_fin").value=data.heure_fin;
|
||||
$("motif_reservation").value=data.motif_reservation;
|
||||
$("besoin_zoom").checked=data.besoin_zoom;
|
||||
$("besoin_ordinateur").checked=data.besoin_ordi;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
if (id_user != data.employe_id){
|
||||
$("bouton-annuler").className = "d-none";
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
@@ -299,6 +337,8 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
=======
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
||||
bootstrap.Modal.getOrCreateInstance($("modalReservationAttente")).hide();
|
||||
|
||||
Reference in New Issue
Block a user