@php // Port of lib/format.ts formatDuration: "4m", "48m", "1h 07m". $dur = fn (int $m) => $m >= 60 ? intdiv($m, 60).'h '.str_pad((string) ($m % 60), 2, '0', STR_PAD_LEFT).'m' : $m.'m'; @endphp {{-- Port of period-totals-card.tsx: weekly and monthly recorded totals (factual durations only; no pay policy is applied). --}}
@foreach ($periods as $name => $b)

{{ __('attendance.totals.'.$name) }}

{{ __('attendance.totals.sessions', ['count' => $b['sessions']]) }}
@foreach (['work' => 'workMs', 'travel' => 'travelMs', 'break' => 'breakMs', 'privateLeave' => 'privateLeaveMs'] as $label => $key)
{{ __('attendance.totals.'.$label) }}
{{ $dur($min($b[$key])) }}
@endforeach
@if ($b['incompleteSessions'] > 0)

{{ __('attendance.totals.incomplete', ['count' => $b['incompleteSessions']]) }}

@endif
@endforeach

{{ __('attendance.totals.note') }}