Skip to content

Commit

Permalink
Merge pull request #45337 from Expensify/beaman-onlyShowUnapproveOnAp…
Browse files Browse the repository at this point in the history
…provedReports

Only show "unapprove" button on reports in Approved state / status (not paid yet)
  • Loading branch information
aldo-expensify authored Jul 15, 2024
2 parents b3e9c07 + 5d191ec commit 5437054
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
const shouldShowDeleteButton = shouldShowTaskDeleteButton || canDeleteRequest;

const canUnapproveRequest =
ReportUtils.isExpenseReport(report) &&
(ReportUtils.isReportManager(report) || isPolicyAdmin) &&
(ReportUtils.isReportApproved(report) || ReportUtils.isReportManuallyReimbursed(report));
ReportUtils.isExpenseReport(report) && (ReportUtils.isReportManager(report) || isPolicyAdmin) && ReportUtils.isReportApproved(report) && !PolicyUtils.isSubmitAndClose(policy);

useEffect(() => {
if (canDeleteRequest) {
Expand Down

0 comments on commit 5437054

Please sign in to comment.