Skip to content

Commit

Permalink
QBD direct bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT committed Nov 25, 2024
1 parent 7129c16 commit 39dff60
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/app/branding/c1-branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ export const c1KbArticles: KbArticle[string] = {
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration#h_498f2acc61`,
LANDING: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration`,
CONNECTOR: `${brandingConfig.helpArticleDomain}/en/articles/9081356-generate-credentials-to-connect-with-sage-intacct`,
SKIP_EXPORT: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration`
SKIP_EXPORT: `${brandingConfig.helpArticleDomain}/en/articles/9082146-configure-the-capital-one-sage-intacct-integration`,
HELPER_ARTICLE: `${brandingConfig.helpArticleDomain}/en/articles/7882821-how-to-skip-exporting-specific-expenses-from-fyle-to-sage-intacct`
}
}
};
Expand Down
3 changes: 2 additions & 1 deletion src/app/branding/fyle-branding-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ export const fyleKbArticles: KbArticle[string] = {
ADVANCED_SETTING: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration#h_3f6718633c`,
LANDING: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration`,
CONNECTOR: `${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration#h_38e0c9bea6`,
SKIP_EXPORT: `${brandingConfig.helpArticleDomain}/en/articles/7882821-how-to-skip-exporting-specific-expenses-from-fyle-to-sage-intacct`
SKIP_EXPORT: `${brandingConfig.helpArticleDomain}/en/articles/7882821-how-to-skip-exporting-specific-expenses-from-fyle-to-sage-intacct`,
HELPER_ARTICLE: `${brandingConfig.helpArticleDomain}/en/articles/7882821-how-to-skip-exporting-specific-expenses-from-fyle-to-sage-intacct`
}
}
};
Expand Down
1 change: 1 addition & 0 deletions src/app/core/models/branding/kb-article.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type KbArticle = {
LANDING: string;
CONNECTOR: string;
SKIP_EXPORT: string;
HELPER_ARTICLE: string;
},
INTACCT: {
IMPORT_SETTING: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class QbdDirectConnectorService {
return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/connector_settings/`, payload);
}

getQbdDirectConnection(): Observable<QbdConnectorGet> {
getQBDConnectorSettings(): Observable<QbdConnectorGet> {
return this.apiService.get(`/workspaces/${this.workspaceService.getWorkspaceId()}/connector_settings/`, {});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,17 @@ export class QbdDirectOnboardingConnectorComponent implements OnInit {
this.connectionStatus = QBDConnectionStatus.INCORRECT_COMPANY_PATH;
this.warningDialogText = 'Incorrect company file path detected. Please check and try again.';
this.isDialogVisible = true;
this.isConnectionLoading = false;
} else if (onboardingState === QbdDirectOnboardingState.INCORRECT_PASSWORD) {
// Set connection status, open dialog, and stop polling
this.connectionStatus = QBDConnectionStatus.IN_CORRECT_PASSWORD;
this.warningDialogText = 'Incorrect password detected. Please check and try again.';
this.isDialogVisible = true;
this.isConnectionLoading = false;
} else if (onboardingState === QbdDirectOnboardingState.DESTINATION_SYNC_IN_PROGRESS || onboardingState === QbdDirectOnboardingState.DESTINATION_SYNC_COMPLETE) {
// Set success status, enable connection CTA, and stop polling
this.connectionStatus = QBDConnectionStatus.SUCCESS;
this.isConnectionCTAEnabled = true;
this.isConnectionLoading = false;
}
this.isConnectionLoading = false;
}

isTerminalStatus(status: QbdDirectOnboardingState): boolean {
Expand Down Expand Up @@ -218,6 +216,7 @@ export class QbdDirectOnboardingConnectorComponent implements OnInit {
proceedToExportSetting() {
this.isLoading = true;
this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.EXPORT_SETTINGS}).subscribe((workspaceResponse: QbdDirectWorkspace) => {
this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state);
this.router.navigate([`/integrations/qbd_direct/onboarding/export_settings`]);
this.isLoading = false;
this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'QuickBooks Desktop connection successful');
Expand All @@ -228,7 +227,7 @@ export class QbdDirectOnboardingConnectorComponent implements OnInit {
setupPage() {
this.workspaceService.getWorkspace(this.user.org_id).subscribe((workspaceResponse: QbdDirectWorkspace[]) => {
if (workspaceResponse[0].onboarding_state === QbdDirectOnboardingState.PENDING_QWC_UPLOAD) {
this.qbdDirectConnectorService.getQbdDirectConnection().subscribe((qbdConntion: QbdConnectorGet) => {
this.qbdDirectConnectorService.getQBDConnectorSettings().subscribe((qbdConntion: QbdConnectorGet) => {
this.password = qbdConntion.password;
this.isDownloadStepCompleted = true;
this.isDownloadfileLoading = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ <h4 class="tw-text-14-px tw-text-text-tertiary tw-font-500 tw-pb-4-px">Open the
<app-svg-icon [svgSource]="'lock'" [width]="'16px'" [height]="'16px'" [isTextColorAllowed]="true" [styleClasses]="'tw-text-text-tertiary'"></app-svg-icon>
</div>
<div class="tw-ml-16-px">
<h4 class="tw-text-14-px tw-text-text-tertiary tw-font-500">Use this password to set up the connection</h4>
<h4 class="tw-text-14-px tw-text-text-tertiary tw-font-500 tw-pb-4-px">Use this password to set up the connection</h4>
<div class="tw-flex">
<div class="tw-pr-30-px">
<div class="tw-pr-30-px tw-w-70-px">
<p *ngIf="!isPasswordShown" class="tw-text-16-px tw-text-text-muted tw-font-400">****{{password.slice(4)}}</p>
<p *ngIf="isPasswordShown" class="tw-text-16-px tw-text-text-muted tw-font-400">{{password}}</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
<div>
<p class="tw-text-size-10 tw-text-text-disable tw-font-400">
https://help.fylehq.com/en/articles/71773-common-quickbooks-web-connector
{{brandingKbArticles.onboardingArticles.QBD_DIRECT.HELPER_ARTICLE}}
</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { brandingConfig } from 'src/app/branding/branding-config';
import { brandingConfig, brandingKbArticles } from 'src/app/branding/branding-config';
import { AppName, ConfigurationWarningEvent } from 'src/app/core/models/enum/enum.model';
import { ConfigurationWarningOut } from 'src/app/core/models/misc/configuration-warning.model';
import { WindowService } from 'src/app/core/services/common/window.service';
Expand Down Expand Up @@ -33,6 +33,8 @@ export class ConfigurationConfirmationDialogComponent implements OnInit {

readonly brandingConfig = brandingConfig;

readonly brandingKbArticles = brandingKbArticles;

AppName = AppName;

brandIcon: string;
Expand All @@ -46,7 +48,7 @@ export class ConfigurationConfirmationDialogComponent implements OnInit {
}

redirect() {
this.windowService.openInNewTab(`${brandingConfig.helpArticleDomain}/en/articles/8394683-how-to-configure-the-fyle-sage-intacct-integration#h_38e0c9bea6`);
this.windowService.openInNewTab(brandingKbArticles.onboardingArticles.QBD_DIRECT.HELPER_ARTICLE);
}

ngOnInit(): void {
Expand Down

0 comments on commit 39dff60

Please sign in to comment.