feat: [부서관리] 기능 보완 - 필드 확장, 검색/필터, UI 개선

- Department 타입에 code, description, isActive, sortOrder 필드 추가
- DepartmentDialog: Zod + react-hook-form 폼 검증 (5개 필드)
- DepartmentToolbar: 상태 필터(전체/활성/비활성) + 검색 기능
- DepartmentTree: 트리 필터링 (검색어 + 상태)
- DepartmentTreeItem: 코드 Badge, 부서명 볼드, 설명 표시, 체크박스 크기 조정
- convertApiToLocal에서 누락 필드 매핑 복원
This commit is contained in:
2026-03-13 00:30:09 +09:00
parent ca5a9325c6
commit 13249384e2
26 changed files with 1284 additions and 915 deletions

View File

@@ -237,7 +237,10 @@ export function ReceivingDetail({ id, mode = 'view' }: Props) {
// 수입검사 성적서 템플릿 존재 여부 + 첨부파일 확인
if (result.data.itemId) {
const templateCheck = await checkInspectionTemplate(result.data.itemId);
setHasInspectionTemplate(templateCheck.hasTemplate);
// API 성공 시에만 값 업데이트 (실패 시 기존 값 유지 — 버튼 사라짐 방지)
if (templateCheck.success) {
setHasInspectionTemplate(templateCheck.hasTemplate);
}
if (templateCheck.attachments && templateCheck.attachments.length > 0) {
setInspectionAttachments(templateCheck.attachments);
}