@foreach($flights as $flight)
{{-- !!! NOTE !!! Don't remove the "save_flight" class, or the x-id attribute. It will break the AJAX to save/delete "x-saved-class" is the class to add/remove if the bid exists or not If you change it, remember to change it in the in-array line as well --}} @if (!setting('pilots.only_flights_from_current') || $flight->dpt_airport_id == Auth::user()->current_airport->icao) @endif
{{--
--}} {{ strtoupper(__('flights.dep')) }}  {{ optional($flight->dpt_airport)->name ?? $flight->dpt_airport_id }} ({{$flight->dpt_airport_id}}) @if($flight->dpt_time), {{ $flight->dpt_time }}@endif
{{ strtoupper(__('flights.arr')) }}  {{ optional($flight->arr_airport)->name ?? $flight->arr_airport_id }} ({{$flight->arr_airport_id}}) @if($flight->arr_time), {{ $flight->arr_time }}@endif
@if($flight->distance) {{ strtoupper(__('common.distance')) }}  {{ $flight->distance }} {{ setting('units.distance') }} @endif
@if($flight->level) {{ strtoupper(__('flights.level')) }}  {{ $flight->level }} {{ setting('units.altitude') }} @endif
@if($flight->route) {{ strtoupper(__('flights.route')) }}  {{ $flight->route }} @endif
@if ($simbrief !== false) @if ($flight->simbrief && $flight->simbrief->user_id === $user->id) View Simbrief Flight Plan @else @if ($simbrief_bids === false || ($simbrief_bids === true && in_array($flight->id, $saved, true))) Create Simbrief Flight Plan @endif @endif @endif {{ __('pireps.newpirep') }}
@endforeach