{{-- --}} @if (isset($maintenance_logs) && $maintenance_logs->title == 4) {{--BEFORE EACH RUN--}} @php $section_1 = $maintenance_logs->agilent_dates()->where('section', 1)->first(); @endphp @for($i = 1; $i <= 5; $i++) @php $date_1 = $section_1['week_' . $i . '_date_1']; $date_2 = $section_1['week_' . $i . '_date_2']; @endphp @if(isset($date_1)) @else @endif @if(isset($date_2)) @else @endif @endfor @foreach($maintenance_logs->agilent_section_1 as $key => $row) @for ($i = 1; $i <= 5; $i++) @php $date_1 = $section_1['week_' . $i . '_date_1']; $date_2 = $section_1['week_' . $i . '_date_2']; @endphp @endfor @endforeach @php $analysts = $section_1->analysts(); @endphp @for($i = 1; $i <= 5; $i++) @php $analyst_1 = $section_1['week_' . $i . '_analyst_1']; $analyst_2 = $section_1['week_' . $i . '_analyst_2']; @endphp @if(isset($analyst_1)) @else @endif @if(isset($analyst_2)) @else @endif @endfor {{--AFTER EACH RUN--}} @php $section_2 = $maintenance_logs->agilent_dates()->where('section', 2)->first(); @endphp @for($i = 1; $i <= 5; $i++) @php $date_1 = $section_2['week_' . $i . '_date_1']; $date_2 = $section_2['week_' . $i . '_date_2']; @endphp @if(isset($date_1)) @else @endif @if(isset($date_2)) @else @endif @endfor @foreach($maintenance_logs->agilent_section_2 as $key => $row) @for ($i = 1; $i <= 5; $i++) @php $date_1 = $section_2['week_' . $i . '_date_1']; $date_2 = $section_2['week_' . $i . '_date_2']; @endphp @endfor @endforeach @php $analysts = $section_2->analysts(); @endphp @for($i = 1; $i <= 5; $i++) @php $analyst_1 = $section_2['week_' . $i . '_analyst_1']; $analyst_2 = $section_2['week_' . $i . '_analyst_2']; @endphp @if(isset($analyst_1)) @else @endif @if(isset($analyst_2)) @else @endif @endfor {{--MONTHLY--}} @php $section_3 = $maintenance_logs->agilent_dates()->where('section', 3)->first(); @endphp @for($i = 1; $i <= 5; $i++) @php $date_1 = $section_3['week_' . $i . '_date_1']; $date_2 = $section_3['week_' . $i . '_date_2']; @endphp @if(isset($date_1)) @else @endif @if(isset($date_2)) @else @endif @endfor @foreach($maintenance_logs->agilent_section_3 as $key => $row) @for ($i = 1; $i <= 5; $i++) @php $date_1 = $section_3['week_' . $i . '_date_1']; $date_2 = $section_3['week_' . $i . '_date_2']; @endphp @endfor @endforeach @php $analysts = $section_3->analysts(); @endphp @for($i = 1; $i <= 5; $i++) @php $analyst_1 = $section_3['week_' . $i . '_analyst_1']; $analyst_2 = $section_3['week_' . $i . '_analyst_2']; @endphp @if(isset($analyst_1)) @else @endif @if(isset($analyst_2)) @else @endif @endfor {{--SEMI-ANNUAL--}} @php $section_4 = $maintenance_logs->agilent_dates()->where('section', 4)->first(); @endphp @for($i = 1; $i <= 5; $i++) @php $date_1 = $section_4['week_' . $i . '_date_1']; $date_2 = $section_4['week_' . $i . '_date_2']; @endphp @if(isset($date_1)) @else @endif @if(isset($date_2)) @else @endif @endfor @foreach($maintenance_logs->agilent_section_4 as $key => $row) @for ($i = 1; $i <= 5; $i++) @php $date_1 = $section_4['week_' . $i . '_date_1']; $date_2 = $section_4['week_' . $i . '_date_2']; @endphp @endfor @endforeach @php $analysts = $section_4->analysts(); @endphp @for($i = 1; $i <= 5; $i++) @php $analyst_1 = $section_4['week_' . $i . '_analyst_1']; $analyst_2 = $section_4['week_' . $i . '_analyst_2']; @endphp @if(isset($analyst_1)) @else @endif @if(isset($analyst_2)) @else @endif @endfor @else {{--BEFORE EACH RUN--}} @for ($i = 1; $i <= 5; $i++) @endfor @foreach($agilent_checks_1 as $key => $check) @for ($i = 1; $i <= 5; $i++) @endfor @endforeach @for ($i = 1; $i <= 10; $i++) @endfor {{--AFTER EACH RUN--}} @for ($i = 1; $i <= 5; $i++) @endfor @foreach($agilent_checks_2 as $key => $check) @for ($i = 1; $i <= 5; $i++) @endfor @endforeach @for ($i = 1; $i <= 10; $i++) @endfor {{--MONTHLY--}} @for ($i = 1; $i <= 5; $i++) @endfor @foreach($agilent_checks_3 as $key => $check) @for ($i = 1; $i <= 5; $i++) @endfor @endforeach @for ($i = 1; $i <= 10; $i++) @endfor {{--SEMI-ANNUAL--}} @for ($i = 1; $i <= 5; $i++) @endfor @foreach($agilent_checks_4 as $key => $check) @for ($i = 1; $i <= 5; $i++) @endfor @endforeach @for ($i = 1; $i <= 10; $i++) @endfor @endif {{-- @php $date_section_1_count = 0; $date_section_2_count = 0; $date_section_3_count = 0; $date_section_4_count = 0; $first_count = 0; $third_count = 0; $second_count = 0; $fourth_count = 0; $fifth_count = 0; $sixth_count = 0; $seventh_count = 0; $eighth_count = 0; $ninth_count = 0; $tenth_count = 0; $eleventh_count = 0; $twelfth_count = 0; $thirteenth_count = 0; @endphp @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->section_no == 1) @php $date_section_1_count++; @endphp @endif @endforeach @for ($i = $date_section_1_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->first !== null) @php $first_count++; @endphp @endif @endforeach @for ($i = $first_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->second !== null) @php $second_count++; @endphp @endif @endforeach @for ($i = $second_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->third !== null) @php $third_count++; @endphp @endif @endforeach @for ($i = $third_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->fourth !== null) @php $fourth_count++; @endphp @endif @endforeach @for ($i = $fourth_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->fifth !== null) @php $fifth_count++; @endphp @endif @endforeach @for ($i = $fifth_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif --}} {{-- @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->fifth !== null) @php $fifth_count++; @endphp @endif @endforeach @for ($i = $fifth_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif --}} {{-- @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->user_id !== null && $maintenance->section_no == 2) @endif @endforeach @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->section_no == 2) @php $date_section_2_count++; @endphp @endif @endforeach @for ($i = $date_section_2_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->sixth !== null) @php $sixth_count++; @endphp @endif @endforeach @for ($i = $sixth_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @php @endphp @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->seventh !== null) @php $seventh_count++; @endphp @endif @endforeach @for ($i = $seventh_count + 1; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->eighth !== null) @php $eighth_count++; @endphp @endif @endforeach @for ($i = 1 + $eighth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif --}} {{-- @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->ninth !== null) @php $ninth_count++; @endphp @endif @endforeach @for ($i = 1 + $ninth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif --}} {{-- @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->user_id !== null && $maintenance->section_no == 2) @endif @endforeach @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->section_no == 3) @php $date_section_3_count++; @endphp @endif @endforeach @for ($i = 1 + $date_section_3_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->ninth !== null) @php $ninth_count++; @endphp @endif @endforeach @for ($i = 1 + $ninth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->tenth !== null) @php $tenth_count++; @endphp @endif @endforeach @for ($i = 1 + $tenth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->eleventh !== null) @php $eleventh_count++; @endphp @endif @endforeach @for ($i = 1 + $eleventh_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->user_id !== null && $maintenance->section_no == 2) @endif @endforeach @else @for ($i = 1; $i <= 10; $i++) @endfor @endif --}} {{-- annual --}} {{-- @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->section_no == 4) @php $date_section_4_count++; @endphp @endif @endforeach @for ($i = 1 + $date_section_4_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->twelfth !== null) @php $twelfth_count++; @endphp @endif @endforeach @for ($i = 1 + $twelfth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->thirteenth !== null) @php $thirteenth_count++; @endphp @endif @endforeach @for ($i = 1 + $thirteenth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->agilent_gcms)) @foreach ($maintenance_logs->agilent_gcms as $maintenance) @if ($maintenance->user_id !== null && $maintenance->section_no == 2) @endif @endforeach @else @for ($i = 1; $i <= 10; $i++) @endfor @endif --}}
WEEK 1 WEEK 2 WEEK 3 WEEK 4 WEEK 5

