From 038f885dac5d8e72627c6050331a5ad9b628ae3c Mon Sep 17 00:00:00 2001
From: Jessie Ragot <jessie.ragot@hotmail.com>
Date: Fri, 21 Feb 2025 15:13:15 +0100
Subject: [PATCH] Change the style of the list of doctors and refactor the
 Medical history class to pass names in English

---
 ...oriqueMedical.java => HistoryMedical.java} |  6 ++--
 src/main/resources/application.properties     | 10 +++---
 src/main/resources/templates/doctors.html     | 31 +++++++++++++++----
 3 files changed, 34 insertions(+), 13 deletions(-)
 rename src/main/java/com/projet/projetIndu/entities/{HistoriqueMedical.java => HistoryMedical.java} (81%)

diff --git a/src/main/java/com/projet/projetIndu/entities/HistoriqueMedical.java b/src/main/java/com/projet/projetIndu/entities/HistoryMedical.java
similarity index 81%
rename from src/main/java/com/projet/projetIndu/entities/HistoriqueMedical.java
rename to src/main/java/com/projet/projetIndu/entities/HistoryMedical.java
index dd369e5..d778cb6 100644
--- a/src/main/java/com/projet/projetIndu/entities/HistoriqueMedical.java
+++ b/src/main/java/com/projet/projetIndu/entities/HistoryMedical.java
@@ -11,13 +11,13 @@ import java.time.LocalDate;
 @Data
 @NoArgsConstructor
 @AllArgsConstructor
-class HistoriqueMedical {
+class HistoryMedical {
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     private Long id;
-    private String antecedents;
+    private String history;
     private String notes;
-    private LocalDate dateConsultation;
+    private LocalDate consultationDate;
 
     @ManyToOne
     @JoinColumn(name = "patient_id")
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 73df36f..6027113 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,10 +1,10 @@
 spring.application.name=projetIndu
-spring.datasource.url=jdbc:mysql://localhost:3307
+spring.datasource.url=jdbc:mysql://localhost:3306/projet
 spring.datasource.username=root
-spring.datasource.password=mypassword
+spring.datasource.password=jessie
 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
 spring.jpa.database-platform=org.hibernate.dialect.MySQL8Dialect
-spring.jpa.hibernate.ddl-auto=create
+spring.jpa.hibernate.ddl-auto=update
 spring.jpa.show-sql=true
 spring.jpa.properties.hibernate.format_sql=true
 spring.thymeleaf.prefix=classpath:/templates/
@@ -14,5 +14,7 @@ spring.servlet.multipart.max-file-size=100MB
 spring.servlet.multipart.max-request-size=100MB
 spring.mvc.hiddenmethod.filter.enabled=true
 
-spring.banner.location=banner.txt
 
+
+
+spring.banner.location=banner.txt
\ No newline at end of file
diff --git a/src/main/resources/templates/doctors.html b/src/main/resources/templates/doctors.html
index d183b39..505192d 100644
--- a/src/main/resources/templates/doctors.html
+++ b/src/main/resources/templates/doctors.html
@@ -1,24 +1,43 @@
 <!DOCTYPE html>
-<html lang="en">
+<html lang="fr">
 <head>
     <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
     <title>Liste des Médecins</title>
+
+    <link rel="stylesheet"
+          href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
 </head>
-<body>
-    <h1>Liste des médecins</h1>
-    <table>
+<body class="bg-light">
+
+<div class="container mt-5">
+    <h1 class="text-center mb-4">Liste des Médecins</h1>
+
+    <table class="table table-striped table-hover shadow-sm">
+        <thead class="table-dark">
         <tr>
             <th>Nom</th>
-            <th>Prenom</th>
+            <th>Prénom</th>
             <th>Spécialité</th>
             <th>Email</th>
         </tr>
+        </thead>
+        <tbody>
         <tr th:each="doctor : ${doctors}">
             <td th:text="${doctor.lastName}"></td>
             <td th:text="${doctor.firstName}"></td>
             <td th:text="${doctor.speciality}"></td>
             <td th:text="${doctor.email}"></td>
         </tr>
+        </tbody>
     </table>
+
+    <div class="text-center mt-4">
+        <a href="/" class="btn btn-primary">Retour à l'accueil</a>
+    </div>
+</div>
+
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
+
 </body>
-</html>
\ No newline at end of file
+</html>
-- 
GitLab