parcoursmob-default-theme/web/layouts/agenda/history-event.html

102 lines
5.7 KiB
HTML

{{define "content"}}
{{ if eq (index .ViewState.event.Owners 0) .Group.ID }}
<main class="py-10">
<div class="max-w-3xl mx-auto px-4 sm:px-6 md:flex md:items-center md:justify-between md:space-x-5 lg:max-w-7xl lg:px-8">
<div class="flex items-center space-x-5">
<div>
<h1 class="text-2xl font-bold text-gray-900">Bénéficiaires désinscrits de l'évènement {{.ViewState.event.Name}}</h1>
<p class="text-m font-medium text-gray-500">
{{if eq .ViewState.event.Startdate .ViewState.event.Enddate}}
Le {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}}
{{else}}
Du {{(timeFrom .ViewState.event.Startdate).Format "02/01/2006"}} au {{(timeFrom
.ViewState.event.Enddate).Format "02/01/2006"}}
{{end}}
</p>
</div>
</div>
<div class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
<a href="/app/agenda/{{.ViewState.event.ID}}" class="inline-flex"><button type="button"
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Retour</button></a>
</div>
</div>
<table class="mt-4 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">
Désinscrit par
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Date de suppression
</th>
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Motif
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
{{range .ViewState.event.DeletedSubscription}}
<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">
<div class="flex"><img class="h-6 w-6 rounded-co mr-2"
src="/app/beneficiaries/{{.Data.unsubscribed_by.user.id}}/picture" alt=" ">
{{.Data.unsubscribed_by.user.display_name}}</div>
{{.Data.unsubscribed_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">
<div class="flex">{{.Data.motif}}</div>
</td>
</tr>
{{end}}
</tbody>
</table>
</main>
{{else}}
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
<div class="fixed inset-0 z-10 overflow-y-auto">
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
<div
class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full max-w-lg sm:p-6">
<div>
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
{{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
</div>
<div class="mt-3 text-center sm:mt-5">
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Vous n'avez pas accès à
cette page</h3>
</div>
</div>
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-1">
<a href="/app/agenda/{{.ViewState.event.ID}}"
class="mt-3 inline-flex w-full justify-center rounded-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">Annuler</a>
</div>
</div>
</div>
</div>
{{end}}
{{end}}