redmine-workflow-engine/app/views/workflow_dashboard/index.html.erb
ioresponse e67fb92189 Initial commit: Redmine Workflow Engine Plugin
Features:
- Custom workflow creation per project/tracker
- Step-by-step workflow definition
- Assignees per step (user, role group, department)
- Next/Previous step navigation
- Reject to first step
- Skip step (admin only)
- Step deadline settings
- Workflow dashboard
- Group member selection when proceeding

🤖 Generated with Claude Code
2025-12-23 00:16:43 +09:00

137 lines
5.1 KiB
Plaintext

<h2>워크플로우 대시보드</h2>
<!-- 전체 통계 -->
<div style="display: flex; gap: 20px; margin-bottom: 20px;">
<div class="box" style="flex: 1; text-align: center; background: #e3f2fd;">
<div style="font-size: 32px; font-weight: bold; color: #1976d2;"><%= @total_stats[:active_workflows] %></div>
<div style="color: #666;">활성 워크플로우</div>
</div>
<div class="box" style="flex: 1; text-align: center; background: #fff3e0;">
<div style="font-size: 32px; font-weight: bold; color: #f57c00;"><%= @total_stats[:issues_in_workflow] %></div>
<div style="color: #666;">진행 중인 이슈</div>
</div>
<div class="box" style="flex: 1; text-align: center; background: #e8f5e9;">
<div style="font-size: 32px; font-weight: bold; color: #388e3c;"><%= @total_stats[:completed_today] %></div>
<div style="color: #666;">오늘 완료</div>
</div>
</div>
<div style="display: flex; gap: 20px;">
<!-- 왼쪽: 프로젝트별 현황 -->
<div style="flex: 1;">
<div class="box">
<h3 style="margin-top: 0;">프로젝트별 현황</h3>
<% if @project_stats.any? %>
<table class="list" style="width: 100%;">
<thead>
<tr>
<th>프로젝트</th>
<th style="width: 80px; text-align: center;">진행 중</th>
<th style="width: 80px; text-align: center;">완료</th>
<th style="width: 60px;"></th>
</tr>
</thead>
<tbody>
<% @project_stats.each do |stat| %>
<tr>
<td><%= link_to stat[:project].name, project_path(stat[:project]) %></td>
<td style="text-align: center;">
<span style="background: #fff3e0; padding: 2px 8px; border-radius: 10px; color: #f57c00; font-weight: bold;">
<%= stat[:in_progress] %>
</span>
</td>
<td style="text-align: center;">
<span style="background: #e8f5e9; padding: 2px 8px; border-radius: 10px; color: #388e3c;">
<%= stat[:completed] %>
</span>
</td>
<td>
<%= link_to '상세', workflow_dashboard_project_path(stat[:project]), class: 'button', style: 'padding: 2px 8px; font-size: 11px;' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata">워크플로우가 적용된 이슈가 없습니다.</p>
<% end %>
</div>
</div>
<!-- 오른쪽: 내 담당 이슈 -->
<div style="flex: 1;">
<div class="box">
<h3 style="margin-top: 0;">내 담당 이슈</h3>
<% if @my_issues.any? %>
<table class="list" style="width: 100%;">
<thead>
<tr>
<th>이슈</th>
<th>현재 단계</th>
<th style="width: 80px;"></th>
</tr>
</thead>
<tbody>
<% @my_issues.each do |state| %>
<tr>
<td>
<%= link_to "##{state.issue.id}", issue_path(state.issue) %>
<%= truncate(state.issue.subject, length: 30) %>
</td>
<td>
<span style="background: #007bff; color: white; padding: 2px 6px; border-radius: 3px; font-size: 11px;">
<%= state.current_step&.name %>
</span>
</td>
<td>
<%= link_to '처리', issue_path(state.issue), class: 'button button-positive', style: 'padding: 2px 8px; font-size: 11px;' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<p class="nodata">담당 이슈가 없습니다.</p>
<% end %>
</div>
<!-- 지연된 이슈 -->
<% if @overdue_issues.any? %>
<div class="box" style="margin-top: 15px; background: #ffebee;">
<h3 style="margin-top: 0; color: #c62828;">지연된 이슈</h3>
<table class="list" style="width: 100%;">
<thead>
<tr>
<th>이슈</th>
<th>현재 단계</th>
<th>지연일</th>
</tr>
</thead>
<tbody>
<% @overdue_issues.each do |state| %>
<%
step_started_at = state.updated_at
due_date = step_started_at + state.current_step.due_days.days
overdue_days = ((Time.current - due_date) / 1.day).to_i
%>
<tr>
<td>
<%= link_to "##{state.issue.id}", issue_path(state.issue) %>
<%= truncate(state.issue.subject, length: 25) %>
</td>
<td><%= state.current_step&.name %></td>
<td style="color: #c62828; font-weight: bold;"><%= overdue_days %>일</td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>
</div>
</div>
<hr />
<p>
<%= link_to '워크플로우 관리', '/custom_workflows', class: 'icon icon-settings' %>
</p>