@extends('layouts.app') @section('title', $employee->full_name) @section('page-title','Employees') @section('content')
{{-- Sidebar card --}}
{{ strtoupper(substr($employee->first_name,0,1).substr($employee->last_name,0,1)) }}
{{ $employee->full_name }}
{{ $employee->position }}
{{ ucfirst(str_replace('_',' ',$employee->status)) }}
{{ $employee->years_of_service ?? 0 }}
Yrs Service
{{ $employee->employment_type === 'full_time' ? 'FT' : 'PT' }}
Type
{{ $employee->employee_number }}
ID
Quick Links
Leave Records Evaluations @if(auth()->user()->isHrOrAdmin()) Payroll @endif
{{-- Main content --}}
{{-- Personal info --}}
Personal Information
@php $fields = [ ['Date of Birth', $employee->date_of_birth?->format('F j, Y')], ['Place of Birth', $employee->place_of_birth], ['Gender', $employee->gender], ['Marital Status', $employee->marital_status], ['Citizenship', $employee->citizenship], ['National ID', $employee->national_id], ['Present Address', $employee->present_address], ['Permanent Address', $employee->permanent_address], ['Phone', $employee->user->phone ?? null], ['Email', $employee->user->email ?? null], ['Emergency Contact', $employee->emergency_contact_name], ['Emergency Phone', $employee->emergency_contact_phone], ]; @endphp @foreach($fields as [$label, $value]) @if($value)
{{ $label }}
{{ $value }}
@endif @endforeach
{{-- Employment info --}}
Employment Details
Position
{{ $employee->position }}
Department
{{ $employee->department->name ?? '—' }}
Date of Employment
{{ $employee->date_of_employment?->format('F j, Y') }}
Employment Type
{{ ucfirst(str_replace('_',' ',$employee->employment_type)) }}
@if(auth()->user()->isHrOrAdmin())
Salary (USD)
${{ number_format($employee->salary_usd ?? 0, 2) }}
Bank
{{ $employee->bank_name ?? '—' }}
@endif
{{-- Education --}} @if($employee->education->count())
Educational Background
@foreach($employee->education->sortByDesc('attendance_to') as $edu)
{{ $edu->institution_name }}
{{ $edu->certificate_degree }} @if($edu->major) · {{ $edu->major }} @endif
{{ $edu->attendance_from?->format('Y') }} – {{ $edu->attendance_to?->format('Y') ?? 'Present' }}
@if($edu->graduated)Graduated@endif
@endforeach
@endif {{-- Employment History --}} @if($employee->employmentHistory->count())
Previous Employment
@foreach($employee->employmentHistory->sortByDesc('date_to') as $hist)
{{ $hist->position }} — {{ $hist->employer_name }}
{{ $hist->date_from?->format('M Y') }} – {{ $hist->date_to?->format('M Y') ?? 'Present' }}
@if($hist->reason_for_leaving)
Left: {{ $hist->reason_for_leaving }}
@endif
@endforeach
@endif {{-- Special skills --}} @if($employee->special_skills)
Special Skills & Memberships
@if($employee->special_skills)
Special Skills
{{ $employee->special_skills }}
@endif @if($employee->professional_memberships)
Professional Memberships
{{ $employee->professional_memberships }}
@endif
@endif
@endsection