fix: 작업자 비활성화 기능 완전 수정

작업자 퇴사 시 비활성화 기능이 제대로 작동하지 않던 문제 해결

백엔드 수정:
- is_active 가상 필드 추가 (status 기반 자동 생성)
- ISO 8601 날짜 형식을 MySQL DATE 형식으로 변환
- 작업자 업데이트 필드 오류 수정 (salary, annual_leave 제거)

프론트엔드 수정 (11개 파일):
- 모든 페이지에서 비활성 작업자 필터링 로직 추가
- 대시보드, 작업보고서, 근태관리, 사용자관리 등 전체 페이지 적용

영향받는 기능:
- 작업자 관리: 비활성화 상태가 DB에 저장되고 새로고침 후에도 유지
- 모든 페이지: 비활성화된 작업자가 선택 목록에서 제외됨

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2025-12-09 17:45:57 +09:00
parent a2669e08c4
commit 5c8f553f87
13 changed files with 317 additions and 36 deletions

View File

@@ -216,8 +216,14 @@ async function loadWorkers() {
try {
console.log('👥 작업자 데이터 로딩...');
const response = await window.apiCall('/workers');
workersData = Array.isArray(response) ? response : (response.data || []);
console.log(`✅ 작업자 ${workersData.length}명 로드 완료`);
const allWorkers = Array.isArray(response) ? response : (response.data || []);
// 활성화된 작업자만 필터링
workersData = allWorkers.filter(worker => {
return worker.status === 'active' || worker.is_active === 1 || worker.is_active === true;
});
console.log(`✅ 작업자 ${workersData.length}명 로드 완료 (전체: ${allWorkers.length}명)`);
return workersData;
} catch (error) {
console.error('작업자 데이터 로딩 오류:', error);