Compare commits

..

No commits in common. "fb5b0347fbd1aa373d5ae527fae44f7824381f60" and "cca7284d9d86cb4a15a94706b7f194ea1ed697ac" have entirely different histories.

3 changed files with 16 additions and 35 deletions

View file

@ -21,23 +21,7 @@ class TrackerController extends Controller
*/ */
public function show_past_trips_list() public function show_past_trips_list()
{ {
$trips = []; return view('past-trips');
foreach (config('app.past_trip_ids') as $tripId) {
$tripData = $this->get_trip_data($tripId, false);
$trips[$tripId] = [
'name' => $tripData->name,
'start_date' => new DateTime($tripData->date_start),
'end_date' => new DateTime($tripData->date_end)
];
}
return view(
'past-trips',
[
'trips' => $trips
]
);
} }
/** /**

View file

@ -14,10 +14,9 @@
<main id="pastTripsList"> <main id="pastTripsList">
<ol> <ol>
@php $DATE_FORMAT = 'M Y' @endphp <li><a href="/x8gkdo56o7k3eyp3w2ql">Monkey Run Scotland 2022</a></li>
@foreach ($trips as $trip_id => $trip) <li><a href="/47xj8go928ql9mq3r20p">Europespedition III: Leds Free or Die Hard</a></li>
<li><a href="/{{ $trip_id }}">{{ $trip['name'] }}</a> <span>({{ $trip['start_date']->format($DATE_FORMAT) }} to {{ $trip['end_date']->format($DATE_FORMAT) }})</span></li> <li><a href="/2ozdklm6dro0951n04xg">Bentral American Diaries</a></li>
@endforeach
</ol> </ol>
</main> </main>
</body> </body>

View file

@ -68,8 +68,7 @@
@php @php
// Privacy zones // Privacy zones
$privacyLatLons = config('app.privacy_lat_lons'); $privacyLatLons = config('app.privacy_lat_lons');
foreach ($privacyLatLons as $latLonUnparsed) { $latLon = explode(',', $privacyLatLons[0]);
$latLon = explode(',', $latLonUnparsed);
if ( if (
!( !(
( $location->latitude - $latLon[0] > 0.01 ) || ( $location->latitude - $latLon[0] < -0.01 ) || ( $location->latitude - $latLon[0] > 0.01 ) || ( $location->latitude - $latLon[0] < -0.01 ) ||
@ -79,7 +78,6 @@
$location->latitude = $location->latitude + ((rand(0,2)-1)/100); $location->latitude = $location->latitude + ((rand(0,2)-1)/100);
$location->longitude = $location->longitude + ((rand(0,2)-1)/100); $location->longitude = $location->longitude + ((rand(0,2)-1)/100);
} }
}
@endphp @endphp
[{{ $location->latitude }}, {{ $location->longitude }}], [{{ $location->latitude }}, {{ $location->longitude }}],