@extends('layouts.dashboard.superadminapp') @section('title', 'Daily Employee Attendance & Leave Report') @section('styles') @endsection @section('content')
| Date | Employee ID | Name | Department | Attendance Status | Check In | Check Out | Working Hours | Leave Type | Leave Status |
|---|---|---|---|---|---|---|---|---|---|
| @if ($attendance && $attendance->date) {{ \Carbon\Carbon::parse($attendance->date)->format('d-m-Y') }} @elseif(request('date')) {{ \Carbon\Carbon::parse(request('date'))->format('d-m-Y') }} @else - @endif | {{ $emp->employee_id }} | {{ $emp->name }} | {{ $emp->department }} | @if($attendance) Present @elseif($leave) On Leave @else Absent @endif | {{ $attendance->check_in ?? '-' }} | {{ $attendance->check_out ?? '-' }} | @if ($attendance && $attendance->check_in && $attendance->check_out) @php $in = \Carbon\Carbon::parse($attendance->check_in); $out = \Carbon\Carbon::parse($attendance->check_out); $mins = $in->diffInMinutes($out); echo sprintf('%02d:%02d', intdiv($mins,60), $mins%60); @endphp @else - @endif | @if($leave) {{ $leave->leave_type }} @else - @endif | @if($leave) {{ $leave->status }} @else - @endif |