Skip to content

Commit d8a8d01

Browse files
authored
Merge pull request Expensify#90154 from Expensify/claude-fixExportPrimaryActionAfterFail
Pass report to isExported/hasExportError to fix primary action after failed export
2 parents db327d0 + ec0c0b3 commit d8a8d01

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/libs/ReportPrimaryActionUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ function isPrimaryPayAction({
203203
const isReportApproved = isReportApprovedUtils({report});
204204
const isReportClosed = isClosedReportUtils(report);
205205
const isProcessingReport = isProcessingReportUtils(report);
206-
const isExported = isExportedUtil(reportActions);
206+
const isExported = isExportedUtil(reportActions, report);
207207
const hasExportError = hasExportErrorUtil(reportActions, report);
208208
const didExportFail = !isExported && hasExportError;
209209

@@ -272,7 +272,7 @@ function isExportAction(report: Report, currentUserLogin: string, policy?: Polic
272272
return false;
273273
}
274274

275-
const hasExportError = hasExportErrorUtil(reportActions);
275+
const hasExportError = hasExportErrorUtil(reportActions, report);
276276
if (syncEnabled && !hasExportError) {
277277
return false;
278278
}

src/pages/inbox/report/ReportDetailsExportPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function ReportDetailsExportPage({route}: ReportDetailsExportPageProps) {
4444

4545
const iconToDisplay = getIntegrationIcon(connectionName, expensifyIcons);
4646
const canBeExported = canBeExportedUtil(report);
47-
const isExported = isExportedUtil(reportActions);
47+
const isExported = isExportedUtil(reportActions, report);
4848

4949
const confirmExport = useCallback(
5050
(type: ExportType) => {

0 commit comments

Comments
 (0)