{{ __("Today's breaks") }} @if ($currentBreak) @else @endif
@php $totalSeconds = 0; @endphp @forelse($todayBreaks as $br) @php $duration = breakTimeConvert($br->break_start, $br->break_end); preg_match('/(\d+)\s*h\s*(\d+)\s*m\s*(\d+)\s*s/', $duration, $matches); if (count($matches) === 4) { $totalSeconds += ((int) $matches[1] * 3600) + ((int) $matches[2] * 60) + (int) $matches[3]; } @endphp @empty @endforelse @if($todayBreaks->isNotEmpty()) @endif
{{ __('Start') }} {{ __('End') }} {{ __('Duration') }}
{{ $br->break_start ? date('h:i:s A', strtotime($br->break_start)) : '—' }} {{ $br->break_end ? date('h:i:s A', strtotime($br->break_end)) : '—' }} {{ $duration }}
{{ __('No breaks recorded today.') }}
{{ __('Total break time') }} @php $totalHours = floor($totalSeconds / 3600); $remainingSeconds = $totalSeconds % 3600; $totalMinutes = floor($remainingSeconds / 60); $finalSeconds = $remainingSeconds % 60; echo "{$totalHours} h {$totalMinutes} m {$finalSeconds} s"; @endphp