From dd831478a3ab5ac7182903d41aa4b3e47f28224f Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 15 Sep 2025 10:13:11 +0000 Subject: (최겸) 구매 입찰 테스트 및 수정사항 반영 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx | 17 +++++++++++++---- app/[lng]/evcp/(evcp)/bid/page.tsx | 12 +++++++++--- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'app') diff --git a/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx b/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx index 490f1360..5c4e9b99 100644 --- a/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx +++ b/app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx @@ -2,7 +2,7 @@ import { Metadata } from "next" import { Separator } from "@/components/ui/separator" import { SidebarNav } from "@/components/layout/sidebar-nav" -import { getBiddingById, getBiddingConditions } from "@/lib/bidding/service" +import { getBiddingById, getBiddingConditions, getActivePaymentTerms, getActiveIncoterms } from "@/lib/bidding/service" import { Bidding } from "@/db/schema/bidding" import { Button } from "@/components/ui/button" import { ArrowLeft } from "lucide-react" @@ -31,6 +31,13 @@ export default async function SettingsLayout({ const bidding: Bidding | null = await getBiddingById(idAsNumber) const biddingConditions = await getBiddingConditions(idAsNumber) + // 3) 옵션 데이터 가져오기 + const paymentTermsResult = await getActivePaymentTerms() + const incotermsResult = await getActiveIncoterms() + + const paymentTermsOptions = paymentTermsResult.success && 'data' in paymentTermsResult ? paymentTermsResult.data || [] : [] + const incotermsOptions = incotermsResult.success && 'data' in incotermsResult ? incotermsResult.data || [] : [] + // 3) 사이드바 메뉴 const sidebarNavItems = [ { @@ -71,9 +78,11 @@ export default async function SettingsLayout({ {/* 입찰 조건 */} {bidding && ( - )} diff --git a/app/[lng]/evcp/(evcp)/bid/page.tsx b/app/[lng]/evcp/(evcp)/bid/page.tsx index 0e129e8a..c477e4f8 100644 --- a/app/[lng]/evcp/(evcp)/bid/page.tsx +++ b/app/[lng]/evcp/(evcp)/bid/page.tsx @@ -6,7 +6,9 @@ import { getBiddingStatusCounts, getBiddingTypeCounts, getBiddingManagerCounts, - getBiddingMonthlyStats + getBiddingMonthlyStats, + getActivePaymentTerms, + getActiveIncoterms } from "@/lib/bidding/service" import { searchParamsCache } from "@/lib/bidding/validation" import { BiddingsPageHeader } from "@/lib/bidding/list/biddings-page-header" @@ -42,6 +44,8 @@ export default async function BiddingsPage(props: IndexPageProps) { getBiddingTypeCounts(), getBiddingManagerCounts(), getBiddingMonthlyStats(), + getActivePaymentTerms(), + getActiveIncoterms(), ]) return ( @@ -89,10 +93,12 @@ async function BiddingsStatsCardsWrapper({ Awaited>, Awaited>, Awaited>, - Awaited> + Awaited>, + Awaited>, + Awaited> ]> }) { - const [biddingsResult, statusCounts, typeCounts, managerCounts, monthlyStats] = await promises + const [biddingsResult, statusCounts, typeCounts, managerCounts, monthlyStats, paymentTermsResult, incotermsResult] = await promises return (