@extends('admin.layouts.app') @section('title', 'Applications') @section('breadcrumb') @endsection @section('content')
{{--
--}}
@php $statuses = [ 'step1_complete' => ['primary', 'Step 1 Completed'], 'payment_completed' => ['info', 'Payment Completed'], 'submitted' => ['warning', 'Document Submitted'], 'application_selected' => ['success', 'Shortlisted'], 'verified' => ['secondary', 'Admitted'], ]; @endphp @foreach ($statuses as $key => [$color, $label]) {{ $label }} @endforeach
Applications {{ $applications->total() }} {{ $applications->firstItem() }}–{{ $applications->lastItem() }} of {{ $applications->total() }}
@forelse($applications as $app) @empty @endforelse
App No. Applicant Course Applied Community HS% Date Payment Status Status Application Pdf Action
{{ $app->form_number ?? '--' }} {{ $app->type == 1 ? 'UG' : 'PG' }}
{{ strtoupper(substr($app->applicant_name, 0, 2)) }}
{{ $app->applicant_name ?? '--' }}
{{ $app->contact_no ?? '--' }}
{{ $app->course ?? '—' }} {{ $app->category }} {{ $app->percentage ? $app->percentage . '%' : '—' }} {{ $app->created_at->format('d M Y') }} {{ $app->payment_status == 1 ? 'Paid' : 'Pending' }} @php $statusLabels = [ 'step1_complete' => 'Step 1 Completed', 'payment_completed' => 'Payment Completed', 'submitted' => 'Document Submitted', 'application_selected' => 'Shortlisted', 'verified' => 'Admitted', ]; $label = $statusLabels[$app->status] ?? ucfirst(str_replace('_', ' ', $app->status)); @endphp {{ $label }} @php $folderPath = storage_path('app/public/documents/' . $app->form_number); $expectedFile = $app->form_number . '.pdf'; $filePath = $folderPath . '/' . $expectedFile; $fileExists = file_exists($filePath) && is_file($filePath); $fileUrl = asset('storage/documents/' . $app->form_number . '/' . $expectedFile); @endphp @if ($app->status === 'submitted' || $app->status === 'application_selected' || $app->status === 'verified')
@if ($fileExists) @else {{--
@csrf
--}}
@csrf
@endif
@else -- @endif
View

No applications found

@if ($applications->hasPages())
{!! $applications->withQueryString()->links('pagination::bootstrap-5') !!}
@endif
@endsection @push('scripts') @endpush