@extends('admin.layouts.app') @section('title', 'User Details') @section('content')

{{ $nurse->name }}

Joined {{ $nurse->created_at->format('M d, Y') }}

@csrf @method('PATCH')
@if($nurse->is_active) Active @else Inactive @endif

Total Applications

{{ $stats['total'] }}

Pending

{{ $stats['pending'] }}

Accepted

{{ $stats['accepted'] }}

Rejected

{{ $stats['rejected'] }}

Profile Information

{{ $nurse->nurseProfile->full_name ?? 'N/A' }}

{{ $nurse->email }}

{{ $nurse->nurseProfile->phone ?? 'N/A' }}

{{ $nurse->nurseProfile->primary_specialty ?? 'N/A' }}

{{ $nurse->nurseProfile->secondary_specialty ?? 'N/A' }}

{{ $nurse->nurseProfile->experience_years ?? 0 }} years

{{ ucfirst($nurse->nurseProfile->nclex_status ?? 'N/A') }}

{{ $nurse->nurseProfile->license_type ?? 'N/A' }}

{{ $nurse->nurseProfile->license_expiry ? \Carbon\Carbon::parse($nurse->nurseProfile->license_expiry)->format('M d, Y') : 'N/A' }}

{{ $nurse->nurseProfile->city ?? 'N/A' }}, {{ $nurse->nurseProfile->country ?? 'N/A' }}

{{ $nurse->nurseProfile->willing_to_relocate ? 'Yes' : 'No' }}

{{ $nurse->nurseProfile->visa_needed ? 'Yes' : 'No' }}

@php $headers = [ ['label' => 'Job Title', 'class' => ''], ['label' => 'Employer', 'class' => ''], ['label' => 'Applied On', 'class' => 'w-36'], ['label' => 'Status', 'class' => 'w-40'], ]; $rows = []; foreach($applications as $application) { $cells = []; $cells[] = ['content' => '
' . e($application->jobPost->title ?? 'N/A') . '
', 'class' => '']; $cells[] = ['content' => '
' . e($application->jobPost->employer->name ?? 'N/A') . '
', 'class' => '']; $cells[] = ['content' => '
' . e($application->created_at->format('M d, Y')) . '
', 'class' => '']; $statusClass = $application->status === 'accepted' ? 'bg-green-100 text-green-800' : ($application->status === 'rejected' ? 'bg-red-100 text-red-800' : 'bg-amber-100 text-amber-800'); $cells[] = ['content' => '' . e(ucfirst($application->status)) . '', 'class' => '']; $rows[] = ['cells' => $cells]; } @endphp @if(empty($rows))
No applications yet
@else @include('admin.components.table_shell', [ 'title' => 'Recent Applications', 'headers' => $headers, 'rows' => $rows, ]) @endif @if($documents->count() > 0)

Documents

@foreach($documents as $document)

{{ $document->document_type }}

Uploaded {{ $document->created_at->diffForHumans() }}

{{ ucfirst($document->status) }}
@endforeach
@endif
@endsection