From e81ed54691ef59c460d5aca70512cdcf1fb27bb2 Mon Sep 17 00:00:00 2001 From: mkzie2 Date: Thu, 17 Oct 2024 15:55:52 +0700 Subject: [PATCH] fix: cannot edit receipt --- 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);