Skip to content

Commit 51699ed

Browse files
committed
removed option managerID
1 parent 6a46e32 commit 51699ed

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/libs/ReportPrimaryActionUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function isApproveAction(report: Report, reportTransactions: Transaction[], poli
9393
return false;
9494
}
9595
const isExpenseReport = isExpenseReportUtils(report);
96-
const isReportApprover = isApproverUtils(policy, currentUserAccountID, managerID);
96+
const isReportApprover = isApproverUtils(policy, currentUserAccountID) || managerID === currentUserAccountID;
9797
const isApprovalEnabled = policy?.approvalMode && policy.approvalMode !== CONST.POLICY.APPROVAL_MODE.OPTIONAL;
9898

9999
if (!isExpenseReport || !isReportApprover || !isApprovalEnabled || reportTransactions.length === 0) {

src/libs/actions/Policy/Member.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ Onyx.connect({
113113
});
114114

115115
/** Check if the passed employee is an approver in the policy's employeeList */
116-
function isApprover(policy: OnyxEntry<Policy>, employeeAccountID: number, managerID?: number) {
116+
function isApprover(policy: OnyxEntry<Policy>, employeeAccountID: number) {
117117
const employeeLogin = allPersonalDetails?.[employeeAccountID]?.login;
118-
if (policy?.approver === employeeLogin || managerID === employeeAccountID) {
118+
if (policy?.approver === employeeLogin) {
119119
return true;
120120
}
121121
return Object.values(policy?.employeeList ?? {}).some(

0 commit comments

Comments
 (0)