@extends('layouts.app') @section('title', 'Employee Login & Activity Report') @section('breadcrumb') Reports / Employee Login & Activity Report @endsection @section('content')

Employee Login & Activity Report

Date-wise employee login/logout times with tasks worked between sessions

Reset
Showing sessions from {{ $from->format('d M Y') }} to {{ $to->format('d M Y') }}
@forelse($reportRows as $row)
{{-- Session Header --}}
{{ strtoupper(substr($row['employee_name'], 0, 1)) }}
{{ $row['employee_name'] }}
{{ $row['employee_role'] }}
{{-- Login --}}
Login: {{ $row['login_at'] ? $row['login_at']->format('d M Y, h:i A') : '—' }}
{{-- Logout --}}
Logout: {{ $row['logout_at'] ? $row['logout_at']->format('d M Y, h:i A') : 'Still Active' }}
{{-- Duration --}}
Duration: {{ $row['duration_label'] }}
Tasks
{{ $row['task_count'] }}
Hours
{{ number_format($row['total_hours'], 2) }}h
Amount
${{ number_format($row['total_amount'], 2) }}
{{-- Task Table --}} @if($row['tasks']->isNotEmpty())
@foreach($row['tasks'] as $task) @endforeach
Job Client Task Started Ended Hours Rate Amount Status
{{ $task['job_number'] }} {{ $task['client'] }} {{ $task['task_name'] }} {{ $task['started_at']?->format('h:i A') ?? '—' }} {{ $task['stopped_at']?->format('h:i A') ?? ($task['status'] === 'running' ? 'Still Running' : '—') }} {{ number_format($task['hours'], 2) }}h ${{ number_format($task['rate'], 2) }}/h ${{ number_format($task['amount'], 2) }} @php $statusBadge = match($task['status']) { 'completed' => 'badge-green', 'paused' => 'badge-yellow', 'running' => 'badge-blue', default => 'badge-gray', }; @endphp {{ ucfirst($task['status']) }}
Session Total {{ number_format($row['total_hours'], 2) }}h ${{ number_format($row['total_amount'], 2) }}
@else
No tasks recorded during this session.
@endif
@empty

No login sessions found

Try adjusting the date range or employee filter.

@endforelse
@endsection