solidarity carpool

This commit is contained in:
Arnaud Delcasse 2025-03-25 15:11:41 +01:00
parent a63fa3abef
commit a33e9cbb15
40 changed files with 24494 additions and 43 deletions

View File

@ -17,6 +17,10 @@ menu_items:
title: Transport solidaire
link: /app/solidarity-transport/
icon: tabler-icons:car
- name: organized_carpool
title: Covoiturage solidaire
link: /app/organized-carpool/
icon: tabler-icons:car
- name: vehicles
title: Véhicules partagés
link: /app/vehicles/
@ -94,8 +98,7 @@ views:
- web/layouts/administration/_partials/groups_admins.html
- web/layouts/administration/_partials/group_members.html
- web/layouts/group/settings.html
vehicles:
search:
files:
@ -196,6 +199,7 @@ views:
- web/layouts/journeys/_partials/journeys-carpool.html
- web/layouts/journeys/_partials/journeys-public-transit.html
- web/layouts/journeys/_partials/journeys-solidarity-transport.html
- web/layouts/journeys/_partials/journeys-organized-carpools.html
- web/layouts/journeys/search.html
list:
files:
@ -251,6 +255,7 @@ views:
files:
- web/layouts/solidarity_transport/_partials/drivers_list.html
- web/layouts/solidarity_transport/_partials/bookings_list.html
- web/layouts/solidarity_transport/_partials/bookings_history.html
- web/layouts/solidarity_transport/overview.html
driver_create:
files:
@ -271,6 +276,27 @@ views:
- web/layouts/solidarity_transport/_partials/journey_preview.html
- web/layouts/solidarity_transport/booking_display.html
organized_carpool:
overview:
files:
- web/layouts/organized_carpool/_partials/drivers_list.html
- web/layouts/organized_carpool/_partials/bookings_list.html
- web/layouts/organized_carpool/overview.html
driver_create:
files:
- web/layouts/_partials/address_autocomplete.html
- web/layouts/organized_carpool/driver_create.html
driver_display:
files:
- web/layouts/_partials/address_autocomplete.html
- web/layouts/organized_carpool/_partials/driver_availabilities.html
- web/layouts/solidarity_transport/_partials/driver_documents.html
- web/layouts/organized_carpool/driver_display.html
journey:
files:
- web/layouts/organized_carpool/_partials/journey_preview.html
- web/layouts/organized_carpool/journey.html
administration:
home:
files:

View File

@ -1,6 +1,7 @@
import '@kingshott/iodine';
import Alpine from 'alpinejs'
import { Protocol } from "pmtiles";
import { layers, namedFlavor } from '@protomaps/basemaps';
window.Alpine = Alpine

View File

@ -14,6 +14,8 @@
birthdate: null,
file_number: null
},
other_properties: {},
other_properties_serialized: null,
rules: {
first_name: ['required'],
last_name: ['required'],
@ -41,6 +43,7 @@
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
},
submit(event) {
this.other_properties_serialized = JSON.stringify(this.other_properties)
this.validate()
if(!this.formValidation.valid) {
this.isFormValid = false
@ -50,6 +53,7 @@
}
}">
<form class="space-y-6" method="POST" @submit="submit">
<input type="hidden" name="other_properties" x-model="other_properties_serialized" />
<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">
@ -101,7 +105,7 @@
:class="formValidation.fields.birthdate.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
</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>
<label for="file_number" class="block text-sm font-medium text-gray-700">Numéro de dossier</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')"
@ -133,6 +137,54 @@
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="situation" class="block text-sm font-medium text-gray-700">Situation sociale</label>
<div class="sm:mt-0 sm:col-span-2">
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.situation"
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="">Inconnu</option>
<option value="BRSA">BRSA</option>
<option value="Demandeur d'emploi">Demandeur d'emploi</option>
<option value="Chantier">Chantier</option>
<option value="Jeune -25">Jeune -25</option>
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="situation" class="block text-sm font-medium text-gray-700">Motif d'inscription</label>
<div class="sm:mt-0 sm:col-span-2">
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.subscription_reason"
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="Autre">Inconnu</option>
<option value="Pas de permis">Pas de permis</option>
<option value="Pas de véhicule">Pas de véhicule</option>
<option value="Perte d'autonomie">Perte d'autonomie</option>
<option value="Autre">Autre</option>
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="status" class="block text-sm font-medium text-gray-700">Statut (prioritaire / non prioritaire)</label>
<div class="sm:mt-0 sm:col-span-2">
<select id="status" name="status" autocomplete="status" x-model="other_properties.status"
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="Non prioritaire">Non prioritaire</option>
<option value="Prioritaire">Prioritaire</option>
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="last_subscription_date" class="block text-sm font-medium text-gray-700">Date de dernière adhésion</label>
<input type="date" name="last_subscription_date" id="last_subscription_date" autocomplete="last_subscription_date" 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="other_properties.last_subscription_date">
</div>
<div class="col-span-6 sm:col-span-3">
<label for="comment" class="block text-sm font-medium text-gray-700">Commentaire</label>
<textarea name="comment" id="comment"
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
x-model="other_properties.comment"></textarea>
</div>
<!-- <div class="col-span-3 sm:col-span-3">
<label class="block text-sm font-medium text-gray-700"> Photo </label>
@ -180,4 +232,4 @@
</div>
</form>
</div>
{{end}}
{{end}}

View File

