-
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
Display report preview using new reportAction data source #18423
Merged
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
15cf4c5
New report action type in CONST file.
cristipaval 972480e
Create ReportPreview component.
cristipaval 7b86c61
Utility method to get report preview action.
cristipaval ff09d17
Utility function which builds optimistic report preview.
cristipaval fb94299
Add report preview in optimistic and success data
cristipaval 4f72a9f
WIP.
cristipaval 8b463a0
Connect to Onyx in ReportActionsUtils to get the current user email.
cristipaval 87f0c6b
Improve message property in optimistic report preview action.
cristipaval 650389d
Build the preview component starting from IOUAction
cristipaval 4615b3f
Remove the iou preview.
cristipaval e36b159
Remove unnecessary props and logic. from the component.
cristipaval 3ff969b
Remove unused default props.
cristipaval 538eb6e
Pull iou report from onyx to get the cached iou total
cristipaval bc63580
No more IOUQUote reusability in ReportPreview
cristipaval dd26649
Hardcode translations.
cristipaval 031ffbf
Add reportPreviewReportActionID as a param to RequestMoney command
cristipaval c75e249
Merge remote-tracking branch 'origin/main' into cristi_display-report…
cristipaval 5b053f4
Merge remote-tracking branch 'origin/main' into cristi_display-report…
cristipaval 595cb41
Improvements.
cristipaval a77f5c6
Pay button.
cristipaval 8ba163e
Add logic for report preview action for split the bill
cristipaval 9387a58
wip
cristipaval 3582868
Merge remote-tracking branch 'origin/main' into cristi_display-report…
cristipaval 372074b
Merge remote-tracking branch 'origin/main' into cristi_display-report…
cristipaval d618723
Merge branch 'main' into cristi_display-report-preview
Julesssss 62ab68f
apply lint fixes
Julesssss a79f513
Merge branch 'cristi_display-report-preview' into jules-reportPreview…
Julesssss 8caecc0
apply fix for missing currency
Julesssss 5537cd9
stop showing reportPreview within IOUAction component
Julesssss 083081d
update prop name for reportpreview format string
Julesssss 3036057
launch IOUDetails page when request preview is tapped
Julesssss d2fc338
remove temp changes
Julesssss 2cb3661
add action type == IOU filter to IOUTransactions component
Julesssss b21560b
linkedReportID instead of IOUReportID
cristipaval 0c934e6
Merge branch 'main' into cristi_display-report-preview
Julesssss d782749
apply prettier style changes
Julesssss 0957f0d
update IOU test cases to account for the new preview action
Julesssss 6b4035d
clear the iouPreview pending action after successfully creating it
Julesssss 581c229
fix console error in IOUDetailsModal by providing default report prop
Julesssss 3b2bc3a
Merge branch 'main' into cristi_display-report-preview
Julesssss c620d14
resolve lint issue
Julesssss fafb4ae
resolve conflicts
luacmartins 30e8c70
rm circular dependency
luacmartins 6f19516
refactor split bill
luacmartins 6d2250f
define const, navigate to correct report
luacmartins 4621d19
resolve conflicts
luacmartins d678e0e
Merge branch 'cmartins-createRequestsInExpenseReports' into cristi_di…
Julesssss 8a8ad58
apply prettier again
Julesssss 1330745
remove duplicate description field, added in merge conflict resolution
Julesssss 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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -1427,6 +1427,29 @@ function buildOptimisticIOUReportAction(type, amount, currency, comment, partici | |
}; | ||
} | ||
|
||
function buildOptimisticReportPreview(reportID, iouReportID, payeeAccountID) { | ||
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. Missing jsdoc. (Why lint is not failing here?) |
||
return { | ||
reportActionID: NumberUtils.rand64(), | ||
reportID, | ||
created: DateUtils.getDBTime(), | ||
actionName: CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW, | ||
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, | ||
accountID: payeeAccountID, | ||
message: [ | ||
{ | ||
html: '', | ||
text: '', | ||
isEdited: false, | ||
type: CONST.REPORT.MESSAGE.TYPE.COMMENT, | ||
}, | ||
], | ||
originalMessage: { | ||
linkedReportID: iouReportID, | ||
}, | ||
actorEmail: currentUserEmail, | ||
}; | ||
} | ||
|
||
function buildOptimisticTaskReportAction(taskReportID, actionName, message = '') { | ||
const originalMessage = { | ||
taskReportID, | ||
|
@@ -2219,6 +2242,7 @@ export { | |
buildOptimisticIOUReport, | ||
buildOptimisticExpenseReport, | ||
buildOptimisticIOUReportAction, | ||
buildOptimisticReportPreview, | ||
buildOptimisticTaskReportAction, | ||
buildOptimisticAddCommentReportAction, | ||
buildOptimisticTaskCommentReportAction, | ||
|
Oops, something went wrong.
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.
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.
Minor: We have an unnecessary
mt4