Skip to content

Commit bf5f458

Browse files
BeamanatorOSBotify
authored andcommitted
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 0ddf880)
1 parent 731e7e8 commit bf5f458

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/pages/ReportDetailsPage.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,9 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
441441
? ReportActionsUtils.getOriginalMessage(requestParentReportAction)?.IOUTransactionID ?? ''
442442
: '';
443443

444-
const isSettled = ReportUtils.isSettled(moneyRequestReport?.reportID);
445-
const isApproved = ReportUtils.isReportApproved(moneyRequestReport);
446-
447-
const shouldShowHoldAction = caseID !== CASES.MONEY_REPORT && !isSettled && !isApproved && !isDeletedParentAction && !ReportUtils.isArchivedRoom(parentReport);
448444
const canHoldUnholdReportAction = ReportUtils.canHoldUnholdReportAction(parentReportAction);
445+
const shouldShowHoldAction =
446+
caseID !== CASES.MONEY_REPORT && (canHoldUnholdReportAction.canHoldRequest || canHoldUnholdReportAction.canUnholdRequest) && !ReportUtils.isArchivedRoom(parentReport);
449447

450448
const canJoin = !isExpenseReport && ReportUtils.canJoinChat(report, parentReportAction, policy);
451449

0 commit comments

Comments
 (0)