106 lines
5.8 KiB
PHP
106 lines
5.8 KiB
PHP
|
|
<div class="col-xxl-4 col-xl-4 col-lg-12">
|
|
<div class="card">
|
|
@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
|
|
<div class="card-block">
|
|
<h4 class="project-option-title">{{ __('Document Actions') }}</h4>
|
|
<a class="btn btn-primary" href="{{ asset($file_url) }}" download>
|
|
<i class="icon wb-download" aria-hidden="true"></i>
|
|
<span class="hidden-sm-down">{{ __('Download') }}</span>
|
|
</a>
|
|
<a class="btn btn-warning" href="{{ asset($file_url) }}" target="_blank">
|
|
<i class="icon wb-link" aria-hidden="true"></i>
|
|
<span class="hidden-sm-down">{{ __('Open in Browser') }}</span>
|
|
</a>
|
|
</div>
|
|
<div class="card-block">
|
|
<h4 class="project-option-title">{{ __('Share') }}</h4>
|
|
<p>{{ __('Copy this link to share this document') }}</p>
|
|
<input type="text" class="form-control" name = "copy" id = "copy" autocomplete="off" value = "{{ route('view_document', base64_encode($workflow_document->id)) }}">
|
|
</div>
|
|
<div class="card-block">
|
|
@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
|
|
<p><b>{{ __('Reg Number') }}: </b> <span style="font-weight:bold;">{{ $workflow_document->registration_number != '' ? $workflow_document->registration_number : $workflow_document->temporary_registration_number }} </span></p>
|
|
<p><b>{{ __('Workflow Type') }}: </b> {{ dataTranslation($workflow_type->name) }}</p>
|
|
<p><b>{{ __('Due Date') }}:</b> {{ $workflow_document->due_date != '' ? date('d/m/Y', strtotime($workflow_document->due_date)) : '' }}</p>
|
|
<p><b>{{ __('Priority') }}:</b> <font color = "red"><b>{{ dataTranslation($priority->name) }}</b></font></p>
|
|
<p><b>{{ __('Reg Date') }}:</b> {{ $workflow_document->registration_date != '' ? date('d/m/Y', strtotime($workflow_document->registration_date)) : '' }}</p>
|
|
<p><b>{{ __('MIME Type') }}: </b> {{ strtoupper($type) }} | <b>{{ __('Size') }}:</b> {{ $file_size }} KB</p>
|
|
@if($workflow_document->workflow_type_id != 2)
|
|
<p><b>{{ __('Sender') }}: </b>
|
|
@if($wfsenders)
|
|
@foreach($wfsenders as $key => $wfsender)
|
|
{{ ($key > 0 ?', ': '').$wfsender->contact_organization_name }}
|
|
@endforeach
|
|
@else
|
|
{{ __('N/A') }}
|
|
@endif
|
|
</p>
|
|
<p><b>{{ __('Sender Letter Number') }}</b> {{ $workflow_document->sender_letter_number }}</p>
|
|
@endif
|
|
<p><b>{{ __('Topic') }}: </b> {{ $workflow_document->topic }}</p>
|
|
<p><b>{{ __('Related Documents') }}: </b>
|
|
|
|
@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
|
|
<br><a class="btn btn-sm btn-icon btn-default btn-outline btn-round m-1" href="{{ route('details', base64_encode($document->id)) }}#view_document" ><b>{{ $document->registration_number }}</b></a>
|
|
@endforeach
|
|
@endif
|
|
@if($reply_document !== null)
|
|
<br><a class="btn btn-sm btn-icon btn-default btn-outline btn-round m-1" href="{{ route('details', base64_encode($reply_document->id)) }}#view_document" ><b>{{ $reply_document->registration_number != '' ? $reply_document->registration_number : $reply_document->temporary_registration_number }}</b></a>
|
|
@endif
|
|
</p>
|
|
|
|
<p><b>{{ __('Additional Notes') }}: </b> {{ $workflow_document->additional_notes!='' ? $workflow_document->additional_notes : 'N/A' }}</p>
|
|
<p><b>{{ __('Comments') }}: </b> {{ $workflow_document->comment!='' ? $workflow_document->comment : 'N/A' }}</p>
|
|
<p><b>{{ __('Supporter users') }}: </b>
|
|
@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)
|
|
<b><?php echo $key>0 ?', ':''?>{{ $supporter->user_name }}</b>
|
|
@endforeach
|
|
@endif
|
|
</p>
|
|
<p><b>{{ __('Reviewer users') }}: </b>
|
|
@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)
|
|
<b><?php echo $key1 > 0 ?', ':''?>{{ $reviewer->user_name }}</b>
|
|
@endforeach
|
|
@endif
|
|
</p>
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
@endif
|
|
</div>
|
|
</div>
|