feat: 프로젝트 대시보드 스크럼 칸반 스타일 개선

- 오늘의 활동을 3컬럼 칸반 레이아웃으로 변경 (예정/진행중/완료)
- 담당자별 항목 그룹핑 적용
- 인라인 상태 변경 버튼 추가 (hover 시 표시)
- 담당자별 다중 항목 편집 모달 구현
  - 담당자 이름 공통 입력
  - 항목별 textarea, 상태 버튼, 삭제 버튼
  - 항목 추가/삭제 기능
  - Promise.all로 일괄 저장
- 인라인 삭제 기능 추가
- 라우트 경로 수정 (pm.daily-logs.index → daily-logs.index)
This commit is contained in:
2025-12-02 14:07:50 +09:00
parent afccada30b
commit af5ecf3c4c
6 changed files with 799 additions and 0 deletions

View File

@@ -178,6 +178,28 @@ public function addEntry(Request $request, int $logId): JsonResponse
]);
}
/**
* 항목 수정
*/
public function updateEntry(Request $request, int $entryId): JsonResponse
{
$validated = $request->validate([
'assignee_type' => 'sometimes|in:team,user',
'assignee_id' => 'nullable|integer',
'assignee_name' => 'sometimes|string|max:100',
'content' => 'sometimes|string|max:2000',
'status' => 'sometimes|in:todo,in_progress,done',
]);
$entry = $this->dailyLogService->updateEntry($entryId, $validated);
return response()->json([
'success' => true,
'message' => '항목이 수정되었습니다.',
'data' => $entry,
]);
}
/**
* 항목 상태 변경
*/

View File

@@ -94,6 +94,25 @@ public function issues(): HasMany
return $this->hasMany(AdminPmIssue::class, 'project_id');
}
/**
* 관계: 일일 로그
*/
public function dailyLogs(): HasMany
{
return $this->hasMany(AdminPmDailyLog::class, 'project_id');
}
/**
* 오늘의 스크럼 항목
*/
public function getTodayScrumAttribute(): ?AdminPmDailyLog
{
return $this->dailyLogs()
->where('log_date', now()->format('Y-m-d'))
->with('entries')
->first();
}
/**
* 관계: 생성자
*/

View File

@@ -224,6 +224,17 @@ public function forceDeleteDailyLog(int $id): bool
return $log->forceDelete();
}
/**
* 항목 수정
*/
public function updateEntry(int $entryId, array $data): AdminPmDailyLogEntry
{
$entry = AdminPmDailyLogEntry::findOrFail($entryId);
$entry->update($data);
return $entry->fresh();
}
/**
* 항목 상태 변경
*/

View File

@@ -158,12 +158,16 @@ public function getProjectStats(): array
*/
public function getDashboardSummary(): array
{
$today = now()->format('Y-m-d');
$activeProjects = AdminPmProject::active()
->withCount(['tasks', 'issues'])
->with(['tasks' => function ($q) {
$q->select('id', 'project_id', 'status');
}, 'issues' => function ($q) {
$q->whereIn('status', [AdminPmIssue::STATUS_OPEN, AdminPmIssue::STATUS_IN_PROGRESS]);
}, 'dailyLogs' => function ($q) use ($today) {
$q->where('log_date', $today)->with('entries');
}])
->get();