@if (isset($staffList) && count($staffList) > 0)
Period: {{ \Carbon\Carbon::parse($fromDate)->format('d M Y') }} - {{ \Carbon\Carbon::parse($toDate)->format('d M Y') }}
@if (isset($selected_client))
Client : {{ $selected_client->company_name }}
@endif @if (isset($selected_project))
Project : {{ $selected_project->project_name }}
@endif
@foreach ($staffList as $index => $staff) @php $attendance = $staff->summary['attendance_percentage'] ?? 0; if ($attendance >= 95) { $grade = 'Excellent'; $badge = 'success'; } elseif ($attendance >= 85) { $grade = 'Good'; $badge = 'primary'; } elseif ($attendance >= 75) { $grade = 'Average'; $badge = 'warning'; } else { $grade = 'Poor'; $badge = 'danger'; } @endphp @endforeach
S.No Staff ID Staff Name Working Days Present Leave LOP Attendance % Paid % Performance
{{ $index + 1 }} {{ $staff->staff_id }} {{ $staff->staff_name }} {{ $staff->summary['working_days'] }} {{ $staff->summary['present'] }} {{ $staff->summary['leave'] }} {{ $staff->summary['lop'] }} {{ $attendance }}% {{ $staff->summary['paid_percentage'] }}% {{ $grade }}
@endif