From b2042c5735b33a34da37d028736e19258b80a460 Mon Sep 17 00:00:00 2001 From: Jasper Huang Date: Thu, 12 Oct 2023 20:40:24 -0700 Subject: [PATCH] Merge pull request #29524 from ishpaul777/fix/Confirm-Modal-for-large-attachements fixes: invalid file modal and delete option shown for setted IOU (cherry picked from commit 5b35a3cd28511dad5a0cbcebd366aa7c783a11ed) --- src/components/AttachmentModal.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js index b8bfb4c36122..61b138747950 100755 --- a/src/components/AttachmentModal.js +++ b/src/components/AttachmentModal.js @@ -376,7 +376,7 @@ function AttachmentModal(props) { text: props.translate('common.download'), onSelected: () => downloadAttachment(source), }); - if (TransactionUtils.hasReceipt(props.transaction) && !TransactionUtils.isReceiptBeingScanned(props.transaction)) { + if (TransactionUtils.hasReceipt(props.transaction) && !TransactionUtils.isReceiptBeingScanned(props.transaction) && !isSettled) { menuItems.push({ icon: Expensicons.Trashcan, text: props.translate('receipt.deleteReceipt'), @@ -469,7 +469,7 @@ function AttachmentModal(props) { )} )} - {isAttachmentReceipt ? ( + {isAttachmentReceipt && ( - ) : ( - )} + {!isAttachmentReceipt && ( + + )} {props.children && props.children({