Improvements
This commit is contained in:
@@ -157,6 +157,22 @@
|
||||
{{end}}
|
||||
</dd>
|
||||
</div>
|
||||
{{if .ViewState.booking.Data.motivation}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||
<dt class="text-sm font-medium text-gray-500">Motif</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{$motivation := .ViewState.booking.Data.motivation}}
|
||||
{{$found := false}}
|
||||
{{range .ViewState.booking_motivations}}
|
||||
{{if eq .value $motivation}}
|
||||
{{.label}}
|
||||
{{$found = true}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if not $found}}{{$motivation}}{{end}}
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||
<dt class="text-sm font-medium text-gray-500">Distance passager</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
@@ -172,27 +188,19 @@
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
<span class="font-medium">{{ printf "%.2f" .ViewState.booking.Journey.Price.Amount }} {{ .ViewState.booking.Journey.Price.Currency }}</span>
|
||||
<span class="font-medium">{{ printf "%.2f" (round2 .ViewState.booking.Journey.Price.Amount) }} {{ .ViewState.booking.Journey.Price.Currency }}</span>
|
||||
</dd>
|
||||
</div>
|
||||
{{if .ViewState.booking.DriverCompensationAmount}}
|
||||
{{if gt .ViewState.booking.DriverCompensationAmount 0.0}}
|
||||
{{if gt (round2 .ViewState.booking.DriverCompensationAmount) 0.0}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||
<dt class="text-sm font-medium text-gray-500">Indemnité conducteur</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
<span class="font-medium">{{ printf "%.2f" .ViewState.booking.DriverCompensationAmount }} {{.ViewState.booking.DriverCompensationCurrency}}</span>
|
||||
<span class="font-medium">{{ printf "%.2f" (round2 .ViewState.booking.DriverCompensationAmount) }} {{.ViewState.booking.DriverCompensationCurrency}}</span>
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ViewState.booking.Data.motivation}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
||||
<dt class="text-sm font-medium text-gray-500">Motif</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{ .ViewState.booking.Data.motivation }}
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user