From 1197e176493c88e301f9bb02321d815ffc717d10 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Mon, 10 Nov 2025 15:30:13 +0900 Subject: (김준회) ITB: 계약선택시 로직변경(이진용 프로 요청): ITB인 경우 내자는 계약서 강제선택, 외자는 강제비선택 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(procurement)/rfq-last/[id]/vendor/page.tsx | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/[lng]/evcp/(evcp)/(procurement)/rfq-last/[id]/vendor/page.tsx b/app/[lng]/evcp/(evcp)/(procurement)/rfq-last/[id]/vendor/page.tsx index c3a786b9..00a9ef13 100644 --- a/app/[lng]/evcp/(evcp)/(procurement)/rfq-last/[id]/vendor/page.tsx +++ b/app/[lng]/evcp/(evcp)/(procurement)/rfq-last/[id]/vendor/page.tsx @@ -1,7 +1,7 @@ import { Separator } from "@/components/ui/separator"; import { getRfqWithDetails, getRfqVendorResponses } from "@/lib/rfq-last/service"; import { Alert, AlertTitle, AlertDescription } from "@/components/ui/alert"; -import { AlertCircle, Users, Send, FileText, CheckCircle2, Clock, XCircle } from "lucide-react"; +import { AlertCircle, Users, Send, FileText, CheckCircle2, Clock } from "lucide-react"; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { RfqVendorTable } from "@/lib/rfq-last/vendor/rfq-vendor-table"; @@ -12,7 +12,15 @@ interface VendorPageProps { lng: string; id: string; }; - searchParams: Promise>; + searchParams: Promise>; +} + +// rfqCode를 기반으로 rfqCategory 결정 +function getRfqCategory(rfqCode: string): "itb" | "rfq" | "general" { + if (rfqCode.startsWith("I")) return "itb"; + if (rfqCode.startsWith("R")) return "rfq"; + if (rfqCode.startsWith("F")) return "general"; + return "general"; // 기본값 } export default async function VendorPage(props: VendorPageProps) { @@ -48,10 +56,13 @@ export default async function VendorPage(props: VendorPageProps) { ); } + // rfqCategory 결정 + const rfqCategory = getRfqCategory(rfqData.rfqCode); + // 응답 상태별 집계 const statusSummary = { total: rfqData?.details.length || 0, - invited: vendorResponses?.filter(v => v.status === "초대됨").length || 0, + invited: vendorResponses?.filter(v => v.status === "대기중").length || 0, drafting: vendorResponses?.filter(v => v.status === "작성중").length || 0, submitted: vendorResponses?.filter(v => v.status === "제출완료").length || 0, confirmed: vendorResponses?.filter(v => v.status === "최종확정").length || 0, @@ -125,8 +136,9 @@ export default async function VendorPage(props: VendorPageProps) { -- cgit v1.2.3