summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-09-15 10:13:11 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-09-15 10:13:11 +0000
commitdd831478a3ab5ac7182903d41aa4b3e47f28224f (patch)
tree2f5ee3f818d6ff6799ebc1f35f3b40b7e6611a2a /app
parentd5f26d34c4ac6f3eaac16fbc6069de2c2341a6ff (diff)
(최겸) 구매 입찰 테스트 및 수정사항 반영
Diffstat (limited to 'app')
-rw-r--r--app/[lng]/evcp/(evcp)/bid/[id]/layout.tsx17
-rw-r--r--app/[lng]/evcp/(evcp)/bid/page.tsx12
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