@extends('layouts.app') @section('title', 'Kuyruk – Pazarlama Destek') @section('content')
{{-- ── Header ── --}}

{{ $statusTabs[$activeTab] ?? ucfirst($activeTab) }} {{ $requests->count() }} iş

@if (!$ready)
Migration çalıştırılmadı: php artisan migrate
@endif @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
{{-- ── Tabs ── --}}
@foreach ($statusTabs as $tabKey => $tabLabel) {{ $tabLabel }} {{ $tabCounts[$tabKey] ?? 0 }} @endforeach
{{-- ── Filters ── --}}
@if (!empty($scopeOptions) && is_array($scopeOptions)) @endif
@if ($search || $filterType || $filterCat || (($scope ?? '') !== ((array_key_exists('all', (array) ($scopeOptions ?? [])) ? 'all' : 'pool')))) @endif
{{-- ── Table ── --}}
@if ($requests->isNotEmpty()) @if ($canManage || !empty($isSharedPool)) @endif @foreach ($requests as $r) @php $cat = $categories[$r->category_key] ?? ['icon' => 'bi-circle', 'label' => $r->category_key]; $st = $statusMap[$r->status] ?? ['label' => $r->status, 'class' => '']; $pr = $priorityMap[$r->priority] ?? ['label' => $r->priority, 'icon' => 'bi-dash', 'class' => '']; $terminDt = $r->termin_date ? \Carbon\Carbon::parse($r->termin_date) : null; $terminOverdue = $terminDt && $terminDt->isPast(); $isAdvancedWorkflowStatus = in_array((string) $r->status, ['solution_center', 'control', 'customer_review'], true); @endphp @if ($canManage) @elseif (!empty($isSharedPool)) @endif @endforeach
Talep Türü Anahtar Başlık Talep Eden Atanan Durum Öncelik Termin Tarihİşlem
{{ $r->request_type }}
{{ $cat['label'] }}
{{ $r->request_key }} {{ $r->summary }} {{ $r->reporter_name ?? '—' }} @if ($canManage)
@csrf
@else {{ $r->assignee_name ?? 'Atanmamış' }} @endif
@if (!empty($isSharedPool) || $isAdvancedWorkflowStatus) {{ $st['label'] }} @if ($isAdvancedWorkflowStatus)
Detaydan yönetin
@endif @else
@csrf {{ $st['label'] }}
@endif
@if (!empty($isSharedPool)) {{ $pr['label'] }} @else
@csrf
@endif
{{ $terminDt ? $terminDt->format('d.m.Y') : '—' }} {{ \Carbon\Carbon::parse($r->created_at)->format('d.m.Y') }}
@csrf
@csrf
@else
Bu kuyrukta iş yok
{{ $statusTabs[$activeTab] ?? '' }} durumunda aktif talep bulunmuyor.
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush