Premiere implementation de sso
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
This commit is contained in:
@@ -15,7 +15,6 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
currentReservationId = data.id_reservation;
|
||||
console.log(data);
|
||||
$("id_reservation_detail").value = data.id_reservation;
|
||||
$("id_reservation_refus").value = data.id_reservation;
|
||||
$("id_reservation_zoom").value = data.id_reservation;
|
||||
@@ -30,11 +29,10 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
$("besoin_ordinateur").checked=data.besoin_ordinateur;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
if(data.statut !== "annulee"){
|
||||
$("motif_refus_container").className = "d-none";
|
||||
}else{
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
if (data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = "d-none";
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
});
|
||||
@@ -80,6 +78,11 @@ $("bouton-annuler").addEventListener("click", (e) => {
|
||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||
const url_annuler = $("formulaire-details").dataset.urlannuler;
|
||||
|
||||
console.log("URL d'annulation :");
|
||||
console.log($("formulaire-details"))
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
fetch(
|
||||
url_annuler,
|
||||
{
|
||||
@@ -130,6 +133,9 @@ if($("refuserReservation")){
|
||||
const url = e.currentTarget.dataset.lienrefus;
|
||||
const idRes = $("id_reservation_detail").value;
|
||||
|
||||
console.log(idRes);
|
||||
e.preventDefault();
|
||||
|
||||
fetch(url, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -161,16 +167,11 @@ const tableau_reservation_attente = new Tabulator("#tableau-reservation-attente"
|
||||
tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
const data = rowData.getData();
|
||||
|
||||
console.log(data);
|
||||
|
||||
if(data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = 'd-none';
|
||||
}
|
||||
|
||||
if(data.statut !== "refusee"){
|
||||
$("motif_refus_container").className = 'd-none';
|
||||
}
|
||||
|
||||
const id_user = $("current-user-id").dataset.userid;
|
||||
$("id_reservation_detail").value = data.id;
|
||||
$("id_reservation_refus").value = data.id;
|
||||
$("id_reservation_zoom").value = data.id;
|
||||
@@ -178,16 +179,20 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
$("employe").value=data.employe;
|
||||
$("salle").value=data.salle;
|
||||
$("statut-reservation").innerHTML=data.statut;
|
||||
$("date_evenement").value=data.date_debut;
|
||||
$("date_debut").value = data.date_debut;
|
||||
$("date_fin").value = data.date_fin;
|
||||
$("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;
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
|
||||
if (id_user != data.employe_id){
|
||||
$("bouton-annuler").className = "d-none";
|
||||
}
|
||||
|
||||
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
||||
bootstrap.Modal.getOrCreateInstance($("modalReservationAttente")).hide();
|
||||
modal.show();
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user