edit bookings-list, booking-display and delete-booking template
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user