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 092b27c..91591b1 100644 --- a/gestion_salle/static/gestion_salle/js/index.js +++ b/gestion_salle/static/gestion_salle/js/index.js @@ -33,11 +33,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; - // } }) } }); @@ -168,6 +163,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; @@ -184,6 +180,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 86e1006..20bf762 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 %}