Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
anishfyle committed Dec 16, 2024
1 parent 35712f1 commit 244ac58
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/app/core/models/common/advanced-settings.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
</div>
</div>

<div class="tw-mt-16-px tw-bg-white tw-border tw-border-solid tw-border-border-tertiary tw-rounded-12-px">
<div *ngIf="brandingConfig.brandId === 'fyle'" class="tw-mt-16-px tw-bg-white tw-border tw-border-solid tw-border-border-tertiary tw-rounded-12-px">
<form [formGroup]="employeeSettingForm">
<app-configuration-select-field
[form]="employeeSettingForm"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { Observable, Subject, debounceTime, filter, forkJoin } from 'rxjs';
import { Observable, Subject, concat, debounceTime, filter, forkJoin } from 'rxjs';
import { brandingConfig, brandingContent, brandingFeatureConfig, brandingKbArticles } from 'src/app/branding/branding-config';
import { ExportSettingModel, ExportSettingOptionSearch } from 'src/app/core/models/common/export-settings.model';
import { SelectFormOption } from 'src/app/core/models/common/select-form-option.model';
Expand Down Expand Up @@ -152,19 +152,25 @@ export class QboExportSettingsComponent implements OnInit {
this.isSaveInProgress = true;
const exportSettingPayload = QBOExportSettingModel.constructPayload(this.exportSettingForm);
const employeeSettingPayload = QBOEmployeeSettingModel.constructPayload(this.employeeSettingForm);
forkJoin([

Check failure on line 155 in src/app/integrations/qbo/qbo-shared/qbo-export-settings/qbo-export-settings.component.ts

View workflow job for this annotation

GitHub Actions / lint

Trailing spaces not allowed
concat(
this.employeeSettingService.postEmployeeSettings(employeeSettingPayload),
this.exportSettingService.postExportSettings(exportSettingPayload)
]).subscribe(() => {
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');
});
}
}
Expand Down

0 comments on commit 244ac58

Please sign in to comment.