@forelse ($columnTasks as $task)
@php
$priorityCfg = $priorityMap[(string) ($task->priority ?? 'normal')] ?? $priorityMap['normal'];
$projectColor = trim((string) ($task->project_color ?? ''));
$projectStyle = $projectColor !== '' ? 'background-color: ' . e($projectColor) . '; color: #fff;' : '';
$ownerName = trim((string) ($task->owner_name ?? ''));
$ownerInitial = $ownerName !== '' ? mb_strtoupper(mb_substr($ownerName, 0, 1, 'UTF-8'), 'UTF-8') : '?';
$searchText = mb_strtolower(trim((string) ($task->title . ' ' . ($task->description ?? '') . ' ' . ($task->project_name ?? '') . ' ' . $ownerName)), 'UTF-8');
$detailData = json_decode((string) ($task->detail_json ?? ''), true);
$detailData = is_array($detailData) ? $detailData : [];
$detailProgress = isset($detailData['progress_percent']) && $detailData['progress_percent'] !== null
? max(0, min(100, (int) $detailData['progress_percent']))
: null;
$modalPayload = [
'id' => (int) $task->id,
'title' => (string) ($task->title ?? ''),
'description' => (string) ($task->description ?? ''),
'status' => (string) ($task->status ?? 'todo'),
'priority' => (string) ($task->priority ?? 'normal'),
'due_date' => (string) ($task->due_date ?? ''),
'owner_name' => $ownerName,
'project_name' => (string) ($task->project_name ?? ''),
'project_color' => $projectColor,
'status_url' => route('admin.marketing.tasks.status', ['id' => $task->id]),
'details_url' => route('admin.marketing.tasks.details', ['id' => $task->id]),
'delete_url' => route('admin.marketing.tasks.delete', ['id' => $task->id]),
'show_url' => route('admin.marketing.tasks.show', ['id' => $task->id]),
'detail' => $detailData,
];
$modalPayloadJson = json_encode(
$modalPayload,
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
);
@endphp
{{ $priorityCfg['label'] }}
{{ $ownerInitial }}
{{ $task->title }}
{{ $task->description ?: 'Açıklama yok.' }}
{{ $task->project_name }}
{{ $task->due_date ?: '-' }}
@if ($detailProgress !== null)
%{{ $detailProgress }}
@endif
@if ($canManage)
@endif
@empty
Bu kolonda kayıt yok.
@endforelse