@extends('layouts.app') @section('title', 'Attendance Dashboard') @section('content')

Attendance Dashboard

Total Employees

{{ $todayStats['total_employees'] }}

Present

{{ $todayStats['present'] }}

{{ $todayStats['total_employees'] > 0 ? round(($todayStats['present'] / $todayStats['total_employees']) * 100, 1) : 0 }}% attendance rate

Late

{{ $todayStats['late'] }}

Absent

{{ $todayStats['absent'] }}

Device/Location Breakdown

@foreach($deviceStats as $stat)

{{ $stat['device']->location_name }}

{{ $stat['device']->company->name }}
Present {{ $stat['present'] }}
Late {{ $stat['late'] }}
Total {{ $stat['total'] }}
@endforeach

Recent Attendance

@forelse($recentAttendance as $attendance) @empty @endforelse
Employee Location Check-In Status
{{ $attendance->employee_name }}
{{ $attendance->department->name ?? 'N/A' }}
{{ $attendance->biometricDevice->location_name ?? 'N/A' }} @if($attendance->check_in_time) {{ \Carbon\Carbon::parse($attendance->check_in_time)->format('H:i') }} @else - @endif {!! $attendance->getStatusBadge() !!}
No recent attendance records
@endsection