edit bookings-list, booking-display and delete-booking template
This commit is contained in:
parent
cf7b78e64e
commit
bad991c3bc
|
@ -39,7 +39,7 @@
|
|||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||
Retiré
|
||||
</span>
|
||||
{{else if .Deleted}}
|
||||
{{else if .Data.Deleted}}
|
||||
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
||||
Annulé
|
||||
</span>
|
||||
|
|
|
@ -11,18 +11,18 @@
|
|||
changeVehicle: false,
|
||||
selectedvehicle: ''
|
||||
}">
|
||||
{{if and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Data.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
|
||||
</button>
|
||||
|
||||
<a href="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/delete">
|
||||
<a href="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/delete">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-red px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-red focus:ring-offset-2 sm:w-auto">
|
||||
Annuler
|
||||
</button>
|
||||
</a>
|
||||
|
||||
{{end}}
|
||||
<div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true" x-show="changeVehicle">
|
||||
<div class="fixed inset-0 bg-gray-900 bg-opacity-30 transition-opacity"></div>
|
||||
|
||||
|
@ -110,8 +110,13 @@
|
|||
<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 eq .ViewState.booking.Data.Deleted true}}
|
||||
<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>
|
||||
<p class="mt-1 text-sm text-gray-500">Motif : {{.ViewState.booking.Data.motif}}</p>
|
||||
{{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>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ml-4 mt-4 flex-shrink-0">
|
||||
<!-- <button type="button"
|
||||
|
@ -176,7 +181,9 @@
|
|||
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 and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Data.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">
|
||||
|
@ -196,7 +203,9 @@
|
|||
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 and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Data.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">
|
||||
|
@ -216,7 +225,9 @@
|
|||
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 and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Data.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">
|
||||
|
@ -236,7 +247,9 @@
|
|||
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 and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Data.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">
|
||||
|
|
|
@ -18,13 +18,13 @@
|
|||
<p class="text-sm text-gray-500">Souhaitez-vous vraiment annuler cette réservaton ?</p>
|
||||
</div>
|
||||
<div>{{.ViewState.booking.Deleted}}</div>
|
||||
<!-- <div class="col-span-6">
|
||||
<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">
|
||||
|
|
Loading…
Reference in New Issue