From 28b652801f19a2c6fb093c23c4c38acf870cae95 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Thu, 17 Oct 2024 12:46:21 +0300 Subject: [PATCH] Merge pull request #50987 from mkzie2/mkzie2-issue/50980 [CP Staging] fix: cannot edit receipt (cherry picked from commit e3e038766f56a1b88f2c424b74df47685d92b072) (CP triggered by Beamanator) --- src/libs/Navigation/types.ts | 4 ++-- src/pages/TransactionReceiptPage.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/Navigation/types.ts b/src/libs/Navigation/types.ts index ae1621f700d9..ca71ecb3d95d 100644 --- a/src/libs/Navigation/types.ts +++ b/src/libs/Navigation/types.ts @@ -1527,8 +1527,8 @@ type AuthScreensParamList = CentralPaneScreensParamList & [SCREENS.TRANSACTION_RECEIPT]: { reportID: string; transactionID: string; - readonly?: boolean; - isFromReviewDuplicates?: boolean; + readonly?: string; + isFromReviewDuplicates?: string; }; [SCREENS.CONNECTION_COMPLETE]: undefined; }; diff --git a/src/pages/TransactionReceiptPage.tsx b/src/pages/TransactionReceiptPage.tsx index c05d90a180e1..86f7c99b91bc 100644 --- a/src/pages/TransactionReceiptPage.tsx +++ b/src/pages/TransactionReceiptPage.tsx @@ -27,8 +27,8 @@ function TransactionReceipt({route}: TransactionReceiptProps) { const imageSource = tryResolveUrlFromApiRoot(receiptURIs.image ?? ''); const isLocalFile = receiptURIs.isLocalFile; - const readonly = route.params.readonly ?? false; - const isFromReviewDuplicates = route.params.isFromReviewDuplicates ?? false; + const readonly = route.params.readonly === 'true'; + const isFromReviewDuplicates = route.params.isFromReviewDuplicates === 'true'; const parentReportAction = ReportActionUtils.getReportAction(report?.parentReportID ?? '-1', report?.parentReportActionID ?? '-1'); const canEditReceipt = ReportUtils.canEditFieldOfMoneyRequest(parentReportAction, CONST.EDIT_REQUEST_FIELD.RECEIPT);