Compare commits
23 Commits
modifyVehi
...
mika
| Author | SHA1 | Date | |
|---|---|---|---|
| 8cf9fcdb0a | |||
| d6b8a48d1c | |||
|
|
cbc77f1615 | ||
|
|
fc8b325865 | ||
| 89adcc69a2 | |||
| da3c37699e | |||
| 019569155a | |||
|
|
bd71a36cd3 | ||
|
|
8778f88fbd | ||
|
|
3aba9e0071 | ||
|
|
560af60f32 | ||
|
|
4789c5a49e | ||
|
|
b480747b86 | ||
|
|
5617646bdb | ||
|
|
4c05d570f7 | ||
|
|
11e377ddb3 | ||
| 18e2517805 | |||
| bad991c3bc | |||
| cf7b78e64e | |||
|
|
eec5afdf39 | ||
|
|
0bf315596b | ||
| 61e9285a2b | |||
| eb8859ca67 |
@@ -84,7 +84,6 @@ views:
|
|||||||
fleet_update:
|
fleet_update:
|
||||||
files:
|
files:
|
||||||
- web/layouts/_partials/address_autocomplete.html
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
- web/layouts/agenda/_partials/address.html
|
|
||||||
- web/layouts/vehicles_management/_partials/vehicle-type-select.html
|
- web/layouts/vehicles_management/_partials/vehicle-type-select.html
|
||||||
- web/layouts/vehicles_management/fleet-update.html
|
- web/layouts/vehicles_management/fleet-update.html
|
||||||
booking_display:
|
booking_display:
|
||||||
@@ -94,6 +93,9 @@ views:
|
|||||||
list:
|
list:
|
||||||
files:
|
files:
|
||||||
- web/layouts/agenda/home.html
|
- web/layouts/agenda/home.html
|
||||||
|
history:
|
||||||
|
files:
|
||||||
|
- web/layouts/agenda/history.html
|
||||||
display_event:
|
display_event:
|
||||||
files:
|
files:
|
||||||
- web/layouts/agenda/_partials/subscribers-table.html
|
- web/layouts/agenda/_partials/subscribers-table.html
|
||||||
@@ -182,6 +184,10 @@ views:
|
|||||||
vehicles_list:
|
vehicles_list:
|
||||||
files:
|
files:
|
||||||
- web/layouts/administration/vehicles_stats.html
|
- web/layouts/administration/vehicles_stats.html
|
||||||
|
bookings_list:
|
||||||
|
files:
|
||||||
|
- web/layouts/administration/_partials/bookings_list.html
|
||||||
|
- web/layouts/administration/bookings_stats.html
|
||||||
settings:
|
settings:
|
||||||
files:
|
files:
|
||||||
- web/layouts/administration/_partials/groups_admins.html
|
- web/layouts/administration/_partials/groups_admins.html
|
||||||
|
|||||||
0
emails/layout.html
Normal file → Executable file
0
emails/layout.html
Normal file → Executable file
115
web/layouts/administration/_partials/bookings_list.html
Normal file
115
web/layouts/administration/_partials/bookings_list.html
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
{{define "bookings_list"}}
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||||
|
<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">
|
||||||
|
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
|
||||||
|
<table class="min-w-full divide-y divide-gray-300">
|
||||||
|
<thead class="bg-gray-50">
|
||||||
|
<tr>
|
||||||
|
<th scope="col"
|
||||||
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 text-center">
|
||||||
|
Statut
|
||||||
|
</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 sm:pl-6">
|
||||||
|
Numéro
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Gestionnaire véhicule
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Prescripteur
|
||||||
|
</th>
|
||||||
|
<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 sm:pl-6">
|
||||||
|
Dates
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Commentaire
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||||
|
<span class="sr-only">Actions</span>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{range .ViewState.bookings}}
|
||||||
|
<tr>
|
||||||
|
<td class="flex-col py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||||
|
{{if .Data.administrator_unavailability}}
|
||||||
|
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||||
|
Retiré
|
||||||
|
</span>
|
||||||
|
{{else}}
|
||||||
|
{{if eq .Status 1 }}
|
||||||
|
<span class="p-1 bg-co-blue text-white text-xs font-bold rounded-xl" >
|
||||||
|
A venir
|
||||||
|
</span>
|
||||||
|
{{end}}
|
||||||
|
{{if eq .Status 0 }}
|
||||||
|
<span class="p-1 bg-co-green text-white text-xs font-bold rounded-xl" >
|
||||||
|
En cours
|
||||||
|
</span>
|
||||||
|
{{end}}
|
||||||
|
{{if eq .Status -1 }}
|
||||||
|
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
||||||
|
Terminé
|
||||||
|
</span>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="text-gray-900" >{{ (index $.ViewState.vehicles_map .Vehicleid).Type }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="text-gray-900" >{{ (index $.ViewState.vehicles_map .Vehicleid).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" >{{ (index $.ViewState.admingroups (index (index $.ViewState.vehicles_map .Vehicleid).Administrators 0)).Data.name }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="text-gray-900" >{{ .Data.booked_by.group.name }}<br />({{ .Data.booked_by.user.display_name }})</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Data.administrator_unavailability}}
|
||||||
|
<div class="text-gray-900" ></div>
|
||||||
|
{{else}}
|
||||||
|
<div class="text-gray-900" >
|
||||||
|
<!-- <img class="h-6 w-6 rounded-co" src="/app/beneficiaries/{{.Driver}}/picture" alt=""> -->
|
||||||
|
{{$b := (index $.ViewState.beneficiaries_map .Driver)}}
|
||||||
|
{{$b.Data.first_name}} {{$b.Data.last_name}} <br />
|
||||||
|
{{$b.Data.file_number}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if .Data.administrator_unavailability}}
|
||||||
|
<div class="text-gray-900" >Retiré du {{(timeFrom .Unavailablefrom).Format "02/01/2006"}} <br />
|
||||||
|
au {{(timeFrom .Unavailableto).Format "02/01/2006"}}</div>
|
||||||
|
{{else}}
|
||||||
|
<div class="text-gray-900" >Du {{(timeFrom .Startdate).Format "02/01/2006"}} <br />
|
||||||
|
au {{(timeFrom .Enddate).Format "02/01/2006"}}</div>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="text-gray-900" >{{ .Data.comment }}</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a href="/app/vehicles-management/bookings/{{.ID}}"
|
||||||
|
class="text-co-blue hover:text-co-blue">Voir</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
37
web/layouts/administration/bookings_stats.html
Normal file
37
web/layouts/administration/bookings_stats.html
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{{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">Historique des réservations de véhicules</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="sm:flex sm:items-center">
|
||||||
|
<div class="sm:flex-auto">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||||
|
<a href="/exports/fleets/bookings">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
Export
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<a href="/app/administration/stats/vehicles">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document-arrow-left" "h-5 w-5 mr-3"}}
|
||||||
|
Liste des véhicules
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
<!-- <a href="/api/cache/{{.ViewState.cacheid}}/export">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
||||||
|
Exporter
|
||||||
|
</button>
|
||||||
|
</a> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{template "bookings_list" .}}
|
||||||
|
|
||||||
|
{{end}}
|
||||||
@@ -6,6 +6,12 @@
|
|||||||
<h1 class="text-2xl font-semibold text-gray-900">La liste des événements</h1>
|
<h1 class="text-2xl font-semibold text-gray-900">La liste des événements</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||||
|
<a href="/exports/agenda/subscriptions">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
Export
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
<a href="/app/administration/">
|
<a href="/app/administration/">
|
||||||
<button type="button"
|
<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">
|
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">
|
||||||
|
|||||||
@@ -2,14 +2,18 @@
|
|||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||||
<div class="sm:flex sm:items-center">
|
<div class="sm:flex sm:items-center">
|
||||||
<div class="sm:flex-auto">
|
<div class="sm:flex-auto">
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">La liste des voitures</h1>
|
<h1 class="text-2xl font-semibold text-gray-900">Liste des véhicules</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||||
<a href="/app/administration/">
|
<a href="/app/administration/">
|
||||||
<button type="button"
|
<a href="/app/administration/stats/bookings">
|
||||||
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">
|
<button type="button"
|
||||||
Retour
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
</button>
|
{{$.IconSet.Icon "hero:outline/document-arrow-left" "h-5 w-5 mr-3"}}
|
||||||
|
Liste des réservations
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,8 @@
|
|||||||
<a href="/app/agenda/{{$event}}/delete" class="inline-flex"><button type="button"
|
<a href="/app/agenda/{{$event}}/delete" class="inline-flex"><button type="button"
|
||||||
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Retirer</button></a>
|
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-red hover:bg-co-red focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Retirer</button></a>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
@@ -89,13 +90,23 @@
|
|||||||
<div class="bg-white shadow sm:rounded-lg">
|
<div class="bg-white shadow sm:rounded-lg">
|
||||||
<div class="flex justify-between px-4 py-5 sm:px-6">
|
<div class="flex justify-between px-4 py-5 sm:px-6">
|
||||||
<h2 id="event-information-title" class="text-lg leading-6 font-medium text-gray-900">Tous les inscrits</h2>
|
<h2 id="event-information-title" class="text-lg leading-6 font-medium text-gray-900">Tous les inscrits</h2>
|
||||||
|
<a href="/exports/agenda/{{$event}}">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
{{$.IconSet.Icon "hero:outline/document-arrow-down" "h-5 w-5 mr-3"}}
|
||||||
|
Exporter
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
<a href="/app/agenda/{{.ViewState.event.ID}}/history">
|
<a href="/app/agenda/{{.ViewState.event.ID}}/history">
|
||||||
|
|
||||||
<button type="submit"class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 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">
|
<button type="submit"class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 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">
|
||||||
Bénéficiaires désinscrits
|
Bénéficiaires désinscrits
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{template "subscribers_table" .}}
|
|
||||||
|
|
||||||
|
{{template "subscribers_table" .}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
105
web/layouts/agenda/history.html
Normal file
105
web/layouts/agenda/history.html
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
{{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">Anciens dispositifs</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">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||||
|
<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">
|
||||||
|
<div class="overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg">
|
||||||
|
<table class="min-w-full divide-y divide-gray-300">
|
||||||
|
<thead class="bg-gray-50">
|
||||||
|
<tr>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Dispositif
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Structure
|
||||||
|
</th>
|
||||||
|
<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="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Dates
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Places disponibles
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
Bénéficiaires positionnés
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
||||||
|
<span class="sr-only">Actions</span>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{range .ViewState.events}}
|
||||||
|
{{if eq .Deleted false}}
|
||||||
|
<a href="/app/agenda/{{.ID}}">
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
|
||||||
|
<div class="font-medium text-gray-900">{{.Name}}</div>
|
||||||
|
<div class="text-gray-500">{{.Type}}</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
|
||||||
|
<div class="text-gray-900" >
|
||||||
|
{{range .Owners}}
|
||||||
|
{{if (index $.ViewState.groups .)}}
|
||||||
|
{{(index $.ViewState.groups .).Data.name}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<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">
|
||||||
|
<div class="text-gray-900" >
|
||||||
|
{{if eq .Startdate .Enddate}}
|
||||||
|
Le {{(timeFrom .Startdate).Format "02/01/2006"}}
|
||||||
|
{{else}}
|
||||||
|
Du {{(timeFrom .Startdate).Format "02/01/2006"}} <br />Au {{(timeFrom .Enddate).Format "02/01/2006"}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
{{if ne .RemainingSubscriptions 999}}
|
||||||
|
<div class="text-gray-900" >{{.RemainingSubscriptions}}</div>
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex -space-x-1 overflow-hidden" >
|
||||||
|
{{range .Subscriptions}}
|
||||||
|
<img class="inline-block h-6 w-6 rounded-co ring-2 ring-white" src="/app/beneficiaries/{{.Subscriber}}/picture" >
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<a href="/app/agenda/{{.ID}}" class="text-co-blue hover:text-co-blue">Voir</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
@@ -7,6 +7,13 @@
|
|||||||
<p class="mt-2 text-sm text-gray-700"></p>
|
<p class="mt-2 text-sm text-gray-700"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||||
|
<a href="/app/agenda/history">
|
||||||
|
<button type="button"
|
||||||
|
class="inline-flex items-center justify-center mr-3 bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 flex items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
{{$.IconSet.Icon "hero:outline/calendar" "h-5 w-5 mr-3"}}
|
||||||
|
Historique
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
<a href="/app/agenda/create-event">
|
<a href="/app/agenda/create-event">
|
||||||
<button type="button"
|
<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-ci-blue focus:ring-offset-2 sm:w-auto">
|
||||||
|
|||||||
@@ -1,4 +1,63 @@
|
|||||||
{{define "beneficiary_events"}}
|
{{define "beneficiary_events"}}
|
||||||
<div class="px-4 py-6 sm:px-6">
|
{{ $calendarIcon := .IconSet.Icon "hero:outline/calendar" "h-6 w-6" }}
|
||||||
|
{{ $carIcon := .IconSet.Icon "tabler-icons:car" "h-6 w-6"}}
|
||||||
|
<div class="bg-white shadow sm:rounded-lg">
|
||||||
|
<div class="px-4 py-5 sm:px-6">
|
||||||
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Actions réalisées</h2>
|
||||||
|
</div>
|
||||||
|
<div class="border-t border-gray-200">
|
||||||
|
{{ $eventCount := len .ViewState.event }}
|
||||||
|
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
||||||
|
{{if eq $eventCount 0}}
|
||||||
|
<li class="py-2 px-4">
|
||||||
|
<p class="py-5 mt-1 max-w-2xl text-sm text-gray-500">Aucun dispositif n'est prévu pour le moment.</p>
|
||||||
|
</li>
|
||||||
|
{{else}}
|
||||||
|
{{range .ViewState.event}}
|
||||||
|
{{if eq .Deleted false}}
|
||||||
|
<li class="py-5 px-4 flex">
|
||||||
|
<a href="{{.Db}}{{.ID}}" class="flex w-full">
|
||||||
|
<div class="flex-1 ml-3">
|
||||||
|
<div class="flex items-center">
|
||||||
|
|
||||||
|
{{if eq .Status 2}}
|
||||||
|
{{if eq .Icons "vehicle"}}
|
||||||
|
<span class="bg-co-green text-white rounded-full h-8 w-10 flex items-center justify-center">{{$carIcon}}</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="bg-co-green text-white rounded-full h-8 w-10 flex items-center justify-center">{{$calendarIcon}}</span>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if eq .Status 1}}
|
||||||
|
{{if eq .Icons "vehicle"}}
|
||||||
|
<span class="bg-co-blue text-white rounded-full h-8 w-10 flex items-center justify-center">{{$carIcon}}</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="bg-co-blue text-white rounded-full h-8 w-10 flex items-center justify-center">{{$calendarIcon}}</span>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if eq .Status 3}}
|
||||||
|
{{if eq .Icons "vehicle"}}
|
||||||
|
<span class="bg-gray-500 text-white rounded-full h-8 w-10 flex items-center justify-center">{{$carIcon}}</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="bg-gray-500 text-white rounded-full h-8 w-10 flex items-center justify-center">{{$calendarIcon}}</span>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if eq .Date .DateEnd}}
|
||||||
|
<p class="text-sm font-medium text-gray-500">  le {{(timeFrom .Date).Format "02/01/2006"}}</p>
|
||||||
|
{{else}}
|
||||||
|
<p class="text-sm font-medium text-gray-500"> du {{(timeFrom .Date).Format "02/01/2006"}} au {{(timeFrom .DateEnd).Format "02/01/2006"}}</p>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<p class="mt-1 text-sm text-gray-900">{{.Type}} - {{.Name}}</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
@@ -81,7 +81,7 @@ x-data="{
|
|||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<h3 class="text-lg">Ajouter un document</h3>
|
<h3 class="text-lg">Ajouter un document</h3>
|
||||||
<form method="POST" action="/app/beneficiaries/e7616eac-4a87-4396-a505-23e0421b9c4c/documents" @submit="submit" enctype="multipart/form-data">
|
<form method="POST" action="/app/beneficiaries/{{.ViewState.beneficiary.ID}}/documents" @submit="submit" enctype="multipart/form-data">
|
||||||
<div class="md:grid md:grid-cols-6 p-2">
|
<div class="md:grid md:grid-cols-6 p-2">
|
||||||
<div class="sm:col-span-2">
|
<div class="sm:col-span-2">
|
||||||
<label for="type" class="block text-sm font-medium text-gray-700">Type</label>
|
<label for="type" class="block text-sm font-medium text-gray-700">Type</label>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
email: ['required', 'email'],
|
email: ['required', 'email'],
|
||||||
phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
|
phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
|
||||||
birthdate: ['required'],
|
birthdate: ['required'],
|
||||||
file_number: ['optional'],
|
file_number: ['required'],
|
||||||
},
|
},
|
||||||
formValidation: {
|
formValidation: {
|
||||||
valid: false,
|
valid: false,
|
||||||
@@ -100,6 +100,13 @@
|
|||||||
x-model="fields.birthdate" @blur="validateField('birthdate')"
|
x-model="fields.birthdate" @blur="validateField('birthdate')"
|
||||||
:class="formValidation.fields.birthdate.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
:class="formValidation.fields.birthdate.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="file_number" class="block text-sm font-medium text-gray-700">Numéro de dossier (CAF / Pole Emploi ...)</label>
|
||||||
|
<input type="text" name="file_number" id="file_number" placeholder=""
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
x-model="fields.file_number" @blur="validateField('file_number')"
|
||||||
|
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -114,14 +121,6 @@
|
|||||||
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
||||||
<div class="grid grid-cols-6 gap-6">
|
<div class="grid grid-cols-6 gap-6">
|
||||||
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="file_number" class="block text-sm font-medium text-gray-700">Numéro de dossier (allocataire, ...)</label>
|
|
||||||
<input type="text" name="file_number" id="file_number" placeholder=""
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.file_number" @blur="validateField('file_number')"
|
|
||||||
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
|
|||||||
@@ -69,6 +69,12 @@
|
|||||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.address.properties.label}}</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.address.properties.label}}</dd>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if .ViewState.beneficiary.Data.file_number}}
|
||||||
|
<div class="sm:col-span-1">
|
||||||
|
<dt class="text-sm font-medium text-gray-500">Numéro de dossier (CAF / Pole emploi)</dt>
|
||||||
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.file_number}}</dd>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -145,10 +151,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section aria-labelledby="timeline-title" class="lg:col-start-3 lg:col-span-1">
|
<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">
|
{{template "beneficiary_events" .}}
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Actions réalisées</h2>
|
|
||||||
<p class="p-12 text-gray-500 text-center text-md">Aucune action réalisée pour le moment</p>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
email: ['required', 'email'],
|
email: ['required', 'email'],
|
||||||
phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
|
phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
|
||||||
birthdate: ['required'],
|
birthdate: ['required'],
|
||||||
file_number: ['optional'],
|
file_number: ['required'],
|
||||||
},
|
},
|
||||||
formValidation: {
|
formValidation: {
|
||||||
valid: false,
|
valid: false,
|
||||||
@@ -101,6 +101,15 @@
|
|||||||
x-model="fields.birthdate" @blur="validateField('birthdate')"
|
x-model="fields.birthdate" @blur="validateField('birthdate')"
|
||||||
:class="formValidation.fields.birthdate.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
:class="formValidation.fields.birthdate.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="file_number" class="block text-sm font-medium text-gray-700">Numéro de dossier (CAF / Pole Emploi ...)</label>
|
||||||
|
<input type="text" name="file_number" id="file_number"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
x-model="fields.file_number" @blur="validateField('file_number')"
|
||||||
|
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -114,15 +123,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
||||||
<div class="grid grid-cols-6 gap-6">
|
<div class="grid grid-cols-6 gap-6">
|
||||||
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="file_number" class="block text-sm font-medium text-gray-700">Numéro de dossier (allocataire, ...)</label>
|
|
||||||
<input type="text" name="file_number" id="file_number"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
|
||||||
x-model="fields.file_number" @blur="validateField('file_number')"
|
|
||||||
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
<ul role="list" class="divide-y divide-gray-200 flex-1">
|
||||||
{{range .}}
|
{{range .}}
|
||||||
|
{{if eq .Deleted false}}
|
||||||
<li class="py-2 px-4 flex">
|
<li class="py-2 px-4 flex">
|
||||||
<a href="/app/agenda/{{.ID}}" class="flex w-full">
|
<a href="/app/agenda/{{.ID}}" class="flex w-full">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<a href="/app/agenda/">
|
<a href="/app/agenda/">
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
<h1 class="text-2xl font-semibold text-gray-900">Réservations</h1>
|
<h1 class="text-2xl font-semibold text-gray-900">Réservations</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
<div class="mt-4 sm:mt-0 sm:ml-16 sm:flex-none">
|
||||||
<a href="/app/administration/stats/vehicles/available">
|
<!-- <a href="/app/administration/stats/vehicles/available">
|
||||||
<button type="button"
|
<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">
|
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">
|
||||||
Voitures disponibles
|
Voitures disponibles
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
{{range .ViewState.bookings}}
|
{{range .ViewState.bookings}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
<td class="flex-col py-4 pl-4 pr-3 text-sm sm:pl-6 text-center">
|
||||||
{{if .Data.administrator_unavailability}}
|
{{if .Data.administrator_unavailability}}
|
||||||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
||||||
Retiré
|
Retiré
|
||||||
@@ -76,15 +76,11 @@
|
|||||||
</span>
|
</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{if not .bookings}}
|
|
||||||
<span class="p-1 bg-black text-white text-xs font-bold rounded-xl" >
|
|
||||||
Disponible
|
|
||||||
</span>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
</td>
|
||||||
<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" >{{(index $.ViewState.vehicles_map .Vehicleid).Type}}</div>
|
<div class="text-gray-900" >{{(index $.ViewState.vehicles_map .Vehicleid).Type}}</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<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" >{{(index $.ViewState.vehicles_map .Vehicleid).Data.licence_plate}}</div>
|
<div class="text-gray-900" >{{(index $.ViewState.vehicles_map .Vehicleid).Data.licence_plate}}</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<select x-model="selectedvehicle" id="vehicle" name="vehicle" class="mt-1 block w-full rounded-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
|
<select x-model="selectedvehicle" id="vehicle" name="vehicle" class="mt-1 block w-full rounded-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-co-blue focus:outline-none focus:ring-co-blue sm:text-sm">
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
{{range .ViewState.alternative_vehicles }}
|
{{range .ViewState.alternative_vehicles }}
|
||||||
<option value="{{.ID}}">{{.Data.name}} ({{.Type}})</option>
|
<option value="{{.ID}}">{{.Data.licence_plate}} - {{.Data.name}} ({{.Type}})</option>
|
||||||
{{end}}
|
{{end}}
|
||||||
</select>
|
</select>
|
||||||
<div class="mt-5 sm:mt-6">
|
<div class="mt-5 sm:mt-6">
|
||||||
|
|||||||
39
web/layouts/vehicles_management/delete-booking.html
Normal file
39
web/layouts/vehicles_management/delete-booking.html
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{{define "content"}}
|
||||||
|
<div>
|
||||||
|
<form method="POST" >
|
||||||
|
|
||||||
|
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
|
||||||
|
|
||||||
|
<div class="fixed inset-0 z-10 overflow-y-auto">
|
||||||
|
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
||||||
|
|
||||||
|
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full max-w-lg sm:p-6">
|
||||||
|
<div>
|
||||||
|
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
||||||
|
{{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
|
||||||
|
</div>
|
||||||
|
<div class="mt-3 text-center sm:mt-5">
|
||||||
|
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Confirmation d'annulation</h3>
|
||||||
|
<div class="mt-2">
|
||||||
|
<p class="text-sm text-gray-500">Souhaitez-vous vraiment annuler cette réservaton ?</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-span-6">
|
||||||
|
<label for="motif" class="block text-sm font-medium text-gray-700">Motif</label>
|
||||||
|
<div class="mt-1">
|
||||||
|
<textarea rows="4" name="motif" id="motif"
|
||||||
|
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 class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
||||||
|
<a href="/app/vehicles-management/bookings/{{.ViewState.booking.ID}}" class="mt-3 inline-flex w-full justify-center rounded-l-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">Annuler</a>
|
||||||
|
<button type="submit" class="inline-flex w-full justify-center rounded-r-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-2 sm:text-sm">Confirmation</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
|
|
||||||
<div x-data="{dialog: false}">
|
<div x-data="{dialog: false}">
|
||||||
<main class="py-10">
|
<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="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">
|
||||||
@@ -14,12 +13,11 @@
|
|||||||
<h1 class="text-2xl font-bold text-gray-900">{{.ViewState.vehicle.Data.name}}</h1>
|
<h1 class="text-2xl font-bold text-gray-900">{{.ViewState.vehicle.Data.name}}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ if eq (index .ViewState.vehicle.Administrators 0) .Group.ID }}
|
|
||||||
<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">
|
<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">
|
||||||
<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> {{end}}
|
|
||||||
<button type="button" @click="dialog = !dialog"
|
<button type="button" @click="dialog = !dialog"
|
||||||
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>
|
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>
|
</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="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">
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
|
|
||||||
{{ if eq (index .ViewState.vehicle.Administrators 0) .Group.ID }}
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
<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>
|
<h1 class="text-2xl font-semibold text-gray-900">Modifier un véhicule</h1>
|
||||||
@@ -79,17 +78,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||||
{{ $fieldName := "address" }}
|
{{ $fieldName := "address" }}
|
||||||
{{if .ViewState.vehicle.Data.address}}
|
{{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.vehicle.Data.address) }}
|
||||||
{{$default := .ViewState.vehicle.Data.address}}
|
|
||||||
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
|
||||||
{{else}}
|
|
||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
|
||||||
{{end}}
|
|
||||||
<div class="mt-5">
|
<div class="mt-5">
|
||||||
<label for="informations" class="block text-sm font-medium text-gray-700">Informations pratiques pour le bénéficiaire</label>
|
<label for="informations" class="block text-sm font-medium text-gray-700">Informations pratiques pour le bénéficiaire</label>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<textarea rows="4" name="informations" id="informations" value="{{.ViewState.vehicle.Data.informations}}"
|
<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">{{ if .ViewState.vehicle.Data.informations}} {{.ViewState.vehicle.Data.informations}} {{end}}</textarea>
|
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>
|
||||||
@@ -108,29 +103,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{else}}
|
|
||||||
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
|
|
||||||
|
|
||||||
<div class="fixed inset-0 z-10 overflow-y-auto">
|
|
||||||
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
|
||||||
|
|
||||||
<div class="relative transform overflow-hidden rounded-lg bg-white px-4 pt-5 pb-4 text-left shadow-xl transition-all sm:my-8 sm:w-full max-w-lg sm:p-6">
|
|
||||||
<div>
|
|
||||||
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
|
||||||
{{.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
|
|
||||||
</div>
|
|
||||||
<div class="mt-3 text-center sm:mt-5">
|
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Vous n'avez pas le droit de modifier ce véhicule</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-center items-center mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense ">
|
|
||||||
<!-- class="flex justify-center items-center py-2 px-3 border-t dark:border-gray-600 -->
|
|
||||||
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle.ID}}" class="rounded-2xl mt-3 inline-flex w-full justify-center rounded-l-2xl border border-gray-300 bg-white px-4 py-2 text-base font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-1 sm:mt-0 sm:text-sm">Annuler</a>
|
|
||||||
<!-- <button type="submit" class="inline-flex w-full justify-center rounded-r-2xl border border-transparent bg-co-blue px-4 py-2 text-base font-medium text-white shadow-sm hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:col-start-2 sm:text-sm">Confirmation</button> -->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
0
web/tailwind.config.js
Normal file → Executable file
0
web/tailwind.config.js
Normal file → Executable file
Reference in New Issue
Block a user