Compare commits

...

2 Commits

1 changed files with 22 additions and 6 deletions

View File

@ -40,13 +40,17 @@
</span> </span>
{{else if len .Bookings | eq 1}} {{else if len .Bookings | eq 1}}
{{range .Bookings}} {{range .Bookings}}
{{if eq .Status -1 }} {{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" > <span class="mt-1 p-1 bg-gray-500 text-white text-xs font-bold rounded-xl" >
Disponible Disponible
</span> </span>
{{end}} {{end}}
{{end}} {{end}}
{{else}} {{else if gt (len .Bookings) 1}}
{{range .Bookings}} {{range .Bookings}}
{{if .Data.administrator_unavailability}} {{if .Data.administrator_unavailability}}
<span class="mt-1 p-1 bg-black text-white text-xs font-bold rounded-xl" > <span class="mt-1 p-1 bg-black text-white text-xs font-bold rounded-xl" >
@ -64,6 +68,18 @@
{{end}} {{end}}
{{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}} {{end}}
</div> </div>
</td> </td>