From defda07c0bb4b0bd444ca8dc4fd3f89322bda0ce Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 3 Oct 2025 04:48:47 +0000 Subject: (대표님) edp, tbe, dolce 등 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pq-input/pq-review-wrapper.tsx | 63 +++++++++++++++++-------------- 1 file changed, 34 insertions(+), 29 deletions(-) (limited to 'components/pq-input/pq-review-wrapper.tsx') diff --git a/components/pq-input/pq-review-wrapper.tsx b/components/pq-input/pq-review-wrapper.tsx index ca5f314f..44916dce 100644 --- a/components/pq-input/pq-review-wrapper.tsx +++ b/components/pq-input/pq-review-wrapper.tsx @@ -21,7 +21,7 @@ import { DialogTitle } from "@/components/ui/dialog" import { useToast } from "@/hooks/use-toast" -import { CheckCircle, AlertCircle, Paperclip } from "lucide-react" +import { CheckCircle, AlertCircle, Paperclip, Square } from "lucide-react" import { PQGroupData } from "@/lib/pq/service" import { approvePQAction, rejectPQAction, updateSHICommentAction } from "@/lib/pq/service" // import * as ExcelJS from 'exceljs'; @@ -48,14 +48,14 @@ interface PQReviewWrapperProps { pqData: PQGroupData[] vendorId: number pqSubmission: PQSubmission - canReview: boolean + vendorInfo?: any // 협력업체 정보 (선택사항) } export function PQReviewWrapper({ pqData, vendorId, pqSubmission, - canReview + vendorInfo }: PQReviewWrapperProps) { const router = useRouter() const { toast } = useToast() @@ -66,6 +66,7 @@ export function PQReviewWrapper({ const [rejectReason, setRejectReason] = React.useState("") const [shiComments, setShiComments] = React.useState>({}) const [isUpdatingComment, setIsUpdatingComment] = React.useState(null) + // 코드 순서로 정렬하는 함수 (1-1-1, 1-1-2, 1-2-1 순서) const sortByCode = (items: any[]) => { @@ -88,6 +89,7 @@ export function PQReviewWrapper({ }) } + // 기존 SHI 코멘트를 로컬 상태에 초기화 React.useEffect(() => { const initialComments: Record = {} @@ -369,25 +371,27 @@ export function PQReviewWrapper({
-
- - {item.code} - {item.checkPoint} - - - - {item.description && ( - - {item.description} - - )} - {item.remarks && ( -
-

Remark:

-

- {item.remarks} -

+
+
+
+ + {item.code} - {item.checkPoint} + + {item.description && ( + + {item.description} + + )} + {item.remarks && ( +
+

Remark:

+

+ {item.remarks} +

+
+ )}
- )} +
{/* 항목 상태 표시 */} {!!item.answer || item.attachments.length > 0 ? ( @@ -606,26 +610,27 @@ export function PQReviewWrapper({ ))} {/* 검토 버튼 */} - {canReview && (
- {/* */} - -
- )} + {/* 승인 확인 다이얼로그 */} -- cgit v1.2.3