-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Part of the project
Main issue: https://github.com/Expensify/Expensify/issues/307591
Doc section: Surfacing Potential Duplicates
Project: [Wave: Collect Approvers] Dupe Detection
UI
Feature Description
Update the comment type here since this can be a single string or a full array containing different transactions NVPs. In this case, it looks like this:
The HOLD doc implemented the logic to display the HOLD notification for each expense. You can see the details here. However, we need to make the following changes to update the HOLD notification in case it is duplicated.
-
Add a new function called
TransactionUtils.isDuplicate(transactionID, checkDismissed)that will check if there is an existing duplicate violation for the given transactionID and has been dismissed: -
Add a new condition to
ReportUtils.isOnHoldto see if the transaction is a duplicate by calling TransactionUtils.isDuplicate(transactionID, true). -
In
components/ReportActionItem/MoneyRequestView.jsin the View for the HOLD banner:-
Check if the transaction has any duplicates by checking the corresponding Onyx key transactionViolations_*. If so, replace the
props.translate('iou.requestOnHold')forprops.translate('iou.requestDuplicate')that contains the message defined in the screenshot at the beginning of the issue (asked me for the Spanish translations). -
If there are duplicates, add a new
<Button>to review duplicates. Don't navigate anywhere for now but eventually it will do the following:-
Navigate the user to the route for a new page ReviewDuplicate
-
Pass the threadReportID of the transaction in the route to the new page.
-
-
Manual Test Steps
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~016dc734e5d5fc1a3f
- Upwork Job ID: 1778425579213647872
- Last Price Increase: 2024-04-11
- Automatic offers:
- akinwale | Reviewer | 0
- gijoe0295 | Contributor | 0




