-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix: Hide invoice menu if the user can't send an invoice or has an invoice report #54945
Conversation
…'t create invoice
@@ -21,7 +21,7 @@ import useSingleExecution from '@hooks/useSingleExecution'; | |||
import useThemeStyles from '@hooks/useThemeStyles'; | |||
import * as SearchActions from '@libs/actions/Search'; | |||
import Navigation from '@libs/Navigation/Navigation'; | |||
import {getAllTaxRates, hasWorkspaceWithInvoices} from '@libs/PolicyUtils'; |
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.
hasWorkspaceWithInvoices
is now unused. Let's remove that function definition
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.
I have removed the function definition 🙏.
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2025-01-10.at.00.56.45.movMacOS: Desktop |
@luacmartins do you think we should handle the navigation case when user B is demoted from Admin to Member? Screen.Recording.2025-01-10.at.00.58.48.mov |
@etCoderDysto can you plz look into above^ issue |
@Pujan92 I have tried to reproduce the issue, and it is also reproducible on staging when you remove a member from a workspace.
I can put up a follow up PR if needed as this is already reproducible on staging and probably on production too. |
Maybe navigating to the other existing page is a different issue and needs to be solved in other PR, better to clarify with @luacmartins once. |
Not sure if we need to address that since it's a pretty small edge case. Either way, I think we can do that in a follow up if needed. |
Ok, Thanks @luacmartins |
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.
LGTM!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.84-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.84-7 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.84-7 🚀
|
Explanation of Change
If Invoice feature is enabled in a workspace, hide Invoices menu in Reports page if a user is only a member of a workspace and have no invoice report.
Fixed Issues
$ #54562
PROPOSAL: #54562 (comment)
Tests
Same as QA steps
Offline tests
Same as QA steps
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Test 1
Precondition: Sign in with two new accounts in separate devices
invoices yet"
Test 2
Precondition: Sign in with two new accounts in separate devices
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android.10.in.the.morning.mp4
Android: mWeb Chrome
Android.chrome.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.safari.mp4
MacOS: Chrome / Safari
Web.Screen.Recording.2025-01-07.at.9.33.53.in.the.morning.mp4
MacOS: Desktop
Destop.Screen.Recording.2025-01-07.at.9.42.48.in.the.morning.mp4