Agenda improvements

This commit is contained in:
2022-09-06 15:02:59 +02:00
parent 8aa8fc927b
commit 23f4603dec
14 changed files with 285 additions and 137 deletions

View File

@@ -0,0 +1,29 @@
{{define "agenda_widget"}}
<div class="col-span-1 bg-white rounded-2xl shadow divide-y divide-gray-200 flex flex-col">
<div class="-ml-4 -mt-2 px-4 py-2 flex items-center justify-between flex-wrap sm:flex-nowrap">
<div class="ml-4 mt-2">
<h3 class="text-lg leading-6 font-medium text-gray-900">Prochains dispositifs</h3>
</div>
<!-- <div class="ml-4 mt-2 flex-shrink-0">
<button type="button" class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Voir</button>
</div> -->
</div>
<ul role="list" class="divide-y divide-gray-200 flex-1">
{{range .}}
<li class="py-2 px-4 flex">
<a href="/app/agenda/{{.ID}}" class="flex w-full">
<div class="ml-3">
<p class="text-sm font-medium text-gray-900">{{(timeFrom .Startdate).Format "02/01"}} - {{.Type}} - {{.Name}}</p>
</div>
</a>
</li>
{{end}}
</ul>
<a href="/app/agenda/">
<button class="w-full p-2 text-center bg-co-blue text-white rounded-b-2xl text-sm">
Agenda des dispositifs
</button>
</a>
</div>
{{end}}

View File

@@ -57,7 +57,7 @@
class="flex-1 flex items-center justify-between border-t border-r border-b border-gray-200 bg-white rounded-r-3xl truncate">
<div class="flex-1 px-4 py-2 text-sm truncate">
<a href="#" class="text-gray-900 font-medium hover:text-gray-600">Référents</a>
<p class="text-gray-500">53 membres</p>
<p class="text-gray-500">{{.ViewState.count_members}} membres</p>
</div>
</div>
</li>
@@ -68,7 +68,8 @@
<div class="py-4 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
{{template "beneficiaries_widget" .ViewState.beneficiaries}}
{{template "beneficiaries_widget" .ViewState.beneficiaries}}
{{template "agenda_widget" .ViewState.events}}
</div>