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/models/db/task-log.model.ts b/src/app/core/models/db/task-log.model.ts index 0b25fb9cf..b1b946c58 100644 --- a/src/app/core/models/db/task-log.model.ts +++ b/src/app/core/models/db/task-log.model.ts @@ -23,5 +23,5 @@ export type TaskLogGetParams = { type__in?: string[]; expense_group_ids?: number[]; task_type?: string[]; - export_log_id__in?: number[]; + export_log__id?: number[]; }; diff --git a/src/app/core/models/enum/enum.model.ts b/src/app/core/models/enum/enum.model.ts index c3e9bd164..bf3851ea0 100644 --- a/src/app/core/models/enum/enum.model.ts +++ b/src/app/core/models/enum/enum.model.ts @@ -622,7 +622,8 @@ export enum AccountingExportStatus { COMPLETE = 'COMPLETE', IN_PROGRESS = 'IN_PROGRESS', ENQUEUED = 'ENQUEUED', - EXPORT_QUEUED = 'EXPORT_QUEUED' + EXPORT_QUEUED = 'EXPORT_QUEUED', + ERROR = 'ERROR' } export enum AccountingExportType { diff --git a/src/app/core/services/common/dashboard.service.ts b/src/app/core/services/common/dashboard.service.ts index 692f84b10..8f2f90345 100644 --- a/src/app/core/services/common/dashboard.service.ts +++ b/src/app/core/services/common/dashboard.service.ts @@ -58,7 +58,7 @@ export class DashboardService { } if (expenseGroupIds.length) { - const expenseKey = appName === AppName.INTACCT ? 'expense_group_ids' : appName === AppName.QBD_DIRECT ? 'export_log_id__in' : 'expense_group_id__in'; + const expenseKey = appName === AppName.INTACCT ? 'expense_group_ids' : appName === AppName.QBD_DIRECT ? 'export_log__id' : 'expense_group_id__in'; apiParams[expenseKey] = expenseGroupIds; } diff --git a/src/app/core/services/common/export-log.service.ts b/src/app/core/services/common/export-log.service.ts index 91d34d5ee..9d9aa6b27 100644 --- a/src/app/core/services/common/export-log.service.ts +++ b/src/app/core/services/common/export-log.service.ts @@ -2,11 +2,9 @@ import { Injectable } from '@angular/core'; import { ApiService } from './api.service'; import { UserService } from '../misc/user.service'; import { WorkspaceService } from './workspace.service'; -import { environment } from 'src/environments/environment'; import { SkipExportLogResponse } from '../../models/intacct/db/expense-group.model'; -import { AppName, FyleReferenceType, TaskLogState } from '../../models/enum/enum.model'; +import { AccountingExportStatus, AppName, TaskLogState } from '../../models/enum/enum.model'; import { Observable } from 'rxjs'; -import { AccountingExport } from '../../models/db/accounting-export.model'; import { SelectedDateFilter } from '../../models/qbd/misc/qbd-date-filter.model'; import { ExpenseGroupParam, ExpenseGroupResponse, SkipExportParam } from '../../models/db/expense-group.model'; @@ -87,6 +85,10 @@ export class ExportLogService { if (appName === AppName.NETSUITE) { 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; + } + return this.apiService.get(`/workspaces/${this.workspaceId}/export_logs/`, params); } return this.apiService.get(`/workspaces/${this.workspaceId}/fyle/expense_groups/`, params); 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-main/qbd-direct-dashboard/qbd-direct-dashboard.component.ts b/src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.ts index 976751ef5..ce7ddab95 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.ts +++ b/src/app/integrations/qbd-direct/qbd-direct-main/qbd-direct-dashboard/qbd-direct-dashboard.component.ts @@ -115,7 +115,7 @@ export class QbdDirectDashboardComponent implements OnInit { EMPLOYEE_MAPPING: null, CATEGORY_MAPPING: null }; - this.accountingExportSummary = AccountingExportSummaryModel.parseAPIResponseToAccountingSummary(responses[1]); + this.accountingExportSummary = AccountingExportSummaryModel.parseAPIResponseToAccountingSummaryForQbdDirect(responses[1]); this.failedExpenseGroupCount = res.results.filter(task => task.status === TaskLogState.FAILED || task.status === TaskLogState.FATAL).length; this.exportableAccountingExportIds = res.results.filter(task => task.status === TaskLogState.FAILED || task.status === TaskLogState.FATAL).map(taskLog => taskLog.expense_group); @@ -143,7 +143,7 @@ export class QbdDirectDashboardComponent implements OnInit { this.accountingExportSummary = AccountingExportSummaryModel.parseAPIResponseToAccountingSummaryForQbdDirect(responses[1]); } this.destinationFieldMap = { - EMPLOYEE: responses[3].employee_field_mapping, + EMPLOYEE: responses[4].employee_field_mapping, CATEGORY: 'ACCOUNT' }; 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-download-file/qbd-direct-download-file.component.html b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.html index 1a0e89165..5ba143752 100644 --- a/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.html +++ b/src/app/integrations/qbd-direct/qbd-direct-shared/qbd-direct-download-file/qbd-direct-download-file.component.html @@ -57,7 +57,7 @@

Enter com
- +

Your download will begin

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 f7d0209e4..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}}

@@ -85,7 +85,7 @@

Click on

- +

Success!

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 { diff --git a/src/app/shared/components/core/svg-icon/svg-icon.component.ts b/src/app/shared/components/core/svg-icon/svg-icon.component.ts index 506b69d4e..8718f7de3 100644 --- a/src/app/shared/components/core/svg-icon/svg-icon.component.ts +++ b/src/app/shared/components/core/svg-icon/svg-icon.component.ts @@ -20,6 +20,7 @@ const ICON_MAPPING = { 'check-circle-outline-small': 'grv-checkmark-encircled-small', 'check-circle-outline': 'grv-checkmark-encircled', 'check-circle-outline-medium': 'grv-checkmark-encircled-medium', + 'check-circle-outline-extra-large': 'grv-checkmark-encircled-extra-large', 'check-medium': 'grv-checkmark-medium', 'check': 'grv-checkmark', 'check-large': 'grv-checkmark-large', diff --git a/src/assets/icons/check-circle-outline-extra-large.svg b/src/assets/icons/check-circle-outline-extra-large.svg index 081b0cafb..7325f2d6a 100644 --- a/src/assets/icons/check-circle-outline-extra-large.svg +++ b/src/assets/icons/check-circle-outline-extra-large.svg @@ -1,4 +1,4 @@ - + diff --git a/src/assets/icons/co/grv-checkmark-encircled-extra-large.svg b/src/assets/icons/co/grv-checkmark-encircled-extra-large.svg new file mode 100644 index 000000000..56cc26a06 --- /dev/null +++ b/src/assets/icons/co/grv-checkmark-encircled-extra-large.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/icons/eye-medium.svg b/src/assets/icons/eye-medium.svg index 8fad3c549..dcb53b047 100644 --- a/src/assets/icons/eye-medium.svg +++ b/src/assets/icons/eye-medium.svg @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/src/assets/sprites/sprite.svg b/src/assets/sprites/sprite.svg index 819111c78..62277cbcc 100644 --- a/src/assets/sprites/sprite.svg +++ b/src/assets/sprites/sprite.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file