From 2eb717eb2bbfd97a5f149d13049aa336c26c393b Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Wed, 29 Oct 2025 07:43:44 +0000
Subject: (최겸) 구매 실사 개발(진행중)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/pq-input/pq-input-tabs.tsx | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

(limited to 'components/pq-input/pq-input-tabs.tsx')

diff --git a/components/pq-input/pq-input-tabs.tsx b/components/pq-input/pq-input-tabs.tsx
index 9cdb5e8d..8d5aa2ab 100644
--- a/components/pq-input/pq-input-tabs.tsx
+++ b/components/pq-input/pq-input-tabs.tsx
@@ -180,7 +180,12 @@ export function PQInputTabs({
 
   const { toast } = useToast()
 
-  const shouldDisableInput = isReadOnly;
+  // QM 검토 중이거나 이미 승인된 상태에서는 수정 불가
+  const shouldDisableInput = isReadOnly || 
+    (currentPQ?.status === "QM_APPROVED") || 
+    (currentPQ?.status === "QM_REJECTED") || 
+    (currentPQ?.status === "APPROVED") || 
+    (currentPQ?.status === "REJECTED");
 
   // 코드 순서로 정렬하는 함수 (1-1-1, 1-1-2, 1-2-1 순서)
   const sortByCode = (items: any[]) => {
@@ -599,9 +604,16 @@ export function PQInputTabs({
       <div className="mb-6 bg-muted p-4 rounded-md">
         <div className="flex items-center justify-between mb-2">
           <h3 className="text-lg font-semibold">프로젝트 정보</h3>
-          <Badge variant={getStatusVariant(projectData.status)}>
-            {getStatusLabel(projectData.status)}
-          </Badge>
+          <div className="flex items-center gap-2">
+            <Badge variant={getStatusVariant(projectData.status)}>
+              {getStatusLabel(projectData.status)}
+            </Badge>
+            {projectData.status === "QM_REVIEWING" && (
+              <div className="text-sm text-amber-600 bg-amber-50 px-2 py-1 rounded">
+                QM 검토 중 - 수정 가능
+              </div>
+            )}
+          </div>
         </div>
 
         <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
@@ -630,6 +642,9 @@ export function PQInputTabs({
       case "REQUESTED": return "요청됨";
       case "IN_PROGRESS": return "진행중";
       case "SUBMITTED": return "제출됨";
+      case "QM_REVIEWING": return "QM 검토중";
+      case "QM_APPROVED": return "QM 승인됨";
+      case "QM_REJECTED": return "QM 거절됨";
       case "APPROVED": return "승인됨";
       case "REJECTED": return "반려됨";
       default: return status;
@@ -641,6 +656,9 @@ export function PQInputTabs({
       case "REQUESTED": return "secondary";
       case "IN_PROGRESS": return "default";
       case "SUBMITTED": return "outline";
+      case "QM_REVIEWING": return "default";
+      case "QM_APPROVED": return "outline";
+      case "QM_REJECTED": return "destructive";
       case "APPROVED": return "outline";
       case "REJECTED": return "destructive";
       default: return "secondary";
-- 
cgit v1.2.3

