showing 1 statut for vehicles-list

This commit is contained in:
Nicolas CARON 2023-02-24 13:51:25 +01:00
parent c16e27fb25
commit 59950586ec
1 changed files with 9 additions and 5 deletions

View File

@ -33,7 +33,12 @@
{{range .ViewState.vehicles}}
<tr>
<td class="flex flex-col whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
{{range .Bookings}}
{{if not .Bookings}}
<span class="mt-1 p-1 bg-gray-500 text-white text-xs font-bold rounded-xl" >
Disponible
</span>
{{else}}
{{range slice .Bookings 0 1}}
{{if .Data.administrator_unavailability}}
<span class="mt-1 p-1 bg-black text-white text-xs font-bold rounded-xl" >
Retiré
@ -43,19 +48,18 @@
<span class="mt-1 p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
A venir
</span>
{{end}}
{{if eq .Status 0 }}
{{else if eq .Status 0 }}
<span class="mt-1 p-1 bg-co-green text-white text-xs font-bold rounded-xl" >
En cours
</span>
{{end}}
{{if eq .Status -1 }}
{{else}}
<span class="mt-1 p-1 bg-gray-500 text-white text-xs font-bold rounded-xl" >
Disponible
</span>
{{end}}
{{end}}
{{end}}
{{end}}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<div class="text-gray-900" >{{.Data.licence_plate}}</div>