Reverse checkin ordering

This commit is contained in:
Ben Goldsworthy 2022-09-21 18:47:34 +00:00
parent 7fb2e755b6
commit 8b793de39d

View file

@ -30,14 +30,16 @@
<main id="routeContainer">
<div id="map"></div>
<section id="checkinList">
<ol>
@foreach($trip->checkins as $checkin)
<ol reversed>
@foreach(array_reverse($trip->checkins) as $checkin)
@if($checkin->id != 2607)
<li>
<details id="{{ $checkin->id }}" ontoggle="toggleCheckin(this.open, this.id)">
<summary><h2>{{ $checkin->title ?? "[No title]" }}</h2> <span>{{ date('j M Y (G:H)', strtotime($checkin->date)) }}</span></summary>
{{ $checkin->note ?? "[No note]" }}
</details>
</li>
@endif
@endforeach
</ol>
</section>