showing all statuts for vehicle
This commit is contained in:
parent
361447f188
commit
c16e27fb25
|
@ -34,7 +34,7 @@
|
|||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.bookings}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
<td class="flex-col py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
{{if .Data.administrator_unavailability}}
|
||||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||
Retiré
|
||||
|
|
|
@ -1,13 +1,4 @@
|
|||
{{define "vehicles_list"}}
|
||||
<!-- {{range $.ViewState.bookings}}
|
||||
{{.Vehicleid}}
|
||||
<br>
|
||||
{{end}}
|
||||
<br>
|
||||
{{range $.ViewState.vehicles}}
|
||||
{{.ID}}
|
||||
<br>
|
||||
{{end}} -->
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<div class="mt-8 flex flex-col">
|
||||
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
|
@ -41,26 +32,26 @@
|
|||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.vehicles}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
{{range $.ViewState.bookings}}
|
||||
<td class="flex flex-col whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||
{{range .Bookings}}
|
||||
{{if .Data.administrator_unavailability}}
|
||||
<span class="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" >
|
||||
Retiré
|
||||
</span>
|
||||
{{else}}
|
||||
{{if eq .Status 1 }}
|
||||
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
|
||||
<span class="mt-1 p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
|
||||
A venir
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq .Status 0 }}
|
||||
<span class="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
|
||||
</span>
|
||||
{{end}}
|
||||
{{if eq .Status -1 }}
|
||||
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
||||
Terminé
|
||||
<span class="mt-1 p-1 bg-gray-500 text-white text-xs font-bold rounded-xl" >
|
||||
Disponible
|
||||
</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
Loading…
Reference in New Issue