diff --git a/resources/views/project-management/projects/show.blade.php b/resources/views/project-management/projects/show.blade.php index e4cb05bc..8ff82899 100644 --- a/resources/views/project-management/projects/show.blade.php +++ b/resources/views/project-management/projects/show.blade.php @@ -502,19 +502,38 @@ function renderTasks(container, tasks) { }; const issueStatusLabels = { open: '열림', in_progress: '진행중', resolved: '해결됨', closed: '종료' }; + // 프로젝트 기간 계산 (타임라인 기준) + const projectStart = new Date('{{ $project->start_date?->format("Y-m-d") ?? now()->format("Y-m-d") }}'); + const projectEnd = new Date('{{ $project->end_date?->format("Y-m-d") ?? now()->addMonths(3)->format("Y-m-d") }}'); + const today = new Date(); + today.setHours(0, 0, 0, 0); + const projectDuration = Math.max(1, (projectEnd - projectStart) / (1000 * 60 * 60 * 24)); + const todayPosition = Math.min(100, Math.max(0, ((today - projectStart) / (1000 * 60 * 60 * 24)) / projectDuration * 100)); + + // 짧은 날짜 포맷 (MM/DD) + const shortDate = (d) => d ? `${(d.getMonth()+1).toString().padStart(2,'0')}/${d.getDate().toString().padStart(2,'0')}` : ''; + // 테이블 헤더 let html = `
| - | 긴급 | ++ | 긴급 | 작업명 | -마감일 | -이슈 | -상태 | -변경 | -+ | 타임라인 | +이슈 | +상태 | +관리 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- ${hasIssues ? `` : ''}
- ${prioritySvg[task.priority]}
- ${task.title}
+ ${hasIssues ? `` : ''}
+ ${prioritySvg[task.priority]}
+ ${task.title}
|
- - ${task.due_date ? formatDate(task.due_date) : '-'} + | + ${timelineHtml} | ${issueTotal > 0 ? ` - - + + ${issueResolved}/${issueTotal} ` : '-'} | -- ${statusLabels[task.status]} - |
-
-
-
+
+
+
|
-
+
+
+
+
+
|