Skip to content

Commit

Permalink
linked to view_patient
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewaaa committed Jan 2, 2024
1 parent 0a0d244 commit 431972a
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 55 deletions.
42 changes: 42 additions & 0 deletions src/main/java/controller/view_patientServlet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package controller;

import model.entity.User;
import model.entity.UserInfo;
import model.service.personalinfo.PersonalInfo;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.ArrayList;

public class view_patientServlet {



public view_patientServlet() {
super();

}

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

HttpSession session = request.getSession();

model.service.user.UserData userService = new model.service.user.UserData();
model.service.personalinfo.PersonalInfo piService= new PersonalInfo();


response.sendRedirect("JSP/view_patient.jsp");

}


protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

doGet(request, response);
}


}
6 changes: 5 additions & 1 deletion src/main/webapp/CSS/homeTherapist.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.hoverable-row:hover {
background-color: #e6f7ff; /* Cambia il colore di sfondo quando il mouse passa sopra */
cursor: pointer; /* Cambia il cursore quando il mouse passa sopra */
}

#searchInput {
padding: 8px;
Expand All @@ -11,7 +15,7 @@


.table-container {
max-height: 350px;
max-height: 500px;
overflow-y: auto;
}

Expand Down
47 changes: 3 additions & 44 deletions src/main/webapp/JSP/homeTherapist.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -40,56 +40,15 @@
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
for(UserInfo u: list_user){
%>
<tr>
<td><svg xmlns="http://www.w3.org/2000/svg" height="16" width="18" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8 .4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg></td>
<td><%=u.getFirstname()%> <%=u.getLastname()%></td>
<td><%= sdf.format(u.getActivationDate()) %></td>
<td>
<div class="element-wrapper"><div class="element">72%</div></div>
</td>
</tr>
<!--DA ELIMINARE (FATTO SOLO PER DARE IMPRESSIONE DB RIEMPITO)-->
<tr>
<td><svg xmlns="http://www.w3.org/2000/svg" height="16" width="18" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8 .4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg></td>
<td><%=u.getFirstname()%> <%=u.getLastname()%></td>
<td><%= sdf.format(u.getActivationDate()) %></td>
<td>
<div class="element-wrapper"><div class="element">72%</div></div>
</td>
</tr>
<tr>
<td><svg xmlns="http://www.w3.org/2000/svg" height="16" width="18" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8 .4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg></td>
<td><%=u.getFirstname()%> <%=u.getLastname()%></td>
<td><%= sdf.format(u.getActivationDate()) %></td>
<td>
<div class="element-wrapper"><div class="element">72%</div></div>
</td>
</tr>
<tr>
<td><svg xmlns="http://www.w3.org/2000/svg" height="16" width="18" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8 .4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg></td>
<td><%=u.getFirstname()%> <%=u.getLastname()%></td>
<td><%= sdf.format(u.getActivationDate()) %></td>
<td>
<div class="element-wrapper"><div class="element">72%</div></div>
</td>
</tr>
<tr>
<td><svg xmlns="http://www.w3.org/2000/svg" height="16" width="18" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8 .4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg></td>
<td><%=u.getFirstname()%> <%=u.getLastname()%></td>
<td><%= sdf.format(u.getActivationDate()) %></td>
<td>
<div class="element-wrapper"><div class="element">72%</div></div>
</td>
</tr>
<tr>

<tr class="hoverable-row" onclick="window.location.href='view_patient?id=<%= u.getId() %>'">
<td><svg xmlns="http://www.w3.org/2000/svg" height="16" width="18" viewBox="0 0 496 512"><path d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8 .4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg></td>
<td><%=u.getFirstname()%> <%=u.getLastname()%></td>
<td><%=u.getFirstname()%> <%=u.getLastname()%></a></td>
<td><%= sdf.format(u.getActivationDate()) %></td>
<td>
<div class="element-wrapper"><div class="element">72%</div></div>
</td>
</tr>
<!--FINE-->
<%
}
}
Expand Down
10 changes: 0 additions & 10 deletions src/main/webapp/JSP/testTable.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@
</table>
</div>

<script>
var tableContainer = document.getElementById('tableContainer');
tableContainer.addEventListener('scroll', function() {
// Calcola il numero di righe da nascondere nel corpo
var rowsToHide = Math.floor(tableContainer.scrollTop / 35); // 35px è l'altezza approssimativa di una riga
// Imposta il margine superiore per nascondere le righe nel corpo
tableContainer.getElementsByTagName('tbody')[0].style.marginTop = rowsToHide * 35 + 'px';
});
</script>
<script>
$(document).ready(function () {
var tableContainer = document.getElementById('tableContainer');
Expand Down
9 changes: 9 additions & 0 deletions src/main/webapp/JSP/view_patient.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>paziente </title>
</head>
<body>
paziente x
</body>
</html>

0 comments on commit 431972a

Please sign in to comment.