2022-08-11 15:26:55 +00:00
|
|
|
{{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">
|
2022-09-05 05:25:05 +00:00
|
|
|
<img class="h-16 w-16 rounded-co" src="/app/beneficiaries/{{.ViewState.beneficiary.ID}}/picture" alt="">
|
2022-08-11 15:26:55 +00:00
|
|
|
<span class="absolute inset-0 shadow-inner rounded-full" aria-hidden="true"></span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
2022-09-05 05:25:05 +00:00
|
|
|
<h1 class="text-2xl font-bold text-gray-900">{{.ViewState.beneficiary.Data.first_name}}
|
|
|
|
{{.ViewState.beneficiary.Data.last_name}}</h1>
|
|
|
|
<p class="text-sm font-medium text-gray-500">{{if .ViewState.beneficiary.Metadata.created}}Ajouté le <time
|
|
|
|
datetime="2022-07-25">{{.ViewState.beneficiary.Metadata.created}}</time> par
|
2022-08-11 15:26:55 +00:00
|
|
|
<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">
|
2022-09-05 05:25:05 +00:00
|
|
|
<!-- <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.beneficiary.ID}}/update" class="inline-flex"><button type="button"
|
2022-08-11 15:26:55 +00:00
|
|
|
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">
|
2022-09-05 05:25:05 +00:00
|
|
|
{{if .ViewState.beneficiary.Data.email}}
|
2022-08-11 15:26:55 +00:00
|
|
|
<div class="sm:col-span-1">
|
|
|
|
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
2022-09-05 05:25:05 +00:00
|
|
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.email}}</dd>
|
2022-08-11 15:26:55 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2022-09-05 05:25:05 +00:00
|
|
|
{{if .ViewState.beneficiary.Data.phone_number}}
|
2022-08-11 15:26:55 +00:00
|
|
|
<div class="sm:col-span-1">
|
|
|
|
<dt class="text-sm font-medium text-gray-500">Téléphone</dt>
|
2022-09-05 05:25:05 +00:00
|
|
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.phone_number}}</dd>
|
2022-08-11 15:26:55 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2022-09-05 05:25:05 +00:00
|
|
|
{{if .ViewState.beneficiary.Data.birthdate}}
|
2022-08-11 15:26:55 +00:00
|
|
|
<div class="sm:col-span-1">
|
|
|
|
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
|
2022-09-05 05:25:05 +00:00
|
|
|
<dd class="mt-1 text-sm text-gray-900">{{(timeFrom .ViewState.beneficiary.Data.birthdate).Format
|
2022-08-11 15:26:55 +00:00
|
|
|
"02/01/2006"}}</dd>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2022-09-05 05:25:05 +00:00
|
|
|
{{if and .ViewState.beneficiary.Data.gender (ne .ViewState.beneficiary.Data.gender "0")}}
|
2022-08-11 15:26:55 +00:00
|
|
|
<div class="sm:col-span-1">
|
|
|
|
<dt class="text-sm font-medium text-gray-500">Genre</dt>
|
2022-09-05 05:25:05 +00:00
|
|
|
<dd class="mt-1 text-sm text-gray-900">{{genderISO5218 .ViewState.beneficiary.Data.gender}}</dd>
|
2022-08-11 15:26:55 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2022-09-05 05:25:05 +00:00
|
|
|
{{if .ViewState.beneficiary.Data.address}}
|
2022-08-11 15:26:55 +00:00
|
|
|
<div class="sm:col-span-1">
|
|
|
|
<dt class="text-sm font-medium text-gray-500">Adresse</dt>
|
2022-09-05 05:25:05 +00:00
|
|
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.address.properties.label}}</dd>
|
2022-08-11 15:26:55 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
2022-09-05 05:25:05 +00:00
|
|
|
</dl>
|
2022-08-11 15:26:55 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section aria-labelledby="functionalities-title" x-data="{
|
2022-09-05 05:25:05 +00:00
|
|
|
tab: 'vehicles',
|
2022-08-11 15:26:55 +00:00
|
|
|
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">
|
2022-09-05 05:25:05 +00:00
|
|
|
<!-- <option value="notes">Notes</option> -->
|
2022-08-11 15:26:55 +00:00
|
|
|
|
|
|
|
<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" -->
|
2022-09-05 05:25:05 +00:00
|
|
|
<!-- <a href="#" @click="tab = 'notes'"
|
2022-08-11 15:26:55 +00:00
|
|
|
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'">
|
2022-09-05 05:25:05 +00:00
|
|
|
Notes </a> -->
|
2022-08-11 15:26:55 +00:00
|
|
|
|
|
|
|
<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>
|
|
|
|
|
2022-08-12 12:53:54 +00:00
|
|
|
<!-- <a href="#" @click="tab = 'files'"
|
2022-08-11 15:26:55 +00:00
|
|
|
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'">
|
2022-08-12 12:53:54 +00:00
|
|
|
Documents </a> -->
|
2022-08-11 15:26:55 +00:00
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div x-show="tab == 'journeys'">{{template "beneficiary_journeys" .}}</div>
|
2022-08-12 12:53:54 +00:00
|
|
|
<div x-show="tab == 'vehicles'">{{template "beneficiary_vehicles" .}}</div>
|
2022-08-11 15:26:55 +00:00
|
|
|
<div x-show="tab == 'events'">{{template "beneficiary_events" .}}</div>
|
|
|
|
<div x-show="tab == 'files'">{{template "beneficiary_files" .}}</div>
|
2022-09-05 05:25:05 +00:00
|
|
|
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
2022-08-11 15:26:55 +00:00
|
|
|
</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>
|
2022-08-12 12:53:54 +00:00
|
|
|
<p class="p-12 text-gray-500 text-center text-md">Aucune action réalisée pour le moment</p>
|
2022-08-11 15:26:55 +00:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
{{end}}
|