@extends('layouts.app') @section('title', 'Talepler To-Do') @section('content')

Kişisel To-Do Takip

Kendinize veya biriminize düşen talepleri takip edin.

@if (!empty($canOperateBoard)) Görev Yönetimi @if (!empty($canManage)) Kolonları Yönet @endif @endif Yeni Talep
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if ($errors->any())
@endif @if (!$ready)
Talepler görev tabloları hazır değil. Veritabanı geçişlerini çalıştırın.
@else
@php $selectedUnitName = $selectedUnitId > 0 ? (string) (($units->firstWhere('id', $selectedUnitId)->unit_name ?? 'Bilinmeyen Birim')) : 'Tüm Birimler'; $selectedCategoryName = $selectedCategoryId > 0 ? (string) (($categories->firstWhere('id', $selectedCategoryId)->category_name ?? 'Bilinmeyen Kategori')) : 'Tüm Kategoriler'; $selectedLaneLabel = $activeLane === 'all' ? 'Tüm Durumlar' : (string) (($laneLabels[$activeLane] ?? $activeLane)); $shownCount = (int) ($requestsByLane->flatten(1)->count()); @endphp
Birim: {{ $selectedUnitName }} Kategori: {{ $selectedCategoryName }} Durum Grubu: {{ $selectedLaneLabel }} Arama: {{ $search !== '' ? $search : 'Yok' }} Görünen Kayıt: {{ $shownCount }}
@php $laneClassMap = ['todo' => 'lane-todo', 'doing' => 'lane-doing', 'done' => 'lane-done']; $laneIconMap = ['todo' => 'bi-list-task', 'doing' => 'bi-arrow-repeat', 'done' => 'bi-check2-circle']; @endphp
@foreach (['todo', 'doing', 'done'] as $laneKey) @php $rows = $requestsByLane->get($laneKey, collect()); $laneLabel = ($laneLabels[$laneKey] ?? strtoupper($laneKey)); @endphp
{{ $laneLabel }}
{{ $rows->count() }}
@forelse ($rows as $row) @php $rowActionMeta = (array) ($row->action_meta ?? []); $rowActionLabels = (array) ($row->action_labels ?? []); $rowActionUserOptions = (array) ($row->action_user_options ?? []); $priorityClass = match (strtolower((string) ($row->priority ?? 'medium'))) { 'critical' => 'bg-danger-subtle text-danger border-danger', 'high' => 'bg-warning-subtle text-warning-emphasis border-warning', 'low' => 'bg-info-subtle text-info-emphasis border-info', default => 'bg-secondary-subtle text-secondary-emphasis border-secondary', }; $priorityLabel = match (strtolower((string) ($row->priority ?? 'medium'))) { 'critical' => 'Kritik', 'high' => 'Yüksek', 'low' => 'Düşük', default => 'Orta', }; @endphp
#{{ $row->request_key }} {{ $priorityLabel }}
{{ $row->title }}
{{ $row->unit_name }} {{ $row->category_name }}
Durum: {{ $row->status_label }}
@if (!empty($row->active_step_label))
Aktif Is Akisi Adimi: {{ $row->active_step_label }}
@endif
Sorumlu: {{ $row->assignee_name ?: 'Atanmadi' }}
@if (!empty($row->allowed_actions))
@foreach ($row->allowed_actions as $action) @php $meta = $rowActionMeta[$action] ?? []; $requiresUserSelect = (bool) ($meta['requires_user_select'] ?? false); $actionUsers = (array) ($rowActionUserOptions[$action] ?? ($unitMembersByUnit[(int) $row->unit_id] ?? [])); @endphp
@csrf @if ($requiresUserSelect) @endif
@endforeach
@endif
@empty

Bu alanda talep yok.

@endforelse
@endforeach
@endif
@endsection @push('styles') @endpush