From efcf580511f30eaff92b9fefbb4b8702c4ba44dd Mon Sep 17 00:00:00 2001 From: VH Date: Thu, 1 Jun 2023 15:37:39 +0700 Subject: [PATCH] Display Concierge chat report when there is no report to be displayed --- src/libs/SidebarUtils.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/SidebarUtils.js b/src/libs/SidebarUtils.js index 7b3b15291e74..87e8b97d0bd0 100644 --- a/src/libs/SidebarUtils.js +++ b/src/libs/SidebarUtils.js @@ -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) => {