@extends('layouts.app') @php // HH:MM everywhere — see App\Support\Duration. The consolidated sheet // carried seconds, but the agent checkpoints every five minutes, so that // precision was never real. $hms = fn ($sec) => \App\Support\Duration::hhmmOrDash((int) $sec); // Tiles and the bar chart read on their own, so they take the compact // form; the table below stays HH:MM so its columns line up. $hm = fn ($sec) => \App\Support\Duration::compact((int) $sec); $pct = fn ($v) => $v === null ? '—' : rtrim(rtrim(number_format($v, 1), '0'), '.') . '%'; // The same figure without the sign, for CSV. A spreadsheet reads "62.5%" as // text and will not average a column of it; on screen the sign is a label, // in a file it is in the way. $pctRaw = fn ($v) => $v === null ? '—' : rtrim(rtrim(number_format($v, 1), '0'), '.'); @endphp @section('header')
Nothing tracked in this range
No employee recorded time between those dates.
| User | Activity Level | Idle (%) | Timer | Idle | Total Ex. Idle |
|---|---|---|---|---|---|
|
{{ $r2['name'] }}
{{ $r2['employee_id'] ?: $r2['designation'] ?: '—' }}
· {{ $r2['shifts'] }} {{ Str::plural('shift', $r2['shifts']) }}
|
{{-- Activity and Idle(%) are complements of one another,
so the pair always totals 100 — the same reading the
hand-built sheet gives. A dash means the range
predates measurement, which is not 0%. --}}
@include('reports._ps-meter', ['value' => $r2['activity_pct'], 'colour' => 'green']) | @include('reports._ps-meter', ['value' => $r2['idle_pct'], 'colour' => 'yellow']) | {{ $hms($r2['timer_sec']) }} | {{ $hms($r2['idle_sec']) }} | {{ $hms($r2['ex_idle_sec']) }} |
| {{ $totals['people'] }} {{ Str::plural('person', $totals['people']) }} | {{ $pct($totals['activity_pct']) }} | {{ $totals['activity_pct'] === null ? '—' : $pct(round(100 - $totals['activity_pct'], 1)) }} | {{ $hms($totals['timer_sec']) }} | {{ $hms($totals['idle_sec']) }} | {{ $hms($totals['ex_idle_sec']) }} |