Compare commits

..

2 Commits

1 changed files with 22 additions and 6 deletions

View File

@ -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>