@php $workflow_files = App\WorkflowDocumentFile::where('workflow_document_id', $workflow_document->id)->orderBy('id', 'desc')->get(); @endphp @if($workflow_files) @foreach($workflow_files as $key => $workflow_file) @if($key==1) @php break; @endphp @endif @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 $file_url = $workflow_file->place_of_the_documents.'/'.$workflow_file->document_name; $type_array=explode('.',$workflow_file->document_name); $type=end($type_array); $file_size=number_format(File::size(public_path($file_url))/1024, 2); @endphp

{{ __('Share') }}

{{ __('Copy this link to share this document') }}

@php $workflow_type = App\WorkflowType::where('id', $workflow_document->workflow_type_id)->first(); $priority = App\Priority::where('id', $workflow_document->priority_id)->first(); $wfsenders =App\WorkflowDocumentSender::where('workflow_document_id', $workflow_document->id)->where('status', 'Y')->get(); @endphp

{{ __('Reg Number') }}: {{ $workflow_document->registration_number != '' ? $workflow_document->registration_number : $workflow_document->temporary_registration_number }}

{{ __('Workflow Type') }}: {{ dataTranslation($workflow_type->name) }}

{{ __('Due Date') }}: {{ $workflow_document->due_date != '' ? date('d/m/Y', strtotime($workflow_document->due_date)) : '' }}

{{ __('Priority') }}: {{ dataTranslation($priority->name) }}

{{ __('Reg Date') }}: {{ $workflow_document->registration_date != '' ? date('d/m/Y', strtotime($workflow_document->registration_date)) : '' }}

{{ __('MIME Type') }}: {{ strtoupper($type) }} | {{ __('Size') }}: {{ $file_size }} KB

@if($workflow_document->workflow_type_id != 2)

{{ __('Sender') }}: @if($wfsenders) @foreach($wfsenders as $key => $wfsender) {{ ($key > 0 ?', ': '').$wfsender->contact_organization_name }} @endforeach @else {{ __('N/A') }} @endif

{{ __('Sender Letter Number') }} {{ $workflow_document->sender_letter_number }}

@endif

{{ __('Topic') }}: {{ $workflow_document->topic }}

{{ __('Related Documents') }}: @php $related_documents = json_decode($workflow_document->related_documents, true); $reply_document = App\WorkflowDocument::where('reply_for', $workflow_document->id)->first(); @endphp @if (!empty($related_documents)) @foreach($related_documents as $key=> $related_document) @php $document = App\WorkflowDocument::where('id', $related_document)->first(); @endphp
{{ $document->registration_number }} @endforeach @endif @if($reply_document !== null)
{{ $reply_document->registration_number != '' ? $reply_document->registration_number : $reply_document->temporary_registration_number }} @endif

{{ __('Additional Notes') }}: {{ $workflow_document->additional_notes!='' ? $workflow_document->additional_notes : 'N/A' }}

{{ __('Comments') }}: {{ $workflow_document->comment!='' ? $workflow_document->comment : 'N/A' }}

{{ __('Supporter users') }}: @php $supporters = App\WorkflowDocumentUser::where('workflow_document_id', '=', $workflow_document->id)->where('user_type','=','S')->where('status', '=', 'Y')->orderBy('id', 'asc')->get(); @endphp @if($supporters) @foreach($supporters as $key => $supporter) 0 ?', ':''?>{{ $supporter->user_name }} @endforeach @endif

{{ __('Reviewer users') }}: @php $workflow_process = App\WorkflowDocumentProcess::where('workflow_document_id', $workflow_document->id)->where('status', '!=', 'R')->orderBy('id', 'asc')->get(); @endphp @if($workflow_process) @foreach($workflow_process as $key1 => $reviewer) 0 ?', ':''?>{{ $reviewer->user_name }} @endforeach @endif

@endif @endforeach @endif