304 lines
20 KiB
HTML
304 lines
20 KiB
HTML
{{define "content"}}
|
|
<main class="py-10">
|
|
<!-- Page header -->
|
|
<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 class="flex-shrink-0">
|
|
<div class="relative">
|
|
<img class="h-16 w-16 rounded-co" src="/app/beneficiaries/{{.ViewState.ID}}/picture" alt="">
|
|
<span class="absolute inset-0 shadow-inner rounded-full" aria-hidden="true"></span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h1 class="text-2xl font-bold text-gray-900">{{.ViewState.Data.first_name}}
|
|
{{.ViewState.Data.last_name}}</h1>
|
|
<p class="text-sm font-medium text-gray-500">{{if .ViewState.Metadata.created}}Ajouté le <time
|
|
datetime="2022-07-25">{{.ViewState.Metadata.created}}</time> par
|
|
<a href="#" class="text-gray-900">Conseiller 1</a>{{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">
|
|
<button type="button"
|
|
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Supprimer</button>
|
|
<a href="/app/beneficiaries/{{.ViewState.ID}}/update" 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">Modifier</button></a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-6 sm:px-6 lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-3">
|
|
<div class="space-y-6 lg:col-start-1 lg:col-span-2">
|
|
<section aria-labelledby="beneficiary-information-title">
|
|
<div class="bg-white shadow sm:rounded-lg">
|
|
<div class="px-4 py-5 sm:px-6">
|
|
<h2 id="beneficiary-information-title" class="text-lg leading-6 font-medium text-gray-900">
|
|
Informations personnelles</h2>
|
|
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations générales sur le bénéficiaire.</p>
|
|
</div>
|
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
|
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
|
{{if .ViewState.Data.email}}
|
|
<div class="sm:col-span-1">
|
|
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.Data.email}}</dd>
|
|
</div>
|
|
{{end}}
|
|
{{if .ViewState.Data.phone_number}}
|
|
<div class="sm:col-span-1">
|
|
<dt class="text-sm font-medium text-gray-500">Téléphone</dt>
|
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.Data.phone_number}}</dd>
|
|
</div>
|
|
{{end}}
|
|
{{if .ViewState.Data.birthdate}}
|
|
<div class="sm:col-span-1">
|
|
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
|
|
<dd class="mt-1 text-sm text-gray-900">{{(timeFrom .ViewState.Data.birthdate).Format
|
|
"02/01/2006"}}</dd>
|
|
</div>
|
|
{{end}}
|
|
{{if and .ViewState.Data.gender (ne .ViewState.Data.gender "0")}}
|
|
<div class="sm:col-span-1">
|
|
<dt class="text-sm font-medium text-gray-500">Genre</dt>
|
|
<dd class="mt-1 text-sm text-gray-900">{{genderISO5218 .ViewState.Data.gender}}</dd>
|
|
</div>
|
|
{{end}}
|
|
{{if .ViewState.Data.address}}
|
|
<div class="sm:col-span-1">
|
|
<dt class="text-sm font-medium text-gray-500">Adresse</dt>
|
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.Data.address.properties.label}}</dd>
|
|
</div>
|
|
{{end}}
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section aria-labelledby="functionalities-title" x-data="{
|
|
tab: 'notes',
|
|
to(event) {
|
|
this.tab = event.target.value
|
|
}
|
|
}">
|
|
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden">
|
|
<div class="divide-y divide-gray-200">
|
|
<div>
|
|
<div class="sm:hidden">
|
|
<label for="tabs" class="sr-only">Select a tab</label>
|
|
<select id="tabs" name="tabs" @change="to"
|
|
class="block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
|
|
<option value="notes">Notes</option>
|
|
|
|
<option value="journeys">Déplacements</option>
|
|
|
|
<option value="events">Dispositifs</option>
|
|
|
|
<option value="files">Documents</option>
|
|
</select>
|
|
</div>
|
|
<div class="hidden sm:block">
|
|
<div class="border-b border-gray-200 pl-4">
|
|
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
|
<!-- Current: "border-indigo-500 text-indigo-600", Default: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" -->
|
|
<a href="#" @click="tab = 'notes'"
|
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
:class="tab == 'notes' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
Notes </a>
|
|
|
|
<a href="#" @click="tab = 'journeys'"
|
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
:class="tab == 'journeys' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
Déplacements </a>
|
|
|
|
<a href="#" @click="tab = 'vehicles'"
|
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
:class="tab == 'vehicles' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
Véhicules </a>
|
|
|
|
<a href="#" @click="tab = 'events'"
|
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
:class="tab == 'events' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
Dispositifs </a>
|
|
|
|
<a href="#" @click="tab = 'files'"
|
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
:class="tab == 'files' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
Documents </a>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
|
<div x-show="tab == 'journeys'">{{template "beneficiary_journeys" .}}</div>
|
|
<div x-show="tab == 'events'">{{template "beneficiary_events" .}}</div>
|
|
<div x-show="tab == 'files'">{{template "beneficiary_files" .}}</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
<section aria-labelledby="timeline-title" class="lg:col-start-3 lg:col-span-1">
|
|
<div class="bg-white px-4 py-5 shadow sm:rounded-lg sm:px-6">
|
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Actions réalisées</h2>
|
|
|
|
<!-- Activity Feed -->
|
|
<div class="mt-6 flow-root">
|
|
<ul role="list" class="-mb-8">
|
|
<li>
|
|
<div class="relative pb-8">
|
|
<span class="absolute top-4 left-4 -ml-px h-full w-0.5 bg-gray-200"
|
|
aria-hidden="true"></span>
|
|
<div class="relative flex space-x-3">
|
|
<div>
|
|
<span
|
|
class="h-8 w-8 rounded-full bg-gray-400 flex items-center justify-center ring-8 ring-white">
|
|
<!-- Heroicon name: solid/user -->
|
|
<svg class="w-5 h-5 text-white" xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path fill-rule="evenodd"
|
|
d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z"
|
|
clip-rule="evenodd" />
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
<div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4">
|
|
<div>
|
|
<p class="text-sm text-gray-500">Applied to <a href="#"
|
|
class="font-medium text-gray-900">Front End Developer</a></p>
|
|
</div>
|
|
<div class="text-right text-sm whitespace-nowrap text-gray-500">
|
|
<time datetime="2020-09-20">Sep 20</time>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="relative pb-8">
|
|
<span class="absolute top-4 left-4 -ml-px h-full w-0.5 bg-gray-200"
|
|
aria-hidden="true"></span>
|
|
<div class="relative flex space-x-3">
|
|
<div>
|
|
<span
|
|
class="h-8 w-8 rounded-full bg-blue-500 flex items-center justify-center ring-8 ring-white">
|
|
<!-- Heroicon name: solid/thumb-up -->
|
|
<svg class="w-5 h-5 text-white" xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path
|
|
d="M2 10.5a1.5 1.5 0 113 0v6a1.5 1.5 0 01-3 0v-6zM6 10.333v5.43a2 2 0 001.106 1.79l.05.025A4 4 0 008.943 18h5.416a2 2 0 001.962-1.608l1.2-6A2 2 0 0015.56 8H12V4a2 2 0 00-2-2 1 1 0 00-1 1v.667a4 4 0 01-.8 2.4L6.8 7.933a4 4 0 00-.8 2.4z" />
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
<div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4">
|
|
<div>
|
|
<p class="text-sm text-gray-500">Advanced to phone screening by <a href="#"
|
|
class="font-medium text-gray-900">Bethany Blake</a></p>
|
|
</div>
|
|
<div class="text-right text-sm whitespace-nowrap text-gray-500">
|
|
<time datetime="2020-09-22">Sep 22</time>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="relative pb-8">
|
|
<span class="absolute top-4 left-4 -ml-px h-full w-0.5 bg-gray-200"
|
|
aria-hidden="true"></span>
|
|
<div class="relative flex space-x-3">
|
|
<div>
|
|
<span
|
|
class="h-8 w-8 rounded-full bg-green-500 flex items-center justify-center ring-8 ring-white">
|
|
<!-- Heroicon name: solid/check -->
|
|
<svg class="w-5 h-5 text-white" xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path fill-rule="evenodd"
|
|
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
|
clip-rule="evenodd" />
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
<div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4">
|
|
<div>
|
|
<p class="text-sm text-gray-500">Completed phone screening with <a href="#"
|
|
class="font-medium text-gray-900">Martha Gardner</a></p>
|
|
</div>
|
|
<div class="text-right text-sm whitespace-nowrap text-gray-500">
|
|
<time datetime="2020-09-28">Sep 28</time>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="relative pb-8">
|
|
<span class="absolute top-4 left-4 -ml-px h-full w-0.5 bg-gray-200"
|
|
aria-hidden="true"></span>
|
|
<div class="relative flex space-x-3">
|
|
<div>
|
|
<span
|
|
class="h-8 w-8 rounded-full bg-blue-500 flex items-center justify-center ring-8 ring-white">
|
|
<!-- Heroicon name: solid/thumb-up -->
|
|
<svg class="w-5 h-5 text-white" xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path
|
|
d="M2 10.5a1.5 1.5 0 113 0v6a1.5 1.5 0 01-3 0v-6zM6 10.333v5.43a2 2 0 001.106 1.79l.05.025A4 4 0 008.943 18h5.416a2 2 0 001.962-1.608l1.2-6A2 2 0 0015.56 8H12V4a2 2 0 00-2-2 1 1 0 00-1 1v.667a4 4 0 01-.8 2.4L6.8 7.933a4 4 0 00-.8 2.4z" />
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
<div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4">
|
|
<div>
|
|
<p class="text-sm text-gray-500">Advanced to interview by <a href="#"
|
|
class="font-medium text-gray-900">Bethany Blake</a></p>
|
|
</div>
|
|
<div class="text-right text-sm whitespace-nowrap text-gray-500">
|
|
<time datetime="2020-09-30">Sep 30</time>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
|
|
<li>
|
|
<div class="relative pb-8">
|
|
<div class="relative flex space-x-3">
|
|
<div>
|
|
<span
|
|
class="h-8 w-8 rounded-full bg-green-500 flex items-center justify-center ring-8 ring-white">
|
|
<!-- Heroicon name: solid/check -->
|
|
<svg class="w-5 h-5 text-white" xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path fill-rule="evenodd"
|
|
d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
|
|
clip-rule="evenodd" />
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
<div class="min-w-0 flex-1 pt-1.5 flex justify-between space-x-4">
|
|
<div>
|
|
<p class="text-sm text-gray-500">Completed interview with <a href="#"
|
|
class="font-medium text-gray-900">Katherine Snyder</a></p>
|
|
</div>
|
|
<div class="text-right text-sm whitespace-nowrap text-gray-500">
|
|
<time datetime="2020-10-04">Oct 4</time>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="mt-6 flex flex-col justify-stretch">
|
|
<button type="button"
|
|
class="inline-flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500">Advance
|
|
to offer</button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</main>
|
|
{{end}} |