From 5a94afc1d5cc35ef96b0981523ad44d819a475e0 Mon Sep 17 00:00:00 2001 From: DDD1542 Date: Thu, 1 Jan 2026 02:29:53 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B8=B0=EC=A1=B4=20=ED=9A=8C=EC=82=AC?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components/layout/AppLayout.tsx | 25 +++--------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/frontend/components/layout/AppLayout.tsx b/frontend/components/layout/AppLayout.tsx index b28e4d01..236071ac 100644 --- a/frontend/components/layout/AppLayout.tsx +++ b/frontend/components/layout/AppLayout.tsx @@ -370,32 +370,13 @@ function AppLayoutInner({ children }: AppLayoutProps) { }; // 모드 전환 핸들러 - const handleModeSwitch = async () => { + const handleModeSwitch = () => { if (isAdminMode) { // 관리자 → 사용자 모드: 선택한 회사 유지 router.push("/main"); } else { - // 사용자 → 관리자 모드: WACE로 복귀 필요 (SUPER_ADMIN만) - if ((user as ExtendedUserInfo)?.userType === "SUPER_ADMIN") { - const currentCompanyCode = (user as ExtendedUserInfo)?.companyCode; - - // 이미 WACE("*")가 아니면 WACE로 전환 후 관리자 페이지로 이동 - if (currentCompanyCode !== "*") { - const result = await switchCompany("*"); - if (result.success) { - // 페이지 새로고침 (관리자 페이지로 이동) - window.location.href = "/admin"; - } else { - toast.error("WACE로 전환 실패"); - } - } else { - // 이미 WACE면 바로 관리자 페이지로 이동 - router.push("/admin"); - } - } else { - // 일반 관리자는 바로 관리자 페이지로 이동 - router.push("/admin"); - } + // 사용자 → 관리자 모드: 선택한 회사 유지 (회사 전환 없음) + router.push("/admin"); } };