fix(07-04): hide Download anchor in PdfViewer for Signed documents (LEGAL-03)
- Wrap Download anchor in conditional: only rendered when docStatus !== 'Signed' - PDF viewer still loads original via /file for in-browser display regardless of status - PreparePanel presigned URL remains sole download path for signed PDFs
This commit is contained in:
@@ -25,7 +25,7 @@ export function PdfViewer({ docId, docStatus }: { docId: string; docStatus?: str
|
||||
const [scale, setScale] = useState(1.0);
|
||||
const [pageInfo, setPageInfo] = useState<PageInfo | null>(null);
|
||||
|
||||
const readOnly = docStatus === 'Sent' || docStatus === 'Signed';
|
||||
const readOnly = docStatus !== 'Draft';
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-4">
|
||||
@@ -57,6 +57,7 @@ export function PdfViewer({ docId, docStatus }: { docId: string; docStatus?: str
|
||||
>
|
||||
Zoom Out
|
||||
</button>
|
||||
{docStatus !== 'Signed' && (
|
||||
<a
|
||||
href={`/api/documents/${docId}/file`}
|
||||
download
|
||||
@@ -64,6 +65,7 @@ export function PdfViewer({ docId, docStatus }: { docId: string; docStatus?: str
|
||||
>
|
||||
Download
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* PDF canvas wrapped in FieldPlacer for drag-and-drop field placement */}
|
||||
|
||||
Reference in New Issue
Block a user