@php $i = 1; @endphp
Admin | Collaborative Safety

{{ $report_name }}


@if (isset($answers) && !empty($answers)) @if (isset($tabs)) @foreach ($tabs as $key => $tab) @if (isset($tab->tabQuestion) && count($tab->tabQuestion) > 0) @php $brkcss = count($tabs) == $i ? '' : 'page-break-after: always;'; @endphp

{{ $tab->tabname }}

@foreach ($tab->tabQuestion as $qkey => $question) @if ($question->status) @if ('Multiple_Select' == $question->question_type) @php $option = ''; @endphp @if (isset($answers[$question->id]) && isset($answers[$question->id][$question->question_type]) && !empty($answers[$question->id][$question->question_type])) @php $option_arr = json_decode($answers[$question->id][$question->question_type], true); if (is_array($option_arr) && !empty($option_arr)) { foreach ($option_arr as $key => $val) { $option .= $val . ','; } } $option = trim($option, ','); @endphp

{{ $question->heading }}

{{ $option }}

@else @if ($question->is_triggered == 0)

{{ $question->heading }}

@endif @endif @else @if (isset($answers[$question->id]) && isset($answers[$question->id][$question->question_type])) @if (in_array($question->question_type,array('Free_Text','Short_Answer'))) @php $string = $answers[$question->id][$question->question_type]; $astring = explode('|', wordwrap($string, 1000, '|')); $cnt = count($astring); @endphp @for($j=0;$j<$cnt;$j++) @if((1 + $j)==$cnt) @if((1 + $j)==$cnt) @endfor
@else @endif

@if($j==0) {{ $question->heading }} @endif

@else @endif

{{ $astring[$j] }}

@else

{{ $question->heading }}

{{ $answers[$question->id][$question->question_type] }}

@endif @else @if ($question->is_triggered == 0)

{{ $question->heading }}

@endif @endif @endif @endif @endforeach
@endif @php $i++; @endphp @endforeach @endif @endif