@extends('layouts.app') @section('title', $project['name'] . ' — Redmine 專案') @section('content')
{{-- 麵包屑 --}} {{-- 專案標題 --}}

{{ $project['name'] }}

@if (!empty($project['description']))

{{ $project['description'] }}

@endif
{{-- 統計列 --}} @php $myIssues = collect($issues)->where('assigned_to.id', $redmineUser['id']); $highPri = collect($issues)->whereIn('priority.name', ['Urgent', 'Immediate', '緊急', '立即']); @endphp
{{ count($issues) }}
開放議題
{{ $myIssues->count() }}
指派給我
{{ $highPri->count() }}
高優先
{{ collect($issues)->avg('done_ratio') ? number_format(collect($issues)->avg('done_ratio'), 0) : 0 }}%
平均完成度
{{-- 篩選 --}}
{{-- 議題列表 --}} @if (count($issues) === 0)
目前沒有開放中的議題
@else
@foreach ($issues as $issue) @php $isMine = ($issue['assigned_to']['id'] ?? null) === $redmineUser['id']; $priColor = match($issue['priority']['name'] ?? '') { 'Urgent', '緊急' => 'danger', 'Immediate', '立即' => 'dark', 'High', '高' => 'warning', 'Low', '低' => 'secondary', default => 'info', }; @endphp @endforeach
# 主旨 狀態 優先權 指派給 完成度 更新日期
#{{ $issue['id'] }} {{ $issue['subject'] }} @if (!empty($issue['tracker']['name'])) {{ $issue['tracker']['name'] }} @endif @if ($isMine) @endif {{ $issue['status']['name'] ?? '-' }} {{ $issue['priority']['name'] ?? '-' }} {{ $issue['assigned_to']['name'] ?? '未指派' }}
{{ $issue['done_ratio'] ?? 0 }}%
{{ \Carbon\Carbon::parse($issue['updated_on'])->format('Y-m-d') }}
@endif
@push('scripts') @endpush @endsection