@extends('layouts.admin') @section('title', 'Timesheets') @section('content')

Timesheets

View and export staff work hours and attendance.

Export CSV
@if(request('date_from') || request('date_to') || request('user_id') || request('site_id')) Clear Filters @endif

Total Hours

{{ number_format($totalHours ?? 0, 2) }}

Days Worked

{{ $totalDays ?? 0 }}

Total Clock-ins

{{ $totalClockIns ?? 0 }}

@if(($status ?? 'pending') === 'pending') @endif @forelse($timesheets as $timesheet) @foreach($timesheet->shifts as $index => $shift) @if($index === 0) @endif @if(($status ?? 'pending') === 'pending') @endif @endforeach @empty @endforelse
Staff Date Site Client Clock In Clock Out Hours StatusActions
{{ strtoupper(substr($timesheet->user->name, 0, 1)) }}
{{ $timesheet->user->name }} {{ $timesheet->total_shifts }} shift{{ $timesheet->total_shifts !== 1 ? 's' : '' }} • {{ number_format($timesheet->total_hours, 2) }}h total
{{ $shift->clock_in->setTimezone(config('app.timezone'))->format('M d, Y') }}
{{ $shift->site->name }}
{{ $shift->site->client->name ?? 'N/A' }}
{{ $shift->clock_in->setTimezone(config('app.timezone'))->format('H:i') }}
{{ $shift->clock_out->setTimezone(config('app.timezone'))->format('H:i') }}
{{ number_format($shift->hours, 2) }}h
@if($shift->status === 'pending') Pending @elseif($shift->status === 'approved') Approved @else Rejected @endif
@csrf

No timesheet data found

@if(request('date_from') || request('date_to') || request('user_id') || request('site_id')) Try adjusting your filter criteria or date range @else Timesheet data will appear here once staff members clock in/out @endif

@if($paginatedShifts->hasPages())
{{ $paginatedShifts->appends(request()->query())->links() }}
@endif
@push('scripts') @endpush @endsection