@php $tz = config('app.display_timezone'); $statusColors = ['draft' => 'slate', 'submitted' => 'amber', 'accepted' => 'emerald', 'returned' => 'rose', 'cancelled' => 'slate']; @endphp
@foreach ($kpis as $m)

{{ $m['label'] }}

{{ $m['value'] }}

{{ $m['sub'] }}
@endforeach
@foreach ($tabMeta as $key => $meta) @endforeach

{{ $tabMeta[$tab]['label'] }}

{{ __('Waiting handovers first, then the most recent.') }}

@forelse ($handovers as $h) @php $canRespond = $h->isPending() && \Illuminate\Support\Facades\Gate::allows('respond', $h); $canCancel = $h->isPending() && ((int) $h->sender_id === (int) auth()->id() || ($h->opportunity && \Illuminate\Support\Facades\Gate::allows('reassign', $h->opportunity))); $canRedirect = $h->isPending() && $canReassign && $h->opportunity; @endphp @empty @endforelse
{{ __('Sent') }} {{ __('Opportunity') }} {{ __('From and to') }} {{ __('Brief') }} {{ __('Status') }} {{ __('Actions') }}
{{ $h->submitted_at?->copy()->timezone($tz)->format('j M Y') }} @if ($h->opportunity) {{ $h->opportunity->title }}

{{ $h->opportunity->customer?->name }} · {{ __('owner: :name', ['name' => $h->opportunity->owner?->name ?? __('nobody')]) }}

@else {{ __('Deleted opportunity') }} @endif
{{ $h->sender?->name ?? __('a former member') }} → {{ $h->recipient?->name ?? __($groups[$h->recipient_group] ?? 'Administration') }}

{{ \Illuminate\Support\Str::limit((string) $h->brief, 160) }}

@if ($h->response_note)

{{ __('Answer: :note', ['note' => $h->response_note]) }}

@endif
{{ __($statuses[$h->status] ?? $h->status) }} @if ($h->responded_at)

{{ $h->respondedBy?->name }}, {{ $h->responded_at->copy()->timezone($tz)->format('j M') }}

@endif
@if ($canRespond) @endif @if ($canRedirect) @endif @if ($canCancel) @endif
@if ($search !== '' || $statusFilter !== '') @else @endif
{{ $handovers->links() }}
{{ __('Return the handover') }} {{ __('Cancel') }} {{ __('Return it') }} {{ __('Redirect the handover') }}
{{ __('Cancel') }} {{ __('Redirect') }}