diff --git a/app/Http/Controllers/DailyLogController.php b/app/Http/Controllers/DailyLogController.php
index 6fa56587..3a69e567 100644
--- a/app/Http/Controllers/DailyLogController.php
+++ b/app/Http/Controllers/DailyLogController.php
@@ -24,6 +24,7 @@ public function index(): View
$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);
@@ -32,6 +33,7 @@ public function index(): View
'projects',
'stats',
'weeklyTimeline',
+ 'pendingEntries',
'assigneeTypes',
'entryStatuses',
'assignees'
diff --git a/app/Services/ProjectManagement/DailyLogService.php b/app/Services/ProjectManagement/DailyLogService.php
index c1c7453e..ed7d4205 100644
--- a/app/Services/ProjectManagement/DailyLogService.php
+++ b/app/Services/ProjectManagement/DailyLogService.php
@@ -441,4 +441,55 @@ public function getAssigneeList(int $tenantId): array
'teams' => $teams,
];
}
+
+ /**
+ * 미완료 항목(예정, 진행중) 조회 - 담당자별 그룹핑, 날짜 오래된 순 정렬
+ */
+ public function getPendingEntries(int $tenantId, ?int $projectId = null, int $limit = 100): array
+ {
+ $query = AdminPmDailyLogEntry::query()
+ ->select('admin_pm_daily_log_entries.*')
+ ->with(['dailyLog:id,log_date,project_id', 'dailyLog.project:id,name'])
+ ->join('admin_pm_daily_logs', 'admin_pm_daily_log_entries.daily_log_id', '=', 'admin_pm_daily_logs.id')
+ ->where('admin_pm_daily_logs.tenant_id', $tenantId)
+ ->when($projectId, fn ($q) => $q->where('admin_pm_daily_logs.project_id', $projectId))
+ ->whereIn('admin_pm_daily_log_entries.status', ['todo', 'in_progress'])
+ ->orderBy('admin_pm_daily_logs.log_date', 'asc') // 날짜 오래된 순
+ ->orderBy('admin_pm_daily_log_entries.id', 'asc')
+ ->limit($limit);
+
+ $entries = $query->get();
+
+ // 담당자별로 그룹핑
+ $grouped = $entries->groupBy('assignee_name')->map(function ($items, $assigneeName) {
+ $todoItems = $items->where('status', 'todo');
+ $inProgressItems = $items->where('status', 'in_progress');
+
+ // 항목들을 날짜 오래된 순으로 정렬
+ $sortedEntries = $items->sortBy(fn ($e) => $e->dailyLog?->log_date)->values();
+
+ return [
+ 'assignee_name' => $assigneeName,
+ 'total_count' => $items->count(),
+ 'todo_count' => $todoItems->count(),
+ 'in_progress_count' => $inProgressItems->count(),
+ 'oldest_date' => $sortedEntries->first()?->dailyLog?->log_date, // 카드 정렬용
+ 'entries' => $sortedEntries->map(function ($entry) {
+ return [
+ 'id' => $entry->id,
+ 'daily_log_id' => $entry->daily_log_id,
+ 'log_date' => $entry->dailyLog?->log_date,
+ 'project_name' => $entry->dailyLog?->project?->name,
+ 'content' => $entry->content,
+ 'status' => $entry->status,
+ ];
+ })->values()->toArray(),
+ ];
+ });
+
+ // 담당자 카드도 가장 오래된 항목 날짜 기준으로 정렬
+ $sorted = $grouped->sortBy('oldest_date')->values()->toArray();
+
+ return $sorted;
+ }
}
diff --git a/resources/views/daily-logs/index.blade.php b/resources/views/daily-logs/index.blade.php
index 41b9c6be..3a6050d9 100644
--- a/resources/views/daily-logs/index.blade.php
+++ b/resources/views/daily-logs/index.blade.php
@@ -25,7 +25,7 @@ class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition"
@foreach($weeklyTimeline as $index => $day)
+
+@if(count($pendingEntries) > 0)
+
+
+
+
+ 미완료 항목
+
+ @php $totalPending = collect($pendingEntries)->sum('total_count'); @endphp
+
{{ count($pendingEntries) }}명 / {{ $totalPending }}건
+
+
+ @foreach($pendingEntries as $group)
+ @php
+ $entriesJson = collect($group['entries'])->map(fn($e) => [
+ 'id' => $e['id'],
+ 'content' => $e['content'],
+ 'status' => $e['status'],
+ 'daily_log_id' => $e['daily_log_id'] ?? null,
+ ])->toJson();
+ @endphp
+
+
+
+
+ {{ $group['assignee_name'] }}
+ ({{ $group['total_count'] }})
+
+
+
+
+
+ @foreach($group['entries'] as $entry)
+
+
+
+
+ {{ $entry['status'] === 'in_progress' ? '진행' : '예정' }}
+
+
{{ \Carbon\Carbon::parse($entry['log_date'])->format('m/d') }}
+
+
{{ $entry['content'] }}
+
+
+ @if($entry['status'] !== 'todo')
+
+ @endif
+ @if($entry['status'] !== 'in_progress')
+
+ @endif
+
+
+
+
+
{{ $entry['content'] }}
+
+ @endforeach
+
+
+ @endforeach
+
+
+@endif
+
+
+
+
+
+
+ @empty
+
+ 일일 로그가 없습니다.
+
+ @endforelse
+
@if($logs->hasPages())
@@ -127,3 +138,254 @@ class="text-red-600 hover:text-red-900">삭제
{{ $logs->withQueryString()->links() }}
@endif
+
+
\ No newline at end of file
diff --git a/resources/views/partials/sidebar.blade.php b/resources/views/partials/sidebar.blade.php
index c8941ee4..43186ce6 100644
--- a/resources/views/partials/sidebar.blade.php
+++ b/resources/views/partials/sidebar.blade.php
@@ -20,6 +20,48 @@ class="flex items-center gap-2 px-3 py-2 rounded-lg text-sm text-gray-700 hover:
+
+
+
+
+
+
-
-
-
-
-
-