Skip to content

Commit

Permalink
Handle issues with settings
Browse files Browse the repository at this point in the history
Enable plain input when dropdowns are empty
  • Loading branch information
YehuditAdler committed Jan 24, 2024
1 parent 8c0ee2e commit ece2812
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions cloudapp/src/app/settings/settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,16 @@ <h1>Settings</h1>
>
<mat-form-field>
<mat-label>Work order type</mat-label>
<mat-select
<input *ngIf="work_order_types?.length === 0"
matInput
type="text"
[matTooltip]="constants.workOrderTypeTip"
ngModel
name="work_order_type"
[(ngModel)]="config.mustConfig.work_order_type"
#work_order_type
/>
<mat-select *ngIf="work_order_types?.length > 0"
[matTooltip]="constants.workOrderTypeTip"
ngModel
name="work_order_type"
Expand All @@ -117,7 +126,15 @@ <h1>Settings</h1>
</mat-form-field>
<mat-form-field>
<mat-label>Status</mat-label>
<mat-select
<input *ngIf="statuses?.length === 0"
matInput
type="text"
[matTooltip]="constants.statusTip"
ngModel
name="status"
[(ngModel)]="config.mustConfig.status"
/>
<mat-select *ngIf="statuses?.length > 0"
#status
[matTooltip]="constants.statusTip"
ngModel
Expand Down

0 comments on commit ece2812

Please sign in to comment.