{!!Form::open(['method' => 'GET', 'url' => url("crew/report?reportType=Route"),'class'=>"form-inline", 'id' => 'formRoute' ]) !!}
{!! Form::select('crew', ['fcm'=>'Flight Crew','ccm'=>'Cabin Crew'], $crewType, ['class'=>'form-control input_roster crew']) !!}
{!! Form::select('designation', $designationList , \request("destination"), ['class'=>'form-control input_roster crew_designation']) !!}
{!! Form::input('text', 'routesReportDate', $date, ['class'=>'dateFrom form-control', 'id' => 'routesReportDate']) !!}
{{--{!! Form::hidden('reportType', 'Route') !!}--}} {!! Form::input('submit', 'submit','Submit',[ 'class' => "btn btn-primary"]) !!}
{!!Form::close()!!}
@php $sectors_dyu = ['DYU-FRA', 'DYU-IST', 'DYU-DXB', 'DYU-URC', 'DYU-ALA', 'DYU-DME', 'DYU-LED','DYU-IKT','DYU-KRR', 'DYU-KJA','DYU-LBD', 'DYU-SVX', 'DYU-KZN', 'DYU-REN'] @endphp @php $sectors_dyu_stations = ['FRA', 'IST', 'DXB', 'URC', 'ALA', 'DME', 'LED','IKT', 'KRR', 'KJA','LBD','SVX', 'KZN', 'REN'] @endphp @php $sectors_lbd = ['LBD-DME', 'LBD-LED', 'LBD-KRR', 'LBD-KJA', 'LBD-REN', 'LBD-KZN','LBD-AER', 'LBD-HMA','LBD-NJC', 'LBD-TJM'] @endphp @php $sectors_lbd_stations = ['DME', 'LED', 'KRR', 'KJA', 'REN', 'KZN','AER', 'HMA', 'NJC', 'TJM'] @endphp @php $reportName = ['Crew Hours Report'] @endphp @php $columnNames[0] = ['No', 'Last Name', 'First Name', 'Designation', ['Counter' => 2], ['DYU Routes' => 14], ['LBD Routes' => 10] ] @endphp @php $columnNames[1] = ['', '', '', '', 'Stand-by', 'DHC'] @endphp @php $exportArray = [] @endphp @if (count($crew))

@lang("content.year_to_date")

@php $aRoutes = [] @endphp @foreach($routes as $route) @foreach($crew as $id => $each) @if (isset($crewHours[$id]['flight_history'][$route->route_from]) || isset($crewHours[$id]['flight_history'][$route->route_to])) @php $aRoutes[] = $route @endphp @break @endif @endforeach @endforeach @php $i = 0; @endphp @foreach($crew as $id => $each) @php $picture = $each->thumb ? '/storage/users/'.$each->thumb : '/assets/img/default-user-picture.png'; @endphp @php $crewDesignation = Crew_Designation($crewType, $each) @endphp @php $standbyCounter = isset($crewHours[$id]['is_standby']) ? $crewHours[$id]['is_standby'] : 0 @endphp @php $dhcCounter = isset($crewHours[$id]['is_dhc']) ? $crewHours[$id]['is_dhc'] : 0 @endphp @foreach($aRoutes as $route) @endforeach @endforeach
No @lang("content.first_name") @lang("content.last_name") @lang("content.base") @lang("content.designation") SB DHC{{ $route->route_from }}
{{ $i + 1 }} id}") }}" target="_blank"> id}") }}" target="_blank">{{ $each->first_name }} id}") }}" target="_blank">{{ $each->last_name }}{{ $each->location ? $each->location->airport->iata : '' }} {{ $crewDesignation }} {{ $standbyCounter }} {{ $dhcCounter }} {{ isset($crewHours[$id]['flight_history'][$route->route_from]) ? $crewHours[$id]['flight_history'][$route->route_from] : (isset($crewHours[$id]['flight_history'][$route->route_to]) ? $crewHours[$id]['flight_history'][$route->route_to] : 0) }}
@endif