2022-12-05 16:24:24 +00:00
|
|
|
{{define "subscribers_table"}}
|
|
|
|
<table class="min-w-full divide-y divide-gray-300 border-t border-gray-200">
|
|
|
|
<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 ">
|
|
|
|
Bénéficiaire
|
|
|
|
</th>
|
|
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
|
|
Prescripteur
|
|
|
|
</th>
|
|
|
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
|
|
Date d'inscription
|
|
|
|
</th>
|
|
|
|
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
|
|
|
<span class="sr-only">Actions</span>
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2023-02-01 09:47:48 +00:00
|
|
|
{{$evid := .ViewState.event.ID}}
|
2022-12-05 16:24:24 +00:00
|
|
|
<tbody class="divide-y divide-gray-200 bg-white">
|
|
|
|
{{range .ViewState.event.Subscriptions}}
|
|
|
|
<tr>
|
|
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
|
|
|
<a href="/app/beneficiaries/{{.Subscriber}}" class="flex">
|
|
|
|
<img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Subscriber}}/picture" alt=" "> {{ (index $.ViewState.subscribers .Subscriber).Data.first_name }} {{ (index $.ViewState.subscribers .Subscriber).Data.last_name }}
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
|
|
<div class="flex"><img class="h-6 w-6 rounded-co mr-2" src="/app/beneficiaries/{{.Data.subscribed_by.user.id}}/picture" alt=" "> {{.Data.subscribed_by.user.display_name}}</div>
|
|
|
|
{{.Data.subscribed_by.group.name}}
|
|
|
|
</td>
|
|
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
|
|
{{(timeFormat .CreatedAt "02/01/2006")}}
|
|
|
|
</td>
|
|
|
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
|
|
<!-- <a href=""
|
|
|
|
class="text-co-blue hover:text-co-blue">Voir</a> -->
|
|
|
|
</td>
|
2023-01-26 14:24:16 +00:00
|
|
|
|
|
|
|
<!-- ajout du bouton supprimer -->
|
|
|
|
<td>
|
2023-02-01 10:51:00 +00:00
|
|
|
<a href="/app/agenda/{{$evid}}/{{.Subscriber}}/delete" class="inline-flex"><button type="button"
|
2023-02-15 13:26:56 +00:00
|
|
|
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-red">Retirer</button></a>
|
2023-01-26 14:24:16 +00:00
|
|
|
</td>
|
|
|
|
<!-- fin -->
|
2022-12-05 16:24:24 +00:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{end}}
|