任務報告與分析

{{-- Date Range Filter --}}
{{-- Summary Statistics --}}
總任務數
{{ number_format($stats['total_issues']) }}
開啟的任務
{{ number_format($stats['open_issues']) }}
已結案任務
{{ number_format($stats['closed_issues']) }}
逾期任務
{{ number_format($stats['overdue_issues']) }}
{{-- Charts Section --}}
{{-- Tasks by Status --}}

依狀態的任務

@foreach(['new', 'assigned', 'in_progress', 'review', 'closed'] as $status)
{{ ucfirst(str_replace('_', ' ', $status)) }} {{ $issuesByStatus[$status] ?? 0 }}
@php $percentage = $stats['total_issues'] > 0 ? (($issuesByStatus[$status] ?? 0) / $stats['total_issues']) * 100 : 0; @endphp
@endforeach
{{-- Tasks by Priority --}}

依優先級的任務

@foreach(['low', 'medium', 'high', 'urgent'] as $priority) @php $colors = ['low' => 'green', 'medium' => 'yellow', 'high' => 'orange', 'urgent' => 'red']; @endphp
{{ ucfirst($priority) }} {{ $issuesByPriority[$priority] ?? 0 }}
@php $percentage = $stats['total_issues'] > 0 ? (($issuesByPriority[$priority] ?? 0) / $stats['total_issues']) * 100 : 0; @endphp
@endforeach
{{-- Tasks by Type --}}

依類型的任務

@foreach(['work_item', 'project_task', 'maintenance', 'member_request'] as $type)
{{ ucfirst(str_replace('_', ' ', $type)) }} {{ $issuesByType[$type] ?? 0 }}
@php $percentage = $stats['total_issues'] > 0 ? (($issuesByType[$type] ?? 0) / $stats['total_issues']) * 100 : 0; @endphp
@endforeach
{{-- Time Tracking Metrics --}} @if($timeTrackingMetrics && $timeTrackingMetrics->total_estimated > 0)

時間追蹤指標

總預估時數
{{ number_format($timeTrackingMetrics->total_estimated, 1) }}
總實際時數
{{ number_format($timeTrackingMetrics->total_actual, 1) }}
平均預估時數
{{ number_format($timeTrackingMetrics->avg_estimated, 1) }}
平均實際時數
{{ number_format($timeTrackingMetrics->avg_actual, 1) }}
@php $variance = $timeTrackingMetrics->total_actual - $timeTrackingMetrics->total_estimated; $variancePercentage = $timeTrackingMetrics->total_estimated > 0 ? ($variance / $timeTrackingMetrics->total_estimated) * 100 : 0; @endphp

差異: {{ $variance > 0 ? '+' : '' }}{{ number_format($variance, 1) }} hours ({{ number_format($variancePercentage, 1) }}%)

@endif {{-- Average Resolution Time --}} @if($avgResolutionTime)

平均解決時間

{{ number_format($avgResolutionTime, 1) }} 天

@endif {{-- Assignee Performance --}} @if($assigneePerformance->isNotEmpty())

指派對象表現(前10名)

@foreach($assigneePerformance as $user) @endforeach
指派對象 總指派數 已完成 逾期 完成率
{{ $user->name }} {{ $user->total_assigned }} {{ $user->completed }} {{ $user->overdue }}
{{ $user->completion_rate }}%
@endif {{-- Top Labels Used --}} @if($topLabels->isNotEmpty())

最常用標籤

@foreach($topLabels as $label)
{{ $label->name }}
{{ $label->usage_count }} 使用
@php $maxUsage = $topLabels->max('usage_count'); $percentage = $maxUsage > 0 ? ($label->usage_count / $maxUsage) * 100 : 0; @endphp
@endforeach
@endif {{-- Recent Tasks --}}

最近的任務

@foreach($recentIssues as $issue) @endforeach
任務 狀態 優先級 指派對象 已建立
{{ $issue->issue_number }}: {{ Str::limit($issue->title, 50) }} {{ $issue->assignee?->name ?? '—' }} {{ $issue->created_at->format('Y-m-d') }}