Skip to content

Commit

Permalink
fix: use existed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Sep 12, 2024
1 parent b889777 commit e473f35
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
report.stateNum !== CONST.REPORT.STATE_NUM.APPROVED &&
!ReportUtils.isClosedReport(report) &&
canModifyTask;
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
const canDeleteRequest = (isActionOwner || isAdmin) && (ReportUtils.canDeleteTransaction(moneyRequestReport) || isSelfDMTrackExpenseReport) && !isDeletedParentAction;
const canDeleteRequest = (isActionOwner || isPolicyAdmin) && (ReportUtils.canDeleteTransaction(moneyRequestReport) || isSelfDMTrackExpenseReport) && !isDeletedParentAction;
const shouldShowDeleteButton = shouldShowTaskDeleteButton || canDeleteRequest;

const canUnapproveRequest =
Expand Down

0 comments on commit e473f35

Please sign in to comment.