changes + saved search

This commit is contained in:
Arnaud Delcasse
2025-10-08 10:39:13 +02:00
parent 27ce05a91a
commit 2fee2a4ce8
16 changed files with 670 additions and 165 deletions

View File

@@ -39,7 +39,7 @@
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
Retiré
</span>
{{else if or .Deleted .Data.Deleted}}
{{else if .Deleted}}
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
Annulé
</span>

View File

@@ -17,7 +17,7 @@
return true
}
}">
{{if and (ne .ViewState.booking.Status -1) (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
{{if and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Deleted)}}
<button type="button" @click="changeVehicle = ! changeVehicle"
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
Changer de véhicule
@@ -135,9 +135,18 @@
<div class="bg-white px-4 py-5 border-b border-gray-200 sm:px-6">
<div class="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-nowrap">
<div class="ml-4 mt-4">
{{if or .ViewState.booking.Data.Deleted .ViewState.booking.Deleted}}
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation annulée le {{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}</h3>
{{if .ViewState.booking.Deleted}}
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation annulée le {{if .ViewState.booking.Data.deleted_at}}{{(timeFrom .ViewState.booking.Data.deleted_at).Format "02/01/2006"}}{{else}}{{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}{{end}}</h3>
{{if .ViewState.booking.Data.deleted_by}}
<p class="mt-1 text-sm text-gray-500">
Annulée par : {{index (index .ViewState.booking.Data.deleted_by "user") "display_name"}} ({{index (index .ViewState.booking.Data.deleted_by "group") "name"}})
</p>
{{end}}
{{if .ViewState.booking.Data.reason}}
<p class="mt-1 text-sm text-gray-500">Motif : {{.ViewState.booking.Data.reason}}</p>
{{else if .ViewState.booking.Data.motif}}
<p class="mt-1 text-sm text-gray-500">Motif : {{.ViewState.booking.Data.motif}}</p>
{{end}}
{{else}}
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation</h3>
<p class="mt-1 text-sm text-gray-500">Informations utiles sur la réservation.</p>
@@ -211,7 +220,7 @@
x-data="{ updateOpen: false }">
<div class="w-full inline-flex" x-show="!updateOpen">
<div class="flex-1">{{(timeFrom .ViewState.booking.Startdate).Format "02/01/2006"}}</div>
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
{{if (not .ViewState.booking.Deleted)}}
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
{{end}}
</div>
@@ -233,7 +242,7 @@
x-data="{ updateOpen: false }">
<div class="w-full inline-flex" x-show="!updateOpen">
<div class="flex-1">{{(timeFrom .ViewState.booking.Enddate).Format "02/01/2006"}}</div>
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
{{if (not .ViewState.booking.Deleted)}}
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
{{end}}
</div>
@@ -255,7 +264,7 @@
x-data="{ updateOpen: false }">
<div class="w-full inline-flex" x-show="!updateOpen">
<div class="flex-1">{{(timeFrom .ViewState.booking.Unavailablefrom).Format "02/01/2006"}}</div>
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
{{if (not .ViewState.booking.Deleted)}}
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
{{end}}
</div>
@@ -277,7 +286,7 @@
x-data="{ updateOpen: false }">
<div class="w-full inline-flex" x-show="!updateOpen">
<div class="flex-1">{{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}</div>
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
{{if (not .ViewState.booking.Deleted)}}
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
{{end}}
</div>

View File

@@ -110,7 +110,7 @@
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
Retiré
</span>
{{else if or .Deleted .Data.Deleted}}
{{else if .Deleted}}
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
Annulé
</span>