diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx | 17 | ||||
| -rw-r--r-- | app/[lng]/evcp/(evcp)/bid/page.tsx | 12 |
2 files changed, 22 insertions, 7 deletions
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 && ( - <BiddingConditionsEdit - biddingId={bidding.id} - initialConditions={biddingConditions} + <BiddingConditionsEdit + biddingId={bidding.id} + initialConditions={biddingConditions} + paymentTermsOptions={paymentTermsOptions} + incotermsOptions={incotermsOptions} /> )} 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<ReturnType<typeof getBiddingStatusCounts>>, Awaited<ReturnType<typeof getBiddingTypeCounts>>, Awaited<ReturnType<typeof getBiddingManagerCounts>>, - Awaited<ReturnType<typeof getBiddingMonthlyStats>> + Awaited<ReturnType<typeof getBiddingMonthlyStats>>, + Awaited<ReturnType<typeof getActivePaymentTerms>>, + Awaited<ReturnType<typeof getActiveIncoterms>> ]> }) { - const [biddingsResult, statusCounts, typeCounts, managerCounts, monthlyStats] = await promises + const [biddingsResult, statusCounts, typeCounts, managerCounts, monthlyStats, paymentTermsResult, incotermsResult] = await promises return ( <BiddingsStatsCards |
