@if($leaveApplication->status != 'Rejected') @foreach ($reportingBossEmployee ? $reportingBossEmployee->bosses : [] as $boss) @php // Get boss from the settings $bossUser = $boss->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($boss->isBossUserStep($bossUser), $model); // dd($reportingBossSettings->reportingbossSteps); $b[] = $bossUser; if (!$bossUser) { continue; } if (!$boss->isBossUserStep($bossUser, $model)) { continue; } // dd($reportingBossSettings); // Get boss user employee model $bossEmployee = $bossUser->employee; $bossBranch = $bossEmployee->organization->branch ?? null; $bossPosition = $bossEmployee->organization->user->currentPosition() ?? null; @endphp {{-- Action Button Section --}} @if ($model->hasPermissionToSeeViewActionButton($authUser)) {{-- Comment Section --}} @if ($model->hasPermissionToSeeCommentBox($authUser, $reportingBossEmployee))
{{ $bossEmployee->emp_name_english }} - {{ $bossEmployee->emp_id }}
Position : {{ $bossPosition->name }}, Branch : {{ $bossBranch->name }}
Comment Box
{{-- Comment Input --}}

@if ($model->hasRejectButtonPermission($bossUser))