-
Notifications
You must be signed in to change notification settings - Fork 3k
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 the optimistic GBR for chats with money requests #38675
Conversation
# Conflicts: # src/libs/ReportUtils.ts
@mountiny I'm trying to fix the optimistic GBR calculation for different flows as it's been broken recently. Could you please check the Test section and maybe add some flows that I missed? |
In general this looks good to me, you could have more tests for once the Draft report is submitted, then approved and paid for example. Then when bank account is missing and needs to be added in order for the employee to be reimbursed. There has been some unit tests for parts of it I believe |
@paultsimura one comment for the test2 Are you disabling the delayed submission from newDot or oldDot? We are in middle of migrating to Instant submit so in Newdot, actually having the Delayed submission off should mean new report is created in Submitted/ Processing state in which case there would be no GBR. Can you confirm if the autoReportingFrequency is set to Instant for you when you toggle the delayed submission off? |
Cool ok I think we can handle that edge case later as we are in better spot with the scheduled submit instant |
Please reassign as I am going on vacation |
I am available to review this as C+. |
@paultsimura can you please resolve the conflicts? Thank you! |
# Conflicts: # src/libs/ReportUtils.ts
Done, all yours @akinwale ✔️ |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeMacOS: Chrome / Safariweb-38675-1.mp4web-38675-2.mp4web-38675-3.mp438675-desktop-web.mp4MacOS: Desktop38675-desktop-web.mp4 |
@paultsimura There's an issue with steps 5 through 7 in Test 4. The GBR does not display for user A when offline (starts from around the 0:59 mark in the video). Screen.Recording.2024-04-03.at.07.33.12.mp4 |
This is because your requests are in USD while the IOU Report is in NGN. Unfortunately, we do not do the currency conversion and calculation offline. Please try performing the same test in NGN only: Screen.Recording.2024-04-03.at.09.15.4309.16.mp4 |
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 reverts commit 365429d.
# Conflicts: # src/libs/actions/IOU.ts
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.
🟢 @paultsimura thank you so much for your work
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.61-0 🚀
|
🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.61-0 🚀
|
|
||
const policy = getPolicy(iouReport.policyID); | ||
const shouldBeManuallySubmitted = PolicyUtils.isPaidGroupPolicy(policy) && !policy?.harvesting?.enabled; | ||
if (shouldBeManuallySubmitted || PolicyUtils.isPolicyAdmin(policy)) { |
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 line is causing problems whenever I am trying to edit anything from Admin side. The collect policy has scheduled submit on.
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.61-8 🚀
|
Details
This PR fixes the optimistic GBR calculation for the chats that have a money request that requires attention.
Fixed Issues
$ #38425
PROPOSAL: #38425 (comment)
Tests
Same as QA
Offline tests
Same as QA
QA Steps
Test 1:
Test 2:
Pre-requisites:
Test 3:
Pre-requisites:
Test 4:
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.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 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
Android16.27.mp4
Android: mWeb Chrome
chrome16.30.mp4
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-16.at.16.25.5416.26.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-16.at.16.33.1916.33.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-03-20.at.15.40.0015.42.mp4
Screen.Recording.2024-03-20.at.16.01.2516.02.mp4
Screen.Recording.2024-03-16.at.16.15.3616.16.mp4
MacOS: Desktop
Screen.Recording.2024-03-16.at.16.17.4516.18.mp4