diff options
Diffstat (limited to 'lib/basic-contract/viewer')
| -rw-r--r-- | lib/basic-contract/viewer/basic-contract-sign-viewer.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx b/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx index 54e9c18c..6bf0dfb1 100644 --- a/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx +++ b/lib/basic-contract/viewer/basic-contract-sign-viewer.tsx @@ -745,6 +745,7 @@ export function BasicContractSignViewer({ const isComplianceTemplate = mode === 'buyer' ? false : templateName.includes('준법'); const isNDATemplate = mode === 'buyer' ? false : (templateName.includes('비밀유지') || templateName.includes('NDA')); const isGTCTemplate = mode === 'buyer' ? false : templateName.includes('GTC'); + const hasNegotiationTab = mode === 'buyer' ? false : (isGTCTemplate || isComplianceTemplate); const allFiles: FileInfo[] = React.useMemo(() => { const files: FileInfo[] = []; @@ -780,7 +781,7 @@ export function BasicContractSignViewer({ }); } - if (isGTCTemplate) { + if (hasNegotiationTab) { files.push({ path: "", name: "협의 코멘트", @@ -789,7 +790,7 @@ export function BasicContractSignViewer({ } return files; - }, [filePath, additionalFiles, templateName, isComplianceTemplate, isGTCTemplate, mode]); + }, [filePath, additionalFiles, templateName, isComplianceTemplate, hasNegotiationTab, mode]); const cleanupHtmlStyle = () => { const elements = document.querySelectorAll('.Document_container'); @@ -982,7 +983,7 @@ export function BasicContractSignViewer({ if (!isWidgetSignature) { if (annot.Subject === 'Signature') { // 지정된 서명란 외 서명 → 즉시 삭제 - annotationManager.deleteAnnotation(annot, false); + annotationManager.deleteAnnotation(annot, { imported: false }); } continue; } @@ -994,7 +995,7 @@ export function BasicContractSignViewer({ if (name && allowed.length > 0 && !allowed.includes(name)) { // 우리가 만든 서명 필드가 아니면 막기 - annotationManager.deleteAnnotation(annot, false); + annotationManager.deleteAnnotation(annot, { imported: false }); continue; } @@ -1285,7 +1286,7 @@ export function BasicContractSignViewer({ return; } - if (isGTCTemplate && gtcCommentStatus.hasComments && !gtcCommentStatus.isComplete) { + if (hasNegotiationTab && gtcCommentStatus.hasComments && !gtcCommentStatus.isComplete) { toast({ title: "미해결 코멘트가 있어 서명할 수 없습니다.", description: "모든 코멘트를 삭제하거나 협의를 완료한 후 서명해주세요.", @@ -1555,7 +1556,7 @@ export function BasicContractSignViewer({ {mode !== 'buyer' && isComplianceTemplate && ( <span className="block mt-1 text-amber-600">📋 준법 설문조사를 먼저 완료해주세요.</span> )} - {mode !== 'buyer' && isGTCTemplate && ( + {mode !== 'buyer' && hasNegotiationTab && ( <span className="block mt-1 text-blue-600">📋 협의 코멘트를 확인하고 모든 협의가 완료되었는지 확인해주세요.</span> )} {hasSignatureFields && !isAutoSignProcessing && ( @@ -1568,12 +1569,12 @@ export function BasicContractSignViewer({ ✅ {mode === 'buyer' ? '승인이' : '서명이'} 완료되었습니다. </span> )} - {mode !== 'buyer' && isGTCTemplate && gtcCommentStatus.hasComments && !gtcCommentStatus.isComplete && ( + {mode !== 'buyer' && hasNegotiationTab && gtcCommentStatus.hasComments && !gtcCommentStatus.isComplete && ( <span className="block mt-1 text-red-600"> ⚠️ {gtcCommentStatus.commentCount}개의 미해결 코멘트가 있어 서명할 수 없습니다. </span> )} - {mode !== 'buyer' && isGTCTemplate && gtcCommentStatus.hasComments && gtcCommentStatus.isComplete && ( + {mode !== 'buyer' && hasNegotiationTab && gtcCommentStatus.hasComments && gtcCommentStatus.isComplete && ( <span className="block mt-1 text-green-600"> ✅ 협의가 완료되어 서명 가능합니다. </span> |
