Skip to content

Commit

Permalink
Merge branch 'master' into fix-card-num-memo
Browse files Browse the repository at this point in the history
  • Loading branch information
anishfyle committed Dec 11, 2024
2 parents aabe8c5 + ed9fa54 commit efa1546
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class QbdDirectImportSettingModel extends ImportSettingsModel {
chartOfAccountTypes: new FormControl(importSettings?.import_settings?.chart_of_accounts ? importSettings.import_settings.chart_of_accounts.map(item => item.replace(/([a-z])([A-Z])/g, '$1 $2')) : ['Expense']),
importVendorsAsMerchants: new FormControl(importSettings?.import_settings?.import_vendor_as_merchant ?? false),
searchOption: new FormControl(''),
importCodeFields: new FormControl( importSettings?.import_settings?.import_code_fields ? importSettings.import_settings.import_code_fields : null),
importCodeFields: new FormControl( importSettings?.import_settings?.import_code_fields ? importSettings.import_settings.import_code_fields : []),
importCategoryCode: new FormControl(this.getImportCodeField(importCode, 'ACCOUNT', QbdDirectImportCodeFieldCodeConfig)),
workSpaceId: new FormControl(importSettings?.workspace_id)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
[options]="reimbursableExpenseGroupingFieldOptions"
[iconPath]="'question-square-outline'"
[placeholder]="'Select expense grouping'"
[appName]="appName"
[isDisableTextRequired]="isReimbursableExportGroupDisabled()"
[isDisabled]="isReimbursableExportGroupDisabled()"
[formControllerName]="'reimbursableExportGroup'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h5 *ngIf="!isCloneSettingView" class="!tw-text-text-muted tw-text-14-px !tw-fon
<app-svg-icon *ngIf="(expenseField.get('source_field')?.value !== 'CATEGORY') && (uiExposedAppName === AppName.XERO ? expenseField.get('destination_field')?.value !== 'CUSTOMER' : true )" [svgSource]="'cross-medium'" [c1SvgSource]="'grv-cross-filled-medium'" (click)="removeFilter(expenseField)" [height]="'18px'" [width]="'18px'" [styleClasses]="'tw-mt-4-px'"></app-svg-icon>
</ng-template>
</p-dropdown>
<p *ngIf="(expenseField.get('source_field')?.value && !expenseField.valid && !hasDuplicateOption(expenseField, i, 'source_field')) || (!expenseField.get('source_field')?.value && expenseField.value.import_to_fyle)" class="tw-text-alert-toast tw-text-12-px tw-pt-4-px">
<p *ngIf="(expenseField.get('source_field')?.value && !expenseField.valid && !hasDuplicateOption(expenseField, i, 'source_field'))" class="tw-text-alert-toast tw-text-12-px tw-pt-4-px">
{{brandingConfig.brandName}} Fields should be unique
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ <h5 *ngIf="formControllerName === 'cccExportType' && brandingConfig.brandId ===
<span *ngIf="brandingConfig.brandId === 'co'"> in {{uiExposedAppName}}</span>
</div>
<div *ngIf="!showExportPreview && isDisabled && isDisableTextRequired" class="sub-text tw-text-pretty">
<span>Auto-selected based on your export module</span>
<span *ngIf="(formControllerName === 'reimbursableExportGroup' || formControllerName === 'creditCardExportGroup') && appName === AppName.QBD_DIRECT && form.controls.creditCardExportType.value !== 'CREDIT_CARD_PURCHASE'"> Auto-selected when your default credit account is set to an Accounts Payable account</span>
<span *ngIf="!((formControllerName === 'reimbursableExportGroup' || formControllerName === 'creditCardExportGroup') && appName === AppName.QBD_DIRECT && form.controls.creditCardExportType.value !== 'CREDIT_CARD_PURCHASE' && form.controls.reimbursableExportType.value !== 'BILL')">Auto-selected based on your export module</span>
<span *ngIf="(formControllerName === 'reimbursableExportGroup' || formControllerName === 'creditCardExportGroup') && appName === AppName.QBD_DIRECT && form.controls.creditCardExportType.value !== 'CREDIT_CARD_PURCHASE' && form.controls.reimbursableExportType.value !== 'BILL'"> Auto-selected when your default credit account is set to an Accounts Payable account</span>
</div>
<div *ngIf="brandingConfig.brandId !== 'co' && form.controls[formControllerName].value==='spent_at' && isOnboarding && form.get('cccExportType')?.value && form.get('cccExportGroup')?.value === 'REPORT'" class="sub-text">
<span>Using the Spend Date may lead to multiple single line<br>item entries.</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ export class DashboardErrorSectionComponent implements OnInit {
this.displayName = undefined;
}

this.mappingService.getPaginatedDestinationAttributes(this.destinationField, undefined, this.displayName).subscribe((response: any) => {
if (this.destinationField === AccountingField.ACCOUNT && this.appName === AppName.QBD_DIRECT) {
this.detailAccountType = this.chartOfAccounts;
} else {
this.detailAccountType = undefined;
}

this.mappingService.getPaginatedDestinationAttributes(this.destinationField, undefined, this.displayName, this.appName, this.detailAccountType).subscribe((response: any) => {
this.destinationOptions = response.results;

this.setErrors(errorType);
Expand All @@ -149,13 +155,11 @@ 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[]);
this.destinationOptions = groupedDestinationResponse.ACCOUNT;
}
}

Expand Down

0 comments on commit efa1546

Please sign in to comment.