{{-- NOTE ABOUT THIS VIEW The fields that are marked "read-only", make sure the read-only status doesn't change! If you make those fields editable, after they're in a read-only state, it can have an impact on your stats and financials, and will require a recalculation of all the flight reports that have been filed. You've been warned! --}} @if(!empty($pirep) && $pirep->read_only)
@component('components.info') @lang('pireps.fieldsreadonly') @endcomponent
@endif
 @lang('pireps.flightinformations')
@if(!empty($pirep) && $pirep->read_only)

{{ $pirep->airline->name }}

@else

{{ $errors->first('airline_id') }}

@endif
@if(!empty($pirep) && $pirep->read_only)

{{ $pirep->ident }}

@else
read_only) readonly @endif value="{{ !empty($pirep) ? $pirep->flight_number : old('flight_number') }}" placeholder="@lang('flights.flightnumber')" /> read_only) readonly @endif value="{{ !empty($pirep) ? $pirep->route_code : old('route_code') }}" placeholder="@lang('pireps.codeoptional')" /> route_leg) readonly @endif value="{{ !empty($pirep) ? $pirep->route_leg : old('route_leg') }}" placeholder="@lang('pireps.legoptional')" />

{{ $errors->first('flight_number') }}

{{ $errors->first('route_code') }}

{{ $errors->first('route_leg') }}

@endif
@if(!empty($pirep) && $pirep->read_only)

{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}

@else

{{ $errors->first('flight_type') }}

@endif
@if(!empty($pirep) && $pirep->read_only)

{{ $pirep->hours.' '.trans_choice('common.hour', $pirep->hours) }} , {{ $pirep->minutes.' '.trans_choice('common.minute', $pirep->minutes) }}

@else
read_only) readonly @endif placeholder="{{ trans_choice('common.hour', 2) }}" min="0" value="{{ !empty($pirep) ? $pirep->hours : old('hours') }}" /> read_only) readonly @endif placeholder="{{ trans_choice('common.minute', 2) }}" min="0" value="{{ !empty($pirep) ? $pirep->minutes : old('minutes') }}" />

{{ $errors->first('hours') }}

{{ $errors->first('minutes') }}

@endif
@if(!empty($pirep) && $pirep->read_only)

{{ $pirep->level }}

@else
read_only) readonly @endif min="0" step="0.01" value="{{ !empty($pirep) ? $pirep->level : old('level') }}" />

{{ $errors->first('level') }}

@endif
 @lang('pireps.deparrinformations')
@if(!empty($pirep) && ($pirep->read_only || request()->has('flight_id'))) {{ $pirep->dpt_airport->name }} ({{$pirep->dpt_airport->icao}}) @else

{{ $errors->first('dpt_airport_id') }}

@endif
@if(!empty($pirep) && ($pirep->read_only || request()->has('flight_id'))) {{ $pirep->arr_airport->name }} ({{$pirep->arr_airport->icao}}) @else

{{ $errors->first('arr_airport_id') }}

@endif
 @lang('pireps.aircraftinformations')
@if(!empty($pirep) && $pirep->read_only)

{{ $pirep->aircraft->name }}

@else
{{-- You probably don't want to change this ID if you want the fare select to work --}}

{{ $errors->first('aircraft_id') }}

@endif
@if(!empty($pirep) && $pirep->read_only)

{{ $pirep->block_fuel }}

@else
read_only) readonly @endif value="{{ !empty($pirep) ? $pirep->block_fuel : old('block_fuel') }}" />

{{ $errors->first('block_fuel') }}

@endif
@if(!empty($pirep) && $pirep->read_only)

{{ $pirep->fuel_used }}

@else
read_only) readonly @endif value="{{ !empty($pirep) ? $pirep->fuel_used : old('fuel_used') }}" />

{{ $errors->first('fuel_used') }}

@endif
@include('pireps.fares')
 @lang('flights.route')

{{ $errors->first('route') }}

 {{ trans_choice('common.remark', 2) }}

{{ $errors->first('notes') }}

{{-- Write out the custom fields, and label if they're required --}}
 {{ trans_choice('common.field', 2) }}
@if(isset($pirep) && $pirep->fields) @each('pireps.custom_fields', $pirep->fields, 'field') @else @each('pireps.custom_fields', $pirep_fields, 'field') @endif
@if(isset($pirep) && !$pirep->read_only) @endif @if(!isset($pirep) || (filled($pirep) && !$pirep->read_only)) @endif