2024-12-02 07:58:53 +00:00
|
|
|
{{define "beneficiary_diags"}}
|
|
|
|
{{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }}
|
|
|
|
{{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
|
|
|
|
<div class="bg-white shadow sm:rounded-lg">
|
|
|
|
<div class="px-4 py-5 sm:px-6">
|
2024-12-16 11:38:28 +00:00
|
|
|
<div class="flex items-center space-x-5">
|
|
|
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Diagnostics réalisés</h2>
|
|
|
|
<a href="{{.ViewState.beneficiary.ID}}/create-diag">
|
|
|
|
<button type="button"
|
|
|
|
class="flex justify-around 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">
|
|
|
|
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
|
|
|
Créer un diagnostic
|
|
|
|
</button>
|
|
|
|
</a>
|
|
|
|
</div>
|
2024-12-02 07:58:53 +00:00
|
|
|
</div>
|
|
|
|
<div class="border-t border-gray-200">
|
2024-12-04 13:12:51 +00:00
|
|
|
{{ $diagCount := len .ViewState.diags }}
|
2024-12-02 07:58:53 +00:00
|
|
|
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
|
|
|
{{if eq $diagCount 0}}
|
|
|
|
<li class="py-2 px-4">
|
|
|
|
<p class="py-5 mt-1 max-w-2xl text-sm text-gray-500">Aucun diagnostique effectué pour le moment.</p>
|
|
|
|
</li>
|
|
|
|
{{else}}
|
2024-12-04 13:12:51 +00:00
|
|
|
{{range .ViewState.diags}}
|
2024-12-04 16:29:10 +00:00
|
|
|
{{ $diags := .ID }}
|
2024-12-02 07:58:53 +00:00
|
|
|
{{if eq .Deleted false}}
|
|
|
|
<li class="py-5 px-4 flex">
|
|
|
|
<div class="flex-1 ml-3">
|
2024-12-10 15:10:58 +00:00
|
|
|
<a href="/app/diags/{{$diags}}"class="mt-1 text-sm text-gray-900">{{.Name}}</a>
|
2024-12-02 07:58:53 +00:00
|
|
|
</div>
|
2024-12-04 16:29:10 +00:00
|
|
|
<a href="/app/diags/{{$diags}}/delete" 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-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Retirer</button></a>
|
2024-12-02 07:58:53 +00:00
|
|
|
</li>
|
|
|
|
{{end}}
|
2024-12-04 17:20:56 +00:00
|
|
|
{{if eq .Deleted true}}
|
|
|
|
<li class="py-5 px-4 flex">
|
|
|
|
<div class="flex-1 ml-3">
|
|
|
|
<p class="mt-1 text-sm text-gray-900">{{.Name}}</p>
|
|
|
|
</div>
|
|
|
|
<div class="flex-1 ml-3">
|
2024-12-16 11:38:28 +00:00
|
|
|
<p class="mt-1 text-sm text-gray-900">Ce diagnostic a été retiré</p>
|
2024-12-04 17:20:56 +00:00
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2024-12-02 07:58:53 +00:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|