-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Fix - Distance Request Optimistic Data (26518) #26536
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6f5aa5f
updated amount, merchant, currency for distance request
jeet-dhandha 208c222
fix: checking of report id as sometimes its coming in number type
jeet-dhandha 78fcfcd
updated distant merchat to use IOU's set merchant function
jeet-dhandha dc7e128
update merchant
jeet-dhandha e4cdc49
add comment
jeet-dhandha 3712c95
Merge branch 'main' into fix-26518
jeet-dhandha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -264,7 +264,10 @@ function getLinkedTransaction(reportAction = {}) { | |
| } | ||
|
|
||
| function getAllReportTransactions(reportID) { | ||
| return _.filter(allTransactions, (transaction) => transaction.reportID === reportID); | ||
| // `reportID` from the `/CreateDistanceRequest` endpoint return's number instead of string for created `transaction`. | ||
| // For reference, https://github.com/Expensify/App/pull/26536#issuecomment-1703573277. | ||
| // We will update this in a follow-up Issue. According to this comment: https://github.com/Expensify/App/pull/26536#issuecomment-1703591019. | ||
| return _.filter(allTransactions, (transaction) => `${transaction.reportID}` === `${reportID}`); | ||
|
hayata-suenaga marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we still need this change ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can test it out and see. Hopefully it has been fixed. |
||
| } | ||
|
|
||
| /** | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 don't like this pattern though.
We should get the distance request merchant string and set the string in IOU at the same place.
We can put the following code inside
useEffectwith the dependency array.And for the
titleofMenuItemWithTopDescription, we can passiou.merchantinstead.I gonna approve this PR right now, but please make a follow up PR @jeet-dhandha for the cleanup 🙇
We consider the issue to be complete after the follow-up PR is merged 👍
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.
@hayata-suenaga Okay.