Skip to content

Commit

Permalink
Fix Fyle options in c1 import settings (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwin1111 authored Mar 8, 2024
1 parent 4316b7b commit cba194c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h5 *ngIf="!isCloneSettingView" class="!tw-text-text-muted tw-text-14-px !tw-fon
<app-svg-icon [isTextColorAllowed]="true" [svgSource]="'arrow-line'" [height]="'10px'" [width]="'100px'" [styleClasses]="'tw-self-center tw-text-border-secondary'"></app-svg-icon>
</div>
<div class="tw-w-28-vw">
<p-dropdown [disabled]="expenseField.value.source_field === 'CATEGORY'" (onChange)="onDropdownChange($event, i)" appendTo="body" [options]="fyleFieldOptions" [placeholder]="'Choose ' + brandingConfig.brandName + ' Expense field'" formControlName="source_field"
<p-dropdown [disabled]="expenseField.value.source_field === 'CATEGORY'" (onChange)="onDropdownChange($event, i)" appendTo="body" [options]="expenseField.value.source_field === 'CATEGORY' ? fyleFieldOptions: filteredFyleFields" [placeholder]="'Choose ' + brandingConfig.brandName + ' Expense field'" formControlName="source_field"
optionLabel="display_name" optionValue="attribute_type" [ngClass]="{'selectedItem': expenseField.value.source_field, 'selectedAccItem !tw-text-text-secondary': expenseField.value.source_field === 'CATEGORY', 'filterDropdown': !expenseField.value.source_field}" [dropdownIcon]="'pi pi-chevron-down ' + brandingConfig.brandId">
<ng-template let-option pTemplate="item">
<div [ngClass]="{'custom-option': option.attribute_type === 'custom_field'}" class="tw-align-middle">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export class ConfigurationImportFieldComponent implements OnInit {

@Output() showWarningForDependentFields = new EventEmitter();

filteredFyleFields: FyleField[];

showDependentFieldWarning: boolean;

showAddButton: any;
Expand Down Expand Up @@ -130,6 +132,7 @@ export class ConfigurationImportFieldComponent implements OnInit {
}

ngOnInit(): void {
this.filteredFyleFields = this.fyleFieldOptions.filter(option => option.attribute_type !== 'CATEGORY');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ <h5 class="tw-text-text-muted tw-text-14-px tw-pt-8-px !tw-font-400 tw-text-pret
Sync
</span>
</button>
<div *ngIf="showSyncButton && !brandingFeatureConfig.isIconsInsideButtonAllowed">
<span (click)="refreshDimensions()" class="p-button primary-outline tw-mr-12-px" [pTooltip]="'If you are unable to find a required value, click the sync button to instantly retrieve the latest values from ' + appName">
<div *ngIf="showSyncButton && !brandingFeatureConfig.isIconsInsideButtonAllowed" tooltipPosition="bottom" [pTooltip]="'If you are unable to find a required value, click the sync button to instantly retrieve the latest values from ' + appName">
<span (click)="refreshDimensions()" class="p-button primary-outline tw-mr-12-px">
Sync
</span>
</div>
Expand Down

0 comments on commit cba194c

Please sign in to comment.