Skip to content

Commit

Permalink
qbd direct prod fix (#1128)
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT committed Dec 17, 2024
1 parent 204c5f7 commit 0ba8e1d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export class QbdDirectDashboardComponent implements OnInit {

this.importCodeFields = responses[5].import_settings?.import_code_fields;

this.chartOfAccounts = responses[5].import_settings.import_account_as_category ? responses[5].import_settings.chart_of_accounts : QbdDirectImportSettingModel.getChartOfAccountTypesList();
this.chartOfAccounts = responses[5].import_settings.import_account_as_category ? responses[5].import_settings.chart_of_accounts.map((item: string) => item.replace(/\s+/g, '')) : QbdDirectImportSettingModel.getChartOfAccountTypesList().map((item: string) => item.replace(/\s+/g, ''));

const queuedTasks: QbdDirectTaskLog[] = responses[2].results.filter((task: QbdDirectTaskLog) => this.exportLogProcessingStates.includes(task.status));
this.failedExpenseGroupCount = responses[2].results.filter((task: QbdDirectTaskLog) => task.status === TaskLogState.ERROR || task.status === TaskLogState.FATAL).length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class QbdDirectBaseMappingComponent implements OnInit {
this.cccExpenseObject = responses[0].credit_card_expense_export_type;
this.employeeFieldMapping = (responses[0].employee_field_mapping as unknown as FyleField);
this.nameInJE = responses[0].name_in_journal_entry;
this.chartOfAccounts = responses[1].import_settings.import_account_as_category ? responses[1].import_settings.chart_of_accounts : QbdDirectImportSettingModel.getChartOfAccountTypesList();
this.chartOfAccounts = responses[1].import_settings.import_account_as_category ? responses[1].import_settings.chart_of_accounts.map((item: string) => item.replace(/\s+/g, '')) : QbdDirectImportSettingModel.getChartOfAccountTypesList().map((item: string) => item.replace(/\s+/g, ''));

this.destinationField = this.getDestinationField(responses[0], responses[2].results);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class QbdDirectOnboardingConnectorComponent implements OnInit {

xmlFileContent: string;

isCompanyPathInvalid: boolean = true;
isCompanyPathInvalid: boolean;

password: string;

Expand Down Expand Up @@ -87,12 +87,12 @@ export class QbdDirectOnboardingConnectorComponent implements OnInit {
this.isDownloadfileLoading = true;
this.isCompanyPathInvalid = false;
this.qbdDirectConnectorService.postQbdDirectConntion({file_location: filePath}).subscribe((connectionResponse: QbdConnectorGet) => {
this.password = connectionResponse.password;
this.xmlFileContent = connectionResponse.qwc;
this.triggerManualDownload();
this.showDownloadLink = true;
this.password = connectionResponse.password;
this.xmlFileContent = connectionResponse.qwc;
this.showDownloadLink = true;
this.isDownloadfileLoading = false;
this.triggerManualDownload();
});
this.isDownloadfileLoading = false;
} else {
this.isCompanyPathInvalid = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class DashboardErrorSectionComponent implements OnInit {
}

if (this.destinationField === AccountingField.ACCOUNT && this.appName === AppName.QBD_DIRECT) {
this.detailAccountType = this.chartOfAccounts;
this.detailAccountType = this.chartOfAccounts.map((item: string) => item.replace(/\s+/g, ''));
} else {
this.detailAccountType = undefined;
}
Expand Down

0 comments on commit 0ba8e1d

Please sign in to comment.