-
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
[CP Stag] Add GBR to pending wallet reports & update perview for 1:1 reports #30090
Conversation
@situchan @techievivek PR is up.! |
Also since there is jest failing, but the test case seems redundant, shall I remove the test case or update it? @techievivek |
@b4s36t4 I think that's a good test case. We can update it to be compatible for our change. |
Also, please watch #30079 and pull main after it's merged. |
Agree with @situchan let's update the test |
@b4s36t4 Yes, let's please update the tests as per new changes rather than getting rid of it. |
@situchan Can you please give this a review, I will also test this on my end. |
Sorry for confusion. Thought @techievivek's PR 😄 |
src/libs/ReportUtils.js
Outdated
// Show Paid preview message if it's settled or if the amount is paid & stuck at receivers end for only chat reports. | ||
if (isSettled(report.reportID) || (report.isWaitingOnBankAccount && !isPreviewMessageForParentChatReport)) { |
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.
@situchan @techievivek review this please. Updated to resolve issue with isSettled
function update.
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.
Would it not show as settled for the iou report now?
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.
That's a or condition so it would show paid for iou as well.
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.
That's what I am saying then how would it show system message in case of iou report if isWaitingOnBankAccount
is set on ioureport as isSettled(report.reportID)
would always return as true.
Kapture.2023-10-23.at.13.21.52.mp4
|
How about introducing new function called |
The issue here is that for DM chat report that contains the IOU preview we want to show the settled message in LHN even if there is |
@techievivek I dont necessarily think that is a problem (though I agree that the fact these two flows are inconsistent is not good, the wallet flow was added as second as the reimbursement flow already existed in the oldDot) I think we should mainly not be showing "paid this and this" when the money actually has not left their account yet, nothing will happen until the employee adds the bank account and in that case its fine there is no Pay action and the alternate text should more so talk about hte fact the user needs to add a bank account imho |
@Julesssss fixed. |
My primary concern is how some of our code, particularly on the frontend, tries to follow the same code for both flows. At the same time, in the backend, we have different commands handling this differently, resulting in inconsistencies. For e.g. in the case when the user needs to add a bank account or wallet. So we should either try to make it consistent or handle it distinctly. I think we can re-look into the code(both frontend and backend) and try to clean this up once the urgency has settled a bit. |
I agree |
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 with the latest changes, I'll leave final review to @mountiny
Elsewhere flow looks good. |
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.
Thanks!
@situchan let me know in slack once you finished, thanks! |
@b4s36t4 did you retest gold wallet flow on payer side? works fine on payee side. |
Yes, on payer side it will show GBR till user pays, it will hide after payment done.
|
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.
Approving as @b4s36t4 covered one test case I missed.
All other cases work well.
[CP Stag] Add GBR to pending wallet reports & update perview for 1:1 reports (cherry picked from commit a920460)
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 1.3.89-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.89-6 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.91-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.91-8 🚀
|
Details
This PR fixes the issue with not showing GBR for the report that require user action to complete create wallet and as well to show correct preview message for the 1:1 chat instead of showing system message.
Fixed Issues
$ #30037
PROPOSAL: #30037 (comment)
$ #30033
PROPOSAL: #30033 (comment)
Tests
paid
messageOffline tests
Same as above
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 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)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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.mp4
Android: mWeb Chrome
CHROME.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
safari.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4