Correction de bug
continuous-integration/drone/push Build was killed Details

ServeurDeTest
Noé GARNIER 2 years ago
parent 5676178c6c
commit 3203d5e713

@ -185,13 +185,13 @@ async function submit(){
public function modifOrdreUp(int $idEnigme){
$enigme = $this->enigme_gateway->findById($idEnigme)[0];
$ordre = $enigme->getOrdre();
$enigme2 = $this->enigme_gateway->findByOrdre($ordre-1)[0];
$enigme2->setOrdre($ordre);
$this->enigme_gateway->update($enigme2);
if ($ordre == 1){
$enigme->setOrdre($ordre);
}
else{
$enigme2 = $this->enigme_gateway->findByOrdre($ordre-1)[0];
$enigme2->setOrdre($ordre);
$this->enigme_gateway->update($enigme2);
$enigme->setOrdre($ordre-1);
}
$this->enigme_gateway->update($enigme);

@ -35,8 +35,8 @@
<thead>
<tr>
<th scope="col">Enigme</th>
<th scope="col">Ordre</th>
<!-- <th scope="col"></th> -->
<th scope="col-4">Ordre</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@ -44,8 +44,8 @@
foreach ($lesEnigmes as $enigme) {
echo "<tr>";
echo "<td>".$enigme->getNom()."</td>";
echo "<td>" . $enigme->getOrdre() . "</td>";
echo '<td>';
echo "<td>" . $enigme->getOrdre();
// echo '<td>';
echo '<a href=index.php?action=modifOrdre&id='. $enigme->getIdEnigme() .'&dir=up> <span class="material-symbols-outlined"> arrow_upward </span> </a>';
echo '<a href=index.php?action=modifOrdre&id='. $enigme->getIdEnigme() .'&dir=down> <span class="material-symbols-outlined"> arrow_downward </span> </a>';
echo '</td>';

Loading…
Cancel
Save