@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=Standby"), 'class'=>"form-inline", 'id' => 'formStandby' ]) !!}
{!! 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', 'dateFrom', $dateFrom, ['class'=>'dateFrom form-control']) !!} {!! Form::input('text', 'dateTo', $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', 'Standby') !!}--}} {!! Form::input('submit', 'submit','Submit',[ 'class' => "btn btn-primary"]) !!}
{!! Form::close() !!}
@if (count($crew) && count($crewStandbyHours))

@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 $counter = isset($standbyCount[$id]) ? round($standbyCount[$id], 2) : 0 @endphp @php $picture = $each->thumb ? '/storage/users/'.$each->thumb : '/assets/img/default-user-picture.png' @endphp @php $hoursTotal = isset($crewStandbyHours[$id]) ? round($crewStandbyHours[$id], 2) : 0 @endphp @if (\request("dateSearch") && \request("dateSearch") == 'monthYear') @foreach($monthArray as $m => $month) @php $last['last28days'] = isset($crewStandbyMonthlyHours[$id][$month]) ? round($crewStandbyMonthlyHours[$id][$month], 2) : 0; @endphp @php $class = Get_Limitation_Class($last); @endphp @if (isset($crewStandbyMonthlyHours[$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.qty") @lang("content.standby_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 }} {{ $counter }} {{ $hoursTotal }}{{ round($crewStandbyMonthlyHours[$id][$month], 2) }}0{!! $from !!} {!! $to !!} {!! $reason !!}
@endif