-
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
Show expense report in LHN if user doesn't have access to parent policyChat (removed manager condition) #49557
Show expense report in LHN if user doesn't have access to parent policyChat (removed manager condition) #49557
Conversation
@jjcoffee - this PR is ready for review - it's only a slight modification to previous PRs so I haven't thoroughly tested 😬 but I do plan to test on Monday 🙏 |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-app-2024-09-23_15.50.17.mp4Android: mWeb Chromeandroid-chrome-2024-09-23_15.59.38.mp4iOS: Nativeios-app-2024-09-23_16.17.25.mp4iOS: mWeb Safariios-safari-2024-09-23_16.21.26.mp4MacOS: Chrome / Safaridesktop-chrome-2024-09-23_14.59.44.mp4MacOS: Desktopdesktop-app-2024-09-23_15.32.29.mp4 |
@Beamanator It seems like the expense report disappears from the LHN if I don't keep it open (as approver 1) when switching the (Another thing is if I do keep the expense open, the GBR only appears if I refresh (or cycle to another report and use the back button to navigate back). desktop-app-2024-09-23_15.22.55.mp4 |
@jjcoffee ooh yes those are very good points - at this exact moment we are still pending those backend changes, so as long as the front end works great i think we're good to go with this PR 🙏 |
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, pending some BE changes.
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, @Beamanator will let you merge at your discretion since we're missing those BE changes.
Thanks gents! I'll handle the backend changes in the issue! 👍 |
✋ 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/Beamanator in version: 9.0.41-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.41-10 🚀
|
function isExpenseReportManagerWithoutParentAccess(report: OnyxEntry<Report>) { | ||
return isExpenseReport(report) && report?.hasParentAccess === false && report?.managerID === currentUserAccountID; | ||
function isExpenseReportWithoutParentAccess(report: OnyxEntry<Report>) { | ||
return isExpenseReport(report) && report?.hasParentAccess === false; |
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.
This check function and its usage led to the following issue:
which we fixed by removing the isExpenseReportWithoutParentAccess
check after this discussion.
Details
This is a follow-up to #48661, where I'm realizing we don't even care if the user is the report manager -> If the user doesn't have access to the expense report's parent report, we want to show this report in the LHN so the user always has access somehow
Fixed Issues
$ #49318
$ https://github.com/Expensify/Expensify/issues/422963
Tests
p = Policy.getCurrent(); p.policy.isPolicyExpenseChatEnabled = "true"; p.save();
submitsTo
is set to Approver 1. Approver 1 and Approver 2 should NOT have aforwardsTo
set.submitsTo
to Approver 2Approve
button in the report headerApprove
, make sure it works w/out errorsOffline tests
N/A - the above steps require internet
QA Steps
Same as above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop