merge with main
This commit is contained in:
@@ -39,6 +39,10 @@
|
||||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||
Retiré
|
||||
</span>
|
||||
{{else if or .Deleted .Data.Deleted}}
|
||||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||
Annulé
|
||||
</span>
|
||||
{{else}}
|
||||
{{if eq .Status 1 }}
|
||||
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
|
||||
|
||||
@@ -9,8 +9,15 @@
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none"
|
||||
x-data="{
|
||||
changeVehicle: false,
|
||||
selectedvehicle: ''
|
||||
selectedvehicle: '',
|
||||
submitSelectedvehicle(event) {
|
||||
if(this.selectedvehicle == '') {
|
||||
event.preventDefault()
|
||||
}
|
||||
return true
|
||||
}
|
||||
}">
|
||||
{{if and (ne .ViewState.booking.Status -1) (not (or .ViewState.booking.Deleted .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
|
||||
@@ -21,6 +28,7 @@
|
||||
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>
|
||||
@@ -31,7 +39,7 @@
|
||||
<div class="text-center">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Changer de véhicule</h3>
|
||||
</div>
|
||||
<form method="POST" action="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/change-vehicle" class="mt-4">
|
||||
<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>
|
||||
{{range .ViewState.alternative_vehicles }}
|
||||
@@ -75,29 +83,44 @@
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.phone_number}}</dd>
|
||||
</div>
|
||||
{{if .ViewState.Data.birthdate}}
|
||||
{{if .ViewState.beneficiary.Data.birthdate}}
|
||||
<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 naissance</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom
|
||||
.ViewState.Data.birthdate).Format
|
||||
.ViewState.beneficiary.Data.birthdate).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .ViewState.Data.gender (ne .ViewState.Data.gender "0")}}
|
||||
{{if and .ViewState.beneficiary.Data.gender (ne .ViewState.Data.gender "0")}}
|
||||
<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 naissance</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{genderISO5218
|
||||
.ViewState.Data.gender}}</dd>
|
||||
.ViewState.beneficiary.Data.gender}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.Data.address}}
|
||||
{{if .ViewState.beneficiary.Data.address}}
|
||||
<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">Adresse</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.Data.address.properties.label}}
|
||||
{{.ViewState.beneficiary.Data.address.properties.label}}
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.beneficiary.Data.file_number}}
|
||||
<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">Numéro de dossier (CAF / Pole emploi)</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.file_number}}
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
<div>
|
||||
<a href="/app/beneficiaries/{{.ViewState.beneficiary.ID}}">
|
||||
<button type="button"
|
||||
class="w-full items-center px-4 py-2 border border-transparent shadow-sm text-xs font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Fiche bénéficiaire</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,8 +135,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 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>
|
||||
<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"
|
||||
@@ -183,7 +211,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 (not (or .ViewState.booking.Deleted .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">
|
||||
@@ -203,7 +233,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 (not (or .ViewState.booking.Deleted .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">
|
||||
@@ -223,7 +255,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 (not (or .ViewState.booking.Deleted .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">
|
||||
@@ -243,7 +277,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 (not (or .ViewState.booking.Deleted .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">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
|
||||
<a href="/api/cache/{{.ViewState.cacheid}}/export">
|
||||
<a href="/exports/fleets/bookings">
|
||||
<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 flex items-center 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"}}
|
||||
|
||||
@@ -110,6 +110,10 @@
|
||||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||
Retiré
|
||||
</span>
|
||||
{{else if or .Deleted .Data.Deleted}}
|
||||
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
||||
Annulé
|
||||
</span>
|
||||
{{else}}
|
||||
{{if eq .Status 1 }}
|
||||
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
|
||||
|
||||
@@ -126,7 +126,12 @@
|
||||
</div>
|
||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||
{{ $fieldName := "address" }}
|
||||
{{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.vehicle.Data.address) }}
|
||||
{{if .ViewState.Data.address}}
|
||||
{{$default := .ViewState.Data.address}}
|
||||
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
||||
{{else}}
|
||||
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
||||
{{end}}
|
||||
|
||||
<div class="mt-5">
|
||||
<label for="informations" class="block text-sm font-medium text-gray-700">Informations pratiques pour le bénéficiaire</label>
|
||||
|
||||
Reference in New Issue
Block a user