Skip to content

Commit

Permalink
Merge pull request #45577 from Expensify/lucien/fix-export-integratio…
Browse files Browse the repository at this point in the history
…n-nextStep

Fix export integration next step showing for workspace members

(cherry picked from commit 5377e04)
  • Loading branch information
arosiclair authored and OSBotify committed Jul 18, 2024
1 parent 1c05e0f commit 4b0d13c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea

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

const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && !!policy;
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin;

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

Expand Down
3 changes: 2 additions & 1 deletion src/components/ReportActionItem/ReportPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,8 @@ function ReportPreview({
*/
const connectedIntegration = PolicyUtils.getConnectedIntegration(policy);

const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration;
const isAdmin = policy?.role === CONST.POLICY.ROLE.ADMIN;
const shouldShowExportIntegrationButton = !shouldShowPayButton && !shouldShowSubmitButton && connectedIntegration && isAdmin;

return (
<OfflineWithFeedback
Expand Down

0 comments on commit 4b0d13c

Please sign in to comment.