@ -71,10 +71,40 @@
{{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>
<dt class="text-sm font-medium text-gray-500">Numéro de dossier</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.file_number}}</dd>
</div>
{{end}}
{{if and .ViewState.beneficiary.Data.other_properties .ViewState.beneficiary.Data.other_properties.status}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Statut</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.other_properties.status}}</dd>
</div>
{{end}}
{{if and .ViewState.beneficiary.Data.other_properties .ViewState.beneficiary.Data.other_properties.situation}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Situation sociale</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.other_properties.situation}}</dd>
</div>
{{end}}
{{if and .ViewState.beneficiary.Data.other_properties .ViewState.beneficiary.Data.other_properties.subscription_reason}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Motif d'inscription</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.other_properties.subscription_reason}}</dd>
</div>
{{end}}
{{if and .ViewState.beneficiary.Data.other_properties .ViewState.beneficiary.Data.other_properties.last_subscription_date}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Dernière adhésion</dt>
<dd class="mt-1 text-sm text-gray-900">{{ .ViewState.beneficiary.Data.other_properties.last_subscription_date}}</dd>
</div>
{{end}}
{{if and .ViewState.beneficiary.Data.other_properties .ViewState.beneficiary.Data.other_properties.comment}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Commentaire</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.beneficiary.Data.other_properties.comment}}</dd>
</div>
{{end}}
</dl>
</div>
</div>

View File

@ -103,7 +103,7 @@
</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>
<label for="file_number" class="block text-sm font-medium text-gray-700">Numéro de dossier</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')"
@ -135,6 +135,55 @@
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="situation" class="block text-sm font-medium text-gray-700">Situation sociale</label>
<div class="sm:mt-0 sm:col-span-2">
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.situation"
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="">Inconnu</option>
<option value="BRSA">BRSA</option>
<option value="Demandeur d'emploi">Demandeur d'emploi</option>
<option value="Chantier">Chantier</option>
<option value="Jeune -25">Jeune -25</option>
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="situation" class="block text-sm font-medium text-gray-700">Motif d'inscription</label>
<div class="sm:mt-0 sm:col-span-2">
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.subscription_reason"
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="Autre">Inconnu</option>
<option value="Pas de permis">Pas de permis</option>
<option value="Pas de véhicule">Pas de véhicule</option>
<option value="Perte d'autonomie">Perte d'autonomie</option>
<option value="Autre">Autre</option>
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="status" class="block text-sm font-medium text-gray-700">Statut (prioritaire / non prioritaire)</label>
<div class="sm:mt-0 sm:col-span-2">
<select id="status" name="status" autocomplete="status" x-model="other_properties.status"
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="Non prioritaire">Non prioritaire</option>
<option value="Prioritaire">Prioritaire</option>
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="last_subscription_date" class="block text-sm font-medium text-gray-700">Date de dernière adhésion</label>
<input type="date" name="last_subscription_date" id="last_subscription_date" autocomplete="last_subscription_date" 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="other_properties.last_subscription_date">
</div>
<div class="col-span-6 sm:col-span-3">
<label for="comment" class="block text-sm font-medium text-gray-700">Commentaire</label>
<textarea name="comment" id="comment"
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
x-model="other_properties.comment"></textarea>
</div>
<!-- <div class="col-span-3 sm:col-span-3">
<label class="block text-sm font-medium text-gray-700"> Photo </label>
@ -186,4 +235,4 @@
</div>
</form>
</div>
{{end}}
{{end}}

View File

@ -101,6 +101,9 @@
<div class="p-4 text-center">
<a href="/app/vehicles/"><button class="text-md px-4 py-1 bg-gray-200 text-co-blue rounded-xl">Réserver un véhicule</button></a>
</div>-->
<h3 class="p-4 text-lg">Covoitureurs solidaires</h3>
{{template "journeys_organized_carpool" .}}
<h3 class="p-4 text-lg">Transport solidaire</h3>

View File

@ -0,0 +1,53 @@
{{define "journeys_organized_carpool"}}
{{if .ViewState.organized_carpools}}
{{ if eq (len .ViewState.organized_carpools) 0}}
<p class="p-12 text-gray-500 text-center text-md">Aucun covoitureur solidaire disponible pour ce trajet.</p>
{{else}}
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
<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">
Covoitureurs disponibles
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Départ conducteur
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Arrivée conducteur
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Distance du covoiturage
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
&nbsp;
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
{{ range .ViewState.organized_carpools }}
{{ $driver := (index $.ViewState.solidarity_drivers .Driver.Id)}}
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ $driver.Data.first_name }} {{ $driver.Data.last_name }}</td>
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverDepartureAddress }}</td>
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverArrivalAddress }}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Distance }} km</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue hover:text-co-blue"
href="/app/organized-carpool/drivers/{{$driver.ID}}/journeys/{{.Id}}?{{unescapeHTML $.ViewState.querystring}}">
Organiser
</a>
</td>
</tr>
{{ end }}
</tbody>
</table>
{{end}}
{{end}}
{{end}}

View File

@ -110,6 +110,11 @@
:class="tab == 'solidarity-transport' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
Transport solidaire </a>
<a href="#" @click="tab = 'organized-carpool'"
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
:class="tab == 'organized-carpool' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
Covoiturage solidaire </a>
<a href="#" @click="tab = 'others'"
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
:class="tab == 'others' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
@ -122,6 +127,7 @@
<div x-show="tab == 'all'">{{template "journeys_all" .}}</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 == 'organized-carpool'">{{template "journeys_organized_carpool" .}}</div>
<div x-show="tab == 'solidarity-transport'">{{template "journeys_solidarity_transport" .}}</div>
<div x-show="tab == 'others'">{{template "journeys_others" .}}</div>
</div>

View File

@ -6,14 +6,16 @@
<title>PARCOURSMOB</title>
<link rel="stylesheet" href="/public/css/main.css" />
<link href="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.snow.css" rel="stylesheet" />
<!-- <script defer type="text/javascript" src="/public/js/main.js" defer></script> -->
<script src="https://cdn.jsdelivr.net/npm/@kingshott/iodine@8.1.0/dist/iodine.min.umd.js" defer></script>
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.js"></script>
<script src="https://unpkg.com/maplibre-gl@^5.1.1/dist/maplibre-gl.js"></script>
<script src="https://unpkg.com/maplibre-gl@^5.2.0/dist/maplibre-gl.js"></script>
<link href="https://unpkg.com/maplibre-gl@^5.2.0/dist/maplibre-gl.css" rel="stylesheet" />
<script src="https://unpkg.com/pmtiles@^4.3.0/dist/pmtiles.js"></script>
<link href="https://unpkg.com/maplibre-gl@^5.1.1/dist/maplibre-gl.css" rel="stylesheet" />
<script src="https://unpkg.com/@protomaps/basemaps@5/dist/basemaps.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@turf/turf@7/turf.min.js"></script>
<script src="https://unpkg.com/polyline@0.2.0/src/polyline.js"></script>
<script defer type="text/javascript" src="/public/js/main.js" defer></script>
</head>
<body class="h-full" x-data="{ offCanvasMenu: false }">

