{{define "content"}}

Réservation de véhicule

{{if and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Deleted)}} {{if eq .ViewState.status_management "manual"}} {{else}} {{end}} {{end}} {{if eq .ViewState.status_management "manual"}} {{end}}

Bénéficiaire

Nom
{{.ViewState.beneficiary.Data.first_name}} {{.ViewState.beneficiary.Data.last_name}}
Email
{{.ViewState.beneficiary.Data.email}}
Téléphone
{{.ViewState.beneficiary.Data.phone_number}}
{{if .ViewState.beneficiary.Data.birthdate}}
Date de naissance
{{(timeFrom .ViewState.beneficiary.Data.birthdate).Format "02/01/2006"}}
{{end}} {{if and .ViewState.beneficiary.Data.gender (ne .ViewState.Data.gender "0")}}
Date de naissance
{{genderISO5218 .ViewState.beneficiary.Data.gender}}
{{end}} {{if .ViewState.beneficiary.Data.address}}
Adresse
{{.ViewState.beneficiary.Data.address.properties.label}}
{{end}} {{if .ViewState.beneficiary.Data.file_number}}
Numéro de dossier (CAF / Pole emploi)
{{.ViewState.beneficiary.Data.file_number}}
{{end}}
{{if .ViewState.booking_extra_properties}}

Informations complémentaires

{{end}}
{{if .ViewState.booking.Deleted}}

Réservation annulée le {{if .ViewState.booking.Data.deleted_at}}{{(timeFrom .ViewState.booking.Data.deleted_at).Format "02/01/2006"}}{{else}}{{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}{{end}}

{{if .ViewState.booking.Data.deleted_by}}

Annulée par : {{index (index .ViewState.booking.Data.deleted_by "user") "display_name"}} ({{index (index .ViewState.booking.Data.deleted_by "group") "name"}})

{{end}} {{if .ViewState.booking.Data.reason}}

Motif : {{.ViewState.booking.Data.reason}}

{{else if .ViewState.booking.Data.motif}}

Motif : {{.ViewState.booking.Data.motif}}

{{end}} {{else}}

Réservation {{template "booking_status_badge" .}}

Informations utiles sur la réservation.

{{if eq .ViewState.status_management "manual"}} {{range .ViewState.status_options}} {{if eq (index . "name") $.ViewState.booking.ManualStatus}} {{if and (eq (index . "meta_status") "open") (isPast $.ViewState.booking.Startdate)}}
{{$.IconSet.Icon "hero:outline/exclamation-triangle" "h-6 w-6 flex-shrink-0"}} Retard : la date de début de réservation est dépassée
{{else if and (eq (index . "meta_status") "active") (isPast $.ViewState.booking.Enddate)}}
{{$.IconSet.Icon "hero:outline/exclamation-triangle" "h-6 w-6 flex-shrink-0"}} Retard : la date de fin de réservation est dépassée
{{end}} {{end}} {{end}} {{end}} {{end}}
{{if .ViewState.booking.Data.booked_by}}
Prescripteur
{{if .ViewState.booking.Data.booked_by.user}} {{.ViewState.booking.Data.booked_by.user.display_name}} {{end}} {{if .ViewState.booking.Data.booked_by.group}}{{.ViewState.booking.Data.booked_by.group.name}}{{end}}
{{end}}
Véhicule
{{.ViewState.vehicle.Data.name}}
Immatriculation
{{.ViewState.vehicle.Data.licence_plate}}
Type
{{.ViewState.vehicle.Type}}
{{if .ViewState.vehicle.Data.address}}
Lieu de récupération
{{.ViewState.vehicle.Data.address.properties.label}}
{{end}}
Date et heure de prise en charge
{{(timeFrom .ViewState.booking.Startdate).Format "02/01/2006 à 15:04"}}
{{if (not .ViewState.booking.Deleted)}} Modifier {{end}}
Date et heure de restitution
{{(timeFrom .ViewState.booking.Enddate).Format "02/01/2006 à 15:04"}}
{{if (not .ViewState.booking.Deleted)}} Modifier {{end}}
Indisponible à partir du
{{(timeFrom .ViewState.booking.Unavailablefrom).Format "02/01/2006"}}
{{if (not .ViewState.booking.Deleted)}} Modifier {{end}}
Sera à nouveau disponible le
{{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}
{{if (not .ViewState.booking.Deleted)}} Modifier {{end}}
{{template "booking_documents" .}} {{template "booking_status_history" .}}
{{end}}