Reporte de Asistencias

Desde {{ ucfirst($startDate->locale('es')->translatedFormat('F Y')) }} hasta {{ ucfirst($endDate->locale('es')->translatedFormat('F Y')) }}

Información del empleado

Nombre: {{ $user->name }} {{ $user->last_name ?? '' }}

DNI: {{ $user->dni ?? '---' }}

Áreas asignadas: {{ $user->areas->where('pivot.estado', 1)->pluck('nombre_area')->join(', ') ?: 'No asignadas' }}

Cargos asignados: {{ $user->cargos->where('pivot.estado', 1)->pluck('nombre_cargo')->join(', ') ?: 'No asignados' }}

Email: {{ $user->email }}

Estado: {{ ucfirst(strtolower($user->estado)) }}


Resumen general

Total Presentes Tardanzas Ausencias
{{ $attendancesMes->count() }} {{ $attendancesMes->where('status', 'presente')->count() }} {{ $attendancesMes->where('status', 'tarde')->count() }} {{ $attendancesMes->where('status', 'ausente')->count() }}
@php $grouped = $attendancesMes->groupBy(function ($a) { return \Carbon\Carbon::parse($a->date)->translatedFormat('F Y'); }); @endphp @foreach ($grouped as $month => $attendances)

{{ ucfirst($month) }}

@foreach ($attendances as $a) @endforeach
Fecha Entrada Salida Estado Horas trabajadas Observaciones
{{ \Carbon\Carbon::parse($a->date)->format('d/m/Y') }} {{ $a->check_in?->format('H:i') ?? '---' }} {{ $a->check_out?->format('H:i') ?? '---' }} {{ ucfirst($a->status) }} {{ $a->hours_worked ?? '---' }} {{ $a->notes ?? '' }}
@endforeach