add times to vehicle reservation
This commit is contained in:
@@ -39,6 +39,11 @@
|
||||
<div class="text-center">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Changer de véhicule</h3>
|
||||
</div>
|
||||
{{if eq (len .ViewState.alternative_vehicles) 0}}
|
||||
<div class="mt-4 text-center">
|
||||
<p class="text-sm text-gray-500">Aucun véhicule disponible pour les dates de cette réservation.</p>
|
||||
</div>
|
||||
{{else}}
|
||||
<form method="POST" action="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/change-vehicle" class="mt-4" @submit="submitSelectedvehicle">
|
||||
<select x-model="selectedvehicle" id="vehicle" name="vehicle" class="mt-1 block w-full rounded-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
|
||||
<option value=""></option>
|
||||
@@ -50,6 +55,7 @@
|
||||
<button type="submit" class="inline-flex w-full justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:text-sm">Changer de véhicule</button>
|
||||
</div>
|
||||
</form>
|
||||
{{end}}
|
||||
<div class="mt-5 sm:mt-6">
|
||||
<button @click="changeVehicle=false" type="button" class="inline-flex w-full justify-center max-w-xs bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
||||
</div>
|
||||
@@ -212,44 +218,48 @@
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de récupération</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2 inline-flex"
|
||||
<dt class="text-sm font-medium text-gray-500">Date et heure de prise en charge</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"
|
||||
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>
|
||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Startdate).Format "02/01/2006 à 15:04"}}</div>
|
||||
{{if (not .ViewState.booking.Deleted)}}
|
||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<form method="POST" class="inline-flex" x-show="updateOpen">
|
||||
<div class="flex-1">
|
||||
<form method="POST" class="inline-flex flex-col gap-2" x-show="updateOpen">
|
||||
<div class="flex gap-2">
|
||||
<input type="date" name="startdate" value="{{(timeFrom .ViewState.booking.Startdate).Format "2006-01-02"}}"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||
<input type="time" name="starttime" value="{{(timeFrom .ViewState.booking.Startdate).Format "15:04"}}"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||
</div>
|
||||
<button
|
||||
class=" justify-center text-co-blue px-4">
|
||||
<button
|
||||
class="justify-center text-co-blue px-4 self-start">
|
||||
OK
|
||||
</button>
|
||||
</form>
|
||||
</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de retour</dt>
|
||||
<dt class="text-sm font-medium text-gray-500">Date et heure de restitution</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"
|
||||
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>
|
||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Enddate).Format "02/01/2006 à 15:04"}}</div>
|
||||
{{if (not .ViewState.booking.Deleted)}}
|
||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<form method="POST" class="inline-flex" x-show="updateOpen">
|
||||
<div class="flex-1">
|
||||
<form method="POST" class="inline-flex flex-col gap-2" x-show="updateOpen">
|
||||
<div class="flex gap-2">
|
||||
<input type="date" name="enddate" value="{{(timeFrom .ViewState.booking.Enddate).Format "2006-01-02"}}"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||
<input type="time" name="endtime" value="{{(timeFrom .ViewState.booking.Enddate).Format "15:04"}}"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block sm:text-sm border-gray-300 rounded-2xl">
|
||||
</div>
|
||||
<button
|
||||
class=" justify-center text-co-blue px-4">
|
||||
<button
|
||||
class="justify-center text-co-blue px-4 self-start">
|
||||
OK
|
||||
</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user