From 04ed774ff60a83c00711d4e8615cb4122954dba5 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Thu, 4 Dec 2025 19:46:55 +0900 Subject: (김준회) 메뉴 관리기능 초안 개발 (시딩 필요) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/[lng]/evcp/(evcp)/(system)/menu-list/page.tsx | 79 ++++------------------- app/[lng]/evcp/(evcp)/layout.tsx | 7 +- app/[lng]/partners/(partners)/layout.tsx | 4 +- 3 files changed, 18 insertions(+), 72 deletions(-) (limited to 'app') diff --git a/app/[lng]/evcp/(evcp)/(system)/menu-list/page.tsx b/app/[lng]/evcp/(evcp)/(system)/menu-list/page.tsx index 2cff434e..79923397 100644 --- a/app/[lng]/evcp/(evcp)/(system)/menu-list/page.tsx +++ b/app/[lng]/evcp/(evcp)/(system)/menu-list/page.tsx @@ -1,75 +1,20 @@ -// app/evcp/menu-list/page.tsx +import { MenuTreeManager } from "@/lib/menu-v2/components/menu-tree-manager"; -import { Suspense } from "react"; -import { Card, CardContent } from "@/components/ui/card"; -import { getActiveUsers, getMenuAssignments } from "@/lib/menu-list/servcie"; -import { InitializeButton } from "@/lib/menu-list/table/initialize-button"; -import { MenuListTable } from "@/lib/menu-list/table/menu-list-table"; -import { Shell } from "@/components/shell" -import * as React from "react" -import { InformationButton } from "@/components/information/information-button"; -import { useTranslation } from "@/i18n"; -interface MenuListPageProps { - params: Promise<{ lng: string }> +interface PageProps { + params: Promise<{ lng: string }>; } -export default async function MenuListPage({ params }: MenuListPageProps) { - const { lng } = await params - const { t } = await useTranslation(lng, 'menu') +export default async function MenuV2Page({ params }: PageProps) { + const { lng } = await params; - // 초기 데이터 로드 - const [menusResult, usersResult] = await Promise.all([ - getMenuAssignments(), - getActiveUsers() - ]); - - // 서버사이드에서 번역된 메뉴 데이터 생성 - const translatedMenus = menusResult.data?.map(menu => ({ - ...menu, - sectionTitle: menu.sectionTitle || "", - translatedMenuTitle: t(menu.menuTitle || ""), - translatedSectionTitle: t(menu.sectionTitle || ""), - translatedMenuGroup: menu.menuGroup ? t(menu.menuGroup) : null, - translatedMenuDescription: menu.menuDescription ? t(menu.menuDescription) : null - })) || []; - return ( - -
-
-
-
-

- {t('menu.information_system.menu_list')} -

- -
- {/*

- 각 메뉴별로 담당자를 지정하고 관리할 수 있습니다. -

*/} -
-
- +
+
+

Menu Management

- - - - - - 로딩 중...
}> - - - - - - - + + +
); } + diff --git a/app/[lng]/evcp/(evcp)/layout.tsx b/app/[lng]/evcp/(evcp)/layout.tsx index c5e75a4c..093d9301 100644 --- a/app/[lng]/evcp/(evcp)/layout.tsx +++ b/app/[lng]/evcp/(evcp)/layout.tsx @@ -1,5 +1,5 @@ import { ReactNode } from 'react'; -import { Header } from '@/components/layout/Header'; +import { HeaderV2 } from '@/components/layout/HeaderV2'; import { SiteFooter } from '@/components/layout/Footer'; import { getServerSession } from "next-auth"; import { authOptions } from "@/app/api/auth/[...nextauth]/route"; @@ -20,7 +20,8 @@ export default async function EvcpLayout({ children }: { children: ReactNode }) try { const result = await verifyNonsapPermission( parseInt(session.user.id), - ['SEARCH'] + // ['SEARCH'] + [] // 아무런 실제 권한이 없어도, 등록된 상태라면 화면에 'SEARCH' 권한이 있는것처럼 동작하게 해달라고 함. (김희은 프로) ); isAuthorized = result.authorized; authMessage = result.message || ""; @@ -36,7 +37,7 @@ export default async function EvcpLayout({ children }: { children: ReactNode }) return (
{/*
*/} -
+ {!skipPermissionCheck && ( )} diff --git a/app/[lng]/partners/(partners)/layout.tsx b/app/[lng]/partners/(partners)/layout.tsx index 9dc39f7b..51a30028 100644 --- a/app/[lng]/partners/(partners)/layout.tsx +++ b/app/[lng]/partners/(partners)/layout.tsx @@ -1,11 +1,11 @@ import { ReactNode } from 'react'; -import { Header } from '@/components/layout/Header'; +import { HeaderV2 } from '@/components/layout/HeaderV2'; import { SiteFooter } from '@/components/layout/Footer'; export default function EvcpLayout({ children }: { children: ReactNode }) { return (
-
+
{children} -- cgit v1.2.3