Skip to content

Commit 4b0d13c

Browse files
arosiclairOSBotify
authored andcommitted
Merge pull request #45577 from Expensify/lucien/fix-export-integration-nextStep
Fix export integration next step showing for workspace members (cherry picked from commit 5377e04)
1 parent 1c05e0f commit 4b0d13c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/components/MoneyReportHeader.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
118118

119119
const shouldShowSubmitButton = isDraft && reimbursableSpend !== 0 && !allHavePendingRTERViolation;
120120

121-
const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && !!policy;
121+
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
122+
const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin;
122123

123124
const shouldShowSettlementButton = (shouldShowPayButton || shouldShowApproveButton) && !allHavePendingRTERViolation && !shouldShowExportIntegrationButton;
124125

src/components/ReportActionItem/ReportPreview.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ function ReportPreview({
341341
*/
342342
const connectedIntegration = PolicyUtils.getConnectedIntegration(policy);
343343

344-
const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration;
344+
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
345+
const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin;
345346

346347
return (
347348
<OfflineWithFeedback

0 commit comments

Comments
 (0)