@extends('layouts.app') @section('title', 'Employee Profile') @section('content')

Employee Profile

View detailed employee information

Back to List @if(auth()->user()->can('edit_employees')) Edit Employee @endif

{{ $employee->full_name }}

{{ $employee->profile->employee_id ?? '' }}

{{ $employee->status->name }}
{{ $employee->email }}
{{ $employee->profile->phone ?? 'N/A' }}
Joined {{ $employee->profile?->join_date?->format('M d, Y') ?? 'N/A' }}
{{ $employee->departments->pluck('name')->join(', ') ?: 'No Department' }}
{{ $employee->designations->pluck('name')->join(', ') ?: 'No Designation' }}

Leave Allocation & Balance

Current leave status and allocation

@if(isset($leaveAllocation))
Risk Level: {{ ucfirst($leaveAllocation['employee']['risk_level']) }} Risk

Designations: {{ implode(', ', $leaveAllocation['employee']['designations']) }}

@foreach($leaveAllocation['leave_balances'] as $leaveType => $balance)
{{ ucfirst(str_replace('_', ' ', $leaveType)) }}
Allocated: {{ $balance['allocated'] }} days
Used: {{ $balance['used'] }} days
Remaining: {{ $balance['remaining'] }} days
{{ round(($balance['used'] / max($balance['allocated'], 1)) * 100) }}% used
@endforeach
Summary
{{ $leaveAllocation['summary']['total_allocated'] }}
Total Allocated
{{ $leaveAllocation['summary']['total_used'] }}
Total Used
{{ $leaveAllocation['summary']['total_remaining'] }}
Total Remaining
@if(isset($leaveAllocation['restrictions']))
Leave Restrictions
    @if($leaveAllocation['restrictions']['critical_duty_windows'] ?? false)
  • • Cannot take leave during critical duty windows
  • @endif @if($leaveAllocation['restrictions']['advance_approval_required'] ?? false)
  • • Advance approval required
  • @endif @if($leaveAllocation['restrictions']['replacement_mandatory'] ?? false)
  • • Replacement mandatory
  • @endif @if($leaveAllocation['restrictions']['blackout_periods'] ?? false)
  • • Blackout periods apply
  • @endif
@endif @else
Leave allocation data not available. Please initialize leave balances for this employee.
@endif

Recent Leave History

Previous leave requests and their status

@if(isset($leaveHistory) && count($leaveHistory) > 0)
@foreach($leaveHistory as $leave) @endforeach
Type Period Days Status Date
{{ $leave['leave_type'] }} {{ $leave['from_date'] }} - {{ $leave['to_date'] }} {{ $leave['days'] }} {{ ucfirst($leave['status']) }} {{ \Carbon\Carbon::parse($leave['created_at'])->format('M d, Y') }}
@else
No leave history found for this employee.
@endif
@endsection