Sow status of vehicle in vehicles list
This commit is contained in:
parent
193bd8ef3a
commit
ad7f5b642e
|
@ -50,8 +50,8 @@
|
|||
</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{range .Bookings}}
|
||||
{{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é
|
||||
|
@ -67,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>
|
||||
|
|
Loading…
Reference in New Issue