Files
sam-manage/app/Http/Controllers/DailyLogController.php
hskwon 1930c2ef9f feat(daily-logs, pm): 스크럼 UI/UX 개선
Daily Logs 페이지:
- 미완료 항목 상태 변경 시 카드 유지 (done만 제거)
- 카드 정렬을 날짜 오래된 순으로 변경
- 요약 내용 nl2br 적용 및 접힘 시 2줄 제한
- 아코디언 항목 담당자별 그룹핑으로 통합

Project Management 페이지:
- 오늘의 활동을 칸반(3열) → 담당자 카드 스타일로 변경
- 완료 항목도 함께 표시 (취소선, 초록 배지)
- 미완료/완료 건수 헤더에 표시
2025-12-04 22:25:50 +09:00

94 lines
2.8 KiB
PHP

<?php
namespace App\Http\Controllers;
use App\Models\Admin\AdminPmDailyLogEntry;
use App\Services\ProjectManagement\DailyLogService;
use App\Services\ProjectManagement\ProjectService;
use Illuminate\View\View;
class DailyLogController extends Controller
{
public function __construct(
private readonly DailyLogService $dailyLogService,
private readonly ProjectService $projectService
) {}
/**
* 일일 로그 목록 화면
*/
public function index(): View
{
$tenantId = session('current_tenant_id', 1);
$projects = $this->projectService->getActiveProjects();
$stats = $this->dailyLogService->getStats($tenantId);
$weeklyTimeline = $this->dailyLogService->getWeeklyTimeline($tenantId);
$pendingEntries = $this->dailyLogService->getPendingEntries($tenantId);
$assigneeTypes = AdminPmDailyLogEntry::getAssigneeTypes();
$entryStatuses = AdminPmDailyLogEntry::getStatuses();
$assignees = $this->dailyLogService->getAssigneeList($tenantId);
return view('daily-logs.index', compact(
'projects',
'stats',
'weeklyTimeline',
'pendingEntries',
'assigneeTypes',
'entryStatuses',
'assignees'
));
}
/**
* 일일 로그 상세 화면
*/
public function show(int $id): View
{
$tenantId = session('current_tenant_id', 1);
$log = $this->dailyLogService->getDailyLogById($id, true);
if (! $log) {
abort(404, '일일 로그를 찾을 수 없습니다.');
}
$projects = $this->projectService->getActiveProjects();
$assigneeTypes = AdminPmDailyLogEntry::getAssigneeTypes();
$entryStatuses = AdminPmDailyLogEntry::getStatuses();
$assignees = $this->dailyLogService->getAssigneeList($tenantId);
return view('daily-logs.show', compact(
'log',
'projects',
'assigneeTypes',
'entryStatuses',
'assignees'
));
}
/**
* 오늘 날짜 로그 화면 (자동 생성)
*/
public function today(): View
{
$tenantId = session('current_tenant_id', 1);
$today = now()->format('Y-m-d');
$log = $this->dailyLogService->getOrCreateByDate($tenantId, $today);
$projects = $this->projectService->getActiveProjects();
$assigneeTypes = AdminPmDailyLogEntry::getAssigneeTypes();
$entryStatuses = AdminPmDailyLogEntry::getStatuses();
$assignees = $this->dailyLogService->getAssigneeList($tenantId);
return view('daily-logs.show', compact(
'log',
'projects',
'assigneeTypes',
'entryStatuses',
'assignees'
));
}
}