diff --git a/Jenkinsfile b/Jenkinsfile index 7a7264b..4ee86cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,6 +39,7 @@ pipeline python manage.py makemigrations python manage.py migrate + echo $SUDO_PASSWORD | sudo -S rm -r staticfiles python manage.py collectstatic --noinput echo $SUDO_PASSWORD | sudo -S chown -R www-data:www-data /var/www/sirh diff --git a/gestion_projet/__pycache__/views.cpython-310.pyc b/gestion_projet/__pycache__/views.cpython-310.pyc index a986bd0..6b01496 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_projet/views.py b/gestion_projet/views.py index 80a4ba4..f0e2f10 100644 --- a/gestion_projet/views.py +++ b/gestion_projet/views.py @@ -2,7 +2,6 @@ from datetime import date from decimal import Decimal, InvalidOperation from django.http import JsonResponse from django.shortcuts import redirect, render -from django.urls import reverse from django.utils import timezone from django.contrib import messages from django.contrib.auth.decorators import login_required diff --git a/gestion_salle/__pycache__/views.cpython-310.pyc b/gestion_salle/__pycache__/views.cpython-310.pyc index cf85ac6..ac650fc 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 91591b1..6950c0e 100644 --- a/gestion_salle/static/gestion_salle/js/index.js +++ b/gestion_salle/static/gestion_salle/js/index.js @@ -78,6 +78,11 @@ $("bouton-annuler").addEventListener("click", (e) => { const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value; const url_annuler = $("formulaire-details").dataset.urlannuler; + console.log("URL d'annulation :"); + console.log($("formulaire-details")) + + e.preventDefault(); + fetch( url_annuler, { @@ -128,6 +133,9 @@ if($("refuserReservation")){ const url = e.currentTarget.dataset.lienrefus; const idRes = $("id_reservation_detail").value; + console.log(idRes); + e.preventDefault(); + fetch(url, { method: "POST", headers: { diff --git a/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html b/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html index 20bf762..0d09ef3 100644 --- a/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html +++ b/gestion_salle/templates/gestion_salle/parts/modalDetailResevation.html @@ -12,7 +12,7 @@