fix: 페이지 삭제 시 섹션 동기화 및 코드 정리

- 페이지 삭제 시 독립 섹션 목록 갱신 추가 (독립 엔티티 아키텍처)
- ItemForm 컴포넌트 분리 완료 (1607→415줄, 74% 감소)
- ItemMasterDataManagement 중복 코드 제거 (getInputTypeLabel 헬퍼)
- 문서 업데이트 (realtime-sync-fixes.md)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
byeongcheolryu
2025-11-28 15:25:33 +09:00
parent 65a8510c0b
commit 9d0cb073ba
16 changed files with 1462 additions and 1435 deletions

View File

@@ -1303,6 +1303,17 @@ export function ItemMasterProvider({ children }: { children: ReactNode }) {
// state 업데이트
setItemPages(prev => prev.filter(page => page.id !== id));
// 2025-11-28: 페이지 삭제 후 독립 섹션 목록 갱신
// 백엔드에서 섹션은 삭제되지 않고 연결만 해제되므로 (독립 엔티티 아키텍처)
// 독립 섹션 목록을 새로고침해야 섹션 탭에서 해당 섹션이 표시됨
try {
await refreshIndependentSections();
console.log('[ItemMasterContext] 페이지 삭제 후 독립 섹션 갱신 완료');
} catch (refreshError) {
// 갱신 실패해도 페이지 삭제는 성공한 상태이므로 경고만 출력
console.warn('[ItemMasterContext] 독립 섹션 갱신 실패:', refreshError);
}
console.log('[ItemMasterContext] 페이지 삭제 성공:', id);
} catch (error) {
const errorMessage = getErrorMessage(error);