3 Commits

View File

@@ -38,7 +38,19 @@
<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>
{{else}} {{else if len .Bookings | eq 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 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" >
@@ -53,14 +65,22 @@
<span class="mt-1 p-1 bg-co-green text-white text-xs font-bold rounded-xl" > <span class="mt-1 p-1 bg-co-green text-white text-xs font-bold rounded-xl" >
En cours En cours
</span> </span>
{{else}} {{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" > <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}}
{{end}}
{{end}}
</div> </div>
</td> </td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6"> <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">