@php($h = fn ($m) => \App\Support\Hours::fmt($m))
@if ($flash)
{{ $flash }}
@endif @if ($error)@endif @if (! $emp)

{{ __('smgv.employee') }}: —

@else
{{-- Personalien --}}

{{ __('smgv.basis.profile') }}

{{ __('smgv.basis.company') }}: {{ $company }}
{{ __('smgv.basis.name') }}{{ $emp->name }}
{{ __('smgv.basis.email') }}{{ $emp->email ?: '—' }}
{{ __('smgv.basis.phone') }}{{ $emp->phone ?: '—' }}
{{-- Vertrag + Vorjahr --}}

{{ __('smgv.basis.contract') }}

{{ __('smgv.basis.previous') }} · {{ $year }}

{{ __('smgv.basis.vacationGross') }}{{ $h($grossVacation) }}
{{ __('smgv.basis.vacationEffective') }}{{ $h($yearResult['vacation']['gav']) }} {{ __('smgv.draft') }}
{{-- Pensum --}}

{{ __('smgv.basis.pensum') }}

{{ __('smgv.basis.pensumHint') }}

@foreach (__('smgv.weekdays') as $i => $d)@if ($i <= 5)@endif @endforeach @foreach ($yearResult['month_results'] as $mr) @php($sample = collect($mr['days'])->first(fn ($d) => $d['employed'])) @foreach (range(1, 5) as $wd) @php($day = collect($mr['days'])->first(fn ($d) => $d['weekday'] === $wd && $d['employed'])) @endforeach @endforeach
{{ __('smgv.month') }}{{ $d }}{{ __('smgv.basis.effective') }}{{ __('smgv.table.soll') }}
{{ __('smgv.monthsShort.'.$mr['month']) }}{{ $day ? \App\Support\Hours::pct($day['pensum_bp']) : '0.00' }}{{ \App\Support\Hours::pct($mr['employment_bp']) }} % {{ $h($mr['totals']['soll']) }}
Ø{{ \App\Support\Hours::pct($yearResult['employment_bp']) }} %{{ $h($yearResult['totals']['soll']) }}

{{ __('smgv.basis.changePensum') }}

@foreach (__('smgv.weekdays') as $i => $d) @endforeach

{{ __('smgv.basis.history') }}

    @forelse ($periods as $p)
  • {{ $p->valid_from->format('d.m.Y') }} – {{ $p->valid_to?->format('d.m.Y') ?? '…' }} {{ collect($p->bp())->map(fn ($v, $k) => __('smgv.weekdays.'.$k).' '.\App\Support\Hours::pct($v))->implode(' · ') }} @if ($p->reason){{ $p->reason }}@endif
  • @empty
  • —
  • @endforelse
{{-- Login & Security (Administrator only; the component re-checks the role on every action). --}} @if ($emp->role === \App\Enums\Role::Worker) @endif @endif {{-- Feiertagskalender (company-wide) --}}

{{ __('smgv.basis.holidays') }} · {{ $year }}

{{ __('smgv.rules.holidayHint') }}
@foreach (range(1, 31) as $d)@endforeach @foreach (range(1, 12) as $m) @foreach (range(1, 31) as $d) @if (! checkdate($m, $d, $year)) @else @php($date = sprintf('%04d-%02d-%02d', $year, $m, $d)) @php($wd = (int) date('N', strtotime($date))) @endif @endforeach @endforeach
{{ __('smgv.sheet.day') }}{{ $d }}
{{ __('smgv.monthsShort.'.$m) }}