feat: extra properties dynamiques, filtrage meta_status et alertes retard
This commit is contained in:
@@ -1,45 +1,74 @@
|
||||
{{define "content"}}
|
||||
{{$defaultTab := "bookings"}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h1 class="text-2xl font-semibold text-gray-900">Gestion des véhicules et réservations</h1>
|
||||
|
||||
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden my-4" x-data="{
|
||||
tab: '{{or .ViewState.tab $defaultTab}}',
|
||||
to(event) {
|
||||
this.tab = event.target.value
|
||||
}
|
||||
}">
|
||||
<div class="divide-y divide-gray-200">
|
||||
<div>
|
||||
<div class="hidden sm:block">
|
||||
<div class="border-b border-gray-200 pl-4 flex justify-between items-center">
|
||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||
<a href="#" @click="tab = 'bookings'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'bookings' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Réservations </a>
|
||||
|
||||
<a href="#" @click="tab = 'vehicles'"
|
||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||
:class="tab == 'vehicles' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||
Véhicules </a>
|
||||
</nav>
|
||||
|
||||
<div class="pr-4 flex space-x-2">
|
||||
<div x-show="tab == 'bookings'" class="flex space-x-2">
|
||||
<a href="/exports/fleets/bookings/group_bookings.xlsx?status={{.ViewState.filters.status}}&date_start={{.ViewState.filters.date_start}}&date_end={{.ViewState.filters.date_end}}&vehicle_type={{.ViewState.filters.vehicle_type}}">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
||||
Export
|
||||
</button>
|
||||
</a>
|
||||
<a href="/app/vehicles-management/bookings/">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
{{$.IconSet.Icon "hero:outline/table-cells" "h-5 w-5 mr-3"}}
|
||||
Historique
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
<div x-show="tab == 'vehicles'">
|
||||
<a href="/app/vehicles-management/fleet/add">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
||||
Ajouter un véhicule
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div x-show="tab == 'bookings'">
|
||||
{{template "vehicle_booking_filters" .}}
|
||||
{{template "bookings_list" .}}
|
||||
</div>
|
||||
|
||||
<div x-show="tab == 'vehicles'">
|
||||
{{template "vehicle_filters" .}}
|
||||
{{template "vehicles_list" .}}
|
||||
</div>
|
||||
|
||||
<div class="sm:flex sm:items-center">
|
||||
<div class="sm:flex-auto">
|
||||
<h2 class="text-xl font-semibold text-gray-600 pt-8">Réservations en cours et à venir</h2>
|
||||
</div>
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
<a href="/app/vehicles-management/bookings/">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
{{$.IconSet.Icon "hero:outline/table-cells" "h-5 w-5 mr-3"}}
|
||||
Historique
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{{template "bookings_list" .}}
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8">
|
||||
|
||||
|
||||
<div class="sm:flex sm:items-center">
|
||||
<div class="sm:flex-auto">
|
||||
<h2 class="text-xl font-semibold text-gray-600 pt-8">Véhicules</h2>
|
||||
</div>
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
<a href="/app/vehicles-management/fleet/add">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
||||
Ajouter un véhicule
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "vehicles_list" .}}
|
||||
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user