From f74104e7ffe368aabca1871d61ee198c1789362c Mon Sep 17 00:00:00 2001 From: "clementine.desrucques" Date: Tue, 14 Dec 2021 09:07:12 +0100 Subject: [PATCH] Merge origin/master Conflicts: web/WEB-INF/feuilleGardes.jsp web/css/mycss.css --- src/java/bdd/GardeMySQL.java | 6 +++++- src/java/servlet/GPServlet.java | 2 +- src/java/servlet/GardesServlet.java | 2 +- web/WEB-INF/feuilleGardes.jsp | 4 ++-- web/WEB-INF/gardeJSP.jsp | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/java/bdd/GardeMySQL.java b/src/java/bdd/GardeMySQL.java index 2183adf..f580530 100644 --- a/src/java/bdd/GardeMySQL.java +++ b/src/java/bdd/GardeMySQL.java @@ -44,7 +44,11 @@ public class GardeMySQL { PompierMySQL pm = new PompierMySQL(); HttpSession maSession = request.getSession(); ArrayList lesPompiers = (ArrayList) maSession.getAttribute("lesPompiers"); - + Pompier lePompierConnecte =(Pompier) maSession.getAttribute("lePompierConnecte"); + if(lesPompiers==null){ + lesPompiers = new ArrayList<>(); + lesPompiers.add(lePompierConnecte); + } for (Pompier unPompier : lesPompiers) { for (Calendar uneDate : lesDates) { for (int unePeriode : lesPeriodes) { diff --git a/src/java/servlet/GPServlet.java b/src/java/servlet/GPServlet.java index 54bc6c0..e396971 100644 --- a/src/java/servlet/GPServlet.java +++ b/src/java/servlet/GPServlet.java @@ -90,7 +90,7 @@ public class GPServlet extends HttpServlet { GardeMySQL vm = new GardeMySQL(); ArrayList lesVentilInit = vm.getLesDisponibilite(lesDates, lesPeriodes,request); - //System.out.println("lesVentilInit : " + lesVentilInit); + //System.out.println("lesVentilInit : " + lesVentilInit); maSession.setAttribute("lesVentilInit", lesVentilInit); diff --git a/src/java/servlet/GardesServlet.java b/src/java/servlet/GardesServlet.java index a5a993f..68a1e4d 100644 --- a/src/java/servlet/GardesServlet.java +++ b/src/java/servlet/GardesServlet.java @@ -85,7 +85,7 @@ public class GardesServlet extends HttpServlet { System.out.println(lesDatesEnString.toString()); /*Initialisation des periodes */ int[] lesPeriodes = {1,2,3,4}; - maSession.setAttribute("lesPeriodes", lesPeriodes); +// maSession.setAttribute("lesPeriodes", lesPeriodes); System.out.println(lesPeriodes.toString()); /* Recherche des ventilations */ diff --git a/web/WEB-INF/feuilleGardes.jsp b/web/WEB-INF/feuilleGardes.jsp index 0bbad22..1fba489 100644 --- a/web/WEB-INF/feuilleGardes.jsp +++ b/web/WEB-INF/feuilleGardes.jsp @@ -31,8 +31,8 @@ - - ${unePeriode} + + ${unePeriode.getCode()} diff --git a/web/WEB-INF/gardeJSP.jsp b/web/WEB-INF/gardeJSP.jsp index c917e24..eab42a9 100644 --- a/web/WEB-INF/gardeJSP.jsp +++ b/web/WEB-INF/gardeJSP.jsp @@ -32,8 +32,8 @@ - - ${unePeriode} + + ${unePeriode.getCode()}