App: [$500] Approve button not displayed by default in the dropdown

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.54-0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4433593 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:

  1. As an employee submit an expense report to workspace chat
  2. Log in as the Admin of the workspace
  3. Navigate to the workspace chat of the employee who submitted the report
  4. Observe the button in the report preview

Expected Result:

Approve should be appearing by default in the button which has dropdown

Actual Result:

Pay Elsewhere is displayed by default, user needs to click on drop down menu and then select Approve.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/43996225/d39eb4fa-cca6-4d53-88c1-0bb57207fccd

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0167219d0cf776ee3b
  • Upwork Job ID: 1770252974466375680
  • Last Price Increase: 2024-03-20
Issue OwnerCurrent Issue Owner: @mallenexpensify

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Comments: 42 (29 by maintainers)

Most upvoted comments

I’m not sure I’m following, sorry. If you’re asking how to find these settings in NewDot:

  1. Create a workspace (it now creates a collect workspace out the gate)
  2. Go to the workspace settings (Avatar > Workspaces > click the workspace)
  3. Click the “more features” page in the LHN > enable Workflows
  4. Observe “Add approvals” and “Make or track payments” are disabled by default.

I’m unsure about closing. The problem I’m running into is that is that I can’t find what the below default settings are.

Approvals = enabled or disabled Make or track payments = enabled or disabled

I logged into my test account and tried to find the above in NewDot and OldDot for my collect workspace. I couldn’t find either.

Coming from here in QA

Collect policy created in OldDot and all the settings in NewDot were default one. I guess the bug was reported before these features enabled in newdot

Approvals = enabled or disabled Make or track payments = enabled or disabled

Approver and Payer are same person.

From this thread in #expensify-open-source

If the setup is: Approvals = enabled Make or track payments = disabled Then they’d only see an Approve button.

and

If they have approvals and payments enabled, and the same person is set at the approver and payer, then the default state of the split button would be for Pay and not Approve.

Checking on in #qa again to confirm what the testers setup is.

Confirming in thread cuz I’m not 100% sure.

Just confirming we always want to show Approve first irrespective of the preferred payment options?

@Manan Jadhav asked the above. I believe this is :yes: but I’m not certain. If it is not , can drop a comment here or on the GH. Thx

Thanks @GandalfGwaihir. I did go through the slack conversation, getting an explicit confirmation here.

We can discuss the proposals once @mallenexpensify can get clarification on what’s the expected order of these buttons

Proposal

Please re-state the problem that we are trying to solve in this issue.

Pay Elsewhere is displayed by default, user needs to click on drop down menu and then select Approve.

What is the root cause of that problem?

We’re pushing approve button at the end of the list

https://github.com/Expensify/App/blob/71e3aa4eb3be90eeadd27260dfb87a3ff67185be/src/components/SettlementButton.tsx#L189-L191

What changes do you think we should make in order to solve the problem?

We should add approveButtonOption to the beginning of buttonOptions

 if (shouldShowApproveButton) {
            buttonOptions.unshift(approveButtonOption);
        }

What alternative solutions did you explore? (Optional)

NA

Result

https://github.com/Expensify/App/assets/113963320/c461ebe3-9643-4e72-aa10-230e842ee2eb