워크플로우 진행 상태

워크플로우: <%= @workflow_state.custom_workflow.name %> <% if @workflow_state.custom_workflow.description.present? %>
<%= @workflow_state.custom_workflow.description %> <% end %>

<% @steps.each_with_index do |step, idx| %> <% is_current = @current_step && @current_step.id == step.id %> <% is_completed = @current_step && step.position < @current_step.position %>
<%= step.name %> <% if step.is_start %> (시작) <% end %> <% if step.is_end %> (종료) <% end %>
<% if idx < @steps.length - 1 %> <% end %> <% end %>
<% if @current_step %>

현재 단계: <%= @current_step.name %>

<% if @current_step.workflow_step_assignees.any? %>

담당자: <% @current_step.workflow_step_assignees.each do |assignee| %> <%= assignee.assignee_name %> <% end %>

<% end %>
<% unless @current_step.is_end %> <% if @workflow_state.can_proceed?(User.current) %> <%= link_to '다음 단계로 →'.html_safe, issue_workflow_next_step_path(@issue), method: :post, class: 'button button-positive', data: { confirm: '다음 단계로 진행하시겠습니까?' } %> <% else %> 다음 단계로 → (권한 없음) <% end %> <% end %> <% unless @current_step.is_start %> <% if @workflow_state.can_go_back?(User.current) %> <%= link_to '← 이전 단계로'.html_safe, issue_workflow_prev_step_path(@issue), method: :post, class: 'button', data: { confirm: '이전 단계로 되돌리시겠습니까?' } %> <% end %> <% end %>
<% else %>

워크플로우 단계가 설정되지 않았습니다.

<% end %> <% if @workflow_state.started_at %>

시작일: <%= @workflow_state.started_at.strftime('%Y-%m-%d %H:%M') %> <% if @workflow_state.completed_at %> | 완료일: <%= @workflow_state.completed_at.strftime('%Y-%m-%d %H:%M') %> <% end %>

<% end %>