@extends('layouts.app') @section('title', 'Employee Details - {{ $employee->first_name }} {{ $employee->last_name }} - Blackberry Farm') @section('content')
✏️ Edit Employee ⏰ Time Sheet 💰 Payroll ← Back to Employees
{{ ucfirst(str_replace('_', ' ', $employee->status)) }}
Employment Status
${{ number_format($employee->hourly_rate ?? 0, 2) }}
{{ $employee->pay_type === 'salary' ? 'Annual Salary' : 'Hourly Rate' }}
{{ number_format($weeklyHours ?? 0, 1) }}h
Hours This Week
${{ number_format($weeklyPay ?? 0, 2) }}
Pay This Week

👤 Personal Information

Full Name
{{ $employee->first_name }} {{ $employee->middle_name }} {{ $employee->last_name }}
@if($employee->date_of_birth)
Date of Birth
{{ date('M j, Y', strtotime($employee->date_of_birth)) }} ({{ \Carbon\Carbon::parse($employee->date_of_birth)->age }} years old)
@endif @if($employee->gender)
Gender
{{ ucfirst(str_replace('_', ' ', $employee->gender)) }}
@endif @if($employee->marital_status)
Marital Status
{{ ucfirst($employee->marital_status) }}
@endif

📞 Contact Information

Email
Primary Phone
@if($employee->phone_secondary)
Secondary Phone
@endif @if($employee->address)
Address
{{ $employee->address }}
@endif

💼 Employment Information

Department
{{ ucwords(str_replace('_', ' ', $employee->department)) }}
Position
{{ $employee->position }}
Employment Type
{{ ucwords(str_replace('_', ' ', $employee->employment_type)) }}
Hire Date
{{ date('M j, Y', strtotime($employee->hire_date)) }}
Years of Service
{{ \Carbon\Carbon::parse($employee->hire_date)->diffInYears(now()) }} years, {{ \Carbon\Carbon::parse($employee->hire_date)->diffInMonths(now()) % 12 }} months
Pay Frequency
{{ ucwords(str_replace('_', ' ', $employee->pay_frequency)) }}

💰 Wage Information

Pay Type
{{ ucwords(str_replace('_', ' ', $employee->pay_type)) }}
{{ $employee->pay_type === 'salary' ? 'Annual Salary' : 'Hourly Rate' }}
${{ number_format($employee->pay_type === 'salary' ? $employee->annual_salary : $employee->hourly_rate, 2) }} {{ $employee->pay_type === 'salary' ? '/year' : '/hour' }}
@if($employee->overtime_rate)
Overtime Rate
${{ number_format($employee->overtime_rate, 2) }}/hour
@endif
@if($employee->emergency_contact_name)

🚨 Emergency Contact

Name
{{ $employee->emergency_contact_name }}
@if($employee->emergency_contact_relationship)
Relationship
{{ $employee->emergency_contact_relationship }}
@endif @if($employee->emergency_contact_phone)
Phone
@endif
@endif @if($employee->notes)

📝 Notes

{{ $employee->notes }}
@endif

📋 Employee Summary

{{ substr($employee->first_name, 0, 1) }}{{ substr($employee->last_name, 0, 1) }}
{{ $employee->first_name }} {{ $employee->last_name }}
{{ $employee->position }}
{{ ucwords(str_replace('_', ' ', $employee->department)) }}
Status: {{ ucfirst(str_replace('_', ' ', $employee->status)) }}
Type: {{ ucwords(str_replace('_', ' ', $employee->employment_type)) }}
Hired: {{ date('M j, Y', strtotime($employee->hire_date)) }}

⏰ Recent Work Hours

@if(isset($recentTimesheets) && $recentTimesheets->count() > 0)
@foreach($recentTimesheets->take(7) as $timesheet)
{{ date('M j', strtotime($timesheet->date)) }}
{{ date('g:i A', strtotime($timesheet->clock_in)) }} - {{ $timesheet->clock_out ? date('g:i A', strtotime($timesheet->clock_out)) : 'Still working' }}
{{ number_format($timesheet->total_hours ?? 0, 1) }}h
@if(($timesheet->total_hours ?? 0) > 8)
{{ number_format(($timesheet->total_hours ?? 0) - 8, 1) }}h OT
@endif
@endforeach
@else

No recent work hours recorded

Start tracking time to see history
@endif
@if(true)

⚠️ Admin Actions

Administrative actions for employee management

@if($employee->status !== 'terminated')
@csrf
@endif
@csrf @method('DELETE')
@endif
@endsection