Compare commits

...

2 Commits

Author SHA1 Message Date
ncaron ad7f5b642e Sow status of vehicle in vehicles list 2023-03-03 16:58:47 +01:00
ncaron 193bd8ef3a add 'Retiré' in 'Statut Réservation' for some case 2023-03-03 13:16:26 +01:00
@@ -39,15 +39,19 @@
Disponible
</span>
{{else if len .Bookings | eq 1}}
{{range .Bookings}}
{{if eq .Status -1 }}
{{range .Bookings}}
{{if .Data.administrator_unavailability}}
<span class="mt-1 p-1 bg-black text-white text-xs font-bold rounded-xl" >
Retiré
</span>
{{else if eq .Status -1 }}
<span class="mt-1 p-1 bg-gray-500 text-white text-xs font-bold rounded-xl" >
Disponible
</span>
{{end}}
{{end}}
{{else}}
{{range .Bookings}}
{{end}}
{{else if gt (len .Bookings) 1}}
{{range .Bookings}}
{{if .Data.administrator_unavailability}}
<span class="mt-1 p-1 bg-black text-white text-xs font-bold rounded-xl" >
Retiré
@@ -63,7 +67,19 @@
</span>
{{end}}
{{end}}
{{end}}
{{end}}
{{$allAvailable := true}}
{{range .Bookings}}
{{if ne .Status -1}}
{{ $allAvailable = false }}
{{ break }}
{{end}}
{{end}}
{{if $allAvailable}}
<span class="mt-1 p-1 bg-gray-500 text-white text-xs font-bold rounded-xl" >
Disponible
</span>
{{end}}
{{end}}
</div>
</td>