@php $dateFrom = \request("monthlyHoursPeriodFrom") ? \request("monthlyHoursPeriodFrom") : date('Y-m-d', strtotime('first day of this month')) @endphp @php $dateTo = \request("monthlyHoursPeriodTo") ? \request("monthlyHoursPeriodTo") : date('Y-m-d') @endphp
{!!Form::open(['method' => 'GET', 'url' => url("crew/report?reportType=Monthly_Hours"),'class'=>"form-inline", 'id' => 'formMonthlyHours' ]) !!}
{!! 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', 'monthlyHoursPeriodFrom', $dateFrom, ['class'=>'dateFrom form-control']) !!} {!! Form::input('text', 'monthlyHoursPeriodTo', $dateTo, ['class'=>'dateTo form-control']) !!}
{!! Form::select('month[]', $monthNames, \request("month"), ['multiple'=>'multiple', 'class'=>'multiselect']) !!}
{!! Form::select('year', $years, getSelectedYear(), ['class'=>'singleselect']) !!}
{{--{!! Form::hidden('reportType', 'Monthly_Hours') !!}--}} {!! Form::input('submit', 'submit','Submit',[ 'class' => "btn btn-primary"]) !!}
{!! Form::close() !!}
@if (count($crew) && count($crewPeriodHours))

@lang("content.list")

@if (\request("dateSearch") && \request("dateSearch") == 'monthYear') @endif @if (\request("dateSearch") && \request("dateSearch") == 'monthYear') @foreach($monthArray as $month) @endforeach @endif @php $i = 0 @endphp @foreach($crew as $id=>$each) @php $i++ @endphp @php $designation = Crew_Designation($crewType, $each) @endphp @php $picture = !is_null($each->thumb) ? '/storage/users/'.$each->thumb : '/assets/img/default-user-picture.png' @endphp @php $hoursTotal = isset($crewPeriodHours[$id]) ? round($crewPeriodHours[$id], 2) : 0 @endphp @if (\request("dateSearch") && \request("dateSearch") == 'monthYear') @foreach($monthArray as $m => $month) @php $last['last28days'] = isset($crewPeriodMonthlyHours[$id][$month]) ? round($crewPeriodMonthlyHours[$id][$month], 2) : 0; @endphp @php $class = Get_Limitation_Class($last); @endphp @if (isset($crewPeriodMonthlyHours[$id][$month])) @else @endif @endforeach @endif @php $from = '' @endphp @php $to = '' @endphp @php $reason = '' @endphp @forelse($each->userHistory as $history) @if (!(strtotime($history->condition_to) < strtotime($dateFrom) || strtotime($history->condition_from) > strtotime($dateTo))) @php $from .= $history->condition_from.'
' @endphp @php $to .= $history->condition_to.'
' @endphp @php $reason .= ($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.monthly_hours")@lang("content.not_available")
{{ $month }}@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 : '' }} {{ $designation }} {{ $hoursTotal }}{{ round($crewPeriodMonthlyHours[$id][$month], 2) }}0{!! $from !!} {!! $to !!} {!! $reason !!}
@endif