View File

@ -0,0 +1,82 @@
{{ define "carpool_bookings_list" }}
{{if eq (len .ViewState.bookings) 0}}
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
{{else}}
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
<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">
Conducteur
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Passager
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Départ
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Destination
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Date
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Statut
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
&nbsp;
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
{{range .ViewState.bookings}}
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue" href="/app/organized-carpool/drivers/{{.DriverId}}">
{{ (index $.ViewState.drivers_map .DriverId).Data.first_name }}
{{ (index $.ViewState.drivers_map .DriverId).Data.last_name }}
</a>
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
{{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }}
{{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }}
</a>
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ .Journey.PassengerPickup.Properties.label }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ .Journey.PassengerDrop.Properties.label }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ .Journey.PassengerPickupDate.Format "02/01/2006 15:04" }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ if eq .Status "WAITING_CONFIRMATION"}}
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation</span>
{{ else if eq .Status "VALIDATED"}}
<span class="p-1 text-xs bg-co-green rounded-xl">Validé</span>
{{ else if eq .Status "CANCELLED"}}
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
{{ end }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue" href="/app/organized-carpool/bookings/{{.Id}}">
Voir
</a>
</td>
</tr>
{{ end }}
</tbody>
</table>
{{end}}
{{end}}

View File

@ -0,0 +1,119 @@
{{define "driver_availabilities"}}
<div class="bg-white shadow sm:rounded-lg"
x-data="{
availabilitiesdialog: false
}">
<div class="px-4 py-5 sm:px-6">
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Trajets</h2>
</div>
<div class="border-t border-gray-200 px-4">
<div class="">
{{ range .ViewState.trips }}
{{$departure := index .Features 0}}
{{$destination := index .Features 1}}
<div class="my-10">
<div class="flex flex-row my-2">
{{range .ExtraMembers.properties.schedules}}
<span class="p-1 text-xs mr-2 bg-co-blue text-white rounded-lg">
{{ if eq .day "SUN"}}Dimanche
{{ else if eq .day "MON"}}Lundi
{{ else if eq .day "TUE"}}Mardi
{{ else if eq .day "WED"}}Mercredi
{{ else if eq .day "THU"}}Jeudi
{{ else if eq .day "FRI"}}Vendredi
{{ else if eq .day "SAT"}}Samedi
{{ end }}
{{.time_of_day}}
</span>
{{end}}
</div>
<div class="flex flex-row">
<div class="flex-1 text-sm">
{{$departure.Properties.label}}
</div>
<div>
{{$.IconSet.Icon "hero:outline/chevron-right" "h-5 w-5 mr-3"}}
</div>
<div class="flex-1 text-sm text-right">
{{$destination.Properties.label}}
</div>
</div>
<div>
<div class="flex-none text-sm text-right"><a class="text-co-blue" href="/app/organized-carpool/drivers/{{$.ViewState.driver.ID}}/trips/{{.ExtraMembers.id}}/delete">Supprimer</a></div>
</div>
</div>
{{ end }}
</div>
<button type="button" @click="availabilitiesdialog = !availabilitiesdialog"
class="inline-flex items-center justify-center rounded-2xl border border-transparent bg-co-blue my-4 px-4 py-2 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
Ajouter un trajet
</button>
</div>
<div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true"
x-show="availabilitiesdialog">
<div class="fixed inset-0 bg-gray-900 opacity-30 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 sm:max-w-sm sm:p-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">Ajouter un trajet</h3>
<div class="mt-2">
<p class="text-sm text-gray-500">Paramétrer un nouveau trajet du conducteur</p>
</div>
</div>
</div>
<form method="POST" action="/app/organized-carpool/drivers/{{.ViewState.driver.ID}}/trips" class="my-4">
<div class="my-8">
{{ $fieldName := "address_departure" }}
{{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.driver.Data.address "FieldLabel" "Départ") }}
</div>
<div class="my-8">
{{ $fieldName := "address_destination" }}
{{ template "address_autocomplete" (dict "FieldName" $fieldName "Address" .ViewState.driver.Data.address_destination "FieldLabel" "Destination") }}
</div>
<div class="my-4">
<input name="days.monday" type="checkbox" class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded"> Lundi &nbsp;&nbsp;
<input name="days.tuesday" type="checkbox" class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded"> Mardi &nbsp;&nbsp;
<input name="days.wednesday" type="checkbox" class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded"> Mercredi &nbsp;&nbsp;
<input name="days.thursday" type="checkbox" class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded"> Jeudi &nbsp;&nbsp;
<input name="days.friday" type="checkbox" class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded"> Vendredi &nbsp;&nbsp;
<input name="days.saturday" type="checkbox" class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded"> Samedi &nbsp;&nbsp;
<input name="days.sunday" type="checkbox" class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded"> Dimanche &nbsp;&nbsp;
</div>
<div class="my-4 inline-flex justify-items-center">
<div class="p-1">Aller à :</div>
<input type="time" id="outwardtime" name="outwardtime" value="08:00"
class="shadow-sm focus:ring-co-blue focus:border-co-blue p-1 sm:text-sm border-gray-300 rounded-2xl" />
</div>
<div class="my-4 inline-flex justify-items-center">
<div class="p-1">Retour à :</div>
<input type="time" id="returntime" name="returntime" value="18:00"
class="shadow-sm focus:ring-co-blue focus:border-co-blue p-1 sm:text-sm border-gray-300 rounded-2xl" />
</div>
<div class="mt-5 sm:mt-6">
<button type="submit" class="inline-flex w-full justify-center rounded-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:text-sm">Ajouter</button>
</div>
<div class="mt-5 sm:mt-6">
<button @click="availabilitiesdialog=false" type="button" class="inline-flex w-full justify-center max-w-xs bg-white hover:bg-gray-50 border-gray-300 border px-4 py-2 text-gray-700 items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
{{end}}

