From d8dca5014c4e56fdab8840aa0777220f6de11804 Mon Sep 17 00:00:00 2001 From: Pujan Date: Tue, 23 May 2023 13:53:52 +0530 Subject: [PATCH 1/2] hide threeDotsMenu for the payer --- src/components/MoneyRequestHeader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyRequestHeader.js b/src/components/MoneyRequestHeader.js index 3f8a074e0bbb..6955ba74d66c 100644 --- a/src/components/MoneyRequestHeader.js +++ b/src/components/MoneyRequestHeader.js @@ -84,13 +84,13 @@ 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; return ( Date: Tue, 23 May 2023 14:46:15 +0530 Subject: [PATCH 2/2] lint fix --- src/components/MoneyRequestHeader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/MoneyRequestHeader.js b/src/components/MoneyRequestHeader.js index 6955ba74d66c..9717905e76b5 100644 --- a/src/components/MoneyRequestHeader.js +++ b/src/components/MoneyRequestHeader.js @@ -84,7 +84,8 @@ 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(moneyRequestReport) && lodashGet(props.session, 'email', null) === moneyRequestReport.managerEmail); + const isPayer = + Policy.isAdminOfFreePolicy([policy]) || (ReportUtils.isMoneyRequestReport(moneyRequestReport) && lodashGet(props.session, 'email', null) === moneyRequestReport.managerEmail); const shouldShowSettlementButton = !isSettled && !props.isSingleTransactionView && isPayer; return (