Skip to content
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

[HOLD #305057] [Track Tax] Tax rate/amount page is still accessible when it is disabled #37414

Closed
6 tasks done
izarutskaya opened this issue Feb 28, 2024 · 11 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Monthly KSv2

Comments

@izarutskaya
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Found when executing PR : #36784

Version Number: v1.4.44-7
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal Team

Action Performed:

Precondition:

  • User is an employee of Collect workspace.
  • The Collect workspace has tax enabled.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Click + > Request money > Manual.
  4. Enter amount > Next.
  5. Click Show more.
  6. Click Tax rate or Tax amount.
  7. As admin, disable tax.

Expected Result:

Tax page will change to not here page.

Actual Result:

Tax page is still accessible instead of showing not here page.

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

Bug6395215_1709110610725.20240228_133232.mp4

View all open jobs on GitHub

@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 28, 2024
Copy link

melvin-bot bot commented Feb 28, 2024

Triggered auto assignment to @stephanieelliott (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@izarutskaya
Copy link
Author

@stephanieelliott I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@izarutskaya
Copy link
Author

We think that this bug might be related to #wave6-collect-submitters
CC @greg-schroeder

@apeyada
Copy link
Contributor

apeyada commented Feb 28, 2024

Proposal

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

Tax - Tax rate/amount page is still accessible when it is disabled

What is the root cause of that problem?

There's no logic to show not found page on IOURequestStepTaxRatePage, IOURequestStepTaxAmountPage when isTaxTrackingEnabled = false

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

wrap with FullPageNotFoundView on those components with shouldShow prop (using similar condition as below line)

// A flag for showing tax rate
const shouldShowTax = isPolicyExpenseChat && policy && lodashGet(policy, 'tax.trackingEnabled', policy.isTaxTrackingEnabled);

What alternative solutions did you explore? (Optional)

If that condition isn't met, early return <NotFoundPage />

Copy link

melvin-bot bot commented Feb 28, 2024

📣 @apeyada! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Copy link

melvin-bot bot commented Feb 28, 2024

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@ShridharGoel
Copy link
Contributor

Proposal

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

Tax page is still accessible after tax tracking is disabled.

What is the root cause of that problem?

IOURequestStepTaxRatePage doesn't have any check which can ensure that it changes based on the latest tax enabled/disabled info.

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

Use isTaxTrackingEnabled info and navigate back if the tax tracking switches to false state.

useEffect(() => {
        if (!isTaxTrackingEnabled) {
            navigateBack();
        }
    }, [isTaxTrackingEnabled]);

@neonbhai
Copy link
Contributor

neonbhai commented Feb 28, 2024

Proposal

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

Tax rate/amount page is still accessible when it is disabled

What is the root cause of that problem?

We don't have logic to show notFound page when TaxTracking is disabled

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

We shoud pass policy.isTaxTrackingEnabled to shouldShowNotFoundPage prop for ScreenWrapper here:

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
shouldEnableMaxHeight
testID={IOURequestStepTaxRatePage.displayName}
>

and here:

<ScreenWrapper
includeSafeAreaPaddingBottom={false}
shouldEnableKeyboardAvoidingView={false}
testID={IOURequestStepTaxAmountPage.displayName}
>

shouldShowNotFoundPage={policy.isTaxTrackingEnabled}

@MonilBhavsar
Copy link
Contributor

Feature is WIP, so we can put this HOLD until we finish the implementation as it is being rolled out in phases https://github.com/Expensify/Expensify/issues/305057

@melvin-bot melvin-bot bot added the Overdue label Mar 1, 2024
@melvin-bot melvin-bot bot removed the Overdue label Mar 4, 2024
@stephanieelliott stephanieelliott changed the title Tax - Tax rate/amount page is still accessible when it is disabled [HOLD #305057] Tax - Tax rate/amount page is still accessible when it is disabled Mar 4, 2024
@stephanieelliott stephanieelliott removed the Daily KSv2 label Mar 4, 2024
@ShridharGoel
Copy link
Contributor

@MonilBhavsar Should we look at this now?

@trjExpensify trjExpensify changed the title [HOLD #305057] Tax - Tax rate/amount page is still accessible when it is disabled [HOLD #305057] [Track Tax] Tax rate/amount page is still accessible when it is disabled Apr 4, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 4, 2024
@stephanieelliott
Copy link
Contributor

This is not reproducible anymore -- when tax is disabled from the workspace, the field disappears from the in-progress request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Monthly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants