#{{ $card->id }}
@if($card->parent)
#{{ $card->parent_id }}
@endif
@if($card->category)
{{ $card->category->name }}
@endif
@if($card->project)
{{ $card->project->name }}
@endif
{{ $priBadge['txt'] }}
@php
$subtaskTotal = $card->subtasks->count();
$subtaskDone = $card->subtasks->where('is_done', true)->count();
$childTotal = $card->children->count();
$childDone = $card->children->where('done_ratio', 100)->count();
$soon = $card->due_date && !$overdue && $card->due_date->diffInDays(now()) <= 3 && $card->done_ratio < 100;
@endphp
@if($card->done_ratio > 0 || $subtaskTotal > 0 || $childTotal > 0)
@if($card->done_ratio > 0)
@endif
@if($subtaskTotal > 0)
@endif
@if($childTotal > 0)
@endif
@php $assigneeNames = $card->assignees->pluck('name')->join('、') @endphp
{{ $assigneeNames ?: '未指派' }}
@if($subtaskTotal > 0)
{{ $subtaskDone }}/{{ $subtaskTotal }}
@endif
@if($childTotal > 0)
{{ $childDone }}/{{ $childTotal }}
@endif
@if($card->work_hours)
{{ $card->work_hours }}小時
@endif
@if($card->due_date)
@php
$dueCls = $overdue ? 'text-danger fw-bold' : ($soon ? 'fw-semibold' : 'text-muted');
$dueStyle = $soon && !$overdue ? 'color:#d97706;' : '';
@endphp
{{ $card->due_date->format('Y-m-d') }}
@endif