summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx54
-rw-r--r--app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx53
-rw-r--r--app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx52
-rw-r--r--app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx69
-rw-r--r--app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx60
-rw-r--r--app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx52
-rw-r--r--app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx11
-rw-r--r--app/[lng]/evcp/(evcp)/basic-contract-template/gtc/[id]/page.tsx142
-rw-r--r--app/[lng]/evcp/(evcp)/docu-list-rule/code-groups/page.tsx54
-rw-r--r--app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx53
-rw-r--r--app/[lng]/evcp/(evcp)/docu-list-rule/document-class/page.tsx52
-rw-r--r--app/[lng]/evcp/(evcp)/docu-list-rule/layout.tsx69
-rw-r--r--app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx60
-rw-r--r--app/[lng]/evcp/(evcp)/docu-list-rule/number-types/page.tsx52
-rw-r--r--app/[lng]/evcp/(evcp)/docu-list-rule/page.tsx11
15 files changed, 844 insertions, 0 deletions
diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx
new file mode 100644
index 00000000..5aebf15d
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/docu-list-rule/code-groups/page.tsx
@@ -0,0 +1,54 @@
+import * as React from "react";
+import { type SearchParams } from "@/types/table";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { getCodeGroups } from "@/lib/docu-list-rule/code-groups/service";
+import { CodeGroupsTable } from "@/lib/docu-list-rule/code-groups/table/code-groups-table";
+import { searchParamsCodeGroupsCache } from "@/lib/docu-list-rule/code-groups/validation";
+import { InformationButton } from "@/components/information/information-button";
+
+interface IndexPageProps {
+ searchParams: Promise<SearchParams>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+ const search = searchParamsCodeGroupsCache.parse(searchParams);
+
+ const promises = Promise.all([
+ getCodeGroups({
+ ...search,
+ }),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Code Group 정의</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/code-groups" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ 문서 번호에 사용될 수 있는 다양한 코드 그룹의 정의를 관리하는 페이지입니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={7}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["8rem", "12rem", "10rem", "10rem", "12rem", "8rem", "12rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <CodeGroupsTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx
new file mode 100644
index 00000000..cf0bf02e
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/docu-list-rule/combo-box-settings/page.tsx
@@ -0,0 +1,53 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { getComboBoxCodeGroups } from "@/lib/docu-list-rule/combo-box-settings/service";
+import { ComboBoxSettingsTable } from "@/lib/docu-list-rule/combo-box-settings/table/combo-box-settings-table";
+import { InformationButton } from "@/components/information/information-button";
+import { searchParamsCodeGroupsCache } from "@/lib/docu-list-rule/code-groups/validation";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getComboBoxCodeGroups(
+ searchParamsCodeGroupsCache.parse(searchParams)
+ ),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Combo Box 설정</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/combo-box-settings" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ Combo Box 옵션을 관리하는 페이지입니다.
+ 각 Code Group별로 Combo Box에 표시될 옵션들을 설정할 수 있습니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={6}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["8rem", "12rem", "10rem", "8rem", "12rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <ComboBoxSettingsTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx
new file mode 100644
index 00000000..5c2c600e
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/docu-list-rule/document-class/page.tsx
@@ -0,0 +1,52 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { getDocumentClassCodeGroups } from "@/lib/docu-list-rule/document-class/service";
+import { DocumentClassTable } from "@/lib/docu-list-rule/document-class/table/document-class-table";
+import { InformationButton } from "@/components/information/information-button";
+import { searchParamsDocumentClassCache } from "@/lib/docu-list-rule/document-class/validation";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getDocumentClassCodeGroups(
+ searchParamsDocumentClassCache.parse(searchParams)
+ ),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Document Class 관리</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/document-class" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ Document Class를 관리합니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={4}
+ searchableColumnCount={1}
+ filterableColumnCount={1}
+ cellWidths={["10rem", "20rem", "10rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <DocumentClassTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx
new file mode 100644
index 00000000..25023e4b
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/docu-list-rule/layout.tsx
@@ -0,0 +1,69 @@
+import { Metadata } from "next"
+
+import { Separator } from "@/components/ui/separator"
+import { SidebarNav } from "@/components/layout/sidebar-nav"
+
+export const metadata: Metadata = {
+ title: "Document Numbering Rule",
+}
+
+
+
+export default async function DocumentNumberingLayout({
+ children,
+ params,
+}: {
+ children: React.ReactNode
+ params: { lng: string }
+}) {
+ const resolvedParams = await params
+ const lng = resolvedParams.lng
+
+ const sidebarNavItems = [
+ {
+ title: "Document Class 관리",
+ href: `/${lng}/engineering/docu-list-rule/document-class`,
+ },
+ {
+ title: "Code Group 정의",
+ href: `/${lng}/engineering/docu-list-rule/code-groups`,
+ },
+ {
+ title: "Combo Box 설정",
+ href: `/${lng}/engineering/docu-list-rule/combo-box-settings`,
+ },
+ {
+ title: "Number Type 관리",
+ href: `/${lng}/engineering/docu-list-rule/number-types`,
+ },
+ {
+ title: "Number Type별 설정",
+ href: `/${lng}/engineering/docu-list-rule/number-type-configs`,
+ },
+ ]
+
+ return (
+ <>
+ <div className="container py-6">
+ <section className="overflow-hidden rounded-[0.5rem] border bg-background shadow">
+ <div className="hidden space-y-6 p-10 pb-16 md:block">
+ <div className="space-y-0.5">
+ <h2 className="text-2xl font-bold tracking-tight">Document Numbering Rule (해양)</h2>
+ <p className="text-muted-foreground">
+ 벤더 제출 문서 리스트 작성 시에 사용되는 넘버링
+ </p>
+ </div>
+
+ <Separator className="my-6" />
+ <div className="flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0">
+ <aside className="-mx-4 lg:w-1/5">
+ <SidebarNav items={sidebarNavItems} />
+ </aside>
+ <div className="flex-1 ">{children}</div>
+ </div>
+ </div>
+ </section>
+ </div>
+ </>
+ )
+} \ No newline at end of file
diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx
new file mode 100644
index 00000000..4195ba24
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/docu-list-rule/number-type-configs/page.tsx
@@ -0,0 +1,60 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { NumberTypeConfigsTable } from "@/lib/docu-list-rule/number-type-configs/table/number-type-configs-table";
+import { getNumberTypes } from "@/lib/docu-list-rule/number-types/service";
+import { InformationButton } from "@/components/information/information-button";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getNumberTypes({
+ page: 1,
+ perPage: 1000, // 모든 Number Type을 가져오기 위해 큰 값 설정
+ search: "",
+ sort: [{ id: "id", desc: false }], // DB 등록 순서대로 정렬
+ filters: [],
+ joinOperator: "and",
+ flags: ["advancedTable"],
+ numberTypeId: "",
+ description: "",
+ isActive: ""
+ }),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Number Type별 설정</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/number-type-configs" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ 각 문서 번호 유형별로 어떤 코드 그룹들을 어떤 순서로 사용할지 설정하는 페이지입니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={6}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["10rem", "12rem", "12rem", "12rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <NumberTypeConfigsTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx
new file mode 100644
index 00000000..6fa010c7
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/docu-list-rule/number-types/page.tsx
@@ -0,0 +1,52 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { NumberTypesTable } from "@/lib/docu-list-rule/number-types/table/number-types-table";
+import { getNumberTypes } from "@/lib/docu-list-rule/number-types/service";
+import { InformationButton } from "@/components/information/information-button";
+import { searchParamsNumberTypesCache } from "@/lib/docu-list-rule/number-types/validation";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getNumberTypes(
+ searchParamsNumberTypesCache.parse(searchParams)
+ ),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Number Type 관리</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/number-types" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ 문서 번호 유형을 추가, 수정, 삭제할 수 있는 페이지입니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={4}
+ searchableColumnCount={1}
+ filterableColumnCount={0}
+ cellWidths={["10rem", "20rem", "10rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <NumberTypesTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx b/app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx
new file mode 100644
index 00000000..fed49256
--- /dev/null
+++ b/app/[lng]/engineering/(engineering)/docu-list-rule/page.tsx
@@ -0,0 +1,11 @@
+import { redirect } from "next/navigation"
+
+
+export default async function DocumentNumberingPage({
+ params,
+}: {
+ params: { lng: string }
+}) {
+ // Code Group 페이지로 리다이렉트
+ redirect(`/${params.lng}/engineering/docu-list-rule/document-class`)
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/basic-contract-template/gtc/[id]/page.tsx b/app/[lng]/evcp/(evcp)/basic-contract-template/gtc/[id]/page.tsx
new file mode 100644
index 00000000..0f783375
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/basic-contract-template/gtc/[id]/page.tsx
@@ -0,0 +1,142 @@
+import * as React from "react"
+import { notFound } from "next/navigation"
+import { type SearchParams } from "@/types/table"
+import { getValidFilters } from "@/lib/data-table"
+import { Skeleton } from "@/components/ui/skeleton"
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
+import { Shell } from "@/components/shell"
+import { InformationButton } from "@/components/information/information-button"
+
+import {
+ getGtcClauses,
+ getUsersForFilter,
+} from "@/lib/gtc-contract/gtc-clauses/service"
+import { getGtcDocumentById } from "@/lib/gtc-contract/service"
+import { searchParamsCache } from "@/lib/gtc-contract/gtc-clauses/validations"
+import { GtcClausesPageHeader } from "@/lib/gtc-contract/gtc-clauses/gtc-clauses-page-header"
+import { GtcClausesTable } from "@/lib/gtc-contract/gtc-clauses/table/clause-table"
+
+interface GtcClausesPageProps {
+ params: Promise<{ id: string }>
+ searchParams: Promise<SearchParams>
+}
+
+export default async function GtcClausesPage(props: GtcClausesPageProps) {
+ const params = await props.params
+ const searchParams = await props.searchParams
+ const documentId = parseInt(params.id)
+
+ if (isNaN(documentId)) {
+ notFound()
+ }
+
+ // 문서 정보 조회
+ const document = await getGtcDocumentById(documentId)
+ if (!document) {
+ notFound()
+ }
+
+ const search = searchParamsCache.parse(searchParams)
+ const validFilters = getValidFilters(search.filters)
+
+ // 병렬로 데이터 조회
+ const promises = Promise.all([
+ getGtcClauses({
+ ...search,
+ filters: validFilters,
+ documentId,
+ }),
+ getUsersForFilter()
+ ])
+
+ return (
+ <Shell className="gap-2">
+ {/* 헤더 컴포넌트 */}
+ <GtcClausesPageHeader document={document} />
+
+ {/* 문서 정보 카드 */}
+ <div className="rounded-lg border bg-card p-4">
+ <div className="grid grid-cols-2 md:grid-cols-4 gap-4 text-sm">
+ <div>
+ <div className="font-medium text-muted-foreground">최초등록일</div>
+ <div>{document.createdAt ? new Date(document.createdAt).toLocaleDateString('ko-KR') : '-'}</div>
+ </div>
+ <div>
+ <div className="font-medium text-muted-foreground">최초등록자</div>
+ <div>{document.createdByName || '-'}</div>
+ </div>
+ <div>
+ <div className="font-medium text-muted-foreground">최종수정일</div>
+ <div>{document.updatedAt ? new Date(document.updatedAt).toLocaleDateString('ko-KR') : '-'}</div>
+ </div>
+ <div>
+ <div className="font-medium text-muted-foreground">최종수정자</div>
+ <div>{document.updatedByName || '-'}</div>
+ </div>
+ </div>
+
+ {document.editReason && (
+ <div className="mt-3 pt-3 border-t">
+ <div className="font-medium text-muted-foreground mb-1">최종 편집사유</div>
+ <div className="text-sm">{document.editReason}</div>
+ </div>
+ )}
+ </div>
+
+ {/* 조항 테이블 */}
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={8}
+ searchableColumnCount={2}
+ filterableColumnCount={3}
+ cellWidths={["10rem", "15rem", "20rem", "30rem", "12rem", "12rem", "12rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <GtcClausesTable
+ promises={promises}
+ documentId={documentId}
+ document={document}
+ />
+ </React.Suspense>
+ </Shell>
+ )
+}
+
+// 메타데이터 생성
+export async function generateMetadata(props: GtcClausesPageProps) {
+ const params = await props.params
+ const documentId = parseInt(params.id)
+
+ if (isNaN(documentId)) {
+ return {
+ title: "GTC 조항 관리",
+ }
+ }
+
+ try {
+ const document = await getGtcDocumentById(documentId)
+
+ if (!document) {
+ return {
+ title: "GTC 조항 관리",
+ }
+ }
+
+ const title = `GTC 조항 관리 - ${document.type === "standard" ? "표준" : "프로젝트"} v${document.revision}`
+ const description = document.project
+ ? `${document.project.name} (${document.project.code}) 프로젝트의 GTC 조항을 관리합니다.`
+ : "표준 GTC 조항을 관리합니다."
+
+ return {
+ title,
+ description,
+ }
+ } catch (error) {
+ return {
+ title: "GTC 조항 관리",
+ }
+ }
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/code-groups/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/code-groups/page.tsx
new file mode 100644
index 00000000..5aebf15d
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/docu-list-rule/code-groups/page.tsx
@@ -0,0 +1,54 @@
+import * as React from "react";
+import { type SearchParams } from "@/types/table";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { getCodeGroups } from "@/lib/docu-list-rule/code-groups/service";
+import { CodeGroupsTable } from "@/lib/docu-list-rule/code-groups/table/code-groups-table";
+import { searchParamsCodeGroupsCache } from "@/lib/docu-list-rule/code-groups/validation";
+import { InformationButton } from "@/components/information/information-button";
+
+interface IndexPageProps {
+ searchParams: Promise<SearchParams>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+ const search = searchParamsCodeGroupsCache.parse(searchParams);
+
+ const promises = Promise.all([
+ getCodeGroups({
+ ...search,
+ }),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Code Group 정의</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/code-groups" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ 문서 번호에 사용될 수 있는 다양한 코드 그룹의 정의를 관리하는 페이지입니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={7}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["8rem", "12rem", "10rem", "10rem", "12rem", "8rem", "12rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <CodeGroupsTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx
new file mode 100644
index 00000000..cf0bf02e
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/docu-list-rule/combo-box-settings/page.tsx
@@ -0,0 +1,53 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { getComboBoxCodeGroups } from "@/lib/docu-list-rule/combo-box-settings/service";
+import { ComboBoxSettingsTable } from "@/lib/docu-list-rule/combo-box-settings/table/combo-box-settings-table";
+import { InformationButton } from "@/components/information/information-button";
+import { searchParamsCodeGroupsCache } from "@/lib/docu-list-rule/code-groups/validation";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getComboBoxCodeGroups(
+ searchParamsCodeGroupsCache.parse(searchParams)
+ ),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Combo Box 설정</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/combo-box-settings" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ Combo Box 옵션을 관리하는 페이지입니다.
+ 각 Code Group별로 Combo Box에 표시될 옵션들을 설정할 수 있습니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={6}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["8rem", "12rem", "10rem", "8rem", "12rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <ComboBoxSettingsTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/document-class/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/document-class/page.tsx
new file mode 100644
index 00000000..5c2c600e
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/docu-list-rule/document-class/page.tsx
@@ -0,0 +1,52 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { getDocumentClassCodeGroups } from "@/lib/docu-list-rule/document-class/service";
+import { DocumentClassTable } from "@/lib/docu-list-rule/document-class/table/document-class-table";
+import { InformationButton } from "@/components/information/information-button";
+import { searchParamsDocumentClassCache } from "@/lib/docu-list-rule/document-class/validation";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getDocumentClassCodeGroups(
+ searchParamsDocumentClassCache.parse(searchParams)
+ ),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Document Class 관리</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/document-class" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ Document Class를 관리합니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={4}
+ searchableColumnCount={1}
+ filterableColumnCount={1}
+ cellWidths={["10rem", "20rem", "10rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <DocumentClassTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/layout.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/layout.tsx
new file mode 100644
index 00000000..03473293
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/docu-list-rule/layout.tsx
@@ -0,0 +1,69 @@
+import { Metadata } from "next"
+
+import { Separator } from "@/components/ui/separator"
+import { SidebarNav } from "@/components/layout/sidebar-nav"
+
+export const metadata: Metadata = {
+ title: "Document Numbering Rule",
+}
+
+
+
+export default async function DocumentNumberingLayout({
+ children,
+ params,
+}: {
+ children: React.ReactNode
+ params: { lng: string }
+}) {
+ const resolvedParams = await params
+ const lng = resolvedParams.lng
+
+ const sidebarNavItems = [
+ {
+ title: "Document Class 관리",
+ href: `/${lng}/evcp/docu-list-rule/document-class`,
+ },
+ {
+ title: "Code Group 정의",
+ href: `/${lng}/evcp/docu-list-rule/code-groups`,
+ },
+ {
+ title: "Combo Box 설정",
+ href: `/${lng}/evcp/docu-list-rule/combo-box-settings`,
+ },
+ {
+ title: "Number Type 관리",
+ href: `/${lng}/evcp/docu-list-rule/number-types`,
+ },
+ {
+ title: "Number Type별 설정",
+ href: `/${lng}/evcp/docu-list-rule/number-type-configs`,
+ },
+ ]
+
+ return (
+ <>
+ <div className="container py-6">
+ <section className="overflow-hidden rounded-[0.5rem] border bg-background shadow">
+ <div className="hidden space-y-6 p-10 pb-16 md:block">
+ <div className="space-y-0.5">
+ <h2 className="text-2xl font-bold tracking-tight">Document Numbering Rule (해양)</h2>
+ <p className="text-muted-foreground">
+ 벤더 제출 문서 리스트 작성 시에 사용되는 넘버링
+ </p>
+ </div>
+
+ <Separator className="my-6" />
+ <div className="flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0">
+ <aside className="-mx-4 lg:w-1/5">
+ <SidebarNav items={sidebarNavItems} />
+ </aside>
+ <div className="flex-1 ">{children}</div>
+ </div>
+ </div>
+ </section>
+ </div>
+ </>
+ )
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx
new file mode 100644
index 00000000..4195ba24
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/docu-list-rule/number-type-configs/page.tsx
@@ -0,0 +1,60 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { NumberTypeConfigsTable } from "@/lib/docu-list-rule/number-type-configs/table/number-type-configs-table";
+import { getNumberTypes } from "@/lib/docu-list-rule/number-types/service";
+import { InformationButton } from "@/components/information/information-button";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getNumberTypes({
+ page: 1,
+ perPage: 1000, // 모든 Number Type을 가져오기 위해 큰 값 설정
+ search: "",
+ sort: [{ id: "id", desc: false }], // DB 등록 순서대로 정렬
+ filters: [],
+ joinOperator: "and",
+ flags: ["advancedTable"],
+ numberTypeId: "",
+ description: "",
+ isActive: ""
+ }),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Number Type별 설정</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/number-type-configs" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ 각 문서 번호 유형별로 어떤 코드 그룹들을 어떤 순서로 사용할지 설정하는 페이지입니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={6}
+ searchableColumnCount={1}
+ filterableColumnCount={2}
+ cellWidths={["10rem", "12rem", "12rem", "12rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <NumberTypeConfigsTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/number-types/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/number-types/page.tsx
new file mode 100644
index 00000000..6fa010c7
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/docu-list-rule/number-types/page.tsx
@@ -0,0 +1,52 @@
+import * as React from "react";
+import { Shell } from "@/components/shell";
+import { Skeleton } from "@/components/ui/skeleton";
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton";
+import { NumberTypesTable } from "@/lib/docu-list-rule/number-types/table/number-types-table";
+import { getNumberTypes } from "@/lib/docu-list-rule/number-types/service";
+import { InformationButton } from "@/components/information/information-button";
+import { searchParamsNumberTypesCache } from "@/lib/docu-list-rule/number-types/validation";
+
+interface IndexPageProps {
+ searchParams: Promise<any>;
+}
+
+export default async function IndexPage(props: IndexPageProps) {
+ const searchParams = await props.searchParams;
+
+ const promises = Promise.all([
+ getNumberTypes(
+ searchParamsNumberTypesCache.parse(searchParams)
+ ),
+ ]);
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">Number Type 관리</h2>
+ <InformationButton pagePath="evcp/docu-list-rule/number-types" />
+ </div>
+ {/* <p className="text-muted-foreground">
+ 문서 번호 유형을 추가, 수정, 삭제할 수 있는 페이지입니다.
+ </p> */}
+ </div>
+ </div>
+ <React.Suspense fallback={<Skeleton className="h-7 w-52" />}></React.Suspense>
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={4}
+ searchableColumnCount={1}
+ filterableColumnCount={0}
+ cellWidths={["10rem", "20rem", "10rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <NumberTypesTable promises={promises} />
+ </React.Suspense>
+ </Shell>
+ );
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/docu-list-rule/page.tsx b/app/[lng]/evcp/(evcp)/docu-list-rule/page.tsx
new file mode 100644
index 00000000..3ebf93b3
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/docu-list-rule/page.tsx
@@ -0,0 +1,11 @@
+import { redirect } from "next/navigation"
+
+
+export default async function DocumentNumberingPage({
+ params,
+}: {
+ params: { lng: string }
+}) {
+ // Code Group 페이지로 리다이렉트
+ redirect(`/${params.lng}/evcp/docu-list-rule/document-class`)
+} \ No newline at end of file