summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-06-15 04:40:22 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-06-15 04:40:22 +0000
commitc5002d77087b256599b174ada611621657fcc523 (patch)
tree515aab399709755cf3d57d9927e2d81467dea700 /app
parent9f3b8915ab20f177edafd3c4a4cc1ca0da0fc766 (diff)
(최겸) 기술영업 조선,해양RFQ 수정
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/evcp/(evcp)/budgetary-tech-sales-hull/page.tsx61
-rw-r--r--app/[lng]/evcp/(evcp)/budgetary-tech-sales-top/page.tsx61
2 files changed, 122 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/budgetary-tech-sales-hull/page.tsx b/app/[lng]/evcp/(evcp)/budgetary-tech-sales-hull/page.tsx
new file mode 100644
index 00000000..b1be29db
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/budgetary-tech-sales-hull/page.tsx
@@ -0,0 +1,61 @@
+import { searchParamsHullCache } from "@/lib/techsales-rfq/validations"
+import { getTechSalesHullRfqsWithJoin } from "@/lib/techsales-rfq/service"
+import { getValidFilters } from "@/lib/data-table"
+import { Shell } from "@/components/shell"
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
+import { RFQListTable } from "@/lib/techsales-rfq/table/rfq-table"
+import { type SearchParams } from "@/types/table"
+import * as React from "react"
+
+interface HullRfqPageProps {
+ searchParams: Promise<SearchParams>
+}
+
+export default async function HullRfqPage(props: HullRfqPageProps) {
+ // searchParams를 await하여 resolve
+ const searchParams = await props.searchParams
+
+ // 해양 HULL용 파라미터 파싱
+ const search = searchParamsHullCache.parse(searchParams);
+ const validFilters = getValidFilters(search.filters);
+
+ // 기술영업 해양 Hull RFQ 데이터를 Promise.all로 감싸서 전달
+ const promises = Promise.all([
+ getTechSalesHullRfqsWithJoin({
+ ...search, // 모든 파라미터 전달 (page, perPage, sort, basicFilters, filters 등)
+ filters: validFilters, // 고급 필터를 명시적으로 오버라이드 (파싱된 버전)
+ })
+ ])
+
+ return (
+ <Shell variant="fullscreen" className="h-full"> {/* fullscreen variant 사용 */}
+ {/* 고정 헤더 영역 */}
+ <div className="flex-shrink-0">
+ <div className="flex items-center justify-between">
+ <div>
+ <h2 className="text-2xl font-bold tracking-tight">
+ 기술영업-해양 Hull RFQ
+ </h2>
+ </div>
+ </div>
+ </div>
+
+ {/* 테이블 영역 - 남은 공간 모두 차지 */}
+ <div className="flex-1 min-h-0">
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={8}
+ searchableColumnCount={2}
+ filterableColumnCount={3}
+ cellWidths={["10rem", "15rem", "12rem", "12rem", "8rem", "8rem", "10rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <RFQListTable promises={promises} className="h-full" rfqType="HULL" />
+ </React.Suspense>
+ </div>
+ </Shell>
+ )
+} \ No newline at end of file
diff --git a/app/[lng]/evcp/(evcp)/budgetary-tech-sales-top/page.tsx b/app/[lng]/evcp/(evcp)/budgetary-tech-sales-top/page.tsx
new file mode 100644
index 00000000..f84a9794
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/budgetary-tech-sales-top/page.tsx
@@ -0,0 +1,61 @@
+import { searchParamsTopCache } from "@/lib/techsales-rfq/validations"
+import { getTechSalesTopRfqsWithJoin } from "@/lib/techsales-rfq/service"
+import { getValidFilters } from "@/lib/data-table"
+import { Shell } from "@/components/shell"
+import { DataTableSkeleton } from "@/components/data-table/data-table-skeleton"
+import { RFQListTable } from "@/lib/techsales-rfq/table/rfq-table"
+import { type SearchParams } from "@/types/table"
+import * as React from "react"
+
+interface HullRfqPageProps {
+ searchParams: Promise<SearchParams>
+}
+
+export default async function HullRfqPage(props: HullRfqPageProps) {
+ // searchParams를 await하여 resolve
+ const searchParams = await props.searchParams
+
+ // 해양 TOP용 파라미터 파싱
+ const search = searchParamsTopCache.parse(searchParams);
+ const validFilters = getValidFilters(search.filters);
+
+ // 기술영업 해양 TOP RFQ 데이터를 Promise.all로 감싸서 전달
+ const promises = Promise.all([
+ getTechSalesTopRfqsWithJoin({
+ ...search, // 모든 파라미터 전달 (page, perPage, sort, basicFilters, filters 등)
+ filters: validFilters, // 고급 필터를 명시적으로 오버라이드 (파싱된 버전)
+ })
+ ])
+
+ return (
+ <Shell variant="fullscreen" className="h-full"> {/* fullscreen variant 사용 */}
+ {/* 고정 헤더 영역 */}
+ <div className="flex-shrink-0">
+ <div className="flex items-center justify-between">
+ <div>
+ <h2 className="text-2xl font-bold tracking-tight">
+ 기술영업-해양 TOP RFQ
+ </h2>
+ </div>
+ </div>
+ </div>
+
+ {/* 테이블 영역 - 남은 공간 모두 차지 */}
+ <div className="flex-1 min-h-0">
+ <React.Suspense
+ fallback={
+ <DataTableSkeleton
+ columnCount={8}
+ searchableColumnCount={2}
+ filterableColumnCount={3}
+ cellWidths={["10rem", "15rem", "12rem", "12rem", "8rem", "8rem", "10rem", "8rem"]}
+ shrinkZero
+ />
+ }
+ >
+ <RFQListTable promises={promises} className="h-full" rfqType="TOP" />
+ </React.Suspense>
+ </div>
+ </Shell>
+ )
+} \ No newline at end of file