diff --git a/SIRH/__pycache__/__init__.cpython-310.pyc b/SIRH/__pycache__/__init__.cpython-310.pyc index 5e35e10..4fb9cb6 100644 Binary files a/SIRH/__pycache__/__init__.cpython-310.pyc and b/SIRH/__pycache__/__init__.cpython-310.pyc differ diff --git a/SIRH/__pycache__/settings.cpython-310.pyc b/SIRH/__pycache__/settings.cpython-310.pyc index 430e452..180f602 100644 Binary files a/SIRH/__pycache__/settings.cpython-310.pyc and b/SIRH/__pycache__/settings.cpython-310.pyc differ diff --git a/SIRH/__pycache__/urls.cpython-310.pyc b/SIRH/__pycache__/urls.cpython-310.pyc index 6e6a5ff..1507cc0 100644 Binary files a/SIRH/__pycache__/urls.cpython-310.pyc and b/SIRH/__pycache__/urls.cpython-310.pyc differ diff --git a/SIRH/__pycache__/views.cpython-310.pyc b/SIRH/__pycache__/views.cpython-310.pyc index 7c3081c..3ba4f66 100644 Binary files a/SIRH/__pycache__/views.cpython-310.pyc and b/SIRH/__pycache__/views.cpython-310.pyc differ diff --git a/SIRH/__pycache__/wsgi.cpython-310.pyc b/SIRH/__pycache__/wsgi.cpython-310.pyc index d453f99..51f6382 100644 Binary files a/SIRH/__pycache__/wsgi.cpython-310.pyc and b/SIRH/__pycache__/wsgi.cpython-310.pyc differ diff --git a/fonction_utilitaire/__pycache__/fonctions_utilitaire.cpython-310.pyc b/fonction_utilitaire/__pycache__/fonctions_utilitaire.cpython-310.pyc index e8fd69c..a362d2a 100644 Binary files a/fonction_utilitaire/__pycache__/fonctions_utilitaire.cpython-310.pyc and b/fonction_utilitaire/__pycache__/fonctions_utilitaire.cpython-310.pyc differ diff --git a/gestion_conge/__pycache__/__init__.cpython-310.pyc b/gestion_conge/__pycache__/__init__.cpython-310.pyc index a6a2b7f..2f5762e 100644 Binary files a/gestion_conge/__pycache__/__init__.cpython-310.pyc and b/gestion_conge/__pycache__/__init__.cpython-310.pyc differ diff --git a/gestion_conge/__pycache__/admin.cpython-310.pyc b/gestion_conge/__pycache__/admin.cpython-310.pyc index f0233de..1d36b5b 100644 Binary files a/gestion_conge/__pycache__/admin.cpython-310.pyc and b/gestion_conge/__pycache__/admin.cpython-310.pyc differ diff --git a/gestion_conge/__pycache__/apps.cpython-310.pyc b/gestion_conge/__pycache__/apps.cpython-310.pyc index 1445f2b..cd7b0cb 100644 Binary files a/gestion_conge/__pycache__/apps.cpython-310.pyc and b/gestion_conge/__pycache__/apps.cpython-310.pyc differ diff --git a/gestion_conge/__pycache__/forms.cpython-310.pyc b/gestion_conge/__pycache__/forms.cpython-310.pyc index 5dd4fa0..c10b7e0 100644 Binary files a/gestion_conge/__pycache__/forms.cpython-310.pyc and b/gestion_conge/__pycache__/forms.cpython-310.pyc differ diff --git a/gestion_conge/__pycache__/models.cpython-310.pyc b/gestion_conge/__pycache__/models.cpython-310.pyc index 6ff9b49..0d59d80 100644 Binary files a/gestion_conge/__pycache__/models.cpython-310.pyc and b/gestion_conge/__pycache__/models.cpython-310.pyc differ diff --git a/gestion_conge/__pycache__/urls.cpython-310.pyc b/gestion_conge/__pycache__/urls.cpython-310.pyc index 36ac70d..27a90f3 100644 Binary files a/gestion_conge/__pycache__/urls.cpython-310.pyc and b/gestion_conge/__pycache__/urls.cpython-310.pyc differ diff --git a/gestion_conge/__pycache__/views.cpython-310.pyc b/gestion_conge/__pycache__/views.cpython-310.pyc index 4c8be54..1ad974f 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_employe/__pycache__/__init__.cpython-310.pyc b/gestion_employe/__pycache__/__init__.cpython-310.pyc index f3cb21d..446b36c 100644 Binary files a/gestion_employe/__pycache__/__init__.cpython-310.pyc and b/gestion_employe/__pycache__/__init__.cpython-310.pyc differ diff --git a/gestion_employe/__pycache__/admin.cpython-310.pyc b/gestion_employe/__pycache__/admin.cpython-310.pyc index 05b664a..9e885bb 100644 Binary files a/gestion_employe/__pycache__/admin.cpython-310.pyc and b/gestion_employe/__pycache__/admin.cpython-310.pyc differ diff --git a/gestion_employe/__pycache__/forms.cpython-310.pyc b/gestion_employe/__pycache__/forms.cpython-310.pyc index b5463d9..f0df9aa 100644 Binary files a/gestion_employe/__pycache__/forms.cpython-310.pyc and b/gestion_employe/__pycache__/forms.cpython-310.pyc differ diff --git a/gestion_employe/__pycache__/models.cpython-310.pyc b/gestion_employe/__pycache__/models.cpython-310.pyc index 6cc8588..e64a2f5 100644 Binary files a/gestion_employe/__pycache__/models.cpython-310.pyc and b/gestion_employe/__pycache__/models.cpython-310.pyc differ diff --git a/gestion_employe/__pycache__/urls.cpython-310.pyc b/gestion_employe/__pycache__/urls.cpython-310.pyc index a10b192..c4747fb 100644 Binary files a/gestion_employe/__pycache__/urls.cpython-310.pyc and b/gestion_employe/__pycache__/urls.cpython-310.pyc differ diff --git a/gestion_employe/__pycache__/views.cpython-310.pyc b/gestion_employe/__pycache__/views.cpython-310.pyc index 09b99be..01c8955 100644 Binary files a/gestion_employe/__pycache__/views.cpython-310.pyc and b/gestion_employe/__pycache__/views.cpython-310.pyc differ diff --git a/gestion_employe/templatetags/__pycache__/tags_personnaliser.cpython-310.pyc b/gestion_employe/templatetags/__pycache__/tags_personnaliser.cpython-310.pyc index f098287..cdb50e1 100644 Binary files a/gestion_employe/templatetags/__pycache__/tags_personnaliser.cpython-310.pyc and b/gestion_employe/templatetags/__pycache__/tags_personnaliser.cpython-310.pyc differ diff --git a/gestion_projet/__pycache__/__init__.cpython-310.pyc b/gestion_projet/__pycache__/__init__.cpython-310.pyc index a8f2514..0164acf 100644 Binary files a/gestion_projet/__pycache__/__init__.cpython-310.pyc and b/gestion_projet/__pycache__/__init__.cpython-310.pyc differ diff --git a/gestion_projet/__pycache__/admin.cpython-310.pyc b/gestion_projet/__pycache__/admin.cpython-310.pyc index 390b1e1..4c5a626 100644 Binary files a/gestion_projet/__pycache__/admin.cpython-310.pyc and b/gestion_projet/__pycache__/admin.cpython-310.pyc differ diff --git a/gestion_projet/__pycache__/forms.cpython-310.pyc b/gestion_projet/__pycache__/forms.cpython-310.pyc index e3e023b..90ef066 100644 Binary files a/gestion_projet/__pycache__/forms.cpython-310.pyc and b/gestion_projet/__pycache__/forms.cpython-310.pyc differ diff --git a/gestion_projet/__pycache__/models.cpython-310.pyc b/gestion_projet/__pycache__/models.cpython-310.pyc index e1e2a52..c057aea 100644 Binary files a/gestion_projet/__pycache__/models.cpython-310.pyc and b/gestion_projet/__pycache__/models.cpython-310.pyc differ diff --git a/gestion_projet/__pycache__/urls.cpython-310.pyc b/gestion_projet/__pycache__/urls.cpython-310.pyc index 4889252..6288b67 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 28ad673..5b82d00 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__/__init__.cpython-310.pyc b/gestion_salle/__pycache__/__init__.cpython-310.pyc index 4901dbb..ae1b83c 100644 Binary files a/gestion_salle/__pycache__/__init__.cpython-310.pyc and b/gestion_salle/__pycache__/__init__.cpython-310.pyc differ diff --git a/gestion_salle/__pycache__/admin.cpython-310.pyc b/gestion_salle/__pycache__/admin.cpython-310.pyc index 01450da..0b5c756 100644 Binary files a/gestion_salle/__pycache__/admin.cpython-310.pyc and b/gestion_salle/__pycache__/admin.cpython-310.pyc differ diff --git a/gestion_salle/__pycache__/apps.cpython-310.pyc b/gestion_salle/__pycache__/apps.cpython-310.pyc index 2bd8901..676e30c 100644 Binary files a/gestion_salle/__pycache__/apps.cpython-310.pyc and b/gestion_salle/__pycache__/apps.cpython-310.pyc differ diff --git a/gestion_salle/__pycache__/forms.cpython-310.pyc b/gestion_salle/__pycache__/forms.cpython-310.pyc index 4ed6625..d7b4374 100644 Binary files a/gestion_salle/__pycache__/forms.cpython-310.pyc and b/gestion_salle/__pycache__/forms.cpython-310.pyc differ diff --git a/gestion_salle/__pycache__/models.cpython-310.pyc b/gestion_salle/__pycache__/models.cpython-310.pyc index 1d327ec..d02440b 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__/urls.cpython-310.pyc b/gestion_salle/__pycache__/urls.cpython-310.pyc index 794fb5d..2d9c5af 100644 Binary files a/gestion_salle/__pycache__/urls.cpython-310.pyc and b/gestion_salle/__pycache__/urls.cpython-310.pyc differ diff --git a/gestion_salle/__pycache__/views.cpython-310.pyc b/gestion_salle/__pycache__/views.cpython-310.pyc index 8b47dab..7119077 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/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)