feat(tkuser): 부서 관리 개선 — 상위부서 제거, hard delete, 휴가 부서별 그룹
- 상위부서(parent_id) 필드 UI/API 전체 제거 - 부서 비활성화(soft delete) → 진짜 삭제(hard delete) 전환 (트랜잭션) - 소속 인원 있는 부서 삭제 시 department_id=NULL 처리 - 편집 모달에서 활성/비활성 필드 제거 - 휴가 발생 입력 작업자 select를 부서별 optgroup으로 표시 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -56,8 +56,8 @@ async function update(req, res, next) {
|
||||
async function remove(req, res, next) {
|
||||
try {
|
||||
const id = parseInt(req.params.id);
|
||||
await departmentModel.deactivate(id);
|
||||
res.json({ success: true, message: '부서가 비활성화되었습니다' });
|
||||
await departmentModel.remove(id);
|
||||
res.json({ success: true, message: '부서가 삭제되었습니다' });
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user