@if($type == 'AUDIT') @php($indiduallist = json_decode($safety_template->individuals_json)) @if(count($indiduallist) > 0) @foreach($indiduallist as $key=>$indidual) @endforeach @endif
1.0 ADMINISTRATIVE INFORMATION
1.1 Audit Number: {{ $safety_template->audit_number!=null ? $safety_template->audit_number : '' }}
1.2 Audit Date: {{ $safety_template->start_date != null ? $safety_template->start_date : '' }}{{ $safety_template->end_date != null ? ' to '.$safety_template->end_date : '' }}
1.3 Audit Title: {{ $safety_template->title!=null ? $safety_template->title : '' }}
1.4 Location: {{ $safety_template->location != null ? $safety_template->location : '' }}
1.5 Audit Team Lead Auditor: @if($safety_template->lead_auditor != null){{ $safety_template->lead_auditor_name != null ? $safety_template->lead_auditor_name : ($safety_template->lead_auditor!=null ? $safety_template->lead_auditor : '') }} @else {{ $safety_template->safety_template_lead!=null ? $safety_template->safety_template_lead : '' }} @endif Auditors: @if($safety_template->auditors_json!=null) @foreach(json_decode($safety_template->auditors_json) as $key=>$auditor)

{{ ($key+1).'. '.$auditor->name }}

@endforeach @else @if($safety_template->safety_template_auditors!=null) @foreach(json_decode($safety_template->safety_template_auditors) as $key=>$auditor)

{{ ($key+1).'. '.$auditor->name }}

@endforeach @endif @endif
1.6 AUDIT OBJECTIVE
{!! $safety_template->audit_objective!=null ? $safety_template->audit_objective : '' !!}
1.7 AUDIT SCOPE
The audit will be conducted to cover the following areas: All areas
{!! $safety_template->audit_scope!=null ? $safety_template->audit_scope : '' !!}
1.8 REFERENCE MATERIAL
The following documents will be used as reference material for this audit:
{!! $safety_template->reference_material!=null ? $safety_template->reference_material : '' !!}
INDIVIDUALS INTERVIEWED (FULL NAME) TITLE (POSITION HELD)
{{ ($key+1).'. '.$indidual->name }} {{ $indidual->position }}
@endif {{--TODO:RENDER BODY FROM PHP CONTROLLER--}} {!! $render_body !!} {{--@if($safety_template->question_json != null) @foreach(json_decode($safety_template->question_json) as $section) @if($section->section != null && $section->section != '') @endif @if($section->questions_json != null && count($section->questions_json)>0) @foreach($section->questions_json as $question) @endforeach @endif @endforeach
{{ $section->section }}
{!! $question->question !!}
@endif--}} @if($type == 'AUDIT')
3.0 AUDIT SUMMARY
{!! $safety_template->findings!=null ? $safety_template->findings : '' !!}
5.0 AUDITOR(S)’ DETAILS
Auditor(s): {{ $safety_template->lead_auditor_name!=null ? $safety_template->lead_auditor_name : '' }}
Date: {{ $safety_template->start_date != null ? $safety_template->start_date : '' }}{{ $safety_template->end_date != null ? ' to '.$safety_template->end_date : '' }}
Signature: {{ $safety_template->lead_auditor != null ? $safety_template->lead_auditor : '' }}
@endif