Skip to content

Commit

Permalink
Fix missing paid system message on pay request
Browse files Browse the repository at this point in the history
Signed-off-by: Tsaqif <[email protected]>
  • Loading branch information
tsa321 committed Aug 1, 2024
1 parent a5a17b0 commit 95d9fe3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
9 changes: 0 additions & 9 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,6 @@ function getSortedReportActions(reportActions: ReportAction[] | null, shouldSort
return sortedActions;
}

/**
* Returns filtered list for one transaction view as we don't want to display IOU action type in the one-transaction view
* Separated it from getCombinedReportActions, so it can be reused
*/
function getFilteredForOneTransactionView(reportActions: ReportAction[]): ReportAction[] {
return reportActions.filter((action) => !isSentMoneyReportAction(action));
}

/**
* Returns a sorted and filtered list of report actions from a report and it's associated child
* transaction thread report in order to correctly display reportActions from both reports in the one-transaction report view.
Expand Down Expand Up @@ -1598,7 +1590,6 @@ export {
getAllReportActions,
getCombinedReportActions,
getDismissedViolationMessageText,
getFilteredForOneTransactionView,
getFirstVisibleReportActionID,
getIOUActionForReportID,
getIOUReportIDFromReportActionPreview,
Expand Down
3 changes: 1 addition & 2 deletions src/pages/home/report/ReportActionsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ function ReportActionsView({
createdAction.pendingAction = CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE;
}

// moneyRequestActions.length === 1 indicates that we have one-transaction report and we don't want to display additonal IOU action
return moneyRequestActions.length === 1 ? ReportActionsUtils.getFilteredForOneTransactionView([...actions, createdAction]) : [...actions, createdAction];
return [...actions, createdAction];
}, [allReportActions, report, transactionThreadReport]);

// Get a sorted array of reportActions for both the current report and the transaction thread report associated with this report (if there is one)
Expand Down

0 comments on commit 95d9fe3

Please sign in to comment.