Skip to content

Commit

Permalink
feat: indicate whether qbo connection is in progress in qbo onboardin…
Browse files Browse the repository at this point in the history
…g page (#854)
  • Loading branch information
JustARatherRidiculouslyLongUsername committed Jun 25, 2024
1 parent 5561038 commit a38b68e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div *ngIf="!isIncorrectQBOConnectedDialogVisible">
<div>
<app-landing-page-header [showQBOButton]="true" [iconPath]="'assets/logos/qbo.png'" [appName]="'QuickBooks Online'" [appDescription]="brandingContent.contentText" [isLoading]="false" [isIntegrationSetupInProgress]="false" [isIntegrationConnected]="false" [redirectLink]="redirectLink" (connectIntegration)="connectQbo()" [logoStyleClasses]="'tw-p-16-px'"></app-landing-page-header>
<app-landing-page-header [showQBOButton]="true" [iconPath]="'assets/logos/qbo.png'" [appName]="'QuickBooks Online'" [appDescription]="brandingContent.contentText" [isLoading]="false" [isIntegrationSetupInProgress]="qboConnectionInProgress" [isIntegrationConnected]="false" [redirectLink]="redirectLink" (connectIntegration)="connectQbo()" [logoStyleClasses]="'tw-p-16-px'"></app-landing-page-header>
</div>
<div>
<app-landing-page-body [headlineText]="brandingContent.guideHeaderText" [headerText]="'A quick guide to help you set up your QuickBooks Online integration.'" [embedVideo]="embedVideoLink" [embedImage]="'assets/co/coQBOLanding.svg'" [svgPath]="'assets/flow-charts/' + brandingConfig.brandId +'-qbo-data-flow.svg'" [appName]="appName"></app-landing-page-body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export class QboOnboardingLandingComponent implements OnInit, OnDestroy {

isIncorrectQBOConnectedDialogVisible: boolean = false;

qboConnectionInProgress = false;

private oauthCallbackSubscription: Subscription;

readonly brandingContent = brandingContent.landing;
Expand All @@ -49,6 +51,7 @@ export class QboOnboardingLandingComponent implements OnInit, OnDestroy {
}

connectQbo(): void {
this.qboConnectionInProgress = true;
const url = `${environment.qbo_authorize_uri}?client_id=${environment.qbo_oauth_client_id}&scope=com.intuit.quickbooks.accounting&response_type=code&redirect_uri=${environment.qbo_oauth_redirect_uri}&state=qbo_local_redirect`;

this.helperService.oauthCallbackUrl.subscribe((callbackURL: string) => {
Expand Down Expand Up @@ -87,6 +90,7 @@ export class QboOnboardingLandingComponent implements OnInit, OnDestroy {
}
};

this.qboConnectionInProgress = false;
if (onboardingState !== QBOOnboardingState.COMPLETE) {
this.qboConnectionInProgress = false;
this.router.navigate(['integrations/qbo/onboarding/connector'], navigationExtras);
Expand Down

0 comments on commit a38b68e

Please sign in to comment.