@foreach($reportingBossSettings ? $reportingBossSettings->reportingbossSteps : [] as $reportingBossStep) @php // Get boss from the settings $bossUser = $reportingBossStep->getBossUserByDepartmentAndBranchAndModel( $employeeDepartment, $employeeBranch, $model); // Skip when no boss found to the reportnig boss settings steps // And Check is it auth user step // dd($bossUser->employee); // dd($reportingBossStep->isBossUserStep($bossUser), $model); if( !$bossUser ) { continue; } if( !$reportingBossStep->isBossUserStep($bossUser, $model) ) { // dd($bossUser->employee); continue; } // dd($reportingBossSettings); // Get boss user employee model $bossEmployee = $bossUser->employee; $bossBranch = $bossEmployee->organization->branch ?? null; $bossPosition = $bossEmployee->organization->position ?? null; @endphp {{-- Comment Section --}} @if($model->hasPermissionToSeeCommentBox( $authUser ))