Pending List Pending
@foreach ($nocs as $index => $noc) @if ($noc->clerk_status != '2' && $noc->jr_eng_status != '2' && $noc->sr_eng_status != '2' && $noc->hod_status != '2' && $noc->city_eng_status != '2') @endif @endforeach
Sr.No Application No Applicant Name Date Phone No Status Actions
{{ $index + 1 }} {{ $noc->application_id }} {{ $noc->applicant_name }} {{ \Carbon\Carbon::parse($noc->date)->format('d-m-Y') }} {{ $noc->phone_no }} @php $statusMap = [ '1' => 'Approved', 'default' => 'Pending', ]; $roleStatusMap = [ 'Admin' => $noc->admin, 'Super Admin' => $noc->sup_admin, 'Citizen' => $noc->citizen, 'Clerk' => $noc->clerk_status, 'Junior Engineer' => $noc->jr_eng_status, 'Senior Engineer' => $noc->sr_eng_status, 'HOD' => $noc->hod_status, 'Citizen Engineer' => $noc->city_eng_status, ]; @endphp {{-- Default Status --}} @if (isset($roleStatusMap[Auth::user()->roles[0]->name])) {!! $statusMap[$roleStatusMap[Auth::user()->roles[0]->name]] ?? $statusMap['default'] !!} @else {!! $statusMap['default'] !!} @endif {{-- Show actions based on status --}} @if($noc->clerk_status == '1' && $noc->jr_eng_status == '0') View @elseif($noc->jr_eng_status == '1' && $noc->sr_eng_status == '0') View @elseif($noc->sr_eng_status == '1' && $noc->hod_status == '0') View @elseif($noc->hod_status == '1' && $noc->city_eng_status == '0') View @elseif($noc->city_eng_status == '1') Fully Approved @else @endif