Commit Graph

2 Commits

Author SHA1 Message Date
Hyungi Ahn
7d89ec448c feat: Implement daily attendance tracking system
- Backend: Auto-sync work reports with attendance records
- Backend: Lazy initialization of daily active worker records
- Frontend: Real-time attendance status on Group Leader Dashboard
2026-01-06 17:15:56 +09:00
Hyungi Ahn
405bf0dc65 refactor: Phase 3.2 - Attendance, Worker, Project 컨트롤러 개선
주요 변경사항:
- services/attendanceService.js 신규 생성 (269 lines)
  * 9개 서비스 함수로 비즈니스 로직 분리
  * 커스텀 에러 클래스 적용 (ValidationError, DatabaseError)
  * 구조화된 로깅 시스템 통합

- controllers/attendanceController.js 완전 재작성 (306 → 168 lines, 45% 감소)
  * 클래스 기반에서 함수 기반 export로 변경
  * 모든 비즈니스 로직을 서비스 레이어로 이동
  * asyncHandler 미들웨어로 에러 처리 자동화

- controllers/workerController.js 개선
  * 커스텀 에러 클래스 적용
  * console.log → logger 교체
  * 캐시 무효화 로직 유지

- controllers/projectController.js 완전 재작성 (117 → 163 lines)
  * 모든 함수에 새로운 에러 클래스 적용
  * 구조화된 로깅 추가
  * 표준화된 JSON 응답 형식

기술 스택:
- Custom Error Classes: ValidationError, NotFoundError, DatabaseError
- Structured Logging: logger.info/error/warn/debug with context
- asyncHandler: Automatic async error handling
- Service Layer Pattern: Business logic separation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 12:06:35 +09:00