From cac5d5bbb66c656058725ffa62157e5470a09e9b Mon Sep 17 00:00:00 2001 From: Chandler Copeland Date: Sat, 21 Mar 2026 10:54:43 -0600 Subject: [PATCH] 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 --- .../[docId]/_components/PdfViewer.tsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/teressa-copeland-homes/src/app/portal/(protected)/documents/[docId]/_components/PdfViewer.tsx b/teressa-copeland-homes/src/app/portal/(protected)/documents/[docId]/_components/PdfViewer.tsx index b9604db..d47cd20 100644 --- a/teressa-copeland-homes/src/app/portal/(protected)/documents/[docId]/_components/PdfViewer.tsx +++ b/teressa-copeland-homes/src/app/portal/(protected)/documents/[docId]/_components/PdfViewer.tsx @@ -25,7 +25,7 @@ export function PdfViewer({ docId, docStatus }: { docId: string; docStatus?: str const [scale, setScale] = useState(1.0); const [pageInfo, setPageInfo] = useState(null); - const readOnly = docStatus === 'Sent' || docStatus === 'Signed'; + const readOnly = docStatus !== 'Draft'; return (
@@ -57,13 +57,15 @@ export function PdfViewer({ docId, docStatus }: { docId: string; docStatus?: str > Zoom Out - - Download - + {docStatus !== 'Signed' && ( + + Download + + )}
{/* PDF canvas wrapped in FieldPlacer for drag-and-drop field placement */}