Add day info on transit trips

This commit is contained in:
Arnaud Delcasse 2025-10-13 16:14:23 +02:00
parent c7d263fded
commit c442ef9d92
1 changed files with 19 additions and 12 deletions

View File

@ -181,7 +181,9 @@
<div x-show="filters.transit" @click="selectSolution('transit', {{$index}})"
:class="selectedType === 'transit' && selectedIndex === {{$index}} ? 'bg-blue-50 border-l-4 border-co-blue' : 'hover:bg-gray-50'"
class="p-4 cursor-pointer transition-colors">
<div class="flex items-center justify-between mb-2">
<div class="mb-2">
<div class="text-xs text-gray-500 mb-1">{{ timeFormat $journey.StartTime "02/01/2006" }}</div>
<div class="flex items-center justify-between">
<div class="flex items-center gap-2">
<span class="text-sm font-semibold text-gray-900">{{ timeFormat $journey.StartTime "15:04" }}</span>
<span class="text-gray-400"></span>
@ -189,6 +191,7 @@
</div>
<span class="text-xs font-medium text-gray-600">{{ shortDuration $journey.Duration }}</span>
</div>
</div>
<div class="flex items-center gap-1 flex-wrap">
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-green-100 text-green-800">
{{$.IconSet.Icon "tabler-icons:bus" "h-3 w-3"}}
@ -397,7 +400,9 @@
<div>
<!-- Header -->
<div class="p-4 border-b border-gray-200 bg-co-blue">
<div class="flex items-center justify-between text-white">
<div class="text-white">
<div class="text-xs mb-2 opacity-90" x-text="transitJourneys[selectedIndex].startDate"></div>
<div class="flex items-center justify-between">
<div class="flex items-center gap-3">
<div class="text-2xl font-bold" x-text="transitJourneys[selectedIndex].startTime"></div>
<div class="text-lg"></div>
@ -406,6 +411,7 @@
<div class="text-sm font-medium text-white bg-co-lightblue px-3 py-1 rounded-full" x-text="transitJourneys[selectedIndex].duration"></div>
</div>
</div>
</div>
<!-- Journey Steps -->
<div class="p-4 space-y-3">
@ -981,6 +987,7 @@ function compactJourneySearch() {
{
startTime: '{{ timeFormat $journey.StartTime "15:04" }}',
endTime: '{{ timeFormat $journey.EndTime "15:04" }}',
startDate: '{{ timeFormat $journey.StartTime "02/01/2006" }}',
duration: '{{ shortDuration $journey.Duration }}',
legs: [
{{range $legIndex, $leg := $journey.Legs}}