From e8bd937f656803df68a20bfcb984d144940938fc Mon Sep 17 00:00:00 2001 From: daledah Date: Thu, 8 Aug 2024 15:42:26 +0700 Subject: [PATCH] fix: approve button doesn't show up --- src/components/MoneyReportHeader.tsx | 2 +- src/components/ReportActionItem/ReportPreview.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyReportHeader.tsx b/src/components/MoneyReportHeader.tsx index 812baee2d10a..d0fd819b7a7e 100644 --- a/src/components/MoneyReportHeader.tsx +++ b/src/components/MoneyReportHeader.tsx @@ -118,7 +118,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea const shouldShowSubmitButton = isDraft && reimbursableSpend !== 0 && !allHavePendingRTERViolation; const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN; - const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin; + const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin && ReportUtils.canBeExported(moneyRequestReport); const shouldShowSettlementButton = (shouldShowPayButton || shouldShowApproveButton) && !allHavePendingRTERViolation && !shouldShowExportIntegrationButton; diff --git a/src/components/ReportActionItem/ReportPreview.tsx b/src/components/ReportActionItem/ReportPreview.tsx index 6d326b2d9eb9..c7da08b20163 100644 --- a/src/components/ReportActionItem/ReportPreview.tsx +++ b/src/components/ReportActionItem/ReportPreview.tsx @@ -362,7 +362,7 @@ function ReportPreview({ const connectedIntegration = PolicyUtils.getConnectedIntegration(policy); const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN; - const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin; + const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin && ReportUtils.canBeExported(iouReport); return (