-
Notifications
You must be signed in to change notification settings - Fork 3.9k
[CP Staging] Revert "fix: Submit button is not displayed in second report to Approver" #79665
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -216,7 +216,7 @@ function isSubmitAction({ | |
|
|
||
| const isReportSubmitter = isCurrentUserSubmitter(report); | ||
| const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN; | ||
| const isManager = getSubmitToAccountID(policy, report) === currentUserAccountID || report.managerID === currentUserAccountID; | ||
| const isManager = report.managerID === getCurrentUserAccountID(); | ||
| if (!isReportSubmitter && !isAdmin && !isManager) { | ||
|
Comment on lines
217
to
220
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The secondary action flow now treats only Useful? React with 👍 / 👎. |
||
| return false; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By limiting
isManagertoreport.managerID,canSubmitno longer recognizes the policy-derived approver (getSubmitToAccountID) when that value differs from the report’s storedmanagerID(e.g., rule-based approvers or reports whose managerID hasn’t been updated yet while still open). In those cases the actual approver won’t pass the manager check and the report preview won’t show the Submit action, which matches the missing submit button regression thatgetSubmitToAccountIDwas previously covering.Useful? React with 👍 / 👎.