Ajout de la barre de navigation
This commit is contained in:
@@ -188,6 +188,7 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -204,6 +205,16 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
$("besoin_ordinateur").checked=data.besoin_ordi;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
console.log("Verification de data :", data);
|
||||
|
||||
const refuserReservation = document.querySelector("#refuserReservation");
|
||||
const bouton_valider = document.querySelector("#bouton-valider");
|
||||
|
||||
if((refuserReservation | bouton_valider) && data.statut === "En attente"){
|
||||
refuserReservation.style.display = "inline-block";
|
||||
bouton_valider.style.display = "inline-block";
|
||||
}
|
||||
|
||||
if (id_user != data.employe_id){
|
||||
$("bouton-annuler").className = "d-none";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user