Compare commits

..

No commits in common. "1f951da1fa72ab150794fd495b82b85263e7724a" and "2747ce67fa54daf2745eeba1d0e88020d675c977" have entirely different histories.

2 changed files with 12 additions and 37 deletions

View File

@ -9,13 +9,7 @@
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none"
x-data="{
changeVehicle: false,
selectedvehicle: '',
submitSelectedvehicle(event) {
if(this.selectedvehicle == '') {
event.preventDefault()
}
return true
}
selectedvehicle: ''
}">
{{if and (ne .ViewState.booking.Status -1) (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
<button type="button" @click="changeVehicle = ! changeVehicle"
@ -40,7 +34,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" @submit="submitSelectedvehicle">
<form method="POST" action="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/change-vehicle" class="mt-4">
<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 }}
@ -84,44 +78,29 @@
<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.beneficiary.Data.birthdate}}
{{if .ViewState.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.beneficiary.Data.birthdate).Format
.ViewState.Data.birthdate).Format
"02/01/2006"}}</dd>
</div>
{{end}}
{{if and .ViewState.beneficiary.Data.gender (ne .ViewState.Data.gender "0")}}
{{if and .ViewState.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.beneficiary.Data.gender}}</dd>
.ViewState.Data.gender}}</dd>
</div>
{{end}}
{{if .ViewState.beneficiary.Data.address}}
{{if .ViewState.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.beneficiary.Data.address.properties.label}}
{{.ViewState.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>
@ -204,7 +183,7 @@
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))}}
{{if and (ne .ViewState.booking.Status -1) (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>
@ -226,7 +205,7 @@
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))}}
{{if and (ne .ViewState.booking.Status -1) (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>
@ -248,7 +227,7 @@
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))}}
{{if and (ne .ViewState.booking.Status -1) (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>
@ -270,7 +249,7 @@
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))}}
{{if and (ne .ViewState.booking.Status -1) (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>

View File

@ -104,10 +104,6 @@
<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" >