@extends('layouts.app') @section('page_title', 'Work Report Details') @section('content')
Back
@if (auth()->user()->hasRole(['admin', 'super_admin'])) Download PDF @endif {{ ucfirst($report->approval_status) }}
Work Report - {{ $report->created_at->format('d M, Y') }}

Submitted by {{ $report->user->name }} at {{ $report->submitted_at->format('h:i A') }}

Check In
{{ $report->attendance->check_in ? $report->attendance->check_in->format('h:i A') : '-' }}
Check Out
{{ $report->attendance->check_out ? $report->attendance->check_out->format('h:i A') : 'Active' }}
Total Break
{{ floor($report->attendance->total_break_minutes / 60) }}h {{ $report->attendance->total_break_minutes % 60 }}m
Net Work Time
{{ floor($report->attendance->total_work_minutes / 60) }}h {{ $report->attendance->total_work_minutes % 60 }}m
Punch Timeline
Check In

{{ $report->attendance->check_in ? $report->attendance->check_in->format('h:i:s A - d M Y') : 'Missing data' }}

@foreach ($report->attendance->breaks->sortBy('break_start') as $break)
Break Taken

{{ $break->break_start ? $break->break_start->format('h:i A') : '?' }} to {{ $break->break_end ? $break->break_end->format('h:i A') : 'Still on break' }} {{ $break->duration_minutes }} mins

@endforeach @if ($report->attendance->check_out)
Check Out

{{ $report->attendance->check_out->format('h:i:s A - d M Y') }}

@endif
Break History
@forelse($report->attendance->breaks as $break) @empty @endforelse
Break Start Break End Duration
{{ $break->break_start ? $break->break_start->format('h:i A') : '-' }} {{ $break->break_end ? $break->break_end->format('h:i A') : 'Active' }} {{ $break->duration_minutes }} mins
No breaks recorded for this session.
Work Summary
{!! e($report->raw_summary) !!}
Executed Tasks ({{ $report->total_tasks }})
@foreach ($report->tasks as $task)
{{ $loop->iteration }}
{{ $task->task_description }}
@endforeach
@if (auth()->user()->hasRole(['admin', 'super_admin']) && $report->approval_status == 'pending')
@csrf
@csrf
@endif
@endsection