@extends('layouts.mainlayout') @section('title', 'Biometric Reports') @section('main')

Biometric Reports

@if(session('error'))
{{ session('error') }}
@endif
@if(isset($groupedData) && $groupedData->isNotEmpty())

Device Logs for {{ $selectedDate }}

@foreach($groupedData as $employeeCode => $records) @endforeach
Employee ID Employee Name Log Times
{{ $employeeCode }} {{ $employeeNames[$employeeCode] ?? 'Unknown' }} @foreach($records as $index => $record) @php $highlightClass = ''; if ($index === 0) { $highlightClass = 'font-weight-bold'; // Style for 1st punch } elseif ($index === 1) { $highlightClass = 'font-weight-bold'; // Style for 2nd punch } elseif ($index > 1) { // Alternate highlight colors for punches after the 2nd $highlightClass = $index % 2 === 0 ? 'bg-info' : 'bg-success'; } @endphp {{ ($index + 1) . ' Punch: ' . \Carbon\Carbon::parse($record['LogDate'])->format('H:i:s') }}
@endforeach
@else

No data available for the selected date.

@endif
@endsection