Commence Request Approval (Edit Mode: {{ $is_edit ? 'ON' : 'OFF' }})
@php $isApproved = collect($programs)->contains(fn($p) => in_array($p->status, ['Approved', 2])); @endphp
Only for Reappear
@foreach ($programs as $program) @scope('cell_category_id', $program) {{ $program['category']['name'] ?? '' }} @endscope @scope('cell_selected_course_id', $programs) {{ $programs->selected_course_id }} @endscope @endforeach @scope('cell_selected_course_id', $programs) View Course @endscope @foreach ($programs as $program) @scope('cell_current_strength', $program) {{ $program->current_student_strength }} @endscope @scope('cell_status', $program) @endscope @endforeach @scope('cell_current_strength', $programs, $contract_period_id) @php $current_student = App\Models\Programs::where('tieup_program_id', $programs->tieup_program_id) ->where('contract_period_id', $contract_period_id)->latest('id')->first(); @endphp {{ $current_student->student_count }} @endscope
@if($is_edit)
@foreach ($programs as $program) @endforeach
@endif
Duration Date: {{ $start_dates }} To {{ $end_dates }}
@php $hasPending = collect($programs)->contains(function($p) { return $p->status === 'Pending' || $p->status == 1; }); $isApprovedOrRejected = collect($programs)->contains(function($p) { return in_array($p->status, ['Approved', 'Rejected', 2, 3]); }); $isDisabled = $isApprovedOrRejected; @endphp @if ($is_edit || $hasPending || $isDisabled)
@endif