{{-- Header & Breadcrumb --}}
{{-- Filter Section --}}
{{-- Report Cards per Employee --}}
@if(isset($reportData) && $reportData->isNotEmpty())
@foreach($reportData as $data)
@php
$emp = $data['employee'];
$primaryId = (!empty($emp->primary_id) && $emp->primary_id !== '0' && $emp->primary_id !== 0) ? $emp->primary_id : '-';
$secondaryId = (!empty($emp->e_id) && $emp->e_id !== '0' && $emp->e_id !== 0) ? $emp->e_id : '-';
$post = $emp->postDetails->name ?? ($emp->post ?? '-');
$avgEff = $data['avg_efficiency'];
$effColor = $avgEff >= 90 ? 'text-success' : ($avgEff >= 75 ? 'text-warning' : 'text-danger');
@endphp
Staff Performance Report
{{-- School Header for Print --}}
{{-- Employee Header for Web View --}}
@endforeach
@elseif(request()->has('from_date'))
{{ $schoolProfile->school_name ?? config('app.name', 'Smart Shikkha') }}
@if(!empty($schoolProfile->address)){{ $schoolProfile->address }}
@endifStaff Performance Report | Period: {{ $fromDate->format('d M, Y') }} to {{ $toDate->format('d M, Y') }}
{{ $emp->name }}
Primary ID: {{ $primaryId }} | Secondary ID: {{ $secondaryId }} | Post: {{ $post }}
Period: {{ $fromDate->format('d M, Y') }} - {{ $toDate->format('d M, Y') }}
{{-- Employee Information Table --}}
{{-- Performance Summary Table --}}
{{-- Daily Performance Breakdown Table --}}
| Employee Name: {{ $emp->name }} | Primary ID: {{ $primaryId }} | Secondary ID: {{ $secondaryId }} | Designation: {{ $post }} |
| Working Days | Present Days | Expected Hours | Worked Hours | Shortage/Excess | Total Late | Avg Efficiency |
|---|---|---|---|---|---|---|
| {{ $data['total_working_days'] }} | {{ $data['present_days'] }} | {{ $data['total_expected'] }} | {{ $data['total_worked'] }} | @if($data['total_shortage_minutes'] > 0) {{ $data['total_shortage'] }} @else 0h 0m @endif | {{ $data['total_late_minutes'] }}m | {{ $avgEff }}% |
| Date | Day | Morning Shift | Day Shift | Expected | Worked | Shortage | Late | Efficiency | Status | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| In | Out | Late | In | Out | Late | ||||||||
| {{ \Carbon\Carbon::parse($p['date'])->format('d-m-Y') }} | {{ $p['day_name'] }} | {{-- MORNING --}}{{ $p['morning_in'] }} | {{ $p['morning_out'] }} | @if($p['morning_late'] !== '-') {{ $p['morning_late'] }} @else - @endif | {{-- DAY --}}{{ $p['day_in'] }} | {{ $p['day_out'] }} | @if($p['day_late'] !== '-') {{ $p['day_late'] }} @else - @endif | {{ $p['expected_hours'] }} | {{ $p['worked_hours'] }} | @if($p['shortage_minutes'] > 0) {{ $p['shortage_hours'] }} @else 0h 0m @endif | @if($p['late_minutes'] > 0) {{ $p['late_hours'] }} @else 0h 0m @endif | {{ $eff }}% | {{ strtoupper($p['status']) }} |
No performance data found for the selected criteria.
@endif