From 671072864d46c5c477f131e444b6a906aeb232d0 Mon Sep 17 00:00:00 2001 From: Soriba SYLLA Date: Thu, 7 May 2026 14:44:16 +0000 Subject: [PATCH] Bug: Details des reservations --- SIRH/__pycache__/__init__.cpython-310.pyc | Bin 126 -> 126 bytes SIRH/__pycache__/settings.cpython-310.pyc | Bin 3074 -> 3074 bytes SIRH/__pycache__/urls.cpython-310.pyc | Bin 1519 -> 1519 bytes SIRH/__pycache__/views.cpython-310.pyc | Bin 1249 -> 1249 bytes SIRH/__pycache__/wsgi.cpython-310.pyc | Bin 523 -> 523 bytes .../fonctions_utilitaire.cpython-310.pyc | Bin 2234 -> 2234 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 135 -> 135 bytes .../__pycache__/admin.cpython-310.pyc | Bin 176 -> 176 bytes .../__pycache__/apps.cpython-310.pyc | Bin 427 -> 427 bytes .../__pycache__/forms.cpython-310.pyc | Bin 861 -> 861 bytes .../__pycache__/models.cpython-310.pyc | Bin 1287 -> 1287 bytes .../__pycache__/urls.cpython-310.pyc | Bin 554 -> 554 bytes .../__pycache__/views.cpython-310.pyc | Bin 6196 -> 6196 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 137 -> 137 bytes .../__pycache__/admin.cpython-310.pyc | Bin 628 -> 628 bytes .../__pycache__/forms.cpython-310.pyc | Bin 2742 -> 2742 bytes .../__pycache__/models.cpython-310.pyc | Bin 5607 -> 5607 bytes .../__pycache__/urls.cpython-310.pyc | Bin 1511 -> 1511 bytes .../__pycache__/views.cpython-310.pyc | Bin 14436 -> 14436 bytes .../tags_personnaliser.cpython-310.pyc | Bin 1120 -> 1120 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 136 -> 136 bytes .../__pycache__/admin.cpython-310.pyc | Bin 441 -> 441 bytes .../__pycache__/forms.cpython-310.pyc | Bin 4554 -> 4554 bytes .../__pycache__/models.cpython-310.pyc | Bin 7657 -> 7657 bytes .../__pycache__/urls.cpython-310.pyc | Bin 2297 -> 2297 bytes .../__pycache__/views.cpython-310.pyc | Bin 16282 -> 16282 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 135 -> 135 bytes .../__pycache__/admin.cpython-310.pyc | Bin 176 -> 176 bytes .../__pycache__/apps.cpython-310.pyc | Bin 370 -> 370 bytes .../__pycache__/forms.cpython-310.pyc | Bin 1556 -> 1556 bytes .../__pycache__/models.cpython-310.pyc | Bin 1534 -> 1502 bytes .../__pycache__/urls.cpython-310.pyc | Bin 929 -> 929 bytes .../__pycache__/views.cpython-310.pyc | Bin 7366 -> 7363 bytes gestion_salle/models.py | 2 +- .../static/gestion_salle/js/index.js | 5 ++++- gestion_salle/views.py | 6 ++---- 36 files changed, 7 insertions(+), 6 deletions(-) diff --git a/SIRH/__pycache__/__init__.cpython-310.pyc b/SIRH/__pycache__/__init__.cpython-310.pyc index 5e35e101034e117fd15f0e15c92a94b9a958ef16..4fb9cb6db029e6366a8b4946e5b82b9fd49cc031 100644 GIT binary patch delta 17 Wcmb=c$*P^xr+fJy#!wX delta 17 Xcmb=c1N^1=jG*M00Qf}KMT2;047ufAOHXW delta 19 ZcmeBX>1N^1=jG*M0D?P-zZY^d0RSn51fu`| diff --git a/fonction_utilitaire/__pycache__/fonctions_utilitaire.cpython-310.pyc b/fonction_utilitaire/__pycache__/fonctions_utilitaire.cpython-310.pyc index e8fd69c4fcbc61a097dae92a6d5a01ae58bfec1e..a362d2addf02347a9f0a72f4b25f92d4a883484d 100644 GIT binary patch delta 19 ZcmdlbxJ!^LpO=@50SK7tH*#&@001kg1SkLi delta 19 ZcmdlbxJ!^LpO=@50SE$1H*#&@001pf1Z@BS diff --git a/gestion_conge/__pycache__/__init__.cpython-310.pyc b/gestion_conge/__pycache__/__init__.cpython-310.pyc index a6a2b7fd5acf0c93dc57d9c448a3e8114f93e5a2..2f5762e173df188af80fc4389611c2bb05f90d8a 100644 GIT binary patch delta 19 YcmZo?Y-i-o=jG*M00Qf}KNGoY041mdd;kCd delta 19 ZcmZo?Y-i-o=jG*M0D?P-zbA6n001c21pfd4 diff --git a/gestion_conge/__pycache__/admin.cpython-310.pyc b/gestion_conge/__pycache__/admin.cpython-310.pyc index f0233dee1dd54c73901413ea784b1dd09bab2920..1d36b5b542b41304b0f9db8efd6f899f1a7ebce1 100644 GIT binary patch delta 19 ZcmdnMxPg&7pO=@50SK(?{!HXv3IHpW1or>{ delta 19 ZcmdnMxPg&7pO=@50SN9S{+`Ia6aX&91$qDg diff --git a/gestion_conge/__pycache__/apps.cpython-310.pyc b/gestion_conge/__pycache__/apps.cpython-310.pyc index 1445f2bcc1534305fc45bc73f968726cb625e898..cd7b0cb523f56b80710eb99b7d8df135fdd361c9 100644 GIT binary patch delta 20 acmZ3@yqcLipO=@50SK(?{%qu4zz6^^jRg$= delta 20 acmZ3@yqcLipO=@50SN9S{@%#FfDr&RK?RTi diff --git a/gestion_conge/__pycache__/forms.cpython-310.pyc b/gestion_conge/__pycache__/forms.cpython-310.pyc index 5dd4fa0f4851504775e6517ddf8a967a7e078d26..c10b7e0772f188ae5c201ccffb5325f0a273e6a9 100644 GIT binary patch delta 20 acmcc1c9)GipO=@50SK(?{%qt9Vg>*=%LOX{ delta 20 acmcc1c9)GipO=@50SN9S{@%zP#0&sCe+8}p diff --git a/gestion_conge/__pycache__/models.cpython-310.pyc b/gestion_conge/__pycache__/models.cpython-310.pyc index 6ff9b49e7a9904bbf471bfdc0f75670d7e00ec9d..0d59d80c822519105197a04300a6b7f4ecc71bb1 100644 GIT binary patch delta 20 acmZqYYUkq4=jG*M00Qf}KO4FKumAuo>;*Ca delta 20 acmZqYYUkq4=jG*M0D?P-zc+IKVF3Uzpar!6 diff --git a/gestion_conge/__pycache__/urls.cpython-310.pyc b/gestion_conge/__pycache__/urls.cpython-310.pyc index 36ac70d424ef0e1f69c438d84b69f8c797626cce..27a90f3c7cc194e42326e473d63b6ca12947ea73 100644 GIT binary patch delta 19 ZcmZ3*vWkT(pO=@50SK(?HgYL20RSi31CRg! delta 19 ZcmZ3*vWkT(pO=@50SLm%HgYL20RSje1ET-{ diff --git a/gestion_conge/__pycache__/views.cpython-310.pyc b/gestion_conge/__pycache__/views.cpython-310.pyc index 4c8be542d7f693828a9dbd59b018bf4bf4da6ce4..1ad974fe47071885a0d94e9d8d8c969e4c4c21a8 100644 GIT binary patch delta 19 ZcmdmDu*HBYpO=@50SJuhH*#r7001u&1QY-O delta 19 ZcmdmDu*HBYpO=@50SFw+Hgai6001vQ1R4MU diff --git a/gestion_employe/__pycache__/__init__.cpython-310.pyc b/gestion_employe/__pycache__/__init__.cpython-310.pyc index f3cb21dcd5ee450f33a33b19ce2d5c84ac2b5c2a..446b36c7d3ff86bfd50e78a13fba665a1a117a34 100644 GIT binary patch delta 19 YcmeBV>}2H5=jG*M00Qf}KNGp@044GSf&c&j delta 19 ZcmeBV>}2H5=jG*M0D?P-zbA6n0RSl@1qA>A diff --git a/gestion_employe/__pycache__/admin.cpython-310.pyc b/gestion_employe/__pycache__/admin.cpython-310.pyc index 05b664a8baa06d1e9e379732451aa02dd564e6be..9e885bbfbc0009666675db66ccf8e8c2fbeeafe6 100644 GIT binary patch delta 20 acmeyu@`Z&vpO=@50SK(?{%qvVWC8#?8U@87)&*Mt delta 20 acmdlcx=oZjpO=@50SN9S{@%#FnhO9piUr;P diff --git a/gestion_employe/__pycache__/models.cpython-310.pyc b/gestion_employe/__pycache__/models.cpython-310.pyc index 6cc85884b0a6ade384ecfe36582103c510abadcc..e64a2f530009f101837d7ab462d4c663a5457b38 100644 GIT binary patch delta 20 acmaE^{al+npO=@50SH3t|7_&GBMJaOT?Rk^ delta 20 acmaE^{al+npO=@50SJ~S{ocrZM-%`-=mvBE diff --git a/gestion_employe/__pycache__/urls.cpython-310.pyc b/gestion_employe/__pycache__/urls.cpython-310.pyc index a10b1926e5935034162df9bbb2d7c59559fd251d..c4747fbac9192d7631cd9c645d54affde06e1003 100644 GIT binary patch delta 20 acmaFP{hXUSpO=@50SHR#|7_&G!wLXAtp*SP delta 20 acmaFP{hXUSpO=@50SK-n{ocrZhZO)mlLk=$ diff --git a/gestion_employe/__pycache__/views.cpython-310.pyc b/gestion_employe/__pycache__/views.cpython-310.pyc index 09b99be5081078aaafd22170d25b242d466bd062..01c89552817c627c711cec94f8781312486d529d 100644 GIT binary patch delta 19 ZcmaD-@T7n%pO=@50SGSCZ{&)y002UV1>yhz delta 19 ZcmaD-@T7n%pO=@50SGb+HgZK-002MI1#AES diff --git a/gestion_employe/templatetags/__pycache__/tags_personnaliser.cpython-310.pyc b/gestion_employe/templatetags/__pycache__/tags_personnaliser.cpython-310.pyc index f0982872cc981799e00164ccb534f6f7c1e3babb..cdb50e134b6d8ace8da7c4f69ba2fbe2b934aa84 100644 GIT binary patch delta 20 acmaFB@qmLnpO=@50SK(?{%qt9WdQ&|o^1=jG*M00Qf}KNGoY0VT}@e*gdg delta 19 ZcmeBR>|o^1=jG*M0D?P-zbA6n0stuf1p)v7 diff --git a/gestion_projet/__pycache__/admin.cpython-310.pyc b/gestion_projet/__pycache__/admin.cpython-310.pyc index 390b1e1a52d4cfbd4495509d561450b3ff762dad..4c5a626b560c53f27aafc5a75c4776f0e49dd738 100644 GIT binary patch delta 20 acmdnVypx$bpO=@50SK(?{%qu4#|Qv2y#+S_ delta 20 acmdnVypx$bpO=@50SN9S{@%#Fju8MhaRs^n diff --git a/gestion_projet/__pycache__/forms.cpython-310.pyc b/gestion_projet/__pycache__/forms.cpython-310.pyc index e3e023bd8232c02d13deb9b4b71b5aa36a8c4f5e..90ef06612742c755fbff689a834ebef9b9d8ec27 100644 GIT binary patch delta 20 acmX@5d`g)+pO=@50SK(?{%qvlF9-lR^#!^B delta 20 acmX@5d`g)+pO=@50SN9S{@%#FUl0I2sRlg& diff --git a/gestion_projet/__pycache__/models.cpython-310.pyc b/gestion_projet/__pycache__/models.cpython-310.pyc index e1e2a52b7b9c2d337eb1d9d49f7ed9ffb09d9f94..c057aeaee23ee58842c094326f58807d2b4145c9 100644 GIT binary patch delta 20 acmaE9{nDB{pO=@50SK(?{%qvFCkp^VIR;Yz delta 20 acmaE9{nDB{pO=@50SN9S{@%!aPZj`0?FQBW diff --git a/gestion_projet/__pycache__/urls.cpython-310.pyc b/gestion_projet/__pycache__/urls.cpython-310.pyc index 4889252af9c9d7aa1fc010f72d64c85ddc999e7b..6288b67b7f9417001241890a7e9c0555eff5149b 100644 GIT binary patch delta 20 acmew<_*0NOpO=@50SK(?{%qua#{mF7yapNo delta 20 acmew<_*0NOpO=@50SN9S{@%#_jspNfa0Z{ delta 19 ZcmdnMxPg&7pO=@50SN9S{+`Ia6aX&91$qDg diff --git a/gestion_salle/__pycache__/apps.cpython-310.pyc b/gestion_salle/__pycache__/apps.cpython-310.pyc index 2bd890145b32e609703411ac9a80135519f9dc45..676e30cecaca7526e0ca53d5090f59bd6931cdb3 100644 GIT binary patch delta 20 acmeyw^ofZ(pO=@50SK(?{%qtIm`3P6oTa;Sv->Yxh()!gE+$<0qG%}KRm1i6O|NboT5Fp4n) E0M-O5BLDyZ diff --git a/gestion_salle/__pycache__/urls.cpython-310.pyc b/gestion_salle/__pycache__/urls.cpython-310.pyc index 794fb5d9ee3f674353d529ce7e88195d9e53a71c..2d9c5afcf465fda4731c6396084dba416a1e3ca7 100644 GIT binary patch delta 20 acmZ3;zL1?epO=@50SK(?{%qu)#tZ;2j|BMu delta 20 acmZ3;zL1?epO=@50SN9S{@%zvjTrzlLj`;Q diff --git a/gestion_salle/__pycache__/views.cpython-310.pyc b/gestion_salle/__pycache__/views.cpython-310.pyc index 8b47dab773a96404f98966b5aa450528b921cafd..71190779ab7fede56be97870fb81b4e259576bb8 100644 GIT binary patch delta 274 zcmX?RdDxOSpO=@50SMkK`I9+!BkxjnMu*Lt*$*-?GHov9l4fG`+dPrSgOM?F@-5y4 zjA@gr`7F42fXbbLxVT~RUOs)V5{?pvEY4=e1xz(eSzHSlfh6|=o)l&+VA0r1N6SDv#3!?xd7Z|bt*(^X&wy!*VMLClbBt$mv r6*$7g*uJ?*co!q%!p*j#Uziv-ZZ?v5!^C)Ev%K^KMn;Fp8)U=)>h4Ae delta 286 zcmX?XdCZbGpO=@50SK~k|70H6$h(xC(P{H$_Jd4}ESpQYq?s54Hc#a7U}Vgme2aGh zW5(oaJ_{~hpmJv*F0PrpmrviVhAE2!h&dN16xI~BIXty2B|?+U__Y~%CMWSHir(VR%`eGJi!Vw|D=iKwiUnGwDLnZ! zzvg5{0bRzd$yx%znx!E76@UaEBL^cBlK>+N5ORSbh{XaF^fZ diff --git a/gestion_salle/models.py b/gestion_salle/models.py index 5d1d4e2..86254fa 100644 --- a/gestion_salle/models.py +++ b/gestion_salle/models.py @@ -30,4 +30,4 @@ class Reservation(models.Model): statut = models.CharField(choices=STATUT, default='en_attente', max_length=25) def __str__(self): - return f"{self.salle} - {self.employe.user.first_name} {self.employe.user.last_name} le {self.date_reservation}" \ No newline at end of file + return f"{self.salle} - {self.employe.user.first_name} {self.employe.user.last_name}" \ No newline at end of file diff --git a/gestion_salle/static/gestion_salle/js/index.js b/gestion_salle/static/gestion_salle/js/index.js index 8b5bff8..ec30e9b 100644 --- a/gestion_salle/static/gestion_salle/js/index.js +++ b/gestion_salle/static/gestion_salle/js/index.js @@ -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,6 +29,10 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), { $("besoin_ordinateur").checked=data.besoin_ordinateur; $("lien_zoom").value=data.lien_zoom; + if (data.besoin_zoom === false){ + $("lien_zoom_container").className = "d-none"; + } + if(data.statut !== "annulee"){ $("motif_refus_container").className = "d-none"; }else{ diff --git a/gestion_salle/views.py b/gestion_salle/views.py index 3b81588..098f156 100644 --- a/gestion_salle/views.py +++ b/gestion_salle/views.py @@ -30,8 +30,6 @@ def index(request:HttpRequest): motif_reservation = form.cleaned_data.get('motif_reservation') besoin_zoom = form.cleaned_data.get('besoin_zoom') besoin_ordi = form.cleaned_data.get('besoin_ordi') - - while date_debut <= date_fin : reservation = Reservation( @@ -117,11 +115,12 @@ def liste_reservation_attente(request): def detail_reservation(request:HttpRequest, reservation_id:int): reservation = Reservation.objects.get(id=reservation_id) employe = reservation.employe.user + reservation_json = { 'id_reservation': reservation_id, 'employe': f"{employe.first_name} {employe.last_name}", 'salle': reservation.salle, - 'statut': reservation.statut, + 'statut': dict(Reservation.STATUT).get(reservation.statut), 'date_evenement': reservation.date_debut.strftime('%Y-%m-%d'), 'heure_debut': reservation.heure_debut.strftime('%H:%M'), 'heure_fin': reservation.heure_fin.strftime('%H:%M'), @@ -129,7 +128,6 @@ def detail_reservation(request:HttpRequest, reservation_id:int): 'besoin_zoom': reservation.besoin_zoom, 'besoin_ordinateur': reservation.besoin_ordi, 'lien_zoom': reservation.lien_zoom or '', - 'motif_refus': reservation.motif_refus or '', } return JsonResponse(reservation_json, safe=True)