Skip to content
Commits on Source (3)
...@@ -48,7 +48,7 @@ public class BootstrapData implements CommandLineRunner { ...@@ -48,7 +48,7 @@ public class BootstrapData implements CommandLineRunner {
@Override @Override
public void run(String... args) throws Exception { public void run(String... args) throws Exception {
Pilote pilote1 = new Pilote(); Pilote pilote1 = new Pilote();
pilote1.setNom("GONÇALVES"); pilote1.setNom("GONCALVES");
pilote1.setPrenom("Yoda"); pilote1.setPrenom("Yoda");
pilote1.setAge(100); pilote1.setAge(100);
pilote1.setRace(RacePilote.CHALACTEENS); pilote1.setRace(RacePilote.CHALACTEENS);
......
...@@ -83,29 +83,29 @@ public class Calculs { ...@@ -83,29 +83,29 @@ public class Calculs {
// Major 1500-3999 + 3 TOTAL Mission // Major 1500-3999 + 3 TOTAL Mission
// Commandant >=4000 + 10 TOTAL Mission // Commandant >=4000 + 10 TOTAL Mission
public GradePilote checkGradePilote(int nbHeures, int totalNbMission, int totalNbMissionCombat) { public GradePilote checkGradePilote(int nbHeures, int totalNbMission, int totalNbMissionCombat) {
// Officier: Less than 500 hours // Commandant: 4000 hours or more with at least 3 TOTAL Missions and 1 Mission COMBAT
if (nbHeures < 500) { if (nbHeures >= 4000 && totalNbMission >= 10 && totalNbMissionCombat >= 1) {
return GradePilote.OFFICIER; return GradePilote.COMMANDANT;
} }
// Lieutenant: 500 hours or more // Major: Between 1500 with at least 3 TOTAL Missions and 1 Mission COMBAT
if (nbHeures >= 500) { if (nbHeures >= 1500 && totalNbMission >= 3 && totalNbMissionCombat >= 1) {
return GradePilote.LIEUTENANT; return GradePilote.MAJOR;
} }
// Capitaine: Between 501 and 1500 hours with at least 1 Mission COMBAT // Capitaine: 1500 hours with at least 1 Mission COMBAT
if (nbHeures > 500 && nbHeures <= 1500 && totalNbMissionCombat >= 1) { if (nbHeures >= 1500 && totalNbMissionCombat >= 1) {
return GradePilote.CAPITAINE; return GradePilote.CAPITAINE;
} }
// Major: Between 1500 and 3999 hours with at least 3 TOTAL Missions and 1 Mission COMBAT // Lieutenant: 500 hours or less than 1500
if (nbHeures >= 1500 && nbHeures <= 3999 && totalNbMission >= 3 && totalNbMissionCombat >= 1) { if (nbHeures >= 500 && nbHeures <= 1499) {
return GradePilote.MAJOR; return GradePilote.LIEUTENANT;
} }
// Commandant: 4000 hours or more with at least 3 TOTAL Missions and 1 Mission COMBAT // Officier: Less than 500 hours
if (nbHeures >= 4000 && totalNbMission >= 3 && totalNbMissionCombat >= 1) { if (nbHeures < 500) {
return GradePilote.COMMANDANT; return GradePilote.OFFICIER;
} }
// No matching conditions, return null to indicate no grade assigned // No matching conditions, return null to indicate no grade assigned
......
...@@ -98,7 +98,7 @@ button{ ...@@ -98,7 +98,7 @@ button{
margin-left : auto; margin-left : auto;
margin-right : auto; margin-right : auto;
} }
main::before { body::before {
content: ""; content: "";
position: absolute; position: absolute;
top: 0; top: 0;
...@@ -165,6 +165,11 @@ select{ ...@@ -165,6 +165,11 @@ select{
color: yellow; color: yellow;
} }
.affectation{
display: flex;
flex-direction: column;
}
.radio { .radio {
padding: 0.3rem 0.5rem; padding: 0.3rem 0.5rem;
......
...@@ -32,18 +32,6 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp ...@@ -32,18 +32,6 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp
<option th:each="resultat : ${resultatMission}" th:value="${resultat}" th:text="${resultat}"></option> <option th:each="resultat : ${resultatMission}" th:value="${resultat}" th:text="${resultat}"></option>
</select> </select>
</div> </div>
<!--
<div>
<p> List pilote(s) dans la mission: </p>
<div th:each="pilote : ${pilotes}">
<p th:text="${pilote.nom}"></p>
</div>
<p> List chasseur(s) dans la mission: </p>
<div th:each="chasseur : ${chasseurs}">
<p th:text="${chasseur.type}"></p>
</div>
</div>
-->
</br> </br>
<div> <div>
<input type="submit" value="Submit"/> <input type="submit" value="Submit"/>
......
...@@ -28,6 +28,10 @@ ...@@ -28,6 +28,10 @@
</td> </td>
<td th:text="${chasseur.type}"></td> <td th:text="${chasseur.type}"></td>
<td th:text="${chasseur.etat}"></td> <td th:text="${chasseur.etat}"></td>
<td>
<a th:href="'/ficheChasseur?id_chasseur=' + ${chasseur.idChasseur}" th:text="Fiche_Chasseur">
</a>
</td>
</tr> </tr>
</table> </table>
</main> </main>
......
...@@ -16,10 +16,17 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp ...@@ -16,10 +16,17 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp
</head> </head>
<body> <body>
<header> <header>
<h1><span class='faulty-letter'>{</span> Liste Missions Terminées</h1> <h1><span class='faulty-letter'>{</span> Liste Missions</h1>
</header> </header>
<main> <main>
<table> <table>
<tr>
<th>Nom</th>
<th>Pilote</th>
<th>Chasseur</th>
<th>Etat Mission</th>
<th>Nb heures de vol</th>
</tr>
<tr th:each="mission : ${missions}"> <tr th:each="mission : ${missions}">
<td th:text="${mission.titre}"></td> <td th:text="${mission.titre}"></td>
<td> <td>
......
...@@ -48,6 +48,10 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp ...@@ -48,6 +48,10 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp
<td th:text="${pilote.grade}"></td> <td th:text="${pilote.grade}"></td>
<td th:text="${pilote.type}"></td> <td th:text="${pilote.type}"></td>
<td th:text="${pilote.etat}"></td> <td th:text="${pilote.etat}"></td>
<td>
<a th:href="'/fichePilote?id_pilote=' + ${pilote.idPilote}" th:text="Fiche_Pilote">
</a>
</td>
</tr> </tr>
</table> </table>
</main> </main>
......
...@@ -8,9 +8,10 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp ...@@ -8,9 +8,10 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp
<title>TODO supply a title</title> <title>TODO supply a title</title>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/style.css"/>
</head> </head>
<body> <body>
<h1>Liste des Pilotes disponible (sans apprenti)</h1> <h1>Liste des Pilotes disponible</h1>
<table> <table>
<tr> <tr>
......
...@@ -21,19 +21,19 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp ...@@ -21,19 +21,19 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp
<h2>Pilote</h2> <h2>Pilote</h2>
<ul> <ul>
<li><a href="/inscriptionPilote" class="menu">Inscription d'un nouveau pilote</a></li> <li><a href="/inscriptionPilote" class="menu">Inscription d'un nouveau pilote</a></li>
<li><a href="/listePilote" class="menu">Liste des pilotes actifs</a></li> <li><a href="/listePilote" class="menu">Liste des pilotes</a></li>
<li><a href="/cherchePilote" class="menu">Cherche pilote par nom</a></li> <li><a href="/cherchePilote" class="menu">Cherche pilote par nom</a></li>
</ul> </ul>
<h2>Chasseur</h2> <h2>Chasseur</h2>
<ul> <ul>
<li><a href="/nouveauChasseur" class="menu">Ajouter un chasseur à la flotte</a></li> <li><a href="/nouveauChasseur" class="menu">Ajouter un chasseur a la flotte</a></li>
<li><a href="/listeChasseur" class="menu">Liste des chasseurs</a></li> <li><a href="/listeChasseur" class="menu">Liste des chasseurs</a></li>
</ul> </ul>
<h2>Mission</h2> <h2>Mission</h2>
<ul> <ul>
<li><a href="/nouvelleMission" class="menu">Nouvelle mission</a></li> <li><a href="/nouvelleMission" class="menu">Nouvelle mission</a></li>
<li><a href="/listeMission" class="menu">Liste des missions terminées</a></li> <li><a href="/listeMission" class="menu">Liste des missions</a></li>
<li><a href="/clotureMission" class="menu">Cloturer une mission</a></li> <li><a href="/clotureMission" class="menu">Cloturer une mission</a></li>
</ul> </ul>
</main> </main>
......
...@@ -37,7 +37,7 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp ...@@ -37,7 +37,7 @@ Click nbfs://nbhost/SystemFileSystem/Templates/Other/html.html to edit this temp
</form> </form>
<form class='mission' th:object="${affectation}" th:action="@{/affectation/{idMission}}" method="post"> <form id="affectation" class='mission' th:object="${affectation}" th:action="@{/affectation/{idMission}}" method="post">
<h2>Affectation</h2> <h2>Affectation</h2>
<div class="box"> <div class="box">
<label for="piloteSelect">Choisir Pilote:</label> <label for="piloteSelect">Choisir Pilote:</label>
......