Skip to content

[HOLD for payment 2023-09-04] Surface distance requests in App #22712

Description

@neil-marcellini

Please follow the plan in the design doc: Surface distance requests in App.

  • The display of the ReportPreview component will be modified in Scan Receipt to match the style shown in the mockup, all we need to do differently is show the route image.

  • For distance request actions we will display the route receipt image in the MoneyRequestAction component.

  • If it’s a distance request as determined by a new util function isDistanceRequest(transaction), we’ll subscribe to the transaction from MoneyRequestAction using withOnyx and the IOUTransactionID stored in action.message. Inside the function we’ll return whether transaction.type === “customUnit” and transaction.customUnit.name === “Distance”. This matches what we do on OldDot.

  • For distance requests we’ll render the receipt image above the header as described in the receipt doc.

  • We can create a small ReceiptUtils.getReceiptURL(filename) function to get the url from the receipt.filename. It will return the same URL format for receipts that we use for OldDot.

  • We’ll set the title of the header to “Distance” if isDistanceRequest returns true. The amount will come from the transaction.amount or transaction.modifiedAmount. For distance requests the “Description” will come from the transaction.merchant instead of transaction.comment.comment as it does for manual requests, since that’s how it’s stored.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions