Compare commits
33 Commits
ed726b610f
...
spie06
| Author | SHA1 | Date | |
|---|---|---|---|
| a2edc2179f | |||
| a2b58f0386 | |||
| f671ac5d70 | |||
| 9a4aa0c7bb | |||
| 6d5d77902c | |||
| d4c08e993d | |||
| a8fbcdc4e2 | |||
| 6bf5f4a7e5 | |||
| 1f951da1fa | |||
| 2747ce67fa | |||
| 672fdb98fd | |||
| 03b9044ffc | |||
| 0ecee50d1c | |||
| 96205b81df | |||
| ea71e44837 | |||
| 1da9c68690 | |||
| a548f50234 | |||
| 2ea7cf99f6 | |||
| 2056bc72e2 | |||
| dbeac9bec7 | |||
| 388b6366df | |||
|
|
7c620ba09a | ||
| 29060f8ab3 | |||
| 21d6e27e0c | |||
| cf780cb9c8 | |||
| a3a48d3882 | |||
| 0278e4b97f | |||
| aa97b97f22 | |||
| f6e3ba11db | |||
| 2cb8d7e1a9 | |||
| 0b5ea8cb05 | |||
| 8f4e9a1170 | |||
| d4fc469f49 |
74
config.yaml
74
config.yaml
@@ -33,41 +33,15 @@ menu_items:
|
|||||||
title: Agenda dispositifs
|
title: Agenda dispositifs
|
||||||
link: /app/agenda/
|
link: /app/agenda/
|
||||||
icon: hero:outline/calendar
|
icon: hero:outline/calendar
|
||||||
# - name: directory
|
- name: directory
|
||||||
# title: Répertoire solutions
|
title: Répertoire solutions
|
||||||
# link: /app/directory/
|
link: /app/directory/
|
||||||
# icon: hero:outline/document-text
|
icon: hero:outline/document-text
|
||||||
- name: support
|
- name: support
|
||||||
title: Support
|
title: Support
|
||||||
link: /app/support/
|
link: /app/support/
|
||||||
icon: hero:outline/support
|
icon: hero:outline/support
|
||||||
|
|
||||||
journey_tabs:
|
|
||||||
- name: all
|
|
||||||
title: Tous modes
|
|
||||||
enabled: true
|
|
||||||
- name: public-transit
|
|
||||||
title: Transports
|
|
||||||
enabled: true
|
|
||||||
- name: directory
|
|
||||||
title: Solutions locales
|
|
||||||
module: directory
|
|
||||||
- name: carpool
|
|
||||||
title: Covoiturage
|
|
||||||
enabled: true
|
|
||||||
- name: organized-carpool
|
|
||||||
title: Covoiturage solidaire
|
|
||||||
module: organized_carpool
|
|
||||||
- name: solidarity-transport
|
|
||||||
title: Transport solidaire
|
|
||||||
module: solidarity_transport
|
|
||||||
- name: vehicles
|
|
||||||
title: Véhicules
|
|
||||||
module: vehicles
|
|
||||||
# - name: others
|
|
||||||
# title: Autres
|
|
||||||
# enabled: true
|
|
||||||
|
|
||||||
views:
|
views:
|
||||||
generic:
|
generic:
|
||||||
files:
|
files:
|
||||||
@@ -97,10 +71,13 @@ 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/beneficiaries/_partials/beneficiary-diags.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-wallet.html
|
- web/layouts/beneficiaries/_partials/beneficiary-wallet.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-solidarity-transport.html
|
- web/layouts/beneficiaries/_partials/beneficiary-solidarity-transport.html
|
||||||
- web/layouts/beneficiaries/_partials/beneficiary-organized-carpool.html
|
|
||||||
- web/layouts/beneficiaries/display.html
|
- web/layouts/beneficiaries/display.html
|
||||||
|
create_diag:
|
||||||
|
files:
|
||||||
|
- web/layouts/beneficiaries/create-diag.html
|
||||||
update:
|
update:
|
||||||
files:
|
files:
|
||||||
- web/layouts/_partials/address_autocomplete.html
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
@@ -220,13 +197,10 @@ views:
|
|||||||
- web/layouts/_partials/orb_address_autocomplete.html
|
- web/layouts/_partials/orb_address_autocomplete.html
|
||||||
- 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-vehicles.html
|
|
||||||
- web/layouts/journeys/_partials/journeys-local-solutions.html
|
|
||||||
- web/layouts/journeys/_partials/journeys-carpool.html
|
- web/layouts/journeys/_partials/journeys-carpool.html
|
||||||
- web/layouts/journeys/_partials/journeys-public-transit-transitous.html
|
- web/layouts/journeys/_partials/journeys-public-transit-motis.html
|
||||||
- web/layouts/journeys/_partials/journeys-solidarity-transport.html
|
- web/layouts/journeys/_partials/journeys-solidarity-transport.html
|
||||||
- web/layouts/journeys/_partials/journeys-organized-carpools.html
|
- web/layouts/journeys/_partials/journeys-organized-carpools.html
|
||||||
- web/layouts/journeys/_partials/saved-searches.html
|
|
||||||
- web/layouts/journeys/search.html
|
- web/layouts/journeys/search.html
|
||||||
list:
|
list:
|
||||||
files:
|
files:
|
||||||
@@ -281,7 +255,6 @@ views:
|
|||||||
overview:
|
overview:
|
||||||
files:
|
files:
|
||||||
- web/layouts/solidarity_transport/_partials/drivers_list.html
|
- web/layouts/solidarity_transport/_partials/drivers_list.html
|
||||||
- web/layouts/solidarity_transport/_partials/booking_filters.html
|
|
||||||
- web/layouts/solidarity_transport/_partials/bookings_list.html
|
- web/layouts/solidarity_transport/_partials/bookings_list.html
|
||||||
- web/layouts/solidarity_transport/_partials/bookings_history.html
|
- web/layouts/solidarity_transport/_partials/bookings_history.html
|
||||||
- web/layouts/solidarity_transport/overview.html
|
- web/layouts/solidarity_transport/overview.html
|
||||||
@@ -300,7 +273,6 @@ views:
|
|||||||
- web/layouts/solidarity_transport/_partials/driver_availabilities.html
|
- web/layouts/solidarity_transport/_partials/driver_availabilities.html
|
||||||
- web/layouts/solidarity_transport/_partials/driver_history.html
|
- web/layouts/solidarity_transport/_partials/driver_history.html
|
||||||
- web/layouts/solidarity_transport/_partials/driver_documents.html
|
- web/layouts/solidarity_transport/_partials/driver_documents.html
|
||||||
- web/layouts/solidarity_transport/_partials/driver_wallet.html
|
|
||||||
- web/layouts/solidarity_transport/driver_display.html
|
- web/layouts/solidarity_transport/driver_display.html
|
||||||
driver_journey:
|
driver_journey:
|
||||||
files:
|
files:
|
||||||
@@ -327,38 +299,23 @@ views:
|
|||||||
organized_carpool:
|
organized_carpool:
|
||||||
overview:
|
overview:
|
||||||
files:
|
files:
|
||||||
- web/layouts/organized_carpool/_partials/booking_filters.html
|
|
||||||
- web/layouts/organized_carpool/_partials/drivers_list.html
|
- web/layouts/organized_carpool/_partials/drivers_list.html
|
||||||
- web/layouts/organized_carpool/_partials/bookings_list.html
|
- web/layouts/organized_carpool/_partials/bookings_list.html
|
||||||
- web/layouts/organized_carpool/_partials/bookings_history.html
|
|
||||||
- web/layouts/organized_carpool/overview.html
|
- web/layouts/organized_carpool/overview.html
|
||||||
driver_create:
|
driver_create:
|
||||||
files:
|
files:
|
||||||
- web/layouts/_partials/address_autocomplete.html
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
- web/layouts/organized_carpool/driver_create.html
|
- web/layouts/organized_carpool/driver_create.html
|
||||||
driver_update:
|
|
||||||
files:
|
|
||||||
- web/layouts/agenda/_partials/address.html
|
|
||||||
- web/layouts/_partials/address_autocomplete.html
|
|
||||||
- web/layouts/organized_carpool/driver_update.html
|
|
||||||
driver_display:
|
driver_display:
|
||||||
files:
|
files:
|
||||||
- web/layouts/_partials/address_autocomplete.html
|
- web/layouts/_partials/address_autocomplete.html
|
||||||
- web/layouts/organized_carpool/_partials/driver_availabilities.html
|
- web/layouts/organized_carpool/_partials/driver_availabilities.html
|
||||||
- web/layouts/organized_carpool/_partials/driver_documents.html
|
- web/layouts/solidarity_transport/_partials/driver_documents.html
|
||||||
- web/layouts/organized_carpool/_partials/driver_wallet.html
|
|
||||||
- web/layouts/organized_carpool/_partials/driver_history.html
|
|
||||||
- web/layouts/organized_carpool/driver_display.html
|
- web/layouts/organized_carpool/driver_display.html
|
||||||
journey:
|
journey:
|
||||||
files:
|
files:
|
||||||
- sms/organized_carpool/request_driver.tmpl
|
|
||||||
- web/layouts/_partials/submit_with_sms.html
|
|
||||||
- web/layouts/organized_carpool/_partials/journey_preview.html
|
- web/layouts/organized_carpool/_partials/journey_preview.html
|
||||||
- web/layouts/organized_carpool/journey.html
|
- web/layouts/organized_carpool/journey.html
|
||||||
booking_display:
|
|
||||||
files:
|
|
||||||
- web/layouts/organized_carpool/_partials/booking_map.html
|
|
||||||
- web/layouts/organized_carpool/booking_display.html
|
|
||||||
|
|
||||||
administration:
|
administration:
|
||||||
home:
|
home:
|
||||||
@@ -448,8 +405,6 @@ icons:
|
|||||||
tabler-icons:walk: <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-walk %s" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="13" cy="4" r="1" /><line x1="7" y1="21" x2="10" y2="17" /><path d="M16 21l-2 -4l-3 -3l1 -6" /><path d="M6 12l2 -3l4 -1l3 3l3 1" /></svg>
|
tabler-icons:walk: <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-walk %s" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="13" cy="4" r="1" /><line x1="7" y1="21" x2="10" y2="17" /><path d="M16 21l-2 -4l-3 -3l1 -6" /><path d="M6 12l2 -3l4 -1l3 3l3 1" /></svg>
|
||||||
tabler-icons:bus: <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-bus %s" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="6" cy="17" r="2" /><circle cx="18" cy="17" r="2" /><path d="M4 17h-2v-11a1 1 0 0 1 1 -1h14a5 7 0 0 1 5 7v5h-2m-4 0h-8" /><polyline points="16 5 17.5 12 22 12" /><line x1="2" y1="10" x2="17" y2="10" /><line x1="7" y1="5" x2="7" y2="10" /><line x1="12" y1="5" x2="12" y2="10" /></svg>
|
tabler-icons:bus: <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-bus %s" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><circle cx="6" cy="17" r="2" /><circle cx="18" cy="17" r="2" /><path d="M4 17h-2v-11a1 1 0 0 1 1 -1h14a5 7 0 0 1 5 7v5h-2m-4 0h-8" /><polyline points="16 5 17.5 12 22 12" /><line x1="2" y1="10" x2="17" y2="10" /><line x1="7" y1="5" x2="7" y2="10" /><line x1="12" y1="5" x2="12" y2="10" /></svg>
|
||||||
tabler-icons:train: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-train %s"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M21 13c0 -3.87 -3.37 -7 -10 -7h-8" /><path d="M3 15h16a2 2 0 0 0 2 -2" /><path d="M3 6v5h17.5" /><path d="M3 11v4" /><path d="M8 11v-5" /><path d="M13 11v-4.5" /><path d="M3 19h18" /></svg>
|
tabler-icons:train: <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-train %s"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M21 13c0 -3.87 -3.37 -7 -10 -7h-8" /><path d="M3 15h16a2 2 0 0 0 2 -2" /><path d="M3 6v5h17.5" /><path d="M3 11v4" /><path d="M8 11v-5" /><path d="M13 11v-4.5" /><path d="M3 19h18" /></svg>
|
||||||
hero:outline/map-pin: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M15 10.5a3 3 0 11-6 0 3 3 0 016 0z" /><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25s-7.5-4.108-7.5-11.25a7.5 7.5 0 1115 0z" /></svg>
|
|
||||||
hero:outline/flag: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="%s"><path stroke-linecap="round" stroke-linejoin="round" d="M3 3v1.5M3 21v-6m0 0l2.77-.693a9 9 0 016.208.682l.108.054a9 9 0 006.086.71l3.114-.732a48.524 48.524 0 01-.005-10.499l-3.11.732a9 9 0 01-6.085-.711l-.108-.054a9 9 0 00-6.208-.682L3 4.5M3 15V4.5" /></svg>
|
|
||||||
|
|
||||||
emails:
|
emails:
|
||||||
onboarding:
|
onboarding:
|
||||||
@@ -499,21 +454,18 @@ emails:
|
|||||||
- emails/layout.html
|
- emails/layout.html
|
||||||
- emails/onboarding/delete-subscriber.html
|
- emails/onboarding/delete-subscriber.html
|
||||||
solidarity_transport:
|
solidarity_transport:
|
||||||
booking_driver_accept:
|
boking_driver_accept:
|
||||||
subject: Trajet accepté par un conducteur
|
subject: Trajet accepté par un conducteur
|
||||||
files:
|
files:
|
||||||
- emails/layout.html
|
- emails/layout.html
|
||||||
- emails/solidarity_transport/booking_driver_accept.html
|
- emails/solidarity_transport/booking_driver_accept.html
|
||||||
booking_driver_decline:
|
boking_driver_decline:
|
||||||
subject: Trajet accepté par un conducteur
|
subject: Trajet accepté par un conducteur
|
||||||
files:
|
files:
|
||||||
- emails/layout.html
|
- emails/layout.html
|
||||||
- emails/solidarity_transport/booking_driver_decline.html
|
- emails/solidarity_transport/booking_driver_accept.html
|
||||||
|
|
||||||
sms:
|
sms:
|
||||||
solidarity_transport:
|
solidarity_transport:
|
||||||
request_driver:
|
request_driver:
|
||||||
- sms/solidarity_transport/request_driver.tmpl
|
- sms/solidarity_transport/request_driver.tmpl
|
||||||
organized_carpool:
|
|
||||||
request_driver:
|
|
||||||
- sms/organized_carpool/request_driver.tmpl
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
<p>Vous avez une nouvelle réservation e véhicule sur PARCOURSMOB.</p>
|
<p>Vous avez une nouvelle réservation e véhicule sur PARCOURSMOB.</p>
|
||||||
<p>Connectez vous sur <a href="http://localhost:9000/app/vehicles-management/bookings/{{.bookingid}}">http://localhost:9000/app/vehicles-management/bookings/{{.bookingid}}</a> pour y accéder</p>
|
<p>Connectez vous sur <a href="https://spie06.parcoursmob.fr/app/vehicles-management/bookings/{{.bookingid}}">https://spie06.parcoursmob.fr/app/vehicles-management/bookings/{{.bookingid}}</a> pour y accéder</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
<p>Bonjour,</p>
|
<p>Bonjour,</p>
|
||||||
<p>Trajet refusé par un conducteur.</p>
|
<p>Trajet refusé par un conducteur.</p>
|
||||||
<p>Voir le trajet : <a href="{{ .baseUrl }}/app/solidarity-transport/bookings/{{.bookingid}}">{{ .baseUrl }}/app/solidarity-transport/bookings/{{.bookingid}}</a></p>
|
<p>Voir le trajet : <a href="{{ .baseUrl }}/solidarity-transport/bookings/{{.bookingid}}">{{ .baseUrl }}/solidarity-transport/bookings/{{.bookingid}}</a></p>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
{{ define "sms_template" }}[{{ .name }}] Nouvelle demande de covoiturage solidaire le {{ .datetime }}.
|
|
||||||
Acceptez ou refusez sur {{ .baseUrl }}/ext/oc/bp/{booking_id}{{ end }}
|
|
||||||
@@ -1 +1 @@
|
|||||||
{{ define "sms_template" }}[{{ .name }}] {{ .driver_first_name }} {{ .driver_last_name }} vient d'accepter votre trajet vers {{.address}} le {{.date}}. Le conducteur vous contactera pour organiser le trajet.{{ end }}
|
{{ define "sms_template" }}[{{ .name }}] {{ .driver_first_name }} {{ .driver_last_name }} vient d'accepter votre trajet vers {{.address}} le {{.date}}.{{ end }}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
@import "tailwindcss";
|
@import "tailwindcss";
|
||||||
|
|
||||||
@theme {
|
@theme {
|
||||||
--color-co-blue: #243887;
|
--color-co-blue: #00727e;
|
||||||
--color-co-lightblue: #907eff;
|
--color-co-lightblue: #907eff;
|
||||||
--color-co-red: #ff1300;
|
--color-co-red: #de1581;
|
||||||
--color-co-green: #6cc11f;
|
--color-co-green: #6cc11f;
|
||||||
--color-co-yellow: #ffdd00;
|
--color-co-yellow: #ffdd00;
|
||||||
--color-co-orange: #ff5300;
|
--color-co-orange: #ff5300;
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
{{ define "beneficiary_autocomplete" }}
|
|
||||||
<div x-model="{
|
|
||||||
input: '',
|
|
||||||
}">
|
|
||||||
<input type="text"
|
|
||||||
class="p-2 mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"
|
|
||||||
x-model="input">
|
|
||||||
|
|
||||||
<ul x-show="responselength > 0"
|
|
||||||
class="absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-xl py-1 text-base overflow-auto focus:outline-none sm:text-sm" tabindex="-1" role="listbox" aria-labelledby="listbox-label" aria-activedescendant="listbox-option-3">
|
|
||||||
<template x-for="item in autocomplete">
|
|
||||||
<a href="#">
|
|
||||||
<li class="text-gray-900 hover:bg-gray-200 cursor-default select-none relative py-2 pl-3 pr-9"
|
|
||||||
@click="select(item)">
|
|
||||||
<span class="font-normal block truncate" x-text="item.properties.label" ></span>
|
|
||||||
</li>
|
|
||||||
</a>
|
|
||||||
</template>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
@@ -89,28 +89,6 @@
|
|||||||
<p class="text-gray-500">Trouver des solutions et organiser les déplacements de ses bénéficiaires.</p>
|
<p class="text-gray-500">Trouver des solutions et organiser les déplacements de ses bénéficiaires.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-start">
|
|
||||||
<div class="flex items-center h-5">
|
|
||||||
<input id="solidarity_transport" name="modules.solidarity_transport" type="checkbox"
|
|
||||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
|
||||||
</div>
|
|
||||||
<div class="ml-3 text-sm">
|
|
||||||
<label for="modules.vehicles" class="font-medium text-gray-700">Transport solidaire</label>
|
|
||||||
<p class="text-gray-500">Organiser le transport solidaire ou transport d'utilité sociale avec des conducteurs solidaires.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-start">
|
|
||||||
<div class="flex items-center h-5">
|
|
||||||
<input id="organized_carpool" name="modules.organized_carpool" type="checkbox"
|
|
||||||
class="focus:ring-co-blue h-4 w-4 text-co-blue border-gray-300 rounded">
|
|
||||||
</div>
|
|
||||||
<div class="ml-3 text-sm">
|
|
||||||
<label for="modules.vehicles" class="font-medium text-gray-700">Covoiturage solidaire</label>
|
|
||||||
<p class="text-gray-500">Organiser le covoiturage solidaire, mettez en relation covoitureurs solidaires avec vos bénéficiaires.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-start">
|
<div class="flex items-start">
|
||||||
<div class="flex items-center h-5">
|
<div class="flex items-center h-5">
|
||||||
<input id="vehicles" name="modules.vehicles" type="checkbox"
|
<input id="vehicles" name="modules.vehicles" type="checkbox"
|
||||||
@@ -183,4 +161,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<html class="h-full bg-gray-50">
|
<html class="h-full bg-gray-50">
|
||||||
<head>
|
<head>
|
||||||
<title>PARCOURSMOB - Identification</title>
|
<title>PARCOURSMOB - Identification</title>
|
||||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
<link rel="stylesheet" href="/public/css/main.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="h-full">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html class="h-full bg-gray-50">
|
<html class="h-full bg-gray-50">
|
||||||
<head>
|
<head>
|
||||||
<title>PARCOURSMOB - Identification</title>
|
<title>PARCOURSMOB - Identification</title>
|
||||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
<link rel="stylesheet" href="/public/css/main.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="h-full">
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html class="h-full bg-gray-50">
|
<html class="h-full bg-gray-50">
|
||||||
<head>
|
<head>
|
||||||
<title>PARCOURSMOB - Identification</title>
|
<title>PARCOURSMOB - Identification</title>
|
||||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
<link rel="stylesheet" href="/public/css/main.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="h-full">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html class="h-full bg-gray-50">
|
<html class="h-full bg-gray-50">
|
||||||
<head>
|
<head>
|
||||||
<title>PARCOURSMOB - Identification</title>
|
<title>PARCOURSMOB - Identification</title>
|
||||||
<link rel="stylesheet" href="http://localhost:9000/public/css/main.css" />
|
<link rel="stylesheet" href="/public/css/main.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="h-full">
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<html class="h-full bg-gray-50">
|
<html class="h-full bg-gray-50">
|
||||||
<head>
|
<head>
|
||||||
<title>PARCOURSMOB - Identification</title>
|
<title>PARCOURSMOB - Identification</title>
|
||||||
<link rel="stylesheet" href="/public/css/main.css" />
|
<link rel="stylesheet" href="/public/css/main.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="h-full">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ x-data="{
|
|||||||
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
||||||
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
||||||
<a href="/app/beneficiaries/{{$.ViewState.beneficiary.ID}}/documents/{{.FileName}}" target="_blank">
|
<a href="/app/beneficiaries/{{$.ViewState.beneficiary.ID}}/documents/{{.FileName}}" target="_blank">
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Télécharger<span class="sr-only"> le document</span></button>
|
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Voir<span class="sr-only"> le document</span></button>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
{{define "beneficiary_organized_carpool"}}
|
|
||||||
<div class="py-6">
|
|
||||||
{{if .ViewState.organized_carpool_stats}}
|
|
||||||
<div class="py-5 text-center">
|
|
||||||
<p class="text-lg">Trajets réalisés : {{ .ViewState.organized_carpool_stats.count }}</p>
|
|
||||||
<p class="text-lg">Kilomètres réalisés : {{ .ViewState.organized_carpool_stats.km}} km</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="text-center py-5">
|
|
||||||
<a href="/app/journeys/?passengerid={{.ViewState.beneficiary.ID}}" class="inline-flex">
|
|
||||||
<button type="button" class="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">Chercher un trajet</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{if .ViewState.organized_carpool_bookings}}
|
|
||||||
<div class="py-5">
|
|
||||||
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des covoiturages solidaires</h4>
|
|
||||||
<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">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">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">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">Arrivée</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"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{range .ViewState.organized_carpool_bookings}}
|
|
||||||
{{if or (eq .Status.String "CONFIRMED") (eq .Status.String "WAITING_DRIVER_CONFIRMATION")}}
|
|
||||||
<tr>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04"}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Driver}}
|
|
||||||
<a class="text-co-blue" href="/app/organized-carpool/drivers/{{.Driver.Id}}">
|
|
||||||
{{ (index $.ViewState.organized_carpool_drivers_map .Driver.Id).Data.first_name }}
|
|
||||||
{{ (index $.ViewState.organized_carpool_drivers_map .Driver.Id).Data.last_name }}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{.PassengerPickupAddress}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{.PassengerDropAddress}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if eq .Status.String "CONFIRMED"}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Confirmé</span>
|
|
||||||
{{else if eq .Status.String "WAITING_DRIVER_CONFIRMATION"}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-gray-300 rounded-2xl">Attente confirmation</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}}
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="py-5">
|
|
||||||
<p class="text-sm text-gray-500 text-center">Aucun covoiturage solidaire enregistré</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,75 +1,7 @@
|
|||||||
{{define "beneficiary_solidarity_transport"}}
|
{{define "beneficiary_solidarity_transport"}}
|
||||||
<div class="py-6">
|
<div class="px-4 py-6 sm:px-6 text-center">
|
||||||
{{if .ViewState.solidarity_transport_stats}}
|
<p class="text-center text-lg">Trajets réalisés : {{ .ViewState.solidarity_transport_stats.count }}</p>
|
||||||
<div class="py-5 text-center">
|
<p class="text-center text-lg">Kilomètres réalisés : {{ .ViewState.solidarity_transport_stats.km}} km</p>
|
||||||
<p class="text-lg">Trajets réalisés : {{ .ViewState.solidarity_transport_stats.count }}</p>
|
|
||||||
<p class="text-lg">Kilomètres réalisés : {{ .ViewState.solidarity_transport_stats.km}} km</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="text-center py-5">
|
|
||||||
<a href="/app/journeys/?passengerid={{.ViewState.beneficiary.ID}}" class="inline-flex">
|
|
||||||
<button type="button" class="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">Chercher un trajet</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{if .ViewState.solidarity_transport_bookings}}
|
|
||||||
<div class="py-5">
|
|
||||||
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des transports solidaires</h4>
|
|
||||||
<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">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">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">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">Arrivée</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"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{range .ViewState.solidarity_transport_bookings}}
|
|
||||||
{{if or (eq .Status "VALIDATED") (eq .Status "WAITING_CONFIRMATION")}}
|
|
||||||
<tr>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Journey}}
|
|
||||||
{{timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04"}}
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .DriverId}}
|
|
||||||
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{.DriverId}}">
|
|
||||||
{{ (index $.ViewState.solidarity_transport_drivers_map .DriverId).Data.first_name }}
|
|
||||||
{{ (index $.ViewState.solidarity_transport_drivers_map .DriverId).Data.last_name }}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Journey}}{{if .Journey.PassengerPickup}}{{.Journey.PassengerPickup.Properties.label}}{{end}}{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Journey}}{{if .Journey.PassengerDrop}}{{.Journey.PassengerDrop.Properties.label}}{{end}}{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if eq .Status "VALIDATED"}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Validé</span>
|
|
||||||
{{else if eq .Status "WAITING_CONFIRMATION"}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-gray-300 rounded-2xl">Attente confirmation</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}}
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="py-5">
|
|
||||||
<p class="text-sm text-gray-500 text-center">Aucun transport solidaire enregistré</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
{{define "beneficiary_wallet"}}
|
{{define "beneficiary_wallet"}}
|
||||||
<div class="py-6"
|
<div class="px-4 py-6 sm:px-6 text-center"
|
||||||
x-data="{
|
x-data="{
|
||||||
walletdialog: false
|
walletdialog: false
|
||||||
}">
|
}">
|
||||||
<div class="py-5 text-center">
|
<div class="px-4 py-5 sm:px-6">
|
||||||
<p class="text-lg">Solde : {{ printf "%.2f" .ViewState.wallet_balance }} €</p>
|
<p class="text-center text-lg">Solde : {{if .ViewState.beneficiary.Data.wallet}}{{ .ViewState.beneficiary.Data.wallet }}{{else}}0{{end}} €</p>
|
||||||
<button @click="walletdialog = !walletdialog"
|
<button @click="walletdialog = !walletdialog"
|
||||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||||
Créditer le compte
|
Créditer le compte
|
||||||
</button>
|
</button>
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<div class="fixed inset-0 z-10 overflow-y-auto">
|
<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="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-lg sm:p-6">
|
<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>
|
||||||
<div class="mt-3 text-center sm:mt-5">
|
<div class="mt-3 text-center sm:mt-5">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Créditer le compte</h3>
|
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Créditer le compte</h3>
|
||||||
@@ -25,33 +25,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form method="POST" action="/app/wallets/{{.ViewState.beneficiary.ID}}/credit" class="my-4">
|
<form method="POST" action="/app/wallets/{{.ViewState.beneficiary.ID}}/credit" class="my-4">
|
||||||
<div class="space-y-4">
|
<div class="my-8">
|
||||||
<div>
|
<input type="number" id="amount" name="amount" value="0"
|
||||||
<label for="amount" class="block text-sm font-medium text-gray-700">Montant</label>
|
class="w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-2 p-1 sm:text-sm border-gray-300 rounded-2xl">
|
||||||
<input type="number" step="0.01" id="amount" name="amount" value="0"
|
|
||||||
class="mt-1 w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-3 py-2 sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="payment_method" class="block text-sm font-medium text-gray-700">Moyen de paiement</label>
|
|
||||||
<select id="payment_method" name="payment_method"
|
|
||||||
class="mt-1 w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-3 py-2 sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
<option value="Paiement en espèce (MMS)">Paiement en espèce (MMS)</option>
|
|
||||||
<option value="Virement bancaire">Virement bancaire</option>
|
|
||||||
<option value="Autre">Autre</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="description" class="block text-sm font-medium text-gray-700">Description</label>
|
|
||||||
<textarea id="description" name="description" rows="3" placeholder="Description de l'opération..."
|
|
||||||
class="mt-1 w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-3 py-2 sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mt-5 sm:mt-6">
|
||||||
<div class="mt-6 flex flex-col space-y-3">
|
|
||||||
<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>
|
<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>
|
||||||
<button @click="walletdialog=false" type="button" class="inline-flex w-full justify-center 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>
|
||||||
|
<div class="mt-5 sm:mt-6">
|
||||||
|
<button @click="walletdialog=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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,72 +42,5 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Wallet Operations History -->
|
|
||||||
{{if .ViewState.beneficiary.Data.wallet_history}}
|
|
||||||
<div class="py-5">
|
|
||||||
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des opérations</h4>
|
|
||||||
<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">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">Crédit</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ébit</th>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Moyen de paiement</th>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
<!-- Initial Balance Row -->
|
|
||||||
<tr class="bg-gray-50">
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm text-gray-500 italic sm:pl-6">
|
|
||||||
Solde initial
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
|
||||||
{{if .ViewState.beneficiary.Data.wallet}}{{ printf "%.2f" .ViewState.beneficiary.Data.wallet }} €{{else}}0.00 €{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{range $index, $operation := .ViewState.beneficiary.Data.wallet_history}}
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if $operation.timestamp}}{{timeFormat $operation.timestamp "02/01/2006 15:04"}}{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-green-600 sm:pl-6">
|
|
||||||
{{if $operation.amount}}
|
|
||||||
{{if or (eq $operation.operation_type "credit") (not $operation.operation_type)}}
|
|
||||||
{{ printf "%.2f" $operation.amount }} €
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-red-600 sm:pl-6">
|
|
||||||
{{if eq $operation.operation_type "debit"}}
|
|
||||||
{{ printf "%.2f" $operation.amount }} €
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{$operation.payment_method}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{$operation.description}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="py-5">
|
|
||||||
<p class="text-sm text-gray-500 text-center">Aucune opération enregistrée</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -111,12 +111,6 @@
|
|||||||
x-model="fields.file_number" @blur="validateField('file_number')"
|
x-model="fields.file_number" @blur="validateField('file_number')"
|
||||||
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ $fieldName := "address" }}
|
|
||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName }}
|
|
||||||
|
|
||||||
<!-- will dolater : tags, groups, ... -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,34 +125,74 @@
|
|||||||
<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">
|
||||||
|
|
||||||
{{range .ViewState.profile_optional_fields}}
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
{{if eq .type "select"}}
|
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
<select id="{{.name}}" name="{{.name}}"
|
<select id="gender" name="gender" autocomplete="gender" x-model="gender"
|
||||||
{{if eq .name "gender"}}x-model="gender"{{else}}x-model="other_properties.{{.name}}"{{end}}
|
|
||||||
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">
|
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">
|
||||||
{{range .options}}
|
<option value="0">Inconnu</option>
|
||||||
<option value="{{.value}}">{{.label}}</option>
|
<option value="1">Masculin</option>
|
||||||
{{end}}
|
<option value="2">Féminin</option>
|
||||||
|
<option value="9">Sans objet</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .type "textarea"}}
|
</div>
|
||||||
<textarea id="{{.name}}" name="{{.name}}" rows="3" x-model="other_properties.{{.name}}"
|
<div class="col-span-6 sm:col-span-3">
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
<label for="situation" class="block text-sm font-medium text-gray-700">Situation sociale</label>
|
||||||
{{else if eq .type "date"}}
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
<input type="date" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.situation"
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
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">
|
||||||
{{else if eq .type "number"}}
|
<option value="">Inconnu</option>
|
||||||
<input type="number" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
<option value="BRSA">BRSA</option>
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
<option value="Demandeur d'emploi">Demandeur d'emploi</option>
|
||||||
{{else}}
|
<option value="Chantier">Chantier d'insertion</option>
|
||||||
<input type="text" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
<option value="Jeune -25">Jeune -25</option>
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
</select>
|
||||||
{{end}}
|
</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>
|
||||||
|
{{if moduleAvailable "solidarity_transport"}}
|
||||||
|
<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="previous_solidarity_transport" class="block text-sm font-medium text-gray-700">Nombre de transports solidaires précédents</label>
|
||||||
|
<input type="number" name="previous solidarity_transport" id="previous_solidarity_transport" placeholder="0"
|
||||||
|
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.previous_solidarity_transport">
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
<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">
|
<!-- <div class="col-span-3 sm:col-span-3">
|
||||||
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
||||||
@@ -178,6 +212,22 @@
|
|||||||
</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 bénéficiaire, 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 }}
|
||||||
|
|
||||||
|
<!-- will dolater : tags, groups, ... -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<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>
|
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section aria-labelledby="functionalities-title" x-data="{
|
<section aria-labelledby="functionalities-title" x-data="{
|
||||||
tab: '{{ if .ViewState.tab }}{{ .ViewState.tab }}{{ else }}documents{{ end }}',
|
tab: 'documents',
|
||||||
to(event) {
|
to(event) {
|
||||||
this.tab = event.target.value
|
this.tab = event.target.value
|
||||||
}
|
}
|
||||||
@@ -189,12 +189,6 @@
|
|||||||
Transport solidaire </a>
|
Transport solidaire </a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if moduleAvailable "organized_carpool"}}
|
|
||||||
<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>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<a href="#" @click="tab = 'organizations'"
|
<a href="#" @click="tab = 'organizations'"
|
||||||
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"
|
||||||
@@ -214,8 +208,8 @@
|
|||||||
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
<div x-show="tab == 'notes'">{{template "beneficiary_notes" .}}</div>
|
||||||
<div x-show="tab == 'wallet'">{{template "beneficiary_wallet" .}}</div>
|
<div x-show="tab == 'wallet'">{{template "beneficiary_wallet" .}}</div>
|
||||||
{{if moduleAvailable "solidarity_transport"}}<div x-show="tab == 'solidarity_transport'">{{template "beneficiary_solidarity_transport" .}}</div>{{end}}
|
{{if moduleAvailable "solidarity_transport"}}<div x-show="tab == 'solidarity_transport'">{{template "beneficiary_solidarity_transport" .}}</div>{{end}}
|
||||||
{{if moduleAvailable "organized_carpool"}}<div x-show="tab == 'organized_carpool'">{{template "beneficiary_organized_carpool" .}}</div>{{end}}
|
|
||||||
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
<div x-show="tab == 'organizations'">{{template "beneficiary_organizations" .}}</div>
|
||||||
|
<!--<div x-show="tab == 'diags'">{{template "beneficiary_diags" .}}</div>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -7,15 +7,15 @@
|
|||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
||||||
x-data="{
|
x-data="{
|
||||||
fields: {
|
fields: {
|
||||||
first_name: '{{ .ViewState.beneficiary.Data.first_name }}',
|
first_name: '{{ .ViewState.Data.first_name }}',
|
||||||
last_name: '{{ .ViewState.beneficiary.Data.last_name }}',
|
last_name: '{{ .ViewState.Data.last_name }}',
|
||||||
email: '{{ .ViewState.beneficiary.Data.email }}',
|
email: '{{ .ViewState.Data.email }}',
|
||||||
phone_number: '{{ .ViewState.beneficiary.Data.phone_number }}',
|
phone_number: '{{ .ViewState.Data.phone_number }}',
|
||||||
birthdate: {{if .ViewState.beneficiary.Data.birthdate}}'{{ (timeFrom .ViewState.beneficiary.Data.birthdate).Format "2006-01-02" }}'{{else}}null{{end}},
|
birthdate: {{if .ViewState.Data.birthdate}}'{{ (timeFrom .ViewState.Data.birthdate).Format "2006-01-02" }}'{{else}}null{{end}},
|
||||||
file_number: '{{ .ViewState.beneficiary.Data.file_number }}',
|
file_number: '{{ .ViewState.Data.file_number }}',
|
||||||
gender: {{.ViewState.beneficiary.Data.gender}}
|
gender: {{.ViewState.Data.gender}}
|
||||||
},
|
},
|
||||||
other_properties: {{if .ViewState.beneficiary.Data.other_properties}}{{ json .ViewState.beneficiary.Data.other_properties }}{{else}}{}{{end}},
|
other_properties: {{if .ViewState.Data.other_properties}}{{ json .ViewState.Data.other_properties }}{{else}}{}{{end}},
|
||||||
other_properties_serialized: null,
|
other_properties_serialized: null,
|
||||||
rules: {
|
rules: {
|
||||||
first_name: ['required'],
|
first_name: ['required'],
|
||||||
@@ -113,14 +113,6 @@
|
|||||||
x-model="fields.file_number" @blur="validateField('file_number')"
|
x-model="fields.file_number" @blur="validateField('file_number')"
|
||||||
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
:class="formValidation.fields.file_number.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ $fieldName := "address" }}
|
|
||||||
{{if .ViewState.beneficiary.Data.address}}
|
|
||||||
{{$default := .ViewState.beneficiary.Data.address}}
|
|
||||||
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
|
||||||
{{else}}
|
|
||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,42 +127,118 @@
|
|||||||
</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">
|
||||||
{{range .ViewState.profile_optional_fields}}
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
{{if eq .type "select"}}
|
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
<select id="{{.name}}" name="{{.name}}"
|
<select id="gender" name="gender" autocomplete="gender" x-model="fields.gender"
|
||||||
{{if eq .name "gender"}}x-model="fields.gender"{{else}}x-model="other_properties.{{.name}}"{{end}}
|
class="max-w-lg mt-1 block focus:ring-co-blue focus:border-co-blue w-3xs-full shadow-sm sm:max-w-xs sm:text-sm border-gray-300 rounded-2xl">
|
||||||
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>
|
||||||
{{range .options}}
|
<option value="1" :selected="fields.gender == '1'">Masculin</option>
|
||||||
<option value="{{.value}}">{{.label}}</option>
|
<option value="2" :selected="fields.gender == '2'">Féminin</option>
|
||||||
{{end}}
|
<option value="9" :selected="fields.gender == '9'">Sans objet</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .type "textarea"}}
|
</div>
|
||||||
<textarea id="{{.name}}" name="{{.name}}" rows="3" x-model="other_properties.{{.name}}"
|
<div class="col-span-6 sm:col-span-3">
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
<label for="situation" class="block text-sm font-medium text-gray-700">Situation sociale</label>
|
||||||
{{else if eq .type "date"}}
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
<input type="date" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
<select id="situation" name="situation" autocomplete="situation" x-model="other_properties.situation"
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
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">
|
||||||
{{else if eq .type "number"}}
|
<option value="">Inconnu</option>
|
||||||
<input type="number" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
<option value="BRSA">BRSA</option>
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
<option value="Demandeur d'emploi">Demandeur d'emploi</option>
|
||||||
{{else}}
|
<option value="Chantier">Chantier</option>
|
||||||
<input type="text" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
<option value="Jeune -25">Jeune -25</option>
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
</select>
|
||||||
{{end}}
|
</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="subscription_reason" name="subscription_reason" autocomplete="subscription_reason" 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>
|
||||||
|
{{if moduleAvailable "solidarity_transport"}}
|
||||||
|
<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="previous_solidarity_transport" class="block text-sm font-medium text-gray-700">Nombre de transports solidaires précédents</label>
|
||||||
|
<input type="text" name="previous solidarity_transport" id="previous_solidarity_transport" placeholder="0"
|
||||||
|
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.previous_solidarity_transport">
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
<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>
|
||||||
|
<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>
|
</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 bénéficiaire, 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" }}
|
||||||
|
{{if .ViewState.Data.address}}
|
||||||
|
{{$default := .ViewState.Data.address}}
|
||||||
|
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
||||||
|
{{else}}
|
||||||
|
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
||||||
|
{{end}}
|
||||||
|
<!-- will dolater : tags, groups, ... -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<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>
|
<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/{{.ViewState.beneficiary.ID}}">
|
<a href="/app/beneficiaries/{{.ViewState.ID}}">
|
||||||
<button type="button"
|
<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>
|
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>
|
</a>
|
||||||
|
|||||||
@@ -7,7 +7,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 not .Deleted}}
|
{{if or (eq .Data.Deleted nil) (eq .Data.Deleted false)}}
|
||||||
<li class="py-2 px-4 flex">
|
<li class="py-2 px-4 flex">
|
||||||
<a href="/app/vehicles-management/bookings/{{.ID}}" class="flex w-full">
|
<a href="/app/vehicles-management/bookings/{{.ID}}" class="flex w-full">
|
||||||
<div class="ml-3">
|
<div class="ml-3">
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
<div class="px-4 pt-4 flex text-sm text-grey-900 font-bold">
|
<div class="px-4 pt-4 flex text-sm text-grey-900 font-bold">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
{{.IconSet.Icon "tabler-icons:bus" "h-6 w-6 inline-flex mr-4"}}
|
{{.IconSet.Icon "tabler-icons:bus" "h-6 w-6 inline-flex mr-4"}}
|
||||||
{{ timeFormat $itinerary.StartTime "15:04" }} - {{ timeFormat $itinerary.EndTime "15:04" }}
|
{{$itinerary.StartTime.Format "15:04"}} - {{$itinerary.EndTime.Format "15:04"}}
|
||||||
({{shortDuration $itinerary.Duration}})
|
({{divideInt $itinerary.Duration 60}} Minutes)
|
||||||
</div>
|
</div>
|
||||||
<div></div>
|
<div></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
{{define "journeys_local_solutions"}}
|
|
||||||
<!--KNOWLEDGE BASE-->
|
|
||||||
<div class="p-10">
|
|
||||||
{{ range .ViewState.kb_data }}
|
|
||||||
<div class="m-4">
|
|
||||||
<h2 class="text-sm font-bold">{{.title}}</h2>
|
|
||||||
<p class="text-sm">{{.description}}</p>
|
|
||||||
<p class="text-sm text-co-blue"><a href="{{.url}}" target="_blank">Voir plus ...</a></p>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -5,12 +5,13 @@
|
|||||||
<p class="p-12 text-gray-500 text-center text-md">Aucun covoitureur solidaire disponible pour ce trajet.</p>
|
<p class="p-12 text-gray-500 text-center text-md">Aucun covoitureur solidaire disponible pour ce trajet.</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
||||||
|
<h3 class="p-4 text-lg">Covoitureurs solidaires</h3>
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
Covoitureurs solidaires
|
Covoitureurs disponibles
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
@@ -22,11 +23,7 @@
|
|||||||
</th>
|
</th>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
Date et heure
|
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">
|
|
||||||
Profil validé
|
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
@@ -41,21 +38,10 @@
|
|||||||
<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="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">{{ .DriverDepartureAddress }}</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverArrivalAddress }}</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">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{ if .PassengerPickupDate }}
|
<a class="text-co-blue hover:text-co-blue"
|
||||||
{{ .PassengerPickupDate.AsTime.Format "02/01/2006 15:04" }}
|
href="/app/organized-carpool/drivers/{{$driver.ID}}/journeys/{{.Id}}?{{unescapeHTML $.ViewState.querystring}}">
|
||||||
{{ end }}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if carpoolDriverValidatedProfile $driver (carpoolDocuments $driver.ID) }}
|
|
||||||
<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"
|
|
||||||
href="/app/organized-carpool/drivers/{{$driver.ID}}/journeys/{{.Id}}?passengerid={{$.ViewState.passengerid}}">
|
|
||||||
Organiser
|
Organiser
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
{{define "journeys_others"}}
|
{{define "journeys_others"}}
|
||||||
<!--KNOWLEDGE BASE-->
|
|
||||||
<div class="p-10">
|
|
||||||
{{ range .ViewState.kb_data }}
|
|
||||||
<div class="m-4">
|
|
||||||
<h2 class="text-sm font-bold">{{.title}}</h2>
|
|
||||||
<p class="text-sm">{{.description}}</p>
|
|
||||||
<p class="text-sm text-co-blue"><a href="{{.url}}">Voir plus ...</a></p>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
<!--VEHICLES-->
|
<!--VEHICLES-->
|
||||||
{{if moduleAvailable "vehicles"}}
|
{{if moduleAvailable "vehicles"}}
|
||||||
<div class="p-4 flex text-sm text-grey-900">
|
<div class="p-4 flex text-sm text-grey-900">
|
||||||
@@ -25,6 +16,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:pl-0">Véhicule</th>
|
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:pl-0">Véhicule</th>
|
||||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Numéro</th>
|
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Numéro</th>
|
||||||
|
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Gestionnaire</th>
|
||||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Lieu</th>
|
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Lieu</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -33,6 +25,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 md:pl-0">{{.Data.name}}</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 md:pl-0">{{.Data.name}}</td>
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{.Data.licence_plate}}</td>
|
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{.Data.licence_plate}}</td>
|
||||||
|
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">COOPGO</td>
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
{{ range .ViewState.journeys }}
|
{{ range .ViewState.journeys }}
|
||||||
<div class="p-4 pb-8">
|
<div class="p-4 pb-8">
|
||||||
<div class="flex text-md text-grey-900 font-bold">
|
<div class="flex text-md text-grey-900 font-bold">
|
||||||
<div class="flex-1">{{ timeFormat .StartTime "15:04" }} - {{ timeFormat .EndTime "15:04" }}</div>
|
<div class="flex-1">{{ .StartTime.Format "15:04" }} - {{ .EndTime.Format "15:04" }}</div>
|
||||||
<div>{{ shortDuration .Duration }}</div>
|
<div>{{ divideInt .Duration 60 }} Minutes</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flow-root">
|
<div class="flow-root">
|
||||||
<ul role="list" class="-mb-8">
|
<ul role="list" class="-mb-8">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<div>
|
<div>
|
||||||
<p class="text-xs text-gray-500">Attendre <a href="#" class="font-medium text-gray-900">{{ shortDuration .Duration }}</a></p>
|
<p class="text-xs text-gray-500">Attendre <a href="#" class="font-medium text-gray-900">{{ divideInt .Duration 60 }} minutes</a></p>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ml-16 pt-2">
|
<div class="ml-16 pt-2">
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm text-gray-500">Départ <a href="#" class="font-medium text-gray-900">{{timeFormat .StartTime "15:04"}}</a> - Arrivée <a href="#" class="font-medium text-gray-900">{{timeFormat .EndTime "15:04"}}</a></p>
|
<p class="text-sm text-gray-500">Départ <a href="#" class="font-medium text-gray-900">{{.StartTime.Format "15:04"}}</a> - Arrivée <a href="#" class="font-medium text-gray-900">{{.EndTime.Format "15:04"}}</a></p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm text-gray-500">De <a href="#" class="font-medium text-gray-900">{{.From.Name}}</a> Ă <a href="#" class="font-medium text-gray-900">{{.To.Name}}</a></p>
|
<p class="text-sm text-gray-500">De <a href="#" class="font-medium text-gray-900">{{.From.Name}}</a> Ă <a href="#" class="font-medium text-gray-900">{{.To.Name}}</a></p>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ml-16 pt-2">
|
<div class="ml-16 pt-2">
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm text-gray-500">Départ <a href="#" class="font-medium text-gray-900">{{timeFormat .StartTime "15:04"}}</a> - Arrivée <a href="#" class="font-medium text-gray-900">{{timeFormat .EndTime "15:04"}}</a></p>
|
<p class="text-sm text-gray-500">Départ <a href="#" class="font-medium text-gray-900">{{.StartTime.Format "15:04"}}</a> - Arrivée <a href="#" class="font-medium text-gray-900">{{.EndTime.Format "15:04"}}</a></p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p class="text-sm text-gray-500">De <a href="#" class="font-medium text-gray-900">{{.From.Name}}</a> Ă <a href="#" class="font-medium text-gray-900">{{.To.Name}}</a></p>
|
<p class="text-sm text-gray-500">De <a href="#" class="font-medium text-gray-900">{{.From.Name}}</a> Ă <a href="#" class="font-medium text-gray-900">{{.To.Name}}</a></p>
|
||||||
@@ -40,11 +40,11 @@
|
|||||||
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ $driver.Data.first_name }} {{ $driver.Data.last_name }}</td>
|
<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">{{ .DriverDistance }} km</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .DriverDistance }} km</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .PassengerDistance }} km</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{ .PassengerDistance }} km</td>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">{{if $driver.Data.other_properties}}{{ $driver.Data.other_properties.comment }}{{end}}</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">{{if $driver.Data.other_properties}}{{ $driver.Data.other_properties.comment }}{{end}}</td>
|
||||||
<td class="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">
|
||||||
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
||||||
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
||||||
{{else}}
|
{{else}}
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</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">
|
||||||
<a class="text-co-blue hover:text-co-blue"
|
<a class="text-co-blue hover:text-co-blue"
|
||||||
href="/app/solidarity-transport/drivers/{{$driver.ID}}/journeys/{{.Id}}{{if ne $.ViewState.passengerid ""}}?passengerid={{$.ViewState.passengerid}}{{end}}">
|
href="/app/solidarity-transport/drivers/{{$driver.ID}}/journeys/{{.Id}}">
|
||||||
Organiser
|
Organiser
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
{{define "journeys_vehicles"}}
|
|
||||||
<!--VEHICLES-->
|
|
||||||
{{if moduleAvailable "vehicles"}}
|
|
||||||
<div class="p-4 flex text-sm text-grey-900">
|
|
||||||
<div class="flex-1">
|
|
||||||
{{.IconSet.Icon "tabler-icons:car" "h-6 w-6 inline-flex mr-4"}}
|
|
||||||
<span class=" font-bold">{{len .ViewState.vehicles}} véhicules</span> partagés disponibles ce jour là et la semaine suivante
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="p-2">
|
|
||||||
<table class="min-w-full divide-y divide-gray-300">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6 md:pl-0">Véhicule</th>
|
|
||||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Numéro</th>
|
|
||||||
<th scope="col" class="py-3.5 px-3 text-left text-sm font-semibold text-gray-900">Lieu</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200">
|
|
||||||
{{range .ViewState.vehicles}}
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 md:pl-0">{{.Data.name}}</td>
|
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{.Data.licence_plate}}</td>
|
|
||||||
<td class="whitespace-nowrap py-4 px-3 text-sm text-gray-500">{{if .Data.address}}{{.Data.address.properties.label}}{{end}}</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<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>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
{{define "saved_searches"}}
|
|
||||||
<div class="bg-white shadow sm:rounded-2xl sm:overflow-hidden">
|
|
||||||
<h2 class="text-lg font-medium text-gray-900 p-4 sm:px-6">Recherches sauvegardées</h2>
|
|
||||||
<div class="border-t border-gray-200">
|
|
||||||
|
|
||||||
{{if .ViewState.saved_searches}}
|
|
||||||
<div class="overflow-x-auto">
|
|
||||||
<table class="min-w-full divide-y divide-gray-300">
|
|
||||||
<thead class="bg-gray-50">
|
|
||||||
<tr>
|
|
||||||
<th scope="col" class="w-1/6 py-2 px-3 text-left text-sm font-semibold text-gray-900">
|
|
||||||
Bénéficiaire
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="w-1/4 px-3 py-2 text-left text-sm font-semibold text-gray-900">
|
|
||||||
Départ
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="w-1/4 px-3 py-2 text-left text-sm font-semibold text-gray-900">
|
|
||||||
Destination
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="w-1/6 px-3 py-2 text-left text-sm font-semibold text-gray-900">
|
|
||||||
Date/Heure
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="w-1/6 relative py-2 px-3 text-right text-sm font-semibold text-gray-900">
|
|
||||||
<span class="sr-only">Actions</span>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{range .ViewState.saved_searches}}
|
|
||||||
<tr>
|
|
||||||
<td class="py-3 px-3 text-sm text-gray-500">
|
|
||||||
{{if and .Data .Data.passenger_id}}
|
|
||||||
{{$beneficiary := index $.ViewState.beneficiaries .Data.passenger_id}}
|
|
||||||
{{if $beneficiary}}
|
|
||||||
<a href="/app/beneficiaries/{{.Data.passenger_id}}" class="text-co-blue hover:text-co-blue-dark">
|
|
||||||
{{$beneficiary.Data.first_name}} {{$beneficiary.Data.last_name}}
|
|
||||||
</a>
|
|
||||||
{{else}}
|
|
||||||
-
|
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
-
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="px-3 py-3 text-sm text-gray-500 break-words">
|
|
||||||
{{if .Departure}}
|
|
||||||
{{if .Departure.Properties}}
|
|
||||||
{{if .Departure.Properties.city}}
|
|
||||||
{{.Departure.Properties.city}}
|
|
||||||
{{else}}
|
|
||||||
{{.Departure.Properties.label}}
|
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
-
|
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
-
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="px-3 py-3 text-sm text-gray-500 break-words">
|
|
||||||
{{if .Destination}}
|
|
||||||
{{if .Destination.Properties}}
|
|
||||||
{{if .Destination.Properties.city}}
|
|
||||||
{{.Destination.Properties.city}}
|
|
||||||
{{else}}
|
|
||||||
{{.Destination.Properties.label}}
|
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
-
|
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
-
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="px-3 py-3 text-sm text-gray-500 whitespace-nowrap">
|
|
||||||
{{if .DateTime}}
|
|
||||||
{{timeFormat .DateTime "02/01/2006 15:04"}}
|
|
||||||
{{else}}
|
|
||||||
-
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="relative py-3 px-3 text-right text-sm font-medium whitespace-nowrap">
|
|
||||||
<a href="/app/journeys/?departure={{json .Departure}}&destination={{json .Destination}}&departuredate={{timeFormat .DateTime "2006-01-02"}}&departuretime={{timeFormat .DateTime "15:04"}}{{if and .Data .Data.passenger_id}}&passengerid={{.Data.passenger_id}}{{end}}" class="text-co-blue hover:text-co-blue-dark mr-4">
|
|
||||||
Rechercher
|
|
||||||
</a>
|
|
||||||
<a href="/app/journeys/saved-searches/{{.ID}}/delete"
|
|
||||||
class="text-red-600 hover:text-red-900"
|
|
||||||
onclick="return confirm('Êtes-vous sûr de vouloir supprimer cette recherche sauvegardée ?')">
|
|
||||||
Supprimer
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="text-center py-8">
|
|
||||||
<div class="text-gray-500">
|
|
||||||
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
||||||
</svg>
|
|
||||||
<h3 class="mt-2 text-sm font-medium text-gray-900">Aucune recherche sauvegardée</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Effectuez une recherche et cliquez sur "Enregistrer pour plus tard" pour commencer.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -21,30 +21,7 @@
|
|||||||
<div class="bg-white shadow sm:rounded-2xl">
|
<div class="bg-white shadow sm:rounded-2xl">
|
||||||
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Chercher une solution</h2>
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900 p-4 sm:px-6">Chercher une solution</h2>
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
||||||
<form method="GET" x-data="journeySearch()">
|
<form method="GET">
|
||||||
|
|
||||||
<div class="py-4">
|
|
||||||
<label for="beneficiary" class="block text-sm font-medium text-gray-700">Bénéficiaire (optionnel)</label>
|
|
||||||
<div class="mt-1 relative" x-data="beneficiaryAutocomplete()">
|
|
||||||
<input type="text"
|
|
||||||
x-model="input"
|
|
||||||
@input="onInput()"
|
|
||||||
@focus="showResults = true"
|
|
||||||
@blur="setTimeout(() => showResults = false, 200)"
|
|
||||||
class="p-2 shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
|
|
||||||
<ul x-show="showResults && filteredBeneficiaries.length > 0"
|
|
||||||
class="absolute z-10 mt-1 w-full bg-white shadow-lg max-h-60 rounded-xl py-1 text-base overflow-auto focus:outline-none sm:text-sm border border-gray-300"
|
|
||||||
tabindex="-1" role="listbox">
|
|
||||||
<template x-for="beneficiary in filteredBeneficiaries" :key="beneficiary.id">
|
|
||||||
<li class="text-gray-900 hover:bg-gray-200 cursor-default select-none relative py-2 pl-3 pr-9"
|
|
||||||
@click="selectBeneficiary(beneficiary)">
|
|
||||||
<span class="font-normal block truncate" x-text="beneficiary.name"></span>
|
|
||||||
</li>
|
|
||||||
</template>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ $departureField := "departure" }}
|
{{ $departureField := "departure" }}
|
||||||
{{ $departureLabel := "Départ" }}
|
{{ $departureLabel := "Départ" }}
|
||||||
@@ -56,18 +33,17 @@
|
|||||||
{{ $destination := .ViewState.destination }}
|
{{ $destination := .ViewState.destination }}
|
||||||
{{ template "address_autocomplete" dict "FieldName" $destinationField "FieldLabel" $destinationLabel "Address" $destination }}
|
{{ template "address_autocomplete" dict "FieldName" $destinationField "FieldLabel" $destinationLabel "Address" $destination }}
|
||||||
|
|
||||||
<input type="hidden" name="passengerid" value="{{.ViewState.passengerid}}" />
|
|
||||||
|
|
||||||
<div class="py-4 grid grid-cols-2">
|
<div class="py-4 grid grid-cols-2">
|
||||||
<div class="lg:col-span-1">
|
<div class="lg:col-span-1">
|
||||||
<label for="departuredate" class="block text-sm font-medium text-gray-700">Date de départ</label>
|
<label for="departuredate" class="block text-sm font-medium text-gray-700">Le</label>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<input type="date" id="departuredate" name="departuredate" value="{{.ViewState.departuredate}}"
|
<input type="date" id="departuredate" name="departuredate" value="{{.ViewState.departuredate}}"
|
||||||
class="p-2 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">
|
class="p-2 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>
|
</div>
|
||||||
<div class="lg:col-span-1">
|
<div class="lg:col-span-1">
|
||||||
<label for="departuretime" class="block text-sm font-medium text-gray-700">Heure de départ</label>
|
<label for="departuretime" class="block text-sm font-medium text-gray-700">A</label>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<input type="time" id="departuretime" name="departuretime" value="{{.ViewState.departuretime}}"
|
<input type="time" id="departuretime" name="departuretime" value="{{.ViewState.departuretime}}"
|
||||||
class="p-2 shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
|
class="p-2 shadow-sm focus:ring-co-blue focus:border-co-blue block w-full sm:text-sm border-gray-300 rounded-r-2xl border-l-0">
|
||||||
@@ -76,100 +52,11 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-2 mt-8">
|
<button type="submit"
|
||||||
<button type="submit"
|
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
||||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
Chercher
|
||||||
Chercher
|
</button>
|
||||||
</button>
|
|
||||||
{{if .ViewState.searched}}
|
|
||||||
<a href="/app/journeys/save?departure={{json .ViewState.departure}}&destination={{ json .ViewState.destination }}&departuredate={{.ViewState.departuredate}}&departuretime={{.ViewState.departuretime}}&passengerid={{.ViewState.passengerid}}"
|
|
||||||
class="rounded-2xl border border-gray-300 bg-white px-4 py-2 my-4 text-sm 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:w-auto inline-flex items-center">
|
|
||||||
Enregistrer pour plus tard
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<script>
|
|
||||||
function journeySearch() {
|
|
||||||
return {
|
|
||||||
selectedBeneficiaryId: '{{.ViewState.passengerid}}',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function beneficiaryAutocomplete() {
|
|
||||||
const beneficiaries = [
|
|
||||||
{{range .ViewState.beneficiaries_list}}
|
|
||||||
{
|
|
||||||
id: '{{.ID}}',
|
|
||||||
name: '{{.Data.first_name}} {{.Data.last_name}}',
|
|
||||||
address: {{json .Data.address}}
|
|
||||||
},
|
|
||||||
{{end}}
|
|
||||||
];
|
|
||||||
|
|
||||||
return {
|
|
||||||
input: '',
|
|
||||||
showResults: false,
|
|
||||||
filteredBeneficiaries: [],
|
|
||||||
selectedBeneficiary: null,
|
|
||||||
|
|
||||||
init() {
|
|
||||||
// Set initial value if passengerid is set
|
|
||||||
const currentPassengerId = '{{.ViewState.passengerid}}';
|
|
||||||
if (currentPassengerId) {
|
|
||||||
const beneficiary = beneficiaries.find(b => b.id === currentPassengerId);
|
|
||||||
if (beneficiary) {
|
|
||||||
this.input = beneficiary.name;
|
|
||||||
this.selectedBeneficiary = beneficiary;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
onInput() {
|
|
||||||
if (this.input.length === 0) {
|
|
||||||
this.filteredBeneficiaries = [];
|
|
||||||
this.selectedBeneficiary = null;
|
|
||||||
this.updatePassengerId('');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.filteredBeneficiaries = beneficiaries.filter(beneficiary =>
|
|
||||||
beneficiary.name.toLowerCase().includes(this.input.toLowerCase())
|
|
||||||
).slice(0, 10); // Limit to 10 results
|
|
||||||
},
|
|
||||||
|
|
||||||
selectBeneficiary(beneficiary) {
|
|
||||||
this.input = beneficiary.name;
|
|
||||||
this.selectedBeneficiary = beneficiary;
|
|
||||||
this.showResults = false;
|
|
||||||
this.updatePassengerId(beneficiary.id);
|
|
||||||
this.setDepartureAddress(beneficiary.address);
|
|
||||||
},
|
|
||||||
|
|
||||||
updatePassengerId(id) {
|
|
||||||
const passengerInput = document.querySelector('input[name="passengerid"]');
|
|
||||||
if (passengerInput) {
|
|
||||||
passengerInput.value = id;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setDepartureAddress(address) {
|
|
||||||
if (address) {
|
|
||||||
// Find the departure address autocomplete container
|
|
||||||
const departureContainer = document.querySelector('input[name="departure"]').closest('[x-data]');
|
|
||||||
if (departureContainer && departureContainer._x_dataStack && departureContainer._x_dataStack[0]) {
|
|
||||||
const addressAutocomplete = departureContainer._x_dataStack[0];
|
|
||||||
// Update the address autocomplete component directly
|
|
||||||
addressAutocomplete.address = JSON.stringify(address);
|
|
||||||
addressAutocomplete.addressObject = address;
|
|
||||||
addressAutocomplete.input = address.properties.label;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -188,25 +75,52 @@
|
|||||||
<label for="tabs" class="sr-only">Select a tab</label>
|
<label for="tabs" class="sr-only">Select a tab</label>
|
||||||
<select id="tabs" name="tabs" @change="to"
|
<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">
|
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">
|
||||||
{{range .ViewState.journey_tabs}}
|
<option value="all">Tous modes</option>
|
||||||
{{if or .enabled (and .module (moduleAvailable .module))}}
|
|
||||||
<option value="{{.name}}">{{.title}}</option>
|
<option value="carpool">Covoiturage</option>
|
||||||
{{end}}
|
|
||||||
{{end}}
|
<option value="public-transit">Transports</option>
|
||||||
|
|
||||||
|
<option value="solidarity-transport">Transport solidaire</option> -->
|
||||||
|
|
||||||
|
<option value="others">Autres</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
<div class="border-b border-gray-200 pl-4 overflow-x-auto">
|
<div class="border-b border-gray-200 pl-4">
|
||||||
<nav class="-mb-px flex space-x-8 min-w-max" aria-label="Tabs">
|
<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" -->
|
<!-- Current: "border-indigo-500 text-indigo-600", Default: "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300" -->
|
||||||
{{range .ViewState.journey_tabs}}
|
<a href="#" @click="tab = 'all'"
|
||||||
{{if or .enabled (and .module (moduleAvailable .module))}}
|
|
||||||
<a href="#" @click="tab = '{{.name}}'"
|
|
||||||
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 == '{{.name}}' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'all' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
{{.title}} </a>
|
Tous modes </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'carpool'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
:class="tab == 'carpool' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
Covoiturage </a>
|
||||||
|
|
||||||
|
<a href="#" @click="tab = 'public-transit'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
: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>
|
||||||
|
|
||||||
|
{{ if moduleAvailable "solidarity_transport"}}
|
||||||
|
<a href="#" @click="tab = 'solidarity-transport'"
|
||||||
|
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
||||||
|
: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>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if moduleAvailable "organized_carpool"}}
|
||||||
|
<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>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
<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'">
|
||||||
|
Autres </a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,14 +131,10 @@
|
|||||||
<div x-show="tab == 'public-transit'">{{template "journeys_public_transit" .}}</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 == 'organized-carpool'">{{template "journeys_organized_carpool" .}}</div>
|
||||||
<div x-show="tab == 'solidarity-transport'">{{template "journeys_solidarity_transport" .}}</div>
|
<div x-show="tab == 'solidarity-transport'">{{template "journeys_solidarity_transport" .}}</div>
|
||||||
<div x-show="tab == 'vehicles'">{{template "journeys_vehicles" .}}</div>
|
|
||||||
<div x-show="tab == 'directory'">{{template "journeys_local_solutions" .}}</div>
|
|
||||||
<div x-show="tab == 'others'">{{template "journeys_others" .}}</div>
|
<div x-show="tab == 'others'">{{template "journeys_others" .}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{else}}
|
|
||||||
{{template "saved_searches" .}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
x-transition:enter="transition ease-in-out duration-300 transform" x-transition:enter-start="-translate-x-full"
|
x-transition:enter="transition ease-in-out duration-300 transform" x-transition:enter-start="-translate-x-full"
|
||||||
x-transition:enter-end="translate-x-0" x-transition:leave="transition ease-in-out duration-300 transform"
|
x-transition:enter-end="translate-x-0" x-transition:leave="transition ease-in-out duration-300 transform"
|
||||||
x-transition:leave-start="translate-x-0" x-transition:leave-end="-translate-x-full">
|
x-transition:leave-start="translate-x-0" x-transition:leave-end="-translate-x-full">
|
||||||
<div class="relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-co-blue">
|
<div class="relative flex-1 flex flex-col max-w-xs w-full pb-4 bg-co-blue">
|
||||||
<div class="absolute top-0 right-0 -mr-12 pt-2" @click="offCanvasMenu = false">
|
<div class="absolute top-0 right-0 -mr-12 pt-2" @click="offCanvasMenu = false">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white">
|
class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white">
|
||||||
@@ -39,7 +39,8 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-shrink-0 flex items-center px-4">
|
<div class="bg-white flex items-center shadow"><img class="h-16 w-auto m-auto" src="/public/images/departement06.png"></div>
|
||||||
|
<div class="flex-shrink-0 flex items-center px-4 pt-5">
|
||||||
<img class="h-8 w-auto" src="/public/images/main_logo.svg" alt="PARCOURSMOB">
|
<img class="h-8 w-auto" src="/public/images/main_logo.svg" alt="PARCOURSMOB">
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
<div class="mt-5 flex-1 h-0 overflow-y-auto">
|
||||||
@@ -58,9 +59,10 @@
|
|||||||
<!-- Static sidebar for desktop -->
|
<!-- Static sidebar for desktop -->
|
||||||
<div class="hidden md:flex md:w-64 md:flex-col md:fixed md:inset-y-0">
|
<div class="hidden md:flex md:w-64 md:flex-col md:fixed md:inset-y-0">
|
||||||
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
||||||
<div class="flex flex-col flex-grow pt-5 bg-co-blue overflow-y-auto">
|
<div class="flex flex-col flex-grow bg-co-blue overflow-y-auto">
|
||||||
<div class="flex items-center flex-shrink-0 px-4">
|
<div class="bg-white flex items-center shadow"><img class="h-16 w-auto m-auto" src="/public/images/departement06.png"></div>
|
||||||
<img class="h-8 w-auto" src="/public/images/parcoursmob_logo_whitered.svg" alt="PARCOURSMOB">
|
<div class="flex items-center flex-shrink-0 px-4 pt-5">
|
||||||
|
<img class="h-8 w-auto m-auto" src="/public/images/main_logo.svg" alt="PARCOURSMOB">
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-5 flex-1 flex flex-col">
|
<div class="mt-5 flex-1 flex flex-col">
|
||||||
{{ template "mainmenu" . }}
|
{{ template "mainmenu" . }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
{{if eq .UserID .ViewState.user.ID}}
|
{{if eq .UserID .ViewState.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 vos informations</h1>
|
<h1 class="text-2xl font-semibold text-gray-900">Modifier vos informations</h1>
|
||||||
@@ -8,11 +8,11 @@
|
|||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8 mt-8"
|
||||||
x-data="{
|
x-data="{
|
||||||
fields: {
|
fields: {
|
||||||
first_name: '{{ .ViewState.user.Data.first_name }}',
|
first_name: '{{ .ViewState.Data.first_name }}',
|
||||||
last_name: '{{ .ViewState.user.Data.last_name }}',
|
last_name: '{{ .ViewState.Data.last_name }}',
|
||||||
email: '{{ .ViewState.user.Data.email }}',
|
email: '{{ .ViewState.Data.email }}',
|
||||||
phone_number: '{{ .ViewState.user.Data.phone_number }}',
|
phone_number: '{{ .ViewState.Data.phone_number }}',
|
||||||
gender: {{.ViewState.user.Data.gender}}
|
gender: {{.ViewState.Data.gender}}
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
first_name: ['required'],
|
first_name: ['required'],
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
<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">
|
<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>
|
<label for="first_name" class="block text-sm font-medium text-gray-700">Prénom</label>
|
||||||
<input type="text" value="{{.ViewState.user.Data.first_name}}" name="first_name" id="first_name" autocomplete="given-name"
|
<input type="text" value="{{.ViewState.Data.first_name}}" 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"
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
@blur="validateField('first_name')"
|
@blur="validateField('first_name')"
|
||||||
:class="formValidation.fields.first_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
:class="formValidation.fields.first_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="last_name" class="block text-sm font-medium text-gray-700">Nom</label>
|
<label for="last_name" class="block text-sm font-medium text-gray-700">Nom</label>
|
||||||
<input type="text" name="last_name" id="last_name" value="{{.ViewState.user.Data.last_name}}" autocomplete="family-name"
|
<input type="text" name="last_name" id="last_name" value="{{.ViewState.Data.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"
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
@blur="validateField('last_name')"
|
@blur="validateField('last_name')"
|
||||||
:class="formValidation.fields.last_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
:class="formValidation.fields.last_name.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
|
<label for="email" class="block text-sm font-medium text-gray-700">Email</label>
|
||||||
<input type="text" name="email" id="email" autocomplete="email" value="{{.ViewState.user.Data.email}}"
|
<input type="text" name="email" id="email" autocomplete="email" value="{{.ViewState.Data.email}}"
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-2xl"
|
||||||
@blur="validateField('email')"
|
@blur="validateField('email')"
|
||||||
:class="formValidation.fields.email.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
:class="formValidation.fields.email.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
||||||
@@ -101,33 +101,19 @@
|
|||||||
</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">
|
||||||
{{range .ViewState.profile_optional_fields}}
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
{{if eq .type "select"}}
|
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
<select id="{{.name}}" name="{{.name}}"
|
<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">
|
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">
|
||||||
{{range .options}}
|
<option value="0">Inconnu</option>
|
||||||
<option value="{{.value}}">{{.label}}</option>
|
<option value="1" :selected="fields.gender == '1'">Masculin</option>
|
||||||
{{end}}
|
<option value="2" :selected="fields.gender == '2'">Féminin</option>
|
||||||
|
<option value="9" :selected="fields.gender == '9'">Sans objet</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .type "textarea"}}
|
|
||||||
<textarea id="{{.name}}" name="{{.name}}" rows="3"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
|
||||||
{{else if eq .type "date"}}
|
|
||||||
<input type="date" id="{{.name}}" name="{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else if eq .type "number"}}
|
|
||||||
<input type="number" id="{{.name}}" name="{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else}}
|
|
||||||
<input type="text" id="{{.name}}" name="{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,7 +121,7 @@
|
|||||||
|
|
||||||
<div class="flex justify-end">
|
<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>
|
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||||
<a href="/app/members/{{.ViewState.user.ID}}">
|
<a href="/app/members/{{.ViewState.ID}}">
|
||||||
<button type="button"
|
<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>
|
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>
|
</a>
|
||||||
@@ -160,7 +146,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center items-center mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense ">
|
<div class="flex justify-center items-center mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense ">
|
||||||
<a href="/app/members/{{.ViewState.user.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>
|
<a href="/app/members/{{.ViewState.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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
{{ define "booking_filters" }}
|
|
||||||
{{$tab := or .tab "carpoolService"}}
|
|
||||||
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<input type="hidden" name="tab" value="{{$tab}}" />
|
|
||||||
|
|
||||||
<div class="flex flex-row justify-end flex-wrap">
|
|
||||||
|
|
||||||
<div class="m-4">
|
|
||||||
<div>
|
|
||||||
<label for="{{$tab}}_date_start" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Dates (début / fin)</label>
|
|
||||||
<div class="mt-2 flex">
|
|
||||||
<input id="{{$tab}}_date_start" type="date" name="date_start" class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-co-blue" value="{{.filters.date_start}}" onchange="this.form.submit()" />
|
|
||||||
<input id="{{$tab}}_date_end" type="date" name="date_end" class="mx-2 block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-co-blue" value="{{.filters.date_end}}" onchange="this.form.submit()" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="m-4">
|
|
||||||
<label for="{{$tab}}_status" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Statut</label>
|
|
||||||
<div class="mt-2 grid grid-cols-1">
|
|
||||||
<select id="{{$tab}}_status" name="status" class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
|
||||||
<option></option>
|
|
||||||
<option value="WAITING_DRIVER_CONFIRMATION"{{if eq .filters.status "WAITING_DRIVER_CONFIRMATION"}} selected{{end}}>Attente confirmation conducteur</option>
|
|
||||||
<option value="CONFIRMED"{{if eq .filters.status "CONFIRMED"}} selected{{end}}>Confirmé</option>
|
|
||||||
<option value="CANCELLED"{{if eq .filters.status "CANCELLED"}} selected{{end}}>Annulé</option>
|
|
||||||
</select>
|
|
||||||
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
|
||||||
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="m-4">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,180 +0,0 @@
|
|||||||
{{ define "organized_carpool_map" }}
|
|
||||||
<div id="map" class="w-full h-full min-h-96"></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": [
|
|
||||||
{
|
|
||||||
"type": "Feature",
|
|
||||||
"geometry": {
|
|
||||||
"type": "Point",
|
|
||||||
"coordinates": [{{ .booking.PassengerPickupLng }}, {{ .booking.PassengerPickupLat }}]
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"label": "{{ .booking.PassengerPickupAddress }}",
|
|
||||||
"type": "pickup"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "Feature",
|
|
||||||
"geometry": {
|
|
||||||
"type": "Point",
|
|
||||||
"coordinates": [{{ .booking.PassengerDropLng }}, {{ .booking.PassengerDropLat }}]
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"label": "{{ .booking.PassengerDropAddress }}",
|
|
||||||
"type": "drop"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
map.on('load', async () => {
|
|
||||||
// Add route polyline if available
|
|
||||||
// Add driver route if available
|
|
||||||
{{if .booking.DriverRoute}}
|
|
||||||
console.log("DriverRoute found");
|
|
||||||
try {
|
|
||||||
const driverRoute = JSON.parse(`{{ .booking.DriverRoute.Serialized }}`);
|
|
||||||
console.log("Parsed driverRoute:", driverRoute);
|
|
||||||
console.log("DriverRoute type:", driverRoute.type);
|
|
||||||
console.log("DriverRoute features:", driverRoute.features);
|
|
||||||
console.log("DriverRoute features count:", driverRoute.features ? driverRoute.features.length : 0);
|
|
||||||
console.log("DriverRoute keys:", Object.keys(driverRoute));
|
|
||||||
if (driverRoute.features && driverRoute.features.length > 0) {
|
|
||||||
console.log("First feature:", driverRoute.features[0]);
|
|
||||||
console.log("LineString features:", driverRoute.features.filter(f => f.geometry && f.geometry.type === 'LineString'));
|
|
||||||
} else {
|
|
||||||
console.log("No features found, checking alternative structure");
|
|
||||||
console.log("All driverRoute properties:", driverRoute);
|
|
||||||
}
|
|
||||||
|
|
||||||
map.addSource('driver_route', {
|
|
||||||
type: "geojson",
|
|
||||||
data: driverRoute
|
|
||||||
});
|
|
||||||
|
|
||||||
map.addLayer({
|
|
||||||
'id': 'driver_route',
|
|
||||||
'type': 'line',
|
|
||||||
'source': 'driver_route',
|
|
||||||
'filter': ['==', ['geometry-type'], 'LineString'], // Only show LineString geometries
|
|
||||||
'layout': {
|
|
||||||
'line-join': 'round',
|
|
||||||
'line-cap': 'round',
|
|
||||||
},
|
|
||||||
'paint': {
|
|
||||||
'line-color': '#243887', // Blue - main application color
|
|
||||||
'line-width': 3
|
|
||||||
},
|
|
||||||
});
|
|
||||||
console.log("Driver route layer added successfully");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error adding driver route:", error);
|
|
||||||
}
|
|
||||||
{{else}}
|
|
||||||
console.log("No DriverRoute available");
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
// Add passenger route if available
|
|
||||||
{{if .booking.PassengerRoute}}
|
|
||||||
console.log("PassengerRoute found");
|
|
||||||
try {
|
|
||||||
const passengerRoute = JSON.parse(`{{ .booking.PassengerRoute.Serialized }}`);
|
|
||||||
console.log("Parsed passengerRoute:", passengerRoute);
|
|
||||||
console.log("PassengerRoute type:", passengerRoute.type);
|
|
||||||
console.log("PassengerRoute features count:", passengerRoute.features ? passengerRoute.features.length : 0);
|
|
||||||
|
|
||||||
map.addSource('passenger_route', {
|
|
||||||
type: "geojson",
|
|
||||||
data: passengerRoute
|
|
||||||
});
|
|
||||||
|
|
||||||
map.addLayer({
|
|
||||||
'id': 'passenger_route',
|
|
||||||
'type': 'line',
|
|
||||||
'source': 'passenger_route',
|
|
||||||
'filter': ['==', ['geometry-type'], 'LineString'], // Only show LineString geometries
|
|
||||||
'layout': {
|
|
||||||
'line-join': 'round',
|
|
||||||
'line-cap': 'round',
|
|
||||||
},
|
|
||||||
'paint': {
|
|
||||||
'line-color': '#243887', // Blue - main application color
|
|
||||||
'line-width': 3
|
|
||||||
},
|
|
||||||
});
|
|
||||||
console.log("Passenger route layer added successfully");
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error adding passenger route:", error);
|
|
||||||
}
|
|
||||||
{{else}}
|
|
||||||
console.log("No PassengerRoute available");
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
map.addSource('carpool_points', {
|
|
||||||
type: "geojson",
|
|
||||||
data: geojsonPoints
|
|
||||||
})
|
|
||||||
|
|
||||||
// Add pickup point
|
|
||||||
map.addLayer({
|
|
||||||
'id': 'pickup_point',
|
|
||||||
'type': 'circle',
|
|
||||||
'source': 'carpool_points',
|
|
||||||
'filter': ['==', ['get', 'type'], 'pickup'],
|
|
||||||
'paint': {
|
|
||||||
'circle-color': '#243887', // Blue - main application color
|
|
||||||
'circle-radius': 8,
|
|
||||||
'circle-stroke-color': '#fff',
|
|
||||||
'circle-stroke-width': 2
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add drop point
|
|
||||||
map.addLayer({
|
|
||||||
'id': 'drop_point',
|
|
||||||
'type': 'circle',
|
|
||||||
'source': 'carpool_points',
|
|
||||||
'filter': ['==', ['get', 'type'], 'drop'],
|
|
||||||
'paint': {
|
|
||||||
'circle-color': '#243887', // Blue - main application color
|
|
||||||
'circle-radius': 8,
|
|
||||||
'circle-stroke-color': '#fff',
|
|
||||||
'circle-stroke-width': 2
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add popup on click
|
|
||||||
map.on('click', 'pickup_point', (e) => {
|
|
||||||
new maplibregl.Popup()
|
|
||||||
.setLngLat(e.lngLat)
|
|
||||||
.setHTML(`<strong>Point de départ</strong><br>${e.features[0].properties.label}`)
|
|
||||||
.addTo(map);
|
|
||||||
});
|
|
||||||
|
|
||||||
map.on('click', 'drop_point', (e) => {
|
|
||||||
new maplibregl.Popup()
|
|
||||||
.setLngLat(e.lngLat)
|
|
||||||
.setHTML(`<strong>Destination</strong><br>${e.features[0].properties.label}`)
|
|
||||||
.addTo(map);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Change cursor on hover
|
|
||||||
map.on('mouseenter', 'pickup_point', () => map.getCanvas().style.cursor = 'pointer');
|
|
||||||
map.on('mouseleave', 'pickup_point', () => map.getCanvas().style.cursor = '');
|
|
||||||
map.on('mouseenter', 'drop_point', () => map.getCanvas().style.cursor = 'pointer');
|
|
||||||
map.on('mouseleave', 'drop_point', () => map.getCanvas().style.cursor = '');
|
|
||||||
|
|
||||||
var bbox = turf.bbox(geojsonPoints)
|
|
||||||
map.fitBounds(bbox, { padding: 50 })
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,173 +0,0 @@
|
|||||||
|
|
||||||
{{ define "carpool_bookings_history" }}
|
|
||||||
{{template "booking_filters" dict "tab" "carpoolHistory" "filters" .ViewState.hist_filters }}
|
|
||||||
{{if eq (len .ViewState.bookings_history) 0}}
|
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
|
|
||||||
{{else}}
|
|
||||||
<div x-data="{
|
|
||||||
bookings: [
|
|
||||||
{{range $index, $booking := .ViewState.bookings_history}}{{if $index}},{{end}}{
|
|
||||||
id: '{{$booking.Id}}',
|
|
||||||
driverId: '{{$booking.Driver.Id}}',
|
|
||||||
driverFirstName: '{{ (index $.ViewState.drivers_map $booking.Driver.Id).Data.first_name }}',
|
|
||||||
driverLastName: '{{ (index $.ViewState.drivers_map $booking.Driver.Id).Data.last_name }}',
|
|
||||||
passengerId: '{{$booking.Passenger.Id}}',
|
|
||||||
passengerFirstName: '{{ (index $.ViewState.passengers_map $booking.Passenger.Id).Data.first_name }}',
|
|
||||||
passengerLastName: '{{ (index $.ViewState.passengers_map $booking.Passenger.Id).Data.last_name }}',
|
|
||||||
pickupAddress: '{{$booking.PassengerPickupAddress}}',
|
|
||||||
dropAddress: '{{$booking.PassengerDropAddress}}',
|
|
||||||
pickupDate: '{{ timeFormat $booking.PassengerPickupDate.AsTime "02/01/2006 15:04" }}',
|
|
||||||
status: '{{$booking.Status.String}}',
|
|
||||||
price: '{{if $booking.Price}}{{ printf "%.2f" (round2 $booking.Price.Amount) }}{{else}}N/A{{end}}',
|
|
||||||
currency: '{{if $booking.Price}}{{$booking.Price.Currency}}{{end}}'
|
|
||||||
}{{end}}
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
|
||||||
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
|
||||||
get totalPages() {
|
|
||||||
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
|
||||||
},
|
|
||||||
get paginatedBookings() {
|
|
||||||
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
||||||
const end = start + this.itemsPerPage;
|
|
||||||
return this.bookings.slice(start, end);
|
|
||||||
},
|
|
||||||
nextPage() {
|
|
||||||
if (this.currentPage < this.totalPages) this.currentPage++;
|
|
||||||
},
|
|
||||||
prevPage() {
|
|
||||||
if (this.currentPage > 1) this.currentPage--;
|
|
||||||
},
|
|
||||||
goToPage(page) {
|
|
||||||
this.currentPage = page;
|
|
||||||
},
|
|
||||||
getStatusBadge(status) {
|
|
||||||
if (status === 'WAITING_DRIVER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
|
||||||
if (status === 'CONFIRMED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Confirmé' };
|
|
||||||
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
|
||||||
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
|
||||||
return { class: '', text: '' };
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
|
|
||||||
<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">
|
|
||||||
Prix
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
<template x-for="booking in paginatedBookings" :key="booking.id">
|
|
||||||
<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/' + booking.driverId">
|
|
||||||
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
|
||||||
</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/' + booking.passengerId">
|
|
||||||
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupAddress"></td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropAddress"></td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
<span x-text="booking.price !== 'N/A' ? booking.price + ' ' + booking.currency : 'N/A'"></span>
|
|
||||||
</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/' + booking.id">Voir</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</template>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!-- Pagination -->
|
|
||||||
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
|
||||||
<div class="flex flex-1 justify-between sm:hidden">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Précédent
|
|
||||||
</button>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Suivant
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-gray-700">
|
|
||||||
Affichage de
|
|
||||||
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
|
||||||
Ă
|
|
||||||
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
|
||||||
sur
|
|
||||||
<span class="font-medium" x-text="bookings.length"></span>
|
|
||||||
résultats
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Précédent</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<template x-for="page in totalPages" :key="page">
|
|
||||||
<button @click="goToPage(page)"
|
|
||||||
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
|
||||||
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
|
||||||
x-text="page"></button>
|
|
||||||
</template>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Suivant</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
@@ -1,56 +1,8 @@
|
|||||||
|
|
||||||
{{ define "carpool_bookings_list" }}
|
{{ define "carpool_bookings_list" }}
|
||||||
{{template "booking_filters" dict "tab" "carpoolService" "filters" .ViewState.filters }}
|
|
||||||
{{if eq (len .ViewState.bookings) 0}}
|
{{if eq (len .ViewState.bookings) 0}}
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div x-data="{
|
|
||||||
bookings: [
|
|
||||||
{{range $index, $booking := .ViewState.bookings}}{{if $index}},{{end}}{
|
|
||||||
id: '{{$booking.Id}}',
|
|
||||||
driverId: '{{$booking.Driver.Id}}',
|
|
||||||
driverFirstName: '{{ (index $.ViewState.drivers_map $booking.Driver.Id).Data.first_name }}',
|
|
||||||
driverLastName: '{{ (index $.ViewState.drivers_map $booking.Driver.Id).Data.last_name }}',
|
|
||||||
passengerId: '{{$booking.Passenger.Id}}',
|
|
||||||
passengerFirstName: '{{ (index $.ViewState.passengers_map $booking.Passenger.Id).Data.first_name }}',
|
|
||||||
passengerLastName: '{{ (index $.ViewState.passengers_map $booking.Passenger.Id).Data.last_name }}',
|
|
||||||
pickupAddress: '{{$booking.PassengerPickupAddress}}',
|
|
||||||
dropAddress: '{{$booking.PassengerDropAddress}}',
|
|
||||||
pickupDate: '{{ timeFormat $booking.PassengerPickupDate.AsTime "02/01/2006 15:04" }}',
|
|
||||||
status: '{{$booking.Status.String}}',
|
|
||||||
price: '{{if $booking.Price}}{{ printf "%.2f" (round2 $booking.Price.Amount) }}{{else}}N/A{{end}}',
|
|
||||||
currency: '{{if $booking.Price}}{{$booking.Price.Currency}}{{end}}'
|
|
||||||
}{{end}}
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
|
||||||
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
|
||||||
get totalPages() {
|
|
||||||
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
|
||||||
},
|
|
||||||
get paginatedBookings() {
|
|
||||||
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
||||||
const end = start + this.itemsPerPage;
|
|
||||||
return this.bookings.slice(start, end);
|
|
||||||
},
|
|
||||||
nextPage() {
|
|
||||||
if (this.currentPage < this.totalPages) this.currentPage++;
|
|
||||||
},
|
|
||||||
prevPage() {
|
|
||||||
if (this.currentPage > 1) this.currentPage--;
|
|
||||||
},
|
|
||||||
goToPage(page) {
|
|
||||||
this.currentPage = page;
|
|
||||||
},
|
|
||||||
getStatusBadge(status) {
|
|
||||||
if (status === 'WAITING_DRIVER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
|
||||||
if (status === 'WAITING_PASSENGER_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation passager' };
|
|
||||||
if (status === 'CONFIRMED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Confirmé' };
|
|
||||||
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
|
||||||
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
|
||||||
return { class: '', text: '' };
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -78,10 +30,6 @@
|
|||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
Statut
|
Statut
|
||||||
</th>
|
</th>
|
||||||
<th scope="col"
|
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
|
||||||
Prix
|
|
||||||
</th>
|
|
||||||
<th scope="col"
|
<th scope="col"
|
||||||
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
|
|
||||||
@@ -89,86 +37,46 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
<template x-for="booking in paginatedBookings" :key="booking.id">
|
{{range .ViewState.bookings}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" :href="'/app/organized-carpool/drivers/' + booking.driverId">
|
<a class="text-co-blue" href="/app/organized-carpool/drivers/{{.DriverId}}">
|
||||||
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
{{ (index $.ViewState.drivers_map .DriverId).Data.first_name }}
|
||||||
</a>
|
{{ (index $.ViewState.drivers_map .DriverId).Data.last_name }}
|
||||||
</td>
|
</a>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
</td>
|
||||||
<a class="text-co-blue" :href="'/app/beneficiaries/' + booking.passengerId">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
|
||||||
</a>
|
{{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }}
|
||||||
</td>
|
{{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }}
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupAddress"></td>
|
</a>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropAddress"></td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></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">
|
{{ .Journey.PassengerPickup.Properties.label }}
|
||||||
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
</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">
|
{{ .Journey.PassengerDrop.Properties.label }}
|
||||||
<span x-text="booking.price !== 'N/A' ? booking.price + ' ' + booking.currency : 'N/A'"></span>
|
</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">
|
{{ .Journey.PassengerPickupDate.Format "02/01/2006 15:04" }}
|
||||||
<a class="text-co-blue" :href="'/app/organized-carpool/bookings/' + booking.id">Voir</a>
|
</td>
|
||||||
</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
</tr>
|
{{ if eq .Status "WAITING_CONFIRMATION"}}
|
||||||
</template>
|
<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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Pagination -->
|
|
||||||
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
|
||||||
<div class="flex flex-1 justify-between sm:hidden">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Précédent
|
|
||||||
</button>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Suivant
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-gray-700">
|
|
||||||
Affichage de
|
|
||||||
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
|
||||||
Ă
|
|
||||||
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
|
||||||
sur
|
|
||||||
<span class="font-medium" x-text="bookings.length"></span>
|
|
||||||
résultats
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Précédent</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<template x-for="page in totalPages" :key="page">
|
|
||||||
<button @click="goToPage(page)"
|
|
||||||
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
|
||||||
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
|
||||||
x-text="page"></button>
|
|
||||||
</template>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Suivant</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,137 +0,0 @@
|
|||||||
{{define "driver_files"}}
|
|
||||||
<div class="px-4 py-6 sm:px-6"
|
|
||||||
x-data="{
|
|
||||||
fields: {
|
|
||||||
name: null,
|
|
||||||
type: null,
|
|
||||||
file: null,
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
name: ['required'],
|
|
||||||
type: ['required'],
|
|
||||||
file: ['required'],
|
|
||||||
},
|
|
||||||
formValidation: {
|
|
||||||
valid: false,
|
|
||||||
fields: {
|
|
||||||
name: {valid: null},
|
|
||||||
type: {valid: null},
|
|
||||||
file: {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
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
{{if eq (len .ViewState.documents) 0}}
|
|
||||||
<p class="p-12 text-gray-500 text-center text-md">Aucun document</p>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
|
|
||||||
{{if gt (len .ViewState.documents) 0}}
|
|
||||||
|
|
||||||
<div class="-mx-4 mb-10 ring-1 ring-gray-300 sm:-mx-6 md:mx-0 md:rounded-lg">
|
|
||||||
<table class="min-w-full divide-y divide-gray-300">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Type</th>
|
|
||||||
<th scope="col" class="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell">Nom du document</th>
|
|
||||||
<th scope="col" class="hidden px-3 py-3.5 text-left text-sm font-semibold text-gray-900 lg:table-cell">Ajouté le</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>
|
|
||||||
{{range .ViewState.documents}}
|
|
||||||
<tr>
|
|
||||||
<td class="relative py-4 pl-4 sm:pl-6 pr-3 text-sm">
|
|
||||||
<div class="font-medium text-gray-900">
|
|
||||||
<span class="bg-co-blue text-xs text-white rounded-xl p-1 mr-2">{{index $.ViewState.file_types_map .Metadata.Type}}</span>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td class="px-3 py-3.5 text-sm text-gray-900 lg:table-cell">{{.Metadata.Name}}</td>
|
|
||||||
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
|
||||||
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
|
||||||
<a href="/app/organized-carpool/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}" target="_blank">
|
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Télécharger<span class="sr-only"> le document</span></button>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
|
|
||||||
<!-- More plans... -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<h3 class="text-lg">Ajouter un document</h3>
|
|
||||||
<form method="POST" action="/app/organized-carpool/drivers/{{.ViewState.driver.ID}}/documents" @submit="submit" enctype="multipart/form-data">
|
|
||||||
<div class="md:grid md:grid-cols-6 p-2">
|
|
||||||
<div class="sm:col-span-2">
|
|
||||||
<label for="type" class="block text-sm font-medium text-gray-700">Type</label>
|
|
||||||
<select id="type" name="type" class="mt-1 block w-full rounded-l-2xl border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
|
|
||||||
x-model="fields.type" @blur="validateField('type')"
|
|
||||||
:class="formValidation.fields.type.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
<option value="" selected>Sélectionner un type</option>
|
|
||||||
{{range .ViewState.drivers_file_types}}
|
|
||||||
<option value="{{.}}">{{index $.ViewState.file_types_map .}}</option>
|
|
||||||
{{end}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="sm:col-span-4">
|
|
||||||
<label for="name" class="block text-sm font-medium text-gray-700">Nom</label>
|
|
||||||
<input type="text" name="name" id="name"
|
|
||||||
placeholder="Nom du fichier"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm rounded-r-2xl p-2"
|
|
||||||
x-model="fields.name" @blur="validateField('name')"
|
|
||||||
:class="formValidation.fields.name.valid == false ? 'border-co-red border-2' : 'border-gray-300'" />
|
|
||||||
</div>
|
|
||||||
<div class="sm:col-span-6 mt-4">
|
|
||||||
<label for="cover-photo" class="block text-sm font-medium text-gray-700">Téléchargement</label>
|
|
||||||
<div class="mt-1 flex justify-center rounded-md border-2 border-dashed px-6 pt-5 pb-6"
|
|
||||||
x-on:drop="console.log('toto')"
|
|
||||||
:class="formValidation.fields.file.valid == false ? 'border-co-red border-2' : 'border-gray-300'">
|
|
||||||
<div class="space-y-1 text-center">
|
|
||||||
{{.IconSet.Icon "hero:outline/folder-plus" "mx-auto h-12 w-12 text-gray-400"}}
|
|
||||||
<div class="flex text-sm text-gray-600">
|
|
||||||
<label for="file-upload" class="relative cursor-pointer rounded-md bg-white font-medium text-co-blue focus-within:outline-none focus-within:ring-2 focus-within:ring-co-blue focus-within:ring-offset-2 hover:text-co-blue">
|
|
||||||
<span>Sélectionnez un fichier </span>
|
|
||||||
<input id="file-upload" name="file-upload" type="file" class="sr-only"
|
|
||||||
x-model="fields.file" @blur="validateField('file')">
|
|
||||||
</label>
|
|
||||||
<!-- <p class="pl-1">ou glissez-déposez</p> -->
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<p class="text-xs text-gray-500">Jusqu'Ă 10MB</p>
|
|
||||||
<template x-if="fields.file">
|
|
||||||
<p class="text-co-blue p-2" x-text="fields.file"></p>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="submit"
|
|
||||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
|
||||||
Ajouter le document
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
{{define "organized_carpool_driver_history"}}
|
|
||||||
<div class="py-6">
|
|
||||||
{{if .ViewState.stats}}
|
|
||||||
<div class="py-5 text-center">
|
|
||||||
<p class="text-lg">Covoiturages réalisés : {{ .ViewState.stats.bookings.confirmed }}</p>
|
|
||||||
<p class="text-lg">Kilomètres parcourus : {{ .ViewState.stats.bookings.km }} km</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if .ViewState.bookings}}
|
|
||||||
<div class="py-5">
|
|
||||||
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des covoiturages</h4>
|
|
||||||
<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">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">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">Arrivée</th>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{range .ViewState.bookings}}
|
|
||||||
{{if eq .Status.String "CONFIRMED"}}
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .PassengerPickupDate}}
|
|
||||||
{{timeFormat .PassengerPickupDate.AsTime "02/01/2006 15:04"}}
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Passenger}}
|
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{.Passenger.Id}}">
|
|
||||||
{{ (index $.ViewState.beneficiaries_map .Passenger.Id).Data.first_name }}
|
|
||||||
{{ (index $.ViewState.beneficiaries_map .Passenger.Id).Data.last_name }}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{.PassengerPickupAddress}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{.PassengerDropAddress}}
|
|
||||||
</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}}
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="py-5">
|
|
||||||
<p class="text-sm text-gray-500 text-center">Aucun covoiturage enregistré</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
{{define "organized_carpool_driver_wallet"}}
|
|
||||||
<div class="py-6"
|
|
||||||
x-data="{
|
|
||||||
walletdialog: false
|
|
||||||
}">
|
|
||||||
<div class="py-5 text-center">
|
|
||||||
<p class="text-lg">Solde : {{ printf "%.2f" .ViewState.wallet_balance }} €</p>
|
|
||||||
<button @click="walletdialog = !walletdialog"
|
|
||||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
|
||||||
Créditer le compte
|
|
||||||
</button>
|
|
||||||
<div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true"
|
|
||||||
x-show="walletdialog">
|
|
||||||
<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">Créditer le compte</h3>
|
|
||||||
<div class="mt-2">
|
|
||||||
<p class="text-sm text-gray-500">Créditer le compte mobilité du conducteur</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form method="POST" action="/app/wallets/{{.ViewState.driver.ID}}/credit" class="my-4">
|
|
||||||
<div class="my-8">
|
|
||||||
<input type="number" step="0.01" id="amount" name="amount" value="0"
|
|
||||||
class="w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-2 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="walletdialog=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>
|
|
||||||
|
|
||||||
<!-- Wallet Operations History -->
|
|
||||||
{{if .ViewState.driver.Data.wallet_history}}
|
|
||||||
<div class="py-5">
|
|
||||||
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des opérations</h4>
|
|
||||||
<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">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">Crédit</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ébit</th>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Moyen de paiement</th>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
<!-- Initial Balance Row -->
|
|
||||||
<tr class="bg-gray-50">
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm text-gray-500 italic sm:pl-6">
|
|
||||||
Solde initial
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
|
||||||
{{if .ViewState.driver.Data.wallet}}{{ printf "%.2f" .ViewState.driver.Data.wallet }} €{{else}}0.00 €{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{range $index, $operation := .ViewState.driver.Data.wallet_history}}
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if $operation.timestamp}}{{timeFormat $operation.timestamp "02/01/2006 15:04"}}{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-green-600 sm:pl-6">
|
|
||||||
{{if $operation.amount}}
|
|
||||||
{{if or (eq $operation.operation_type "credit") (not $operation.operation_type)}}
|
|
||||||
{{ printf "%.2f" $operation.amount }} €
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-red-600 sm:pl-6">
|
|
||||||
{{if eq $operation.operation_type "debit"}}
|
|
||||||
{{ printf "%.2f" $operation.amount }} €
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{$operation.payment_method}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{$operation.description}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="py-5">
|
|
||||||
<p class="text-sm text-gray-500 text-center">Aucune opération enregistrée</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -28,39 +28,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div x-data="{
|
|
||||||
drivers: [
|
|
||||||
{{range $index, $driver := .ViewState.drivers}}{{if $index}},{{end}}{
|
|
||||||
id: '{{$driver.ID}}',
|
|
||||||
firstName: '{{$driver.Data.first_name}}',
|
|
||||||
lastName: '{{$driver.Data.last_name}}',
|
|
||||||
address: '{{if $driver.Data.address}}{{$driver.Data.address.properties.label}}{{end}}',
|
|
||||||
addressDestination: '{{if $driver.Data.address_destination}}{{$driver.Data.address_destination.properties.label}}{{end}}',
|
|
||||||
phoneNumber: '{{$driver.Data.phone_number}}',
|
|
||||||
validated: {{if carpoolDriverValidatedProfile $driver (carpoolDocuments $driver.ID)}}true{{else}}false{{end}}
|
|
||||||
}{{end}}
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
|
||||||
itemsPerPage: {{ if .ViewState.drivers_items_per_page }}{{ .ViewState.drivers_items_per_page }}{{ else }}10{{ end }},
|
|
||||||
get totalPages() {
|
|
||||||
return Math.ceil(this.drivers.length / this.itemsPerPage);
|
|
||||||
},
|
|
||||||
get paginatedDrivers() {
|
|
||||||
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
||||||
const end = start + this.itemsPerPage;
|
|
||||||
return this.drivers.slice(start, end);
|
|
||||||
},
|
|
||||||
nextPage() {
|
|
||||||
if (this.currentPage < this.totalPages) this.currentPage++;
|
|
||||||
},
|
|
||||||
prevPage() {
|
|
||||||
if (this.currentPage > 1) this.currentPage--;
|
|
||||||
},
|
|
||||||
goToPage(page) {
|
|
||||||
this.currentPage = page;
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -91,76 +58,23 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
<template x-for="driver in paginatedDrivers" :key="driver.id">
|
{{ range .ViewState.drivers }}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.firstName + ' ' + driver.lastName"></td>
|
<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" x-text="driver.address"></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" x-text="driver.addressDestination"></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" x-text="driver.phoneNumber"></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">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<span x-show="driver.validated" class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
||||||
<span x-show="!driver.validated" class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
</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">
|
<a class="text-co-blue hover:text-co-blue"
|
||||||
<a class="text-co-blue hover:text-co-blue" :href="'/app/organized-carpool/drivers/' + driver.id">
|
href="/app/organized-carpool/drivers/{{.ID}}">
|
||||||
Voir
|
Voir
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</template>
|
{{ end }}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Pagination -->
|
|
||||||
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
|
||||||
<div class="flex flex-1 justify-between sm:hidden">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Précédent
|
|
||||||
</button>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Suivant
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-gray-700">
|
|
||||||
Affichage de
|
|
||||||
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
|
||||||
Ă
|
|
||||||
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, drivers.length)"></span>
|
|
||||||
sur
|
|
||||||
<span class="font-medium" x-text="drivers.length"></span>
|
|
||||||
résultats
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Précédent</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<template x-for="page in totalPages" :key="page">
|
|
||||||
<button @click="goToPage(page)"
|
|
||||||
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
|
||||||
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
|
||||||
x-text="page"></button>
|
|
||||||
</template>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Suivant</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -12,23 +12,11 @@
|
|||||||
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
<dl class="grid grid-cols-1 gap-x-4 gap-y-8 sm:grid-cols-2">
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Départ passager</dt>
|
<dt class="text-sm font-medium text-gray-500">Départ passager</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
<dd class="mt-1 text-sm text-gray-900">{{(index .journey.Features 0).Properties.MustString "label"}}</dd>
|
||||||
{{ if .journey.ExtraMembers.passenger_pickup }}
|
|
||||||
{{ .journey.ExtraMembers.passenger_pickup.properties.label }}
|
|
||||||
{{ else }}
|
|
||||||
Adresse non disponible
|
|
||||||
{{ end }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Destination passager</dt>
|
<dt class="text-sm font-medium text-gray-500">Destination passager</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
<dd class="mt-1 text-sm text-gray-900">{{(index .journey.Features 1).Properties.MustString "label"}}</dd>
|
||||||
{{ if .journey.ExtraMembers.passenger_drop }}
|
|
||||||
{{ .journey.ExtraMembers.passenger_drop.properties.label }}
|
|
||||||
{{ else }}
|
|
||||||
Adresse non disponible
|
|
||||||
{{ end }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Départ conducteur</dt>
|
<dt class="text-sm font-medium text-gray-500">Départ conducteur</dt>
|
||||||
@@ -37,40 +25,10 @@
|
|||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Destination conducteur</dt>
|
<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>
|
<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">Date et heure</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
|
||||||
{{ if .journey.ExtraMembers.departure_date }}
|
|
||||||
{{ timeFormat .journey.ExtraMembers.departure_date "02/01/2006 15:04" }}
|
|
||||||
{{ else }}
|
|
||||||
Non définie
|
|
||||||
{{ end }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
<dd class="mt-1 text-sm text-gray-900">0 EUR</dd>
|
||||||
{{if .pricing_result}}
|
|
||||||
{{ printf "%.2f" (round2 .pricing_result.passenger.Amount) }} {{.pricing_result.passenger.Currency}}
|
|
||||||
{{else}}
|
|
||||||
0.00 EUR
|
|
||||||
{{end}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{if and .pricing_result .pricing_result.driver (gt (round2 .pricing_result.driver.Amount) 0.0)}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Indemnité conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ printf "%.2f" (round2 .pricing_result.driver.Amount) }} {{.pricing_result.driver.Currency}}</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Distance passager</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ printf "%.2f" .journey.ExtraMembers.passenger_distance }} km</dd>
|
|
||||||
</div>
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Distance conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ printf "%.2f" .journey.ExtraMembers.driver_distance }} km</dd>
|
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
@@ -179,16 +137,6 @@
|
|||||||
<dd class="mt-1 text-sm text-gray-900">{{.driver.Data.file_number}}</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{.driver.Data.file_number}}</dd>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Profil validé</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
|
||||||
{{if carpoolDriverValidatedProfile .driver (carpoolDocuments .driver.ID) }}
|
|
||||||
<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}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -309,19 +257,9 @@
|
|||||||
<dd class="mt-1 text-sm text-gray-900">{{.passenger.Data.file_number}}</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{.passenger.Data.file_number}}</dd>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Profil validé</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
|
||||||
{{if carpoolDriverValidatedProfile .passenger (carpoolDocuments .passenger.ID) }}
|
|
||||||
<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}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Compte mobilié (solde)</dt>
|
<dt class="text-sm font-medium text-gray-500">Compte mobilié (solde)</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ printf "%.2f" (round2 .passenger_wallet_balance) }} EUR</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{if .passenger.Data.wallet}}{{ .passenger.Data.wallet }}{{else}}0{{end}} EUR</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,194 +0,0 @@
|
|||||||
{{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>
|
|
||||||
|
|
||||||
{{ if eq .ViewState.booking.Status.String "WAITING_DRIVER_CONFIRMATION"}}
|
|
||||||
<div class="mt-4"><span class="p-2 text-sm bg-gray-300 rounded-2xl px-4">Attente confirmation</span></div>
|
|
||||||
{{ else if eq .ViewState.booking.Status.String "CONFIRMED"}}
|
|
||||||
<div class="mt-4"><span class="p-1 text-sm bg-co-green rounded-2xl px-4">Confirmé</span></div>
|
|
||||||
{{ else if eq .ViewState.booking.Status.String "CANCELLED"}}
|
|
||||||
<div class="mt-4"><span class="p-1 text-sm bg-co-red text-white rounded-2xl px-4">Annulé</span></div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="mt-6 flex justify-end space-x-3">
|
|
||||||
{{if eq .ViewState.booking.Status.String "WAITING_DRIVER_CONFIRMATION" }}
|
|
||||||
<a href="/app/organized-carpool/bookings/{{.ViewState.booking.Id}}/confirm" class="inline-flex">
|
|
||||||
<button type="button" class="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">
|
|
||||||
Confirmer
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if ne .ViewState.booking.Status.String "WAITING_DRIVER_CONFIRMATION" }}
|
|
||||||
<a href="/app/organized-carpool/bookings/{{.ViewState.booking.Id}}/waitconfirmation" class="inline-flex">
|
|
||||||
<button type="button" class="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">
|
|
||||||
Remettre en attente
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if ne .ViewState.booking.Status.String "CANCELLED" }}
|
|
||||||
{{$dialog := "cancel"}}
|
|
||||||
<div x-data="{ {{ $dialog }}: false}">
|
|
||||||
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-co-red 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">
|
|
||||||
Annuler
|
|
||||||
</button>
|
|
||||||
<div x-show="{{$dialog}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
|
||||||
<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">
|
|
||||||
<form method="POST" action="/app/organized-carpool/bookings/{{.ViewState.booking.Id}}/cancel">
|
|
||||||
<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">Annuler</h3>
|
|
||||||
<div class="mt-2">
|
|
||||||
<p class="text-sm text-gray-500">Êtes-vous sûr de vouloir annuler ce covoiturage ?</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
|
||||||
<button @click="{{$dialog}} = !{{$dialog}}" type="button" 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</button>
|
|
||||||
<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">Confirmer</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<a href='/app/journeys/?departure={"type":"Feature","geometry":{"type":"Point","coordinates":[{{.ViewState.booking.PassengerPickupLng}},{{.ViewState.booking.PassengerPickupLat}}]},"properties":{"label":"{{.ViewState.booking.PassengerPickupAddress}}"}}&destination={"type":"Feature","geometry":{"type":"Point","coordinates":[{{.ViewState.booking.PassengerDropLng}},{{.ViewState.booking.PassengerDropLat}}]},"properties":{"label":"{{.ViewState.booking.PassengerDropAddress}}"}}&passengerid={{.ViewState.passenger.ID}}' class="inline-flex">
|
|
||||||
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
|
||||||
Dupliquer
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{{if eq .ViewState.booking.Status.String "CANCELLED" }}
|
|
||||||
<a href='/app/journeys/?departure={"type":"Feature","geometry":{"type":"Point","coordinates":[{{.ViewState.booking.PassengerPickupLng}},{{.ViewState.booking.PassengerPickupLat}}]},"properties":{"label":"{{.ViewState.booking.PassengerPickupAddress}}"}}&destination={"type":"Feature","geometry":{"type":"Point","coordinates":[{{.ViewState.booking.PassengerDropLng}},{{.ViewState.booking.PassengerDropLat}}]},"properties":{"label":"{{.ViewState.booking.PassengerDropAddress}}"}}&departuredate={{ timeFormat .ViewState.booking.PassengerPickupDate.AsTime "2006-01-02"}}&departuretime={{ timeFormat .ViewState.booking.PassengerPickupDate.AsTime "15:04"}}&passengerid={{.ViewState.passenger.ID}}&organized_carpool_exclude_driver={{.ViewState.driver.ID}}' class="inline-flex">
|
|
||||||
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
|
||||||
Solliciter un autre conducteur
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
|
|
||||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
|
||||||
<!-- Booking Details -->
|
|
||||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
|
|
||||||
<div class="px-4 py-5 sm:px-6">
|
|
||||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Détails du covoiturage</h3>
|
|
||||||
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations sur le trajet</p>
|
|
||||||
</div>
|
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:p-0">
|
|
||||||
<dl class="sm:divide-y sm:divide-gray-200">
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
<a class="text-co-blue" href="/app/organized-carpool/drivers/{{ .ViewState.driver.ID }}">{{ .ViewState.driver.Data.first_name }} {{ .ViewState.driver.Data.last_name }}</a>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Passager</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{ .ViewState.passenger.ID }}">{{ .ViewState.passenger.Data.first_name }} {{ .ViewState.passenger.Data.last_name }}</a>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Départ conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.driverDepartureAddress }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Prise en charge passager</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.PassengerPickupAddress }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Dépose passager</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.PassengerDropAddress }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Arrivée conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ if .ViewState.driverArrivalAddress }}
|
|
||||||
{{ .ViewState.driverArrivalAddress }}
|
|
||||||
{{ end }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Date et heure</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ timeFormat .ViewState.booking.PassengerPickupDate.AsTime "02/01/2006 15:04" }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{if .ViewState.booking.Distance}}
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Distance</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.Distance }} km
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ if .ViewState.booking.Price }}
|
|
||||||
{{ if eq .ViewState.booking.Price.Type.String "FREE" }}
|
|
||||||
<span class="text-co-green font-medium">Gratuit</span>
|
|
||||||
{{ else if eq .ViewState.booking.Price.Type.String "PAYING" }}
|
|
||||||
<span class="font-medium">{{ printf "%.2f" (round2 .ViewState.booking.Price.Amount) }} {{ .ViewState.booking.Price.Currency }}</span>
|
|
||||||
{{ else }}
|
|
||||||
<span class="text-gray-500">Prix non défini</span>
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
<span class="text-gray-500">Prix non disponible</span>
|
|
||||||
{{ end }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{if and .ViewState.booking.DriverCompensationAmount .ViewState.booking.DriverCompensationCurrency}}
|
|
||||||
{{if gt (round2 .ViewState.booking.DriverCompensationAmount) 0.0}}
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Indemnité conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
<span class="font-medium">{{ printf "%.2f" (round2 .ViewState.booking.DriverCompensationAmount) }} {{ .ViewState.booking.DriverCompensationCurrency }}</span>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if .ViewState.booking.Motivation}}
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Motif</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{.ViewState.booking.Motivation}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Map -->
|
|
||||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
|
|
||||||
<div class="border-t border-gray-200 h-full">
|
|
||||||
<div class="h-full min-h-96">
|
|
||||||
{{ template "organized_carpool_map" .ViewState }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ end }}
|
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
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">Désarchiver</button></a>{{end}}
|
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">Désarchiver</button></a>{{end}}
|
||||||
<!-- <button type="button"
|
<!-- <button type="button"
|
||||||
class="inline-flex items-center justify-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-2xl text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Supprimer</button> -->
|
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/organized-carpool/drivers/{{.ViewState.driver.ID}}/update" class="inline-flex"><button type="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>
|
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>
|
||||||
|
|
||||||
@@ -44,16 +44,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
<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">
|
<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">Profil validé</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
|
||||||
{{if carpoolDriverValidatedProfile .ViewState.driver .ViewState.documents}}
|
|
||||||
<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}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{if .ViewState.driver.Data.email}}
|
{{if .ViewState.driver.Data.email}}
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
<dt class="text-sm font-medium text-gray-500">Email</dt>
|
||||||
@@ -97,7 +87,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section aria-labelledby="functionalities-title" x-data="{
|
<section aria-labelledby="functionalities-title" x-data="{
|
||||||
tab: '{{ if .ViewState.tab }}{{ .ViewState.tab }}{{ else }}documents{{ end }}',
|
tab: 'documents',
|
||||||
to(event) {
|
to(event) {
|
||||||
this.tab = event.target.value
|
this.tab = event.target.value
|
||||||
}
|
}
|
||||||
@@ -118,10 +108,6 @@
|
|||||||
<option value="events">Dispositifs</option> -->
|
<option value="events">Dispositifs</option> -->
|
||||||
|
|
||||||
<option value="documents">Documents</option>
|
<option value="documents">Documents</option>
|
||||||
|
|
||||||
<option value="wallet">Compte mobilité</option>
|
|
||||||
|
|
||||||
<option value="history">Covoiturage solidaire</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
@@ -138,24 +124,12 @@
|
|||||||
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Documents </a>
|
Documents </a>
|
||||||
|
|
||||||
<a href="#" @click="tab = 'wallet'"
|
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
||||||
:class="tab == 'wallet' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
||||||
Compte mobilité </a>
|
|
||||||
|
|
||||||
<a href="#" @click="tab = 'history'"
|
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
||||||
:class="tab == 'history' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
||||||
Covoiturage solidaire </a>
|
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="tab == 'documents'">{{template "driver_files" .}}</div>
|
<div x-show="tab == 'documents'">{{template "driver_files" .}}</div>
|
||||||
<div x-show="tab == 'wallet'">{{template "organized_carpool_driver_wallet" .}}</div>
|
|
||||||
<div x-show="tab == 'history'">{{template "organized_carpool_driver_history" .}}</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,174 +0,0 @@
|
|||||||
{{ define "content" }}
|
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 md:px-8">
|
|
||||||
<h1 class="text-2xl font-semibold text-gray-900">Modifier le 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: '{{.ViewState.driver.Data.first_name}}',
|
|
||||||
last_name: '{{.ViewState.driver.Data.last_name}}',
|
|
||||||
email: '{{.ViewState.driver.Data.email}}' ,
|
|
||||||
phone_number: '{{.ViewState.driver.Data.phone_number}}',
|
|
||||||
birthdate: {{if .ViewState.driver.Data.birthdate}}'{{ (timeFrom .ViewState.driver.Data.birthdate).Format "2006-01-02" }}'{{else}}null{{end}},
|
|
||||||
},
|
|
||||||
other_properties: {{if .ViewState.driver.Data.other_properties}}{{ json .ViewState.driver.Data.other_properties }}{{else}}{}{{end}},
|
|
||||||
other_properties_serialized: '{{ json .ViewState.driver.Data.other_properties }}',
|
|
||||||
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.other_properties_serialized = JSON.stringify(this.other_properties)
|
|
||||||
this.validate()
|
|
||||||
if(!this.formValidation.valid) {
|
|
||||||
this.isFormValid = false
|
|
||||||
event.preventDefault()
|
|
||||||
}
|
|
||||||
return this.formValidation.valid
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
<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">
|
|
||||||
<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 covoitureur solidaire</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" }}
|
|
||||||
{{if .ViewState.driver.Data.address}}
|
|
||||||
{{$default := .ViewState.driver.Data.address}}
|
|
||||||
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
|
||||||
{{else}}
|
|
||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{ $fieldName := "address_destination" }}
|
|
||||||
{{if .ViewState.driver.Data.address_destination}}
|
|
||||||
{{$default := .ViewState.driver.Data.address_destination}}
|
|
||||||
{{ template "address" dict "FieldName" $fieldName "Default" $default "Label" "Adresse destination"}}
|
|
||||||
{{else}}
|
|
||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName "Label" "Adresse destination"}}
|
|
||||||
{{end}}
|
|
||||||
</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="other_properties.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-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>
|
|
||||||
</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/drivers/{{.ViewState.driver.ID}}">
|
|
||||||
<button type="button"
|
|
||||||
class="bg-white py-2 px-4 border border-gray-300 rounded-2xl shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Annuler</button>
|
|
||||||
</a>
|
|
||||||
<button type="submit"
|
|
||||||
class="ml-3 inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-2xl text-white bg-co-blue hover:bg-co-blue focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-co-blue">Modifier le covoitureur solidaire</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -3,32 +3,13 @@
|
|||||||
<h1 class="text-2xl font-semibold text-gray-900">Organiser le covoiturage</h1>
|
<h1 class="text-2xl font-semibold text-gray-900">Organiser le covoiturage</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
|
<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 "passenger_wallet_balance" .ViewState.passenger_wallet_balance "pricing_result" .ViewState.pricing_result)}}
|
{{template "journey_preview" (dict "journey" .ViewState.journey "driver" .ViewState.driver "passenger" .ViewState.passenger "beneficiaries" .ViewState.beneficiaries)}}
|
||||||
{{if ne .ViewState.passenger.ID ""}}
|
{{if ne .ViewState.passenger.ID ""}}
|
||||||
<div class="max-w-7xl m-auto px-4 sm:px-6 md:px-8 flex flex-col justify-items-center">
|
<div class="max-w-7xl m-auto px-4 sm:px-6 md:px-8 flex justify-items-center">
|
||||||
{{if .ViewState.passenger}}
|
|
||||||
{{if lt .ViewState.passenger_wallet_balance .ViewState.pricing_result.passenger.Amount}}
|
|
||||||
<p class="text-xl text-co-red text-center p-4">Le solde du compte mobilité est insuffisant.</p>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<div class="m-auto text-center">
|
<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">
|
||||||
<label for="motivation" class="block text-sm font-medium text-gray-700">Motif du trajet</label>
|
Envoyer la mise en relation
|
||||||
<select name="motivation" id="motivation"
|
</button>
|
||||||
class="p-2 mt-1 mb-4 focus:ring-co-blue focus:border-co-blue block shadow-sm sm:text-sm rounded-2xl bg-white m-auto">
|
|
||||||
{{range .ViewState.booking_motivations}}
|
|
||||||
<option value="{{.value}}"{{if eq .value ""}} selected="selected"{{end}}>{{.label}}</option>
|
|
||||||
{{end}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{{template "submit_with_sms"
|
|
||||||
dict "IconSet" .IconSet
|
|
||||||
"Viewstate" .ViewState
|
|
||||||
"ComponentState" (dict "submitText" "Envoyer la demande de covoiturage"
|
|
||||||
"doNotSendOption" true)
|
|
||||||
"SMSState" (dict "name" (.ViewState.config.GetString "service_name")
|
|
||||||
"datetime" (or (timeFormat .ViewState.journey.ExtraMembers.departure_date "02/01/2006") "À définir")
|
|
||||||
"baseUrl" (.ViewState.config.GetString "base_url") )}}
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{$defaultTab := "carpoolService"}}
|
|
||||||
<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">Covoiturage solidaire</h1>
|
<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="{
|
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden my-4" x-data="{
|
||||||
tab: '{{or .ViewState.tab $defaultTab}}',
|
tab: 'drivers',
|
||||||
to(event) {
|
to(event) {
|
||||||
this.tab = event.target.value
|
this.tab = event.target.value
|
||||||
}
|
}
|
||||||
@@ -13,31 +13,31 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
<div class="border-b border-gray-200 pl-4">
|
<div class="border-b border-gray-200 pl-4">
|
||||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||||
<a href="#" @click="tab = 'carpoolService'"
|
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
||||||
:class="tab == 'carpoolService' ? '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 = 'drivers'"
|
<a href="#" @click="tab = 'drivers'"
|
||||||
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 == 'drivers' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
: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>
|
Covoitureurs solidaires </a>
|
||||||
|
|
||||||
<a href="#" @click="tab = 'carpoolHistory'"
|
<!--<a href="#" @click="tab = 'beneficiaries'"
|
||||||
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 == 'carpoolHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'beneficiaries' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Trajets passés </a>
|
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>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="tab == 'carpoolService'">{{template "carpool_bookings_list" .}}</div>
|
|
||||||
|
|
||||||
<div x-show="tab == 'drivers'">{{template "carpool_drivers_list" .}}</div>
|
<div x-show="tab == 'drivers'">{{template "carpool_drivers_list" .}}</div>
|
||||||
|
|
||||||
<div x-show="tab == 'carpoolHistory'">{{template "carpool_bookings_history" .}}</div>
|
|
||||||
|
<div x-show="tab == 'beneficiaries'">1</div>
|
||||||
|
<div x-show="tab == 'trips'">{{template "carpool_bookings_list" .}}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
{{ define "booking_filters" }}
|
|
||||||
{{$tab := or .tab "solidarityTransport"}}
|
|
||||||
|
|
||||||
<form>
|
|
||||||
|
|
||||||
<input type="hidden" name="tab" value="{{$tab}}" />
|
|
||||||
|
|
||||||
<div class="flex flex-row justify-end flex-wrap">
|
|
||||||
|
|
||||||
<div class="m-4">
|
|
||||||
<div>
|
|
||||||
<label for="{{$tab}}_date_start" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Dates (début / fin)</label>
|
|
||||||
<div class="mt-2 flex">
|
|
||||||
<input id="{{$tab}}_date_start" type="date" name="date_start" class="block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-co-blue" value="{{.filters.date_start}}" onchange="this.form.submit()" />
|
|
||||||
<input id="{{$tab}}_date_end" type="date" name="date_end" class="mx-2 block w-full rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-co-blue" value="{{.filters.date_end}}" onchange="this.form.submit()" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="m-4">
|
|
||||||
<label for="{{$tab}}_status" class="block text-sm/6 font-medium text-gray-900 dark:text-white">Statut</label>
|
|
||||||
<div class="mt-2 grid grid-cols-1">
|
|
||||||
<select id="{{$tab}}_status" name="status" class="col-start-1 row-start-1 w-full appearance-none rounded-md bg-white py-1.5 pr-8 pl-3 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:*:bg-gray-800 dark:focus-visible:outline-co-blue" onchange="this.form.submit()">
|
|
||||||
<option></option>
|
|
||||||
<option value="VALIDATED"{{if eq .filters.status "VALIDATED"}} selected{{end}}>Validé</option>
|
|
||||||
<option value="CANCELLED"{{if eq .filters.status "CANCELLED"}} selected{{end}}>Annulé</option>
|
|
||||||
<option value="WAITING_CONFIRMATION"{{if eq .filters.status "WAITING_CONFIRMATION"}} selected{{end}}>Attente confirmation</option>
|
|
||||||
</select>
|
|
||||||
<svg viewBox="0 0 16 16" fill="currentColor" data-slot="icon" aria-hidden="true" class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4 dark:text-gray-400">
|
|
||||||
<path d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" fill-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="m-4">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
{{ end }}
|
|
||||||
@@ -1,148 +1,82 @@
|
|||||||
|
|
||||||
{{ define "solidarity_bookings_history" }}
|
{{ define "solidarity_bookings_history" }}
|
||||||
{{template "booking_filters" dict "tab" "solidarityHistory" "filters" .ViewState.hist_filters }}
|
|
||||||
{{if eq (len .ViewState.bookings_history) 0}}
|
{{if eq (len .ViewState.bookings_history) 0}}
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
|
<div class="m-10 text-center text-gray-600">Aucun trajet dans le passé</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div x-data="{
|
|
||||||
bookings: [
|
|
||||||
{{range $index, $booking := .ViewState.bookings_history}}{{if $index}},{{end}}{
|
|
||||||
id: '{{$booking.Id}}',
|
|
||||||
driverId: '{{$booking.DriverId}}',
|
|
||||||
driverFirstName: '{{ (index $.ViewState.drivers_map $booking.DriverId).Data.first_name }}',
|
|
||||||
driverLastName: '{{ (index $.ViewState.drivers_map $booking.DriverId).Data.last_name }}',
|
|
||||||
passengerId: '{{$booking.PassengerId}}',
|
|
||||||
passengerFirstName: '{{ (index $.ViewState.passengers_map $booking.PassengerId).Data.first_name }}',
|
|
||||||
passengerLastName: '{{ (index $.ViewState.passengers_map $booking.PassengerId).Data.last_name }}',
|
|
||||||
pickupLabel: '{{$booking.Journey.PassengerPickup.Properties.label}}',
|
|
||||||
dropLabel: '{{$booking.Journey.PassengerDrop.Properties.label}}',
|
|
||||||
pickupDate: '{{ $booking.Journey.PassengerPickupDate.Format "02/01/2006 15:04" }}',
|
|
||||||
status: '{{$booking.Status}}',
|
|
||||||
price: '{{ printf "%.2f" (round2 $booking.Journey.Price.Amount) }}',
|
|
||||||
currency: '{{$booking.Journey.Price.Currency}}'
|
|
||||||
}{{end}}
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
|
||||||
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
|
||||||
get totalPages() {
|
|
||||||
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
|
||||||
},
|
|
||||||
get paginatedBookings() {
|
|
||||||
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
||||||
const end = start + this.itemsPerPage;
|
|
||||||
return this.bookings.slice(start, end);
|
|
||||||
},
|
|
||||||
nextPage() {
|
|
||||||
if (this.currentPage < this.totalPages) this.currentPage++;
|
|
||||||
},
|
|
||||||
prevPage() {
|
|
||||||
if (this.currentPage > 1) this.currentPage--;
|
|
||||||
},
|
|
||||||
goToPage(page) {
|
|
||||||
this.currentPage = page;
|
|
||||||
},
|
|
||||||
getStatusBadge(status) {
|
|
||||||
if (status === 'WAITING_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
|
||||||
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
|
||||||
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
|
||||||
return { class: '', text: '' };
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<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"
|
||||||
<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>
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
<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>
|
Conducteur
|
||||||
<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>
|
||||||
<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"
|
||||||
<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>
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Prix</th>
|
Passager
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"> </th>
|
</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">
|
||||||
|
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
<template x-for="booking in paginatedBookings" :key="booking.id">
|
{{range .ViewState.bookings_history}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" :href="'/app/solidarity-transport/drivers/' + booking.driverId">
|
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{.DriverId}}">
|
||||||
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
{{ (index $.ViewState.drivers_map .DriverId).Data.first_name }}
|
||||||
</a>
|
{{ (index $.ViewState.drivers_map .DriverId).Data.last_name }}
|
||||||
</td>
|
</a>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
</td>
|
||||||
<a class="text-co-blue" :href="'/app/beneficiaries/' + booking.passengerId">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
|
||||||
</a>
|
{{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }}
|
||||||
</td>
|
{{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }}
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupLabel"></td>
|
</a>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropLabel"></td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></td>
|
<td class="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">
|
{{ .Journey.PassengerPickup.Properties.label }}
|
||||||
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
</td>
|
||||||
</td>
|
<td class="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">
|
{{ .Journey.PassengerDrop.Properties.label }}
|
||||||
<span x-text="booking.price + ' ' + booking.currency"></span>
|
</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">
|
{{ .Journey.PassengerPickupDate.Format "02/01/2006 15:04" }}
|
||||||
<a class="text-co-blue" :href="'/app/solidarity-transport/bookings/' + booking.id">Voir</a>
|
</td>
|
||||||
</td>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
</tr>
|
{{ if eq .Status "WAITING_CONFIRMATION"}}
|
||||||
</template>
|
<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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Pagination -->
|
|
||||||
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
|
||||||
<div class="flex flex-1 justify-between sm:hidden">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Précédent
|
|
||||||
</button>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Suivant
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-gray-700">
|
|
||||||
Affichage de
|
|
||||||
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
|
||||||
Ă
|
|
||||||
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
|
||||||
sur
|
|
||||||
<span class="font-medium" x-text="bookings.length"></span>
|
|
||||||
résultats
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Précédent</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<template x-for="page in totalPages" :key="page">
|
|
||||||
<button @click="goToPage(page)"
|
|
||||||
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
|
||||||
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
|
||||||
x-text="page"></button>
|
|
||||||
</template>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Suivant</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,152 +1,83 @@
|
|||||||
|
|
||||||
{{ define "solidarity_bookings_list" }}
|
{{ define "solidarity_bookings_list" }}
|
||||||
{{template "booking_filters" dict "tab" "solidarityService" "filters" .ViewState.filters }}
|
|
||||||
|
|
||||||
{{if eq (len .ViewState.bookings) 0}}
|
{{if eq (len .ViewState.bookings) 0}}
|
||||||
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
<div class="m-10 text-center text-gray-600">Aucun trajet déclaré</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div x-data="{
|
|
||||||
bookings: [
|
|
||||||
{{range $index, $booking := .ViewState.bookings}}{{if $index}},{{end}}{
|
|
||||||
id: '{{$booking.Id}}',
|
|
||||||
driverId: '{{$booking.DriverId}}',
|
|
||||||
driverFirstName: '{{ (index $.ViewState.drivers_map $booking.DriverId).Data.first_name }}',
|
|
||||||
driverLastName: '{{ (index $.ViewState.drivers_map $booking.DriverId).Data.last_name }}',
|
|
||||||
passengerId: '{{$booking.PassengerId}}',
|
|
||||||
passengerFirstName: '{{ (index $.ViewState.passengers_map $booking.PassengerId).Data.first_name }}',
|
|
||||||
passengerLastName: '{{ (index $.ViewState.passengers_map $booking.PassengerId).Data.last_name }}',
|
|
||||||
pickupLabel: '{{$booking.Journey.PassengerPickup.Properties.label}}',
|
|
||||||
dropLabel: '{{$booking.Journey.PassengerDrop.Properties.label}}',
|
|
||||||
pickupDate: '{{ timeFormat $booking.Journey.PassengerPickupDate "02/01/2006 15:04" }}',
|
|
||||||
status: '{{$booking.Status}}',
|
|
||||||
motivation: '{{if $booking.Data.motivation}}{{$booking.Data.motivation}}{{end}}'
|
|
||||||
}{{end}}
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
|
||||||
itemsPerPage: {{ if .ViewState.trips_items_per_page }}{{ .ViewState.trips_items_per_page }}{{ else }}10{{ end }},
|
|
||||||
get totalPages() {
|
|
||||||
return Math.ceil(this.bookings.length / this.itemsPerPage);
|
|
||||||
},
|
|
||||||
get paginatedBookings() {
|
|
||||||
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
||||||
const end = start + this.itemsPerPage;
|
|
||||||
return this.bookings.slice(start, end);
|
|
||||||
},
|
|
||||||
nextPage() {
|
|
||||||
if (this.currentPage < this.totalPages) this.currentPage++;
|
|
||||||
},
|
|
||||||
prevPage() {
|
|
||||||
if (this.currentPage > 1) this.currentPage--;
|
|
||||||
},
|
|
||||||
goToPage(page) {
|
|
||||||
this.currentPage = page;
|
|
||||||
},
|
|
||||||
getStatusBadge(status) {
|
|
||||||
if (status === 'WAITING_CONFIRMATION') return { class: 'p-1 text-xs bg-gray-300 rounded-xl', text: 'Attente confirmation' };
|
|
||||||
if (status === 'VALIDATED') return { class: 'p-1 text-xs bg-co-green rounded-xl', text: 'Validé' };
|
|
||||||
if (status === 'CANCELLED') return { class: 'p-1 text-xs bg-co-red text-white rounded-xl', text: 'Annulé' };
|
|
||||||
return { class: '', text: '' };
|
|
||||||
},
|
|
||||||
isGuaranteedTrip(motivation) {
|
|
||||||
return motivation === 'Santé' || motivation === 'Insertion' || motivation === 'Administratif';
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<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"
|
||||||
<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>
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
<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>
|
Conducteur
|
||||||
<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>
|
||||||
<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"
|
||||||
<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>
|
class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6"> </th>
|
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">
|
||||||
|
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
<template x-for="booking in paginatedBookings" :key="booking.id">
|
{{range .ViewState.bookings}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<a class="text-co-blue" :href="'/app/solidarity-transport/drivers/' + booking.driverId">
|
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{.DriverId}}">
|
||||||
<span x-text="booking.driverFirstName + ' ' + booking.driverLastName"></span>
|
{{ (index $.ViewState.drivers_map .DriverId).Data.first_name }}
|
||||||
</a>
|
{{ (index $.ViewState.drivers_map .DriverId).Data.last_name }}
|
||||||
</td>
|
</a>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
</td>
|
||||||
<a class="text-co-blue" :href="'/app/beneficiaries/' + booking.passengerId">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<span x-text="booking.passengerFirstName + ' ' + booking.passengerLastName"></span>
|
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
|
||||||
</a>
|
{{ (index $.ViewState.passengers_map .PassengerId).Data.first_name }}
|
||||||
</td>
|
{{ (index $.ViewState.passengers_map .PassengerId).Data.last_name }}
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupLabel"></td>
|
</a>
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.dropLabel"></td>
|
</td>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="booking.pickupDate"></td>
|
<td class="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">
|
{{ .Journey.PassengerPickup.Properties.label }}
|
||||||
<span :class="getStatusBadge(booking.status).class" x-text="getStatusBadge(booking.status).text"></span>
|
</td>
|
||||||
<template x-if="booking.motivation && isGuaranteedTrip(booking.motivation)">
|
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<div class="mt-4">
|
{{ .Journey.PassengerDrop.Properties.label }}
|
||||||
<span class="text-xs p-2 bg-co-green text-white rounded-2xl" x-text="'Trajet garanti : ' + booking.motivation"></span>
|
</td>
|
||||||
</div>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
</template>
|
{{ timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04" }}
|
||||||
</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">
|
||||||
<a class="text-co-blue" :href="'/app/solidarity-transport/bookings/' + booking.id">Voir</a>
|
{{ if eq .Status "WAITING_CONFIRMATION"}}
|
||||||
</td>
|
<span class="p-1 text-xs bg-gray-300 rounded-xl">Attente confirmation</span>
|
||||||
</tr>
|
{{ else if eq .Status "VALIDATED"}}
|
||||||
</template>
|
<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 }}
|
||||||
|
{{if and .Data.motivation (or (or (eq .Data.motivation "Santé") (eq .Data.motivation "Insertion")) (eq .Data.motivation "Administratif"))}}<div class="mt-4"><span class="text-xs p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.Data.motivation}}</span></div>{{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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Pagination -->
|
|
||||||
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
|
||||||
<div class="flex flex-1 justify-between sm:hidden">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Précédent
|
|
||||||
</button>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Suivant
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-gray-700">
|
|
||||||
Affichage de
|
|
||||||
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
|
||||||
Ă
|
|
||||||
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, bookings.length)"></span>
|
|
||||||
sur
|
|
||||||
<span class="font-medium" x-text="bookings.length"></span>
|
|
||||||
résultats
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Précédent</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<template x-for="page in totalPages" :key="page">
|
|
||||||
<button @click="goToPage(page)"
|
|
||||||
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
|
||||||
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
|
||||||
x-text="page"></button>
|
|
||||||
</template>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Suivant</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ x-data="{
|
|||||||
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
<td class="px-3 py-3.5 text-sm text-gray-500 lg:table-cell">{{.LastModified.Format "02/01/2006"}}</td>
|
||||||
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
<td class="relative py-3.5 pl-3 pr-4 sm:pr-6 text-right text-sm font-medium">
|
||||||
<a href="/app/solidarity-transport/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}" target="_blank">
|
<a href="/app/solidarity-transport/drivers/{{$.ViewState.driver.ID}}/documents/{{.FileName}}" target="_blank">
|
||||||
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Télécharger<span class="sr-only"> le document</span></button>
|
<button type="button" class="inline-flex items-center rounded-md border border-gray-300 bg-white px-3 py-2 text-sm font-medium leading-4 text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-30">Voir<span class="sr-only"> le document</span></button>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -1,69 +1,7 @@
|
|||||||
{{define "driver_history"}}
|
{{define "driver_history"}}
|
||||||
<div class="py-6">
|
<div class="px-4 py-6 sm:px-6 text-center">
|
||||||
{{if .ViewState.stats}}
|
<p class="text-center text-lg">Trajets réalisés : {{ .ViewState.stats.bookings.count }}</p>
|
||||||
<div class="py-5 text-center">
|
<p class="text-center text-lg">Kilomètres réalisés : {{ .ViewState.stats.bookings.km}} km</p>
|
||||||
<p class="text-lg">Trajets réalisés : {{ .ViewState.stats.bookings.count }}</p>
|
|
||||||
<p class="text-lg">Kilomètres réalisés : {{ .ViewState.stats.bookings.km}} km</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if .ViewState.bookings}}
|
|
||||||
<div class="py-5">
|
|
||||||
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des transports solidaires</h4>
|
|
||||||
<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">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">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">Arrivée</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"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
{{range .ViewState.bookings}}
|
|
||||||
{{if or (eq .Status "VALIDATED") (eq .Status "WAITING_CONFIRMATION")}}
|
|
||||||
<tr>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Journey}}
|
|
||||||
{{timeFormat .Journey.PassengerPickupDate "02/01/2006 15:04"}}
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .PassengerId}}
|
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{.PassengerId}}">
|
|
||||||
{{ (index $.ViewState.beneficiaries_map .PassengerId).Data.first_name }}
|
|
||||||
{{ (index $.ViewState.beneficiaries_map .PassengerId).Data.last_name }}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Journey}}{{if .Journey.PassengerPickup}}{{.Journey.PassengerPickup.Properties.label}}{{end}}{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if .Journey}}{{if .Journey.PassengerDrop}}{{.Journey.PassengerDrop.Properties.label}}{{end}}{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if eq .Status "VALIDATED"}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Validé</span>
|
|
||||||
{{else if eq .Status "WAITING_CONFIRMATION"}}
|
|
||||||
<span class="p-1 px-2 text-xs bg-gray-300 rounded-2xl">Attente confirmation</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}}
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="py-5">
|
|
||||||
<p class="text-sm text-gray-500 text-center">Aucun transport solidaire enregistré</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
@@ -1,113 +0,0 @@
|
|||||||
{{define "driver_wallet"}}
|
|
||||||
<div class="py-6"
|
|
||||||
x-data="{
|
|
||||||
walletdialog: false
|
|
||||||
}">
|
|
||||||
<div class="py-5 text-center">
|
|
||||||
<p class="text-lg">Solde : {{ printf "%.2f" .ViewState.wallet_balance }} €</p>
|
|
||||||
<button @click="walletdialog = !walletdialog"
|
|
||||||
class="rounded-2xl border border-transparent bg-co-blue px-4 py-2 my-4 mt-8 w-full text-sm font-medium text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-co-blue focus:ring-offset-2 sm:w-auto">
|
|
||||||
Créditer le compte
|
|
||||||
</button>
|
|
||||||
<div class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true"
|
|
||||||
x-show="walletdialog">
|
|
||||||
<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">Créditer le compte</h3>
|
|
||||||
<div class="mt-2">
|
|
||||||
<p class="text-sm text-gray-500">Créditer le compte mobilité du conducteur</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form method="POST" action="/app/wallets/{{.ViewState.driver.ID}}/credit" class="my-4">
|
|
||||||
<div class="my-8">
|
|
||||||
<input type="number" step="0.01" id="amount" name="amount" value="0"
|
|
||||||
class="w-full shadow-sm focus:ring-co-blue focus:border-co-blue px-2 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="walletdialog=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>
|
|
||||||
|
|
||||||
<!-- Wallet Operations History -->
|
|
||||||
{{if .ViewState.driver.Data.wallet_history}}
|
|
||||||
<div class="py-5">
|
|
||||||
<h4 class="text-lg font-medium text-gray-900 mb-4 text-center">Historique des opérations</h4>
|
|
||||||
<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">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">Crédit</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ébit</th>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Moyen de paiement</th>
|
|
||||||
<th scope="col" class="py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-6">Description</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
|
||||||
<!-- Initial Balance Row -->
|
|
||||||
<tr class="bg-gray-50">
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm text-gray-500 italic sm:pl-6">
|
|
||||||
Solde initial
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
|
||||||
{{if .ViewState.driver.Data.wallet}}{{ printf "%.2f" .ViewState.driver.Data.wallet }} €{{else}}0.00 €{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm text-gray-500 sm:pl-6">
|
|
||||||
-
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{range $index, $operation := .ViewState.driver.Data.wallet_history}}
|
|
||||||
<tr>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{if $operation.timestamp}}{{timeFormat $operation.timestamp "02/01/2006 15:04"}}{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-green-600 sm:pl-6">
|
|
||||||
{{if $operation.amount}}
|
|
||||||
{{if or (eq $operation.operation_type "credit") (not $operation.operation_type)}}
|
|
||||||
{{ printf "%.2f" $operation.amount }} €
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-red-600 sm:pl-6">
|
|
||||||
{{if eq $operation.operation_type "debit"}}
|
|
||||||
{{ printf "%.2f" $operation.amount }} €
|
|
||||||
{{end}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{$operation.payment_method}}
|
|
||||||
</td>
|
|
||||||
<td class="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
|
||||||
{{$operation.description}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
{{else}}
|
|
||||||
<div class="py-5">
|
|
||||||
<p class="text-sm text-gray-500 text-center">Aucune opération enregistrée</p>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
@@ -27,38 +27,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div x-data="{
|
|
||||||
drivers: [
|
|
||||||
{{range $index, $driver := .ViewState.drivers}}{{if $index}},{{end}}{
|
|
||||||
id: '{{$driver.ID}}',
|
|
||||||
firstName: '{{$driver.Data.first_name}}',
|
|
||||||
lastName: '{{$driver.Data.last_name}}',
|
|
||||||
address: '{{if $driver.Data.address}}{{$driver.Data.address.properties.label}}{{end}}',
|
|
||||||
phoneNumber: '{{$driver.Data.phone_number}}',
|
|
||||||
validated: {{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID)}}true{{else}}false{{end}}
|
|
||||||
}{{end}}
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
|
||||||
itemsPerPage: {{ if .ViewState.drivers_items_per_page }}{{ .ViewState.drivers_items_per_page }}{{ else }}10{{ end }},
|
|
||||||
get totalPages() {
|
|
||||||
return Math.ceil(this.drivers.length / this.itemsPerPage);
|
|
||||||
},
|
|
||||||
get paginatedDrivers() {
|
|
||||||
const start = (this.currentPage - 1) * this.itemsPerPage;
|
|
||||||
const end = start + this.itemsPerPage;
|
|
||||||
return this.drivers.slice(start, end);
|
|
||||||
},
|
|
||||||
nextPage() {
|
|
||||||
if (this.currentPage < this.totalPages) this.currentPage++;
|
|
||||||
},
|
|
||||||
prevPage() {
|
|
||||||
if (this.currentPage > 1) this.currentPage--;
|
|
||||||
},
|
|
||||||
goToPage(page) {
|
|
||||||
this.currentPage = page;
|
|
||||||
}
|
|
||||||
}">
|
|
||||||
|
|
||||||
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
<table class="min-w-full divide-y divide-gray-300 border-gray-300 border-t-1">
|
||||||
<thead class="bg-gray-50">
|
<thead class="bg-gray-50">
|
||||||
<tr>
|
<tr>
|
||||||
@@ -85,75 +53,26 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
<template x-for="driver in paginatedDrivers" :key="driver.id">
|
{{ range .ViewState.drivers }}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6" x-text="driver.firstName + ' ' + driver.lastName"></td>
|
<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" x-text="driver.address"></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" x-text="driver.phoneNumber"></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">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
<span x-show="driver.validated" class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
{{if solidarityDriverValidatedProfile . (solidarityDocuments .ID) }}
|
||||||
<span x-show="!driver.validated" class="p-1 px-2 text-xs bg-co-red text-white rounded-2xl">Non</span>
|
<span class="p-1 px-2 text-xs bg-co-green rounded-2xl">Oui</span>
|
||||||
</td>
|
{{else}}
|
||||||
<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-red text-white rounded-2xl">Non</span>
|
||||||
<a class="text-co-blue hover:text-co-blue" :href="'/app/solidarity-transport/drivers/' + driver.id">
|
{{end}}
|
||||||
Voir
|
</td>
|
||||||
</a>
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
</td>
|
<a class="text-co-blue hover:text-co-blue"
|
||||||
</tr>
|
href="/app/solidarity-transport/drivers/{{.ID}}">
|
||||||
</template>
|
Voir
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{ end }}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Pagination -->
|
|
||||||
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6">
|
|
||||||
<div class="flex flex-1 justify-between sm:hidden">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Précédent
|
|
||||||
</button>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
Suivant
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between">
|
|
||||||
<div>
|
|
||||||
<p class="text-sm text-gray-700">
|
|
||||||
Affichage de
|
|
||||||
<span class="font-medium" x-text="(currentPage - 1) * itemsPerPage + 1"></span>
|
|
||||||
Ă
|
|
||||||
<span class="font-medium" x-text="Math.min(currentPage * itemsPerPage, drivers.length)"></span>
|
|
||||||
sur
|
|
||||||
<span class="font-medium" x-text="drivers.length"></span>
|
|
||||||
résultats
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination">
|
|
||||||
<button @click="prevPage()" :disabled="currentPage === 1"
|
|
||||||
class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Précédent</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<template x-for="page in totalPages" :key="page">
|
|
||||||
<button @click="goToPage(page)"
|
|
||||||
:class="page === currentPage ? 'z-10 bg-co-blue text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-co-blue' : 'text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:outline-offset-0'"
|
|
||||||
class="relative inline-flex items-center px-4 py-2 text-sm font-semibold focus:z-20"
|
|
||||||
x-text="page"></button>
|
|
||||||
</template>
|
|
||||||
<button @click="nextPage()" :disabled="currentPage === totalPages"
|
|
||||||
class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
||||||
<span class="sr-only">Suivant</span>
|
|
||||||
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
||||||
<path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Horaire départ conducteur</dt>
|
<dt class="text-sm font-medium text-gray-500">Horaire départ conducteur</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ timeFormat .driver_journey.DriverDepartureDate "02/01/2006 15:04"}}</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{ .driver_journey.DriverDepartureDate.Format "02/01/2006 15:04"}}</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Horaire rendez vous passager</dt>
|
<dt class="text-sm font-medium text-gray-500">Horaire rendez vous passager</dt>
|
||||||
@@ -50,31 +50,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
<dd class="mt-1 text-sm text-gray-900">{{ .driver_journey.Price.Amount }} {{ .driver_journey.Price.Currency}}</dd>
|
||||||
{{if .pricing_result}}
|
|
||||||
{{ printf "%.2f" (round2 .pricing_result.passenger.Amount) }} {{.pricing_result.passenger.Currency}}
|
|
||||||
{{else if .booking}}
|
|
||||||
{{ printf "%.2f" (round2 .booking.Journey.Price.Amount) }} {{.booking.Journey.Price.Currency}}
|
|
||||||
{{else}}
|
|
||||||
0.00 EUR
|
|
||||||
{{end}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
</div>
|
||||||
{{if and .pricing_result .pricing_result.driver (gt (round2 .pricing_result.driver.Amount) 0.0)}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Indemnité conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ printf "%.2f" (round2 .pricing_result.driver.Amount) }} {{.pricing_result.driver.Currency}}</dd>
|
|
||||||
</div>
|
|
||||||
{{else if .booking}}
|
|
||||||
{{if .booking.DriverCompensationAmount}}
|
|
||||||
{{if gt (round2 .booking.DriverCompensationAmount) 0.0}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Indemnité conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ printf "%.2f" (round2 .booking.DriverCompensationAmount) }} {{.booking.DriverCompensationCurrency}}</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -272,7 +249,7 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
<div class="sm:col-span-1">
|
<div class="sm:col-span-1">
|
||||||
<dt class="text-sm font-medium text-gray-500">Compte mobilié (solde)</dt>
|
<dt class="text-sm font-medium text-gray-500">Compte mobilié (solde)</dt>
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{ printf "%.2f" (round2 .passenger_wallet_balance) }} EUR</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{if .passenger.Data.wallet}}{{ .passenger.Data.wallet }}{{else}}0{{end}} EUR</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,217 +3,122 @@
|
|||||||
<h1 class="text-2xl font-semibold text-gray-900">
|
<h1 class="text-2xl font-semibold text-gray-900">
|
||||||
Transport solidaire
|
Transport solidaire
|
||||||
</h1>
|
</h1>
|
||||||
|
{{if and .ViewState.booking.Data.motivation (or (or (eq .ViewState.booking.Data.motivation "Santé") (eq .ViewState.booking.Data.motivation "Insertion")) (eq .ViewState.booking.Data.motivation "Administratif"))}}<div class="mt-4"><span class="text-sm p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.ViewState.booking.Data.motivation}}</span></div>{{end}}
|
||||||
|
{{ if eq .ViewState.booking.Status "WAITING_CONFIRMATION"}}
|
||||||
|
<div class="mt-4"><span class="p-2 text-sm bg-gray-300 rounded-2xl px-4">Attente confirmation</span></div>
|
||||||
|
{{ else if eq .ViewState.booking.Status "VALIDATED"}}
|
||||||
|
<div class="mt-4"><span class="p-1 text-sm bg-co-green rounded-2xl px-4">Validé</span></div>
|
||||||
|
{{ else if eq .ViewState.booking.Status "CANCELLED"}}
|
||||||
|
<div class="mt-4"><span class="p-1 text-sm bg-co-red text-white rounded-2xl px-4">Annulé : {{.ViewState.booking.Data.reason}}</span></div>
|
||||||
|
{{ end }}
|
||||||
|
<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">
|
||||||
|
|
||||||
{{if and .ViewState.booking.Data.motivation (or (or (eq .ViewState.booking.Data.motivation "Santé") (eq .ViewState.booking.Data.motivation "Insertion")) (eq .ViewState.booking.Data.motivation "Administratif"))}}
|
|
||||||
<div class="mt-4"><span class="text-sm p-2 bg-co-green text-white rounded-2xl">Trajet garanti : {{.ViewState.booking.Data.motivation}}</span></div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{ if eq .ViewState.booking.Status "WAITING_CONFIRMATION"}}
|
{{$dialog := "modif"}}
|
||||||
<div class="mt-4"><span class="p-2 text-sm bg-gray-300 rounded-2xl px-4">Attente confirmation</span></div>
|
<div x-data="{ {{ $dialog }}: false}">
|
||||||
{{ else if eq .ViewState.booking.Status "VALIDATED"}}
|
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-white 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">
|
||||||
<div class="mt-4"><span class="p-1 text-sm bg-co-green rounded-2xl px-4">Validé</span></div>
|
Modifier
|
||||||
{{ else if eq .ViewState.booking.Status "CANCELLED"}}
|
</button>
|
||||||
<div class="mt-4"><span class="p-1 text-sm bg-co-red text-white rounded-2xl px-4">Annulé{{if .ViewState.booking.Data.reason}} : {{.ViewState.booking.Data.reason}}{{end}}</span></div>
|
<div x-show="{{$dialog}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
{{ end }}
|
<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="mt-6 flex justify-end space-x-3">
|
<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">
|
||||||
{{if eq .ViewState.booking.Status "WAITING_CONFIRMATION" }}
|
<form method="POST">
|
||||||
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/confirm" class="inline-flex">
|
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
||||||
<button type="button" class="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">
|
|
||||||
Confirmer
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if ne .ViewState.booking.Status "WAITING_CONFIRMATION" }}
|
|
||||||
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/waitconfirmation" class="inline-flex">
|
|
||||||
<button type="button" class="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">
|
|
||||||
Remettre en attente
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if ne .ViewState.booking.Status "CANCELLED" }}
|
|
||||||
{{$dialog := "cancel"}}
|
|
||||||
<div x-data="{ {{ $dialog }}: false}">
|
|
||||||
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-co-red 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">
|
|
||||||
Annuler
|
|
||||||
</button>
|
|
||||||
<div x-show="{{$dialog}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
|
||||||
<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">
|
|
||||||
<form method="POST" action="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/cancel">
|
|
||||||
<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"}}
|
{{$.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 text-center sm:mt-5">
|
<div class="mt-3 text-center sm:mt-5">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Annuler</h3>
|
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Modifier</h3>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<p class="text-sm text-gray-500">Sélectionnez la raison de l'annulation</p>
|
<p class="text-sm text-gray-500"></p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label for="reason" class="block text-sm font-medium text-gray-700">Raison de l'annulation</label>
|
<label for="driver_distance" class="block text-sm font-medium text-gray-700">Kilomètres conducteur</label>
|
||||||
<div class="mt-1">
|
<div class="mt-1">
|
||||||
<select name="reason" id="reason" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm">
|
<input type="text" name="driver_distance" id="driver_distance" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm" value="{{.ViewState.booking.Journey.DriverDistance}}" />
|
||||||
<option value="Trajet annulé par le passager">Trajet annulé par le passager</option>
|
</div>
|
||||||
<option value="Trajet non réalisé">Trajet non réalisé</option>
|
</div>
|
||||||
<option value="Refusé par le bénévole">Refusé par le bénévole</option>
|
</div>
|
||||||
<option value="Autre" selected="selected">Autre</option>
|
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
||||||
</select>
|
<button @click="{{$dialog}} = !{{$dialog}}" type="button" 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</button>
|
||||||
</div>
|
<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">Valider</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</form>
|
||||||
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
</div>
|
||||||
<button @click="{{$dialog}} = !{{$dialog}}" type="button" 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</button>
|
</div>
|
||||||
<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">Confirmer</button>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<a href="/app/journeys/?departure={{json .ViewState.booking.Journey.PassengerPickup}}&destination={{ json .ViewState.booking.Journey.PassengerDrop }}&passengerid={{.ViewState.booking.PassengerId}}" class="inline-flex">
|
|
||||||
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
|
||||||
Dupliquer
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
{{if eq .ViewState.booking.Status "CANCELLED" }}
|
|
||||||
<a href="/app/journeys/?departure={{json .ViewState.booking.Journey.PassengerPickup}}&destination={{ json .ViewState.booking.Journey.PassengerDrop }}&departuredate={{ .ViewState.booking.Journey.PassengerPickupDate.Format "2006-01-02"}}&departuretime={{ (timeFrom .ViewState.booking.Journey.PassengerPickupDate).Format "15:04"}}&passengerid={{.ViewState.booking.PassengerId}}&solidarity_transport_exclude_driver={{.ViewState.booking.DriverId}}" class="inline-flex">
|
|
||||||
<button type="button" class="px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">
|
|
||||||
Solliciter un autre conducteur
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
|
<!-- <button type="button"
|
||||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
|
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> -->
|
||||||
<!-- Booking Details -->
|
{{if eq .ViewState.booking.Status "CANCELLED" }}
|
||||||
<div class="bg-white shadow overflow-hidden sm:rounded-lg">
|
<a href="/app/journeys/?departure={{json .ViewState.booking.Journey.PassengerPickup}}&destination={{ json .ViewState.booking.Journey.PassengerDrop }}&departuredate={{ .ViewState.booking.Journey.PassengerPickupDate.Format "2006-01-02"}}&departuretime={{ .ViewState.booking.Journey.PassengerPickupDate.Format "15:04"}}" class="inline-flex"><button type="button"
|
||||||
<div class="px-4 py-5 sm:px-6">
|
class="w-full px-4 py-2 border border-transparent text-sm font-medium rounded-2xl shadow-sm bg-white text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-co-blue">Solliciter un autre conducteur</button></a>
|
||||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Détails du transport solidaire</h3>
|
{{end}}
|
||||||
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations sur le trajet</p>
|
{{if eq .ViewState.booking.Status "WAITING_CONFIRMATION" }}
|
||||||
</div>
|
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/confirm" class="inline-flex"><button type="button"
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:p-0">
|
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">Confirmer</button></a>
|
||||||
<dl class="sm:divide-y sm:divide-gray-200">
|
{{end}}
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
{{if ne .ViewState.booking.Status "WAITING_CONFIRMATION" }}
|
||||||
<dt class="text-sm font-medium text-gray-500">Conducteur</dt>
|
<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/waitconfirmation" class="inline-flex"><button type="button"
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
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">Remettre en attente</button></a>
|
||||||
<a class="text-co-blue" href="/app/solidarity-transport/drivers/{{ .ViewState.driver.ID }}">{{ .ViewState.driver.Data.first_name }} {{ .ViewState.driver.Data.last_name }}</a>
|
{{end}}
|
||||||
</dd>
|
{{if ne .ViewState.booking.Status "CANCELLED" }}
|
||||||
</div>
|
<!--<a href="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/cancel" class="inline-flex"><button type="button"
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
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">Annuler</button></a>-->
|
||||||
<dt class="text-sm font-medium text-gray-500">Passager</dt>
|
{{$dialog := "cancel"}}
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
<div x-data="{ {{ $dialog }}: false}">
|
||||||
<a class="text-co-blue" href="/app/beneficiaries/{{ .ViewState.passenger.ID }}">{{ .ViewState.passenger.Data.first_name }} {{ .ViewState.passenger.Data.last_name }}</a>
|
<button @click="{{ $dialog }} = !{{ $dialog }}" type="button" class="bg-co-red 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">
|
||||||
</dd>
|
Annuler
|
||||||
</div>
|
</button>
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
<div x-show="{{$dialog}}" class="relative z-10" aria-labelledby="modal-title" role="dialog" aria-modal="true">
|
||||||
<dt class="text-sm font-medium text-gray-500">Départ conducteur</dt>
|
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"></div>
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.Journey.DriverDeparture.Properties.label }}
|
<div class="fixed inset-0 z-10 overflow-y-auto">
|
||||||
</dd>
|
<div class="flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0">
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Prise en charge passager</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.Journey.PassengerPickup.Properties.label }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Dépose passager</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.Journey.PassengerDrop.Properties.label }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Arrivée conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.Journey.DriverArrival.Properties.label }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Date et heure</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ timeFormat .ViewState.booking.Journey.PassengerPickupDate "02/01/2006 15:04" }}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Type de trajet</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{if .ViewState.booking.Journey.Noreturn}}
|
|
||||||
Aller simple (pas de retour)
|
|
||||||
{{else}}
|
|
||||||
Aller-retour ({{.ViewState.booking.ReturnWaitingDuration | shortDuration}} d'attente estimée sur place)
|
|
||||||
{{end}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{if .ViewState.booking.Data.motivation}}
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Motif</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{$motivation := .ViewState.booking.Data.motivation}}
|
|
||||||
{{$found := false}}
|
|
||||||
{{range .ViewState.booking_motivations}}
|
|
||||||
{{if eq .value $motivation}}
|
|
||||||
{{.label}}
|
|
||||||
{{$found = true}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if not $found}}{{$motivation}}{{end}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Distance passager</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.Journey.PassengerDistance }} km
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Distance conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
{{ .ViewState.booking.Journey.DriverDistance }} km
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Prix (passager)</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
<span class="font-medium">{{ printf "%.2f" (round2 .ViewState.booking.Journey.Price.Amount) }} {{ .ViewState.booking.Journey.Price.Currency }}</span>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{if .ViewState.booking.DriverCompensationAmount}}
|
|
||||||
{{if gt (round2 .ViewState.booking.DriverCompensationAmount) 0.0}}
|
|
||||||
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">Indemnité conducteur</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
|
||||||
<span class="font-medium">{{ printf "%.2f" (round2 .ViewState.booking.DriverCompensationAmount) }} {{.ViewState.booking.DriverCompensationCurrency}}</span>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Map -->
|
<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 class="bg-white shadow overflow-hidden sm:rounded-lg">
|
<form method="POST" action="/app/solidarity-transport/bookings/{{.ViewState.booking.Id}}/cancel">
|
||||||
<div class="border-t border-gray-200 h-full">
|
<div class="mx-auto flex h-12 w-12 items-center justify-center rounded-co bg-co-blue text-white">
|
||||||
<div class="h-full min-h-96">
|
{{$.IconSet.Icon "hero:outline/information-circle" "h-6 w-6"}}
|
||||||
{{ template "journey_map" (dict "driver_journey" .ViewState.booking.Journey) }}
|
</div>
|
||||||
</div>
|
<div class="mt-3 text-center sm:mt-5">
|
||||||
</div>
|
<h3 class="text-lg font-medium leading-6 text-gray-900" id="modal-title">Annuler</h3>
|
||||||
</div>
|
<div class="mt-2">
|
||||||
|
<p class="text-sm text-gray-500"></p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<label for="reason" class="block text-sm font-medium text-gray-700">Raison de l'annulation</label>
|
||||||
|
<div class="mt-1">
|
||||||
|
<select name="reason" id="reason" class="block w-full rounded-2xl border-gray-300 shadow-sm focus:border-co-blue focus:ring-co-blue sm:text-sm">
|
||||||
|
<option value="Trajet annulé par le passager">Trajet annulé par le passager</option>
|
||||||
|
<option value="Trajet non réalisé">Trajet non réalisé</option>
|
||||||
|
<option value="Refusé par le bénévole">Refusé par le bénévole</option>
|
||||||
|
<option value="Autre" selected="selected">Autre</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mt-5 sm:mt-6 sm:grid sm:grid-flow-row-dense sm:grid-cols-2">
|
||||||
|
<button @click="{{$dialog}} = !{{$dialog}}" type="button" 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</button>
|
||||||
|
<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">Valider</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
|
||||||
|
{{template "journey_preview" (dict "driver_journey" .ViewState.booking.Journey "driver" .ViewState.driver "passenger" .ViewState.passenger "beneficiaries" .ViewState.beneficiaries)}}
|
||||||
|
</div>
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -116,46 +116,31 @@
|
|||||||
<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">
|
||||||
|
|
||||||
{{range .ViewState.profile_optional_fields}}
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
{{if eq .type "select"}}
|
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
<select id="{{.name}}" name="{{.name}}"
|
<select id="gender" name="gender" autocomplete="gender" x-model="gender"
|
||||||
{{if eq .name "gender"}}x-model="gender"{{else}}x-model="other_properties.{{.name}}"{{end}}
|
|
||||||
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">
|
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">
|
||||||
{{range .options}}
|
<option value="0">Inconnu</option>
|
||||||
<option value="{{.value}}">{{.label}}</option>
|
<option value="1">Masculin</option>
|
||||||
{{end}}
|
<option value="2">Féminin</option>
|
||||||
|
<option value="9">Sans objet</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .type "textarea"}}
|
|
||||||
<textarea id="{{.name}}" name="{{.name}}" rows="3" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
|
||||||
{{else if eq .type "multicheckbox"}}
|
|
||||||
<div class="mt-1 space-y-2">
|
|
||||||
{{$name := .name}}
|
|
||||||
{{range .options}}
|
|
||||||
<label class="flex items-center">
|
|
||||||
<input type="checkbox" name="{{$name}}[]" value="{{.value}}"
|
|
||||||
x-model="other_properties.{{$name}}___{{.value}}"
|
|
||||||
class="h-4 w-4 text-co-blue focus:ring-co-blue border-co-blue rounded">
|
|
||||||
<span class="ml-2 text-sm text-gray-700">{{.label}}</span>
|
|
||||||
</label>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{else if eq .type "date"}}
|
|
||||||
<input type="date" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else if eq .type "number"}}
|
|
||||||
<input type="number" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else}}
|
|
||||||
<input type="text" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
<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">
|
<!-- <div class="col-span-3 sm:col-span-3">
|
||||||
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
||||||
|
|||||||
@@ -89,58 +89,17 @@
|
|||||||
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.driver.Data.file_number}}</dd>
|
<dd class="mt-1 text-sm text-gray-900">{{.ViewState.driver.Data.file_number}}</dd>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{range .ViewState.profile_optional_fields}}
|
{{if and .ViewState.driver.Data.other_properties .ViewState.driver.Data.other_properties.last_subscription_date}}
|
||||||
{{$fieldName := .name}}
|
<div class="sm:col-span-1">
|
||||||
{{$fieldLabel := .label}}
|
<dt class="text-sm font-medium text-gray-500">Dernière adhésion</dt>
|
||||||
{{$fieldType := .type}}
|
<dd class="mt-1 text-sm text-gray-900">{{ .ViewState.driver.Data.other_properties.last_subscription_date}}</dd>
|
||||||
{{if eq .type "multicheckbox"}}
|
</div>
|
||||||
{{$hasValues := false}}
|
|
||||||
{{range .options}}
|
|
||||||
{{$optionKey := printf "%s___%s" $fieldName .value}}
|
|
||||||
{{if index $.ViewState.driver.Data.other_properties $optionKey}}{{$hasValues = true}}{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{if $hasValues}}
|
|
||||||
<div class="sm:col-span-2">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">{{$fieldLabel}}</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
|
||||||
<div class="flex flex-wrap gap-2">
|
|
||||||
{{range .options}}
|
|
||||||
{{$optionKey := printf "%s___%s" $fieldName .value}}
|
|
||||||
{{if index $.ViewState.driver.Data.other_properties $optionKey}}
|
|
||||||
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-200 text-gray-800">
|
|
||||||
{{.label}}
|
|
||||||
</span>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{else if eq .type "select"}}
|
|
||||||
{{$fieldValue := index $.ViewState.driver.Data.other_properties $fieldName}}
|
|
||||||
{{if and $fieldValue (ne $fieldValue "0") (ne $fieldValue "")}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">{{$fieldLabel}}</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
|
||||||
{{if eq $fieldName "gender"}}
|
|
||||||
{{genderISO5218 $fieldValue}}
|
|
||||||
{{else}}
|
|
||||||
{{range .options}}
|
|
||||||
{{if eq .value $fieldValue}}{{.label}}{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
{{$fieldValue := index $.ViewState.driver.Data.other_properties $fieldName}}
|
|
||||||
{{if $fieldValue}}
|
|
||||||
<div class="sm:col-span-1">
|
|
||||||
<dt class="text-sm font-medium text-gray-500">{{$fieldLabel}}</dt>
|
|
||||||
<dd class="mt-1 text-sm text-gray-900">{{$fieldValue}}</dd>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{if and .ViewState.driver.Data.other_properties .ViewState.driver.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.driver.Data.other_properties.comment}}</dd>
|
||||||
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
@@ -148,7 +107,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section aria-labelledby="functionalities-title" x-data="{
|
<section aria-labelledby="functionalities-title" x-data="{
|
||||||
tab: '{{ if .ViewState.tab }}{{ .ViewState.tab }}{{ else }}documents{{ end }}',
|
tab: 'documents',
|
||||||
to(event) {
|
to(event) {
|
||||||
this.tab = event.target.value
|
this.tab = event.target.value
|
||||||
}
|
}
|
||||||
@@ -169,10 +128,8 @@
|
|||||||
<option value="events">Dispositifs</option> -->
|
<option value="events">Dispositifs</option> -->
|
||||||
|
|
||||||
<option value="documents">Documents</option>
|
<option value="documents">Documents</option>
|
||||||
|
|
||||||
<option value="wallet">Compte mobilité</option>
|
<option value="history">Historique</option>
|
||||||
|
|
||||||
<option value="history">Transports solidaires</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
@@ -188,16 +145,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 == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'documents' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Documents </a>
|
Documents </a>
|
||||||
|
|
||||||
<a href="#" @click="tab = 'wallet'"
|
|
||||||
class="whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm"
|
|
||||||
:class="tab == 'wallet' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
|
||||||
Compte mobilité </a>
|
|
||||||
|
|
||||||
<a href="#" @click="tab = 'history'"
|
<a href="#" @click="tab = 'history'"
|
||||||
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 == 'history' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'history' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
Transports solidaires </a>
|
Transport solidaires </a>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
@@ -205,7 +157,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div x-show="tab == 'documents'">{{template "driver_files" .}}</div>
|
<div x-show="tab == 'documents'">{{template "driver_files" .}}</div>
|
||||||
<div x-show="tab == 'wallet'">{{template "driver_wallet" .}}</div>
|
|
||||||
<div x-show="tab == 'history'">{{template "driver_history" .}}</div>
|
<div x-show="tab == 'history'">{{template "driver_history" .}}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -26,12 +26,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
|
<div class="max-w-7xl mx-auto py-8 px-4 sm:px-6 md:px-8">
|
||||||
{{template "journey_preview" (dict "driver_journey" .ViewState.driver_journey "driver" .ViewState.driver "passenger" .ViewState.passenger "beneficiaries" .ViewState.beneficiaries "passenger_wallet_balance" .ViewState.passenger_wallet_balance "pricing_result" .ViewState.pricing_result)}}
|
{{template "journey_preview" (dict "driver_journey" .ViewState.driver_journey "driver" .ViewState.driver "passenger" .ViewState.passenger "beneficiaries" .ViewState.beneficiaries)}}
|
||||||
{{if ne .ViewState.passenger.ID ""}}
|
{{if ne .ViewState.passenger.ID ""}}
|
||||||
<div class="max-w-7xl m-auto px-4 sm:px-6 md:px-8 flex flex-col justify-items-center">
|
<div class="max-w-7xl m-auto px-4 sm:px-6 md:px-8 flex flex-col justify-items-center">
|
||||||
{{if .ViewState.passenger}}
|
{{if .ViewState.passenger}}
|
||||||
{{if lt .ViewState.passenger_wallet_balance .ViewState.pricing_result.passenger.Amount}}
|
{{$wallet := (or .ViewState.passenger.Data.wallet 0.0)}}
|
||||||
<p class="text-xl text-co-red text-center p-4">Le solde du compte mobilité est insuffisant. <a href="/app/beneficiaries/{{.ViewState.passenger.ID}}?tab=wallet" class="underline text-co-blue">Créditer le compte</a></p>
|
{{if lt $wallet .ViewState.driver_journey.Price.Amount}}
|
||||||
|
<p class="text-xl text-co-red text-center p-4">Le solde du compte mobilité est insuffisant.</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
{{if not .ViewState.driver_journey.Noreturn}}
|
{{if not .ViewState.driver_journey.Noreturn}}
|
||||||
@@ -45,9 +46,14 @@
|
|||||||
<label for="motivation" class="block text-sm font-medium text-gray-700">Motif du trajet</label>
|
<label for="motivation" class="block text-sm font-medium text-gray-700">Motif du trajet</label>
|
||||||
<select name="motivation" id="motivation"
|
<select name="motivation" id="motivation"
|
||||||
class="p-2 mt-1 mb-4 focus:ring-co-blue focus:border-co-blue block shadow-sm sm:text-sm rounded-2xl bg-white m-auto">
|
class="p-2 mt-1 mb-4 focus:ring-co-blue focus:border-co-blue block shadow-sm sm:text-sm rounded-2xl bg-white m-auto">
|
||||||
{{range .ViewState.booking_motivations}}
|
<option value="Administratif">Administratif (trajet garanti)</option>
|
||||||
<option value="{{.value}}"{{if eq .value ""}} selected="selected"{{end}}>{{.label}}</option>
|
<option value="Commerce">Commerce</option>
|
||||||
{{end}}
|
<option value="Courses">Courses</option>
|
||||||
|
<option value="Insertion">Insertion (trajet garanti)</option>
|
||||||
|
<option value="Loisirs">Loisirs</option>
|
||||||
|
<option value="Visite Ă un proche">Visite Ă un proche</option>
|
||||||
|
<option value="Santé">Santé (trajet garanti)</option>
|
||||||
|
<option selected="selected" value="">Autre </option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{template "submit_with_sms"
|
{{template "submit_with_sms"
|
||||||
|
|||||||
@@ -121,46 +121,31 @@
|
|||||||
<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">
|
||||||
|
|
||||||
{{range .ViewState.profile_optional_fields}}
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
<div class="col-span-6 sm:col-span-3">
|
||||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
<label for="gender" class="block text-sm font-medium text-gray-700">Genre</label>
|
||||||
{{if eq .type "select"}}
|
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
<div class="sm:mt-0 sm:col-span-2">
|
||||||
<select id="{{.name}}" name="{{.name}}"
|
<select id="gender" name="gender" autocomplete="gender" x-model="gender"
|
||||||
{{if eq .name "gender"}}x-model="gender"{{else}}x-model="other_properties.{{.name}}"{{end}}
|
|
||||||
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">
|
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">
|
||||||
{{range .options}}
|
<option value="0">Inconnu</option>
|
||||||
<option value="{{.value}}">{{.label}}</option>
|
<option value="1">Masculin</option>
|
||||||
{{end}}
|
<option value="2">Féminin</option>
|
||||||
|
<option value="9">Sans objet</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{{else if eq .type "textarea"}}
|
|
||||||
<textarea id="{{.name}}" name="{{.name}}" rows="3" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
|
||||||
{{else if eq .type "multicheckbox"}}
|
|
||||||
<div class="mt-1 space-y-2">
|
|
||||||
{{$name := .name}}
|
|
||||||
{{range .options}}
|
|
||||||
<label class="flex items-center">
|
|
||||||
<input type="checkbox" name="{{$name}}[]" value="{{.value}}"
|
|
||||||
x-model="other_properties.{{$name}}___{{.value}}"
|
|
||||||
class="h-4 w-4 text-co-blue focus:ring-co-blue border-co-blue rounded">
|
|
||||||
<span class="ml-2 text-sm text-gray-700">{{.label}}</span>
|
|
||||||
</label>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{else if eq .type "date"}}
|
|
||||||
<input type="date" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else if eq .type "number"}}
|
|
||||||
<input type="number" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else}}
|
|
||||||
<input type="text" id="{{.name}}" name="{{.name}}" x-model="other_properties.{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
<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">
|
<!-- <div class="col-span-3 sm:col-span-3">
|
||||||
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
<label class="block text-sm font-medium text-gray-700"> Photo </label>
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/npm/@protomaps/basemaps@5/dist/basemaps.js" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@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://cdn.jsdelivr.net/npm/@turf/turf@7/turf.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/polyline@0.2.0/src/polyline.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/polyline@0.2.0/src/polyline.js"></script>
|
||||||
<meta name=viewport content="width=device-width" />
|
|
||||||
<!--<script defer type="text/javascript" src="/public/js/main.js" defer></script>-->
|
<!--<script defer type="text/javascript" src="/public/js/main.js" defer></script>-->
|
||||||
</head>
|
</head>
|
||||||
<body class="h-full">
|
<body class="h-full">
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
{{$defaultTab := "solidarityService"}}
|
|
||||||
<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">Transport solidaire</h1>
|
<h1 class="text-2xl font-semibold text-gray-900">Transport solidaire</h1>
|
||||||
|
|
||||||
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden my-4" x-data="{
|
<div class="bg-white shadow sm:rounded-lg sm:overflow-hidden my-4" x-data="{
|
||||||
tab: '{{or .ViewState.tab $defaultTab}}',
|
tab: 'drivers',
|
||||||
to(event) {
|
to(event) {
|
||||||
this.tab = event.target.value
|
this.tab = event.target.value
|
||||||
}
|
}
|
||||||
@@ -14,11 +14,6 @@
|
|||||||
<div class="hidden sm:block">
|
<div class="hidden sm:block">
|
||||||
<div class="border-b border-gray-200 pl-4">
|
<div class="border-b border-gray-200 pl-4">
|
||||||
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
<nav class="-mb-px flex space-x-8" aria-label="Tabs">
|
||||||
<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 </a>
|
|
||||||
|
|
||||||
<a href="#" @click="tab = 'drivers'"
|
<a href="#" @click="tab = 'drivers'"
|
||||||
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 == 'drivers' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'drivers' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
@@ -29,6 +24,11 @@
|
|||||||
:class="tab == 'beneficiaries' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
: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>-->
|
Bénéficiaires </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 </a>
|
||||||
|
|
||||||
<a href="#" @click="tab = 'solidarityHistory'"
|
<a href="#" @click="tab = 'solidarityHistory'"
|
||||||
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 == 'solidarityHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
:class="tab == 'solidarityHistory' ? 'border-co-blue text-co-blue' : 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'">
|
||||||
|
|||||||
@@ -55,11 +55,7 @@
|
|||||||
{{range .ViewState.bookings}}
|
{{range .ViewState.bookings}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="flex-col 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 .Deleted}}
|
{{if .Data.administrator_unavailability}}
|
||||||
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
|
||||||
Supprimé
|
|
||||||
</span>
|
|
||||||
{{else 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é
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<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é
|
||||||
</span>
|
</span>
|
||||||
{{else if .Deleted}}
|
{{else if or .Deleted .Data.Deleted}}
|
||||||
<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" >
|
||||||
Annulé
|
Annulé
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}">
|
}">
|
||||||
{{if and (ne .ViewState.booking.Status -1) (not .ViewState.booking.Deleted)}}
|
{{if and (ne .ViewState.booking.Status -1) (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
|
||||||
<button type="button" @click="changeVehicle = ! changeVehicle"
|
<button type="button" @click="changeVehicle = ! changeVehicle"
|
||||||
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">
|
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">
|
||||||
Changer de véhicule
|
Changer de véhicule
|
||||||
@@ -135,18 +135,9 @@
|
|||||||
<div class="bg-white px-4 py-5 border-b border-gray-200 sm:px-6">
|
<div class="bg-white px-4 py-5 border-b border-gray-200 sm:px-6">
|
||||||
<div class="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-nowrap">
|
<div class="-ml-4 -mt-4 flex justify-between items-center flex-wrap sm:flex-nowrap">
|
||||||
<div class="ml-4 mt-4">
|
<div class="ml-4 mt-4">
|
||||||
{{if .ViewState.booking.Deleted}}
|
{{if or .ViewState.booking.Data.Deleted .ViewState.booking.Deleted}}
|
||||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation annulée le {{if .ViewState.booking.Data.deleted_at}}{{(timeFrom .ViewState.booking.Data.deleted_at).Format "02/01/2006"}}{{else}}{{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}{{end}}</h3>
|
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation annulée le {{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}</h3>
|
||||||
{{if .ViewState.booking.Data.deleted_by}}
|
|
||||||
<p class="mt-1 text-sm text-gray-500">
|
|
||||||
Annulée par : {{index (index .ViewState.booking.Data.deleted_by "user") "display_name"}} ({{index (index .ViewState.booking.Data.deleted_by "group") "name"}})
|
|
||||||
</p>
|
|
||||||
{{end}}
|
|
||||||
{{if .ViewState.booking.Data.reason}}
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Motif : {{.ViewState.booking.Data.reason}}</p>
|
|
||||||
{{else if .ViewState.booking.Data.motif}}
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Motif : {{.ViewState.booking.Data.motif}}</p>
|
<p class="mt-1 text-sm text-gray-500">Motif : {{.ViewState.booking.Data.motif}}</p>
|
||||||
{{end}}
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation</h3>
|
<h3 class="text-lg leading-6 font-medium text-gray-900">Réservation</h3>
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations utiles sur la réservation.</p>
|
<p class="mt-1 text-sm text-gray-500">Informations utiles sur la réservation.</p>
|
||||||
@@ -220,7 +211,7 @@
|
|||||||
x-data="{ updateOpen: false }">
|
x-data="{ updateOpen: false }">
|
||||||
<div class="w-full inline-flex" x-show="!updateOpen">
|
<div class="w-full inline-flex" x-show="!updateOpen">
|
||||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Startdate).Format "02/01/2006"}}</div>
|
<div class="flex-1">{{(timeFrom .ViewState.booking.Startdate).Format "02/01/2006"}}</div>
|
||||||
{{if (not .ViewState.booking.Deleted)}}
|
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
|
||||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
@@ -242,7 +233,7 @@
|
|||||||
x-data="{ updateOpen: false }">
|
x-data="{ updateOpen: false }">
|
||||||
<div class="w-full inline-flex" x-show="!updateOpen">
|
<div class="w-full inline-flex" x-show="!updateOpen">
|
||||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Enddate).Format "02/01/2006"}}</div>
|
<div class="flex-1">{{(timeFrom .ViewState.booking.Enddate).Format "02/01/2006"}}</div>
|
||||||
{{if (not .ViewState.booking.Deleted)}}
|
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
|
||||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
@@ -264,7 +255,7 @@
|
|||||||
x-data="{ updateOpen: false }">
|
x-data="{ updateOpen: false }">
|
||||||
<div class="w-full inline-flex" x-show="!updateOpen">
|
<div class="w-full inline-flex" x-show="!updateOpen">
|
||||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Unavailablefrom).Format "02/01/2006"}}</div>
|
<div class="flex-1">{{(timeFrom .ViewState.booking.Unavailablefrom).Format "02/01/2006"}}</div>
|
||||||
{{if (not .ViewState.booking.Deleted)}}
|
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
|
||||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
@@ -286,7 +277,7 @@
|
|||||||
x-data="{ updateOpen: false }">
|
x-data="{ updateOpen: false }">
|
||||||
<div class="w-full inline-flex" x-show="!updateOpen">
|
<div class="w-full inline-flex" x-show="!updateOpen">
|
||||||
<div class="flex-1">{{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}</div>
|
<div class="flex-1">{{(timeFrom .ViewState.booking.Unavailableto).Format "02/01/2006"}}</div>
|
||||||
{{if (not .ViewState.booking.Deleted)}}
|
{{if (not (or .ViewState.booking.Deleted .ViewState.booking.Data.Deleted))}}
|
||||||
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
<a href="#" class="text-co-blue hover:text-co-blue ml-5" @click="updateOpen = ! updateOpen">Modifier</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -138,48 +138,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if .ViewState.vehicle_optional_fields}}
|
|
||||||
<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">Autres propriétés</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations complémentaires sur le véhicule</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
{{range .ViewState.vehicle_optional_fields}}
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
|
||||||
{{if eq .type "select"}}
|
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
|
||||||
<select id="{{.name}}" name="{{.name}}"
|
|
||||||
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">
|
|
||||||
{{range .options}}
|
|
||||||
<option value="{{.value}}">{{.label}}</option>
|
|
||||||
{{end}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{{else if eq .type "textarea"}}
|
|
||||||
<textarea id="{{.name}}" name="{{.name}}" rows="3"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl"></textarea>
|
|
||||||
{{else if eq .type "date"}}
|
|
||||||
<input type="date" id="{{.name}}" name="{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else if eq .type "number"}}
|
|
||||||
<input type="number" id="{{.name}}" name="{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else}}
|
|
||||||
<input type="text" id="{{.name}}" name="{{.name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<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>
|
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||||
<a href="/app/vehicles-management/">
|
<a href="/app/vehicles-management/">
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
<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é
|
||||||
</span>
|
</span>
|
||||||
{{else if .Deleted}}
|
{{else if or .Deleted .Data.Deleted}}
|
||||||
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
<span class="p-1 bg-co-red text-white text-xs font-bold rounded-xl" >
|
||||||
Annulé
|
Annulé
|
||||||
</span>
|
</span>
|
||||||
@@ -170,37 +170,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{if .ViewState.vehicle_optional_fields}}
|
<section aria-labelledby="timeline-title" class="lg:col-start-3 lg:col-span-1">
|
||||||
<section aria-labelledby="vehicle-other-properties-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">
|
||||||
<div class="bg-white shadow sm:rounded-lg">
|
<h2 id="timeline-title" class="text-lg font-medium text-gray-900">Réservations à venir</h2>
|
||||||
<div class="px-4 py-5 sm:px-6">
|
{{if eq (len .ViewState.vehicle.Bookings) 0}}
|
||||||
<h2 id="vehicle-other-properties-title" class="text-lg leading-6 font-medium text-gray-900">Autres propriétés</h2>
|
<p class="p-12 text-gray-500 text-center text-md">Aucune réservation à venir</p>
|
||||||
<p class="mt-1 max-w-2xl text-sm text-gray-500">Informations complémentaires sur le véhicule</p>
|
{{end}}
|
||||||
</div>
|
<ul role="list" class="divide-y divide-gray-200">
|
||||||
<div class="border-t border-gray-200 px-4 py-5 sm:px-6">
|
{{range .ViewState.vehicle.Bookings}}
|
||||||
<dl class="space-y-4">
|
<li class="py-4 flex">
|
||||||
{{range .ViewState.vehicle_optional_fields}}
|
<div class="ml-3">
|
||||||
{{if index $.ViewState.vehicle.Data .name}}
|
<a href="/app/vehicles-management/bookings/{{.ID}}" class="hover:bg-gray-200">
|
||||||
<div>
|
<p class="text-sm font-medium text-gray-900">Du {{(timeFrom .Startdate).Format "02/01/2006"}} au {{(timeFrom .Enddate).Format "02/01/2006"}}</p>
|
||||||
<dt class="text-sm font-medium text-gray-500">{{.label}}</dt>
|
<p class="text-sm text-gray-500"></p>
|
||||||
<dd class="mt-1 text-sm text-gray-900">
|
</a>
|
||||||
{{if eq .type "select"}}
|
|
||||||
{{$fieldValue := index $.ViewState.vehicle.Data .name}}
|
|
||||||
{{range .options}}
|
|
||||||
{{if eq .value $fieldValue}}{{.label}}{{end}}
|
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
{{index $.ViewState.vehicle.Data .name}}
|
|
||||||
{{end}}
|
|
||||||
</dd>
|
|
||||||
</div>
|
</div>
|
||||||
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
</ul>
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,8 @@
|
|||||||
fields: {
|
fields: {
|
||||||
licence_plate: '{{ .ViewState.vehicle.Data.licence_plate }}',
|
licence_plate: '{{ .ViewState.vehicle.Data.licence_plate }}',
|
||||||
name: '{{ .ViewState.vehicle.Data.name }}',
|
name: '{{ .ViewState.vehicle.Data.name }}',
|
||||||
type: '{{ .ViewState.vehicle.Type }}',
|
|
||||||
kilometers: '{{ .ViewState.vehicle.Data.kilometers }}',
|
kilometers: '{{ .ViewState.vehicle.Data.kilometers }}',
|
||||||
informations: '{{ .ViewState.vehicle.Data.informations}}',
|
informations: '{{ .ViewState.vahicle.Data.informations}}',
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
licence_plate: ['required', 'regexMatch:^[A-Z]{1,2}-[0-9]{1,3}-[A-Z]{1,2}$'],
|
licence_plate: ['required', 'regexMatch:^[A-Z]{1,2}-[0-9]{1,3}-[A-Z]{1,2}$'],
|
||||||
@@ -87,7 +86,7 @@
|
|||||||
<legend class="sr-only">Automatique</legend>
|
<legend class="sr-only">Automatique</legend>
|
||||||
<div class="relative flex items-start">
|
<div class="relative flex items-start">
|
||||||
<div class="flex h-5 items-center">
|
<div class="flex h-5 items-center">
|
||||||
<input id="automatic" aria-describedby="automatic-description" name="automatic" type="checkbox" {{if .ViewState.vehicle.Data.automatic}}checked{{end}} class="h-4 w-4 rounded border-gray-300 text-co-blue focus:ring-co-blue">
|
<input id="automatic" aria-describedby="automatic-description" name="automatic" type="checkbox" class="h-4 w-4 rounded border-gray-300 text-co-blue focus:ring-co-blue">
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-3 text-sm">
|
<div class="ml-3 text-sm">
|
||||||
<label for="automatic" class="font-medium text-gray-700">Automatique</label>
|
<label for="automatic" class="font-medium text-gray-700">Automatique</label>
|
||||||
@@ -127,8 +126,8 @@
|
|||||||
</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}}
|
{{if .ViewState.Data.address}}
|
||||||
{{$default := .ViewState.vehicle.Data.address}}
|
{{$default := .ViewState.Data.address}}
|
||||||
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
{{ template "address" dict "FieldName" $fieldName "Default" $default}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
{{ template "address_autocomplete" dict "FieldName" $fieldName}}
|
||||||
@@ -145,48 +144,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if .ViewState.vehicle_optional_fields}}
|
|
||||||
<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">Autres propriétés</h3>
|
|
||||||
<p class="mt-1 text-sm text-gray-500">Informations complémentaires sur le véhicule</p>
|
|
||||||
</div>
|
|
||||||
<div class="mt-5 md:mt-0 md:col-span-2">
|
|
||||||
<div class="grid grid-cols-6 gap-6">
|
|
||||||
{{range .ViewState.vehicle_optional_fields}}
|
|
||||||
<div class="col-span-6 sm:col-span-3">
|
|
||||||
<label for="{{.name}}" class="block text-sm font-medium text-gray-700">{{.label}}</label>
|
|
||||||
{{if eq .type "select"}}
|
|
||||||
<div class="sm:mt-0 sm:col-span-2">
|
|
||||||
<select id="{{.name}}" name="{{.name}}"
|
|
||||||
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">
|
|
||||||
{{range .options}}
|
|
||||||
<option value="{{.value}}" {{if eq .value (index $.ViewState.vehicle.Data .name)}}selected{{end}}>{{.label}}</option>
|
|
||||||
{{end}}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
{{else if eq .type "textarea"}}
|
|
||||||
<textarea id="{{.name}}" name="{{.name}}" rows="3"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">{{index $.ViewState.vehicle.Data .name}}</textarea>
|
|
||||||
{{else if eq .type "date"}}
|
|
||||||
<input type="date" id="{{.name}}" name="{{.name}}" value="{{index $.ViewState.vehicle.Data .name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else if eq .type "number"}}
|
|
||||||
<input type="number" id="{{.name}}" name="{{.name}}" value="{{index $.ViewState.vehicle.Data .name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{else}}
|
|
||||||
<input type="text" id="{{.name}}" name="{{.name}}" value="{{index $.ViewState.vehicle.Data .name}}"
|
|
||||||
class="mt-1 focus:ring-co-blue focus:border-co-blue block w-full shadow-sm sm:text-sm border-gray-300 rounded-2xl">
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<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>
|
<p x-show="! isFormValid" class="px-4 py-2 text-sm text-co-red">Certains champs de sont pas valides.</p>
|
||||||
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle.ID}}">
|
<a href="/app/vehicles-management/fleet/{{.ViewState.vehicle.ID}}">
|
||||||
|
|||||||
@@ -1,20 +1,13 @@
|
|||||||
/*! tailwindcss v4.0.9 | MIT License | https://tailwindcss.com */
|
/*! tailwindcss v4.0.8 | MIT License | https://tailwindcss.com */
|
||||||
@layer theme, base, components, utilities;
|
@layer theme, base, components, utilities;
|
||||||
@layer theme {
|
@layer theme {
|
||||||
:root, :host {
|
:root, :host {
|
||||||
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
--font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||||
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
'Noto Color Emoji';
|
||||||
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||||
"Courier New", monospace;
|
monospace;
|
||||||
--color-red-100: oklch(0.936 0.032 17.717);
|
|
||||||
--color-red-500: oklch(0.637 0.237 25.331);
|
--color-red-500: oklch(0.637 0.237 25.331);
|
||||||
--color-red-600: oklch(0.577 0.245 27.325);
|
|
||||||
--color-red-800: oklch(0.444 0.177 26.899);
|
|
||||||
--color-red-900: oklch(0.396 0.141 25.723);
|
|
||||||
--color-yellow-100: oklch(0.973 0.071 103.193);
|
|
||||||
--color-yellow-800: oklch(0.476 0.114 61.907);
|
|
||||||
--color-green-100: oklch(0.962 0.044 156.743);
|
--color-green-100: oklch(0.962 0.044 156.743);
|
||||||
--color-green-600: oklch(0.627 0.194 149.214);
|
|
||||||
--color-green-800: oklch(0.448 0.119 151.328);
|
--color-green-800: oklch(0.448 0.119 151.328);
|
||||||
--color-blue-500: oklch(0.623 0.214 259.815);
|
--color-blue-500: oklch(0.623 0.214 259.815);
|
||||||
--color-blue-700: oklch(0.488 0.243 264.376);
|
--color-blue-700: oklch(0.488 0.243 264.376);
|
||||||
@@ -74,18 +67,12 @@
|
|||||||
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
--default-font-family: var(--font-sans);
|
--default-font-family: var(--font-sans);
|
||||||
--default-font-feature-settings: var(--font-sans--font-feature-settings);
|
--default-font-feature-settings: var(--font-sans--font-feature-settings);
|
||||||
--default-font-variation-settings: var(
|
--default-font-variation-settings: var(--font-sans--font-variation-settings);
|
||||||
--font-sans--font-variation-settings
|
|
||||||
);
|
|
||||||
--default-mono-font-family: var(--font-mono);
|
--default-mono-font-family: var(--font-mono);
|
||||||
--default-mono-font-feature-settings: var(
|
--default-mono-font-feature-settings: var(--font-mono--font-feature-settings);
|
||||||
--font-mono--font-feature-settings
|
--default-mono-font-variation-settings: var(--font-mono--font-variation-settings);
|
||||||
);
|
--color-co-blue: #00727e;
|
||||||
--default-mono-font-variation-settings: var(
|
--color-co-red: #de1581;
|
||||||
--font-mono--font-variation-settings
|
|
||||||
);
|
|
||||||
--color-co-blue: #243887;
|
|
||||||
--color-co-red: #ff1300;
|
|
||||||
--color-co-green: #6cc11f;
|
--color-co-green: #6cc11f;
|
||||||
--color-co-yellow: #ffdd00;
|
--color-co-yellow: #ffdd00;
|
||||||
--radius-co: 40%;
|
--radius-co: 40%;
|
||||||
@@ -102,9 +89,9 @@
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
-webkit-text-size-adjust: 100%;
|
-webkit-text-size-adjust: 100%;
|
||||||
tab-size: 4;
|
tab-size: 4;
|
||||||
font-family: var( --default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" );
|
font-family: var( --default-font-family, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji' );
|
||||||
font-feature-settings: var(--default-font-feature-settings, normal);
|
font-feature-settings: var(--default-font-feature-settings, normal);
|
||||||
font-variation-settings: var( --default-font-variation-settings, normal );
|
font-variation-settings: var(--default-font-variation-settings, normal);
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
@@ -132,9 +119,9 @@
|
|||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
code, kbd, samp, pre {
|
code, kbd, samp, pre {
|
||||||
font-family: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );
|
font-family: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace );
|
||||||
font-feature-settings: var( --default-mono-font-feature-settings, normal );
|
font-feature-settings: var(--default-mono-font-feature-settings, normal);
|
||||||
font-variation-settings: var( --default-mono-font-variation-settings, normal );
|
font-variation-settings: var(--default-mono-font-variation-settings, normal);
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
}
|
}
|
||||||
small {
|
small {
|
||||||
@@ -222,13 +209,13 @@
|
|||||||
:-moz-ui-invalid {
|
:-moz-ui-invalid {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
|
button, input:where([type='button'], [type='reset'], [type='submit']), ::file-selector-button {
|
||||||
appearance: button;
|
appearance: button;
|
||||||
}
|
}
|
||||||
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
[hidden]:where(:not([hidden="until-found"])) {
|
[hidden]:where(:not([hidden='until-found'])) {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -362,9 +349,6 @@
|
|||||||
.col-span-full {
|
.col-span-full {
|
||||||
grid-column: 1 / -1;
|
grid-column: 1 / -1;
|
||||||
}
|
}
|
||||||
.col-start-1 {
|
|
||||||
grid-column-start: 1;
|
|
||||||
}
|
|
||||||
.col-start-auto {
|
.col-start-auto {
|
||||||
grid-column-start: auto;
|
grid-column-start: auto;
|
||||||
}
|
}
|
||||||
@@ -377,9 +361,6 @@
|
|||||||
.row-span-full {
|
.row-span-full {
|
||||||
grid-row: 1 / -1;
|
grid-row: 1 / -1;
|
||||||
}
|
}
|
||||||
.row-start-1 {
|
|
||||||
grid-row-start: 1;
|
|
||||||
}
|
|
||||||
.row-start-auto {
|
.row-start-auto {
|
||||||
grid-row-start: auto;
|
grid-row-start: auto;
|
||||||
}
|
}
|
||||||
@@ -470,15 +451,9 @@
|
|||||||
.-mx-4 {
|
.-mx-4 {
|
||||||
margin-inline: calc(var(--spacing) * -4);
|
margin-inline: calc(var(--spacing) * -4);
|
||||||
}
|
}
|
||||||
.mx-2 {
|
|
||||||
margin-inline: calc(var(--spacing) * 2);
|
|
||||||
}
|
|
||||||
.mx-auto {
|
.mx-auto {
|
||||||
margin-inline: auto;
|
margin-inline: auto;
|
||||||
}
|
}
|
||||||
.-my-1 {
|
|
||||||
margin-block: calc(var(--spacing) * -1);
|
|
||||||
}
|
|
||||||
.-my-1\.5 {
|
.-my-1\.5 {
|
||||||
margin-block: calc(var(--spacing) * -1.5);
|
margin-block: calc(var(--spacing) * -1.5);
|
||||||
}
|
}
|
||||||
@@ -527,9 +502,6 @@
|
|||||||
.mt-10 {
|
.mt-10 {
|
||||||
margin-top: calc(var(--spacing) * 10);
|
margin-top: calc(var(--spacing) * 10);
|
||||||
}
|
}
|
||||||
.-mr-1 {
|
|
||||||
margin-right: calc(var(--spacing) * -1);
|
|
||||||
}
|
|
||||||
.-mr-1\.5 {
|
.-mr-1\.5 {
|
||||||
margin-right: calc(var(--spacing) * -1.5);
|
margin-right: calc(var(--spacing) * -1.5);
|
||||||
}
|
}
|
||||||
@@ -560,9 +532,6 @@
|
|||||||
.mb-4 {
|
.mb-4 {
|
||||||
margin-bottom: calc(var(--spacing) * 4);
|
margin-bottom: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
.mb-6 {
|
|
||||||
margin-bottom: calc(var(--spacing) * 6);
|
|
||||||
}
|
|
||||||
.mb-10 {
|
.mb-10 {
|
||||||
margin-bottom: calc(var(--spacing) * 10);
|
margin-bottom: calc(var(--spacing) * 10);
|
||||||
}
|
}
|
||||||
@@ -683,10 +652,6 @@
|
|||||||
.aspect-square {
|
.aspect-square {
|
||||||
aspect-ratio: 1 / 1;
|
aspect-ratio: 1 / 1;
|
||||||
}
|
}
|
||||||
.size-5 {
|
|
||||||
width: calc(var(--spacing) * 5);
|
|
||||||
height: calc(var(--spacing) * 5);
|
|
||||||
}
|
|
||||||
.h-0 {
|
.h-0 {
|
||||||
height: calc(var(--spacing) * 0);
|
height: calc(var(--spacing) * 0);
|
||||||
}
|
}
|
||||||
@@ -732,33 +697,18 @@
|
|||||||
.max-h-screen {
|
.max-h-screen {
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
}
|
}
|
||||||
.min-h-96 {
|
|
||||||
min-height: calc(var(--spacing) * 96);
|
|
||||||
}
|
|
||||||
.min-h-full {
|
.min-h-full {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
.min-h-screen {
|
.min-h-screen {
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
.w-0 {
|
|
||||||
width: calc(var(--spacing) * 0);
|
|
||||||
}
|
|
||||||
.w-0\.5 {
|
.w-0\.5 {
|
||||||
width: calc(var(--spacing) * 0.5);
|
width: calc(var(--spacing) * 0.5);
|
||||||
}
|
}
|
||||||
.w-1 {
|
|
||||||
width: calc(var(--spacing) * 1);
|
|
||||||
}
|
|
||||||
.w-1\/2 {
|
.w-1\/2 {
|
||||||
width: calc(1/2 * 100%);
|
width: calc(1/2 * 100%);
|
||||||
}
|
}
|
||||||
.w-1\/4 {
|
|
||||||
width: calc(1/4 * 100%);
|
|
||||||
}
|
|
||||||
.w-1\/6 {
|
|
||||||
width: calc(1/6 * 100%);
|
|
||||||
}
|
|
||||||
.w-3 {
|
.w-3 {
|
||||||
width: calc(var(--spacing) * 3);
|
width: calc(var(--spacing) * 3);
|
||||||
}
|
}
|
||||||
@@ -792,6 +742,9 @@
|
|||||||
.w-48 {
|
.w-48 {
|
||||||
width: calc(var(--spacing) * 48);
|
width: calc(var(--spacing) * 48);
|
||||||
}
|
}
|
||||||
|
.w-100 {
|
||||||
|
width: calc(var(--spacing) * 100);
|
||||||
|
}
|
||||||
.w-auto {
|
.w-auto {
|
||||||
width: auto;
|
width: auto;
|
||||||
}
|
}
|
||||||
@@ -831,9 +784,6 @@
|
|||||||
.min-w-full {
|
.min-w-full {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
}
|
}
|
||||||
.min-w-max {
|
|
||||||
min-width: max-content;
|
|
||||||
}
|
|
||||||
.min-w-screen {
|
.min-w-screen {
|
||||||
min-width: 100vw;
|
min-width: 100vw;
|
||||||
}
|
}
|
||||||
@@ -1265,9 +1215,6 @@
|
|||||||
.justify-items-stretch {
|
.justify-items-stretch {
|
||||||
justify-items: stretch;
|
justify-items: stretch;
|
||||||
}
|
}
|
||||||
.gap-2 {
|
|
||||||
gap: calc(var(--spacing) * 2);
|
|
||||||
}
|
|
||||||
.gap-4 {
|
.gap-4 {
|
||||||
gap: calc(var(--spacing) * 4);
|
gap: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
@@ -1277,9 +1224,6 @@
|
|||||||
.gap-6 {
|
.gap-6 {
|
||||||
gap: calc(var(--spacing) * 6);
|
gap: calc(var(--spacing) * 6);
|
||||||
}
|
}
|
||||||
.gap-8 {
|
|
||||||
gap: calc(var(--spacing) * 8);
|
|
||||||
}
|
|
||||||
.-space-y-px {
|
.-space-y-px {
|
||||||
:where(& > :not(:last-child)) {
|
:where(& > :not(:last-child)) {
|
||||||
--tw-space-y-reverse: 0;
|
--tw-space-y-reverse: 0;
|
||||||
@@ -1294,20 +1238,6 @@
|
|||||||
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
margin-block-end: calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.space-y-2 {
|
|
||||||
:where(& > :not(:last-child)) {
|
|
||||||
--tw-space-y-reverse: 0;
|
|
||||||
margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));
|
|
||||||
margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.space-y-3 {
|
|
||||||
:where(& > :not(:last-child)) {
|
|
||||||
--tw-space-y-reverse: 0;
|
|
||||||
margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));
|
|
||||||
margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.space-y-4 {
|
.space-y-4 {
|
||||||
:where(& > :not(:last-child)) {
|
:where(& > :not(:last-child)) {
|
||||||
--tw-space-y-reverse: 0;
|
--tw-space-y-reverse: 0;
|
||||||
@@ -1763,9 +1693,6 @@
|
|||||||
.bg-indigo-600 {
|
.bg-indigo-600 {
|
||||||
background-color: var(--color-indigo-600);
|
background-color: var(--color-indigo-600);
|
||||||
}
|
}
|
||||||
.bg-red-100 {
|
|
||||||
background-color: var(--color-red-100);
|
|
||||||
}
|
|
||||||
.bg-red-500 {
|
.bg-red-500 {
|
||||||
background-color: var(--color-red-500);
|
background-color: var(--color-red-500);
|
||||||
}
|
}
|
||||||
@@ -1778,9 +1705,6 @@
|
|||||||
.bg-white {
|
.bg-white {
|
||||||
background-color: var(--color-white);
|
background-color: var(--color-white);
|
||||||
}
|
}
|
||||||
.bg-yellow-100 {
|
|
||||||
background-color: var(--color-yellow-100);
|
|
||||||
}
|
|
||||||
.-bg-conic {
|
.-bg-conic {
|
||||||
--tw-gradient-position: in oklab;
|
--tw-gradient-position: in oklab;
|
||||||
background-image: conic-gradient(var(--tw-gradient-stops));
|
background-image: conic-gradient(var(--tw-gradient-stops));
|
||||||
@@ -1968,9 +1892,6 @@
|
|||||||
.p-4 {
|
.p-4 {
|
||||||
padding: calc(var(--spacing) * 4);
|
padding: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
.p-10 {
|
|
||||||
padding: calc(var(--spacing) * 10);
|
|
||||||
}
|
|
||||||
.p-12 {
|
.p-12 {
|
||||||
padding: calc(var(--spacing) * 12);
|
padding: calc(var(--spacing) * 12);
|
||||||
}
|
}
|
||||||
@@ -1980,9 +1901,6 @@
|
|||||||
.px-2 {
|
.px-2 {
|
||||||
padding-inline: calc(var(--spacing) * 2);
|
padding-inline: calc(var(--spacing) * 2);
|
||||||
}
|
}
|
||||||
.px-2\.5 {
|
|
||||||
padding-inline: calc(var(--spacing) * 2.5);
|
|
||||||
}
|
|
||||||
.px-3 {
|
.px-3 {
|
||||||
padding-inline: calc(var(--spacing) * 3);
|
padding-inline: calc(var(--spacing) * 3);
|
||||||
}
|
}
|
||||||
@@ -1992,18 +1910,9 @@
|
|||||||
.px-6 {
|
.px-6 {
|
||||||
padding-inline: calc(var(--spacing) * 6);
|
padding-inline: calc(var(--spacing) * 6);
|
||||||
}
|
}
|
||||||
.py-0 {
|
|
||||||
padding-block: calc(var(--spacing) * 0);
|
|
||||||
}
|
|
||||||
.py-0\.5 {
|
|
||||||
padding-block: calc(var(--spacing) * 0.5);
|
|
||||||
}
|
|
||||||
.py-1 {
|
.py-1 {
|
||||||
padding-block: calc(var(--spacing) * 1);
|
padding-block: calc(var(--spacing) * 1);
|
||||||
}
|
}
|
||||||
.py-1\.5 {
|
|
||||||
padding-block: calc(var(--spacing) * 1.5);
|
|
||||||
}
|
|
||||||
.py-2 {
|
.py-2 {
|
||||||
padding-block: calc(var(--spacing) * 2);
|
padding-block: calc(var(--spacing) * 2);
|
||||||
}
|
}
|
||||||
@@ -2031,9 +1940,6 @@
|
|||||||
.py-12 {
|
.py-12 {
|
||||||
padding-block: calc(var(--spacing) * 12);
|
padding-block: calc(var(--spacing) * 12);
|
||||||
}
|
}
|
||||||
.pt-1 {
|
|
||||||
padding-top: calc(var(--spacing) * 1);
|
|
||||||
}
|
|
||||||
.pt-1\.5 {
|
.pt-1\.5 {
|
||||||
padding-top: calc(var(--spacing) * 1.5);
|
padding-top: calc(var(--spacing) * 1.5);
|
||||||
}
|
}
|
||||||
@@ -2061,9 +1967,6 @@
|
|||||||
.pr-4 {
|
.pr-4 {
|
||||||
padding-right: calc(var(--spacing) * 4);
|
padding-right: calc(var(--spacing) * 4);
|
||||||
}
|
}
|
||||||
.pr-8 {
|
|
||||||
padding-right: calc(var(--spacing) * 8);
|
|
||||||
}
|
|
||||||
.pr-9 {
|
.pr-9 {
|
||||||
padding-right: calc(var(--spacing) * 9);
|
padding-right: calc(var(--spacing) * 9);
|
||||||
}
|
}
|
||||||
@@ -2170,10 +2073,6 @@
|
|||||||
font-size: var(--text-xs);
|
font-size: var(--text-xs);
|
||||||
line-height: var(--tw-leading, var(--text-xs--line-height));
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
||||||
}
|
}
|
||||||
.text-sm\/6 {
|
|
||||||
font-size: var(--text-sm);
|
|
||||||
line-height: calc(var(--spacing) * 6);
|
|
||||||
}
|
|
||||||
.leading-4 {
|
.leading-4 {
|
||||||
--tw-leading: calc(var(--spacing) * 4);
|
--tw-leading: calc(var(--spacing) * 4);
|
||||||
line-height: calc(var(--spacing) * 4);
|
line-height: calc(var(--spacing) * 4);
|
||||||
@@ -2315,33 +2214,18 @@
|
|||||||
.text-gray-700 {
|
.text-gray-700 {
|
||||||
color: var(--color-gray-700);
|
color: var(--color-gray-700);
|
||||||
}
|
}
|
||||||
.text-gray-800 {
|
|
||||||
color: var(--color-gray-800);
|
|
||||||
}
|
|
||||||
.text-gray-900 {
|
.text-gray-900 {
|
||||||
color: var(--color-gray-900);
|
color: var(--color-gray-900);
|
||||||
}
|
}
|
||||||
.text-green-600 {
|
|
||||||
color: var(--color-green-600);
|
|
||||||
}
|
|
||||||
.text-green-800 {
|
.text-green-800 {
|
||||||
color: var(--color-green-800);
|
color: var(--color-green-800);
|
||||||
}
|
}
|
||||||
.text-indigo-600 {
|
.text-indigo-600 {
|
||||||
color: var(--color-indigo-600);
|
color: var(--color-indigo-600);
|
||||||
}
|
}
|
||||||
.text-red-600 {
|
|
||||||
color: var(--color-red-600);
|
|
||||||
}
|
|
||||||
.text-red-800 {
|
|
||||||
color: var(--color-red-800);
|
|
||||||
}
|
|
||||||
.text-white {
|
.text-white {
|
||||||
color: var(--color-white);
|
color: var(--color-white);
|
||||||
}
|
}
|
||||||
.text-yellow-800 {
|
|
||||||
color: var(--color-yellow-800);
|
|
||||||
}
|
|
||||||
.capitalize {
|
.capitalize {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
@@ -2582,16 +2466,6 @@
|
|||||||
outline-style: var(--tw-outline-style);
|
outline-style: var(--tw-outline-style);
|
||||||
outline-width: 1px;
|
outline-width: 1px;
|
||||||
}
|
}
|
||||||
.outline-1 {
|
|
||||||
outline-style: var(--tw-outline-style);
|
|
||||||
outline-width: 1px;
|
|
||||||
}
|
|
||||||
.-outline-offset-1 {
|
|
||||||
outline-offset: calc(1px * -1);
|
|
||||||
}
|
|
||||||
.outline-gray-300 {
|
|
||||||
outline-color: var(--color-gray-300);
|
|
||||||
}
|
|
||||||
.blur {
|
.blur {
|
||||||
--tw-blur: blur(8px);
|
--tw-blur: blur(8px);
|
||||||
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
filter: var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,);
|
||||||
@@ -2882,11 +2756,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.placeholder\:text-gray-400 {
|
|
||||||
&::placeholder {
|
|
||||||
color: var(--color-gray-400);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus-within\:text-gray-600 {
|
.focus-within\:text-gray-600 {
|
||||||
&:focus-within {
|
&:focus-within {
|
||||||
color: var(--color-gray-600);
|
color: var(--color-gray-600);
|
||||||
@@ -3013,13 +2882,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hover\:text-red-900 {
|
|
||||||
&:hover {
|
|
||||||
@media (hover: hover) {
|
|
||||||
color: var(--color-red-900);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hover\:text-white {
|
.hover\:text-white {
|
||||||
&:hover {
|
&:hover {
|
||||||
@media (hover: hover) {
|
@media (hover: hover) {
|
||||||
@@ -3027,11 +2889,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.focus\:z-20 {
|
|
||||||
&:focus {
|
|
||||||
z-index: 20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus\:border-blue-500 {
|
.focus\:border-blue-500 {
|
||||||
&:focus {
|
&:focus {
|
||||||
border-color: var(--color-blue-500);
|
border-color: var(--color-blue-500);
|
||||||
@@ -3113,27 +2970,6 @@
|
|||||||
--tw-ring-offset-color: var(--color-gray-100);
|
--tw-ring-offset-color: var(--color-gray-100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.focus\:outline-2 {
|
|
||||||
&:focus {
|
|
||||||
outline-style: var(--tw-outline-style);
|
|
||||||
outline-width: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus\:-outline-offset-2 {
|
|
||||||
&:focus {
|
|
||||||
outline-offset: calc(2px * -1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus\:outline-offset-0 {
|
|
||||||
&:focus {
|
|
||||||
outline-offset: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus\:outline-indigo-600 {
|
|
||||||
&:focus {
|
|
||||||
outline-color: var(--color-indigo-600);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus\:outline-none {
|
.focus\:outline-none {
|
||||||
&:focus {
|
&:focus {
|
||||||
--tw-outline-style: none;
|
--tw-outline-style: none;
|
||||||
@@ -3145,38 +2981,6 @@
|
|||||||
--tw-ring-inset: inset;
|
--tw-ring-inset: inset;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.focus-visible\:outline {
|
|
||||||
&:focus-visible {
|
|
||||||
outline-style: var(--tw-outline-style);
|
|
||||||
outline-width: 1px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus-visible\:outline-2 {
|
|
||||||
&:focus-visible {
|
|
||||||
outline-style: var(--tw-outline-style);
|
|
||||||
outline-width: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus-visible\:-outline-offset-2 {
|
|
||||||
&:focus-visible {
|
|
||||||
outline-offset: calc(2px * -1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus-visible\:outline-offset-2 {
|
|
||||||
&:focus-visible {
|
|
||||||
outline-offset: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus-visible\:outline-co-blue {
|
|
||||||
&:focus-visible {
|
|
||||||
outline-color: var(--color-co-blue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.focus-visible\:outline-indigo-600 {
|
|
||||||
&:focus-visible {
|
|
||||||
outline-color: var(--color-indigo-600);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.disabled\:cursor-not-allowed {
|
.disabled\:cursor-not-allowed {
|
||||||
&:disabled {
|
&:disabled {
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
@@ -3187,11 +2991,6 @@
|
|||||||
opacity: 30%;
|
opacity: 30%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.disabled\:opacity-50 {
|
|
||||||
&:disabled {
|
|
||||||
opacity: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.sm\:col-span-1 {
|
.sm\:col-span-1 {
|
||||||
@media (width >= 40rem) {
|
@media (width >= 40rem) {
|
||||||
grid-column: span 1 / span 1;
|
grid-column: span 1 / span 1;
|
||||||
@@ -3287,12 +3086,6 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sm\:size-4 {
|
|
||||||
@media (width >= 40rem) {
|
|
||||||
width: calc(var(--spacing) * 4);
|
|
||||||
height: calc(var(--spacing) * 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.sm\:w-auto {
|
.sm\:w-auto {
|
||||||
@media (width >= 40rem) {
|
@media (width >= 40rem) {
|
||||||
width: auto;
|
width: auto;
|
||||||
@@ -3303,11 +3096,6 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sm\:max-w-lg {
|
|
||||||
@media (width >= 40rem) {
|
|
||||||
max-width: var(--container-lg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.sm\:max-w-md {
|
.sm\:max-w-md {
|
||||||
@media (width >= 40rem) {
|
@media (width >= 40rem) {
|
||||||
max-width: var(--container-md);
|
max-width: var(--container-md);
|
||||||
@@ -3507,12 +3295,6 @@
|
|||||||
line-height: var(--tw-leading, var(--text-sm--line-height));
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sm\:text-sm\/6 {
|
|
||||||
@media (width >= 40rem) {
|
|
||||||
font-size: var(--text-sm);
|
|
||||||
line-height: calc(var(--spacing) * 6);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.md\:fixed {
|
.md\:fixed {
|
||||||
@media (width >= 48rem) {
|
@media (width >= 48rem) {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -3721,11 +3503,6 @@
|
|||||||
grid-template-columns: repeat(1, minmax(0, 1fr));
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.lg\:grid-cols-2 {
|
|
||||||
@media (width >= 64rem) {
|
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.lg\:grid-cols-3 {
|
.lg\:grid-cols-3 {
|
||||||
@media (width >= 64rem) {
|
@media (width >= 64rem) {
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
@@ -3756,54 +3533,6 @@
|
|||||||
background-color: var(--color-gray-800);
|
background-color: var(--color-gray-800);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.dark\:bg-white\/5 {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
background-color: color-mix(in oklab, var(--color-white) 5%, transparent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dark\:text-gray-400 {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
color: var(--color-gray-400);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dark\:text-white {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
color: var(--color-white);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dark\:outline-white\/10 {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
outline-color: color-mix(in oklab, var(--color-white) 10%, transparent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dark\:\*\:bg-gray-800 {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:is(& > *) {
|
|
||||||
background-color: var(--color-gray-800);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dark\:placeholder\:text-gray-500 {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
&::placeholder {
|
|
||||||
color: var(--color-gray-500);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dark\:focus\:outline-co-blue {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
&:focus {
|
|
||||||
outline-color: var(--color-co-blue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dark\:focus-visible\:outline-co-blue {
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
&:focus-visible {
|
|
||||||
outline-color: var(--color-co-blue);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Manometer";
|
font-family: "Manometer";
|
||||||
|
|||||||
BIN
web/public/images/departement06.png
Normal file
BIN
web/public/images/departement06.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
@@ -1 +1,91 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 374.2 33.2"><defs><style>.cls-1{fill:#ff1300;}.cls-2{fill:#fff;}</style></defs><g id="Calque_2" data-name="Calque 2"><g id="Calque_1-2" data-name="Calque 1"><path class="cls-1" d="M300.9.6a4.7,4.7,0,0,1,4.9,4.9V32.6h-8.6a4.7,4.7,0,0,1-4.9-4.9V14.1h-.9c-.6,0-1,.6-1,1.5v17H282a4.7,4.7,0,0,1-4.9-4.9V14.1h-1a1.4,1.4,0,0,0-.9,1.5v17H263a1.2,1.2,0,0,1-1.2-1.2V5.5A4.7,4.7,0,0,1,266.7.6h17.9l-.7,5a.9.9,0,0,0,.7,1.1.9.9,0,0,0,1-.8l.8-4.6a.9.9,0,0,1,.9-.7Z"/><path class="cls-1" d="M341.1,16.4c0,9.1-1.9,16.8-16.5,16.8S307.8,25,307.8,16.4,310.6,0,324.6,0,341.1,7.8,341.1,16.4Z"/><path class="cls-1" d="M344.3,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,344.3.6h18.8c6.9,0,10.4,2.9,10.4,8.1s-1.6,6.9-4.5,7.5h0c2.9.6,5.2,3.2,5.2,7.7s-3.5,8.6-10.4,8.6Z"/><path class="cls-2" d="M16.2,11.6c0-.6-.4-.9-1-.9h-.8V31.4a1.2,1.2,0,0,1-1.2,1.2H1.2A1.2,1.2,0,0,1,0,31.4V1.8A1.2,1.2,0,0,1,1.2.6H16.8C25.7.6,30.9,4.2,31,10.7s-4.1,9.9-9.4,10H16.1Z"/><path class="cls-2" d="M44.9,23.1H43.2L40,31.9a1.1,1.1,0,0,1-1.2.7H26.9a1.3,1.3,0,0,1-1.3-1.9L37,3.4A4.5,4.5,0,0,1,41.3.6h5.8a4.1,4.1,0,0,1,4,2.6L62.6,30.8c.5,1-.2,1.8-1.3,1.8H41.7Z"/><path class="cls-2" d="M66.1,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,66.1.6H83.2C92.7.6,95.5,7,95.6,12.3c0,3.3-.8,6.9-3.4,8.3l3.4,12H84.4c-2.3,0-5.2-.7-5.9-2.7L71.9,10.7a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"/><path class="cls-2" d="M129.6,17.1c.8,0,1.3.5,1.2,1.2-.2,8.3-2.9,14.9-16.4,14.9-15.8.1-16.8-8.2-16.8-16.8S100.5,0,114.4,0c15.7,0,16.5,8,16.5,15.4H115.3V11.3c0-.8-.4-1.2-1-1.2s-.9.4-.9,1.2V21.9c0,.9.4,1.2.9,1.2s1-.3,1-1.2V17.1Z"/><path class="cls-2" d="M166.2,16.4c0,9.1-2,16.8-16.6,16.8S132.8,25,132.8,16.4,135.7,0,149.6,0,166.2,7.8,166.2,16.4Z"/><path class="cls-2" d="M200.5,1.8V12.2c0,12.7-1.4,21-16.3,21s-16-8.4-16-20.9V1.8A1.2,1.2,0,0,1,169.4.6h13a.9.9,0,0,1,.9.9V21.8c0,.9.4,1.2,1,1.2s.9-.3.9-1.2V1.5a.9.9,0,0,1,.9-.9h13.1A1.2,1.2,0,0,1,200.5,1.8Z"/><path class="cls-2" d="M203.9,32.6a1.2,1.2,0,0,1-1.3-1.2V1.8A1.2,1.2,0,0,1,203.8.6h17.1c9.5,0,12.3,6.4,12.4,11.7,0,3.3-.8,6.9-3.4,8.3l3.4,12H222.1c-2.3,0-5.2-.7-5.9-2.7l-6.6-19.2a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"/><path class="cls-2" d="M235.8,29.2v-10a1,1,0,0,1,1.5-1l11.1,5.1a1,1,0,0,0,1.2-.4.9.9,0,0,0-.6-1.2l-9.3-4.4c-4.5-2.2-4.4-5.5-4.4-8.2,0-7.6,7.4-9.1,14.6-9.1,5.4,0,12.1,1.8,14.3,4.4v9.2a1,1,0,0,1-1.5,1L252.3,9.8a1,1,0,0,0-1.3.4q-.3.8.6,1.2l8.5,4.1c5.3,2.6,4.7,4.9,4.7,9.2s-6.3,8.5-14.9,8.5C244.7,33.2,238,31.6,235.8,29.2Z"/></g></g></svg>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
viewBox="0 0 374.2 33.2"
|
||||||
|
version="1.1"
|
||||||
|
id="svg30"
|
||||||
|
sodipodi:docname="main_logo.svg"
|
||||||
|
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="namedview32"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#000000"
|
||||||
|
borderopacity="0.25"
|
||||||
|
inkscape:showpageshadow="2"
|
||||||
|
inkscape:pageopacity="0.0"
|
||||||
|
inkscape:pagecheckerboard="0"
|
||||||
|
inkscape:deskcolor="#d1d1d1"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="4.0700159"
|
||||||
|
inkscape:cx="317.93488"
|
||||||
|
inkscape:cy="16.707551"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1011"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="Calque_1-2" />
|
||||||
|
<defs
|
||||||
|
id="defs4">
|
||||||
|
<style
|
||||||
|
id="style2">.cls-1{fill:#ff1300;}.cls-2{fill:#fff;}</style>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
id="Calque_2"
|
||||||
|
data-name="Calque 2">
|
||||||
|
<g
|
||||||
|
id="Calque_1-2"
|
||||||
|
data-name="Calque 1">
|
||||||
|
<path
|
||||||
|
class="cls-1"
|
||||||
|
d="M300.9.6a4.7,4.7,0,0,1,4.9,4.9V32.6h-8.6a4.7,4.7,0,0,1-4.9-4.9V14.1h-.9c-.6,0-1,.6-1,1.5v17H282a4.7,4.7,0,0,1-4.9-4.9V14.1h-1a1.4,1.4,0,0,0-.9,1.5v17H263a1.2,1.2,0,0,1-1.2-1.2V5.5A4.7,4.7,0,0,1,266.7.6h17.9l-.7,5a.9.9,0,0,0,.7,1.1.9.9,0,0,0,1-.8l.8-4.6a.9.9,0,0,1,.9-.7Z"
|
||||||
|
id="path6"
|
||||||
|
style="fill:#ffffff;fill-opacity:1" />
|
||||||
|
<path
|
||||||
|
class="cls-1"
|
||||||
|
d="M341.1,16.4c0,9.1-1.9,16.8-16.5,16.8S307.8,25,307.8,16.4,310.6,0,324.6,0,341.1,7.8,341.1,16.4Z"
|
||||||
|
id="path8"
|
||||||
|
style="fill:#ffffff;fill-opacity:1" />
|
||||||
|
<path
|
||||||
|
class="cls-1"
|
||||||
|
d="M344.3,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,344.3.6h18.8c6.9,0,10.4,2.9,10.4,8.1s-1.6,6.9-4.5,7.5h0c2.9.6,5.2,3.2,5.2,7.7s-3.5,8.6-10.4,8.6Z"
|
||||||
|
id="path10"
|
||||||
|
style="fill:#ffffff;fill-opacity:1" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M16.2,11.6c0-.6-.4-.9-1-.9h-.8V31.4a1.2,1.2,0,0,1-1.2,1.2H1.2A1.2,1.2,0,0,1,0,31.4V1.8A1.2,1.2,0,0,1,1.2.6H16.8C25.7.6,30.9,4.2,31,10.7s-4.1,9.9-9.4,10H16.1Z"
|
||||||
|
id="path12" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M44.9,23.1H43.2L40,31.9a1.1,1.1,0,0,1-1.2.7H26.9a1.3,1.3,0,0,1-1.3-1.9L37,3.4A4.5,4.5,0,0,1,41.3.6h5.8a4.1,4.1,0,0,1,4,2.6L62.6,30.8c.5,1-.2,1.8-1.3,1.8H41.7Z"
|
||||||
|
id="path14" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M66.1,32.6a1.2,1.2,0,0,1-1.2-1.2V1.8A1.2,1.2,0,0,1,66.1.6H83.2C92.7.6,95.5,7,95.6,12.3c0,3.3-.8,6.9-3.4,8.3l3.4,12H84.4c-2.3,0-5.2-.7-5.9-2.7L71.9,10.7a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"
|
||||||
|
id="path16" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M129.6,17.1c.8,0,1.3.5,1.2,1.2-.2,8.3-2.9,14.9-16.4,14.9-15.8.1-16.8-8.2-16.8-16.8S100.5,0,114.4,0c15.7,0,16.5,8,16.5,15.4H115.3V11.3c0-.8-.4-1.2-1-1.2s-.9.4-.9,1.2V21.9c0,.9.4,1.2.9,1.2s1-.3,1-1.2V17.1Z"
|
||||||
|
id="path18" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M166.2,16.4c0,9.1-2,16.8-16.6,16.8S132.8,25,132.8,16.4,135.7,0,149.6,0,166.2,7.8,166.2,16.4Z"
|
||||||
|
id="path20" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M200.5,1.8V12.2c0,12.7-1.4,21-16.3,21s-16-8.4-16-20.9V1.8A1.2,1.2,0,0,1,169.4.6h13a.9.9,0,0,1,.9.9V21.8c0,.9.4,1.2,1,1.2s.9-.3.9-1.2V1.5a.9.9,0,0,1,.9-.9h13.1A1.2,1.2,0,0,1,200.5,1.8Z"
|
||||||
|
id="path22" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M203.9,32.6a1.2,1.2,0,0,1-1.3-1.2V1.8A1.2,1.2,0,0,1,203.8.6h17.1c9.5,0,12.3,6.4,12.4,11.7,0,3.3-.8,6.9-3.4,8.3l3.4,12H222.1c-2.3,0-5.2-.7-5.9-2.7l-6.6-19.2a1,1,0,0,0-1.2-.7,1,1,0,0,0-.5,1.3l7.2,21.3Z"
|
||||||
|
id="path24" />
|
||||||
|
<path
|
||||||
|
class="cls-2"
|
||||||
|
d="M235.8,29.2v-10a1,1,0,0,1,1.5-1l11.1,5.1a1,1,0,0,0,1.2-.4.9.9,0,0,0-.6-1.2l-9.3-4.4c-4.5-2.2-4.4-5.5-4.4-8.2,0-7.6,7.4-9.1,14.6-9.1,5.4,0,12.1,1.8,14.3,4.4v9.2a1,1,0,0,1-1.5,1L252.3,9.8a1,1,0,0,0-1.3.4q-.3.8.6,1.2l8.5,4.1c5.3,2.6,4.7,4.9,4.7,9.2s-6.3,8.5-14.9,8.5C244.7,33.2,238,31.6,235.8,29.2Z"
|
||||||
|
id="path26" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB |
@@ -4,9 +4,9 @@ module.exports = {
|
|||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
colors: {
|
colors: {
|
||||||
'co-blue': '#243887',
|
'co-blue': '#00727e',
|
||||||
'co-lightblue': '#907eff',
|
'co-lightblue': '#907eff',
|
||||||
'co-red': '#ff1300',
|
'co-red': '#de1581',
|
||||||
'co-green': '#6cc11f',
|
'co-green': '#6cc11f',
|
||||||
'co-yellow': '#ffdd00',
|
'co-yellow': '#ffdd00',
|
||||||
'co-orange': 'ff5300',
|
'co-orange': 'ff5300',
|
||||||
|
|||||||
Reference in New Issue
Block a user