@if (isset($maintenance_logs) && $maintenance_logs->title == 2) {{--BEFORE EACH RUN--}} @php $section_1 = $maintenance_logs->waters_tqd_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->waters_tqd_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->waters_tqd_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->waters_tqd_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 {{--SEMI-ANNUAL (by Waters Tech)--}} @php $section_3 = $maintenance_logs->waters_tqd_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->waters_tqd_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 @else {{--BEFORE EACH RUN--}} @for ($i = 1; $i <= 5; $i++) @endfor @foreach($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($checks_2 as $key => $check) @for ($i = 1; $i <= 5; $i++) @endfor @endforeach @for ($i = 1; $i <= 10; $i++) @endfor {{--SEMI-ANNUAL (by Waters Tech)--}} @for ($i = 1; $i <= 5; $i++) @endfor @foreach($checks_3 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; $first_count = 0; $third_count = 0; $second_count = 0; $fourth_count = 0; $fifth_count = 0; $date_section_2_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; $fifteenth_count = 0; $fourteenth_count = 0; $sixteenth_count = 0; $date_section_3_count = 0; @endphp --}} {{-- @if (isset($maintenance_logs) && isset($maintenance_logs->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance as $key => $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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance as $maintenance) @if ($maintenance->first !== null && $maintenance->first !== 0) @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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @php @endphp @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance as $maintenance) @if ($maintenance->fourteenth !== null) @php $fourteenth_count++; @endphp @endif @endforeach @for ($i = 1 + $fourteenth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance as $maintenance) @if ($maintenance->fifteenth !== null) @php $fifteenth_count++; @endphp @endif @endforeach @for ($i = 1 + $fifteenth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance as $maintenance) @if ($maintenance->sixteenth !== null) @php $sixteenth_count++; @endphp @endif @endforeach @for ($i = 1 + $sixteenth_count; $i <= 10; $i++) @endfor @else @for ($i = 1; $i <= 10; $i++) @endfor @endif @if (isset($maintenance_logs) && isset($maintenance_logs->waters_tqd_maintenance)) @foreach ($maintenance_logs->waters_tqd_maintenance 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']}}

{{$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']}}

{{$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)) }}.

{{ __('SEMI-ANNUAL (by Waters Tech)') }}

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

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

{{$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)) }}.

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

{{$check}}

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

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

{{$check}}

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

{{ __('SEMI-ANNUAL (by Waters Tech)') }}

{{$check}}

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

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

{{ $maintenance->week_date }}

{{ __('Check the Argon and Nitrogen pressure') }}
first == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check the LCMS system vacuum level') }}
second == true) checked="true" class="" @endif value="true" type="checkbox">
{{ __('Flush/ Clean sample transfer line, and API probe') }}
third == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check mobile phase (volume, appearance, etc)') }}
fourth == 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 }}

{{ __('Wash System with freshly filtered water and solvent') }}
sixth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Put the instrument on standby mode') }}
seventh == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check the solvent waste container. Empty if necessary.') }}
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)) }}.

{{ __('SEMI-ANNUAL (by Waters Tech)') }}

{{ $maintenance->week_date }}

{{ __('Clean mobile phase reservoirs') }}
tenth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check pump flow, call RainPhil if necessary') }}
eleventh == true) checked="true" @endif value="true" type="checkbox">
{{ __('Tuning of instrument') }}
twelfth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check solvent tubing and connection for leaks') }}
thirteenth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check autosampler solvent tubing') }}
fourteenth == true) checked="true" @endif value="true" type="checkbox">
{{ __('Check the lifetime hours for Turbo pump') }}
fifteenth == true) checked="true" @endif value="true" type="checkbox">
{{ __('File back up (by BGL Staff)') }}
sixteenth == true) checked="true" @endif value="true" type="checkbox">
{{ __("Analyst's Initial") }} {{ $maintenance->user->name }} {{ ucfirst(substr($maintenance->user->last_name, 0, 1)) }}.