@php($h = fn ($m) => \App\Support\Hours::fmt($m))
{{ __('smgv.nav.exports') }}
@foreach ([ ['employees', $count, null, 'users'], ['soll', $h($kpi['soll']), __('smgv.hours'), 'calendar-clock'], ['recorded', $h($kpi['recorded']), __('smgv.hours'), 'clock'], ['productive', $h($kpi['prod']), __('smgv.hours'), 'hard-hat'], ['travel', $h($kpi['travel']), __('smgv.hours'), 'truck'], ['overtime', $h($kpi['saldo']), __('smgv.hours'), 'activity'], ['vacation', $h($kpi['vacation']), __('smgv.hours'), 'calendar-days'], ['absence', $h($kpi['absence']), __('smgv.hours'), 'calendar-check'], ['openMonths', $openMonths, null, 'circle-dashed'], ['closedMonths', $closedMonths, null, 'lock'], ['review', $review, null, 'circle-alert'], ] as [$key, $value, $unit, $icon])
{{ __('smgv.kpi.'.$key) }}
{{ $value === '' ? '0.00' : $value }}@if ($unit){{ $unit }}@endif
@endforeach

{{ __('smgv.employees') }} ยท {{ __('smgv.months.'.$month) }} {{ $year }}

@if ($rows === [])

{{ __('smgv.noEmployees') }}

{{ __('smgv.nav.basisblatt') }}
@else
@foreach ($rows as $r) @endforeach
{{ __('smgv.employee') }}{{ __('smgv.table.pensum') }} {{ __('smgv.table.soll') }}{{ __('smgv.table.actual') }} {{ __('smgv.table.productive') }}{{ __('smgv.table.travel') }} {{ __('smgv.table.overtime') }}{{ __('smgv.table.vacation') }} {{ __('smgv.table.absence') }}{{ __('smgv.table.status') }}{{ __('smgv.open') }}
{{ \Illuminate\Support\Str::of($r['name'])->explode(' ')->take(2)->map(fn ($p) => mb_substr($p, 0, 1))->implode('') }}{{ $r['name'] }} @if ($r['warnings'] > 0){{ $r['warnings'] }}@endif {{ \App\Support\Hours::pct($r['pensum']) }} % {{ $h($r['soll']) }}{{ $h($r['actual']) }}{{ $h($r['prod']) }} {{ $h($r['travel']) }} {{ $h($r['saldo']) }} {{ $h($r['vacation']) }} {{ $h($r['absence']) }} {{ __('smgv.nav.monthly') }} {{ __('smgv.nav.annual') }}
@endif

{{ __('smgv.trend') }}

{{ $year }}
@php($max = max(1, ...array_map('abs', $trend))) @php($pts = collect($trend)->map(fn ($v, $i) => [($i - 1) * (300 / 11), 70 - ($v / $max) * 60])->values()) @foreach ($pts as $i => $p) {{ __('smgv.monthsShort.'.($i + 1)) }}: {{ $h($trend[$i + 1]) }} {{ __('smgv.monthsShort.'.($i + 1)) }} @endforeach

{{ __('smgv.kpi.overtime') }}: {{ $h($trend[$month]) }} {{ __('smgv.hours') }}