@props([ 'employee' => null, 'className' => '' ]) @php $statusColors = [ 'active' => 'bg-success text-white', 'inactive' => 'bg-secondary text-white', 'on-leave' => 'bg-warning text-dark' ]; $statusLabels = [ 'active' => 'Active', 'inactive' => 'Inactive', 'on-leave' => 'On Leave' ]; $employee = $employee ?? (object)[ 'id' => '1', 'name' => 'John Doe', 'email' => 'john.doe@company.com', 'phone' => '+1 (555) 123-4567', 'position' => 'Software Engineer', 'department' => 'Engineering', 'location' => 'San Francisco, CA', 'status' => 'active', 'joinDate' => '2024-01-15', 'avatar' => null ]; @endphp
@if($employee->avatar) {{ $employee->name }} @else
{{ collect(explode(' ', $employee->name))->map(fn($n) => $n[0])->join('') }}
@endif
{{ $employee->name }}

{{ $employee->position }}

{{ $statusLabels[$employee->status] ?? 'Active' }}
{{ $employee->department }} • {{ $employee->location }}
Joined {{ \Carbon\Carbon::parse($employee->joinDate)->format('M d, Y') }}