Add geographies filters

This commit is contained in:
Arnaud Delcasse
2025-10-14 16:32:01 +02:00
parent 62a3095f91
commit ee0bcd01b7
12 changed files with 218 additions and 29 deletions

View File

@@ -40,7 +40,10 @@
{{$hasParams := false}}
{{if .ViewState.hist_filters.date_start}}{{$exportURL = printf "%s?start_date=%s" $exportURL .ViewState.hist_filters.date_start}}{{$hasParams = true}}{{end}}
{{if .ViewState.hist_filters.date_end}}{{if $hasParams}}{{$exportURL = printf "%s&end_date=%s" $exportURL .ViewState.hist_filters.date_end}}{{else}}{{$exportURL = printf "%s?end_date=%s" $exportURL .ViewState.hist_filters.date_end}}{{$hasParams = true}}{{end}}{{end}}
{{if .ViewState.hist_filters.status}}{{if $hasParams}}{{$exportURL = printf "%s&status=%s" $exportURL .ViewState.hist_filters.status}}{{else}}{{$exportURL = printf "%s?status=%s" $exportURL .ViewState.hist_filters.status}}{{end}}{{end}}
{{if .ViewState.hist_filters.status}}{{if $hasParams}}{{$exportURL = printf "%s&status=%s" $exportURL .ViewState.hist_filters.status}}{{else}}{{$exportURL = printf "%s?status=%s" $exportURL .ViewState.hist_filters.status}}{{$hasParams = true}}{{end}}{{end}}
{{if .ViewState.hist_filters.departure_geo}}{{if $hasParams}}{{$exportURL = printf "%s&departure_geo=%s" $exportURL .ViewState.hist_filters.departure_geo}}{{else}}{{$exportURL = printf "%s?departure_geo=%s" $exportURL .ViewState.hist_filters.departure_geo}}{{$hasParams = true}}{{end}}{{end}}
{{if .ViewState.hist_filters.destination_geo}}{{if $hasParams}}{{$exportURL = printf "%s&destination_geo=%s" $exportURL .ViewState.hist_filters.destination_geo}}{{else}}{{$exportURL = printf "%s?destination_geo=%s" $exportURL .ViewState.hist_filters.destination_geo}}{{$hasParams = true}}{{end}}{{end}}
{{if .ViewState.hist_filters.passenger_address_geo}}{{if $hasParams}}{{$exportURL = printf "%s&passenger_address_geo=%s" $exportURL .ViewState.hist_filters.passenger_address_geo}}{{else}}{{$exportURL = printf "%s?passenger_address_geo=%s" $exportURL .ViewState.hist_filters.passenger_address_geo}}{{$hasParams = true}}{{end}}{{end}}
<a href="{{$exportURL}}">
<button type="button"