-
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
Enable distance splits #42302
Merged
Merged
Enable distance splits #42302
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
115c045
Allow distance splits on start page
neil-marcellini 3ee8a7a
Set split share when distanceAmount updates
neil-marcellini 813f8ca
WIP split distance global create set split data
neil-marcellini cc66e80
WIP set up CreateDistanceRequestParams for split
neil-marcellini a9e267c
Prettier
neil-marcellini c9a7962
Carefully fix distance split params
neil-marcellini 87010b1
Set onyxData from split or money request data
neil-marcellini d7c5424
Make distance split navigate for report or global create
neil-marcellini 8ba2bd1
Simplify creating distance for split or regular request
neil-marcellini 4591003
Make customUnitRateID basically required, fix tsc
neil-marcellini 588b2c5
Merge branch 'main' into neil-distance-split
neil-marcellini 336172b
Remove accidentally committed file
neil-marcellini 67ffddc
Merge branch 'main' into neil-distance-split
neil-marcellini 8891513
Fix creating workspace distance split and other cleanups
neil-marcellini 261d191
Merge branch 'main' into neil-distance-split
neil-marcellini 29a01f3
Build optimistic receipt for distance split, and move it inside optim…
neil-marcellini dc2d0da
Use existing split chat reportID for distance if present
neil-marcellini a981882
Prevent using an existingSplitChatReport with undefined id
neil-marcellini 41dec6a
Set optimistic data marking split as a distance transaction
neil-marcellini 1b10e40
Set waypoints pending so optimistic route shows
neil-marcellini c6909a4
Clear pending fields after split
neil-marcellini 8c61759
Show optimistic distance route when the request failed
neil-marcellini 1be11ce
Merge branch 'main' into neil-distance-split
neil-marcellini 5188d48
Only allow global create distance for non-splits
neil-marcellini ff2f258
Fix missed replacement of changed variable
neil-marcellini e2809f4
Prettify
neil-marcellini 0c86538
Remove leftover debug console logs
neil-marcellini c0b2c5e
Merge main to fix conflicts
neil-marcellini f406845
Merge main to fix conflicts
neil-marcellini 55ed6c7
Remove redundant call to createDistanceRequest
neil-marcellini 717d344
Merge branch 'main' into neil-distance-split
neil-marcellini 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
type CreateDistanceRequestParams = { | ||
comment: string; | ||
iouReportID: string; | ||
chatReportID: string; | ||
transactionID: string; | ||
reportActionID: string; | ||
chatReportID: string; | ||
createdChatReportActionID: string; | ||
createdIOUReportActionID: string; | ||
reportPreviewReportActionID: string; | ||
reportActionID: string; | ||
waypoints: string; | ||
customUnitRateID: string; | ||
comment: string; | ||
created: string; | ||
iouReportID?: string; | ||
createdIOUReportActionID?: string; | ||
reportPreviewReportActionID?: string; | ||
category?: string; | ||
tag?: string; | ||
taxCode?: string; | ||
taxAmount?: number; | ||
billable?: boolean; | ||
transactionThreadReportID: string; | ||
createdReportActionIDForThread: string; | ||
payerEmail: string; | ||
customUnitRateID?: string; | ||
transactionThreadReportID?: string; | ||
createdReportActionIDForThread?: string; | ||
payerEmail?: string; | ||
splits?: string; | ||
chatType?: string; | ||
}; | ||
|
||
export default CreateDistanceRequestParams; |
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 |
---|---|---|
|
@@ -147,8 +147,8 @@ function buildOptimisticTransaction( | |
merchant: merchant || CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT, | ||
created: created || DateUtils.getDBTime(), | ||
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD, | ||
receipt, | ||
filename, | ||
receipt: receipt?.source ? {source: receipt.source, state: receipt.state ?? CONST.IOU.RECEIPT_STATE.SCANREADY} : {}, | ||
filename: receipt?.source ?? receipt?.name ?? filename, | ||
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. We forgot to enforce the filename as a string here which led to crash in iOS. Details #47022 |
||
category, | ||
tag, | ||
taxCode, | ||
|
Oops, something went wrong.
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.
This side-effect does not update the values immediately which creates some delay before real values are shown to the user. #47100