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