Ajout de la vue index pour afficher les tâches avec leurs niveaux et états

This commit is contained in:
Luka COUTANT
2025-06-10 14:38:19 +02:00
parent 427c4406c8
commit a565da5dca
5 changed files with 59 additions and 2 deletions

View File

@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Tasks !</title>
<style>
.termine { color: green; font-weight: bold; }
.encours { color: red; font-weight: bold; }
</style>
{{-- <link rel="stylesheet" href="https://cdn.datatables.net/2.3.2/css/dataTables.dataTables.min.css"> --}}
</head>
<body>
<div id="contenu">
<table id="tasks">
<thead>
<tr>
<th>Priority</th>
<th>Titre</th>
<th>Detail</th>
<th>Status</th>
</tr>
</thead>
<tbody>
@foreach ($tasks as $task)
<tr>
<td>{{ $task->level->name }}</td>
<td>{{ $task->title }}</td>
<td>{{ $task->details }} </td>
<td>
@if($task->state)
<span class="termine">Terminé</span>
@else
<span class="encours">En cours</span>
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
{{-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.datatables.net/2.3.2/js/dataTables.min.js"></script>
<script>
new DataTable("#tasks")
</script> --}}
</body>
</html>