@sortablelink('airline_id', __('common.airline')) @sortablelink('flight_number', __('flights.flightnumber')) @sortablelink('dpt_airport_id', __('airports.departure')) @sortablelink('arr_airport_id', __('airports.arrival')) @sortablelink('dpt_time', 'STD') @sortablelink('arr_time', 'STA') @sortablelink('distance', 'Distance') @sortablelink('flight_time', 'Flight Time')
@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 == $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(filled($flight->callsign)) {{ strtoupper(__('flights.callsign')) }}  {{ $flight->airline->icao }} {{ $flight->callsign }}
@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 ($acars_plugin) @if (isset($saved[$flight->id])) Load in vmsACARS @else Load in vmsACARS @endif @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 && isset($saved[$flight->id]))) @php $aircraft_id = isset($saved[$flight->id]) ? App\Models\Bid::find($saved[$flight->id])->aircraft_id : null; @endphp Create Simbrief Flight Plan @endif @endif @endif {{ __('pireps.newpirep') }}
@endforeach