diff --git a/web/layouts/vehicles_management/_partials/vehicles-list.html b/web/layouts/vehicles_management/_partials/vehicles-list.html index fc4cb7e..1fdcff7 100644 --- a/web/layouts/vehicles_management/_partials/vehicles-list.html +++ b/web/layouts/vehicles_management/_partials/vehicles-list.html @@ -50,8 +50,8 @@ {{end}} {{end}} - {{else}} - {{range .Bookings}} + {{else if gt (len .Bookings) 1}} + {{range .Bookings}} {{if .Data.administrator_unavailability}} Retiré @@ -67,7 +67,19 @@ {{end}} {{end}} - {{end}} + {{end}} + {{$allAvailable := true}} + {{range .Bookings}} + {{if ne .Status -1}} + {{ $allAvailable = false }} + {{ break }} + {{end}} + {{end}} + {{if $allAvailable}} + + Disponible + + {{end}} {{end}}