Skip to content

Commit

Permalink
fix: fixed txnField cost center is_mandatory issue (#3248)
Browse files Browse the repository at this point in the history
* fix: fixed txnField cost center is_mandatory issue

* Additional fixes
  • Loading branch information
devendrafyle authored Oct 29, 2024
1 parent 81c9d0d commit d9b879e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/fyle/add-edit-per-diem/add-edit-per-diem.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -417,21 +417,21 @@

<ng-container *ngIf="costCenters$|async as costCenters">
<ng-container *ngIf="txnFields$|async as txnFields">
<ng-container *ngIf="txnFields.cost_center_id.is_mandatory || isExpandedView">
<ng-container *ngIf="txnFields.cost_center_id?.is_mandatory || isExpandedView">
<div
*ngIf="costCenters.length > 0 && txnFields?.cost_center_id"
[ngClass]="{'add-edit-per-diem--internal-block__invalid': fg.controls.costCenter.touched && !fg.controls.costCenter.valid}"
class="add-edit-per-diem--internal-block"
>
<app-virtual-select
[cacheName]="'perDiemCostCenterCache'"
[label]="txnFields.cost_center_id.field_name | ellipsis: 30"
[mandatory]="txnFields.cost_center_id.is_mandatory"
[label]="txnFields.cost_center_id?.field_name | ellipsis: 30"
[mandatory]="txnFields.cost_center_id?.is_mandatory"
[options]="costCenters"
[selectModalHeader]="'Select Cost Center'"
[recentlyUsed]="recentCostCenters"
formControlName="costCenter"
[placeholder]="txnFields.cost_center_id.placeholder | ellipsis: 30"
[placeholder]="txnFields.cost_center_id?.placeholder | ellipsis: 30"
>
</app-virtual-select>
</div>
Expand Down

0 comments on commit d9b879e

Please sign in to comment.