{{ __('BEFORE EACH RUN') }}

{{$section_1['week_' . $i . '_date_1']}}

{{$section_1['week_' . $i . '_date_2']}}

{{$agilent_checks_1[$key]}}

{{ __("Analyst's Initial") }} {{ $analysts['week_' . $i . '_analyst_1']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_1']->last_name, 0, 1)) }}. {{ $analysts['week_' . $i . '_analyst_2']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_2']->last_name, 0, 1)) }}.

{{ __('AFTER EACH RUN') }}

{{$section_2['week_' . $i . '_date_1']}}

{{$section_2['week_' . $i . '_date_2']}}

{{$agilent_checks_2[$key]}}

{{ __("Analyst's Initial") }} {{ $analysts['week_' . $i . '_analyst_1']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_1']->last_name, 0, 1)) }}. {{ $analysts['week_' . $i . '_analyst_2']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_2']->last_name, 0, 1)) }}.

{{ __('MONTHLY') }}

{{$section_3['week_' . $i . '_date_1']}}

{{$section_3['week_' . $i . '_date_2']}}

{{$agilent_checks_3[$key]}}

{{ __("Analyst's Initial") }} {{ $analysts['week_' . $i . '_analyst_1']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_1']->last_name, 0, 1)) }}. {{ $analysts['week_' . $i . '_analyst_2']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_2']->last_name, 0, 1)) }}.

