Skip to content

Commit

Permalink
ms gaurd fix (#528)
Browse files Browse the repository at this point in the history
ms gaurd fix
  • Loading branch information
DhaaraniCIT authored Feb 8, 2024
1 parent 1861efe commit 68fe516
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class BusinessCentralOnboardingLandingComponent implements OnInit, OnDest
this.businessCentralHelperService.refreshBusinessCentralDimensions(true).subscribe(() => {
this.businessCentralConnectionInProgress = false;
this.isIntegrationConnected = true;
this.checkProgressAndRedirect(code);
this.checkProgressAndRedirect();
});
}, (error) => {
const errorMessage = 'message' in error.error ? error.error.message : 'Failed to connect to Dynamic 365 Business Central. Please try again';
Expand All @@ -80,12 +80,12 @@ export class BusinessCentralOnboardingLandingComponent implements OnInit, OnDest
});
}

private checkProgressAndRedirect(code: string): void {
private checkProgressAndRedirect(): void {
const onboardingState: BusinessCentralOnboardingState = this.workspaceService.getOnboardingState();
if (onboardingState !== BusinessCentralOnboardingState.COMPLETE) {
this.router.navigate(['integrations/business_central/onboarding/connector']);
} else {
this.postBusinessCentralCredentials(code);
this.router.navigate(['integrations/business_central/main/dashboard']);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
<app-svg-icon *ngIf="!isConnectionInProgress && brandingFeatureConfig.isIconsInsideButtonAllowed" [svgSource]="'arrow-tail-right-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="'tw-pl-10-px tw-pt-2-px !tw-text-12-px'"></app-svg-icon>
<app-loader class="tw-ml-10-px" *ngIf="isConnectionInProgress" [styleClass]="'spinner-16-white tw-top-2-px'"></app-loader>
</button>
<button *ngIf="isIntegrationConnected" pButton type="button" class="!tw-text-alert-toast remove-bg disconnect !tw-bg-white" (click)="disconnect()">
<button *ngIf="isIntegrationConnected && (appName === AppName.BAMBOO_HR || appName === AppName.TRAVELPERK)" pButton type="button" class="!tw-text-alert-toast remove-bg disconnect !tw-bg-white" (click)="disconnect()">
{{ isConnectionInProgress ? 'Disconnecting' : 'Disconnect' }}
</button>
<button *ngIf="(appName === AppName.QBD || appName === AppName.INTACCT || appName === AppName.SAGE300 || appName === AppName.BUSINESS_CENTRAL)" pButton type="button" class="p-button-raised" (click)="connect()">
<button *ngIf="!isIntegrationConnected && (appName === AppName.QBD || appName === AppName.INTACCT || appName === AppName.SAGE300 || appName === AppName.BUSINESS_CENTRAL)" pButton type="button" class="p-button-raised" (click)="connect()">
{{buttonText}}
<app-svg-icon *ngIf="appName === AppName.QBD && brandingFeatureConfig.isIconsInsideButtonAllowed" [svgSource]="'arrow-tail-right-medium'" [width]="'18px'" [height]="'18px'" [styleClasses]="'tw-pl-10-px tw-pt-2-px !tw-text-12-px'"></app-svg-icon>
</button>
Expand Down

0 comments on commit 68fe516

Please sign in to comment.