@extends('layouts.app') @section('title', 'Attendance Management') @section('no-page-header') @section('content')
Attendance Records
@if(auth()->user()->can('create_attendance')) Add Attendance @endif @if(auth()->user()->can('export_attendance')) @endif @if(auth()->user()->can('import_attendance')) @endif
@forelse($attendances ?? [] as $attendance) @empty @endforelse
Employee Date Punch In Punch Out Total Hours Behavior Status Actions
{{ $attendance->user->full_name }}
{{ $attendance->user->profile->employee_id ?? '' }}
{{ $attendance->in_date->format('M d, Y') }} @php $punchIns = $attendance->all_punch_in_times; @endphp @if($punchIns->count() > 0) @if($punchIns->count() == 1) {{ $punchIns->first()->punch_time->format('h:i A') }} @else
@foreach($punchIns as $index => $punchIn)
{{ $punchIn->punch_time->format('h:i A') }} ({{ $index + 1 }})
@endforeach
@endif @else - @endif
@php $punchOuts = $attendance->all_punch_out_times; @endphp @if($punchOuts->count() > 0) @if($punchOuts->count() == 1) {{ $punchOuts->first()->punch_time->format('h:i A') }} @else
@foreach($punchOuts as $index => $punchOut)
{{ $punchOut->punch_time->format('h:i A') }} ({{ $index + 1 }})
@endforeach
@endif @else - @endif
{{ $attendance->total_hours ?? '-' }} @if($attendance->behavior === 'early') Early @elseif($attendance->behavior === 'late') Late @else Regular @endif {{ $attendance->status->name }}
@if(auth()->user()->can('edit_attendance')) @endif @if(auth()->user()->can('delete_attendance')) @endif
No attendance records found.
@if(isset($attendances))
{{ $attendances->links() }}
@endif
@endsection @section('scripts') @endsection