Skip to content

Commit

Permalink
Merge pull request #19945 from hoangzinh/df/17858
Browse files Browse the repository at this point in the history
Display Concierge chat report when there is no report to be displayed
  • Loading branch information
stitesExpensify authored Jun 2, 2023
2 parents 9679e7c + efcf580 commit 465b788
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libs/SidebarUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ function getOrderedReportIDs(reportIDFromRoute) {

// Filter out all the reports that shouldn't be displayed
const reportsToDisplay = _.filter(allReports, (report) => ReportUtils.shouldReportBeInOptionList(report, reportIDFromRoute, isInGSDMode, currentUserLogin, allReports, betas, policies));
if (_.isEmpty(reportsToDisplay)) {
// Display Concierge chat report when there is no report to be displayed
const conciergeChatReport = _.find(allReports, ReportUtils.isConciergeChatReport);
if (conciergeChatReport) {
reportsToDisplay.push(conciergeChatReport);
}
}

// There are a few properties that need to be calculated for the report which are used when sorting reports.
_.each(reportsToDisplay, (report) => {
Expand Down

0 comments on commit 465b788

Please sign in to comment.