Skip to content

Commit

Permalink
Merge pull request #19433 from Pujan92/fix/19340
Browse files Browse the repository at this point in the history
  • Loading branch information
mountiny authored May 24, 2023
2 parents 6c5694a + acafb9a commit 98fd99a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/MoneyRequestHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ const MoneyRequestHeader = (props) => {
? ReportUtils.getWorkspaceAvatar(moneyRequestReport)
: ReportUtils.getAvatar(lodashGet(props.personalDetails, [moneyRequestReport.managerEmail, 'avatar']), moneyRequestReport.managerEmail);
const policy = props.policies[`${ONYXKEYS.COLLECTION.POLICY}${props.report.policyID}`];
const isPayer = Policy.isAdminOfFreePolicy([policy]) || (ReportUtils.isMoneyRequestReport(props.report) && lodashGet(props.session, 'email', null) === props.report.managerEmail);
const isPayer =
Policy.isAdminOfFreePolicy([policy]) || (ReportUtils.isMoneyRequestReport(moneyRequestReport) && lodashGet(props.session, 'email', null) === moneyRequestReport.managerEmail);
const shouldShowSettlementButton = !isSettled && !props.isSingleTransactionView && isPayer;
const bankAccountRoute = ReportUtils.getBankAccountRoute(props.chatReport);
return (
<View style={[{backgroundColor: themeColors.highlightBG}, styles.pl0]}>
<HeaderWithCloseButton
shouldShowAvatarWithDisplay
shouldShowThreeDotsButton={!isSettled && props.isSingleTransactionView}
shouldShowThreeDotsButton={!isPayer && !isSettled && props.isSingleTransactionView}
threeDotsMenuItems={[
{
icon: Expensicons.Trashcan,
Expand Down

0 comments on commit 98fd99a

Please sign in to comment.