@php $employer = auth()->user()->employer ?? null; $planType = $employer->employer_type ?? 'basic'; $hasLockerAccess = false; $canRent = in_array($planType, ['basic', 'professional']); if ($employer) { // Recruiter+ plans have free unlimited access $hasLockerAccess = in_array($planType, ['recruiter', 'enterprise', 'customenterprise']); // Check for active rental (Basic or Professional) if (!$hasLockerAccess && $canRent) { $activeRental = \App\Models\CandidateLockerRental::where('employer_id', $employer->id) ->where('is_active', true) ->where('rental_end_date', '>', now()) ->exists(); $hasLockerAccess = $activeRental; } } $isSaved = isset($saved) ? $saved : false; $candidateId = $candidateId ?? ($jobSeeker->id ?? null); @endphp @if(isset($candidateId)) @if($hasLockerAccess) @elseif($canRent)
@endif @endif