diff --git a/gestion_conge/__pycache__/views.cpython-310.pyc b/gestion_conge/__pycache__/views.cpython-310.pyc index 32be970..176c828 100644 Binary files a/gestion_conge/__pycache__/views.cpython-310.pyc and b/gestion_conge/__pycache__/views.cpython-310.pyc differ diff --git a/gestion_projet/__pycache__/urls.cpython-310.pyc b/gestion_projet/__pycache__/urls.cpython-310.pyc index 8e7cb09..1a95b18 100644 Binary files a/gestion_projet/__pycache__/urls.cpython-310.pyc and b/gestion_projet/__pycache__/urls.cpython-310.pyc differ diff --git a/gestion_projet/__pycache__/views.cpython-310.pyc b/gestion_projet/__pycache__/views.cpython-310.pyc index ad531d9..a986bd0 100644 Binary files a/gestion_projet/__pycache__/views.cpython-310.pyc and b/gestion_projet/__pycache__/views.cpython-310.pyc differ diff --git a/gestion_salle/__pycache__/models.cpython-310.pyc b/gestion_salle/__pycache__/models.cpython-310.pyc index cf5d983..ce668cc 100644 Binary files a/gestion_salle/__pycache__/models.cpython-310.pyc and b/gestion_salle/__pycache__/models.cpython-310.pyc differ diff --git a/gestion_salle/__pycache__/views.cpython-310.pyc b/gestion_salle/__pycache__/views.cpython-310.pyc index f45a192..cf85ac6 100644 Binary files a/gestion_salle/__pycache__/views.cpython-310.pyc and b/gestion_salle/__pycache__/views.cpython-310.pyc differ diff --git a/gestion_salle/static/gestion_salle/js/index.js b/gestion_salle/static/gestion_salle/js/index.js index b509b7a..33bb66a 100644 --- a/gestion_salle/static/gestion_salle/js/index.js +++ b/gestion_salle/static/gestion_salle/js/index.js @@ -39,11 +39,6 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), { $("lien_zoom_container").className = "d-none"; } - // if(data.statut !== "annulee"){ - // $("motif_refus_container").className = "d-none"; - // }else{ - // $("motif_refus").value=data.motif_refus; - // } }) } }); @@ -174,6 +169,7 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => { $("lien_zoom_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; @@ -191,6 +187,10 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => { $("besoin_ordinateur").checked=data.besoin_ordi; $("lien_zoom").value=data.lien_zoom; + if (id_user != data.employe_id){ + $("bouton-annuler").className = "d-none"; + } + const modal = new bootstrap.Modal($("modalDetailReservation")); bootstrap.Modal.getOrCreateInstance($("modalReservationAttente")).hide(); modal.show(); diff --git a/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html b/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html index 0ebff42..5f1b81b 100644 --- a/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html +++ b/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html @@ -1,4 +1,5 @@ +{% load tags_personnaliser %}