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

---
 .../general-contract-approval-request-dialog.tsx   | 141 ++-------------------
 1 file changed, 8 insertions(+), 133 deletions(-)

(limited to 'lib/general-contracts/detail/general-contract-approval-request-dialog.tsx')

diff --git a/lib/general-contracts/detail/general-contract-approval-request-dialog.tsx b/lib/general-contracts/detail/general-contract-approval-request-dialog.tsx
index f05fe9ef..25c1fb9a 100644
--- a/lib/general-contracts/detail/general-contract-approval-request-dialog.tsx
+++ b/lib/general-contracts/detail/general-contract-approval-request-dialog.tsx
@@ -27,10 +27,6 @@ import { type BasicContractTemplate } from '@/db/schema'
 import { 
   getBasicInfo,
   getContractItems,
-  getCommunicationChannel, 
-  getLocation, 
-  getFieldServiceRate, 
-  getOffsetDetails, 
   getSubcontractChecklist,
   uploadContractApprovalFile,
   sendContractApprovalRequest
@@ -45,10 +41,6 @@ interface ContractApprovalRequestDialogProps {
 interface ContractSummary {
   basicInfo: Record<string, unknown>
   items: Record<string, unknown>[]
-  communicationChannel: Record<string, unknown> | null
-  location: Record<string, unknown> | null
-  fieldServiceRate: Record<string, unknown> | null
-  offsetDetails: Record<string, unknown> | null
   subcontractChecklist: Record<string, unknown> | null
 }
 
@@ -280,10 +272,6 @@ export function ContractApprovalRequestDialog({
       const summary: ContractSummary = {
         basicInfo: {},
         items: [],
-        communicationChannel: null,
-        location: null,
-        fieldServiceRate: null,
-        offsetDetails: null,
         subcontractChecklist: null
       }
 
@@ -293,6 +281,14 @@ export function ContractApprovalRequestDialog({
         if (basicInfoData && basicInfoData.success) {
           summary.basicInfo = basicInfoData.data || {}
         }
+        // externalYardEntry 정보도 추가로 가져오기
+        const contractData = await getContractById(contractId)
+        if (contractData) {
+          summary.basicInfo = {
+            ...summary.basicInfo,
+            externalYardEntry: contractData.externalYardEntry || 'N'
+          }
+        }
       } catch {
         console.log('Basic Info 데이터 없음')
       }
@@ -307,47 +303,6 @@ export function ContractApprovalRequestDialog({
         console.log('품목 정보 데이터 없음')
       }
 
-      // 각 컴포넌트의 활성화 상태 및 데이터 확인
-      try {
-        // Communication Channel 확인
-        const commData = await getCommunicationChannel(contractId)
-        if (commData && commData.enabled) {
-          summary.communicationChannel = commData
-        }
-      } catch {
-        console.log('Communication Channel 데이터 없음')
-      }
-
-      try {
-        // Location 확인
-        const locationData = await getLocation(contractId)
-        if (locationData && locationData.enabled) {
-          summary.location = locationData
-        }
-      } catch {
-        console.log('Location 데이터 없음')
-      }
-
-      try {
-        // Field Service Rate 확인
-        const fieldServiceData = await getFieldServiceRate(contractId)
-        if (fieldServiceData && fieldServiceData.enabled) {
-          summary.fieldServiceRate = fieldServiceData
-        }
-      } catch {
-        console.log('Field Service Rate 데이터 없음')
-      }
-
-      try {
-        // Offset Details 확인
-        const offsetData = await getOffsetDetails(contractId)
-        if (offsetData && offsetData.enabled) {
-          summary.offsetDetails = offsetData
-        }
-      } catch {
-        console.log('Offset Details 데이터 없음')
-      }
-
       try {
         // Subcontract Checklist 확인
         const subcontractData = await getSubcontractChecklist(contractId)
@@ -943,86 +898,6 @@ export function ContractApprovalRequestDialog({
                       )}
                     </div>
 
-                    {/* 커뮤니케이션 채널 */}
-                    <div className="border rounded-lg p-4">
-                      <div className="flex items-center gap-2 mb-3">
-                        <Checkbox 
-                          id="communication-enabled" 
-                          checked={!!contractSummary?.communicationChannel}
-                          disabled
-                        />
-                        <Label htmlFor="communication-enabled" className="font-medium">
-                          커뮤니케이션 채널
-                        </Label>
-                        <Badge variant="outline">선택</Badge>
-                      </div>
-                      <p className="text-sm text-muted-foreground">
-                        {contractSummary?.communicationChannel 
-                          ? '정보가 입력되어 있습니다.' 
-                          : '정보가 입력되지 않았습니다.'}
-                      </p>
-                    </div>
-
-                    {/* 위치 정보 */}
-                    <div className="border rounded-lg p-4">
-                      <div className="flex items-center gap-2 mb-3">
-                        <Checkbox 
-                          id="location-enabled" 
-                          checked={!!contractSummary?.location}
-                          disabled
-                        />
-                        <Label htmlFor="location-enabled" className="font-medium">
-                          위치 정보
-                        </Label>
-                        <Badge variant="outline">선택</Badge>
-                      </div>
-                      <p className="text-sm text-muted-foreground">
-                        {contractSummary?.location 
-                          ? '정보가 입력되어 있습니다.' 
-                          : '정보가 입력되지 않았습니다.'}
-                      </p>
-                    </div>
-
-                    {/* 현장 서비스 요율 */}
-                    <div className="border rounded-lg p-4">
-                      <div className="flex items-center gap-2 mb-3">
-                        <Checkbox 
-                          id="fieldService-enabled" 
-                          checked={!!contractSummary?.fieldServiceRate}
-                          disabled
-                        />
-                        <Label htmlFor="fieldService-enabled" className="font-medium">
-                          현장 서비스 요율
-                        </Label>
-                        <Badge variant="outline">선택</Badge>
-                      </div>
-                      <p className="text-sm text-muted-foreground">
-                        {contractSummary?.fieldServiceRate 
-                          ? '정보가 입력되어 있습니다.' 
-                          : '정보가 입력되지 않았습니다.'}
-                      </p>
-                    </div>
-
-                    {/* 오프셋 세부사항 */}
-                    <div className="border rounded-lg p-4">
-                      <div className="flex items-center gap-2 mb-3">
-                        <Checkbox 
-                          id="offset-enabled" 
-                          checked={!!contractSummary?.offsetDetails}
-                          disabled
-                        />
-                        <Label htmlFor="offset-enabled" className="font-medium">
-                          오프셋 세부사항
-                        </Label>
-                        <Badge variant="outline">선택</Badge>
-                      </div>
-                      <p className="text-sm text-muted-foreground">
-                        {contractSummary?.offsetDetails 
-                          ? '정보가 입력되어 있습니다.' 
-                          : '정보가 입력되지 않았습니다.'}
-                      </p>
-                    </div>
-
                     {/* 하도급 체크리스트 */}
                     <div className="border rounded-lg p-4">
                       <div className="flex items-center gap-2 mb-3">
-- 
cgit v1.2.3

