Repository navigation
Show IOU preview for send money flow #18981
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
14 commits
Select commit
Hold shift + click to select a range
8d681ce
Ensure the IOUPreview is shown for the send money flow
mountiny a6b886c
Merge branch 'main' into vit-showIOUPreviewForSendMoneyFlow
mountiny 89d18ef
ensure report preview callback is correct
mountiny 42c8cfb
Merge branch 'main' into vit-showIOUPreviewForSendMoneyFlow
mountiny f6a494d
Style
mountiny afd558e
Make if clause more declarative
mountiny dc7d3bd
Allow creating thread from send money preview too
mountiny 448b184
Refoactor getting the formatted amount
mountiny 120202e
Add spanish translations
mountiny d4f0f2b
Add JSDocs to the method
mountiny dc611f1
Merge branch 'main' into vit-showIOUPreviewForSendMoneyFlow
mountiny cafb75d
Merge main and run prettier
mountiny 7e437c9
Merge branch 'main' into vit-showIOUPreviewForSendMoneyFlow
mountiny 42c4c59
Resolve merge conflicts
mountiny 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
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
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
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 |
|---|---|---|
|
|
@@ -186,13 +186,17 @@ class ReportActionItem extends Component { | |
| */ | ||
| renderItemContent(hovered = false) { | ||
| let children; | ||
| const originalMessage = lodashGet(this.props.action, 'originalMessage', {}); | ||
| // Show the IOUPreview for when request was created, bill was split or money was sent | ||
| if ( | ||
| this.props.action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && | ||
| this.props.action.originalMessage.type !== CONST.IOU.REPORT_ACTION_TYPE.DELETE && | ||
| this.props.action.originalMessage.type !== CONST.IOU.REPORT_ACTION_TYPE.PAY | ||
| originalMessage && | ||
| (originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.CREATE || | ||
| originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.SPLIT || | ||
| (originalMessage.type === CONST.IOU.REPORT_ACTION_TYPE.PAY && originalMessage.IOUDetails)) | ||
|
Comment on lines
+194
to
+196
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. I was going to suggest |
||
| ) { | ||
| // There is no single iouReport for bill splits, so only 1:1 requests require an iouReportID | ||
| const iouReportID = this.props.action.originalMessage.IOUReportID ? this.props.action.originalMessage.IOUReportID.toString() : '0'; | ||
| const iouReportID = originalMessage.IOUReportID ? originalMessage.IOUReportID.toString() : '0'; | ||
|
|
||
| children = ( | ||
| <MoneyRequestAction | ||
|
|
||
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.