diff --git a/src/app/core/models/db/expense-group.model.ts b/src/app/core/models/db/expense-group.model.ts index 1d7b8357c..bc6499478 100644 --- a/src/app/core/models/db/expense-group.model.ts +++ b/src/app/core/models/db/expense-group.model.ts @@ -32,7 +32,7 @@ export type ExpenseGroupParam = { limit: number; offset: number; tasklog__status?: string; - status__in?: string; + status__in?: string | string[]; exported_at__gte?: string; exported_at__lte?: string; state?: string; diff --git a/src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-onboarding.model.ts b/src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-onboarding.model.ts index d0c369c89..913ac9eea 100644 --- a/src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-onboarding.model.ts +++ b/src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-onboarding.model.ts @@ -26,7 +26,7 @@ export class QbdDirectOnboardingModel { completed: false, step: this.brandingContent.preRequisite.stepName, icon: 'arrow-tail-up-medium', - route: '/integrations/qbo/onboarding/pre_requisite', + route: '/integrations/qbd_direct/onboarding/pre_requisite', styleClasses: ['step-name-pre-requisite--text'] }, { @@ -34,7 +34,7 @@ export class QbdDirectOnboardingModel { completed: false, step: this.brandingContent.connector.stepName, icon: 'link-vertical-medium', - route: '/integrations/qbo/onboarding/connector', + route: '/integrations/qbd_direct/onboarding/connector', styleClasses: ['step-name-connector--text !tw-left-[-70px]'] }, { @@ -42,7 +42,7 @@ export class QbdDirectOnboardingModel { completed: false, step: this.brandingContent.exportSetting.stepName, icon: 'arrow-tail-up-medium', - route: '/integrations/qbo/onboarding/export_settings', + route: '/integrations/qbd_direct/onboarding/export_settings', styleClasses: ['step-name-export--text'] }, { @@ -50,7 +50,7 @@ export class QbdDirectOnboardingModel { completed: false, step: this.brandingContent.importSetting.stepName, icon: 'arrow-tail-down-medium', - route: '/integrations/qbo/onboarding/import_settings', + route: '/integrations/qbd_direct/onboarding/import_settings', styleClasses: ['step-name-export--text'] }, { @@ -58,7 +58,7 @@ export class QbdDirectOnboardingModel { completed: false, step: this.brandingContent.advancedSettings.stepName, icon: 'gear-medium', - route: '/integrations/qbo/onboarding/advanced_settings', + route: '/integrations/qbd_direct/onboarding/advanced_settings', styleClasses: ['step-name-advanced--text'] } ]; diff --git a/src/app/core/services/common/accounting-export.service.ts b/src/app/core/services/common/accounting-export.service.ts index c970bd684..cb0e9d999 100644 --- a/src/app/core/services/common/accounting-export.service.ts +++ b/src/app/core/services/common/accounting-export.service.ts @@ -73,7 +73,7 @@ export class AccountingExportService { if (appName === AppName.QBD_DIRECT) { if (apiParams.status__in?.includes(AccountingExportStatus.FAILED)) { - apiParams.status__in = AccountingExportStatus.ERROR; + apiParams.status__in = [AccountingExportStatus.ERROR, AccountingExportStatus.FATAL]; } delete apiParams.type__in; return this.apiService.get(`/workspaces/${this.workspaceId}/export_logs/`, apiParams); diff --git a/src/app/core/services/common/export-log.service.ts b/src/app/core/services/common/export-log.service.ts index 9d9aa6b27..922989d70 100644 --- a/src/app/core/services/common/export-log.service.ts +++ b/src/app/core/services/common/export-log.service.ts @@ -86,7 +86,7 @@ export class ExportLogService { return this.apiService.get(`/workspaces/${this.workspaceId}/fyle/expense_groups/v2/`, params); } else if (appName === AppName.QBD_DIRECT) { if (params.status__in?.includes(AccountingExportStatus.FAILED)) { - params.status__in = AccountingExportStatus.ERROR; + params.status__in = [AccountingExportStatus.ERROR, AccountingExportStatus.FATAL]; } return this.apiService.get(`/workspaces/${this.workspaceId}/export_logs/`, params); diff --git a/src/app/core/services/qbd-direct/qbd-direct-core/qbd-direct-helper.service.ts b/src/app/core/services/qbd-direct/qbd-direct-core/qbd-direct-helper.service.ts index aebf8d052..ecd714845 100644 --- a/src/app/core/services/qbd-direct/qbd-direct-core/qbd-direct-helper.service.ts +++ b/src/app/core/services/qbd-direct/qbd-direct-core/qbd-direct-helper.service.ts @@ -20,7 +20,7 @@ export class QbdDirectHelperService { return this.apiService.post(`/workspaces/${this.workspaceService.getWorkspaceId()}/qbd/import_attributes/`, {refresh}); } - importAttribuites(refresh: boolean): void { + importAttributes(refresh: boolean): void { this.workspaceService.importFyleAttributes(refresh).subscribe(); this.importQBDAttributes(refresh).subscribe(); this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Syncing data dimensions from Quickbooks Desktop'); diff --git a/src/app/integrations/netsuite/netsuite-main/netsuite-main.component.ts b/src/app/integrations/netsuite/netsuite-main/netsuite-main.component.ts index b59a475f2..b9d54bf9d 100644 --- a/src/app/integrations/netsuite/netsuite-main/netsuite-main.component.ts +++ b/src/app/integrations/netsuite/netsuite-main/netsuite-main.component.ts @@ -33,14 +33,14 @@ export class NetsuiteMainComponent implements OnInit { private accountingExportService: AccountingExportService, private netsuiteHelperService: NetsuiteHelperService, private router: Router, - private toastServeice: IntegrationsToastService + private toastService: IntegrationsToastService ) { } refreshDimensions() { this.netsuiteHelperService.refreshNetsuiteDimensions().subscribe(); this.netsuiteHelperService.refreshFyleDimensions().subscribe(); this.accountingExportService.importExpensesFromFyle('v1').subscribe(); - this.toastServeice.displayToastMessage(ToastSeverity.SUCCESS, 'Syncing data dimensions from NetSuite'); + this.toastService.displayToastMessage(ToastSeverity.SUCCESS, 'Syncing data dimensions from NetSuite'); } private setupPage() { diff --git a/src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-main.component.ts b/src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-main.component.ts index 6da18cf74..20f6aa9b8 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-main.component.ts +++ b/src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-main.component.ts @@ -3,8 +3,10 @@ import { Component, OnInit } from '@angular/core'; import { Router, RouterModule } from '@angular/router'; import { MenuItem } from 'primeng/api'; import { brandingContent, brandingFeatureConfig } from 'src/app/branding/branding-config'; -import { AppName } from 'src/app/core/models/enum/enum.model'; +import { AppName, ToastSeverity } from 'src/app/core/models/enum/enum.model'; +import { IntegrationsToastService } from 'src/app/core/services/common/integrations-toast.service'; import { WorkspaceService } from 'src/app/core/services/common/workspace.service'; +import { QbdDirectHelperService } from 'src/app/core/services/qbd-direct/qbd-direct-core/qbd-direct-helper.service'; import { SharedModule } from 'src/app/shared/shared.module'; @Component({ @@ -32,7 +34,9 @@ export class QbdDirectMainComponent implements OnInit { readonly brandingFeatureConfig = brandingFeatureConfig; constructor( + private qbdDirectHelperService: QbdDirectHelperService, private router: Router, + private toastService: IntegrationsToastService, private workspaceService: WorkspaceService ) { } @@ -43,7 +47,7 @@ export class QbdDirectMainComponent implements OnInit { } refreshDimensions() { - this.workspaceService.importFyleAttributes(true).subscribe(); + this.qbdDirectHelperService.importAttributes(true); } ngOnInit(): void { diff --git a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.ts b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.ts index 5e30ed827..f9509df1b 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.ts +++ b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-advanced-settings/qbd-direct-advanced-settings.component.ts @@ -144,7 +144,7 @@ export class QbdDirectAdvancedSettingsComponent implements OnInit { } refreshDimensions() { - this.qbdDirectHelperService.importAttribuites(true); + this.qbdDirectHelperService.importAttributes(true); } save() { diff --git a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.ts b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.ts index 1fddf738d..c827c3e2f 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.ts +++ b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-export-settings/qbd-direct-export-settings.component.ts @@ -195,7 +195,7 @@ export class QbdDirectExportSettingsComponent implements OnInit{ } refreshDimensions() { - this.qbdDirectHelperService.importAttribuites(true); + this.qbdDirectHelperService.importAttributes(true); } cccExportTypeWatcher(): void { diff --git a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-import-settings/qbd-direct-import-settings.component.ts b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-import-settings/qbd-direct-import-settings.component.ts index c52691937..6e4488d1e 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-import-settings/qbd-direct-import-settings.component.ts +++ b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-import-settings/qbd-direct-import-settings.component.ts @@ -133,7 +133,7 @@ export class QbdDirectImportSettingsComponent implements OnInit { } refreshDimensions() { - this.qbdDirectHelperService.importAttribuites(true); + this.qbdDirectHelperService.importAttributes(true); } navigateToPreviousStep(): void {