Improvements
This commit is contained in:
@@ -135,13 +135,13 @@
|
||||
</dd>
|
||||
</div>
|
||||
<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</dt>
|
||||
<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">
|
||||
{{ if .ViewState.booking.Price }}
|
||||
{{ if eq .ViewState.booking.Price.Type.String "FREE" }}
|
||||
<span class="text-co-green font-medium">Gratuit</span>
|
||||
{{ else if eq .ViewState.booking.Price.Type.String "PAYING" }}
|
||||
<span class="font-medium">{{ printf "%.2f" .ViewState.booking.Price.Amount }} {{ .ViewState.booking.Price.Currency }}</span>
|
||||
<span class="font-medium">{{ printf "%.2f" (round2 .ViewState.booking.Price.Amount) }} {{ .ViewState.booking.Price.Currency }}</span>
|
||||
{{ else }}
|
||||
<span class="text-gray-500">Prix non défini</span>
|
||||
{{ end }}
|
||||
@@ -150,6 +150,24 @@
|
||||
{{ end }}
|
||||
</dd>
|
||||
</div>
|
||||
{{if and .ViewState.booking.DriverCompensationAmount .ViewState.booking.DriverCompensationCurrency}}
|
||||
{{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" (round2 .ViewState.booking.DriverCompensationAmount) }} {{ .ViewState.booking.DriverCompensationCurrency }}</span>
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ViewState.booking.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.Motivation}}
|
||||
</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user