Administration, organizations access rights and véhicles booking
This commit is contained in:
@@ -7,13 +7,13 @@
|
||||
|
||||
<div class="relative rounded-lg bg-white px-6 py-5 flex items-center space-x-3 focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-co-blue">
|
||||
<div class="flex-shrink-0">
|
||||
<img class="h-10 w-10 rounded-co" src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
||||
<img class="h-10 w-10 rounded-co" src="http://localhost:9000/app/beneficiaries/e7616eac-4a87-4396-a505-23e0421b9c4c/picture" alt="">
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<a href="#" class="focus:outline-none">
|
||||
<span class="absolute inset-0" aria-hidden="true"></span>
|
||||
<p class="text-sm font-medium text-gray-900">Leslie Alexander</p>
|
||||
<p class="text-sm text-gray-500 truncate">aaa@bbb.fr</p>
|
||||
<p class="text-sm font-medium text-gray-900">Arnaud Delcasse</p>
|
||||
<p class="text-sm text-gray-500 truncate">arnaud.delcasse@coopgo.fr</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
</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"
|
||||
<!-- <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/administration/groups/{{.ViewState.group.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>
|
||||
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">
|
||||
|
||||
@@ -15,7 +15,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">Bénéficiaires</a>
|
||||
<p class="text-gray-500">160 bénéficiaires</p>
|
||||
<p class="text-gray-500">{{len (index .ViewState.groups 0).Members}} bénéficiaires</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -29,7 +29,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">Organisations</a>
|
||||
<p class="text-gray-500">12 organisations</p>
|
||||
<p class="text-gray-500">{{len .ViewState.groups}} organisations</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -43,7 +43,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">1 membres</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -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">Accompagnement</a>
|
||||
<p class="text-gray-500">363 actions réalisées</p>
|
||||
<p class="text-gray-500">0 actions réalisées</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -106,10 +106,10 @@
|
||||
<div class="mt-4 flex-shrink-0 sm:mt-0 sm:ml-5">
|
||||
<div class="flex overflow-hidden -space-x-1">
|
||||
<img class="inline-block h-6 w-6 rounded-full ring-2 ring-white"
|
||||
src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||
src="http://localhost:9000/app/beneficiaries/e7616eac-4a87-4396-a505-23e0421b9c4c/picture"
|
||||
alt="Dries Vincent">
|
||||
|
||||
<img class="inline-block h-6 w-6 rounded-full ring-2 ring-white"
|
||||
<!-- <img class="inline-block h-6 w-6 rounded-full ring-2 ring-white"
|
||||
src="https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||
alt="Lindsay Walton">
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
<img class="inline-block h-6 w-6 rounded-full ring-2 ring-white"
|
||||
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||
alt="Tom Cook">
|
||||
alt="Tom Cook"> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{{define "beneficiary_events"}}
|
||||
<div class="px-4 py-6 sm:px-6">
|
||||
TODO Dispositifs
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -1,5 +1,4 @@
|
||||
{{define "beneficiary_journeys"}}
|
||||
<div class="px-4 py-6 sm:px-6">
|
||||
TODO Déplacements
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -1,7 +1,7 @@
|
||||
{{define "beneficiary_notes"}}
|
||||
<div class="px-4 py-6 sm:px-6">
|
||||
<ul role="list" class="space-y-8">
|
||||
<li>
|
||||
<!-- <li>
|
||||
<div class="flex space-x-3">
|
||||
<div class="flex-shrink-0">
|
||||
<img class="h-10 w-10 rounded-full"
|
||||
@@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-4 py-6 sm:px-6">
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{{define "beneficiary_vehicles"}}
|
||||
<div class="px-4 py-6 sm:px-6">
|
||||
<h3 class="text-lg">Réserver un véhicule</h3>
|
||||
<form method="GET" action="/app/vehicles/">
|
||||
<input type="hidden" name="beneficiaryid" value="{{.ViewState.ID}}">
|
||||
<div class="py-4 grid grid-cols-2">
|
||||
<div class="lg:col-span-1">
|
||||
<label for="startdate" class="block text-sm font-medium text-gray-700">Du</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="startdate" name="startdate"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-l-2xl border-r-1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:col-span-1">
|
||||
<label for="enddate" class="block text-sm font-medium text-gray-700">Au</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="enddate" name="enddate"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{template "vehicle_type_select" .}}
|
||||
|
||||
<button type="submit"
|
||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
Chercher
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -120,10 +120,10 @@
|
||||
: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'"
|
||||
<!-- <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>
|
||||
Documents </a> -->
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,6 +131,7 @@
|
||||
|
||||
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
||||
<div x-show="tab == 'journeys'">{{template "beneficiary_journeys" .}}</div>
|
||||
<div x-show="tab == 'vehicles'">{{template "beneficiary_vehicles" .}}</div>
|
||||
<div x-show="tab == 'events'">{{template "beneficiary_events" .}}</div>
|
||||
<div x-show="tab == 'files'">{{template "beneficiary_files" .}}</div>
|
||||
</div>
|
||||
@@ -141,162 +142,7 @@
|
||||
<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>
|
||||
<p class="p-12 text-gray-500 text-center text-md">Aucune action réalisée pour le moment</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
@@ -3,6 +3,67 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h1 class="text-2xl font-semibold text-gray-900">Tableau de bord</h1>
|
||||
</div>
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8">
|
||||
<h2 class="text-gray-500 text-xs font-medium uppercase tracking-wide">Statistiques de votre organisation</h2>
|
||||
<ul role="list" class="mt-3 grid grid-cols-1 gap-5 sm:gap-6 sm:grid-cols-2 lg:grid-cols-4">
|
||||
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
||||
<div
|
||||
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-blue text-white text-sm font-medium rounded-l-3xl">
|
||||
{{.IconSet.Icon "hero:outline/user-group" "h-6 w-6"}}
|
||||
</div>
|
||||
<div
|
||||
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">Bénéficiaires</a>
|
||||
<p class="text-gray-500">{{.ViewState.beneficiaries.count}} bénéficiaires</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
||||
<div
|
||||
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-green text-white text-sm font-medium rounded-l-3xl">
|
||||
{{.IconSet.Icon "hero:outline/shield-check" "h-6 w-6"}}
|
||||
</div>
|
||||
<div
|
||||
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">Accompagnement</a>
|
||||
<p class="text-gray-500">0 actions réalisées</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
||||
<div
|
||||
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-yellow text-white text-sm font-medium rounded-l-3xl">
|
||||
{{.IconSet.Icon "hero:outline/office-building" "h-6 w-6"}}
|
||||
</div>
|
||||
<div
|
||||
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">Groupes</a>
|
||||
<p class="text-gray-500">0 groupes créés</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="col-span-1 flex shadow-sm rounded-3xl">
|
||||
<div
|
||||
class="flex-shrink-0 flex items-center justify-center w-16 bg-co-red text-white text-sm font-medium rounded-l-3xl">
|
||||
{{.IconSet.Icon "hero:outline/briefcase" "h-6 w-6"}}
|
||||
</div>
|
||||
<div
|
||||
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>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
|
||||
<div class="py-4 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
|
||||
|
||||
@@ -118,8 +118,8 @@
|
||||
x-transition:leave-start="transform opacity-100 scale-100"
|
||||
x-transition:leave-end="transform opacity-0 scale-95">
|
||||
<!-- Active: "bg-gray-100", Not Active: "" -->
|
||||
<a href="/app/group/settings" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
id="user-menu-item-1">Paramètres</a>
|
||||
<!-- <a href="/app/group/settings" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
id="user-menu-item-1">Paramètres</a> -->
|
||||
|
||||
<a href="/auth/groups/switch" class="block px-4 py-2 text-sm text-gray-700" role="menuitem" tabindex="-1"
|
||||
id="user-menu-item-2">Changer d'organisation</a>
|
||||
@@ -135,7 +135,7 @@
|
||||
id="user-menu-button" aria-expanded="false" aria-haspopup="true">
|
||||
<span class="sr-only">Open user menu</span>
|
||||
<img class="h-8 w-8 rounded-co"
|
||||
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||
src="http://localhost:9000/app/beneficiaries/e7616eac-4a87-4396-a505-23e0421b9c4c/picture"
|
||||
alt="Menu utilisateur">
|
||||
</button>
|
||||
</div>
|
||||
|
||||
137
themes/default/layouts/vehicles/booking-display.html
Normal file
137
themes/default/layouts/vehicles/booking-display.html
Normal file
@@ -0,0 +1,137 @@
|
||||
{{define "content"}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h1 class="text-2xl font-semibold text-gray-900">Réservation de véhicule</h1>
|
||||
|
||||
<div class="sm:flex sm:items-center">
|
||||
<div class="sm:flex-auto">
|
||||
<p class="mt-2 text-sm text-gray-700"></p>
|
||||
</div>
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
<a href="/app/vehicles-management/fleet/add">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-red px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-red focus:ring-offset-2 sm:w-auto">
|
||||
Annuler
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-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-1">
|
||||
<div class="bg-white shadow sm:rounded-2xl">
|
||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Bénéficiaire</h2>
|
||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||
<div>
|
||||
<div class="mt-5 border-gray-200">
|
||||
<dl class="sm:divide-y sm:divide-gray-200">
|
||||
<div class="sm:pb-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Nom</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.first_name}}
|
||||
{{.ViewState.beneficiary.Data.last_name}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.email}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Téléphone</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.phone_number}}</dd>
|
||||
</div>
|
||||
{{if .ViewState.Data.birthdate}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom
|
||||
.ViewState.Data.birthdate).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .ViewState.Data.gender (ne .ViewState.Data.gender "0")}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{genderISO5218
|
||||
.ViewState.Data.gender}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.Data.address}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Adresse</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.Data.address.properties.label}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:col-start-2 lg:col-span-2">
|
||||
<div class="bg-white shadow sm:rounded-2xl sm:px-6">
|
||||
<div class="bg-white px-4 py-5 border-b border-gray-200 sm:px-6">
|
||||
<div class="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-nowrap">
|
||||
<div class="ml-4 mt-4">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Informations utiles sur la réservation.</p>
|
||||
</div>
|
||||
<div class="ml-4 mt-4 flex-shrink-0">
|
||||
<button type="button"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-xs font-medium rounded-2xl text-co-blue bg-gray-100 hover:bg-co-blue hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">SMS</button>
|
||||
<button type="button"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-xs font-medium rounded-2xl text-co-blue bg-gray-100 hover:bg-co-blue hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Email</button>
|
||||
<button type="button"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-xs font-medium rounded-2xl text-co-blue bg-gray-100 hover:bg-co-blue hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Imprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<div>
|
||||
<div class="mt-5 border-gray-200">
|
||||
<dl class="sm:divide-y sm:divide-gray-200">
|
||||
<div class="sm:pb-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Gestionnaire</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
COOPGO
|
||||
</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Véhicule</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.vehicle.Data.name}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Immatriculation</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.vehicle.Data.licence_plate}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
Voiture</dd>
|
||||
</div>
|
||||
{{if .ViewState.vehicle.Data.address}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Lieu de récupération</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{.ViewState.vehicle.Data.address.properties.label}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de récupération</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Startdate).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de fin</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Enddate).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
158
themes/default/layouts/vehicles/search.html
Normal file
158
themes/default/layouts/vehicles/search.html
Normal file
@@ -0,0 +1,158 @@
|
||||
{{define "content"}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h1 class="text-2xl font-semibold text-gray-900">Véhicules partagés</h1>
|
||||
|
||||
<div class="sm:flex sm:items-center">
|
||||
<div class="sm:flex-auto">
|
||||
<p class="mt-2 text-sm text-gray-700"></p>
|
||||
</div>
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
<a href="/app/vehicles-management/fleet/add">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center 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-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
Voir les prêts de véhicules
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-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-1">
|
||||
<div class="bg-white shadow sm:rounded-2xl">
|
||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Chercher un véhicule</h2>
|
||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||
<form method="GET">
|
||||
|
||||
|
||||
<div x-data="{
|
||||
text: '{{if .ViewState.search}}{{.ViewState.search.beneficiary.Data.first_name}} {{.ViewState.search.beneficiary.Data.last_name}}{{end}}',
|
||||
beneficiariesListOpen: false,
|
||||
beneficiaries: {{json .ViewState.beneficiaries}},
|
||||
filteredBeneficiaries: (text) => {
|
||||
if(text=='') return beneficiaries
|
||||
return this.beneficiaries.filter(b => b['data']['first_name'].includes(text) || b['data']['last_name'].includes(text))
|
||||
},
|
||||
fields: {
|
||||
beneficiaryid: null,
|
||||
},
|
||||
selectbeneficiary(beneficiary) {
|
||||
console.log(beneficiary)
|
||||
this.fields.beneficiaryid = beneficiary.id
|
||||
this.text = beneficiary.data.first_name + ' ' + beneficiary.data.last_name
|
||||
this.beneficiariesListOpen = false
|
||||
}
|
||||
}">
|
||||
<input type="hidden" name="beneficiaryid" x-model="fields.beneficiaryid">
|
||||
<label for="combobox" class="block text-sm font-medium text-gray-700">Bénéficiaire</label>
|
||||
<div class="relative mt-1 mb-4">
|
||||
<input @focus="beneficiariesListOpen = true" x-model="text" id="combobox" type="text" class="w-full rounded-2xl border border-gray-300 bg-white py-2 pl-3 pr-12 shadow-sm focus:border-co-blue focus:outline-none focus:ring-1 focus:ring-co-blue sm:text-sm" role="combobox" aria-controls="options" aria-expanded="false">
|
||||
|
||||
<button @click="beneficiariesListOpen = ! beneficiariesListOpen" type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-2xl px-2 focus:outline-none">
|
||||
<!-- Heroicon name: solid/selector -->
|
||||
<svg class="h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||
<path fill-rule="evenodd" d="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<ul x-show="beneficiariesListOpen" class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-xl bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" id="options" role="listbox">
|
||||
<!--
|
||||
Combobox option, manage highlight styles based on mouseenter/mouseleave and keyboard navigation.
|
||||
|
||||
Active: "text-white bg-indigo-600", Not Active: "text-gray-900"
|
||||
-->
|
||||
<template x-for="beneficiary in beneficiaries">
|
||||
<li @click="selectbeneficiary(beneficiary)" class="relative cursor-default hover:bg-gray-100 select-none py-2 pl-3 pr-9 text-gray-900" id="option-0" role="option" tabindex="-1">
|
||||
<!-- Selected: "font-semibold" -->
|
||||
<span class="truncate" x-text="beneficiary.data.first_name"></span> <span class="truncate" x-text="beneficiary.data.last_name"></span>
|
||||
|
||||
<!--
|
||||
Checkmark, only display for selected option.
|
||||
|
||||
Active: "text-white", Not Active: "text-indigo-600"
|
||||
-->
|
||||
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-co-blue">
|
||||
<!-- Heroicon name: solid/check -->
|
||||
<!-- <svg class="h-5 w-5" 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>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<!-- More items... -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- {{ $fieldName := "address" }}
|
||||
{{ template "address_autocomplete" dict "FieldName" $fieldName }} -->
|
||||
<div class="py-4 grid grid-cols-2">
|
||||
<div class="lg:col-span-1">
|
||||
<label for="startdate" class="block text-sm font-medium text-gray-700">Du</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="startdate" name="startdate" value="{{.ViewState.search.startdate}}"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-l-2xl border-r-1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:col-span-1">
|
||||
<label for="enddate" class="block text-sm font-medium text-gray-700">Au</label>
|
||||
<div class="mt-1">
|
||||
<input type="date" id="enddate" name="enddate" value="{{.ViewState.search.enddate}}"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{template "vehicle_type_select" .}}
|
||||
|
||||
<button type="submit"
|
||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
Chercher
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:col-start-2 lg:col-span-2">
|
||||
{{if .ViewState.searched}}
|
||||
<div class="bg-white px-4 py-5 shadow sm:rounded-2xl sm:px-6">
|
||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Véhicules disponibles</h2>
|
||||
<div class="mt-8 flex flex-col">
|
||||
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||
<div class="inline-block min-w-full py-2 align-middle md:px-6 lg:px-8">
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:pl-0">Véhicule</th>
|
||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Numéro</th>
|
||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Gestionnaire</th>
|
||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Lieu</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6 md:pr-0">
|
||||
<span class="sr-only">Réserver</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200">
|
||||
{{range .ViewState.search.vehicles}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 md:pl-0">{{.Data.name}}</td>
|
||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{.Data.licence_plate}}</td>
|
||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">COOPGO</td>
|
||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
||||
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6 md:pr-0">
|
||||
<a href="/app/vehicles/v/{{.ID}}/b/{{$.ViewState.search.beneficiary.ID}}?startdate={{$.ViewState.search.startdate}}&enddate={{$.ViewState.search.enddate}}" class="text-co-blue hover:text-co-blue">Réserver<span class="sr-only"> pour {{$.ViewState.search.beneficiary.Data.first_name}} {{$.ViewState.search.beneficiary.Data.last_name}}</span></a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -7,26 +7,23 @@
|
||||
<table class="min-w-full divide-y divide-gray-300">
|
||||
<thead class="bg-gray-50">
|
||||
<tr>
|
||||
<th scope="col"
|
||||
<!-- <th scope="col"
|
||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Statut
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
</th> -->
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Type
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Immatriculation
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Beneficiaire
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
Prescripteur
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Gestionnaire
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Dates
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
@@ -35,33 +32,38 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.vehicles}}
|
||||
{{$vehicle := .}}
|
||||
{{range .Bookings}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<!-- <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
</td> -->
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >Voiture</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
<div class="text-gray-900" >{{$vehicle.Data.licence_plate}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" ></div>
|
||||
</td>
|
||||
<!-- <td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
</td> -->
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >COOPGO</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
<div class="text-gray-900" >Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<a :href="'/app/beneficiaries/' + beneficiary.id"
|
||||
<a href="/app/vehicles-management/bookings/{{.ID}}"
|
||||
class="text-co-blue hover:text-co-blue">Voir</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,259 @@
|
||||
{{define "calendar"}}
|
||||
<div class="flex items-center">
|
||||
<h2 class="flex-auto font-semibold text-gray-900">Août 2022</h2>
|
||||
<button type="button"
|
||||
class="-my-1.5 flex flex-none items-center justify-center p-1.5 text-gray-400 hover:text-gray-500">
|
||||
<span class="sr-only">Mois précédent</span>
|
||||
<!-- Heroicon name: solid/chevron-left -->
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="-my-1.5 -mr-1.5 ml-2 flex flex-none items-center justify-center p-1.5 text-gray-400 hover:text-gray-500">
|
||||
<span class="sr-only">Mois suivant</span>
|
||||
<!-- Heroicon name: solid/chevron-right -->
|
||||
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
|
||||
aria-hidden="true">
|
||||
<path fill-rule="evenodd"
|
||||
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
|
||||
clip-rule="evenodd" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-10 grid grid-cols-7 text-center text-xs leading-6 text-gray-500">
|
||||
<div>L</div>
|
||||
<div>M</div>
|
||||
<div>M</div>
|
||||
<div>J</div>
|
||||
<div>V</div>
|
||||
<div>S</div>
|
||||
<div>D</div>
|
||||
</div>
|
||||
<div class="mt-2 grid grid-cols-7 text-sm">
|
||||
<div class="py-2">
|
||||
<!--
|
||||
Always include: "mx-auto flex h-8 w-8 items-center justify-center rounded-full"
|
||||
Is selected, include: "text-white"
|
||||
Is not selected and is today, include: "text-indigo-600"
|
||||
Is not selected and is not today and is current month, include: "text-gray-900"
|
||||
Is not selected and is not today and is not current month, include: "text-gray-400"
|
||||
Is selected and is today, include: "bg-indigo-600"
|
||||
Is selected and is not today, include: "bg-gray-900"
|
||||
Is not selected, include: "hover:bg-gray-200"
|
||||
Is selected or is today, include: "font-semibold"
|
||||
-->
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-01">1</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-02">2</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-03">3</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-04">4</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-05">5</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-06">6</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-07">7</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-08">8</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-09">9</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-10">10</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-11">11</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full bg-gray-900 font-semibold text-white">
|
||||
<time datetime="2022-08-12">12</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-13">13</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-14">14</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-15">15</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-16">16</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-17">17</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-18">18</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-19">19</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-20">20</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-21">21</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-22">22</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-23">23</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-24">24</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-25">25</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-26">26</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-27">27</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-28">28</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-29">29</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-30">30</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-900 hover:bg-gray-200">
|
||||
<time datetime="2022-08-31">31</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-01">1</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-02">2</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-03">3</time>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-t border-gray-200 py-2">
|
||||
<button type="button"
|
||||
class="mx-auto flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-200">
|
||||
<time datetime="2022-09-04">4</time>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -9,16 +9,16 @@
|
||||
<tr>
|
||||
<th scope="col"
|
||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Immatriculation
|
||||
Numéro (Immat / Bicycode)
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
Gestionnaire
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Type
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Modèle
|
||||
</th>
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||
Gestionnaire
|
||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||
Lieu
|
||||
</th>
|
||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||
<span class="sr-only">Actions</span>
|
||||
@@ -26,24 +26,26 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-200 bg-white">
|
||||
{{range .ViewState.vehicles}}
|
||||
<tr>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
<div class="text-gray-900" >{{.Data.licence_plate}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
<div class="text-gray-900" >{{if eq .Type "electric_bike"}}Vélo électrique{{else}}Voiture{{end}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
<div class="text-gray-900" >{{.Data.name}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<div class="text-gray-900" >aa</div>
|
||||
<div class="text-gray-900" >{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</div>
|
||||
</td>
|
||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||
<a :href="'/app/beneficiaries/' + beneficiary.id"
|
||||
<a href="/app/vehicles-management/fleet/{{.ID}}"
|
||||
class="text-co-blue hover:text-co-blue">Voir</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
147
themes/default/layouts/vehicles_management/booking-display.html
Normal file
147
themes/default/layouts/vehicles_management/booking-display.html
Normal file
@@ -0,0 +1,147 @@
|
||||
{{define "content"}}
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h1 class="text-2xl font-semibold text-gray-900">Réservation de véhicule</h1>
|
||||
|
||||
<div class="sm:flex sm:items-center">
|
||||
<div class="sm:flex-auto">
|
||||
<p class="mt-2 text-sm text-gray-700"></p>
|
||||
</div>
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
<a href="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}/delete">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-red px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-red focus:ring-offset-2 sm:w-auto">
|
||||
Annuler
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-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-1">
|
||||
<div class="bg-white shadow sm:rounded-2xl">
|
||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Bénéficiaire</h2>
|
||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||
<div>
|
||||
<div class="mt-5 border-gray-200">
|
||||
<dl class="sm:divide-y sm:divide-gray-200">
|
||||
<div class="sm:pb-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Nom</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.first_name}}
|
||||
{{.ViewState.beneficiary.Data.last_name}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.email}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Téléphone</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.beneficiary.Data.phone_number}}</dd>
|
||||
</div>
|
||||
{{if .ViewState.Data.birthdate}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom
|
||||
.ViewState.Data.birthdate).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .ViewState.Data.gender (ne .ViewState.Data.gender "0")}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{genderISO5218
|
||||
.ViewState.Data.gender}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.Data.address}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Adresse</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.Data.address.properties.label}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lg:col-start-2 lg:col-span-2">
|
||||
<div class="bg-white shadow sm:rounded-2xl sm:px-6">
|
||||
<div class="bg-white px-4 py-5 border-b border-gray-200 sm:px-6">
|
||||
<div class="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-nowrap">
|
||||
<div class="ml-4 mt-4">
|
||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Informations utiles sur la réservation.</p>
|
||||
</div>
|
||||
<div class="ml-4 mt-4 flex-shrink-0">
|
||||
<button type="button"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-xs font-medium rounded-2xl text-co-blue bg-gray-100 hover:bg-co-blue hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">SMS</button>
|
||||
<button type="button"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-xs font-medium rounded-2xl text-co-blue bg-gray-100 hover:bg-co-blue hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Email</button>
|
||||
<button type="button"
|
||||
class="relative inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-xs font-medium rounded-2xl text-co-blue bg-gray-100 hover:bg-co-blue hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Imprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<div>
|
||||
<div class="mt-5 border-gray-200">
|
||||
<dl class="sm:divide-y sm:divide-gray-200">
|
||||
<div class="sm:pb-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Gestionnaire</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
COOPGO
|
||||
</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Véhicule</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.vehicle.Data.name}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Immatriculation</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
{{.ViewState.vehicle.Data.licence_plate}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
Voiture</dd>
|
||||
</div>
|
||||
{{if .ViewState.vehicle.Data.address}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Lieu de récupération</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{.ViewState.vehicle.Data.address.properties.label}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de récupération</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Startdate).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Date de fin</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Enddate).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Indisponible à partir du</dt>
|
||||
<dd class="mt-1 text-sm font-bold text-co-red sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Unavailablefrom).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4">
|
||||
<dt class="text-sm font-medium text-gray-500">Sera à nouveau disponible le</dt>
|
||||
<dd class="mt-1 text-sm font-bold text-co-green sm:mt-0 sm:col-span-2">{{(timeFrom .ViewState.booking.Unavailableto).Format
|
||||
"02/01/2006"}}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,90 @@
|
||||
{{define "content"}}
|
||||
<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 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.vehicle.Data.name}}</h1>
|
||||
</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">Retirer de la flotte</button>
|
||||
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle.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="vehicle-information-title">
|
||||
<div class="bg-white shadow sm:rounded-lg">
|
||||
<div class="px-4 py-5 sm:px-6">
|
||||
<h2 id="vehicle-information-title" class="text-lg leading-6 font-medium text-gray-900">Informations</h2>
|
||||
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations sur le véhicule</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.vehicle.Data.type}}
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{if eq .ViewState.vehicle.Data.type "electric_bike"}}Vélo électrique{{else}}Voiture{{end}}</dd>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Type</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">Voiture</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.vehicle.Data.licence_plate}}
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Numéro (Immatriculation, bicycode, ...)</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.vehicle.Data.licence_plate}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.vehicle.Data.address}}
|
||||
<div class="sm:col-span-1">
|
||||
<dt class="text-sm font-medium text-gray-500">Lieu</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.vehicle.Data.address.properties.label}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .ViewState.vehicle.Data.informations}}
|
||||
<div class="sm:col-span-2">
|
||||
<dt class="text-sm font-medium text-gray-500">Informations pratiques pour le bénéficiaire</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.vehicle.Data.informations}}</dd>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
</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">Réservations à venir</h2>
|
||||
{{if eq (len .ViewState.vehicle.Bookings) 0}}
|
||||
<p class="p-12 text-gray-500 text-center text-md">Aucune réservation à venir</p>
|
||||
{{end}}
|
||||
<ul role="list" class="divide-y divide-gray-200">
|
||||
{{range .ViewState.vehicle.Bookings}}
|
||||
<li class="py-4 flex">
|
||||
<div class="ml-3">
|
||||
<a href="/vehicles/bookings/{{.ID}}" class="hover:bg-gray-200">
|
||||
<p class="text-sm font-medium text-gray-900">Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</p>
|
||||
<p class="text-sm text-gray-500"></p>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{template "calendar" .}}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
{{end}}
|
||||
106
themes/default/layouts/vehicles_management/fleet-update.html
Normal file
106
themes/default/layouts/vehicles_management/fleet-update.html
Normal file
@@ -0,0 +1,106 @@
|
||||
{{define "content"}}
|
||||
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||
<h1 class="text-2xl font-semibold text-gray-900">Modifier un véhicule</h1>
|
||||
</div>
|
||||
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8" x-data="{
|
||||
fields: {
|
||||
licence_plate: '{{ .ViewState.vehicle.Data.licence_plate }}',
|
||||
name: '{{ .ViewState.vehicle.Data.name }}',
|
||||
},
|
||||
rules: {
|
||||
licence_plate: ['required', 'regexMatch:^[A-Z]{1,2}-[0-9]{1,3}-[A-Z]{1,2}$'],
|
||||
name: ['required'],
|
||||
},
|
||||
formValidation: {
|
||||
valid: false,
|
||||
fields: {
|
||||
name: {valid: null},
|
||||
licence_plate: {valid: null},
|
||||
}
|
||||
},
|
||||
isFormValid: true,
|
||||
validate() {
|
||||
this.formValidation = Iodine.assert(this.fields, this.rules)
|
||||
},
|
||||
validateField(field) {
|
||||
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
|
||||
},
|
||||
submit(event) {
|
||||
this.validate()
|
||||
if(!this.formValidation.valid) {
|
||||
this.isFormValid = false
|
||||
event.preventDefault()
|
||||
}
|
||||
return this.formValidation.valid
|
||||
}
|
||||
}">
|
||||
<form class="space-y-6" method="POST" @submit="submit">
|
||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
||||
<div class="md:col-span-1">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Identité du véhicule</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Informations de base sur le véhicule</p>
|
||||
</div>
|
||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||
<div class="grid grid-cols-3 md:grid-cols-6 gap-6">
|
||||
<div class="col-span-5">
|
||||
<label for="name" class="block text-sm font-medium text-gray-700">Modèle (ou nom donné au
|
||||
véhicule)</label>
|
||||
<input type="text" name="name" id="name"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
x-model="fields.name" @blur="validateField('name')"
|
||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
<div class="col-span-3">
|
||||
{{template "vehicle_type_select" .}}
|
||||
</div>
|
||||
<div class="col-span-3">
|
||||
<label for="licence_plate"
|
||||
class="block text-sm font-medium text-gray-700">Immatriculation</label>
|
||||
<input type="text" name="licence_plate" id="licence_plate" placeholder="XX-123-YY"
|
||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||
x-model="fields.licence_plate"
|
||||
@blur="fields.licence_plate = fields.licence_plate.toUpperCase(); validateField('licence_plate')"
|
||||
:class="formValidation.fields.licence_plate.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
||||
<div class="md:grid md:grid-cols-3 md:gap-6">
|
||||
<div class="md:col-span-1">
|
||||
<h3 class="text-lg font-medium leading-6 text-gray-900">Informations pratiques</h3>
|
||||
<p class="mt-1 text-sm text-gray-500">Informations pratiques pour la réservation</p>
|
||||
</div>
|
||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||
{{ $fieldName := "address" }}
|
||||
{{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.vehicle.Data.address) }}
|
||||
|
||||
<div class="mt-5">
|
||||
<label for="informations" class="block text-sm font-medium text-gray-700">Informations pratiques pour le bénéficiaire</label>
|
||||
<div class="mt-1">
|
||||
<textarea rows="4" name="informations" id="informations"
|
||||
class="shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle.ID}}">
|
||||
<button type="button"
|
||||
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
||||
</a>
|
||||
<button type="submit"
|
||||
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Modifier
|
||||
le véhicule</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||
<a href="/app/vehicles-management/fleet/add">
|
||||
<button type="button"
|
||||
class="inline-flex items-center justify-center 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">
|
||||
class="inline-flex items-center justify-center 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-co-blue focus:ring-offset-2 sm:w-auto">
|
||||
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
|
||||
Ajouter un véhicule
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user