@if(in_array($workflow_document->workflow_type_id,['2','3']))
@php
$last_process = App\WorkflowDocumentProcess::where('workflow_document_id', '=', $workflow_document->id)->orderBy('id', 'desc')->first();
@endphp
@else
@if($workflow_document->is_workflow_free !=1)
@endif
{{ __('Signed Document') }}:
@if(!empty($signed_workflow_files))
@foreach($signed_workflow_files as $key => $workflow_file)
@if($workflow_file->document_name && trim($workflow_file->document_name)!='' && file_exists(public_path($workflow_file->place_of_the_documents.'/'.$workflow_file->document_name)))
@php
$type_array=explode('.',$workflow_file->document_name);
$type=end($type_array);
@endphp
@if(in_array(strtolower($type),['jpeg','png','jpg']))
@elseif(in_array(strtolower($type),['pdf']))
@else
{{ $workflow_file->document_name }}
@endif
@endif
@endforeach
@endif
@if(check_permissions(3) === true )
@endif
@php
$workflow_files = App\WorkflowDocumentFile::where('workflow_document_id', $workflow_document->id)->where('status', 'Y')->get();
@endphp
@endif
@include('document-workflows.view_reply_right_section')
@if(!empty($workflow_files))
@foreach($workflow_files as $key => $workflow_file)
@if($workflow_file->document_name && trim($workflow_file->document_name)!='' && file_exists(public_path($workflow_file->place_of_the_documents.'/'.$workflow_file->document_name)))
@php
$type_array=explode('.',$workflow_file->document_name);
$type=end($type_array);
@endphp
@if(in_array(strtolower($type),['jpeg','png','jpg']))
{{ $workflow_file->document_name }}
@elseif(file_exists(public_path($workflow_file->place_of_the_documents . '/' . pathinfo($workflow_file->document_name, PATHINFO_FILENAME) . '.pdf')))
{{ $workflow_file->document_name }}
@else
{{ $workflow_file->document_name }}
@endif
@endif
@endforeach
@endif
@endif
@endif
@endforeach
@endif