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
This commit is contained in:
12
DEV_LOG.md
12
DEV_LOG.md
@@ -41,6 +41,18 @@
|
||||
- **원인**: `workerModel.update` 쿼리에 DB에 존재하지 않는 `join_date` 컬럼을 업데이트하려는 시도가 있어 SQL 에러 발생.
|
||||
- **해결**: `workerModel.js`에서 잘못된 컬럼(`join_date`) 참조 제거. (올바른 컬럼 `hire_date`는 유지)
|
||||
|
||||
|
||||
3. **일일 근태 추적 시스템 구현 (Daily Attendance Tracking)**
|
||||
- **Backend**:
|
||||
- `AttendanceModel.initializeDailyRecords` 추가: 모든 활성 작업자에 대해 'incomplete' 상태의 근태 기록 자동 생성 (Lazy Initialization).
|
||||
- `AttendanceModel.syncWithWorkReports` 추가: 작업 보고서 작성/수정/삭제 시 근태 상태(미제출/부분/완료/초과) 자동 동기화.
|
||||
- `dailyWorkReportModel.js`에 동기화 로직 통합 (트랜잭션 후 처리).
|
||||
- `attendanceService`에서 상태 조회 시 초기화 로직 수행.
|
||||
- **Frontend**:
|
||||
- `group-leader-dashboard.js` 리팩토링: 모의 데이터 대신 실제 API(`/attendance/daily-status`) 연동.
|
||||
- `modern-dashboard.css`: 근태 현황 카드(`worker-card`) 및 그리드 스타일 추가.
|
||||
- `group-leader.html`: 스크립트 로드 추가 및 DOM 구조 확인.
|
||||
|
||||
---
|
||||
|
||||
## 🛡보안 및 검토 리포트 (History)
|
||||
|
||||
Reference in New Issue
Block a user