-
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 - Distance Request Optimistic Data (26518) #26536
Changes from 3 commits
6f5aa5f
208c222
78fcfcd
dc7e128
e4cdc49
3712c95
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,7 +264,7 @@ function getLinkedTransaction(reportAction = {}) { | |
} | ||
|
||
function getAllReportTransactions(reportID) { | ||
return _.filter(allTransactions, (transaction) => transaction.reportID === reportID); | ||
return _.filter(allTransactions, (transaction) => `${transaction.reportID}` === `${reportID}`); | ||
hayata-suenaga marked this conversation as resolved.
Show resolved
Hide resolved
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 ? 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. |
||
} | ||
|
||
/** | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,9 +144,18 @@ function MoneyRequestConfirmPage(props) { | |
*/ | ||
const createDistanceRequest = useCallback( | ||
(selectedParticipants, trimmedComment) => { | ||
IOU.createDistanceRequest(props.report, selectedParticipants[0], trimmedComment, props.iou.created, props.iou.transactionID); | ||
IOU.createDistanceRequest( | ||
props.report, | ||
selectedParticipants[0], | ||
trimmedComment, | ||
props.iou.created, | ||
props.iou.transactionID, | ||
props.iou.amount, | ||
props.iou.currency, | ||
props.iou.merchat, | ||
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. Is this a typo? It should be 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. Yes 🙇 . Sorry for that. |
||
); | ||
}, | ||
[props.report, props.iou.created, props.iou.transactionID], | ||
[props.report, props.iou.created, props.iou.transactionID, props.iou.amount, props.iou.currency, props.iou.merchat], | ||
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. Same here. 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. Slip of hand 🥲 |
||
); | ||
|
||
const createTransaction = useCallback( | ||
|
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
useEffect
with the dependency array.And for the
title
ofMenuItemWithTopDescription
, we can passiou.merchant
instead.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.