Skip to content

Commit

Permalink
fixed single value widget table view; fix #SNRGY-3019
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahannes committed Dec 11, 2023
1 parent c16ffe1 commit 404772f
Showing 1 changed file with 30 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,37 @@ <h2 mat-dialog-title>Edit Single Value</h2>
<mat-radio-button value="device">Device</mat-radio-button>
</mat-radio-group>

<mat-form-field color="accent" [fxHide]="form.get('sourceType')?.value !== 'export'">
<mat-label>Choose Export</mat-label>
<senergy-select-search [options]="exports" formControlName="measurement" useOptionViewProperty="name"
[compareWith]="compareIds">
</senergy-select-search>
</mat-form-field>

<mat-form-field color="accent" [fxHide]="form.get('sourceType')?.value !== 'device'">
<mat-label>Choose Device</mat-label>
<senergy-select-search [options]="devices" formControlName="device" useOptionViewProperty="display_name"
[compareWith]="compareIds">
</senergy-select-search>
</mat-form-field>

<mat-form-field color="accent" [fxHide]="form.get('sourceType')?.value !== 'device'">
<mat-label>Choose Service</mat-label>
<senergy-select-search [options]="services" formControlName="service" useOptionViewProperty="name"
[compareWith]="compareIds">
</senergy-select-search>
</mat-form-field>

<table>
<tr *ngIf="form.get('sourceType')?.value === 'device'">
<td>
<mat-form-field color="accent">
<mat-label>Choose Device</mat-label>
<senergy-select-search [options]="devices" formControlName="device" useOptionViewProperty="display_name"
[compareWith]="compareIds">
</senergy-select-search>
</mat-form-field>

</td>
<td>
<mat-form-field color="accent">
<mat-label>Choose Service</mat-label>
<senergy-select-search [options]="services" formControlName="service" useOptionViewProperty="name"
[compareWith]="compareIds">
</senergy-select-search>
</mat-form-field>
</td>
</tr>
<tr *ngIf="form.get('sourceType')?.value === 'export'">
<td>
<mat-form-field color="accent">
<mat-label>Choose Export</mat-label>
<senergy-select-search [options]="exports" formControlName="measurement" useOptionViewProperty="name"
[compareWith]="compareIds">
</senergy-select-search>
</mat-form-field>

</td>
</tr>
<tr>
<td *ngIf="form.get('sourceType')?.value === 'export'">
<mat-form-field color="accent">
Expand Down

0 comments on commit 404772f

Please sign in to comment.