View File

@ -0,0 +1,73 @@
{{ define "carpool_drivers_list" }}
<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="m-4 sm:ml-16 sm:flex-none">
<!--<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>-->
<a href="/app/organized-carpool/drivers/create">
<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">
{{$.IconSet.Icon "hero:outline/plus-circle" "h-5 w-5 mr-3"}}
Ajouter un covoitureur solidaire
</button>
</a>
</div>
</div>
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
<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="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Adresse départ
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Adresse destination
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Téléphone
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Profil validé
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
&nbsp;
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
{{ range .ViewState.drivers }}
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.first_name }} {{ .Data.last_name }}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if .Data.address_destination}}{{.Data.address_destination.properties.label}}{{end}}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.phone_number }}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue hover:text-co-blue"
href="/app/organized-carpool/drivers/{{.ID}}">
Voir
</a>
</td>
</tr>
{{ end }}
</tbody>
</table>
{{ end }}

View File

@ -0,0 +1,271 @@
{{define "journey_preview"}}
<div class="col-span-1 bg-white rounded-2xl shadow divide-y divide-gray-200 flex flex-col">
<div class="px-4 py-2 flex items-center justify-between flex-wrap sm:flex-nowrap">
<div class="ml-4 mt-2 grid-cols-2">
<h3 class="text-lg leading-6 font-medium text-gray-900">Le trajet</h3>
<h2 class="text-sm leading-6 font-medium text-gray-600">Informations sur le trajet</h2>
</div>
</div>
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2">
<div class="p-4 py-5 sm:px-6">
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Départ passager</dt>
<dd class="mt-1 text-sm text-gray-900">{{(index .journey.Features 0).Properties.MustString "label"}}</dd>
</div>
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Destination passager</dt>
<dd class="mt-1 text-sm text-gray-900">{{(index .journey.Features 1).Properties.MustString "label"}}</dd>
</div>
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Départ conducteur</dt>
<dd class="mt-1 text-sm text-gray-900">{{(index .journey.Features 0).Properties.MustString "label"}}</dd>
</div>
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Destination conducteur</dt>
<dd class="mt-1 text-sm text-gray-900">{{(index .journey.Features 1).Properties.MustString "label"}}</dd>
</div>
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
<dd class="mt-1 text-sm text-gray-900">0 EUR</dd>
</div>
</dl>
</div>
<div>
<div id="map" class="w-full h-full"></div>
<script>
let protocol = new pmtiles.Protocol();
maplibregl.addProtocol("pmtiles",protocol.tile);
var map = new maplibregl.Map({
container: 'map', // container id
style: "/public/maps/protomaps-light/style.json",
});
const geojsonPoints = {
"type": "FeatureCollection",
"features": [
{{ json (index .journey.Features 0) }},
{{ json (index .journey.Features 1) }},
]
}
map.on('load', async () => {
map.addSource('trip', {
type: "geojson",
data: {{ json (index .journey.Features 2) }}
})
map.addLayer({
'id': 'trip',
'type': 'line',
'source': 'trip',
'layout': {
'line-join': 'round',
'line-cap': 'round',
},
'paint': {
'line-color': '#243887',
'line-width': 3
},
});
map.addSource('points', {
type: "geojson",
data: geojsonPoints
})
map.addLayer({
'id': 'points',
'type': 'circle',
'source': 'points',
'paint': {
'circle-color': '#243887',
'circle-radius': 8
},
});
var bbox=turf.bbox(geojsonPoints)
map.fitBounds(bbox, { padding: 30 })
})
</script>
</div>
</div>
</div>
<div class="py-4 grid grid-cols-1 gap-6 sm:grid-cols-2">
<div class="col-span-1 bg-white rounded-2xl shadow divide-y divide-gray-200 flex flex-col">
<div class="px-4 py-2 flex items-center justify-between flex-wrap sm:flex-nowrap">
<div class="ml-4 mt-2 grid-cols-2">
<h3 class="text-lg leading-6 font-medium text-gray-900">Conducteur</h3>
<h2 class="text-sm leading-6 font-medium text-gray-600">{{.driver.Data.first_name}} {{.driver.Data.last_name}}</h2>
</div>
</div>
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
{{if .driver.Data.email}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Email</dt>
<dd class="mt-1 text-sm text-gray-900">{{.driver.Data.email}}</dd>
</div>
{{end}}
{{if .driver.Data.phone_number}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Téléphone</dt>
<dd class="mt-1 text-sm text-gray-900">{{.driver.Data.phone_number}}</dd>
</div>
{{end}}
{{if .driver.Data.birthdate}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
<dd class="mt-1 text-sm text-gray-900">{{(timeFrom .driver.Data.birthdate).Format
"02/01/2006"}}</dd>
</div>
{{end}}
{{if and .driver.Data.gender (ne .driver.Data.gender "0")}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Genre</dt>
<dd class="mt-1 text-sm text-gray-900">{{genderISO5218 .driver.Data.gender}}</dd>
</div>
{{end}}
{{if .driver.Data.address}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Adresse</dt>
<dd class="mt-1 text-sm text-gray-900">{{.driver.Data.address.properties.label}}</dd>
</div>
{{end}}
{{if .driver.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">{{.driver.Data.file_number}}</dd>
</div>
{{end}}
</dl>
</div>
</div>
<div class="col-span-1 bg-white rounded-2xl shadow divide-y divide-gray-200 flex flex-col">
<div class="px-4 py-2 flex items-center justify-between flex-wrap sm:flex-nowrap">
<div class="ml-4 mt-2">
<h3 class="text-lg leading-6 font-medium text-gray-900">Passager</h3>
<h2 class="text-sm leading-6 font-medium text-gray-600">{{if ne .passenger.ID "" }}{{.passenger.Data.first_name}} {{.passenger.Data.last_name}}{{end}}</h2>
</div>
</div>
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
{{if eq .passenger.ID ""}}
<form method="GET">
<div x-data="{
text: '',
beneficiariesListOpen: false,
beneficiaries: {{json .beneficiaries}},
filteredBeneficiaries: (beneficiaries, text) => {
if(text=='') {
return beneficiaries
}
return beneficiaries.filter(b => b['data']['first_name'].toLowerCase().includes(text.toLowerCase()) || b['data']['last_name'].toLowerCase().includes(text.toLowerCase()))
},
fields: {
beneficiaryid: {{if .search}}'{{.search.beneficiary.ID}}'{{else}}null{{end}},
},
selectbeneficiary(beneficiary) {
this.fields.beneficiaryid = beneficiary.id
this.text = beneficiary.data.first_name + ' ' + beneficiary.data.last_name
this.beneficiariesListOpen = false
},
}">
<input type="hidden" name="passengerid" x-model="fields.beneficiaryid">
<label for="combobox" class="block text-sm font-medium text-gray-700">Selectionner un bénéficiaire</label>
<div class="relative mt-1 mb-4">
<input autocomplete="off" @focus="beneficiariesListOpen = true" x-model="text" id="combobox" type="text" class="w-full rounded-2xl border border-gray-300 bg-white py-2 pl-3 pr-12 shadow-sm focus:border-co-blue focus:outline-none focus:ring-1 focus:ring-co-blue sm:text-sm" role="combobox" aria-controls="options" aria-expanded="false">
<button @click="beneficiariesListOpen = ! beneficiariesListOpen" type="button" class="absolute inset-y-0 right-0 flex items-center rounded-r-2xl px-2 focus:outline-none">
<!-- Heroicon name: solid/selector -->
<svg class="h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</button>
<ul x-show="beneficiariesListOpen" class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-xl bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm" id="options" role="listbox">
<!--
Combobox option, manage highlight styles based on mouseenter/mouseleave and keyboard navigation.
Active: "text-white bg-indigo-600", Not Active: "text-gray-900"
-->
<template x-for="beneficiary in filteredBeneficiaries(beneficiaries, text)">
<li @click="selectbeneficiary(beneficiary)" class="relative cursor-default hover:bg-gray-100 select-none py-2 pl-3 pr-9 text-gray-900" id="option-0" role="option" tabindex="-1">
<!-- Selected: "font-semibold" -->
<span class="truncate" x-text="beneficiary.data.first_name"></span> <span class="truncate" x-text="beneficiary.data.last_name"></span>
<!--
Checkmark, only display for selected option.
Active: "text-white", Not Active: "text-indigo-600"
-->
<span class="absolute inset-y-0 right-0 flex items-center pr-4 text-co-blue">
<!-- Heroicon name: solid/check -->
<!-- <svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd" />
</svg> -->
</span>
</li>
</template>
<!-- More items... -->
</ul>
</div>
</div>
<button type="submit" class="inline-flex w-full justify-center max-w-xs bg-co-blue border-gray-300 border px-4 py-2 text-white items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
Valider
</button>
</div>
</form>
{{ else }}
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
{{if .passenger.Data.email}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Email</dt>
<dd class="mt-1 text-sm text-gray-900">{{.passenger.Data.email}}</dd>
</div>
{{end}}
{{if .passenger.Data.phone_number}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Téléphone</dt>
<dd class="mt-1 text-sm text-gray-900">{{.passenger.Data.phone_number}}</dd>
</div>
{{end}}
{{if .passenger.Data.birthdate}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
<dd class="mt-1 text-sm text-gray-900">{{(timeFrom .passenger.Data.birthdate).Format
"02/01/2006"}}</dd>
</div>
{{end}}
{{if and .passenger.Data.gender (ne .passenger.Data.gender "0")}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Genre</dt>
<dd class="mt-1 text-sm text-gray-900">{{genderISO5218 .passenger.Data.gender}}</dd>
</div>
{{end}}
{{if .passenger.Data.address}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Adresse</dt>
<dd class="mt-1 text-sm text-gray-900">{{.passenger.Data.address.properties.label}}</dd>
</div>
{{end}}
{{if .passenger.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">{{.passenger.Data.file_number}}</dd>
</div>
{{end}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Compte mobilié (solde)</dt>
<dd class="mt-1 text-sm text-gray-900">{{if .passenger.Data.wallet}}{{ .passenger.Data.wallet }}{{else}}0{{end}} EUR</dd>
</div>
</dl>
</div>
{{end}}
</div>
</div>
{{end}}

View File

@ -0,0 +1,178 @@
{{ 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">Créer un covoitureur solidaire</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,
},
rules: {
first_name: ['required'],
last_name: ['required'],
email: ['required', 'email'],
phone_number: ['required', 'regexMatch:^((\\+)33|0)[1-9](\\d{2}){4}$'],
birthdate: ['required'],
},
formValidation: {
valid: false,
fields: {
first_name: {valid: null},
last_name: {valid: null},
email: {valid: null},
phone_number: {valid: null},
birthdate: {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 obligatoires pour créer le conducteur</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="p-2 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="p-2 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="p-2 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="p-2 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="p-2 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>
{{ $fieldName := "address" }}
{{ template "address_autocomplete" dict "FieldName" $fieldName "FieldLabel" "Adresse principale" }}
</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">
{{ $fieldName2 := "address_destination" }}
{{ template "address_autocomplete" dict "FieldName" $fieldName2 "FieldLabel" "Adresse destination" }}
<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="p-2 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 class="mt-5 space-y-6 md:mt-0 md:col-span-2">
{{ $fieldName := "address" }}
{{ template "address_autocomplete" dict "FieldName" $fieldName }}
</div>
</div>
</div>-->
<div class="flex justify-end">
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
<a href="/app/organized-carpool/">
<button type="button"
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
</a>
<button type="submit"
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
Créer le covoitureur solidaire</button>
</div>
</form>
</div>
{{end}}

View File

@ -0,0 +1,139 @@
{{define "content"}}
<main class="py-10">
<!-- Page header -->
<div class="max-w-3xl mx-auto px-4 sm:px-6 md:flex md:items-center md:justify-between md:space-x-5 lg:max-w-7xl lg:px-8">
<div class="flex items-center space-x-5">
<div class="flex-shrink-0">
<div class="relative">
<img class="h-16 w-16 rounded-co" src="/app/beneficiaries/{{.ViewState.driver.ID}}/picture" alt="">
<span class="absolute inset-0 shadow-inner rounded-full" aria-hidden="true"></span>
</div>
</div>
<div>
<h1 class="text-2xl font-bold text-gray-900">{{.ViewState.driver.Data.first_name}}
{{.ViewState.driver.Data.last_name}}</h1>
<p class="text-sm font-medium text-gray-500">{{if .ViewState.driver.Metadata.created}}Ajouté le <time
datetime="2022-07-25">{{.ViewState.driver.Metadata.created}}</time> par
<a href="#" class="text-gray-900">Conseiller 1</a>{{end}}
</p>
</div>
</div>
<div
class="mt-6 flex flex-col-reverse justify-stretch space-y-4 space-y-reverse sm:flex-row-reverse sm:justify-end sm:space-x-reverse sm:space-y-0 sm:space-x-3 md:mt-0 md:flex-row md:space-x-3">
<!-- <button type="button"
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Supprimer</button> -->
<!-- <a href="/app/solidarity-transport/drivers/{{.ViewState.driver.ID}}/update" class="inline-flex"><button type="button"
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Modifier</button></a>-->
</div>
</div>
<div class="mt-8 max-w-3xl mx-auto grid grid-cols-1 gap-6 sm:px-6 lg:max-w-7xl lg:grid-flow-col-dense lg:grid-cols-3">
<div class="space-y-6 lg:col-start-1 lg:col-span-2">
<section aria-labelledby="driver-information-title">
<div class="bg-white shadow sm:rounded-lg">
<div class="px-4 py-5 sm:px-6">
<h2 id="driver-information-title" class="text-lg leading-6 font-medium text-gray-900">
Informations personnelles</h2>
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations générales sur le conducteur solidaire.</p>
</div>
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
{{if .ViewState.driver.Data.email}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Email</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.driver.Data.email}}</dd>
</div>
{{end}}
{{if .ViewState.driver.Data.phone_number}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Téléphone</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.driver.Data.phone_number}}</dd>
</div>
{{end}}
{{if .ViewState.driver.Data.birthdate}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Date de naissance</dt>
<dd class="mt-1 text-sm text-gray-900">{{(timeFrom .ViewState.driver.Data.birthdate).Format
"02/01/2006"}}</dd>
</div>
{{end}}
{{if and .ViewState.driver.Data.gender (ne .ViewState.driver.Data.gender "0")}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Genre</dt>
<dd class="mt-1 text-sm text-gray-900">{{genderISO5218 .ViewState.driver.Data.gender}}</dd>
</div>
{{end}}
{{if .ViewState.driver.Data.address}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Adresse principale</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.driver.Data.address.properties.label}}</dd>
</div>
{{end}}
{{if .ViewState.driver.Data.address_destination}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Adresse destination</dt>
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.driver.Data.address_destination.properties.label}}</dd>
</div>
{{end}}
</dl>
</div>
</div>
</section>
<section aria-labelledby="functionalities-title" x-data="{
tab: 'documents',
to(event) {
this.tab = event.target.value
}
}">
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden">
<div class="divide-y divide-gray-200">
<div>
<div class="sm:hidden">
<label for="tabs" class="sr-only">Select a tab</label>
<select id="tabs" name="tabs" @change="to"
class="block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md">
<!--<option value="notes">Notes</option>-->
<!-- <option value="journeys">Déplacements</option>
<option value="vehicles">Véhicules</option>
<option value="events">Dispositifs</option> -->
<option value="documents">Documents</option>
</select>
</div>
<div class="hidden sm:block">
<div class="border-b border-gray-200 pl-4">
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
<!-- Current: "border-indigo-500 text-indigo-600", Default: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" -->
<!--<a href="#" @click="tab = 'notes'"
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
:class="tab == 'notes' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
Notes </a>-->
<a href="#" @click="tab = 'documents'"
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'">
Documents </a>
</nav>
</div>
</div>
</div>
<div x-show="tab == 'documents'">{{template "driver_files" .}}</div>
</div>
</div>
</section>
</div>
<section class="lg:col-start-3 lg:col-span-1">
{{template "driver_availabilities" .}}
</section>
</div>
</main>
{{end}}

View File

@ -0,0 +1,17 @@
{{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">Organiser le covoiturage</h1>
</div>
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
{{template "journey_preview" (dict "journey" .ViewState.journey "driver" .ViewState.driver "passenger" .ViewState.passenger "beneficiaries" .ViewState.beneficiaries)}}
{{if ne .ViewState.passenger.ID ""}}
<div class="max-w-7xl m-auto px-4 sm:px-6 md:px-8 flex justify-items-center">
<form method="POST">
<button class="w-100 bg-co-blue border-gray-300 border px-4 py-2 text-white items-center text-sm rounded-2xl focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">
Envoyer la mise en relation
</button>
</form>
</div>
{{end}}
{{end}}

View File

@ -0,0 +1,48 @@
{{ 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">Covoiturage solidaire</h1>
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden my-4" x-data="{
tab: 'drivers',
to(event) {
this.tab = event.target.value
}
}">
<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 = 'drivers'"
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
:class="tab == 'drivers' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
Covoitureurs solidaires </a>
<!--<a href="#" @click="tab = 'beneficiaries'"
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
:class="tab == 'beneficiaries' ? '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 = 'trips'"
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 </a>
</nav>
</div>
</div>
</div>
<div x-show="tab == 'drivers'">{{template "carpool_drivers_list" .}}</div>
<div x-show="tab == 'beneficiaries'">1</div>
<div x-show="tab == 'trips'">{{template "carpool_bookings_list" .}}</div>
</div>
</div>
</div>
{{ end }}

View File

@ -0,0 +1,82 @@
{{ define "solidarity_bookings_history" }}
{{if eq (len .ViewState.bookings_history) 0}}
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
{{else}}
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
<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">
Conducteur
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Passager
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Départ
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Destination
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Date
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
Statut
</th>
<th scope="col"
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
&nbsp;
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 bg-white">
{{range .ViewState.bookings_history}}
<tr>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{.DriverId}}">
{{ (index $.ViewState.drivers_map .DriverId).Data.first_name }}
{{ (index $.ViewState.drivers_map .DriverId).Data.last_name }}
</a>
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
{{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }}
{{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }}
</a>
</td>
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ .Journey.PassengerPickup.Properties.label }}
</td>
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ .Journey.PassengerDrop.Properties.label }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ .Journey.PassengerPickupDate.Format "02/01/2006 15:04" }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{ if eq .Status "WAITING_CONFIRMATION"}}
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation</span>
{{ else if eq .Status "VALIDATED"}}
<span class="p-1 text-xs bg-co-green rounded-xl">Validé</span>
{{ else if eq .Status "CANCELLED"}}
<span class="p-1 text-xs bg-co-red text-white rounded-xl">Annulé</span>
{{ end }}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue" href="/app/solidarity-transport/bookings/{{.Id}}">
Voir
</a>
</td>
</tr>
{{ end }}
</tbody>
</table>
{{end}}
{{end}}

View File

@ -52,7 +52,11 @@
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .Data.phone_number }}</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
{{if and .Data.other_properties (gt .Data.other_properties.last_subscription_date "2025")}}
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
{{else}}
<span class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
{{end}}
</td>
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
<a class="text-co-blue hover:text-co-blue"

View File

@ -25,7 +25,6 @@
<dt class="text-sm font-medium text-gray-500">Destination conducteur</dt>
<dd class="mt-1 text-sm text-gray-900">{{.driver_journey.DriverArrival.Properties.label}}</dd>
</div>
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Kilomètres passager</dt>
<dd class="mt-1 text-sm text-gray-900">{{.driver_journey.PassengerDistance}} km</dd>
</div>
@ -54,35 +53,88 @@
<div>
<div id="map" class="w-full h-full"></div>
<script>
let protocol = new pmtiles.Protocol();
maplibregl.addProtocol("pmtiles",protocol.tile);
var map = new maplibregl.Map({
container: 'map', // container id
style: {
version: 8,
glyphs:'https://protomaps.github.io/basemaps-assets/fonts/{fontstack}/{range}.pbf',
sprite: "https://protomaps.github.io/basemaps-assets/sprites/v4/light",
sources: {
"protomaps": {
type: "vector",
url: "pmtiles://https://coopgo-gis-data.s3.fr-par.scw.cloud/vector-tiles/pmtiles/europe-latest.pmtiles",
// ^-- Remember to prefix the URL with pmtiles://
attribution: '<a href="https://protomaps.com">Protomaps</a> © <a href="https://openstreetmap.org">OpenStreetMap</a>'
},
"points": {
type: "geojson",
data: {
"type": "FeatureCollection",
"features": [
{{ json .driver_journey.DriverDeparture }},
{{ json .driver_journey.PassengerPickup }},
{{ json .driver_journey.PassengerDrop }},
{{ json .driver_journey.DriverArrival }}
]
}
}
},
layers: basemaps.layers("protomaps",basemaps.namedFlavor("light"),{lang:"en"})
}
style: "/public/maps/protomaps-light/style.json",
});
const geojsonPoints = {
"type": "FeatureCollection",
"features": [
{{ json .driver_journey.DriverDeparture }},
{{ json .driver_journey.PassengerPickup }},
{{ json .driver_journey.PassengerDrop }},
{{ json .driver_journey.DriverArrival }}
]
}
const driverGeojsonPoints = {
"type": "FeatureCollection",
"features": [
{{ json .driver_journey.DriverDeparture }},
{{ json .driver_journey.DriverArrival }}
]
}
const passengerGeojsonPoints = {
"type": "FeatureCollection",
"features": [
{{ json .driver_journey.PassengerPickup }},
{{ json .driver_journey.PassengerDrop }},
]
}
map.on('load', async () => {
{{if .driver_journey.JourneyPolyline}}
var linestring = polyline.toGeoJSON('{{.driver_journey.JourneyPolyline}}');
map.addSource('trip', {
type: "geojson",
data: linestring
})
map.addLayer({
'id': 'trip',
'type': 'line',
'source': 'trip',
'layout': {
'line-join': 'round',
'line-cap': 'round',
},
'paint': {
'line-color': '#243887',
'line-width': 3
},
});
{{end}}
map.addSource('driver_points', {
type: "geojson",
data: driverGeojsonPoints
})
map.addLayer({
'id': 'driver_points',
'type': 'circle',
'source': 'driver_points',
'paint': {
'circle-color': '#000'
},
});
map.addSource('passenger_points', {
type: "geojson",
data: passengerGeojsonPoints
})
map.addLayer({
'id': 'passenger_points',
'type': 'circle',
'source': 'passenger_points',
'paint': {
'circle-color': '#243887',
'circle-radius': 8
},
});
var bbox=turf.bbox(geojsonPoints)
map.fitBounds(bbox, { padding: 30 })
})
</script>
</div>
</div>

View File

@ -13,6 +13,8 @@
phone_number: null,
birthdate: null,
},
other_properties: {},
other_properties_serialized: null,
rules: {
first_name: ['required'],
last_name: ['required'],
@ -38,6 +40,7 @@
this.formValidation.fields[field] = Iodine.assert(this.fields[field], this.rules[field])
},
submit(event) {
this.other_properties_serialized = JSON.stringify(this.other_properties)
this.validate()
if(!this.formValidation.valid) {
this.isFormValid = false
@ -47,6 +50,7 @@
}
}">
<form class="space-y-6" method="POST" @submit="submit">
<input type="hidden" name="other_properties" x-model="other_properties_serialized" />
<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">
@ -124,6 +128,13 @@
</select>
</div>
</div>
<div class="col-span-6 sm:col-span-3">
<label for="last_subscription_date" class="block text-sm font-medium text-gray-700">Date de dernière adhésion</label>
<input type="date" name="last_subscription_date" id="last_subscription_date" autocomplete="last_subscription_date" 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="other_properties.last_subscription_date">
</div>
<!-- <div class="col-span-3 sm:col-span-3">
<label class="block text-sm font-medium text-gray-700"> Photo </label>

View File

@ -75,6 +75,12 @@
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.driver.Data.file_number}}</dd>
</div>
{{end}}
{{if and .ViewState.driver.Data.other_properties .ViewState.driver.Data.other_properties.last_subscription_date}}
<div class="sm:col-span-1">
<dt class="text-sm font-medium text-gray-500">Dernière adhésion</dt>
<dd class="mt-1 text-sm text-gray-900">{{ .ViewState.driver.Data.other_properties.last_subscription_date}}</dd>
</div>
{{end}}
</dl>
</div>
</div>

View File

@ -28,6 +28,11 @@
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 </a>
<a href="#" @click="tab = 'solidarityHistory'"
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
:class="tab == 'solidarityHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
Trajets passés </a>
</nav>
</div>
</div>
@ -38,6 +43,7 @@
<div x-show="tab == 'beneficiaries'">1</div>
<div x-show="tab == 'solidarityService'">{{template "solidarity_bookings_list" .}}</div>
<div x-show="tab == 'solidarityHistory'">{{template "solidarity_bookings_history" .}}</div>
</div>
</div>

56
web/node_modules/.package-lock.json generated vendored
View File

@ -58,6 +58,26 @@
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@parcel/watcher-linux-x64-musl": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.5.1.tgz",
"integrity": "sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/@tailwindcss/cli": {
"version": "4.0.9",
"resolved": "https://registry.npmjs.org/@tailwindcss/cli/-/cli-4.0.9.tgz",
@ -126,6 +146,22 @@
"node": ">= 10"
}
},
"node_modules/@tailwindcss/oxide-linux-x64-musl": {
"version": "4.0.9",
"resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.0.9.tgz",
"integrity": "sha512-Kvp0TCkfeXyeehqLJr7otsc4hd/BUPfcIGrQiwsTVCfaMfjQZCG7DjI+9/QqPZha8YapLA9UoIcUILRYO7NE1Q==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/braces": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
@ -268,6 +304,26 @@
"url": "https://opencollective.com/parcel"
}
},
"node_modules/lightningcss-linux-x64-musl": {
"version": "1.29.1",
"resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.29.1.tgz",
"integrity": "sha512-L0Tx0DtaNUTzXv0lbGCLB/c/qEADanHbu4QdcNOXLIe1i8i22rZRpbT3gpWYsCh9aSL9zFujY/WmEXIatWvXbw==",
"cpu": [
"x64"
],
"license": "MPL-2.0",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 12.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
}
},
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017-present Devon Govett
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1 @@
This is the linux-x64-musl build of @parcel/watcher. See https://github.com/parcel-bundler/watcher for details.

View File

@ -0,0 +1,33 @@
{
"name": "@parcel/watcher-linux-x64-musl",
"version": "2.5.1",
"main": "watcher.node",
"repository": {
"type": "git",
"url": "https://github.com/parcel-bundler/watcher.git"
},
"description": "A native C++ Node module for querying and subscribing to filesystem events. Used by Parcel 2.",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"files": [
"watcher.node"
],
"engines": {
"node": ">= 10.0.0"
},
"os": [
"linux"
],
"cpu": [
"x64"
],
"libc": [
"musl"
]
}

Binary file not shown.

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) Tailwind Labs, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,3 @@
# `@tailwindcss/oxide-linux-x64-musl`
This is the **x86_64-unknown-linux-musl** binary for `@tailwindcss/oxide`

View File

@ -0,0 +1,30 @@
{
"name": "@tailwindcss/oxide-linux-x64-musl",
"version": "4.0.9",
"repository": {
"type": "git",
"url": "git+https://github.com/tailwindlabs/tailwindcss.git",
"directory": "crates/node/npm/linux-x64-musl"
},
"os": [
"linux"
],
"cpu": [
"x64"
],
"main": "tailwindcss-oxide.linux-x64-musl.node",
"files": [
"tailwindcss-oxide.linux-x64-musl.node"
],
"publishConfig": {
"provenance": true,
"access": "public"
},
"license": "MIT",
"engines": {
"node": ">= 10"
},
"libc": [
"musl"
]
}

373
web/node_modules/lightningcss-linux-x64-musl/LICENSE generated vendored Normal file
View File

@ -0,0 +1,373 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@ -0,0 +1 @@
This is the x86_64-unknown-linux-musl build of lightningcss. See https://github.com/parcel-bundler/lightningcss for details.

Binary file not shown.

View File

@ -0,0 +1,38 @@
{
"name": "lightningcss-linux-x64-musl",
"version": "1.29.1",
"license": "MPL-2.0",
"description": "A CSS parser, transformer, and minifier written in Rust",
"main": "lightningcss.linux-x64-musl.node",
"browserslist": "last 2 versions, not dead",
"publishConfig": {
"access": "public"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/parcel"
},
"repository": {
"type": "git",
"url": "https://github.com/parcel-bundler/lightningcss.git"
},
"engines": {
"node": ">= 12.0.0"
},
"files": [
"lightningcss.linux-x64-musl.node"
],
"resolutions": {
"lightningcss": "link:.",
"caniuse-lite": "^1.0.30001677"
},
"os": [
"linux"
],
"cpu": [
"x64"
],
"libc": [
"musl"
]
}

View File

@ -458,9 +458,6 @@
.-mx-4 {
margin-inline: calc(var(--spacing) * -4);
}
.mx-4 {
margin-inline: calc(var(--spacing) * 4);
}
.mx-auto {
margin-inline: auto;
}
@ -470,12 +467,18 @@
.-my-2 {
margin-block: calc(var(--spacing) * -2);
}
.my-2 {
margin-block: calc(var(--spacing) * 2);
}
.my-4 {
margin-block: calc(var(--spacing) * 4);
}
.my-8 {
margin-block: calc(var(--spacing) * 8);
}
.my-10 {
margin-block: calc(var(--spacing) * 10);
}
.-mt-2 {
margin-top: calc(var(--spacing) * -2);
}
@ -1679,9 +1682,6 @@
.bg-gray-300 {
background-color: var(--color-gray-300);
}
.bg-gray-400 {
background-color: var(--color-gray-400);
}
.bg-gray-500 {
background-color: var(--color-gray-500);
}

View File

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff