-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: QBD direct bug fixes #1101
Changes from 3 commits
b8a9c0f
1da613e
0bfe78e
522be3f
287b3a3
c25229f
fed0d68
1762b05
3b7e2b5
4acb11a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,11 +64,11 @@ | |
(searchOptionsDropdown)="searchOptionsDropdown($event)" | ||
[optionLabel]="'value'" | ||
[isFieldMandatory]="true" | ||
[mandatoryErrorListName]="'accounts payable'" | ||
[mandatoryErrorListName]="'default credit card account'" | ||
[label]="brandingContent.reimbursable.defaultReimbursableAccountPayableLabel + (exportSettingsForm.get('reimbursableExportType')?.value | snakeCaseToSpaceCase | titlecase)" | ||
[subLabel]="brandingContent.reimbursable.defaultReimbursableAccountPayableSubLabel + (exportSettingsForm.get('reimbursableExportType')?.value | snakeCaseToSpaceCase | titlecase) + ' ,while debit lines will reflect the category chosen by the employee for each respective expense'" | ||
[iconPath]="'list'" | ||
[placeholder]="'Select accounts payable'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. revert back |
||
[placeholder]="'Select default credit card account'" | ||
[isMultiLineOption]="true" | ||
[formControllerName]="'defaultReimbursableAccountsPayableAccountName'"> | ||
</app-configuration-select-field> | ||
|
@@ -203,11 +203,11 @@ | |
(searchOptionsDropdown)="searchOptionsDropdown($event)" | ||
[optionLabel]="'value'" | ||
[isFieldMandatory]="true" | ||
[mandatoryErrorListName]="'accounts payable'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
[mandatoryErrorListName]="'default credit card account'" | ||
[label]="brandingContent.corporateCard.defaultCCCAccountPayableLabel + (exportSettingsForm.get('creditCardExportType')?.value | snakeCaseToSpaceCase | titlecase)" | ||
[subLabel]="brandingContent.corporateCard.defaultCCCAccountPayableSubLabel + (exportSettingsForm.get('creditCardExportType')?.value | snakeCaseToSpaceCase | titlecase) + ' ,while debit lines will reflect the category chosen by the employee for each respective expense'" | ||
[iconPath]="'list'" | ||
[placeholder]="'Select accounts payable'" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
[placeholder]="'Select default credit card account'" | ||
[isMultiLineOption]="true" | ||
[formControllerName]="'defaultCCCAccountsPayableAccountName'"> | ||
</app-configuration-select-field> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,8 @@ export class DashboardErrorSectionComponent implements OnInit { | |
|
||
isMultiLineOption: boolean; | ||
|
||
detailAccountType: string[] | undefined; | ||
|
||
constructor( | ||
private dashboardService: DashboardService, | ||
private mappingService: MappingService, | ||
|
@@ -145,10 +147,12 @@ export class DashboardErrorSectionComponent implements OnInit { | |
this.mappingService.getGroupedDestinationAttributes([this.destinationField], 'v2').subscribe(groupedDestinationResponse => { | ||
if (this.sourceField === 'EMPLOYEE') { | ||
this.destinationOptions = this.destinationField === FyleField.EMPLOYEE ? groupedDestinationResponse.EMPLOYEE : groupedDestinationResponse.VENDOR; | ||
this.detailAccountType = undefined; | ||
} else if (this.sourceField === 'CATEGORY') { | ||
if (this.destinationField === 'EXPENSE_TYPE') { | ||
this.destinationOptions = groupedDestinationResponse.EXPENSE_TYPE; | ||
} else { | ||
this.detailAccountType = this.chartOfAccounts; | ||
this.destinationOptions = this.appName !== AppName.QBD_DIRECT ? groupedDestinationResponse.ACCOUNT : this.destinationOptionsWatcher( this.chartOfAccounts, groupedDestinationResponse.ACCOUNT as QbdDirectDestinationAttribute[]); | ||
} | ||
} | ||
|
@@ -210,8 +214,9 @@ export class DashboardErrorSectionComponent implements OnInit { | |
} | ||
|
||
handleResolvedMappingStat(): void { | ||
this.dashboardService.getExportErrors(this.errorsVersion, this.appName).subscribe((errors) => { | ||
const argument = this.errorsVersion === 'v1' ? errors : (errors as ErrorResponse).results; | ||
const errorVersion = this.appName === AppName.QBD_DIRECT ? this.appName : this.errorsVersion; | ||
this.dashboardService.getExportErrors(errorVersion).subscribe((errors) => { | ||
const argument = errorVersion === 'v1' ? errors : (errors as ErrorResponse).results; | ||
Comment on lines
+219
to
+221
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add error handling for export errors retrieval. The service call to - this.dashboardService.getExportErrors(errorVersion).subscribe((errors) => {
+ this.dashboardService.getExportErrors(errorVersion).subscribe({
+ next: (errors) => {
const argument = errorVersion === 'v1' ? errors : (errors as ErrorResponse).results;
const newError: AccountingGroupedErrors = this.formatErrors(argument);
+ },
+ error: (error) => {
+ console.error('Failed to fetch export errors:', error);
+ // Consider showing an error message to the user
+ }
+ });
|
||
const newError: AccountingGroupedErrors = this.formatErrors(argument); | ||
|
||
if (this.errors.CATEGORY_MAPPING.length !== newError.CATEGORY_MAPPING.length) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert back