From ba8cd44a0ed2c613a5f2cee06bfc9bd0f61f21c7 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Fri, 7 Nov 2025 08:39:04 +0000
Subject: (최겸) 입찰/견적 수정사항
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/bidding/bidding-info-header.tsx | 217 ++++++++++++++++++-----------
 1 file changed, 135 insertions(+), 82 deletions(-)

(limited to 'components/bidding/bidding-info-header.tsx')

diff --git a/components/bidding/bidding-info-header.tsx b/components/bidding/bidding-info-header.tsx
index b897187d..0b2d2b47 100644
--- a/components/bidding/bidding-info-header.tsx
+++ b/components/bidding/bidding-info-header.tsx
@@ -1,6 +1,6 @@
 import { Bidding } from '@/db/schema/bidding'
-import { Building2, Package, User, DollarSign, Calendar } from 'lucide-react'
-import { contractTypeLabels, biddingTypeLabels } from '@/db/schema/bidding'
+import { Building2, User, DollarSign, Calendar, FileText } from 'lucide-react'
+import { contractTypeLabels, biddingTypeLabels, awardCountLabels } from '@/db/schema/bidding'
 import { formatDate } from '@/lib/utils'
 
 interface BiddingInfoHeaderProps {
@@ -18,122 +18,175 @@ export function BiddingInfoHeader({ bidding }: BiddingInfoHeaderProps) {
 
   return (
     <div className="bg-white border rounded-lg p-6 mb-6 shadow-sm">
-      {/* 3개 섹션을 Grid로 배치 - 각 섹션이 동일한 width로 꽉 채움 */}
-      <div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
-        {/* 왼쪽 섹션: 프로젝트, 품목, 담당자 정보 */}
+      {/* 4개 섹션을 Grid로 배치 */}
+      <div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
+        {/* 1. 프로젝트 및 품목 정보 */}
         <div className="w-full space-y-4">
-          {/* 프로젝트 정보 */}
+          <div className="flex items-center gap-2 text-sm font-semibold text-gray-700 mb-3">
+            <Building2 className="w-4 h-4" />
+            <span>기본 정보</span>
+          </div>
+
           {bidding.projectName && (
-            <div className="mb-4">
-              <div className="flex items-center gap-2 text-sm text-gray-500 mb-2">
-                <Building2 className="w-4 h-4" />
-                <span>프로젝트</span>
-              </div>
-              <div className="font-medium text-gray-900">{bidding.projectName}</div>
+            <div>
+              <div className="text-xs text-gray-500 mb-1">프로젝트</div>
+              <div className="font-medium text-gray-900 text-sm">{bidding.projectName}</div>
             </div>
           )}
  
-          {/* 품목 정보 */}
           {bidding.itemName && (
-            <div className="mb-4">
-              <div className="flex items-center gap-2 text-sm text-gray-500 mb-2">
-                <Package className="w-4 h-4" />
-                <span>품목</span>
-              </div>
-              <div className="font-medium text-gray-900">{bidding.itemName}</div>
+            <div>
+              <div className="text-xs text-gray-500 mb-1">품목</div>
+              <div className="font-medium text-gray-900 text-sm">{bidding.itemName}</div>
+            </div>
+          )}
+
+          {bidding.prNumber && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">PR No.</div>
+              <div className="font-mono text-sm font-medium text-gray-900">{bidding.prNumber}</div>
+            </div>
+          )}
+
+          {bidding.purchasingOrganization && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">구매조직</div>
+              <div className="font-medium text-gray-900 text-sm">{bidding.purchasingOrganization}</div>
             </div>
           )}
+        </div>
  
-          {/* 담당자 정보 */}
-          {bidding.managerName && (
-            <div className="mb-4">
-              <div className="flex items-center gap-2 text-sm text-gray-500 mb-2">
-                <User className="w-4 h-4" />
-                <span>담당자</span>
+        {/* 2. 담당자 및 예산 정보 */}
+        <div className="w-full border-l border-gray-100 pl-6 space-y-4">
+          <div className="flex items-center gap-2 text-sm font-semibold text-gray-700 mb-3">
+            <User className="w-4 h-4" />
+            <span>담당자 정보</span>
+          </div>
+
+          {bidding.bidPicName && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">입찰담당자</div>
+              <div className="font-medium text-gray-900 text-sm">
+                {bidding.bidPicName}
+                {bidding.bidPicCode && (
+                  <span className="ml-2 text-xs text-gray-500">({bidding.bidPicCode})</span>
+                )}
               </div>
-              <div className="font-medium text-gray-900">{bidding.managerName}</div>
             </div>
           )}
  
-          {/* 예산 정보 */}
+          {bidding.supplyPicName && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">조달담당자</div>
+              <div className="font-medium text-gray-900 text-sm">
+                {bidding.supplyPicName}
+                {bidding.supplyPicCode && (
+                  <span className="ml-2 text-xs text-gray-500">({bidding.supplyPicCode})</span>
+                )}
+              </div>
+            </div>
+          )}
+
           {bidding.budget && (
-            <div className="mb-4">
-              <div className="flex items-center gap-2 text-sm text-gray-500 mb-2">
-                <DollarSign className="w-4 h-4" />
+            <div>
+              <div className="flex items-center gap-1.5 text-xs text-gray-500 mb-1">
+                <DollarSign className="w-3 h-3" />
                 <span>예산</span>
               </div>
-              <div className="font-semibold text-gray-900">
+              <div className="font-semibold text-gray-900 text-sm">
                 {new Intl.NumberFormat('ko-KR', {
                   style: 'currency',
                   currency: bidding.currency || 'KRW',
+                  minimumFractionDigits: 0,
+                  maximumFractionDigits: 0,
                 }).format(Number(bidding.budget))}
               </div>
             </div>
           )}
         </div>
  
-        {/* 가운데 섹션: 계약 정보 */}
-        <div className="w-full border-l border-gray-100 pl-6">
-          <div className="grid grid-cols-2 gap-4">
-            <div className="flex flex-col gap-1">
-              <span className="text-gray-500 text-sm">계약</span>
-              <span className="font-medium">{contractTypeLabels[bidding.contractType]}</span>
+        {/* 3. 계약 정보 */}
+        <div className="w-full border-l border-gray-100 pl-6 space-y-4">
+          <div className="flex items-center gap-2 text-sm font-semibold text-gray-700 mb-3">
+            <FileText className="w-4 h-4" />
+            <span>계약 정보</span>
+          </div>
+
+          <div className="grid grid-cols-2 gap-3">
+            <div>
+              <div className="text-xs text-gray-500 mb-1">계약구분</div>
+              <div className="font-medium text-sm text-gray-900">{contractTypeLabels[bidding.contractType]}</div>
             </div>
             
-            <div className="flex flex-col gap-1">
-              <span className="text-gray-500 text-sm">유형</span>
-              <span className="font-medium">{biddingTypeLabels[bidding.biddingType]}</span>
+            <div>
+              <div className="text-xs text-gray-500 mb-1">입찰유형</div>
+              <div className="font-medium text-sm text-gray-900">{biddingTypeLabels[bidding.biddingType]}</div>
             </div>
 
-            <div className="flex flex-col gap-1">
-              <span className="text-gray-500 text-sm">낙찰</span>
-              <span className="font-medium">{bidding.awardCount === 'single' ? '단수' : '복수'}</span>
+            <div>
+              <div className="text-xs text-gray-500 mb-1">낙찰수</div>
+              <div className="font-medium text-sm text-gray-900">
+                {bidding.awardCount ? awardCountLabels[bidding.awardCount] : '-'}
+              </div>
             </div>
 
-            <div className="flex flex-col gap-1">
-              <span className="text-gray-500 text-sm">통화</span>
-              <span className="font-mono font-medium">{bidding.currency}</span>
+            <div>
+              <div className="text-xs text-gray-500 mb-1">통화</div>
+              <div className="font-mono font-medium text-sm text-gray-900">{bidding.currency}</div>
             </div>
           </div>
+
+          {(bidding.contractStartDate || bidding.contractEndDate) && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">계약기간</div>
+              <div className="font-medium text-sm text-gray-900">
+                {bidding.contractStartDate && formatDate(bidding.contractStartDate, 'KR')}
+                {bidding.contractStartDate && bidding.contractEndDate && ' ~ '}
+                {bidding.contractEndDate && formatDate(bidding.contractEndDate, 'KR')}
+              </div>
+            </div>
+          )}
         </div>
  
-        {/* 오른쪽 섹션: 일정 정보 */}
-        {(bidding.submissionStartDate || bidding.evaluationDate || bidding.preQuoteDate || bidding.biddingRegistrationDate) && (
-          <div className="w-full border-l border-gray-100 pl-6">
-            <div className="flex items-center gap-2 mb-3 text-sm text-gray-500">
-              <Calendar className="w-4 h-4" />
-              <span>일정 정보</span>
-            </div>
-            <div className="space-y-3">
-              {bidding.submissionStartDate && bidding.submissionEndDate && (
-                <div>
-                  <span className="text-gray-500 text-sm">제출기간</span>
-                  <div className="font-medium">
-                    {formatDate(bidding.submissionStartDate, 'KR')} ~ {formatDate(bidding.submissionEndDate, 'KR')}
-                  </div>
-                </div>
-              )}
-              {bidding.biddingRegistrationDate && (
-                <div>
-                  <span className="text-gray-500 text-sm">입찰등록일</span>
-                  <div className="font-medium">{formatDate(bidding.biddingRegistrationDate, 'KR')}</div>
-                </div>
-              )}
-              {bidding.preQuoteDate && (
-                <div>
-                  <span className="text-gray-500 text-sm">사전견적일</span>
-                  <div className="font-medium">{formatDate(bidding.preQuoteDate, 'KR')}</div>
-                </div>
-              )}
-              {bidding.evaluationDate && (
-                <div>
-                  <span className="text-gray-500 text-sm">평가일</span>
-                  <div className="font-medium">{formatDate(bidding.evaluationDate, 'KR')}</div>
-                </div>
-              )}
-            </div>
+        {/* 4. 일정 정보 */}
+        <div className="w-full border-l border-gray-100 pl-6 space-y-4">
+          <div className="flex items-center gap-2 text-sm font-semibold text-gray-700 mb-3">
+            <Calendar className="w-4 h-4" />
+            <span>일정 정보</span>
           </div>
-        )}
+
+          {bidding.biddingRegistrationDate && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">입찰등록일</div>
+              <div className="font-medium text-sm text-gray-900">{formatDate(bidding.biddingRegistrationDate, 'KR')}</div>
+            </div>
+          )}
+
+          {bidding.preQuoteDate && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">사전견적일</div>
+              <div className="font-medium text-sm text-gray-900">{formatDate(bidding.preQuoteDate, 'KR')}</div>
+            </div>
+          )}
+
+          {bidding.submissionStartDate && bidding.submissionEndDate && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">제출기간</div>
+              <div className="font-medium text-sm text-gray-900">
+                {formatDate(bidding.submissionStartDate, 'KR')}
+                <div className="text-xs text-gray-400">~</div>
+                {formatDate(bidding.submissionEndDate, 'KR')}
+              </div>
+            </div>
+          )}
+
+          {bidding.evaluationDate && (
+            <div>
+              <div className="text-xs text-gray-500 mb-1">평가일</div>
+              <div className="font-medium text-sm text-gray-900">{formatDate(bidding.evaluationDate, 'KR')}</div>
+            </div>
+          )}
+        </div>
       </div>
     </div>
   )
-- 
cgit v1.2.3

