parcoursmob-default-theme/web/layouts/solidarity_service/beneficiary-solidarity.html

36 lines
1.6 KiB
HTML
Raw Normal View History

{{define "beneficiary_solidarity"}}
<div class="px-4 py-6 sm:px-6">
<h3 class="text-lg">Transport solidaire</h3>
{{ $bookingSolidarity := len .ViewState.bookingSolidarity }}
{{if eq $bookingSolidarity 0}}
<p class="py-5 mt-1 max-w-2xl text-sm text-gray-500">Aucune course Silvermobi n'est prévue pour le moment.</p>
<div>
<form method="POST" @submit="submit">
<button
type="submit"
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-ci-blue focus:ring-offset-2 sm:w-auto">
Transport Solidaire
</button>
</form>
</div>
{{else}}
<ul class="divide-y divide-gray-200 flex-1">
<li class="py-5 px-4 flex">Conducteur</li>
<li>______</li>
<li class="py-5 px-4 flex">Passager</li>
<li>______</li>
<li class="py-5 px-4 flex">Date</li>
</ul>
{{range .ViewState.bookingSolidarity}}
<ul class="divide-y divide-gray-200 flex-1">
<li class="py-5 px-4 flex">{{.Driver.FirstName}} {{.Driver.LastName}}</li>
<li>______</li>
<li class="py-5 px-4 flex">{{.Passenger.Id}} </li>
<li>______</li>
<li class="py-5 px-4 flex">{{( .PassengerPickupDate)}}</li>
<li>____________</li>
</ul>
{{end}}
{{end}}
</div>
{{end}}