{{-- Reporting Bosses --}} @if($data['config_bosses']['reporting_boss'] != null) @foreach($data['config_bosses']['reporting_boss'] as $key => $configValue) @php $getStepNo = $configValue->step_no; $bossHistory = $data['allFinalPaymentHistories']->where('step_no', $configValue->step_no)->first(); $historyData = ($bossHistory != null && $bossHistory->content != null) ? json_decode($bossHistory->content) : null; $nextActiveStepNo = $data['allFinalPaymentHistories']->where('step_no', '>', $configValue->step_no)->min('step_no'); $nextActiveBossHistory = $data['allFinalPaymentHistories']->where('step_no', $nextActiveStepNo)->first(); $finalPaymentStatus = null; if(isset($configValue->designation_name) && $configValue->designation_name) $finalPaymentStatus = $configValue->designation_name; if(isset($configValue->department_short_name) && $configValue->department_short_name) { $finalPaymentStatus = ($finalPaymentStatus != null) ? $finalPaymentStatus.', ' : null; $finalPaymentStatus = $finalPaymentStatus.$configValue->department_short_name; } if($finalPaymentStatus != null) $finalPaymentStatus = $finalPaymentStatus.', '.$configValue->boss_from; @endphp {{-- Reporting Boss Information --}} @if((isset($configValue->department_name) || isset($configValue->designation_name) || isset($configValue->employee_id) || isset($configValue->employee_name)) && ($bossHistory != null || (isset($configValue->current_active_boss) && $configValue->current_active_boss == true)))