Skip to content

Commit

Permalink
Merge pull request #46629 from tsa321/fixMissPaidSysMsg
Browse files Browse the repository at this point in the history
Fix missing paid system message on pay request
  • Loading branch information
tylerkaraszewski authored Aug 2, 2024
2 parents df46bcd + 95d9fe3 commit 55a29dd
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 @@ -1606,7 +1598,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 55a29dd

Please sign in to comment.