From bf5f458c5af779d5e0e71db8613bab36c80efc54 Mon Sep 17 00:00:00 2001 From: Alex Beaman Date: Mon, 24 Jun 2024 15:09:21 +0300 Subject: [PATCH] Merge pull request #44243 from software-mansion-labs/rdfix/scanning-hold [Deploy Blocker Fix] Scan - "Unhold" option appears in report details page of scanning expense (cherry picked from commit 0ddf880e9f21e691b9b943bb21451d322412dd9a) --- src/pages/ReportDetailsPage.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/ReportDetailsPage.tsx b/src/pages/ReportDetailsPage.tsx index f693c10c69f1..ca28cae3dfff 100644 --- a/src/pages/ReportDetailsPage.tsx +++ b/src/pages/ReportDetailsPage.tsx @@ -441,11 +441,9 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD ? ReportActionsUtils.getOriginalMessage(requestParentReportAction)?.IOUTransactionID ?? '' : ''; - const isSettled = ReportUtils.isSettled(moneyRequestReport?.reportID); - const isApproved = ReportUtils.isReportApproved(moneyRequestReport); - - const shouldShowHoldAction = caseID !== CASES.MONEY_REPORT && !isSettled && !isApproved && !isDeletedParentAction && !ReportUtils.isArchivedRoom(parentReport); const canHoldUnholdReportAction = ReportUtils.canHoldUnholdReportAction(parentReportAction); + const shouldShowHoldAction = + caseID !== CASES.MONEY_REPORT && (canHoldUnholdReportAction.canHoldRequest || canHoldUnholdReportAction.canUnholdRequest) && !ReportUtils.isArchivedRoom(parentReport); const canJoin = !isExpenseReport && ReportUtils.canJoinChat(report, parentReportAction, policy);