@php use App\Domain\Time\BusinessCalendar; $tz = config('qw.business_timezone'); $period = fn ($r) => BusinessCalendar::formatKey($r->start_date->format('Y-m-d')).' – '.BusinessCalendar::formatKey($r->end_date->format('Y-m-d')); @endphp
@unless ($canApprove)

{{ __('leave.approval.readOnly') }}

@endunless

{{ __('leave.approval.title') }}

@if ($rows->isEmpty())

{{ $filter === 'pending' ? __('leave.approval.emptyPending') : __('leave.approval.empty') }}

@else @endif
@if ($detail)

{{ __('leave.approval.detailTitle') }}

{{ __('leave.approval.worker') }}
{{ $detail->worker->name }}
{{ __('leave.approval.period') }}
{{ $period($detail) }} · {{ trans_choice('leave.days', $detail->days(), ['count' => $detail->days()]) }}
{{ __('leave.approval.workerComment') }}
{{ $detail->comment }}
{{ __('leave.approval.submittedOn') }}
{{ $detail->created_at->setTimezone($tz)->format('d.m.Y H:i') }}
{{ __('leave.approval.status') }}
{{ __('leave.status.'.strtoupper($detail->status)) }}@if ($detail->approved_at) — {{ __('leave.approval.approvedBy', ['name' => $detail->approvedBy?->name, 'date' => $detail->approved_at->setTimezone($tz)->format('d.m.Y H:i')]) }}@endif
@if($detail->rejection_reason)
{{ __('twoRole.rejectionReason') }}
{{ $detail->rejection_reason }}
@endif @if($detail->decided_at)
{{ __('twoRole.decidedBy') }}: {{ $detail->decidedBy?->name }} · {{ $detail->decided_at->setTimezone($tz)->format('d.m.Y H:i') }}
@endif
@if ($error) @elseif ($approved)

{{ __('twoRole.decisionSaved') }}. {{ __('twoRole.employeeNotified') }}

@endif
@if ($detail->isPending() && $canApprove) @endif
@endif @if ($confirming && $detail)
@endif