@if($model == 'Overall' || $model == 'Tieup Institutions')
@elseif($model == 'Affliated Colleges')
@elseif($model == 'Courses')
@elseif(str_contains($model, 'Student') || $model == 'Total Enrollment')
@elseif($model == 'Categories')
@else
@endif
Detailed overview and analytics
@if(Auth::user()->role == 1)
{{-- 1. OVERALL MODAL --}}
@if($model == 'Overall')
@php
$filteredTieups = $all_tieup;
if (!empty($search)) {
$s = strtolower(trim($search));
$filteredTieups = $all_tieup->filter(function($t) use ($s) {
return str_contains(strtolower($t->name ?? ''), $s)
|| str_contains(strtolower($t->industrial_type ?? ''), $s)
|| str_contains(strtolower($t->district->name ?? ''), $s);
});
}
$totalOverallStudents = $all_tieup->sum('total_students');
$collegeCount = $all_tieup->where('industrial_type', 'College')->count();
$instCount = $all_tieup->where('industrial_type', 'Institution')->count();
@endphp
{{-- Summary Cards --}}
Total Institutions
{{ $all_tieup->count() }}
Total Enrollment
{{ number_format($totalOverallStudents) }}
Affiliated Colleges
{{ $collegeCount }}
Tieup Institutions
{{ $instCount }}
{{-- Toolbar & Search --}}
Showing {{ $filteredTieups->count() }} Institutions
Export Excel
{{-- Table --}}
| S.No |
Institution Name |
Type |
District |
Student Strength |
@forelse($filteredTieups as $index => $item)
| {{ $loop->iteration }} |
{{ $item->name }} |
@if($item->industrial_type == 'College')
College
@elseif($item->industrial_type == 'Institution')
Institution
@else
{{ $item->industrial_type ?: 'IECD' }}
@endif
|
{{ $item->district->name ?? '-' }} |
{{ number_format($item->total_students) }} Students
|
@empty
| No institutions found matching "{{ $search }}" |
@endforelse
{{-- 2. AFFILIATED COLLEGES MODAL --}}
@elseif($model == 'Affliated Colleges')
@php
$filteredColleges = $affliated_tieup;
if (!empty($search)) {
$s = strtolower(trim($search));
$filteredColleges = $affliated_tieup->filter(function($c) use ($s) {
return str_contains(strtolower($c->name ?? ''), $s)
|| str_contains(strtolower($c->district->name ?? ''), $s);
});
}
$totalCollegeStudents = $affliated_tieup->sum('total_students');
$activeCollegesCount = $affliated_tieup->where('total_students', '>', 0)->count();
$avgStudents = $affliated_tieup->count() > 0 ? round($totalCollegeStudents / $affliated_tieup->count()) : 0;
@endphp
{{-- Summary Banner Cards --}}
Affiliated Colleges
{{ $affliated_tieup->count() }}
Total Student Strength
{{ number_format($totalCollegeStudents) }}
Active Colleges
{{ $activeCollegesCount }} / {{ $affliated_tieup->count() }}
{{-- Toolbar & View Switcher --}}
Export Excel
{{-- View Content --}}
@if($viewMode == 'summary')
Top Affiliated Colleges by Student Strength
@foreach($affliated_tieup->sortByDesc('total_students')->take(5) as $top)
{{ $top->name }}
{{ number_format($top->total_students) }} Students
@endforeach
Overall Affiliated Colleges Statistics
Total Registered Colleges:
{{ $affliated_tieup->count() }}
Colleges with Active Enrollment:
{{ $activeCollegesCount }}
Colleges without Active Enrollment:
{{ $affliated_tieup->count() - $activeCollegesCount }}
Total Student Strength:
@else
| S.No |
Affiliated College Name |
District |
Status |
Student Strength |
@forelse($filteredColleges as $index => $item)
| {{ $loop->iteration }} |
{{ $item->name }} |
{{ $item->district->name ?? '-' }} |
@if($item->total_students > 0)
Active
@else
No Students
@endif
|
{{ number_format($item->total_students) }} Students
|
@empty
| No affiliated colleges found matching "{{ $search }}" |
@endforelse
@endif
{{-- 3. COURSES MODAL --}}
@elseif($model == 'Courses')
@php
$coursesCollection = collect($courses);
$filteredCourses = $coursesCollection;
if (!empty($search)) {
$s = strtolower(trim($search));
$filteredCourses = $coursesCollection->filter(function($co) use ($s) {
return str_contains(strtolower($co['name'] ?? ''), $s)
|| str_contains(strtolower($co['tamil_name'] ?? ''), $s);
});
}
$totalCourseStudents = $coursesCollection->sum('total_students');
$activeCoursesCount = $coursesCollection->where('total_students', '>', 0)->count();
@endphp
{{-- Summary Cards --}}
Total Courses
{{ number_format($coursesCollection->count()) }}
Enrolled Students
{{ number_format($totalCourseStudents) }}
Active Courses
{{ $activeCoursesCount }} / {{ $coursesCollection->count() }}
{{-- Toolbar & Search --}}
Showing {{ $filteredCourses->count() }} Courses
Export Excel
{{-- Courses Table --}}
| S.No |
Course Name |
Student Count |
@forelse($filteredCourses as $index => $item)
| {{ $loop->iteration }} |
{{ $item['name'] }}
@if(!empty($item['tamil_name']))
{{ $item['tamil_name'] }}
@endif
|
{{ number_format($item['total_students'] ?? 0) }} Students
|
@empty
| No courses found matching "{{ $search }}" |
@endforelse
{{-- 4. TIEUP INSTITUTIONS MODAL --}}
@elseif($model == 'Tieup Institutions')
@php
$filteredInst = $institution_tieup;
if (!empty($search)) {
$s = strtolower(trim($search));
$filteredInst = $institution_tieup->filter(function($i) use ($s) {
return str_contains(strtolower($i->name ?? ''), $s)
|| str_contains(strtolower($i->district->name ?? ''), $s);
});
}
$totalInstStudents = $institution_tieup->sum('total_students');
$activeInstCount = $institution_tieup->where('total_students', '>', 0)->count();
@endphp
Tieup Institutions
{{ $institution_tieup->count() }}
Total Student Strength
{{ number_format($totalInstStudents) }}
Active Tieups
{{ $activeInstCount }} / {{ $institution_tieup->count() }}
Showing {{ $filteredInst->count() }} Institutions
Export Excel
| S.No |
Institution Name |
District |
Status |
Student Strength |
@forelse($filteredInst as $index => $item)
| {{ $loop->iteration }} |
{{ $item->name }} |
{{ $item->district->name ?? '-' }} |
@if($item->total_students > 0)
Active
@else
No Students
@endif
|
{{ number_format($item->total_students) }} Students
|
@empty
| No institutions found matching "{{ $search }}" |
@endforelse
{{-- 5. TOTAL ENROLLMENT MODAL (SUMMARY ONLY) --}}
@elseif($model == 'Total Enrollment')
@php
$totalBeneficiaries = $students_passed + $no_result + $reappear_students;
$evaluatedCount = $students_passed + $reappear_students;
$passPercentage = $evaluatedCount > 0 ? round(($students_passed / $evaluatedCount) * 100, 1) : 0;
@endphp
{{-- Result Metric Cards --}}
Passed Students
{{ number_format($students_passed) }}
{{ $passPercentage }}% of evaluated students
No Result Pending
{{ number_format($no_result) }}
Awaiting evaluation
Reappear Students
{{ number_format($reappear_students) }}
Absent or reappear
{{-- Comprehensive Performance Summary Card --}}
Result Distribution Summary
Export Students Excel
{{-- Multi-colored Progress Bar --}}
@if($totalBeneficiaries > 0)
@php
$passW = round(($students_passed / $totalBeneficiaries) * 100);
$noResultW = round(($no_result / $totalBeneficiaries) * 100);
$reappearW = 100 - $passW - $noResultW;
@endphp
Passed: {{ $passW }}%
No Result: {{ $noResultW }}%
Reappear: {{ $reappearW }}%
@endif
{{-- Breakdown Details --}}
Total Evaluated Results:
Overall Pass Rate:
Successful Graduates (Passed):
Re-appear Candidates:
{{-- 6. ON CAMPUS / OFF CAMPUS / MALE / FEMALE STUDENTS (COLLEGE NAME & STRENGTH) --}}
@elseif(in_array($model, ['On Campus Students', 'Off Campus Students', 'Male Students', 'Female Students']))
@php
$colleges = collect($college_strength_list);
$filteredColleges = $colleges;
if (!empty($search)) {
$s = strtolower(trim($search));
$filteredColleges = $colleges->filter(function($c) use ($s) {
return str_contains(strtolower($c['name'] ?? ''), $s)
|| str_contains(strtolower($c['district'] ?? ''), $s)
|| str_contains(strtolower($c['industrial_type'] ?? ''), $s);
});
}
$totalStudentsCount = $colleges->sum('student_count');
$totalCollegesCount = $colleges->count();
$avgStrength = $totalCollegesCount > 0 ? round($totalStudentsCount / $totalCollegesCount) : 0;
$topCollege = $colleges->first();
$exportMethod = match($model) {
'On Campus Students' => 'exportOnCampusStudents',
'Off Campus Students' => 'exportOffCampusStudents',
'Male Students' => 'exportMaleStudents',
'Female Students' => 'exportFemaleStudents',
default => '',
};
$themeGradients = match($model) {
'On Campus Students' => ['from-blue-600 to-indigo-700', 'from-emerald-500 to-teal-700', 'from-purple-500 to-pink-600'],
'Off Campus Students' => ['from-violet-600 to-indigo-700', 'from-teal-500 to-emerald-700', 'from-amber-500 to-orange-600'],
'Male Students' => ['from-sky-600 to-blue-700', 'from-emerald-500 to-teal-700', 'from-indigo-500 to-purple-600'],
'Female Students' => ['from-pink-600 to-rose-700', 'from-purple-500 to-indigo-700', 'from-teal-500 to-emerald-700'],
default => ['from-indigo-600 to-blue-700', 'from-emerald-500 to-teal-700', 'from-purple-500 to-pink-600'],
};
@endphp
{{-- Summary Cards --}}
Total {{ $model }}
{{ number_format($totalStudentsCount) }}
Total Colleges / Institutions
{{ $totalCollegesCount }}
{{-- Toolbar with Search Box & Export --}}
Showing {{ $filteredColleges->count() }} Colleges / Institutions
@if($exportMethod)
Export Excel
@endif
{{-- College Name and Strength Table --}}
| S.No |
College / Institution Name |
District |
Student Strength |
@forelse($filteredColleges as $index => $item)
| {{ $loop->iteration }} |
|
{{ $item['district'] ?? '-' }} |
{{ number_format($item['student_count'] ?? 0) }} Students
|
@empty
| No colleges found matching "{{ $search }}" |
@endforelse
{{-- 7. CATEGORIES MODAL --}}
@elseif($model == 'Categories')
@foreach($categories as $item)
{{ $item->category_code ?: 'CAT' }}
{{ $item->name }}
Category Code: {{ $item->category_code ?: '-' }}
@endforeach
{{-- 8. REMINDER FOR RENEWAL MOU --}}
@elseif($model == 'Reminder for Renewal MOU')
| Institution Name |
Expiry Date |
Action |
@forelse($contract_period as $item)
| {{ $item->tieup->name ?? '-' }} |
{{ $item->end_date }}
|
|
@empty
| No renewals due within 30 days |
@endforelse
@endif
@else
{{-- NON-ADMIN USER (TIEUP PORTAL) --}}
@php
$userList = match($model) {
'Students' => $students,
'Male Students' => $tieup_male_student,
'Female Students' => $tieup_female_student,
default => collect(),
};
$filteredUserList = $userList;
if (!empty($search)) {
$s = strtolower(trim($search));
$filteredUserList = $userList->filter(function($item) use ($s) {
return str_contains(strtolower($item->name ?? ''), $s)
|| str_contains(strtolower($item->reg_no ?? ''), $s)
|| str_contains(strtolower($item->contact_no ?? ''), $s);
});
}
@endphp
@if($model == 'Programs')
| S.No |
Program Title |
Category |
@forelse($tieup_programs as $index => $item)
| {{ $loop->iteration }} |
{{ $item->title }} |
{{ $item->category->name ?? '-' }} |
@empty
| No programs found |
@endforelse
@else
Showing {{ count($filteredUserList) }} Students
| S.No |
Student Name & Reg No |
Contact No |
@forelse($filteredUserList as $index => $item)
| {{ $index + 1 }} |
{{ $item->name }}
@if($item->reg_no)
{{ $item->reg_no }}
@endif
|
@if($item->contact_no)
{{ $item->contact_no }}
@else
-
@endif
|
@empty
| No students found matching "{{ $search }}" |
@endforelse
@endif
@endif