From 09ad6ec1cd25512770ae627923a88585db5c26b4 Mon Sep 17 00:00:00 2001 From: mkhutornyi Date: Wed, 7 Feb 2024 15:08:03 +0100 Subject: [PATCH] disable downloading EReceipt --- src/components/AttachmentModal.tsx | 2 +- src/components/ReportActionItem/ReportActionItemImage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AttachmentModal.tsx b/src/components/AttachmentModal.tsx index 78ef72ac3536..ab39e5379230 100755 --- a/src/components/AttachmentModal.tsx +++ b/src/components/AttachmentModal.tsx @@ -436,7 +436,7 @@ function AttachmentModal({ }, }); } - if (!isOffline) { + if (!isOffline && allowDownload) { menuItems.push({ icon: Expensicons.Download, text: translate('common.download'), diff --git a/src/components/ReportActionItem/ReportActionItemImage.tsx b/src/components/ReportActionItem/ReportActionItemImage.tsx index 04a99e00c6bf..19727f4a5f5f 100644 --- a/src/components/ReportActionItem/ReportActionItemImage.tsx +++ b/src/components/ReportActionItem/ReportActionItemImage.tsx @@ -89,7 +89,7 @@ function ReportActionItemImage({thumbnail, image, enablePreviewModal = false, tr report={report} isReceiptAttachment canEditReceipt={canEditReceipt} - allowDownload + allowDownload={!isEReceipt} originalFileName={filename} > {({show}) => (