feat: [approval] 완료함 미읽음 알림 뱃지 기능 추가

- approvals 테이블에 drafter_read_at 컬럼 추가 (API 마이그레이션)
- 승인/반려/전결 완료 시 drafter_read_at = null 설정
- getBadgeCounts()에 completed_unread 카운트 추가
- 사이드메뉴 완료함에 미읽음 뱃지 표시 (주황색)
- 완료함 페이지 진입 시 일괄 읽음 처리
- 상세 페이지 열람 시 개별 읽음 처리
This commit is contained in:
김보곤
2026-03-05 11:36:58 +09:00
parent 999cbad667
commit 280367170a
7 changed files with 69 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ public function boot(): void
$menuBadges['byUrl']['/approval-mgmt/pending'] = ['count' => $counts['pending'], 'color' => '#ef4444'];
$menuBadges['byUrl']['/approval-mgmt/drafts'] = ['count' => $counts['draft'], 'color' => '#3b82f6'];
$menuBadges['byUrl']['/approval-mgmt/references'] = ['count' => $counts['reference_unread'], 'color' => '#10b981'];
$menuBadges['byUrl']['/approval-mgmt/completed'] = ['count' => $counts['completed_unread'], 'color' => '#f59e0b'];
} catch (\Throwable $e) {
// 테이블 미존재 등 예외 무시
}