From c0eb009a99e1bb1d8df574c47cd5bf7cc8cef47f Mon Sep 17 00:00:00 2001 From: Abdelhafidh Belalia <16493223+s77rt@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:08:17 +0100 Subject: [PATCH] do not show RBR for expense reports --- src/components/LHNOptionsList/OptionRowLHNData.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHNData.tsx b/src/components/LHNOptionsList/OptionRowLHNData.tsx index ccf12aa4ce24..7c992dbeae24 100644 --- a/src/components/LHNOptionsList/OptionRowLHNData.tsx +++ b/src/components/LHNOptionsList/OptionRowLHNData.tsx @@ -40,8 +40,6 @@ function OptionRowLHNData({ const shouldDisplayViolations = ReportUtils.shouldDisplayViolationsRBRInLHN(fullReport, transactionViolations); const isSettled = ReportUtils.isSettled(fullReport); const shouldDisplayReportViolations = !isSettled && ReportUtils.isReportOwner(fullReport) && ReportUtils.hasReportViolations(reportID); - // We only want to show RBR for expense reports with transaction violations not for transaction threads reports. - const doesExpenseReportHasViolations = ReportUtils.isExpenseReport(fullReport) && !isSettled && ReportUtils.hasViolations(reportID, transactionViolations, true); const optionItem = useMemo(() => { // Note: ideally we'd have this as a dependent selector in onyx! @@ -52,7 +50,7 @@ function OptionRowLHNData({ preferredLocale: preferredLocale ?? CONST.LOCALES.DEFAULT, policy, parentReportAction, - hasViolations: !!shouldDisplayViolations || shouldDisplayReportViolations || doesExpenseReportHasViolations, + hasViolations: !!shouldDisplayViolations || shouldDisplayReportViolations, lastMessageTextFromReport, transactionViolations, invoiceReceiverPolicy,