From 244ac58da655058dd4dbb28df72614b9c440554c Mon Sep 17 00:00:00 2001 From: anishfyle Date: Mon, 16 Dec 2024 13:08:24 +0530 Subject: [PATCH] pr comments --- .../models/common/advanced-settings.model.ts | 2 +- .../qbo-export-settings.component.html | 2 +- .../qbo-export-settings.component.ts | 28 +++++++++++-------- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/app/core/models/common/advanced-settings.model.ts b/src/app/core/models/common/advanced-settings.model.ts index 0c178709b..ef86f268c 100644 --- a/src/app/core/models/common/advanced-settings.model.ts +++ b/src/app/core/models/common/advanced-settings.model.ts @@ -94,7 +94,7 @@ export class AdvancedSettingsModel { if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase()) && brandingConfig.brandId === 'fyle') { return defaultOptions; } - return defaultOptions.filter(option => option !== 'card_number'); + return defaultOptions.filter(option => option !== 'card_number'); } diff --git a/src/app/integrations/qbo/qbo-shared/qbo-export-settings/qbo-export-settings.component.html b/src/app/integrations/qbo/qbo-shared/qbo-export-settings/qbo-export-settings.component.html index a81f05f77..808256be0 100644 --- a/src/app/integrations/qbo/qbo-shared/qbo-export-settings/qbo-export-settings.component.html +++ b/src/app/integrations/qbo/qbo-shared/qbo-export-settings/qbo-export-settings.component.html @@ -102,7 +102,7 @@ -
+
{ - this.isSaveInProgress = false; - this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Settings saved successfully'); - if (this.isOnboarding) { - this.workspaceService.setOnboardingState(QBOOnboardingState.IMPORT_SETTINGS); - this.router.navigate(['/integrations/qbo/onboarding/import_settings']); + ).subscribe({ + complete: () => { + this.isSaveInProgress = false; + this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Export Settings saved successfully'); + if (this.isOnboarding) { + this.workspaceService.setOnboardingState(QBOOnboardingState.IMPORT_SETTINGS); + this.router.navigate([`/integrations/qbo/onboarding/import_settings`]); + } else if (this.isAdvancedSettingAffected()) { + this.router.navigate(['/integrations/qbo/main/configuration/advanced_settings']); + } + }, + error: () => { + this.isSaveInProgress = false; + this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Error saving export settings, please try again later'); } - }, () => { - this.isSaveInProgress = false; - this.toastService.displayToastMessage(ToastSeverity.ERROR, 'Error saving settings, please try again later'); }); } }