{{ __('SEMI-ANNUAL') }}

{{$section_4['week_' . $i . '_date_1']}}

{{$section_4['week_' . $i . '_date_2']}}

{{$agilent_checks_4[$key]}}

{{ __("Analyst's Initial") }} {{ $analysts['week_' . $i . '_analyst_1']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_1']->last_name, 0, 1)) }}. {{ $analysts['week_' . $i . '_analyst_2']->name }} {{ ucfirst(substr($analysts['week_' . $i . '_analyst_2']->last_name, 0, 1)) }}.

{{ __('BEFORE EACH RUN') }}

{{$check}}

{{ __("Analyst's Initial") }}

{{ __('AFTER EACH RUN') }}

{{$check}}

{{ __("Analyst's Initial") }}

{{ __('MONTHLY') }}

{{$check}}

{{ __("Analyst's Initial") }}

{{ __('SEMI-ANNUAL') }}

{{$check}}

{{ __("Analyst's Initial") }}
{{ __('BEFORE EACH RUN') }}{{ $maintenance->week_date }}
{{ __('Check the Helium tank pressure') }}
first == true) checked="true" @endif value="true" type="checkbox">
{{ __('Perform autotune') }}
second == true) checked="true" class="" @endif value="true" type="checkbox">
{{ __('Check/refill wash vial (ethyl acetate)') }}
third == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check/empty waste vials') }}
fourth == true) class="" checked="true" @endif value="true" type="checkbox">
{{ __('Tuning of instrument') }}
fifth == true) class="" checked="true" @endif value="true" type="checkbox">
{{ __('Check rotor pump oil level') }}
fifth == true) checked="true" class="" @endif value="true" type="checkbox">
{{ __("Analyst's Initial") }} {{ $maintenance->user->name }} {{ ucfirst(substr($maintenance->user->last_name, 0, 1)) }}.
{{ __('AFTER EACH RUN') }}{{ $maintenance->week_date }}
{{ __('Put the instrument on standby mode') }}
sixth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Perform autotune') }}
seventh == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check/empty waste vials') }}
eighth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check the volume of mobile phase, and wash solution') }}
ninth == true) checked="true" @endif value="true" type="checkbox">
{{ __("Analyst's Initial") }} {{ $maintenance->user->name }} {{ ucfirst(substr($maintenance->user->last_name, 0, 1)) }}.
{{ __('MONTHLY') }}{{ $maintenance->week_date }}
{{ __('Check Helium tank; replace if necessary') }}
ninth == true) checked="true" @endif value="true" type="checkbox">
{{ __('File back up') }}
tenth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Tuning of instrument') }}
eleventh == true) checked="true" @endif value="true" type="checkbox">
{{ __("Analyst's Initial") }} {{ $maintenance->user->name }} {{ ucfirst(substr($maintenance->user->last_name, 0, 1)) }}.
{{ __('SEMI-ANNUAL') }}{{ $maintenance->week_date }}
Preventive Maintainance (Agilent's Technician)
twelfth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Data Backup') }}
thirteenth == true) checked="true" @endif value="true" type="checkbox">
{{ __("Analyst's Initial") }} {{ $maintenance->user->name }} {{ ucfirst(substr($maintenance->user->last_name, 0, 1)) }}.