@extends('layouts.app') @section('title', '#' . ($issue->redmine_id) . ' ' . $issue->title) @push('styles') @endpush @section('content') @include('projects._nav')
@if(session('success'))
{{ session('success') }}
@endif
返回議題清單
{{-- 左欄:可操作 --}}
{{-- 議題標題 --}}

類型:{{ $trackers[$issue->tracker]['label'] ?? $issue->tracker }} {{ $issue->title }}

#{{ $issue->redmine_id }}  ·  由 {{ $issue->user?->name ?? '(已刪除)' }} 建立於 {{ $issue->created_at?->format('Y-m-d H:i') }} @if($issue->updated_at && $issue->updated_at != $issue->created_at)  ·  最後更新 {{ $issue->updated_at->diffForHumans() }} @endif
@can('editIssue', [$project, $issue]) 編輯 @endcan @can('update', $project)
@csrf @method('DELETE')
@endcan
{{-- 快速更新狀態(只送 status,不動其他欄位) --}}
@csrf @method('PUT')
快速更新狀態
{{-- 附件 --}}
附件 ({{ $issue->attachments->count() }})
@if($issue->attachments->isNotEmpty())
    @foreach($issue->attachments as $att)
  • {{ $att->filename }} @if($att->uploader) 由 {{ $att->uploader }} @endif
    @csrf @method('DELETE')
  • @endforeach
@endif
@if(\App\Models\SystemSetting::get('time_source_issue')) @php $timeEntries = $issue->timeEntries()->with('user:id,name')->orderBy('spent_on','desc')->get(); @endphp
記錄工時
@if($timeEntries->isNotEmpty()) 合計 {{ number_format($timeEntries->sum('hours'), 2) }} 小時 @endif
@php $issueContracts = $project->contracts()->orderByDesc('start_date')->get(['id','name','start_date']); @endphp @if($issueContracts->isEmpty())
此專案尚無合約,無法記錄工時。
@else
@csrf
@endif
@if($timeEntries->isNotEmpty())
@foreach($timeEntries as $te) @endforeach
日期成員工時活動備註
{{ $te->spent_on->format('Y/m/d') }} {{ $te->user?->name }} {{ number_format($te->hours,2) }} 小時 {{ $te->activity_label }} {{ $te->comments ?? '—' }} @if($te->user_id === auth()->id() || auth()->user()->role === 'admin')
@csrf @method('DELETE')
@endif
@endif
@endif {{-- 留言記錄 --}}
留言記錄 ({{ $issue->comments->count() }})
@foreach($issue->comments as $comment)
{{ $comment->user?->name ?? '(系統)' }} {{ $comment->created_at?->format('Y-m-d H:i') }} @if($comment->redmine_journal_id) R @endif
@if(auth()->user()->isAdmin() || $comment->user_id === auth()->id())
@csrf @method('DELETE')
@endif
{!! nl2br(e($comment->content)) !!}
@endforeach {{-- 新增留言 --}}
新增留言
@csrf @error('content')
{{ $message }}
@enderror
{{-- 操作紀錄 --}} @if($issue->activities->isNotEmpty())
操作紀錄 {{ $issue->activities->count() }}
@foreach($issue->activities->sortByDesc('created_at') as $act) @php $iconBg = $act->actionColor(); @endphp
{{ $act->user->name }} {{ $act->actionLabel() }} {{ $act->created_at?->format('Y-m-d H:i') }}
@if($act->note)
"{{ $act->note }}"
@endif @if($act->changes)
@foreach($act->changes as $change)
{{ $change['label'] }} @if($change['old_label'] ?? '') {{ $change['old_label'] }} @endif {{ $change['new_label'] }}
@endforeach
@endif
@endforeach
@endif
{{-- 右欄:議題資訊(唯讀) --}}
議題資訊
議題資訊
@if($issue->redmine_id)
議題 # {{ $issue->redmine_id }}
@endif
類型 {{ $trackers[$issue->tracker]['label'] ?? $issue->tracker }}
狀態 {{ $statuses[$issue->status]['label'] ?? $issue->status }}
優先度 {{ $priorities[$issue->priority]['label'] ?? $issue->priority }}
負責人 {{ $issue->assignee?->name ?? '(未指派)' }}
@if ($issue->version) @endif
回報人 {{ $issue->user?->name ?? '—' }}
@if($issue->start_date || $issue->due_date)
開始日期 {{ $issue->start_date?->format('Y-m-d') ?? '—' }}
到期日 {{ $issue->due_date?->format('Y-m-d') ?? '—' }}
@endif @if($issue->estimated_hours)
預估工時 {{ $issue->estimated_hours }} 小時
@endif @php $spentHours = $issue->spentHours(); @endphp @if($spentHours > 0 || $issue->estimated_hours)
耗用工時 {{ number_format($spentHours, 2) }} 小時
@if($issue->estimated_hours && $issue->estimated_hours > 0) @php $pct = min(100, round($spentHours / $issue->estimated_hours * 100)); @endphp
{{ $pct }}% 預估 @endif
@endif
完成度
{{ $issue->done_ratio }}%
描述 @if($issue->description)
{!! nl2br(e($issue->description)) !!}
@else (無描述) @endif
{{-- end info panel --}}
{{-- ── Issue Time Edit Modal ── --}} @push('scripts') @endpush @endsection