-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Categories - Employee has the option to edit categories when all the categories are disabled #48097
Comments
Triggered auto assignment to @stephanieelliott ( |
@stephanieelliott FYI 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 |
We think that this bug might be related to #wave-collect - Release 1 |
📣 @akshsekhr2702! 📣
|
Edited by proposal-police: This proposal was edited at 2024-08-27 14:56:45 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Categories - Employee has the option to edit categories when all the categories are disabled What is the root cause of that problem?We are not checking if the user can update category when we display empty state section here App/src/pages/iou/request/step/IOURequestStepCategory.tsx Lines 170 to 173 in 0fd1de0
What changes do you think we should make in order to solve the problem?We can check if the user is admin before displaying the empty section
and display not found page when it is not policy admin and no categories in the list
What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-08-27 15:01:22 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Category page turns to empty state page with Edit categories button for employee which leads to not here page What is the root cause of that problem?We always show the edit category button even the user is not an admin of the workspace
What changes do you think we should make in order to solve the problem?We can use
OPTIONAL: We can display another message like What alternative solutions did you explore? (Optional)If we want to display not found page in this case, we can add the condition to show not found page if
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Categories - Employee has the option to edit categories when all the categories are disabled What is the root cause of that problem?The
What changes do you think we should make in order to solve the problem?We can update the condition:
TO: const shouldShowNotFoundPage =
(isEditing && (isSplitBill ? !canEditSplitBill : !ReportActionsUtils.isMoneyRequestAction(reportAction) || !ReportUtils.canEditMoneyRequest(reportAction))) ||
(PolicyUtils.isPolicyAdmin(policy) && !OptionsListUtils.hasEnabledOptions(Object.values(policyCategories ?? {}))); What alternative solutions did you explore? (Optional)Result |
Updated proposal
|
Job added to Upwork: https://www.upwork.com/jobs/~01775966fb678bc1d8 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann ( |
Yea I agree this is not working as expected, there is a delay in hiding the categories once they are disabled. |
Thanks everyone, @FitseTLT and @Krishna2323 have the same idea of displaying the not found page. But I prefer to display an empty view as suggested by @nkdengineer. I think we can hide the "Edit category" or update the button text to something like "Got it",... (maybe this will need to be confirmed in the PR phase) Let's go with @nkdengineer's proposal 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@carlosmiceli I see the behavior on other pages is different. With the same step
Should we adjust all these pages to make it consistent |
@DylanDylann that's a good point, we should (I think). Let me get back on this. I think for now we should proceed fixing the issue as originally proposed, and we'll create another issue for standardizing those pages if we want. |
@DylanDylann I'm not being able to reproduce this for Tags for example, it continues to display the Tags until the user reloads the app. Could you show me a video of how you get to each empty screen for Tags and Reports? Thank you! |
@carlosmiceli Sorry for my delay. I test in the same admin account and using two chrome tab Screen.Recording.2024-09-04.at.16.51.44.movcc @nkdengineer Could you help to verify the output when login in the 2 account as in the OP with Tag and report field |
This PR should be merged with today's deploy 🎉 |
@stephanieelliott Please help process payment, thanks |
Oops, yes looks like the automation didn't work -- PR was deployed to prod with #48791 and should've been paid on 9/19. Setting up for payment now. |
Summarizing payment on this issue:
Upwork job is here: https://www.upwork.com/jobs/~01775966fb678bc1d8 |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.25-1
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/4895538
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
Category page will turn to not here page for employee after admin disables all the categories
Actual Result:
Category page turns to empty state page with Edit categories button for employee which leads to not here page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6584008_1724750744231.20240827_172136.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @DylanDylannThe text was updated successfully, but these errors were encountered: