feat: [pm] 프로젝트 관리 기능 개선

- AdminPmProject 모델: 통계 관련 속성 추가
- ProjectService: 통계 조회 로직 개선
- 프로젝트 목록 뷰: 통계 표시 및 UI 개선
- 프로젝트 테이블 뷰: 진행률 표시 개선
This commit is contained in:
2025-11-30 21:05:02 +09:00
parent 5671cd0bee
commit d9030bd12b
4 changed files with 173 additions and 62 deletions

View File

@@ -151,4 +151,25 @@ public function getIssueStatsAttribute(): array
'closed' => $this->issues()->where('status', AdminPmIssue::STATUS_CLOSED)->count(),
];
}
/**
* 상태 라벨 (한글)
*/
public function getStatusLabelAttribute(): string
{
return self::getStatuses()[$this->status] ?? $this->status;
}
/**
* 상태별 색상 클래스
*/
public function getStatusColorAttribute(): string
{
return match ($this->status) {
self::STATUS_ACTIVE => 'bg-green-100 text-green-800',
self::STATUS_COMPLETED => 'bg-blue-100 text-blue-800',
self::STATUS_ON_HOLD => 'bg-yellow-100 text-yellow-800',
default => 'bg-gray-100 text-gray-800',
};
}
}