From 4799e9597f0d2736dac7a9c8fc669d5b57f7cca5 Mon Sep 17 00:00:00 2001 From: hyeonsu Date: Tue, 26 Aug 2025 17:51:23 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=97=A4?= =?UTF-8?q?=EB=8D=94=20=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/app/(main)/admin/page.tsx | 18 +------ frontend/app/(main)/page.tsx | 17 ------ frontend/components/layout/AppLayout.tsx | 11 ++-- frontend/components/layout/PageHeader.tsx | 21 ++++++++ frontend/constants/pageInfo.ts | 64 +++++++++++++++++++++++ 5 files changed, 94 insertions(+), 37 deletions(-) create mode 100644 frontend/components/layout/PageHeader.tsx create mode 100644 frontend/constants/pageInfo.ts diff --git a/frontend/app/(main)/admin/page.tsx b/frontend/app/(main)/admin/page.tsx index 956792fd..3f54bb3a 100644 --- a/frontend/app/(main)/admin/page.tsx +++ b/frontend/app/(main)/admin/page.tsx @@ -1,26 +1,10 @@ -"use client"; - -import { Button } from "@/components/ui/button"; -import { RefreshCw, Users, Shield, Settings, BarChart3 } from "lucide-react"; - +import { Users, Shield, Settings, BarChart3 } from "lucide-react"; /** * 관리자 메인 페이지 */ export default function AdminPage() { return (
- {/* 페이지 헤더 */} -
-
-

관리자 대시보드

-

시스템 관리 및 모니터링

-
- -
- {/* 관리자 기능 카드들 */}
diff --git a/frontend/app/(main)/page.tsx b/frontend/app/(main)/page.tsx index 72539e31..3d1739a6 100644 --- a/frontend/app/(main)/page.tsx +++ b/frontend/app/(main)/page.tsx @@ -1,23 +1,6 @@ -"use client"; - -import { Button } from "@/components/ui/button"; -import { RefreshCw } from "lucide-react"; - export default function MainHomePage() { return (
- {/* 페이지 헤더 */} -
-
-

대시보드

-

PLM 시스템의 주요 현황을 확인하세요

-
- -
- {/* 대시보드 컨텐츠 */}

PLM 솔루션에 오신 것을 환영합니다!

diff --git a/frontend/components/layout/AppLayout.tsx b/frontend/components/layout/AppLayout.tsx index bc5473c5..35597eb3 100644 --- a/frontend/components/layout/AppLayout.tsx +++ b/frontend/components/layout/AppLayout.tsx @@ -22,6 +22,8 @@ import { useProfile } from "@/hooks/useProfile"; import { MenuItem } from "@/lib/api/menu"; import { MainHeader } from "./MainHeader"; import { ProfileModal } from "./ProfileModal"; +import { PageHeader } from "./PageHeader"; +import { getPageInfo } from "@/constants/pageInfo"; // useAuth의 UserInfo 타입을 확장 interface ExtendedUserInfo { @@ -304,9 +306,9 @@ export function AppLayout({ children }: AppLayoutProps) { if (!user) { return (
-
+
-

로딩 중...

+

로딩중...

); @@ -379,7 +381,10 @@ export function AppLayout({ children }: AppLayoutProps) { {/* 가운데 컨텐츠 영역 */} -
{children}
+
+ + {children} +
{/* 프로필 수정 모달 */} diff --git a/frontend/components/layout/PageHeader.tsx b/frontend/components/layout/PageHeader.tsx new file mode 100644 index 00000000..63318807 --- /dev/null +++ b/frontend/components/layout/PageHeader.tsx @@ -0,0 +1,21 @@ +interface PageHeaderProps { + title: string; + description?: string; +} + +/** + * 페이지 상단 헤더 컴포넌트 + * 제목, 설명, 추가 버튼 등을 표시 + */ +export function PageHeader({ title, description }: PageHeaderProps) { + return ( +
+
+
+

{title}

+ {description &&

{description}

} +
+
+
+ ); +} diff --git a/frontend/constants/pageInfo.ts b/frontend/constants/pageInfo.ts new file mode 100644 index 00000000..3652cdbf --- /dev/null +++ b/frontend/constants/pageInfo.ts @@ -0,0 +1,64 @@ +/** + * 페이지별 제목과 설명 정보 + */ +export interface PageInfo { + title: string; + description?: string; +} + +export const PAGE_INFO: Record = { + // 메인 대시보드 + "/main": { + title: "대시보드", + description: "PLM 시스템의 주요 현황을 확인하세요", + }, + + // 관리자 페이지들 + "/admin": { + title: "관리자 대시보드", + description: "시스템 관리 및 모니터링", + }, + "/admin/company": { + title: "회사 관리", + description: "회사 정보를 등록하고 관리합니다", + }, + "/admin/userMng": { + title: "사용자 관리", + description: "시스템 사용자를 관리합니다", + }, + "/admin/menu": { + title: "메뉴 관리", + description: "시스템 메뉴를 관리합니다", + }, + "/admin/i18n": { + title: "다국어 관리", + description: "다국어 번역을 관리합니다", + }, + "/admin/tableMng": { + title: "테이블 타입 관리", + description: "데이터베이스 테이블 타입을 관리합니다", + }, + + // 기타 페이지들 + "/multilang": { + title: "다국어 설정", + description: "언어 설정을 변경합니다", + }, + "/dashboard": { + title: "대시보드", + description: "PLM 시스템 현황", + }, + + // 기본값 (매핑되지 않은 페이지) + default: { + title: "PLM 솔루션", + description: "제품 수명 주기 관리 시스템", + }, +}; + +/** + * 현재 경로에 맞는 페이지 정보를 반환 + */ +export function getPageInfo(pathname: string): PageInfo { + return PAGE_INFO[pathname] || PAGE_INFO["default"]; +}