add icone 'Annulé' and update 'Réservations à venir' on fleet-display template

This commit is contained in:
2023-05-10 12:04:17 +02:00
parent 61e9285a2b
commit cf7b78e64e
4 changed files with 24 additions and 4 deletions

View File

@@ -39,6 +39,10 @@
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
Retiré
</span>
{{else if .Deleted}}
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
Annulé
</span>
{{else}}
{{if eq .Status 1 }}
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >

View File

@@ -15,15 +15,16 @@
<div class="mt-3 text-center sm:mt-5">
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Confirmation d'annulation</h3>
<div class="mt-2">
<p class="text-sm text-gray-500">Voulez-vous vraiment annuler cette réservaton ?</p>
<p class="text-sm text-gray-500">Souhaitez-vous vraiment annuler cette réservaton ?</p>
</div>
<div class="col-span-6">
<div>{{.ViewState.booking.Deleted}}</div>
<!-- <div class="col-span-6">
<label for="motif" class="block text-sm font-medium text-gray-700">Motif</label>
<div class="mt-1">
<textarea rows="4" name="motif" id="motif"
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-2xl"></textarea>
</div>
</div>
</div> -->
</div>
</div>
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">

View File

@@ -104,6 +104,10 @@
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
Retiré
</span>
{{else if .Deleted}}
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
Annulé
</span>
{{else}}
{{if eq .Status 1 }}
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
@@ -165,13 +169,19 @@
<p class="p-12 text-gray-500 text-center text-md">Aucune réservation à venir</p>
{{end}}
<ul role="list" class="divide-y divide-gray-200">
{{$noReservation := true}}
{{range .ViewState.vehicle.Bookings}}
<li class="py-4 flex">
<div class="ml-3">
{{if eq .Status 1 }}
<a href="/app/vehicles-management/bookings/{{.ID}}" class="hover:bg-gray-200">
<p class="text-sm font-medium text-gray-900">Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</p>
<p class="text-sm text-gray-500"></p>
</a>
{{else if $noReservation}}
{{$noReservation = false}}
<p class="p-12 text-gray-500 text-center text-md">Aucune réservation à venir</p>
{{end}}
</div>
</li>
{{end}}