Skip to content
Snippets Groups Projects
Commit d2ca23b4 authored by RAGOT Jessie's avatar RAGOT Jessie
Browse files

Merge branch 'feature/setting-up-the-superadmin' into 'main'

- Modification of the front for inscription, changeover to landscape

See merge request !21
parents d1f3037a ec566794
No related branches found
No related tags found
1 merge request!21- Modification of the front for inscription, changeover to landscape
...@@ -19,11 +19,20 @@ ...@@ -19,11 +19,20 @@
class="px-6 py-2 bg-green-500 text-white rounded-md hover:bg-green-600">Professionnel de class="px-6 py-2 bg-green-500 text-white rounded-md hover:bg-green-600">Professionnel de
santé</a> santé</a>
</th:block> </th:block>
<th:block th:if="${username}"> <th:block th:if="${isPatient}">
<span class="text-gray-900 font-semibold">Bienvenue, <b th:text="${username}"></b> !</span> <a href="/patients/dashboard"
class="px-6 py-2 bg-pink-500 text-white rounded-md hover:bg-pink-600">Patient</a>
</th:block>
<th:block th:if="${isAdmin}">
<a href="/admin/dashboard"
class="px-6 py-2 bg-orange-500 text-white rounded-md hover:bg-orange-600">Admin</a>
</th:block>
<th:block th:if="${firstName != null and lastName != null}">
<span class="text-gray-900 font-semibold">Bienvenue, <b th:text="${firstName + ' ' + lastName}"></b> !</span>
<a href="/logout" class="ml-4 text-red-500 hover:text-red-700">Déconnexion</a> <a href="/logout" class="ml-4 text-red-500 hover:text-red-700">Déconnexion</a>
</th:block> </th:block>
<th:block th:unless="${username}"> <th:block th:unless="${username}">
<a th:href="@{/login}" class="text-blue-500 hover:text-blue-700">Connexion</a> <a th:href="@{/login}" class="text-blue-500 hover:text-blue-700">Connexion</a>
<a th:href="@{/register}" class="text-blue-500 hover:text-blue-700">Inscription</a> <a th:href="@{/register}" class="text-blue-500 hover:text-blue-700">Inscription</a>
......
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dossiers Médicaux</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
</head>
<body class="bg-light">
<div class="container mt-5">
<h1 class="text-center mb-4">Liste des dossiers médicaux</h1>
<table class="table table-striped table-bordered">
<thead class="table-dark">
<tr>
<th>ID</th>
<th>Patient</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr th:each="file : ${medicalFiles}">
<td th:text="${file.id}"></td>
<td th:text="${file.patient.firstName + ' ' + file.patient.lastName}"></td>
<td>
<a th:href="@{/admin/medical-files-admin/{id}(id=${file.id})}" class="btn btn-info">Consulter</a>
</td>
</tr>
</tbody>
</table>
<a href="/admin/dashboard" class="btn btn-primary mt-3">Retour à l'accueil</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Mes Rendez-vous</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
</head>
<body class="bg-light">
<div class="container mt-5">
<h1 class="text-center mb-4">Liste de mes rendez-vous</h1>
<table class="table table-bordered table-striped">
<thead class="table-dark">
<tr>
<th>Médecin</th>
<th>Date et heure</th>
<th>Statut</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<tr th:each="appointment : ${appointments}">
<td th:text="${appointment.doctor.firstName + ' ' + appointment.doctor.lastName}"></td>
<td th:text="${#temporals.format(appointment.dateTime, 'dd/MM/yyyy HH:mm')}"></td>
<td th:text="${appointment.status}"></td>
<td>
<form method="post" th:action="@{/patients/appointments/{id}/cancel(id=${appointment.id})}"
class="d-inline">
<input type="hidden" name="_method" value="post"/>
<button type="submit" class="btn btn-danger btn-sm"
onclick="return confirm('Voulez-vous annuler ce rendez-vous ?');">
Annuler
</button>
</form>
</td>
</tr>
</tbody>
</table>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Liste des Patients</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
</head>
<body class="bg-light">
<div class="container mt-5">
<h1 class="text-center mb-4">Liste des Patients</h1>
<table class="table table-striped table-bordered">
<thead class="table-dark">
<tr>
<th>ID</th>
<th>Nom</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr th:each="patient : ${patients}">
<td th:text="${patient.id}"></td>
<td th:text="${patient.firstName + ' ' + patient.lastName}"></td>
<td th:text="${patient.email}"></td>
</tr>
</tbody>
</table>
<a href="/admin/dashboard" class="btn btn-primary mt-3">Retour à l'accueil</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
...@@ -16,54 +16,47 @@ ...@@ -16,54 +16,47 @@
</head> </head>
<body class="bg-light"> <body class="bg-light">
<div class="container d-flex justify-content-center align-items-center vh-100"> <div class="container d-flex justify-content-center align-items-center vh-100">
<div class="card shadow p-4" style="width: 350px; border-radius: 10px;"> <div class="card shadow p-4" style="width: 500px; border-radius: 10px;">
<h3 class="text-center mb-3">Inscription</h3> <h3 class="text-center mb-3">Inscription</h3>
<form th:action="@{/register}" method="post"> <form th:action="@{/register}" method="post">
<div class="mb-3"> <div class="row">
<div class="col-md-6 mb-3">
<label for="firstName" class="form-label">Prénom</label> <label for="firstName" class="form-label">Prénom</label>
<input type="text" class="form-control" id="firstName" name="firstName" required> <input type="text" class="form-control" id="firstName" name="firstName" required>
</div> </div>
<div class="mb-3"> <div class="col-md-6 mb-3">
<label for="lastName" class="form-label">Nom</label> <label for="lastName" class="form-label">Nom</label>
<input type="text" class="form-control" id="lastName" name="lastName" required> <input type="text" class="form-control" id="lastName" name="lastName" required>
</div> </div>
<div class="mb-3"> <div class="col-md-6 mb-3">
<label for="email" class="form-label">Email</label> <label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="email" required> <input type="email" class="form-control" id="email" name="email" required>
</div> </div>
<div class="mb-3"> <div class="col-md-6 mb-3">
<label for="password" class="form-label">Mot de passe</label> <label for="password" class="form-label">Mot de passe</label>
<input type="password" class="form-control" id="password" name="password" required> <input type="password" class="form-control" id="password" name="password" required>
</div> </div>
<div class="mb-3"> <div class="col-md-12 mb-3">
<label for="role" class="form-label">Rôle</label> <label for="role" class="form-label">Rôle</label>
<select class="form-control" id="role" name="role" required onchange="toggleFields()"> <select class="form-control" id="role" name="role" required onchange="toggleFields()">
<option value="PATIENT">Patient</option> <option value="PATIENT">Patient</option>
<option value="DOCTOR">Médecin</option>
<option value="ADMIN">Administrateur</option>
</select> </select>
</div> </div>
<!-- Champs spécifiques pour Médecin -->
<div id="doctorFields" style="display: none;">
<div class="mb-3">
<label for="speciality" class="form-label">Spécialité</label>
<input type="text" class="form-control" id="speciality" name="speciality">
</div>
</div>
<!-- Champs spécifiques pour Patient --> <!-- Champs spécifiques pour Patient -->
<div id="patientFields"> <div id="patientFields" class="col-md-12">
<div class="mb-3"> <div class="row">
<div class="col-md-6 mb-3">
<label for="dateOfBirth" class="form-label">Date de naissance</label> <label for="dateOfBirth" class="form-label">Date de naissance</label>
<input type="date" class="form-control" id="dateOfBirth" name="dateOfBirth"> <input type="date" class="form-control" id="dateOfBirth" name="dateOfBirth">
</div> </div>
<div class="mb-3"> <div class="col-md-6 mb-3">
<label for="address" class="form-label">Adresse</label> <label for="address" class="form-label">Adresse</label>
<input type="text" class="form-control" id="address" name="address"> <input type="text" class="form-control" id="address" name="address">
</div> </div>
</div> </div>
</div>
</div>
<button type="submit" class="btn btn-success w-100">S'inscrire</button> <button type="submit" class="btn btn-success w-100">S'inscrire</button>
</form> </form>
......
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Détails du dossier médical</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
</head>
<body class="bg-light">
<div class="container mt-5">
<h1 class="text-center mb-4">Détails du dossier médical</h1>
<div th:if="${medicalFile}">
<h5 class="card-title">Dossier médical de :
<span th:text="${medicalFile.patient.firstName + ' ' + medicalFile.patient.lastName}"></span>
</h5>
</div>
<!-- Historique médical -->
<div class="mt-3">
<h5>Historique médical :</h5>
<ul class="list-group">
<li th:each="history : ${medicalFile.healthHistoricalList}" class="list-group-item">
<strong>Antécédent:</strong> <span th:text="${history.antecedent}"></span><br>
<strong>Notes:</strong> <span th:text="${history.notes}"></span><br>
<strong>Date de consultation:</strong> <span th:text="${history.consultationDate}"></span>
</li>
</ul>
</div>
<!-- Formulaire de téléchargement du document -->
<form method="post" th:action="@{/admin/medical-files-admin/{id}/documents(id=${medicalFile.id})}"
enctype="multipart/form-data"
class="mt-3">
<label for="file" class="form-label">Importer un document :</label>
<input type="file" name="document" id="file" class="form-control mb-2"/>
<button type="submit" class="btn btn-primary">Uploader le document</button>
</form>
<!-- Liste des documents avec lien de téléchargement -->
<div class="mt-3">
<h5>Documents disponibles :</h5>
<ul class="list-group">
<li th:each="doc : ${medicalFile.documentList}"
class="list-group-item d-flex justify-content-between align-items-center">
<span th:text="${doc.fileName}"></span>
<div>
<a th:href="@{/admin/medical-files-admin/{id}/documents/{docId}(id=${medicalFile.id}, docId=${doc.id})}"
class="btn btn-sm btn-warning">
Télécharger
</a>
<form th:action="@{/admin/medical-files-admin/{id}/documents/{docId}(id=${medicalFile.id}, docId=${doc.id})}"
method="post" class="d-inline">
<input type="hidden" name="_method" value="delete"/>
<button type="submit" class="btn btn-sm btn-danger"
onclick="return confirm('Voulez-vous vraiment supprimer ce document ?');">
Supprimer
</button>
</form>
</div>
</li>
</ul>
</div>
<a href="/admin/medical-files-admin" class="btn btn-primary mt-3">Retour à la liste</a>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment