워크플로우 현황: <%= @project.name %>

<%= link_to '← 대시보드로'.html_safe, workflow_dashboard_path, class: 'icon icon-back' %>

단계별 이슈 현황

<% if @steps_summary.any? %>
<% @steps_summary.each do |step_name, states| %>
<%= step_name %> <%= states.count %>건
<% states.each do |state| %>
<%= link_to "##{state.issue.id}", issue_path(state.issue), style: 'font-weight: bold;' %> <%= truncate(state.issue.subject, length: 30) %>
담당: <%= state.issue.assigned_to&.name || '-' %> <% if state.current_step&.due_days.present? %> <% step_started_at = state.updated_at due_date = step_started_at + state.current_step.due_days.days remaining = ((due_date - Time.current) / 1.day).to_i %> <% if remaining < 0 %> | 지연 <%= remaining.abs %>일 <% elsif remaining == 0 %> | 오늘 마감 <% else %> | 남은 기한: <%= remaining %>일 <% end %> <% end %>
<% end %>
<% end %>
<% else %>

진행 중인 워크플로우 이슈가 없습니다.

<% end %>

전체 워크플로우 이슈

<% if @workflow_states.any? %> <% @workflow_states.each do |state| %> <% end %>
# 제목 워크플로우 현재 단계 담당자 상태 갱신일
<%= link_to "##{state.issue.id}", issue_path(state.issue) %> <%= link_to state.issue.subject, issue_path(state.issue) %> <%= state.custom_workflow&.name %> <% if state.completed_at %> 완료 <% else %> <%= state.current_step&.name %> <% end %> <%= state.issue.assigned_to&.name || '-' %> <%= state.issue.status&.name %> <%= format_time(state.updated_at) %>
<% else %>

워크플로우 이슈가 없습니다.

<% end %>