Skip to content

Commit

Permalink
add comment to get successfulDate
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Aug 1, 2024
1 parent 4cb4f21 commit 3d990e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/pages/workspace/accounting/PolicyAccountingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
const connectedIntegration = getConnectedIntegration(policy, accountingIntegrations) ?? connectionSyncProgress?.connectionName;

const policyID = policy?.id ?? '-1';
// Get the last successful date of the integration. Then, if `connectionSyncProgress` is the same integration displayed and the state is 'jobDone', get the more recent update time of the two.
const successfulDate = getIntegrationLastSuccessfulDate(
connectedIntegration ? policy?.connections?.[connectedIntegration] : undefined,
connectedIntegration === connectionSyncProgress?.connectionName ? connectionSyncProgress : undefined,
Expand Down

0 comments on commit 3d990e9

Please sign in to comment.