Add useful informations on solidarity transport journeys
This commit is contained in:
@@ -21,6 +21,10 @@
|
|||||||
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">
|
||||||
Distance passager
|
Distance passager
|
||||||
</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">
|
||||||
|
Dernier trajet (-{{.ViewState.last_trip_days}}j)
|
||||||
|
</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">
|
||||||
Commentaire
|
Commentaire
|
||||||
@@ -38,11 +42,21 @@
|
|||||||
<tbody class="divide-y divide-gray-200 bg-white">
|
<tbody class="divide-y divide-gray-200 bg-white">
|
||||||
{{ range .ViewState.driver_journeys }}
|
{{ range .ViewState.driver_journeys }}
|
||||||
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
{{ $driver := (index $.ViewState.solidarity_drivers .DriverId)}}
|
||||||
|
{{ $lastTrip := (index $.ViewState.driver_last_trips .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="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="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="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 $lastTrip.IsZero}}
|
||||||
|
<span class="text-gray-400">-</span>
|
||||||
|
{{else if eq ($lastTrip.Format "2006-01-02") ($.ViewState.departuredatetime.Format "2006-01-02")}}
|
||||||
|
<span class="text-red-600 font-semibold">{{ $lastTrip.Format "02/01/2006" }}</span>
|
||||||
|
{{else}}
|
||||||
|
{{ $lastTrip.Format "02/01/2006" }}
|
||||||
|
{{end}}
|
||||||
|
</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="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="py-4 pl-4 pr-3 text-sm sm:pl-6">
|
||||||
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
{{if solidarityDriverValidatedProfile $driver (solidarityDocuments $driver.ID) }}
|
||||||
|
|||||||
@@ -128,6 +128,7 @@
|
|||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Lieu de départ</th>
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Lieu de départ</th>
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Distance conducteur</th>
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Distance conducteur</th>
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Distance passager</th>
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Distance passager</th>
|
||||||
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Dernier trajet (-{{$.ViewState.last_trip_days}}j)</th>
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Prix passager</th>
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Prix passager</th>
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Indemnité conducteur</th>
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Indemnité conducteur</th>
|
||||||
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Commentaire</th>
|
<th scope="col" class="px-3 py-3.5 text-left text-sm font-semibold text-gray-900">Commentaire</th>
|
||||||
@@ -142,6 +143,7 @@
|
|||||||
{{$driver := index $.ViewState.replacement_drivers_map $journey.DriverId}}
|
{{$driver := index $.ViewState.replacement_drivers_map $journey.DriverId}}
|
||||||
{{$pricing := index $.ViewState.replacement_pricing $journey.Id}}
|
{{$pricing := index $.ViewState.replacement_pricing $journey.Id}}
|
||||||
{{$location := index $.ViewState.replacement_locations $journey.Id}}
|
{{$location := index $.ViewState.replacement_locations $journey.Id}}
|
||||||
|
{{$lastTrip := index $.ViewState.driver_last_trips $journey.DriverId}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
<td class="whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6">
|
||||||
{{$driver.Data.first_name}} {{$driver.Data.last_name}}
|
{{$driver.Data.first_name}} {{$driver.Data.last_name}}
|
||||||
@@ -155,6 +157,15 @@
|
|||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
{{$journey.PassengerDistance}} km
|
{{$journey.PassengerDistance}} km
|
||||||
</td>
|
</td>
|
||||||
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
|
{{if $lastTrip.IsZero}}
|
||||||
|
<span class="text-gray-400">-</span>
|
||||||
|
{{else if eq ($lastTrip.Format "2006-01-02") ($.ViewState.booking.Journey.PassengerPickupDate.Format "2006-01-02")}}
|
||||||
|
<span class="text-red-600 font-semibold">{{ $lastTrip.Format "02/01/2006" }}</span>
|
||||||
|
{{else}}
|
||||||
|
{{ $lastTrip.Format "02/01/2006" }}
|
||||||
|
{{end}}
|
||||||
|
</td>
|
||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
|
||||||
{{if $pricing}}
|
{{if $pricing}}
|
||||||
{{printf "%.2f" $pricing.passenger.amount}} {{$pricing.passenger.currency}}
|
{{printf "%.2f" $pricing.passenger.amount}} {{$pricing.passenger.currency}}
|
||||||
|
|||||||
Reference in New Issue
Block a user