@extends('layouts.app') @section('title', 'Timesheet - {{ $employee->first_name }} {{ $employee->last_name }} - Blackberry Farm') @section('content')
⏰ Clock In ⏰ Clock Out ← Back to Employee 👥 All Employees
@if($currentShift)

🟢 Currently Working

Clock In Time
{{ date('g:i A', strtotime($currentShift->clock_in)) }}
Hours Worked Today
{{ number_format($currentShift->hours_worked ?? 0, 1) }}h
Estimated Pay Today
${{ number_format(($currentShift->hours_worked ?? 0) * $employee->hourly_rate, 2) }}
@else

⚪ Not Currently Working

Employee is not currently clocked in. Use the Clock In button to start tracking time.

@endif
{{ number_format($weeklyStats['totalHours'] ?? 0, 1) }}h
Total Hours This Week
{{ number_format($weeklyStats['regularHours'] ?? 0, 1) }}h
Regular Hours
{{ number_format($weeklyStats['overtimeHours'] ?? 0, 1) }}h
Overtime Hours
${{ number_format($weeklyStats['totalPay'] ?? 0, 2) }}
Estimated Weekly Pay

📊 Time Tracking Analytics

📈 Weekly Hours Trend

📅 Daily Hours This Week

⏰ Overtime Analysis

{{ $overtimeStats['days_with_overtime'] ?? 0 }}
Days with OT
{{ number_format($overtimeStats['avg_overtime_per_day'] ?? 0, 1) }}
Avg OT Hours/Day
${{ number_format($overtimeStats['overtime_pay'] ?? 0, 2) }}
OT Pay This Week
{{ number_format($attendanceStats['attendance_rate'] ?? 0, 1) }}%
Attendance Rate

✏️ Manual Time Entry

@csrf

📋 Timesheet History

@if($timesheets && $timesheets->count() > 0)
@foreach($timesheets as $timesheet) @endforeach
Date Clock In Clock Out Break Total Hours Overtime Pay Actions
{{ date('M j, Y', strtotime($timesheet->date)) }}
{{ date('l', strtotime($timesheet->date)) }}
{{ $timesheet->clock_in ? date('g:i A', strtotime($timesheet->clock_in)) : '-' }}
{{ $timesheet->clock_out ? date('g:i A', strtotime($timesheet->clock_out)) : 'Still working' }}
{{ $timesheet->break_duration ? $timesheet->break_duration . ' min' : '-' }}
{{ number_format($timesheet->total_hours ?? 0, 1) }}h
@if(($timesheet->total_hours ?? 0) > 8)
{{ number_format(($timesheet->total_hours ?? 0) - 8, 1) }}h
@else
-
@endif
${{ number_format($timesheet->total_pay ?? 0, 2) }}
Edit
{{ $timesheets->links() }}
@else

No timesheet entries found

No time entries for the selected period. Use the Clock In/Out buttons or manual entry form above.

@endif
@endsection @push('scripts') @endpush