Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP Staging] Show Unapprove button only for expense reports & not in transaction thread header if > 1 transaction #45049

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Look at current report, not parent
  • Loading branch information
Beamanator committed Jul 9, 2024
commit 9fafd6bc3059d74ba41ee8eef768b17b34b49a79
6 changes: 3 additions & 3 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,9 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
const shouldShowDeleteButton = shouldShowTaskDeleteButton || canDeleteRequest;

const canUnapproveRequest =
ReportUtils.isExpenseReport(moneyRequestReport) &&
(ReportUtils.isReportManager(moneyRequestReport) || isPolicyAdmin) &&
(ReportUtils.isReportApproved(moneyRequestReport) || ReportUtils.isReportManuallyReimbursed(moneyRequestReport));
ReportUtils.isExpenseReport(report) &&
(ReportUtils.isReportManager(report) || isPolicyAdmin) &&
(ReportUtils.isReportApproved(report) || ReportUtils.isReportManuallyReimbursed(report));

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