From 5adc1df95f80fbec7a0b5bbee15448b10d5aec3a Mon Sep 17 00:00:00 2001 From: 0-Zz-ang Date: Sun, 17 Aug 2025 23:05:19 +0900 Subject: (박서영)evcp/document-list-only, evcp/vendor-data 생성 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/vendor-data/sidebar.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'components/vendor-data/sidebar.tsx') diff --git a/components/vendor-data/sidebar.tsx b/components/vendor-data/sidebar.tsx index 3805d216..a6b35a9d 100644 --- a/components/vendor-data/sidebar.tsx +++ b/components/vendor-data/sidebar.tsx @@ -27,8 +27,7 @@ interface SidebarProps extends React.HTMLAttributes { selectedProjectId: number | null selectedContractId: number | null onSelectPackage: (itemId: number) => void - forms: FormInfo[] - selectedForm: string | null + forms?: FormInfo[] // 선택적 속성으로 변경 onSelectForm: (formName: string) => void isLoadingForms?: boolean mode: "IM" | "ENG" // 새로 추가: 현재 선택된 모드 @@ -43,7 +42,7 @@ export function Sidebar({ selectedContractId, onSelectPackage, forms, - selectedForm, + // selectedForm, // 사용되지 않음 onSelectForm, isLoadingForms = false, mode = "IM", // 기본값 설정 @@ -90,13 +89,9 @@ export function Sidebar({ * --------------------------- */ const handlePackageClick = (itemId: number) => { - // 상위 컴포넌트 상태 업데이트 + // 상위 컴포넌트 상태 업데이트만 수행 + // 라우팅은 하지 않음 (프로젝트 선택 상태 유지) onSelectPackage(itemId) - - // 해당 태그 페이지로 라우팅 - // 예: /vendor-data/tag/123 - const baseSegments = segments.slice(0, segments.indexOf("vendor-data") + 1).join("/") - router.push(`/${baseSegments}/tag/${itemId}`) } /** @@ -204,7 +199,7 @@ export function Sidebar({ )) - ) : forms.length === 0 ? ( + ) : !forms || forms.length === 0 ? (

(No forms loaded)

-- cgit v1.2.3