@php if($workflow_document->workflow_type_id == 1) $type_para = "Incoming"; elseif($workflow_document->workflow_type_id == 2) $type_para = "Outgoing"; elseif($workflow_document->workflow_type_id == 3) $type_para = "Internal"; else $type_para = "Incoming"; @endphp
@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
@if($workflow_document->is_workflow_free !=1) @php $workflow_files = App\WorkflowDocumentFile::where('workflow_document_id', $workflow_document->id)->where('is_signed',0)->orderBy('id', 'desc')->get(); @endphp @if(!empty($workflow_files)) @php $sl=0; @endphp @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 $sl++; $file_url = $workflow_file->place_of_the_documents.'/'.$workflow_file->document_name; if($key == 0) { $top_version = $workflow_file->version; } @endphp @endif @endforeach @else @endif
# {{ __('Version') }} {{ __('Status') }} {{ __('Date') }} {{ __('Action') }}
{{ $sl }} {{ __('Version') }} {{ $workflow_file->version }} @if($workflow_document->is_rejected =='1') @elseif(($last_process->status=='A' || $workflow_document->status == 'Complete' || $workflow_document->status=='Approved') && $top_version == $workflow_file->version ) @elseif($workflow_file->status=='Y') @else @endif {{ $workflow_file->created_at != '' ? date('d/m/Y', strtotime($workflow_file->created_at)) : '' }} @php $prv_path = (file_exists(public_path($workflow_file->place_of_the_documents . '/' . pathinfo($workflow_file->document_name, PATHINFO_FILENAME) . '.pdf'))) ? $workflow_file->place_of_the_documents . '/' . pathinfo($workflow_file->document_name, PATHINFO_FILENAME) . '.pdf' : ''; @endphp
{{ __('No record found') }}
@endif @if($last_process->status=='A') @php $signed_workflow_files = App\WorkflowDocumentFile::where('workflow_document_id', $workflow_document->id)->where('is_signed',1)->orderBy('id', 'desc')->get(); @endphp

{{ __('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 )
@csrf
Upload
@endif
@endif
@else
@php $workflow_files = App\WorkflowDocumentFile::where('workflow_document_id', $workflow_document->id)->where('status', 'Y')->get(); @endphp
@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 @include('document-workflows.view_reply_right_section')