From 39dff6013ee1e7ec0b34e1c08295a98369e3da89 Mon Sep 17 00:00:00 2001 From: DhaaraniCIT Date: Mon, 25 Nov 2024 17:25:55 +0530 Subject: [PATCH] QBD direct bug fixes --- src/app/branding/c1-branding-config.ts | 3 ++- src/app/branding/fyle-branding-config.ts | 3 ++- src/app/core/models/branding/kb-article.model.ts | 1 + .../qbd-direct-connector.service.ts | 2 +- .../qbd-direct-onboarding-connector.component.ts | 7 +++---- .../qbd-direct-setup-connection.component.html | 4 ++-- .../configuration-confirmation-dialog.component.html | 2 +- .../configuration-confirmation-dialog.component.ts | 6 ++++-- 8 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/app/branding/c1-branding-config.ts b/src/app/branding/c1-branding-config.ts index f50fab919..86ac71d3a 100644 --- a/src/app/branding/c1-branding-config.ts +++ b/src/app/branding/c1-branding-config.ts @@ -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` } } }; diff --git a/src/app/branding/fyle-branding-config.ts b/src/app/branding/fyle-branding-config.ts index 052e2ac04..0d6d9bd8e 100644 --- a/src/app/branding/fyle-branding-config.ts +++ b/src/app/branding/fyle-branding-config.ts @@ -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` } } }; diff --git a/src/app/core/models/branding/kb-article.model.ts b/src/app/core/models/branding/kb-article.model.ts index 1a3d4a9f6..4d5f0f8a4 100644 --- a/src/app/core/models/branding/kb-article.model.ts +++ b/src/app/core/models/branding/kb-article.model.ts @@ -20,6 +20,7 @@ export type KbArticle = { LANDING: string; CONNECTOR: string; SKIP_EXPORT: string; + HELPER_ARTICLE: string; }, INTACCT: { IMPORT_SETTING: string; diff --git a/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts b/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts index a19e05813..eb92e5b59 100644 --- a/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts +++ b/src/app/core/services/qbd-direct/qbd-direct-configuration/qbd-direct-connector.service.ts @@ -18,7 +18,7 @@ export class QbdDirectConnectorService { return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/connector_settings/`, payload); } - getQbdDirectConnection(): Observable { + getQBDConnectorSettings(): Observable { return this.apiService.get(`/workspaces/${this.workspaceService.getWorkspaceId()}/connector_settings/`, {}); } diff --git a/src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.ts b/src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.ts index d896d63af..ed2533c6b 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.ts +++ b/src/app/integrations/qbd-direct/qbd-direct-onboarding/qbd-direct-onboarding-connector/qbd-direct-onboarding-connector.component.ts @@ -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 { @@ -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'); @@ -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; diff --git a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.html b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.html index 76ecfd9b7..1d57acebf 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.html +++ b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-setup-connection/qbd-direct-setup-connection.component.html @@ -34,9 +34,9 @@

Open the
-

Use this password to set up the connection

+

Use this password to set up the connection

-
+

****{{password.slice(4)}}

{{password}}

diff --git a/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html b/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html index e928423b6..0c3f580f4 100644 --- a/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html +++ b/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.html @@ -28,7 +28,7 @@

- https://help.fylehq.com/en/articles/71773-common-quickbooks-web-connector + {{brandingKbArticles.onboardingArticles.QBD_DIRECT.HELPER_ARTICLE}}

diff --git a/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.ts b/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.ts index ff1041d46..203c7b85b 100644 --- a/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.ts +++ b/src/app/shared/components/configuration/configuration-confirmation-dialog/configuration-confirmation-dialog.component.ts @@ -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'; @@ -33,6 +33,8 @@ export class ConfigurationConfirmationDialogComponent implements OnInit { readonly brandingConfig = brandingConfig; + readonly brandingKbArticles = brandingKbArticles; + AppName = AppName; brandIcon: string; @@ -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 {