-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Expense - Approve button appears when "Add approvals" is disabled on Submit and Close policy #45846
Comments
Triggered auto assignment to @OfstadC ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?We show approve button when App/src/components/SettlementButton.tsx Lines 187 to 188 in f3a8f73
shouldHidePaymentOptions is true when shouldShowPayButton is false
shouldShowPayButton is false when canIOUBePaid is false
canIOUBePaid is false when shouldBeApproved (or canApproveIOU ) is true among other conditionsLines 6441 to 6444 in f3a8f73
canApproveIOU should be false for submit and close policiesLines 6383 to 6386 in f3a8f73
but this checks for isOnInstantSubmitPolicy as well and this returns false and it falls to later conditions and returns true .The isOnInstantSubmitPolicy check is for submitters and should be irrelevant to checking canApproveIOU .isSubmitAndClose checks for the optional approval hereLine 370 in f3a8f73
so that check alone should be here. What changes do you think we should make in order to solve the problem?Remove the Lines 6383 to 6385 in f3a8f73
What alternative solutions did you explore? (Optional) |
Looks like this is the same as #39171 |
Going to close since this is a duplicate |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when validating #45568
Version Number: 9.0.10-2
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:
Action Performed:
Precondition:
Expected Result:
Since "Add approvals" is disabled, Approve button should not show up for Admin.
Actual Result:
Approve button shows up for Admin when "Add approvals" is disabled.
Error shows up when trying to approve the report.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6548154_1721487331308.20240720_225009.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: