Compare commits
5 Commits
59950586ec
...
vehicleLis
| Author | SHA1 | Date | |
|---|---|---|---|
| ad7f5b642e | |||
| 193bd8ef3a | |||
| 332d9dd509 | |||
| bb70ed9136 | |||
| c450eecc37 |
@@ -9,7 +9,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
Statut
|
Statut Réservation
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
@@ -32,13 +32,26 @@
|
|||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{range .ViewState.vehicles}}
|
{{range .ViewState.vehicles}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="flex flex-col whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||||
|
<div class="flex flex-col px-6">
|
||||||
{{if not .Bookings}}
|
{{if not .Bookings}}
|
||||||
<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 slice .Bookings 0 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}}
|
||||||
{{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" >
|
||||||
Retiré
|
Retiré
|
||||||
@@ -52,14 +65,23 @@
|
|||||||
<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}}
|
|
||||||
<span class="mt-1 p-1 bg-gray-500 text-white text-xs font-bold rounded-xl" >
|
|
||||||
Disponible
|
|
||||||
</span>
|
|
||||||
{{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}}
|
||||||
{{end}}
|
</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">
|
||||||
<div class="text-gray-900" >{{.Data.licence_plate}}</div>
|
<div class="text-gray-900" >{{.Data.licence_plate}}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user