Skip to content

Commit

Permalink
Merge pull request #46324 from Expensify/cmartins-openSingleExpenseRe…
Browse files Browse the repository at this point in the history
…port

Navigate to singleExpenseReport
  • Loading branch information
luacmartins authored Aug 13, 2024
2 parents a01d0a6 + 5d2a28f commit 0964ee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function Search({queryJSON, policyIDs, isCustomQuery}: SearchProps) {
};

const openReport = (item: TransactionListItemType | ReportListItemType) => {
let reportID = SearchUtils.isTransactionListItemType(item) ? item.transactionThreadReportID : item.reportID;
let reportID = SearchUtils.isTransactionListItemType(item) && !item.isFromOneTransactionReport ? item.transactionThreadReportID : item.reportID;

if (!reportID) {
return;
Expand Down
3 changes: 3 additions & 0 deletions src/types/onyx/SearchResults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ type SearchTransaction = {

/** The ID of the money request reportAction associated with the transaction */
moneyRequestReportActionID?: string;

/** Whether the transaction report has only a single transaction */
isFromOneTransactionReport?: boolean;
};

/** Model of account details search result */
Expand Down

0 comments on commit 0964ee9

Please sign in to comment.