{!!Form::open(['method' => 'GET', 'url' => url("crew/report?reportType=Hours"), 'class'=>"form-inline", 'id' => 'formHours' ]) !!}
{!! 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', 'hoursReportDate', $date, ['class'=>'dateFrom form-control', 'id'=>'hoursReportDate']) !!}
{{-- {!! Form::hidden('reportType', 'Hours') !!}--}} {!! Form::input('submit', 'submit','Submit',[ 'class' => "btn btn-primary"]) !!}
{!!Form::close() !!}
@if (count($crew) && count($crewHours))

@lang("content.list")

@php $i = 0 @endphp @foreach($crew as $id => $each) @php $i++ @endphp @php $designation = Crew_Designation($crewType, $each) @endphp @php $picture = $each->thumb ? '/storage/users/' . $each->thumb : '/assets/img/default-user-picture.png' @endphp @php $last['last7days'] = isset($crewHours[$id]['last7days']) ? round($crewHours[$id]['last7days'], 1) : 0 @endphp @php $last['last28days'] = isset($crewHours[$id]['last28days']) ? round($crewHours[$id]['last28days'], 1) : 0 @endphp @php $last['yearToDate'] = isset($crewHours[$id]['yearToDate']) ? round($crewHours[$id]['yearToDate'], 1) : 0 @endphp @php $class = Get_Limitation_Class($last) @endphp @php $from = '' @endphp @php $to = '' @endphp @php $reason = '' @endphp @forelse($each->userHistory as $history) @if (strtotime($date) <= strtotime($history->to)) @php $from .= $history->from.'
' @endphp @php $to .= $history->to.'
' @endphp @php $reason .= (isset($conditions[$history->condition_id]) ? $conditions[$history->condition_id] : "").'
' @endphp @endif @empty @endforelse @endforeach
No @lang("content.first_name") @lang("content.last_name") @lang("content.base") @lang("content.designation") @lang("content.flight_hours") @lang("content.not_available")
7 @lang("content.days") 28 @lang("content.days") @lang("content.year_to_date") @lang("content.from") @lang("content.to") @lang("content.reason")
{{ $i }} id}") }}" target="_blank"> id}") }}" target="_blank">{{$each->first_name}} id}") }}" target="_blank">{{$each->last_name}} {{ $each->location ? ($each->location->airport->iata ?? $each->location->airport->icao) : '' }} {{ $designation }} {{ round($last['last7days'], 1) }} {{ round($last['last28days'],1) }} {{ round($last['yearToDate'],1) }}{{ $from }} {{ $to }} {{ $reason }}
@endif