Skip to content

Commit 5561038

Browse files
indicate whether qbo connection is in progress in qbo onboarding page (#855)
* feat: indicate whether qbo connection is in progress in qbo onboarding page * wait for qbo creds to be posted before hiding the loader
1 parent 4b8497c commit 5561038

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/app/integrations/qbo/qbo-onboarding/qbo-onboarding-landing/qbo-onboarding-landing.component.ts

+3
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@ export class QboOnboardingLandingComponent implements OnInit, OnDestroy {
6464
const payload: QBOConnectorPost = QBOConnectorModel.constructPayload(code, realmId);
6565

6666
this.qboConnectorService.connectQBO(payload).subscribe((qboCredential: QBOCredential) => {
67+
this.qboConnectionInProgress = false;
6768
this.router.navigate([`/integrations/qbo/main/dashboard`]);
6869
}, (error) => {
70+
this.qboConnectionInProgress = false;
6971
const errorMessage = 'message' in error.error ? error.error.message : 'Failed to connect to QuickBooks Online. Please try again';
7072
if (errorMessage === 'Please choose the correct QuickBooks Online account') {
7173
this.isIncorrectQBOConnectedDialogVisible = true;
@@ -86,6 +88,7 @@ export class QboOnboardingLandingComponent implements OnInit, OnDestroy {
8688
};
8789

8890
if (onboardingState !== QBOOnboardingState.COMPLETE) {
91+
this.qboConnectionInProgress = false;
8992
this.router.navigate(['integrations/qbo/onboarding/connector'], navigationExtras);
9093
} else {
9194
this.postQboCredentials(code, realmId);

0 commit comments

Comments
 (0)