@include('partials.breadcrumbs')
@include('layouts.crmnov')

Documents

Employee Documents For {{$employee['name']}}

Browse and manage documents associated with this employee.

Documents

@if($role == 'admin') Upload Documents {{-- @elseif(((isset($perm['employee'][$employee['id']]) && ($perm['employee'][$employee['id']]==1)) || (isset($employee['work_place']) && (isset($perm['employee']['bulk_'.$employee['work_place']])) && ($perm['employee']['bulk_'.$employee['work_place']]==1)) || ($perm['employee']['bulk']==1)) && $role!='visitor') --}} @elseif( ( isset($perm['employee'][$employee['id']]) && $perm['employee'][$employee['id']] == 1 ) || ( isset($employee['work_place']) && isset($perm['employee']['bulk_'.$employee['work_place']]) && $perm['employee']['bulk_'.$employee['work_place']] == 1 ) || ( isset($perm['employee']['bulk']) && $perm['employee']['bulk'] == 1 ) ) Upload Documents @elseif( ( isset($perm['home_not_linked_employee'][$employee['id']]) && $perm['home_not_linked_employee'][$employee['id']] == 1 ) || ( isset($perm['home_not_linked_employee']['bulk']) && $perm['home_not_linked_employee']['bulk'] == 1 ) ) Upload Documents @elseif( ( isset($perm['office_staff_employee'][$employee['id']]) && $perm['office_staff_employee'][$employee['id']] == 1 ) || ( isset($perm['office_staff_employee']['bulk']) && $perm['office_staff_employee']['bulk'] == 1 ) ) Upload Documents @endif
@if($documentCategory->name == 'Reference') @if(!empty($characterReferenceLink)) @endif {{-- Professional Reference --}} @if(!empty($proReferenceLink)) @forelse($proReferenceLink as $proReference) @empty @endforelse @endif @endif @if($documentCategory->name == 'New Employee Details Form') @endif {{-- @if($documentCategory['type'] === 'employee' AND $documentCategory['name'] == 'DBS') --}} @forelse($documents as $document) @empty @endforelse @if(in_array(strtolower($documentCategory->name), ['dbs related documents', 'right to work documents', 'certificates']) && !empty($versionedCandidateDocuments) && $versionedCandidateDocuments->count()) @foreach($versionedCandidateDocuments as $versionedDocument) @endforeach @endif @if($documentCategory->name == 'Onboarding' && !empty($originalJobApplicationVersion) && !empty($originalJobApplicationLink)) @endif @if($documentCategory->name == 'Onboarding' && !empty($finalJobApplicationVersion) && !empty($finalJobApplicationLink)) @endif @if($documentCategory->name == 'Onboarding' && !empty($originalEducationReferenceVersion) && !empty($originalEducationReferenceLink)) @endif @if($documentCategory->name == 'Onboarding' && !empty($finalEducationReferenceVersion) && !empty($finalEducationReferenceLink)) @endif @forelse($onboardingDocuments as $document) @empty @if($documentCategory->name == 'Letter of Authority') @forelse($letterOfAuthorityDocuments as $document) @empty @endforelse @endif @if($documentCategory->name == 'Job Offer') @forelse($jobOfferDocuments as $document) @empty @endforelse @endif @if($documentCategory->name == 'Job Description') @forelse($jobDescriptionDocuments as $document) @empty @endforelse @endif @endforelse
Document Name Date Expiry Date Action
Character Reference {{date(config('choicescrm.date_format_forms'), strtotime($characterReferenceSubmittedAt))}}
Professional Reference {{date(config('choicescrm.date_format_forms'), strtotime($proReferenceSubmittedAt))}}
New Employee Details Form {{ !empty($newEmployeeDetailsSubmittedAt) && $newEmployeeDetailsSubmittedAt != '0000-00-00' && $newEmployeeDetailsSubmittedAt != '0000-00-00 00:00:00' ? date( config('choicescrm.date_format_forms'), strtotime($newEmployeeDetailsSubmittedAt) ) : '' }}
@if(in_array(strtolower($documentCategory->name), ['dbs related documents', 'right to work documents', 'certificates'])) @php $documentTitleLabels = [ 'dbs_passport' => 'First ID Document', 'dbs_driving' => 'Second ID Document', 'dbs_address' => 'Address Proof Document', 'dbs_certificate' => 'DBS Certificate', 'british_passport' => 'British/Irish Passport Document', 'ni_with_birth_certificate' => 'NI/Birth Certificate Document', 'share_code_document' => 'Share Code Document', 'Certificates' => 'Certificate', ]; @endphp {{ $documentTitleLabels[$document['title'] ?? ''] ?? ($document['document_name'] ?? '') }} @else {{(isset($document['document_name'])) ? $document['document_name'] : ''}} @endif @if(in_array(strtolower($documentCategory->name), ['dbs related documents', 'right to work documents', 'certificates'])) Original @endif {{date(config('choicescrm.date_format_forms'), strtotime($document['created_at']))}} {{(isset($document['expiry_date']) && $document['expiry_date'] != '0000-00-00') ? date(config('choicescrm.date_format_forms'), strtotime($document['expiry_date'])) : ''}}
@if(!empty($document['document'])) @php $allowed = array('doc', 'docx'); $ext = pathinfo($document['document'], PATHINFO_EXTENSION); @endphp @if (in_array($ext, $allowed)) @else @endif @else - @endif @if($role == 'admin') @elseif( ( isset($perm['employee'][$employee['id']]) && $perm['employee'][$employee['id']] == 1 ) || ( isset($perm['employee']['bulk_'.$employee['work_place']]) && $perm['employee']['bulk_'.$employee['work_place']] == 1 ) || ( isset($perm['employee']['bulk']) && $perm['employee']['bulk'] == 1 ) ) @elseif( ( isset($perm['home_not_linked_employee'][$employee['id']]) && $perm['home_not_linked_employee'][$employee['id']] == 1 ) || ( isset($perm['home_not_linked_employee']['bulk']) && $perm['home_not_linked_employee']['bulk'] == 1 ) ) @elseif( ( isset($perm['office_staff_employee'][$employee['id']]) && $perm['office_staff_employee'][$employee['id']] == 1 ) || ( isset($perm['office_staff_employee']['bulk']) && $perm['office_staff_employee']['bulk'] == 1 ) ) @endif
{{ $versionedDocument['document_name'] }} Final {{ !empty($versionedDocument['created_at']) ? date(config('choicescrm.date_format_forms'), strtotime($versionedDocument['created_at'])) : '' }}
@if(!empty($versionedDocument['document'])) @php $allowed = array('doc', 'docx'); $ext = pathinfo($versionedDocument['document'], PATHINFO_EXTENSION); $filePath = 'crm/candidates/' . $versionedDocument['company_id'] . '/' . $versionedDocument['document']; @endphp @if (in_array($ext, $allowed)) @else @endif @else - @endif
Job Application Original {{date(config('choicescrm.date_format_forms'), strtotime($originalJobApplicationVersion['edited_at'] ?? $originalJobApplicationVersion['updated_at']))}}
Job Application Final {{date(config('choicescrm.date_format_forms'), strtotime($finalJobApplicationVersion['edited_at'] ?? $finalJobApplicationVersion['updated_at']))}}
Education and Reference Original {{date(config('choicescrm.date_format_forms'), strtotime($originalEducationReferenceVersion['edited_at'] ?? $originalEducationReferenceVersion['updated_at']))}}
Education and Reference Final {{date(config('choicescrm.date_format_forms'), strtotime($finalEducationReferenceVersion['edited_at'] ?? $finalEducationReferenceVersion['updated_at']))}}
{{(isset($document->CompaniesAggrements['title'])) ? $document->CompaniesAggrements['title'] : ''}} {{date(config('choicescrm.date_format_forms'), strtotime($document['created_at']))}} {{(isset($document['expiry_date']) && $document['expiry_date'] != '0000-00-00') ? date(config('choicescrm.date_format_forms'), strtotime($document['expiry_date'])) : ''}}
@if(!empty($document->CompaniesAggrements['description'])) @if($document->CompaniesAggrements['title']=='Role contract') @if(isset($empRole['contract']) && ($empRole['contract'] !== '')) @php $allowed = array('doc', 'docx'); $ext = pathinfo($empRole['contract'], PATHINFO_EXTENSION); @endphp @if (in_array($ext, $allowed)) @else @endif @endif @else @php $allowed = array('doc', 'docx'); $ext = pathinfo($document->CompaniesAggrements['description'], PATHINFO_EXTENSION); @endphp @if (in_array($ext, $allowed)) @else @endif @endif @else - @endif
Letter of Authority {{ date(config('choicescrm.date_format_forms'), strtotime($document->created_at)) }}
{{(isset($document['document_name'])) ? $document['document_name'] : 'Job Offer'}} {{date(config('choicescrm.date_format_forms'), strtotime($document['updated_at']))}} {{(isset($document['expiry_date']) && $document['expiry_date'] != '0000-00-00') ? date(config('choicescrm.date_format_forms'), strtotime($document['expiry_date'])) : ''}}
@if(!empty($document['document'])) @php $allowed = array('doc', 'docx'); $ext = pathinfo($document['document'], PATHINFO_EXTENSION); @endphp @if (in_array($ext, $allowed)) @else @endif @else - @endif
{{(isset($document['document_name'])) ? $document['document_name'] : 'Job Description'}} {{date(config('choicescrm.date_format_forms'), strtotime($document['updated_at']))}} {{(isset($document['expiry_date']) && $document['expiry_date'] != '0000-00-00') ? date(config('choicescrm.date_format_forms'), strtotime($document['expiry_date'])) : ''}}
@if(!empty($document['document'])) @php $allowed = array('doc', 'docx'); $ext = pathinfo($document['document'], PATHINFO_EXTENSION); @endphp @if (in_array($ext, $allowed)) @else @endif @else - @endif