@extends('layouts.app')
@section('page_title','Job Applications')
@section('page_subtitle','Review candidates and update recruitment status.')
@section('content')
<div class="card"><div class="section-title"><h3>Applications</h3><a class="btn secondary" href="{{ route('admin.jobs') }}">Back to Jobs</a></div><table class="table"><tr><th>Candidate</th><th>Job</th><th>Cover Letter</th><th>Status</th><th>Review</th></tr>@forelse($applications as $application)<tr><td><strong>{{ $application->full_name }}</strong><br><span class="muted small">{{ $application->email }} {{ $application->phone }}</span></td><td>{{ $application->jobPosting?->title }}</td><td>{{ \Illuminate\Support\Str::limit($application->cover_letter,120) }}</td><td><span class="badge yellow">{{ ucfirst($application->status) }}</span></td><td><form method="POST" action="{{ route('admin.applications.review',$application) }}">@csrf @method('PUT')<select name="status"><option @selected($application->status==='new')>new</option><option @selected($application->status==='shortlisted')>shortlisted</option><option @selected($application->status==='interview')>interview</option><option @selected($application->status==='hired')>hired</option><option @selected($application->status==='rejected')>rejected</option></select><textarea name="notes" placeholder="Notes">{{ $application->notes }}</textarea><button class="btn secondary">Update</button></form></td></tr>@empty<tr><td colspan="5"><div class="empty">No applications yet. Public job application form can be added in the next update.</div></td></tr>@endforelse</table><div class="pagination">{{ $applications->links() }}</div></div>
@endsection
