@php $pictures = ''; $pdfs = ''; $companyJobUpdates = (isset($companyjob->companyJobUpdates) ? $companyjob->companyJobUpdates->load(['companyJobFile'=>function($query){ return $query->withTrashed(); }]) : collect([])); @endphp @if(isset($companyJobUpdates) && $companyJobUpdates->count() > 0)

Recent Job Updates :

@foreach($companyJobUpdates as $companyJobUpdate) @if($companyJobUpdate->action_on == 1)

Name : {{ $companyJobUpdate->companyJob->name }}

  Before : {{ $companyJobUpdate->before }}

  After : {{ $companyJobUpdate->after }}



@endif @if($companyJobUpdate->action_on == 2)

Description : {{ $companyJobUpdate->companyJob->description }}

  Before : {{ $companyJobUpdate->before }}

  After : {{ $companyJobUpdate->after }}



@endif @if($companyJobUpdate->action_on == 3)

Job Start Date : {{ date('dS, F Y',strtotime($companyJobUpdate->companyJob->job_start_date)) }}

  Before : {{ $companyJobUpdate->before }}

  After : {{ $companyJobUpdate->after }}



@endif @if($companyJobUpdate->action_on == 4)

Job End Date : {{ date('dS, F Y',strtotime($companyJobUpdate->companyJob->job_end_date)) }}

  Before : {{ $companyJobUpdate->before }}

  After : {{ $companyJobUpdate->after }}



@endif @php $job_maintenace_status = \Config::get('custom.job-maintenance-status'); @endphp @if($companyJobUpdate->action_on == 5 && isset($job_maintenace_status[$companyJobUpdate->companyJob->maintenance]))

Maintenance : {{ $job_maintenace_status[$companyJobUpdate->companyJob->maintenance] }}

  Before : {{ $companyJobUpdate->before }}

  After : {{ $companyJobUpdate->after }}



@endif @if($companyJobUpdate->action_on == 6)

CCDC : {{ ($companyJobUpdate->companyJob->ccdc == 1 ? 'Yes' : 'No') }}

  Before : {{ $companyJobUpdate->before }}

  After : {{ $companyJobUpdate->after }}



@endif @if($companyJobUpdate->action_on == 7 && $companyJobUpdate->companyJobFile && $companyJobUpdate->companyJobFile->count() > 0)

Picture : {{ $companyJobUpdate->companyJobFile->name }}

Remark : {{ $companyJobUpdate->companyJobFile->remark }}

  {{ $companyJobUpdate->before }}

  {{ $companyJobUpdate->after }}



@endif @if($companyJobUpdate->action_on == 8 && $companyJobUpdate->companyJobFile && $companyJobUpdate->companyJobFile->count() > 0)

PDF : {{ $companyJobUpdate->companyJobFile->name }}

Remark : {{ $companyJobUpdate->companyJobFile->remark }}

  {{ $companyJobUpdate->before }}

  {{ $companyJobUpdate->after }}



@endif @endforeach @endif