Compare commits
34 Commits
modifyVehi
...
silvermobi
| Author | SHA1 | Date | |
|---|---|---|---|
| 1631cc9359 | |||
| 8d2ca79bc5 | |||
| 9edd80bd3c | |||
| 079348cddc | |||
| 8098d32260 | |||
| fd459c0d31 | |||
| e491233ea8 | |||
| 2b75be0b19 | |||
| 32494410b0 | |||
| 3e1e2c66b9 | |||
| 5d1a444697 | |||
| 8cf9fcdb0a | |||
| d6b8a48d1c | |||
|
|
cbc77f1615 | ||
|
|
fc8b325865 | ||
| 89adcc69a2 | |||
| da3c37699e | |||
| 019569155a | |||
|
|
bd71a36cd3 | ||
|
|
8778f88fbd | ||
|
|
3aba9e0071 | ||
|
|
560af60f32 | ||
|
|
4789c5a49e | ||
|
|
b480747b86 | ||
|
|
5617646bdb | ||
|
|
4c05d570f7 | ||
|
|
11e377ddb3 | ||
| 18e2517805 | |||
| bad991c3bc | |||
| cf7b78e64e | |||
|
|
eec5afdf39 | ||
|
|
0bf315596b | ||
| 61e9285a2b | |||
| eb8859ca67 |
23
config.yaml
23
config.yaml
@@ -28,7 +28,9 @@ views:
|
|||||||
- web/layouts/beneficiaries/_partials/beneficiary-events.html
|
- web/layouts/beneficiaries/_partials/beneficiary-events.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-files.html
|
- web/layouts/beneficiaries/_partials/beneficiary-files.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-organizations.html
|
- web/layouts/beneficiaries/_partials/beneficiary-organizations.html
|
||||||
|
- web/layouts/solidarity_service/beneficiary-solidarity.html
|
||||||
- web/layouts/beneficiaries/display.html
|
- web/layouts/beneficiaries/display.html
|
||||||
|
|
||||||
update:
|
update:
|
||||||
files:
|
files:
|
||||||
- web/layouts/_partials/address_autocomplete.html
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
@@ -90,6 +92,9 @@ views:
|
|||||||
booking_display:
|
booking_display:
|
||||||
files:
|
files:
|
||||||
- web/layouts/vehicles_management/booking-display.html
|
- web/layouts/vehicles_management/booking-display.html
|
||||||
|
delete_booking:
|
||||||
|
files:
|
||||||
|
- web/layouts/vehicles_management/delete-booking.html
|
||||||
agenda:
|
agenda:
|
||||||
list:
|
list:
|
||||||
files:
|
files:
|
||||||
@@ -127,7 +132,8 @@ views:
|
|||||||
- web/layouts/journeys/_partials/journeys-all.html
|
- web/layouts/journeys/_partials/journeys-all.html
|
||||||
- web/layouts/journeys/_partials/journeys-others.html
|
- web/layouts/journeys/_partials/journeys-others.html
|
||||||
- web/layouts/journeys/_partials/journeys-carpool.html
|
- web/layouts/journeys/_partials/journeys-carpool.html
|
||||||
- web/layouts/journeys/_partials/journeys-public-transit.html
|
#- web/layouts/journeys/_partials/journeys-public-transit.html
|
||||||
|
- web/layouts/journeys/_partials/journeys-solidarity-service.html
|
||||||
- web/layouts/journeys/search.html
|
- web/layouts/journeys/search.html
|
||||||
list:
|
list:
|
||||||
files:
|
files:
|
||||||
@@ -209,6 +215,21 @@ views:
|
|||||||
ko:
|
ko:
|
||||||
files:
|
files:
|
||||||
- web/layouts/auth/onboarding-ko.html
|
- web/layouts/auth/onboarding-ko.html
|
||||||
|
solidarity_service:
|
||||||
|
list:
|
||||||
|
files:
|
||||||
|
- web/layouts/solidarity_service/main.html
|
||||||
|
- web/layouts/solidarity_service/_partials/beneficiary-list.html
|
||||||
|
- web/layouts/solidarity_service/_partials/driver-list.html
|
||||||
|
- web/layouts/solidarity_service/_partials/booking-list.html
|
||||||
|
create:
|
||||||
|
files:
|
||||||
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
|
- web/layouts/solidarity_service/_partials/create-booking.html
|
||||||
|
create_driver:
|
||||||
|
files:
|
||||||
|
- web/layouts/solidarity_service/_partials/create-driver.html
|
||||||
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
|
|
||||||
icons:
|
icons:
|
||||||
svg:
|
svg:
|
||||||
|
|||||||
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,85 @@
|
|||||||
{{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 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">
|
||||||
|
<span class="absolute inset-0 shadow-inner rounded-full" aria-hidden="true"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<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/solidarity_service{{.ViewState.Passenger.Id}}/picture" alt=""> -->
|
||||||
|
<span class="absolute inset-0 shadow-inner rounded-full" aria-hidden="true"></span>
|
||||||
|
</div>
|
||||||
|
</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">
|
||||||
|
</div>
|
||||||
|
</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>
|
||||||
@@ -131,6 +137,11 @@
|
|||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
:class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Gestionnaires </a>
|
Gestionnaires </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'solidarityService'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'solidarityService' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Transport Solidaire </a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -139,16 +150,15 @@
|
|||||||
<div x-show="tab == 'documents'">{{template "beneficiary_files" .}}</div>
|
<div x-show="tab == 'documents'">{{template "beneficiary_files" .}}</div>
|
||||||
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
||||||
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
||||||
|
<div x-show="tab == 'solidarityService'">{{template "beneficiary_solidarity" .}}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</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>
|
||||||
|
|||||||
@@ -62,9 +62,7 @@
|
|||||||
<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">
|
||||||
Labels
|
Labels
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" class="relative py-3.5 pl-3 pr-4 sm:pr-6">
|
|
||||||
<span class="sr-only">Modifier</span>
|
|
||||||
</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
@@ -96,6 +94,7 @@
|
|||||||
class="inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800"
|
class="inline-flex rounded-full bg-green-100 px-2 text-xs font-semibold leading-5 text-green-800"
|
||||||
x-text="tag"></span>
|
x-text="tag"></span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
|||||||
@@ -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/">
|
||||||
|
|||||||
@@ -51,46 +51,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{ if gt (len .ViewState.journeys.Journeys) 0}}
|
|
||||||
<div class="px-4 pt-4 flex text-sm text-grey-900 font-bold border-t-2">
|
|
||||||
<div class="flex-1">
|
|
||||||
{{.IconSet.Icon "tabler-icons:bus" "h-6 w-6 inline-flex mr-4"}}
|
|
||||||
{{(timeFrom (index .ViewState.journeys.Journeys 0).Departure).Format "15:04"}} - {{(timeFrom (index .ViewState.journeys.Journeys 0).Arrival).Format "15:04"}}
|
|
||||||
({{(index .ViewState.journeys.Journeys 0).Duration.Minutes | printf "%.0f"}} Minutes)
|
|
||||||
</div>
|
|
||||||
<div></div>
|
|
||||||
</div>
|
|
||||||
<div class="p-4 pb-8 flex">
|
|
||||||
{{$firstwalk := true}}
|
|
||||||
{{range (index .ViewState.journeys.Journeys 0).Sections}}
|
|
||||||
{{if eq .Type "street_network"}}
|
|
||||||
<span class="ml-2 mt-1 h-5 w-5 rounded-co bg-gray-200 flex items-center justify-center ring-8 ring-white text-white">
|
|
||||||
{{$.IconSet.Icon "tabler-icons:walk" "h-4 w-4 stroke-gray-800"}}
|
|
||||||
</span>
|
|
||||||
{{if $firstwalk}}
|
|
||||||
{{$firstwalk = false}}
|
|
||||||
{{$.IconSet.Icon "hero:outline/chevron-right" "h-3 w-3 stroke-gray-800 m-2"}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if eq .Type "public_transport"}}
|
|
||||||
<span class="ml-2 rounded-xl px-2 py-1 bg-co-blue flex items-center justify-center ring-8 ring-white text-sm text-white whitespace-nowrap">
|
|
||||||
{{if eq .Display.Network "Antibes - Envibus"}}Envibus{{else}}{{.Display.Network}}{{end}} Ligne {{.Display.Label}}
|
|
||||||
</span>
|
|
||||||
{{$.IconSet.Icon "hero:outline/chevron-right" "h-3 w-3 stroke-gray-800 m-2"}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
<div class="flex-1"></div>
|
|
||||||
<button class="text-sm px-2 py-1 bg-gray-200 text-co-blue rounded-xl" @click="tab = 'public-transit'">Voir le détail</button>
|
|
||||||
</div>
|
|
||||||
<div class="p-4 text-center">
|
|
||||||
<button class="rounded-xl text-md px-4 py-1 bg-gray-200 text-co-blue" @click="tab = 'public-transit'">{{ len .ViewState.journeys.Journeys}} solutions en transports en commun : les voir toutes</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<!--VEHICLES-->
|
<!--VEHICLES-->
|
||||||
|
|
||||||
<div class="px-4 pt-16 flex text-sm text-grey-900 border-t-2">
|
<div class="px-4 pt-16 flex text-sm text-grey-900 border-t-2">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
{{.IconSet.Icon "tabler-icons:car" "h-6 w-6 inline-flex mr-4"}}
|
{{.IconSet.Icon "tabler-icons:car" "h-6 w-6 inline-flex mr-4"}}
|
||||||
@@ -103,3 +67,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
208
web/layouts/journeys/_partials/journeys-solidarity-service.html
Normal file
208
web/layouts/journeys/_partials/journeys-solidarity-service.html
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
{{define "journeys_solidarity_service"}}
|
||||||
|
|
||||||
|
<form class="space-y-6" method="POST" name="create_booking">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8" >
|
||||||
|
<div class="bg-white shadow sm:rounded-2xl">
|
||||||
|
<h2 class="text-lg font-medium text-gray-900 p-4 sm:px-6">
|
||||||
|
Bénéficiaires
|
||||||
|
</h2>
|
||||||
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
|
<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">
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{range $beneficiary := .ViewState.solidarity_results.Beneficiaries}}
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<button type="button" @click="
|
||||||
|
document.getElementById('passenger_id').value = '{{$beneficiary.Id}}'
|
||||||
|
document.getElementById('passenger_name').textContent = '{{$beneficiary.FirstName}}{{$beneficiary.LastName}}'" class="ml-4">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span>
|
||||||
|
{{$beneficiary.FirstName}}
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
{{$beneficiary.LastName}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
<!-- More people... -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
||||||
|
<div class="flex-1 flex justify-between sm:hidden">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current)"> Previous </a>
|
||||||
|
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)"> Next </a>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Résultats
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+1, state.count)"></span>
|
||||||
|
à
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+10, state.count)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="state.count"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current)">
|
||||||
|
<span class="sr-only">Previous</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>
|
||||||
|
</a>
|
||||||
|
<template x-for="i in nb_pages">
|
||||||
|
<a href="#" @click="paginate(i)"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 border text-sm font-medium"
|
||||||
|
:class="i == current+1 ? 'z-10 bg-indigo-50 border-co-blue text-co-blue' : 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50'"
|
||||||
|
x-text="i"></a>
|
||||||
|
</template>
|
||||||
|
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)">
|
||||||
|
<span class="sr-only">Next</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>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="passenger_name"></p>
|
||||||
|
<input type="hidden" id="passenger_id" name="passenger_id" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8" x-data="{
|
||||||
|
}">
|
||||||
|
<h2 class="text-lg font-medium text-gray-900 p-4 sm:px-6">
|
||||||
|
Sélectionner un Conducteurs
|
||||||
|
</h2>
|
||||||
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
{{ if gt (len .ViewState.solidarity_results.Drivers) 0}}
|
||||||
|
{{range $driver := .ViewState.solidarity_results.Drivers}}
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<button type="button" @click="
|
||||||
|
document.getElementById('driver_id').value = '{{$driver.User.Id}}'
|
||||||
|
document.getElementById('driver_name').textContent = '{{$driver.User.FirstName}}{{$driver.User.LastName}}'" class="ml-4">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span>
|
||||||
|
{{$driver.User.FirstName}}
|
||||||
|
</span>
|
||||||
|
<span>
|
||||||
|
{{$driver.User.LastName}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
<!-- More people... -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
||||||
|
<div class="flex-1 flex justify-between sm:hidden">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current)"> Previous </a>
|
||||||
|
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)"> Next </a>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Résultats
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+1, state.count)"></span>
|
||||||
|
à
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+10, state.count)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="state.count"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current)">
|
||||||
|
<span class="sr-only">Previous</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>
|
||||||
|
</a>
|
||||||
|
<template x-for="i in nb_pages">
|
||||||
|
<a href="#" @click="paginate(i)"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 border text-sm font-medium"
|
||||||
|
:class="i == current+1 ? 'z-10 bg-indigo-50 border-co-blue text-co-blue' : 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50'"
|
||||||
|
x-text="i"></a>
|
||||||
|
</template>
|
||||||
|
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)">
|
||||||
|
<span class="sr-only">Next</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>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="driver_name"></p>
|
||||||
|
<input type="hidden" id="driver_id" name="driver_id" >
|
||||||
|
<input type="submit"
|
||||||
|
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"
|
||||||
|
value="Confirmer">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
@@ -81,6 +81,8 @@
|
|||||||
|
|
||||||
<option value="public-transit">Transports</option>
|
<option value="public-transit">Transports</option>
|
||||||
|
|
||||||
|
<option value="solidarity-service">Transports Solidaire</option>
|
||||||
|
|
||||||
<!-- <option value="active-modes">Modes actifs</option> -->
|
<!-- <option value="active-modes">Modes actifs</option> -->
|
||||||
|
|
||||||
<option value="others">Autres</option>
|
<option value="others">Autres</option>
|
||||||
@@ -105,6 +107,11 @@
|
|||||||
:class="tab == 'public-transit' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'public-transit' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Transports </a>
|
Transports </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'solidarity-service'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'solidarity-service' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Transports Solidaire </a>
|
||||||
|
|
||||||
<!-- <a href="#" @click="tab = 'active-modes'"
|
<!-- <a href="#" @click="tab = 'active-modes'"
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
:class="tab == 'active-modes' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'active-modes' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
@@ -121,7 +128,7 @@
|
|||||||
|
|
||||||
<div x-show="tab == 'all'">{{template "journeys_all" .}}</div>
|
<div x-show="tab == 'all'">{{template "journeys_all" .}}</div>
|
||||||
<div x-show="tab == 'carpool'">{{template "journeys_carpool" .}}</div>
|
<div x-show="tab == 'carpool'">{{template "journeys_carpool" .}}</div>
|
||||||
<div x-show="tab == 'public-transit'">{{template "journeys_public_transit" .}}</div>
|
<div x-show="tab == 'solidarity-service'">{{template "journeys_solidarity_service" .}}</div>
|
||||||
<div x-show="tab == 'others'">{{template "journeys_others" .}}</div>
|
<div x-show="tab == 'others'">{{template "journeys_others" .}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,3 +139,4 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
|||||||
157
web/layouts/solidarity_service/_partials/beneficiary-list.html
Normal file
157
web/layouts/solidarity_service/_partials/beneficiary-list.html
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
{{define "beneficiary_solidarity_list"}}
|
||||||
|
<main>
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 px-4 py-5 sm:px-6" >
|
||||||
|
<h1 class="text-2xl font-semibold text-gray-900">Bénéficiaires Silvermobi</h1>
|
||||||
|
</div>
|
||||||
|
<form class="space-y-6" method="GET" name="driver_journeys" @submit="submit">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8" x-data="{
|
||||||
|
state: {{.ViewState.JSONWithLimits 0 10}},
|
||||||
|
current: 0,
|
||||||
|
nb_pages() {
|
||||||
|
let nbEl = this.state.count
|
||||||
|
return Math.ceil(nbEl/10)
|
||||||
|
},
|
||||||
|
async paginate(page) {
|
||||||
|
let start = (page-1)*10
|
||||||
|
if(start < 0|| start > this.state.count) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let resp = await fetch('/api/cache/' + this.state.cache_id + '?limits.min=' + start + '&limits.max=' + (start+10))
|
||||||
|
let data = await resp.json()
|
||||||
|
this.state.beneficiariessolidarity = data
|
||||||
|
this.current=page-1
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<div class=" px-4 py-5 sm:px-6">
|
||||||
|
<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">
|
||||||
|
Nom
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
Téléphone
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
Adresse
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
Labels
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
Option
|
||||||
|
</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">
|
||||||
|
Info
|
||||||
|
</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
<template x-for="beneficiary in state.beneficiariessolidarity.passenger">
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<button type="button" @click="
|
||||||
|
document.getElementById('passenger_id').value = beneficiary.id;
|
||||||
|
document.getElementById('passenger_name').textContent = beneficiary.first_name+' '+beneficiary.last_name" class="ml-4">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span
|
||||||
|
x-text="beneficiary.first_name" >
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
x-text="beneficiary.last_name">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="text-gray-500" x-text="beneficiary.email">
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
<a :href="'/app/solidarity_service/create/'+ beneficiary.id"
|
||||||
|
class="text-co-blue hover:text-co-blue">Demande de trajet<span class="sr-only">
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
<div class="text-gray-900" x-text="beneficiary.phone_number"></div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500"
|
||||||
|
x-text="beneficiary.data.address ? beneficiary.address.properties.label : ''">
|
||||||
|
</td>
|
||||||
|
<td class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
<a :href="'/app/beneficiaries/' + beneficiary.id"
|
||||||
|
class="text-co-blue hover:text-co-blue">Voir<span class="sr-only">, <span
|
||||||
|
x-text="beneficiary.first_name"></span> <span
|
||||||
|
x-text="beneficiary.last_name"></span>
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
<!-- More people... -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
||||||
|
<div class="flex-1 flex justify-between sm:hidden">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current)"> Previous </a>
|
||||||
|
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)"> Next </a>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Résultats
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+1, state.count)"></span>
|
||||||
|
à
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+10, state.count)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="state.count"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current)">
|
||||||
|
<span class="sr-only">Previous</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>
|
||||||
|
</a>
|
||||||
|
<template x-for="i in nb_pages">
|
||||||
|
<a href="#" @click="paginate(i)"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 border text-sm font-medium"
|
||||||
|
:class="i == current+1 ? 'z-10 bg-indigo-50 border-co-blue text-co-blue' : 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50'"
|
||||||
|
x-text="i"></a>
|
||||||
|
</template>
|
||||||
|
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)">
|
||||||
|
<span class="sr-only">Next</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>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" id="passenger_id" name="passenger_id" >
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
{{end}}
|
||||||
133
web/layouts/solidarity_service/_partials/booking-list.html
Normal file
133
web/layouts/solidarity_service/_partials/booking-list.html
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
{{define "booking_solidarity_list" }}
|
||||||
|
<main>
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 px-4 py-5 sm:px-6" x-data="{
|
||||||
|
state: {{.ViewState.JSONWithLimits 0 10}},
|
||||||
|
current: 0,
|
||||||
|
nb_pages() {
|
||||||
|
let nbEl = this.state.count
|
||||||
|
return Math.ceil(nbEl/10)
|
||||||
|
},
|
||||||
|
async paginate(page) {
|
||||||
|
let start = (page-1)*10
|
||||||
|
if(start < 0|| start > this.state.count) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let resp = await fetch('/api/cache/' + this.state.cache_id + '?limits.min=' + start + '&limits.max=' + (start+10))
|
||||||
|
let data = await resp.json()
|
||||||
|
this.state.bookings = data
|
||||||
|
this.current=page-1
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<h1 class="text-2xl font-semibold text-gray-900">Transports
|
||||||
|
</h1>
|
||||||
|
<div class="px-4 py-5 sm:px-6">
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
<tr>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Conducteur</th>
|
||||||
|
<th>Passager</th>
|
||||||
|
</tr>
|
||||||
|
<template x-for="booking in state.bookings.booking">
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span
|
||||||
|
x-text="booking.passengerPickupDate">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span
|
||||||
|
x-text="booking.driver.first_name">
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
x-text="booking.driver.last_name">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span
|
||||||
|
x-text="booking.passenger.first_name">
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
x-text="booking.passenger.last_name">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
||||||
|
<div class="flex-1 flex justify-between sm:hidden">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current)"> Previous </a>
|
||||||
|
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)"> Next </a>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Résultats
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+1, state.count)"></span>
|
||||||
|
à
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+10, state.count)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="state.count"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current)">
|
||||||
|
<span class="sr-only">Previous</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>
|
||||||
|
</a>
|
||||||
|
<template x-for="i in nb_pages">
|
||||||
|
<a href="#" @click="paginate(i)"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 border text-sm font-medium"
|
||||||
|
:class="i == current+1 ? 'z-10 bg-indigo-50 border-co-blue text-co-blue' : 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50'"
|
||||||
|
x-text="i"></a>
|
||||||
|
</template>
|
||||||
|
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)">
|
||||||
|
<span class="sr-only">Next</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>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="booking_name"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
{{end}}
|
||||||
165
web/layouts/solidarity_service/_partials/create-booking.html
Normal file
165
web/layouts/solidarity_service/_partials/create-booking.html
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
{{define "content"}}
|
||||||
|
<main>
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
||||||
|
<h1 class="text-2xl font-semibold text-gray-900">
|
||||||
|
Transport Solidaire
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="-my-2 -mx-4 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
||||||
|
<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">
|
||||||
|
<form class="space-y-6" method="GET" name="driver_journeys" @submit="submit">
|
||||||
|
|
||||||
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
|
{{ $departureField := "departure" }}
|
||||||
|
{{ $departureLabel := "Départ" }}
|
||||||
|
{{ template "address_autocomplete" dict "FieldName" $departureField "FieldLabel" $departureLabel }}
|
||||||
|
|
||||||
|
{{ $destinationField := "destination" }}
|
||||||
|
{{ $destinationLabel := "Destination" }}
|
||||||
|
{{ template "address_autocomplete" dict "FieldName" $destinationField "FieldLabel" $destinationLabel }}
|
||||||
|
|
||||||
|
<div class="py-4 grid grid-cols-2">
|
||||||
|
<div class="lg:col-span-1">
|
||||||
|
<label for="date" class="block text-sm font-medium text-gray-700">Le</label>
|
||||||
|
<div class="mt-1">
|
||||||
|
<input type="datetime-local" id="date" name="date"
|
||||||
|
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>
|
||||||
|
<input type="submit"
|
||||||
|
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"
|
||||||
|
value="Chercher un Conducteurs">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<div class="bg-white shadow sm:rounded-2xl">
|
||||||
|
|
||||||
|
<form class="space-y-6" method="POST" name="create_booking">
|
||||||
|
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8" x-data="{
|
||||||
|
state: {{.ViewState.JSONWithLimits 0 10}},
|
||||||
|
current: 0,
|
||||||
|
nb_pages() {
|
||||||
|
let nbEl = this.state.count
|
||||||
|
return Math.ceil(nbEl/10)
|
||||||
|
},
|
||||||
|
async paginate(page) {
|
||||||
|
let start = (page-1)*10
|
||||||
|
if(start < 0|| start > this.state.count) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let resp = await fetch('/api/cache/' + this.state.cache_id + '?limits.min=' + start + '&limits.max=' + (start+10))
|
||||||
|
let data = await resp.json()
|
||||||
|
this.state.drivers = data
|
||||||
|
this.current=page-1
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<h2 class="text-lg font-medium text-gray-900 p-4 sm:px-6">
|
||||||
|
Sélectionner un Conducteurs
|
||||||
|
</h2>
|
||||||
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
|
|
||||||
|
<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">
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
<template x-for="driver in state.drivers.driver_journeys">
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<button type="button" @click="
|
||||||
|
document.getElementById('driver_id').value = driver.user.id
|
||||||
|
document.getElementById('driver_name').textContent = driver.user.first_name+' '+driver.user.last_name" class="ml-4">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span
|
||||||
|
x-text="driver.user.first_name">
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
x-text="driver.user.last_name">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- More people... -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
||||||
|
<div class="flex-1 flex justify-between sm:hidden">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current)"> Previous </a>
|
||||||
|
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)"> Next </a>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Résultats
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+1, state.count)"></span>
|
||||||
|
à
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+10, state.count)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="state.count"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current)">
|
||||||
|
<span class="sr-only">Previous</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>
|
||||||
|
</a>
|
||||||
|
<template x-for="i in nb_pages">
|
||||||
|
<a href="#" @click="paginate(i)"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 border text-sm font-medium"
|
||||||
|
:class="i == current+1 ? 'z-10 bg-indigo-50 border-co-blue text-co-blue' : 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50'"
|
||||||
|
x-text="i"></a>
|
||||||
|
</template>
|
||||||
|
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)">
|
||||||
|
<span class="sr-only">Next</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>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="driver_name"></p>
|
||||||
|
<input type="hidden" id="driver_id" name="driver_id" >
|
||||||
|
<input type="submit"
|
||||||
|
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"
|
||||||
|
value="Confirmer">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
{{end}}
|
||||||
305
web/layouts/solidarity_service/_partials/create-driver.html
Normal file
305
web/layouts/solidarity_service/_partials/create-driver.html
Normal file
@@ -0,0 +1,305 @@
|
|||||||
|
{{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">Ajouter un conducteur</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
||||||
|
x-data="{
|
||||||
|
fields: {
|
||||||
|
first_name: null,
|
||||||
|
last_name: null,
|
||||||
|
email: null,
|
||||||
|
phone_number: null,
|
||||||
|
birthdate: null,
|
||||||
|
file_number: null
|
||||||
|
},
|
||||||
|
|
||||||
|
formValidation: {
|
||||||
|
valid: false,
|
||||||
|
fields: {
|
||||||
|
first_name: {valid: null},
|
||||||
|
last_name: {valid: null},
|
||||||
|
email: {valid: null},
|
||||||
|
phone_number: {valid: null},
|
||||||
|
birthdate: {valid: null},
|
||||||
|
file_number: {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">Informations obligatoires</h3>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">Informations personnelles sur le conducteur obligatoires
|
||||||
|
pour créer son profil dans PARCOURSMOB</p>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||||
|
<div class="grid grid-cols-6 gap-6">
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="first_name" class="block text-sm font-medium text-gray-700">Prénom</label>
|
||||||
|
<input type="text" name="first_name" id="first_name" autocomplete="given-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.first_name" @blur="validateField('first_name')"
|
||||||
|
:class="formValidation.fields.first_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="last_name" class="block text-sm font-medium text-gray-700">Nom</label>
|
||||||
|
<input type="text" name="last_name" id="last_name" autocomplete="family-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.last_name" @blur="validateField('last_name')"
|
||||||
|
:class="formValidation.fields.last_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
|
||||||
|
<input type="text" name="email" id="email" autocomplete="email"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
x-model="fields.email" @blur="validateField('email')"
|
||||||
|
:class="formValidation.fields.email.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="phone_number" class="block text-sm font-medium text-gray-700">Numéro de
|
||||||
|
téléphone</label>
|
||||||
|
<input type="text" name="phone_number" id="phone_number" autocomplete="phone" placeholder="+33612345678"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
x-model="fields.phone_number" @blur="validateField('phone_number')"
|
||||||
|
:class="formValidation.fields.phone_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="birthdate" class="block text-sm font-medium text-gray-700">Date de
|
||||||
|
naissance</label>
|
||||||
|
<input type="date" name="birthdate" id="birthdate" autocomplete="birthdate" placeholder="JJ/MM/AAAA"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
x-model="fields.birthdate" @blur="validateField('birthdate')"
|
||||||
|
:class="formValidation.fields.birthdate.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 optionnelles</h3>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">Autres informations de profil optionnelles</p>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 space-y-6 md:mt-0 md:col-span-2">
|
||||||
|
<div class="grid grid-cols-6 gap-6">
|
||||||
|
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
|
<select id="gender" name="gender" autocomplete="gender" x-model="gender"
|
||||||
|
class="max-w-lg mt-1 block focus:ring-co-blue focus:border-co-blue w-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-2xl">
|
||||||
|
<option value="0">Inconnu</option>
|
||||||
|
<option value="1">Masculin</option>
|
||||||
|
<option value="2">Féminin</option>
|
||||||
|
<option value="9">Sans objet</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="col-span-3 sm:col-span-3">
|
||||||
|
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
||||||
|
<div class="mt-1 flex items-center space-x-5">
|
||||||
|
<span class="inline-block h-12 w-12 rounded-co overflow-hidden bg-gray-100">
|
||||||
|
{{.IconSet.Icon "img:profile-picture-placeholder" "h-full w-full"}}
|
||||||
|
</span>
|
||||||
|
<button type="button"
|
||||||
|
class="bg-white py-2 px-3 border border-gray-300 rounded-2xl shadow-sm text-sm leading-4 font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
|
||||||
|
Charger la photo
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</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">Paramètres</h3>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">Paramètres liés au conducteur, utiles pour exploiter les fonctionnalités de PARCOURSMOB</p>
|
||||||
|
</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 conducteur solidaire</h3>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">Informations personnelles sur le conducteur obligatoires
|
||||||
|
pour créer son profil dans PARCOURSMOB</p>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 md:mt-0 md:col-span-2">
|
||||||
|
<div class="grid grid-cols-6 gap-6">
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="model" class="block text-sm font-medium text-gray-700">Model</label>
|
||||||
|
<input type="text" name="model" id="model"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
:class="border-gray-300">
|
||||||
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="brand" class="block text-sm font-medium text-gray-700">Marque</label>
|
||||||
|
<input type="text" name="brand" id="brand"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
:class="border-gray-300">
|
||||||
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="radius" class="block text-sm font-medium text-gray-700">Périmètre de service </label>
|
||||||
|
<input type="number" name="radius" id="radius"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
:class="border-gray-300">
|
||||||
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="alias" class="block text-sm font-medium text-gray-700">Alias</label>
|
||||||
|
<input type="text" name="alias" id="alias"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
:class="border-gray-300">
|
||||||
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
<label for="grade" class="block text-sm font-medium text-gray-700">Grade</label>
|
||||||
|
<input type="text" name="grade" id="grade"
|
||||||
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
|
:class="border-gray-100">
|
||||||
|
</div>
|
||||||
|
<div class="col-span-6 sm:col-span-3">
|
||||||
|
|
||||||
|
{{ $fieldName := "address" }}
|
||||||
|
{{ template "address_autocomplete" dict "FieldName" $fieldName }}
|
||||||
|
|
||||||
|
<!-- will dolater : tags, groups, ... -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div x-data="{
|
||||||
|
days : [
|
||||||
|
'Monday' ,
|
||||||
|
'Tuesday' ,
|
||||||
|
'Wednesday' ,
|
||||||
|
'Thursday' ,
|
||||||
|
'Friday' ,
|
||||||
|
'Saturday' ,
|
||||||
|
'Sunday' ,
|
||||||
|
],
|
||||||
|
|
||||||
|
hours : [
|
||||||
|
'12:00 AM',
|
||||||
|
'01:00 AM',
|
||||||
|
'02:00 AM',
|
||||||
|
'03:00 AM',
|
||||||
|
'04:00 AM',
|
||||||
|
'05:00 AM',
|
||||||
|
'06:00 AM',
|
||||||
|
'07:00 AM',
|
||||||
|
'08:00 AM',
|
||||||
|
'09:00 AM',
|
||||||
|
'10:00 AM',
|
||||||
|
'11:00 AM',
|
||||||
|
'12:00 PM',
|
||||||
|
'01:00 PM',
|
||||||
|
'02:00 PM',
|
||||||
|
'03:00 PM',
|
||||||
|
'04:00 PM',
|
||||||
|
'05:00 PM',
|
||||||
|
'06:00 PM',
|
||||||
|
'07:00 PM',
|
||||||
|
'08:00 PM',
|
||||||
|
'09:00 PM',
|
||||||
|
'10:00 PM',
|
||||||
|
'11:00 PM'
|
||||||
|
],
|
||||||
|
|
||||||
|
confirmAvailabilities() {
|
||||||
|
const driverAvailabilities = [];
|
||||||
|
|
||||||
|
this.days.forEach(day => {
|
||||||
|
this.hours.forEach(hour => {
|
||||||
|
let checkbox = document.getElementById('hour-' + day + '-' + hour).checked;
|
||||||
|
if( checkbox && checkbox === true){
|
||||||
|
const startTime = hour;
|
||||||
|
const endTime = hour;
|
||||||
|
|
||||||
|
const availabilitySlot = {
|
||||||
|
DayOfWeek: day,
|
||||||
|
StartTime: startTime,
|
||||||
|
EndTime: endTime,
|
||||||
|
};
|
||||||
|
|
||||||
|
driverAvailabilities.push(availabilitySlot);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
console.log(driverAvailabilities);
|
||||||
|
let availabilities = document.getElementById('availabilities');
|
||||||
|
availabilities.value = JSON.stringify(driverAvailabilities);
|
||||||
|
return
|
||||||
|
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<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">Disponibilitées</h3>
|
||||||
|
<p class="mt-1 text-sm text-gray-500">La définition de vos horraires permet de vous proposer des trajés uniquement quand vous serai disponible. </p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid grid-cols-1 grid-rows-7 gap-4">
|
||||||
|
<template x-for="day in days" :key="day" >
|
||||||
|
<div class="mb-4 gap-2 mt-4 bg-white shadow px-4 py-5 sm:rounded-lg sm:p-6">
|
||||||
|
<label :for="'day-select-'+ day" class="block text-sm font-medium select-none transition-colors duration-200 hover:text-gray-900 text-center mb-4" x-text="day"></label>
|
||||||
|
<div :name="day" :id="'day-select-' + day" class="grid grid-cols-6 grid-rows-2">
|
||||||
|
<template x-for="hour in hours" :key="hour">
|
||||||
|
<div class="flex flex-col items-center mb-4 ">
|
||||||
|
<input :id="'hour-' + day + '-' + hour" type="checkbox" x-value="hour" class="mt-1 focus:ring-co-blue focus:border-co-blue block shadow-sm sm:text-sm text-xl py-2 px-4 h-12 rounded-2xl w-auto"></input>
|
||||||
|
<label :for="'hour-' + day + '-' + hour" x-text="hour" class="block text-sm font-medium text-gray-700 select-none transition-colors duration-200 hover:text-gray-900 text-center "></label>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<input type="hidden" id="availabilities" name="availabilities" >
|
||||||
|
<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/beneficiaries/">
|
||||||
|
<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="button" @click="confirmAvailabilities()"
|
||||||
|
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">Confirmer les horaires</button>
|
||||||
|
<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">Créer le conducteur</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
123
web/layouts/solidarity_service/_partials/driver-list.html
Normal file
123
web/layouts/solidarity_service/_partials/driver-list.html
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
|
||||||
|
{{define "driver_solidarity_list" }}
|
||||||
|
<main>
|
||||||
|
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 px-4 py-5 sm:px-6" x-data="{
|
||||||
|
state: {{.ViewState.JSONWithLimits 0 10}},
|
||||||
|
current: 0,
|
||||||
|
nb_pages() {
|
||||||
|
let nbEl = this.state.count
|
||||||
|
return Math.ceil(nbEl/10)
|
||||||
|
},
|
||||||
|
async paginate(page) {
|
||||||
|
let start = (page-1)*10
|
||||||
|
if(start < 0|| start > this.state.count) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let resp = await fetch('/api/cache/' + this.state.cache_id + '?limits.min=' + start + '&limits.max=' + (start+10))
|
||||||
|
let data = await resp.json()
|
||||||
|
this.state.drivers = data
|
||||||
|
this.current=page-1
|
||||||
|
}
|
||||||
|
|
||||||
|
}">
|
||||||
|
<h1 class="text-2xl font-semibold text-gray-900"> Conducteurs
|
||||||
|
</h1>
|
||||||
|
<div class="px-4 py-5 sm:px-6">
|
||||||
|
<a
|
||||||
|
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"
|
||||||
|
href="driver/create">Ajouter un conducteur solidaire</a>
|
||||||
|
<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">
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
<template x-for="driver in state.drivers.driver_journeys">
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<button type="button" @click="
|
||||||
|
document.getElementById('driver_id').value = driver.id
|
||||||
|
document.getElementById('driver_name').textContent = driver.first_name+' '+driver.last_name" class="ml-4">
|
||||||
|
<div class="font-medium text-gray-900">
|
||||||
|
<span
|
||||||
|
x-text="driver.first_name">
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
x-text="driver.last_name">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td
|
||||||
|
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-6">
|
||||||
|
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- More people... -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
|
||||||
|
<div class="flex-1 flex justify-between sm:hidden">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current)"> Previous </a>
|
||||||
|
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)"> Next </a>
|
||||||
|
</div>
|
||||||
|
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm text-gray-700">
|
||||||
|
Résultats
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+1, state.count)"></span>
|
||||||
|
à
|
||||||
|
<span class="font-medium" x-text="Math.min((current * 10)+10, state.count)"></span>
|
||||||
|
sur
|
||||||
|
<span class="font-medium" x-text="state.count"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current)">
|
||||||
|
<span class="sr-only">Previous</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>
|
||||||
|
</a>
|
||||||
|
<template x-for="i in nb_pages">
|
||||||
|
<a href="#" @click="paginate(i)"
|
||||||
|
class="relative inline-flex items-center px-4 py-2 border text-sm font-medium"
|
||||||
|
:class="i == current+1 ? 'z-10 bg-indigo-50 border-co-blue text-co-blue' : 'bg-white border-gray-300 text-gray-500 hover:bg-gray-50'"
|
||||||
|
x-text="i"></a>
|
||||||
|
</template>
|
||||||
|
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
|
||||||
|
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
|
||||||
|
@click="paginate(current+2)">
|
||||||
|
<span class="sr-only">Next</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>
|
||||||
|
</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="driver_name"></p>
|
||||||
|
<input type="hidden" id="driver_id" name="driver_id" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
{{end}}
|
||||||
36
web/layouts/solidarity_service/beneficiary-solidarity.html
Normal file
36
web/layouts/solidarity_service/beneficiary-solidarity.html
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{{define "beneficiary_solidarity"}}
|
||||||
|
<div class="px-4 py-6 sm:px-6">
|
||||||
|
<h3 class="text-lg">Transport solidaire</h3>
|
||||||
|
{{ $bookingSolidarity := len .ViewState.bookingSolidarity }}
|
||||||
|
{{if eq $bookingSolidarity 0}}
|
||||||
|
<p class="py-5 mt-1 max-w-2xl text-sm text-gray-500">Aucune course Silvermobi n'est prévue pour le moment.</p>
|
||||||
|
<div>
|
||||||
|
<form method="POST" @submit="submit">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
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">
|
||||||
|
Inscription aux Transports Solidaires
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
{{else}}
|
||||||
|
<table class="min-w-full divide-y divide-gray-300">
|
||||||
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
|
<tr>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Conducteur</th>
|
||||||
|
<th>Passager</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{{range .ViewState.bookingSolidarity}}
|
||||||
|
<tr>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{( .PassengerPickupDate)}}</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{.Driver.FirstName}} {{.Driver.LastName}}</td>
|
||||||
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{.Passenger.FirstName}} {{.Passenger.LastName}} </td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
47
web/layouts/solidarity_service/main.html
Normal file
47
web/layouts/solidarity_service/main.html
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{{define "content"}}
|
||||||
|
<main>
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 px-4 py-5 sm:px-6">
|
||||||
|
<h1 class="text-2xl font-semibold text-gray-900">
|
||||||
|
Transport Solidaire
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
<section aria-labelledby="functionalities-title" x-data="{
|
||||||
|
tab: 'beneficiaries',
|
||||||
|
to(event) {
|
||||||
|
this.tab = event.target.value
|
||||||
|
}
|
||||||
|
}">
|
||||||
|
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden px-4 py-5 sm:px-6">
|
||||||
|
<div class="divide-y divide-gray-200">
|
||||||
|
<div>
|
||||||
|
<div class="hidden sm:block">
|
||||||
|
<div class="border-b border-gray-200 pl-4">
|
||||||
|
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||||
|
<a href="#" @click="tab = 'beneficiaries'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Bénéficiaires </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'drivers'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'organizations' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Conducteurs </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'solidarityService'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'solidarityService' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Trajets Solidaire </a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div x-show="tab == 'beneficiaries'">{{template "beneficiary_solidarity_list" .}}</div>
|
||||||
|
<div x-show="tab == 'drivers'">{{template "driver_solidarity_list" .}}</div>
|
||||||
|
<div x-show="tab == 'solidarityService'">{{template "booking_solidarity_list" .}}</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
{{end}}
|
||||||
@@ -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