From ee0bcd01b7497d8ddba6623ef0017073255c8725 Mon Sep 17 00:00:00 2001 From: Arnaud Delcasse Date: Tue, 14 Oct 2025 16:32:01 +0200 Subject: [PATCH] Add geographies filters --- .../_partials/drivers-map-widget.html | 16 +++++ .../_partials/booking_filters.html | 59 +++++++++++++++--- .../_partials/bookings_history.html | 2 +- .../_partials/bookings_list.html | 2 +- .../_partials/drivers_list.html | 45 ++++++++++++-- web/layouts/organized_carpool/overview.html | 5 +- .../_partials/booking_filters.html | 61 +++++++++++++++++-- .../_partials/bookings_history.html | 2 +- .../_partials/bookings_list.html | 2 +- .../_partials/drivers_list.html | 45 ++++++++++++-- .../solidarity_transport/overview.html | 5 +- web/public/css/main.css | 3 + 12 files changed, 218 insertions(+), 29 deletions(-) diff --git a/web/layouts/dashboard/_partials/drivers-map-widget.html b/web/layouts/dashboard/_partials/drivers-map-widget.html index 70d0676..d8e9118 100644 --- a/web/layouts/dashboard/_partials/drivers-map-widget.html +++ b/web/layouts/dashboard/_partials/drivers-map-widget.html @@ -5,6 +5,22 @@

Carte des conducteurs

+ {{if .geography_filters_enabled}} +
+
+ + +
+
+ {{end}}
diff --git a/web/layouts/organized_carpool/_partials/booking_filters.html b/web/layouts/organized_carpool/_partials/booking_filters.html index 450c629..9029d13 100644 --- a/web/layouts/organized_carpool/_partials/booking_filters.html +++ b/web/layouts/organized_carpool/_partials/booking_filters.html @@ -5,9 +5,9 @@ -
+
-
+
@@ -17,10 +17,10 @@
-
+
- @@ -32,10 +32,55 @@
- -
- +{{if $.geography_filters_enabled}} +
+ +
+ +
+
+ +
+ +
+ + +
+
+ +
+ +
+ + +
+
+{{end}}
diff --git a/web/layouts/organized_carpool/_partials/bookings_history.html b/web/layouts/organized_carpool/_partials/bookings_history.html index cf1a6cc..4effcb1 100644 --- a/web/layouts/organized_carpool/_partials/bookings_history.html +++ b/web/layouts/organized_carpool/_partials/bookings_history.html @@ -1,6 +1,6 @@ {{ define "carpool_bookings_history" }} -{{template "booking_filters" dict "tab" "carpoolHistory" "filters" .ViewState.hist_filters }} +{{template "booking_filters" dict "tab" "carpoolHistory" "filters" .ViewState.hist_filters "geography_filters_enabled" .ViewState.geography_filters_enabled "geography_filters_list" .ViewState.geography_filters_list }} {{if eq (len .ViewState.bookings_history) 0}}
Aucun trajet dans le passé
{{else}} diff --git a/web/layouts/organized_carpool/_partials/bookings_list.html b/web/layouts/organized_carpool/_partials/bookings_list.html index 661ca65..8f4ad32 100644 --- a/web/layouts/organized_carpool/_partials/bookings_list.html +++ b/web/layouts/organized_carpool/_partials/bookings_list.html @@ -1,6 +1,6 @@ {{ define "carpool_bookings_list" }} -{{template "booking_filters" dict "tab" "carpoolService" "filters" .ViewState.filters }} +{{template "booking_filters" dict "tab" "carpoolService" "filters" .ViewState.filters "geography_filters_enabled" .ViewState.geography_filters_enabled "geography_filters_list" .ViewState.geography_filters_list }} {{if eq (len .ViewState.bookings) 0}}
Aucun trajet déclaré
{{else}} diff --git a/web/layouts/organized_carpool/_partials/drivers_list.html b/web/layouts/organized_carpool/_partials/drivers_list.html index eb8ad31..7cc6dea 100644 --- a/web/layouts/organized_carpool/_partials/drivers_list.html +++ b/web/layouts/organized_carpool/_partials/drivers_list.html @@ -1,24 +1,59 @@ {{ define "carpool_drivers_list" }} -
+ +
+ {{if $.ViewState.geography_filters_enabled}} +
+ + {{if $.ViewState.archived}}{{end}} + +
+ +
+ + +
+
+
+ {{else}}

-
- - + + {{if .ViewState.archived}} + + + + {{else}} + + {{end}} + + {{else}} + + {{end}}