145 lines
8.7 KiB
HTML
145 lines
8.7 KiB
HTML
{{define "content"}}
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
<h1 class="text-2xl font-semibold text-gray-900">Résultats pour « {{.ViewState.query}} »</h1>
|
|
|
|
{{if moduleAvailable "beneficiaries"}}
|
|
<div class="mt-8">
|
|
<h2 class="text-lg font-medium text-gray-900">
|
|
Bénéficiaires
|
|
<span class="ml-2 inline-flex items-center justify-center w-6 h-6 rounded-full bg-co-blue text-xs font-medium text-white">{{len .ViewState.beneficiaries}}</span>
|
|
</h2>
|
|
{{if .ViewState.beneficiaries}}
|
|
<div class="mt-4 overflow-hidden shadow md:rounded-lg">
|
|
<table class="min-w-full divide-y divide-gray-300">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Nom</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Téléphone</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Adresse</th>
|
|
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6"><span class="sr-only">Voir</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200 bg-white">
|
|
{{range .ViewState.beneficiaries}}
|
|
<tr>
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
<div class="flex items-center">
|
|
<div class="h-10 w-10 flex-shrink-0">
|
|
<img class="h-10 w-10 rounded-co" src="/app/beneficiaries/{{.ID}}/picture" alt="">
|
|
</div>
|
|
<div class="ml-4">
|
|
<div class="font-medium text-gray-900">{{.Data.first_name}} {{.Data.last_name}}</div>
|
|
<div class="text-gray-500">{{.Data.email}}</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{.Data.phone_number}}</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
|
<a href="/app/beneficiaries/{{.ID}}" class="text-co-blue hover:text-co-blue">Voir</a>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{else}}
|
|
<p class="mt-2 text-sm text-gray-500">Aucun résultat</p>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if moduleAvailable "solidarity_transport"}}
|
|
<div class="mt-8">
|
|
<h2 class="text-lg font-medium text-gray-900">
|
|
Conducteurs solidaires
|
|
<span class="ml-2 inline-flex items-center justify-center w-6 h-6 rounded-full bg-co-blue text-xs font-medium text-white">{{len .ViewState.solidarity_drivers}}</span>
|
|
</h2>
|
|
{{if .ViewState.solidarity_drivers}}
|
|
<div class="mt-4 overflow-hidden shadow md:rounded-lg">
|
|
<table class="min-w-full divide-y divide-gray-300">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Nom</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Adresse</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Téléphone</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Profil validé</th>
|
|
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6"><span class="sr-only">Voir</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200 bg-white">
|
|
{{range .ViewState.solidarity_drivers}}
|
|
<tr>
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">{{.Data.first_name}} {{.Data.last_name}}</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{.Data.phone_number}}</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
|
{{if solidarityDriverValidatedProfile . (solidarityDocuments .ID)}}
|
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
|
{{else}}
|
|
<span class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
|
{{end}}
|
|
</td>
|
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
|
<a href="/app/solidarity-transport/drivers/{{.ID}}" class="text-co-blue hover:text-co-blue">Voir</a>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{else}}
|
|
<p class="mt-2 text-sm text-gray-500">Aucun résultat</p>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
{{if moduleAvailable "organized_carpool"}}
|
|
<div class="mt-8">
|
|
<h2 class="text-lg font-medium text-gray-900">
|
|
Conducteurs covoiturage
|
|
<span class="ml-2 inline-flex items-center justify-center w-6 h-6 rounded-full bg-co-blue text-xs font-medium text-white">{{len .ViewState.organized_carpool_drivers}}</span>
|
|
</h2>
|
|
{{if .ViewState.organized_carpool_drivers}}
|
|
<div class="mt-4 overflow-hidden shadow md:rounded-lg">
|
|
<table class="min-w-full divide-y divide-gray-300">
|
|
<thead class="bg-gray-50">
|
|
<tr>
|
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Nom</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Adresse départ</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Adresse destination</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Téléphone</th>
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Profil validé</th>
|
|
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6"><span class="sr-only">Voir</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-200 bg-white">
|
|
{{range .ViewState.organized_carpool_drivers}}
|
|
<tr>
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">{{.Data.first_name}} {{.Data.last_name}}</td>
|
|
<td class="px-3 py-4 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
|
<td class="px-3 py-4 text-sm text-gray-500">{{if .Data.address_destination}}{{.Data.address_destination.properties.label}}{{end}}</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">{{.Data.phone_number}}</td>
|
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
|
{{if carpoolDriverValidatedProfile . (carpoolDocuments .ID)}}
|
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
|
{{else}}
|
|
<span class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
|
{{end}}
|
|
</td>
|
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
|
<a href="/app/organized-carpool/drivers/{{.ID}}" class="text-co-blue hover:text-co-blue">Voir</a>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{{else}}
|
|
<p class="mt-2 text-sm text-gray-500">Aucun résultat</p>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|