-
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
[Unapprove] Add unapprove feature to approved reports #44229
Conversation
@jayeshmangwani Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
src/pages/ReportDetailsPage.tsx
Outdated
@@ -217,6 +223,13 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD | |||
Report.leaveGroupChat(report.reportID); | |||
}, [isChatRoom, isPolicyEmployee, isPolicyExpenseChat, report.reportID, report.visibility]); | |||
|
|||
const unapproveExpenseReportOrShowModal = useCallback(() => { | |||
// TODO: show modal if report is exported to accounting |
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.
someone else is working on it. i will integrate whenever it's ready - https://expensify.slack.com/archives/C06ML6X0W9L/p1718955793112739?thread_ts=1718663737.743339&cid=C06ML6X0W9L
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.
First review looking pretty good! I'll do a more detailed review once the backend PR is up, hopefully end of this week 🙏
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid.movAndroid: mWeb ChromemWeb-chrome.moviOS: NativeiOS.moviOS: mWeb SafarimWeb-safari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@Beamanator We're encountering an inconsistency with the search page alternate text. When we are offline, it optimistically sets to |
@rushatgabhane I encountered a bug in a specific edge case. While offline, go to the report, approve it, and then unapprove it. Now, open the report details page and go online. Observe that first, we see the unapprove button, and then it disappears. Though it is an edge case, we can choose to ignore it in this PR. pretty-edge-case.mov |
That is how the network queue behaves right? It has a "replaying effect"
|
will require a backend fix. I think the correct text is |
Overall, the changes work well for me. One last thing: @Beamanator you added a note here that says, @rushatgabhane I'm unsure if we need to keep the ConfirmModal part in this PR or not |
yes that is the plan. We'll swap the logic whenever its ready |
Ok so looks like what we've got is:
|
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.
Left my thoughts above - LGTM & let's discuss the follow-ups in slack if needed!
This is a backend bug. Repro steps
Expected: unapproved $x |
@Beamanator agree but the modal is being used. It'll popup if we unapprove a report where its policy is connected to accounting. It's a good enough assumption which oldDot also has. please correct me if im wrong |
@rushatgabhane aah so you're saying that we'll use |
correctt |
yalla i like it |
habibi |
✋ 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.5-0 🚀
|
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.0.5-2 🚀
|
I think that this is most likely the cause of this deploy blocker #44969 |
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
const canUnapproveRequest = | ||
ReportUtils.isMoneyRequestReport(moneyRequestReport) && | ||
(ReportUtils.isReportManager(moneyRequestReport) || isPolicyAdmin) && | ||
(ReportUtils.isReportApproved(moneyRequestReport) || ReportUtils.isReportManuallyReimbursed(moneyRequestReport)); |
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.
Details
Fixed Issues
$ #44066
PROPOSAL:
Tests
Connect to an accounting integration
Offline tests
QA Steps
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
Screen.Recording.2024-07-06.at.04.28.14.mov
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
Screen.Recording.2024-07-06.at.04.09.06.mov
MacOS: Chrome / Safari
With accounting
Screen.Recording.2024-07-06.at.03.53.57.mov
Without accounting
Screen.Recording.2024-07-06.at.03.51.53.mov
MacOS: Desktop
Screen.Recording.2024-07-06.at.04.26.37.mov