@extends('layouts.app') @section('title', 'Career Details') @section('content')
@if(session('success')) @endif @if(session('error')) @endif
@php $career = $apiData['data'] ?? []; $isExpired = \Carbon\Carbon::parse($career['application_deadline'] ?? now())->isPast(); @endphp

{{ $career['title'] ?? 'Job Title' }}

@if($career['is_urgent'] ?? false) Urgent Hiring @endif
Department

{{ ucfirst($career['department'] ?? 'General') }}

Location

{{ $career['location'] ?? 'Not specified' }}

Employment Type

{{ str_replace('_', ' ', ucfirst($career['employment_type'] ?? 'full_time')) }}

@if($career['salary_range'] ?? false)
Salary Range

{{ $career['salary_range'] }}

@endif
Job Description
{!! nl2br(e($career['description'] ?? 'No description provided.')) !!}
Requirements
{!! nl2br(e($career['requirements'] ?? 'No specific requirements.')) !!}
@if($career['benefits'] ?? false)
Benefits
{!! nl2br(e($career['benefits'])) !!}
@endif
Application Deadline

{{ \Carbon\Carbon::parse($career['application_deadline'] ?? now())->format('F d, Y') }}

@if($isExpired) Expired @else @php $deadline = \Carbon\Carbon::parse($career['application_deadline']); $daysLeft = now()->diffInDays($deadline, false); @endphp {{ $daysLeft }} days left @endif
Apply for this Position
@if($isExpired)
This position is no longer accepting applications.
@else @if(Session::has('api_token') && Session::get('user_role') == 'customer') @if($hasApplied ?? false)
You have already applied for this position.
View Your Application @else Apply Now @endif @else
Please login as a customer to apply for this position.
Login to Apply Create Account @endif @endif
Job Information
Posted Date

{{ \Carbon\Carbon::parse($career['created_at'] ?? now())->format('M d, Y') }}

Views

{{ $career['views_count'] ?? 0 }}

Applications Received

{{ $career['applications_count'] ?? 0 }}

Job Status

@if($career['is_active'] ?? false) Active @else Inactive @endif

Share This Job
@push('scripts') @endpush @endsection